Class: Worldline::Acquiring::SDK::V1::Domain::GetDCCRateRequest
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::GetDCCRateRequest
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/get_dcc_rate_request.rb
Instance Attribute Summary collapse
-
#card_payment_data ⇒ Worldline::Acquiring::SDK::V1::Domain::CardDataForDcc
The current value of card_payment_data.
-
#operation_id ⇒ String
The current value of operation_id.
-
#point_of_sale_data ⇒ Worldline::Acquiring::SDK::V1::Domain::PointOfSaleDataForDcc
The current value of point_of_sale_data.
-
#rate_reference_id ⇒ String
The current value of rate_reference_id.
-
#target_currency ⇒ String
The current value of target_currency.
-
#transaction ⇒ Worldline::Acquiring::SDK::V1::Domain::TransactionDataForDcc
The current value of transaction.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#card_payment_data ⇒ Worldline::Acquiring::SDK::V1::Domain::CardDataForDcc
Returns the current value of card_payment_data.
20 21 22 |
# File 'lib/worldline/acquiring/sdk/v1/domain/get_dcc_rate_request.rb', line 20 def card_payment_data @card_payment_data end |
#operation_id ⇒ String
Returns the current value of operation_id.
20 21 22 |
# File 'lib/worldline/acquiring/sdk/v1/domain/get_dcc_rate_request.rb', line 20 def operation_id @operation_id end |
#point_of_sale_data ⇒ Worldline::Acquiring::SDK::V1::Domain::PointOfSaleDataForDcc
Returns the current value of point_of_sale_data.
20 21 22 |
# File 'lib/worldline/acquiring/sdk/v1/domain/get_dcc_rate_request.rb', line 20 def point_of_sale_data @point_of_sale_data end |
#rate_reference_id ⇒ String
Returns the current value of rate_reference_id.
20 21 22 |
# File 'lib/worldline/acquiring/sdk/v1/domain/get_dcc_rate_request.rb', line 20 def rate_reference_id @rate_reference_id end |
#target_currency ⇒ String
Returns the current value of target_currency.
20 21 22 |
# File 'lib/worldline/acquiring/sdk/v1/domain/get_dcc_rate_request.rb', line 20 def target_currency @target_currency end |
#transaction ⇒ Worldline::Acquiring::SDK::V1::Domain::TransactionDataForDcc
Returns the current value of transaction.
20 21 22 |
# File 'lib/worldline/acquiring/sdk/v1/domain/get_dcc_rate_request.rb', line 20 def transaction @transaction end |
Instance Method Details
#from_hash(hash) ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/worldline/acquiring/sdk/v1/domain/get_dcc_rate_request.rb', line 46 def from_hash(hash) super if hash.has_key? 'cardPaymentData' raise TypeError, "value '%s' is not a Hash" % [hash['cardPaymentData']] unless hash['cardPaymentData'].is_a? Hash @card_payment_data = Worldline::Acquiring::SDK::V1::Domain::CardDataForDcc.new_from_hash(hash['cardPaymentData']) end if hash.has_key? 'operationId' @operation_id = hash['operationId'] end if hash.has_key? 'pointOfSaleData' raise TypeError, "value '%s' is not a Hash" % [hash['pointOfSaleData']] unless hash['pointOfSaleData'].is_a? Hash @point_of_sale_data = Worldline::Acquiring::SDK::V1::Domain::PointOfSaleDataForDcc.new_from_hash(hash['pointOfSaleData']) end if hash.has_key? 'rateReferenceId' @rate_reference_id = hash['rateReferenceId'] end if hash.has_key? 'targetCurrency' @target_currency = hash['targetCurrency'] end if hash.has_key? 'transaction' raise TypeError, "value '%s' is not a Hash" % [hash['transaction']] unless hash['transaction'].is_a? Hash @transaction = Worldline::Acquiring::SDK::V1::Domain::TransactionDataForDcc.new_from_hash(hash['transaction']) end end |
#to_h ⇒ Hash
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/worldline/acquiring/sdk/v1/domain/get_dcc_rate_request.rb', line 35 def to_h hash = super hash['cardPaymentData'] = @card_payment_data.to_h unless @card_payment_data.nil? hash['operationId'] = @operation_id unless @operation_id.nil? hash['pointOfSaleData'] = @point_of_sale_data.to_h unless @point_of_sale_data.nil? hash['rateReferenceId'] = @rate_reference_id unless @rate_reference_id.nil? hash['targetCurrency'] = @target_currency unless @target_currency.nil? hash['transaction'] = @transaction.to_h unless @transaction.nil? hash end |