Class: Worldline::Acquiring::SDK::V1::Domain::DukptPinEncryptionData
- Inherits:
-
PinEncryptionData
- Object
- Domain::DataObject
- PinEncryptionData
- Worldline::Acquiring::SDK::V1::Domain::DukptPinEncryptionData
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/dukpt_pin_encryption_data.rb
Constant Summary collapse
- PIN_ENCRYPTION_TYPE =
'DUKPT'.freeze
Instance Attribute Summary collapse
-
#key_serial_number ⇒ String
The current value of key_serial_number.
Instance Method Summary collapse
- #from_hash(hash) ⇒ Object
-
#initialize ⇒ DukptPinEncryptionData
constructor
A new instance of DukptPinEncryptionData.
- #pin_encryption_type ⇒ String
- #to_h ⇒ Hash
Methods inherited from Domain::DataObject
Constructor Details
#initialize ⇒ DukptPinEncryptionData
Returns a new instance of DukptPinEncryptionData.
20 21 22 23 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dukpt_pin_encryption_data.rb', line 20 def initialize super @pin_encryption_type = PIN_ENCRYPTION_TYPE end |
Instance Attribute Details
#key_serial_number ⇒ String
Returns the current value of key_serial_number.
12 13 14 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dukpt_pin_encryption_data.rb', line 12 def key_serial_number @key_serial_number end |
Instance Method Details
#from_hash(hash) ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dukpt_pin_encryption_data.rb', line 38 def from_hash(hash) super @pin_encryption_type = PIN_ENCRYPTION_TYPE if hash.has_key? 'keySerialNumber' @key_serial_number = hash['keySerialNumber'] end end |
#pin_encryption_type ⇒ String
26 27 28 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dukpt_pin_encryption_data.rb', line 26 def pin_encryption_type PIN_ENCRYPTION_TYPE end |
#to_h ⇒ Hash
31 32 33 34 35 36 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dukpt_pin_encryption_data.rb', line 31 def to_h hash = super hash['keySerialNumber'] = @key_serial_number unless @key_serial_number.nil? hash['pinEncryptionType'] = PIN_ENCRYPTION_TYPE hash end |