Class: Worldline::Acquiring::SDK::V1::Domain::ApiReversalResponse
Instance Attribute Summary collapse
#additional_response_data, #operation_id, #payment, #responder, #response_code, #response_code_category, #response_code_description
Instance Method Summary
collapse
new_from_hash
Instance Attribute Details
13
14
15
|
# File 'lib/worldline/acquiring/sdk/v1/domain/api_reversal_response.rb', line 13
def total_authorized_amount
@total_authorized_amount
end
|
Instance Method Details
#from_hash(hash) ⇒ Object
24
25
26
27
28
29
30
|
# File 'lib/worldline/acquiring/sdk/v1/domain/api_reversal_response.rb', line 24
def from_hash(hash)
super
if hash.has_key? 'totalAuthorizedAmount'
raise TypeError, "value '%s' is not a Hash" % [hash['totalAuthorizedAmount']] unless hash['totalAuthorizedAmount'].is_a? Hash
@total_authorized_amount = Worldline::Acquiring::SDK::V1::Domain::AmountData.new_from_hash(hash['totalAuthorizedAmount'])
end
end
|
#to_h ⇒ Hash
18
19
20
21
22
|
# File 'lib/worldline/acquiring/sdk/v1/domain/api_reversal_response.rb', line 18
def to_h
hash = super
hash['totalAuthorizedAmount'] = @total_authorized_amount.to_h unless @total_authorized_amount.nil?
hash
end
|