Class: Worldline::Acquiring::SDK::V1::Domain::ApiActionResponse
Instance Attribute Summary collapse
Instance Method Summary
collapse
new_from_hash
Instance Attribute Details
20
21
22
|
# File 'lib/worldline/acquiring/sdk/v1/domain/api_action_response.rb', line 20
def additional_response_data
@additional_response_data
end
|
#operation_id ⇒ String
20
21
22
|
# File 'lib/worldline/acquiring/sdk/v1/domain/api_action_response.rb', line 20
def operation_id
@operation_id
end
|
20
21
22
|
# File 'lib/worldline/acquiring/sdk/v1/domain/api_action_response.rb', line 20
def payment
@payment
end
|
#responder ⇒ String
20
21
22
|
# File 'lib/worldline/acquiring/sdk/v1/domain/api_action_response.rb', line 20
def responder
@responder
end
|
#response_code ⇒ String
20
21
22
|
# File 'lib/worldline/acquiring/sdk/v1/domain/api_action_response.rb', line 20
def response_code
@response_code
end
|
#response_code_category ⇒ String
20
21
22
|
# File 'lib/worldline/acquiring/sdk/v1/domain/api_action_response.rb', line 20
def response_code_category
@response_code_category
end
|
#response_code_description ⇒ String
20
21
22
|
# File 'lib/worldline/acquiring/sdk/v1/domain/api_action_response.rb', line 20
def response_code_description
@response_code_description
end
|
Instance Method Details
#from_hash(hash) ⇒ Object
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/worldline/acquiring/sdk/v1/domain/api_action_response.rb', line 49
def from_hash(hash)
super
if hash.has_key? 'additionalResponseData'
raise TypeError, "value '%s' is not a Hash" % [hash['additionalResponseData']] unless hash['additionalResponseData'].is_a? Hash
@additional_response_data = Worldline::Acquiring::SDK::V1::Domain::AdditionalResponseData.new_from_hash(hash['additionalResponseData'])
end
if hash.has_key? 'operationId'
@operation_id = hash['operationId']
end
if hash.has_key? 'payment'
raise TypeError, "value '%s' is not a Hash" % [hash['payment']] unless hash['payment'].is_a? Hash
@payment = Worldline::Acquiring::SDK::V1::Domain::ApiPaymentSummaryForResponse.new_from_hash(hash['payment'])
end
if hash.has_key? 'responder'
@responder = hash['responder']
end
if hash.has_key? 'responseCode'
@response_code = hash['responseCode']
end
if hash.has_key? 'responseCodeCategory'
@response_code_category = hash['responseCodeCategory']
end
if hash.has_key? 'responseCodeDescription'
@response_code_description = hash['responseCodeDescription']
end
end
|
#to_h ⇒ Hash
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/worldline/acquiring/sdk/v1/domain/api_action_response.rb', line 37
def to_h
hash = super
hash['additionalResponseData'] = @additional_response_data.to_h unless @additional_response_data.nil?
hash['operationId'] = @operation_id unless @operation_id.nil?
hash['payment'] = @payment.to_h unless @payment.nil?
hash['responder'] = @responder unless @responder.nil?
hash['responseCode'] = @response_code unless @response_code.nil?
hash['responseCodeCategory'] = @response_code_category unless @response_code_category.nil?
hash['responseCodeDescription'] = @response_code_description unless @response_code_description.nil?
hash
end
|