Class: SixSaferpay::SixTransaction::AdjustAmountResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/six_saferpay/api/six_transaction/responses/adjust_amount_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response_header:) ⇒ AdjustAmountResponse

Returns a new instance of AdjustAmountResponse.



7
8
9
# File 'lib/six_saferpay/api/six_transaction/responses/adjust_amount_response.rb', line 7

def initialize(response_header: )
  @response_header = SixSaferpay::ResponseHeader.new(**response_header.to_h) if response_header
end

Instance Attribute Details

#response_headerObject

Returns the value of attribute response_header.



5
6
7
# File 'lib/six_saferpay/api/six_transaction/responses/adjust_amount_response.rb', line 5

def response_header
  @response_header
end

Instance Method Details

#to_hashObject Also known as: to_h



11
12
13
14
15
# File 'lib/six_saferpay/api/six_transaction/responses/adjust_amount_response.rb', line 11

def to_hash
  hash = Hash.new
  hash.merge!(response_header: @response_header.to_h) if @response_header
  hash
end