Class: Worldline::Acquiring::SDK::V1::Domain::ApiAccountVerificationRequest
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::ApiAccountVerificationRequest
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/api_account_verification_request.rb
Instance Attribute Summary collapse
-
#card_payment_data ⇒ Worldline::Acquiring::SDK::V1::Domain::CardPaymentDataForVerification
The current value of card_payment_data.
-
#merchant ⇒ Worldline::Acquiring::SDK::V1::Domain::MerchantData
The current value of merchant.
-
#operation_id ⇒ String
The current value of operation_id.
-
#references ⇒ Worldline::Acquiring::SDK::V1::Domain::PaymentReferences
The current value of references.
-
#transaction_timestamp ⇒ DateTime
The current value of transaction_timestamp.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#card_payment_data ⇒ Worldline::Acquiring::SDK::V1::Domain::CardPaymentDataForVerification
Returns the current value of card_payment_data.
21 22 23 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_account_verification_request.rb', line 21 def card_payment_data @card_payment_data end |
#merchant ⇒ Worldline::Acquiring::SDK::V1::Domain::MerchantData
Returns the current value of merchant.
21 22 23 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_account_verification_request.rb', line 21 def merchant @merchant end |
#operation_id ⇒ String
Returns the current value of operation_id.
21 22 23 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_account_verification_request.rb', line 21 def operation_id @operation_id end |
#references ⇒ Worldline::Acquiring::SDK::V1::Domain::PaymentReferences
Returns the current value of references.
21 22 23 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_account_verification_request.rb', line 21 def references @references end |
#transaction_timestamp ⇒ DateTime
Returns the current value of transaction_timestamp.
21 22 23 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_account_verification_request.rb', line 21 def @transaction_timestamp end |
Instance Method Details
#from_hash(hash) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_account_verification_request.rb', line 44 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::CardPaymentDataForVerification.new_from_hash(hash['cardPaymentData']) end if hash.has_key? 'merchant' raise TypeError, "value '%s' is not a Hash" % [hash['merchant']] unless hash['merchant'].is_a? Hash @merchant = Worldline::Acquiring::SDK::V1::Domain::MerchantData.new_from_hash(hash['merchant']) end if hash.has_key? 'operationId' @operation_id = hash['operationId'] end if hash.has_key? 'references' raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash @references = Worldline::Acquiring::SDK::V1::Domain::PaymentReferences.new_from_hash(hash['references']) end if hash.has_key? 'transactionTimestamp' @transaction_timestamp = DateTime.parse(hash['transactionTimestamp']) end end |
#to_h ⇒ Hash
34 35 36 37 38 39 40 41 42 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_account_verification_request.rb', line 34 def to_h hash = super hash['cardPaymentData'] = @card_payment_data.to_h unless @card_payment_data.nil? hash['merchant'] = @merchant.to_h unless @merchant.nil? hash['operationId'] = @operation_id unless @operation_id.nil? hash['references'] = @references.to_h unless @references.nil? hash['transactionTimestamp'] = @transaction_timestamp.iso8601(3) unless @transaction_timestamp.nil? hash end |