Class: NodexPay::Transport::Response
- Inherits:
-
Data
- Object
- Data
- NodexPay::Transport::Response
- Defined in:
- lib/nodex_pay/transport.rb,
sig/nodex_pay.rbs
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status:, headers:, body:) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(status:, headers:, body:) ⇒ Response
Returns a new instance of Response.
40 41 42 43 44 45 46 |
# File 'lib/nodex_pay/transport.rb', line 40 def initialize(status:, headers:, body:) immutable_headers = headers.to_h.each_with_object({}) do |(key, value), copy| copy[key.dup.freeze] = value.dup.freeze end.freeze super(status:, headers: immutable_headers, body: body.dup.freeze) end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body
39 40 41 |
# File 'lib/nodex_pay/transport.rb', line 39 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers
39 40 41 |
# File 'lib/nodex_pay/transport.rb', line 39 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status
39 40 41 |
# File 'lib/nodex_pay/transport.rb', line 39 def status @status end |