Class: Worldline::Acquiring::SDK::V1::Domain::AesUkptPinEncryptionData
- Inherits:
-
PinEncryptionData
- Object
- Domain::DataObject
- PinEncryptionData
- Worldline::Acquiring::SDK::V1::Domain::AesUkptPinEncryptionData
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/aes_ukpt_pin_encryption_data.rb
Constant Summary collapse
- PIN_ENCRYPTION_TYPE =
'AES_UKPT'.freeze
Instance Attribute Summary collapse
-
#key_generation ⇒ Integer
The current value of key_generation.
-
#random_value ⇒ String
The current value of random_value.
Instance Method Summary collapse
- #from_hash(hash) ⇒ Object
-
#initialize ⇒ AesUkptPinEncryptionData
constructor
A new instance of AesUkptPinEncryptionData.
- #pin_encryption_type ⇒ String
- #to_h ⇒ Hash
Methods inherited from Domain::DataObject
Constructor Details
#initialize ⇒ AesUkptPinEncryptionData
Returns a new instance of AesUkptPinEncryptionData.
23 24 25 26 |
# File 'lib/worldline/acquiring/sdk/v1/domain/aes_ukpt_pin_encryption_data.rb', line 23 def initialize super @pin_encryption_type = PIN_ENCRYPTION_TYPE end |
Instance Attribute Details
#key_generation ⇒ Integer
Returns the current value of key_generation.
13 14 15 |
# File 'lib/worldline/acquiring/sdk/v1/domain/aes_ukpt_pin_encryption_data.rb', line 13 def key_generation @key_generation end |
#random_value ⇒ String
Returns the current value of random_value.
13 14 15 |
# File 'lib/worldline/acquiring/sdk/v1/domain/aes_ukpt_pin_encryption_data.rb', line 13 def random_value @random_value end |
Instance Method Details
#from_hash(hash) ⇒ Object
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/worldline/acquiring/sdk/v1/domain/aes_ukpt_pin_encryption_data.rb', line 42 def from_hash(hash) super @pin_encryption_type = PIN_ENCRYPTION_TYPE if hash.has_key? 'keyGeneration' @key_generation = hash['keyGeneration'] end if hash.has_key? 'randomValue' @random_value = hash['randomValue'] end end |
#pin_encryption_type ⇒ String
29 30 31 |
# File 'lib/worldline/acquiring/sdk/v1/domain/aes_ukpt_pin_encryption_data.rb', line 29 def pin_encryption_type PIN_ENCRYPTION_TYPE end |
#to_h ⇒ Hash
34 35 36 37 38 39 40 |
# File 'lib/worldline/acquiring/sdk/v1/domain/aes_ukpt_pin_encryption_data.rb', line 34 def to_h hash = super hash['keyGeneration'] = @key_generation unless @key_generation.nil? hash['randomValue'] = @random_value unless @random_value.nil? hash['pinEncryptionType'] = PIN_ENCRYPTION_TYPE hash end |