Class: Worldline::Acquiring::SDK::V1::Domain::PointOfSaleDataForResponse
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::PointOfSaleDataForResponse
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/point_of_sale_data_for_response.rb
Instance Attribute Summary collapse
-
#emv_data ⇒ Array<Worldline::Acquiring::SDK::V1::Domain::EmvDataItem>
The current value of emv_data.
-
#pan_last4_digits ⇒ String
The current value of pan_last4_digits.
-
#pin_retry_counter ⇒ Integer
The current value of pin_retry_counter.
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.
15 16 17 |
# File 'lib/worldline/acquiring/sdk/v1/domain/point_of_sale_data_for_response.rb', line 15 def emv_data @emv_data end |
#pan_last4_digits ⇒ String
Returns the current value of pan_last4_digits.
15 16 17 |
# File 'lib/worldline/acquiring/sdk/v1/domain/point_of_sale_data_for_response.rb', line 15 def pan_last4_digits @pan_last4_digits end |
#pin_retry_counter ⇒ Integer
Returns the current value of pin_retry_counter.
15 16 17 |
# File 'lib/worldline/acquiring/sdk/v1/domain/point_of_sale_data_for_response.rb', line 15 def pin_retry_counter @pin_retry_counter end |
Instance Method Details
#from_hash(hash) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/worldline/acquiring/sdk/v1/domain/point_of_sale_data_for_response.rb', line 32 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? 'panLast4Digits' @pan_last4_digits = hash['panLast4Digits'] end if hash.has_key? 'pinRetryCounter' @pin_retry_counter = hash['pinRetryCounter'] end end |
#to_h ⇒ Hash
24 25 26 27 28 29 30 |
# File 'lib/worldline/acquiring/sdk/v1/domain/point_of_sale_data_for_response.rb', line 24 def to_h hash = super hash['emvData'] = @emv_data.collect{|val| val.to_h} unless @emv_data.nil? hash['panLast4Digits'] = @pan_last4_digits unless @pan_last4_digits.nil? hash['pinRetryCounter'] = @pin_retry_counter unless @pin_retry_counter.nil? hash end |