Class: Worldline::Acquiring::SDK::V1::Domain::OriginalTransactionSummaryData
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::OriginalTransactionSummaryData
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/original_transaction_summary_data.rb
Instance Attribute Summary collapse
-
#cardholder_verification_method ⇒ String
The current value of cardholder_verification_method.
-
#payment_category ⇒ String
The current value of payment_category.
-
#payment_method_data ⇒ Worldline::Acquiring::SDK::V1::Domain::PaymentMethodDataBase
The current value of payment_method_data.
-
#point_of_sale_entry_mode ⇒ String
The current value of point_of_sale_entry_mode.
-
#transaction_references ⇒ Worldline::Acquiring::SDK::V1::Domain::TransactionReferencesBase
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.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/original_transaction_summary_data.rb', line 18 def cardholder_verification_method @cardholder_verification_method end |
#payment_category ⇒ String
Returns the current value of payment_category.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/original_transaction_summary_data.rb', line 18 def payment_category @payment_category end |
#payment_method_data ⇒ Worldline::Acquiring::SDK::V1::Domain::PaymentMethodDataBase
Returns the current value of payment_method_data.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/original_transaction_summary_data.rb', line 18 def payment_method_data @payment_method_data end |
#point_of_sale_entry_mode ⇒ String
Returns the current value of point_of_sale_entry_mode.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/original_transaction_summary_data.rb', line 18 def point_of_sale_entry_mode @point_of_sale_entry_mode end |
#transaction_references ⇒ Worldline::Acquiring::SDK::V1::Domain::TransactionReferencesBase
Returns the current value of transaction_references.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/original_transaction_summary_data.rb', line 18 def transaction_references @transaction_references end |
Instance Method Details
#from_hash(hash) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/worldline/acquiring/sdk/v1/domain/original_transaction_summary_data.rb', line 41 def from_hash(hash) super if hash.has_key? 'cardholderVerificationMethod' @cardholder_verification_method = hash['cardholderVerificationMethod'] 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::PaymentMethodDataBase.new_from_hash(hash['paymentMethodData']) end if hash.has_key? 'pointOfSaleEntryMode' @point_of_sale_entry_mode = hash['pointOfSaleEntryMode'] 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::TransactionReferencesBase.new_from_hash(hash['transactionReferences']) end end |
#to_h ⇒ Hash
31 32 33 34 35 36 37 38 39 |
# File 'lib/worldline/acquiring/sdk/v1/domain/original_transaction_summary_data.rb', line 31 def to_h hash = super hash['cardholderVerificationMethod'] = @cardholder_verification_method unless @cardholder_verification_method.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['transactionReferences'] = @transaction_references.to_h unless @transaction_references.nil? hash end |