Class: Paymos::Response

Inherits:
Struct
  • Object
show all
Defined in:
lib/paymos/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



10
11
12
# File 'lib/paymos/client.rb', line 10

def body
  @body
end

#headersObject

Returns the value of attribute headers

Returns:

  • (Object)

    the current value of headers



10
11
12
# File 'lib/paymos/client.rb', line 10

def headers
  @headers
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



10
11
12
# File 'lib/paymos/client.rb', line 10

def status
  @status
end