Class: Worldline::Acquiring::SDK::V1::Domain::OriginalTransactionData
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::OriginalTransactionData
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/original_transaction_data.rb
Instance Attribute Summary collapse
-
#cardholder_verification_method ⇒ String
The current value of cardholder_verification_method.
-
#local_transaction_date_time ⇒ String
The current value of local_transaction_date_time.
-
#payment_category ⇒ String
The current value of payment_category.
-
#payment_method_data ⇒ Worldline::Acquiring::SDK::V1::Domain::PaymentMethodData
The current value of payment_method_data.
-
#point_of_sale_entry_mode ⇒ String
The current value of point_of_sale_entry_mode.
-
#scheme_processed_date_time ⇒ String
The current value of scheme_processed_date_time.
-
#settlement_amount ⇒ Worldline::Acquiring::SDK::V1::Domain::AmountData
The current value of settlement_amount.
-
#transaction_amount ⇒ Worldline::Acquiring::SDK::V1::Domain::AmountData
The current value of transaction_amount.
-
#transaction_references ⇒ Worldline::Acquiring::SDK::V1::Domain::TransactionReferencesDispute
The current value of transaction_references.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#cardholder_verification_method ⇒ String
Returns the current value of cardholder_verification_method.
23 24 25 |
# File 'lib/worldline/acquiring/sdk/v1/domain/original_transaction_data.rb', line 23 def cardholder_verification_method @cardholder_verification_method end |
#local_transaction_date_time ⇒ String
Returns the current value of local_transaction_date_time.
23 24 25 |
# File 'lib/worldline/acquiring/sdk/v1/domain/original_transaction_data.rb', line 23 def local_transaction_date_time @local_transaction_date_time end |
#payment_category ⇒ String
Returns the current value of payment_category.
23 24 25 |
# File 'lib/worldline/acquiring/sdk/v1/domain/original_transaction_data.rb', line 23 def payment_category @payment_category end |
#payment_method_data ⇒ Worldline::Acquiring::SDK::V1::Domain::PaymentMethodData
Returns the current value of payment_method_data.
23 24 25 |
# File 'lib/worldline/acquiring/sdk/v1/domain/original_transaction_data.rb', line 23 def payment_method_data @payment_method_data end |
#point_of_sale_entry_mode ⇒ String
Returns the current value of point_of_sale_entry_mode.
23 24 25 |
# File 'lib/worldline/acquiring/sdk/v1/domain/original_transaction_data.rb', line 23 def point_of_sale_entry_mode @point_of_sale_entry_mode end |
#scheme_processed_date_time ⇒ String
Returns the current value of scheme_processed_date_time.
23 24 25 |
# File 'lib/worldline/acquiring/sdk/v1/domain/original_transaction_data.rb', line 23 def scheme_processed_date_time @scheme_processed_date_time end |
#settlement_amount ⇒ Worldline::Acquiring::SDK::V1::Domain::AmountData
Returns the current value of settlement_amount.
23 24 25 |
# File 'lib/worldline/acquiring/sdk/v1/domain/original_transaction_data.rb', line 23 def settlement_amount @settlement_amount end |
#transaction_amount ⇒ Worldline::Acquiring::SDK::V1::Domain::AmountData
Returns the current value of transaction_amount.
23 24 25 |
# File 'lib/worldline/acquiring/sdk/v1/domain/original_transaction_data.rb', line 23 def transaction_amount @transaction_amount end |
#transaction_references ⇒ Worldline::Acquiring::SDK::V1::Domain::TransactionReferencesDispute
Returns the current value of transaction_references.
23 24 25 |
# File 'lib/worldline/acquiring/sdk/v1/domain/original_transaction_data.rb', line 23 def transaction_references @transaction_references end |
Instance Method Details
#from_hash(hash) ⇒ Object
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 89 90 91 |
# File 'lib/worldline/acquiring/sdk/v1/domain/original_transaction_data.rb', line 58 def from_hash(hash) super if hash.has_key? 'cardholderVerificationMethod' @cardholder_verification_method = hash['cardholderVerificationMethod'] end if hash.has_key? 'localTransactionDateTime' @local_transaction_date_time = hash['localTransactionDateTime'] end if hash.has_key? 'paymentCategory' @payment_category = hash['paymentCategory'] end if hash.has_key? 'paymentMethodData' raise TypeError, "value '%s' is not a Hash" % [hash['paymentMethodData']] unless hash['paymentMethodData'].is_a? Hash @payment_method_data = Worldline::Acquiring::SDK::V1::Domain::PaymentMethodData.new_from_hash(hash['paymentMethodData']) end if hash.has_key? 'pointOfSaleEntryMode' @point_of_sale_entry_mode = hash['pointOfSaleEntryMode'] end if hash.has_key? 'schemeProcessedDateTime' @scheme_processed_date_time = hash['schemeProcessedDateTime'] end if hash.has_key? 'settlementAmount' raise TypeError, "value '%s' is not a Hash" % [hash['settlementAmount']] unless hash['settlementAmount'].is_a? Hash @settlement_amount = Worldline::Acquiring::SDK::V1::Domain::AmountData.new_from_hash(hash['settlementAmount']) end if hash.has_key? 'transactionAmount' raise TypeError, "value '%s' is not a Hash" % [hash['transactionAmount']] unless hash['transactionAmount'].is_a? Hash @transaction_amount = Worldline::Acquiring::SDK::V1::Domain::AmountData.new_from_hash(hash['transactionAmount']) end if hash.has_key? 'transactionReferences' raise TypeError, "value '%s' is not a Hash" % [hash['transactionReferences']] unless hash['transactionReferences'].is_a? Hash @transaction_references = Worldline::Acquiring::SDK::V1::Domain::TransactionReferencesDispute.new_from_hash(hash['transactionReferences']) end end |
#to_h ⇒ Hash
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/worldline/acquiring/sdk/v1/domain/original_transaction_data.rb', line 44 def to_h hash = super hash['cardholderVerificationMethod'] = @cardholder_verification_method unless @cardholder_verification_method.nil? hash['localTransactionDateTime'] = @local_transaction_date_time unless @local_transaction_date_time.nil? hash['paymentCategory'] = @payment_category unless @payment_category.nil? hash['paymentMethodData'] = @payment_method_data.to_h unless @payment_method_data.nil? hash['pointOfSaleEntryMode'] = @point_of_sale_entry_mode unless @point_of_sale_entry_mode.nil? hash['schemeProcessedDateTime'] = @scheme_processed_date_time unless @scheme_processed_date_time.nil? hash['settlementAmount'] = @settlement_amount.to_h unless @settlement_amount.nil? hash['transactionAmount'] = @transaction_amount.to_h unless @transaction_amount.nil? hash['transactionReferences'] = @transaction_references.to_h unless @transaction_references.nil? hash end |