Class: Worldline::Acquiring::SDK::V1::Domain::ApiIncrementRequest
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::ApiIncrementRequest
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/api_increment_request.rb
Instance Attribute Summary collapse
-
#dynamic_currency_conversion ⇒ Worldline::Acquiring::SDK::V1::Domain::DccData
The current value of dynamic_currency_conversion.
-
#increment_amount ⇒ Worldline::Acquiring::SDK::V1::Domain::AmountData
The current value of increment_amount.
-
#operation_id ⇒ String
The current value of operation_id.
-
#transaction_timestamp ⇒ DateTime
The current value of transaction_timestamp.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#dynamic_currency_conversion ⇒ Worldline::Acquiring::SDK::V1::Domain::DccData
Returns the current value of dynamic_currency_conversion.
19 20 21 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_increment_request.rb', line 19 def dynamic_currency_conversion @dynamic_currency_conversion end |
#increment_amount ⇒ Worldline::Acquiring::SDK::V1::Domain::AmountData
Returns the current value of increment_amount.
19 20 21 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_increment_request.rb', line 19 def increment_amount @increment_amount end |
#operation_id ⇒ String
Returns the current value of operation_id.
19 20 21 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_increment_request.rb', line 19 def operation_id @operation_id end |
#transaction_timestamp ⇒ DateTime
Returns the current value of transaction_timestamp.
19 20 21 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_increment_request.rb', line 19 def @transaction_timestamp end |
Instance Method Details
#from_hash(hash) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_increment_request.rb', line 39 def from_hash(hash) super if hash.has_key? 'dynamicCurrencyConversion' raise TypeError, "value '%s' is not a Hash" % [hash['dynamicCurrencyConversion']] unless hash['dynamicCurrencyConversion'].is_a? Hash @dynamic_currency_conversion = Worldline::Acquiring::SDK::V1::Domain::DccData.new_from_hash(hash['dynamicCurrencyConversion']) end if hash.has_key? 'incrementAmount' raise TypeError, "value '%s' is not a Hash" % [hash['incrementAmount']] unless hash['incrementAmount'].is_a? Hash @increment_amount = Worldline::Acquiring::SDK::V1::Domain::AmountData.new_from_hash(hash['incrementAmount']) end if hash.has_key? 'operationId' @operation_id = hash['operationId'] end if hash.has_key? 'transactionTimestamp' @transaction_timestamp = DateTime.parse(hash['transactionTimestamp']) end end |
#to_h ⇒ Hash
30 31 32 33 34 35 36 37 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_increment_request.rb', line 30 def to_h hash = super hash['dynamicCurrencyConversion'] = @dynamic_currency_conversion.to_h unless @dynamic_currency_conversion.nil? hash['incrementAmount'] = @increment_amount.to_h unless @increment_amount.nil? hash['operationId'] = @operation_id unless @operation_id.nil? hash['transactionTimestamp'] = @transaction_timestamp.iso8601(3) unless @transaction_timestamp.nil? hash end |