Class: Paymos::Response
- Inherits:
-
Struct
- Object
- Struct
- Paymos::Response
- Defined in:
- lib/paymos/client.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status:, body:, headers: {}) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(status:, body:, headers: {}) ⇒ Response
Returns a new instance of Response.
11 12 13 14 15 16 |
# File 'lib/paymos/client.rb', line 11 def initialize(status:, body:, headers: {}) super(status: Integer(status), body: String(body), headers: headers.to_h.transform_values do |value| String(value) end.freeze) freeze end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body
10 11 12 |
# File 'lib/paymos/client.rb', line 10 def body @body end |
#headers ⇒ Object
Returns the value of attribute headers
10 11 12 |
# File 'lib/paymos/client.rb', line 10 def headers @headers end |
#status ⇒ Object
Returns the value of attribute status
10 11 12 |
# File 'lib/paymos/client.rb', line 10 def status @status end |