58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# File 'lib/worldline/acquiring/sdk/v1/domain/sub_operation.rb', line 58
def from_hash(hash)
super
if hash.has_key? 'amount'
raise TypeError, "value '%s' is not a Hash" % [hash['amount']] unless hash['amount'].is_a? Hash
@amount = Worldline::Acquiring::SDK::V1::Domain::AmountData.new_from_hash(hash['amount'])
end
if hash.has_key? 'authorizationCode'
@authorization_code = hash['authorizationCode']
end
if hash.has_key? 'operationId'
@operation_id = hash['operationId']
end
if hash.has_key? 'operationTimestamp'
@operation_timestamp = DateTime.parse(hash['operationTimestamp'])
end
if hash.has_key? 'operationType'
@operation_type = hash['operationType']
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
if hash.has_key? 'retryAfter'
@retry_after = hash['retryAfter']
end
end
|