Class: Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/point_of_sale_data.rb
Instance Attribute Summary collapse
-
#emv_data ⇒ Array<Worldline::Acquiring::SDK::V1::Domain::EmvDataItem>
The current value of emv_data.
-
#encrypted_pin_block ⇒ String
The current value of encrypted_pin_block.
-
#is_response_to_pin_request ⇒ true/false
The current value of is_response_to_pin_request.
-
#is_retry_with_the_same_operation_id ⇒ true/false
The current value of is_retry_with_the_same_operation_id.
-
#pin_master_key_reference ⇒ String
The current value of pin_master_key_reference.
-
#track2_data ⇒ String
The current value of track2_data.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#emv_data ⇒ Array<Worldline::Acquiring::SDK::V1::Domain::EmvDataItem>
Returns the current value of emv_data.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/point_of_sale_data.rb', line 18 def emv_data @emv_data end |
#encrypted_pin_block ⇒ String
Returns the current value of encrypted_pin_block.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/point_of_sale_data.rb', line 18 def encrypted_pin_block @encrypted_pin_block end |
#is_response_to_pin_request ⇒ true/false
Returns the current value of is_response_to_pin_request.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/point_of_sale_data.rb', line 18 def is_response_to_pin_request @is_response_to_pin_request end |
#is_retry_with_the_same_operation_id ⇒ true/false
Returns the current value of is_retry_with_the_same_operation_id.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/point_of_sale_data.rb', line 18 def is_retry_with_the_same_operation_id @is_retry_with_the_same_operation_id end |
#pin_master_key_reference ⇒ String
Returns the current value of pin_master_key_reference.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/point_of_sale_data.rb', line 18 def pin_master_key_reference @pin_master_key_reference end |
#track2_data ⇒ String
Returns the current value of track2_data.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/point_of_sale_data.rb', line 18 def track2_data @track2_data 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 65 66 67 68 |
# File 'lib/worldline/acquiring/sdk/v1/domain/point_of_sale_data.rb', line 44 def from_hash(hash) super if hash.has_key? 'emvData' raise TypeError, "value '%s' is not an Array" % [hash['emvData']] unless hash['emvData'].is_a? Array @emv_data = [] hash['emvData'].each do |e| @emv_data << Worldline::Acquiring::SDK::V1::Domain::EmvDataItem.new_from_hash(e) end end if hash.has_key? 'encryptedPinBlock' @encrypted_pin_block = hash['encryptedPinBlock'] end if hash.has_key? 'isResponseToPinRequest' @is_response_to_pin_request = hash['isResponseToPinRequest'] end if hash.has_key? 'isRetryWithTheSameOperationId' @is_retry_with_the_same_operation_id = hash['isRetryWithTheSameOperationId'] end if hash.has_key? 'pinMasterKeyReference' @pin_master_key_reference = hash['pinMasterKeyReference'] end if hash.has_key? 'track2Data' @track2_data = hash['track2Data'] end end |
#to_h ⇒ Hash
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/worldline/acquiring/sdk/v1/domain/point_of_sale_data.rb', line 33 def to_h hash = super hash['emvData'] = @emv_data.collect{|val| val.to_h} unless @emv_data.nil? hash['encryptedPinBlock'] = @encrypted_pin_block unless @encrypted_pin_block.nil? hash['isResponseToPinRequest'] = @is_response_to_pin_request unless @is_response_to_pin_request.nil? hash['isRetryWithTheSameOperationId'] = @is_retry_with_the_same_operation_id unless @is_retry_with_the_same_operation_id.nil? hash['pinMasterKeyReference'] = @pin_master_key_reference unless @pin_master_key_reference.nil? hash['track2Data'] = @track2_data unless @track2_data.nil? hash end |