Class: Ingenico::Direct::SDK::Domain::DecryptedPaymentData
- Inherits:
-
Ingenico::Direct::SDK::DataObject
- Object
- Ingenico::Direct::SDK::DataObject
- Ingenico::Direct::SDK::Domain::DecryptedPaymentData
- Defined in:
- lib/ingenico/direct/sdk/domain/decrypted_payment_data.rb
Instance Attribute Summary collapse
-
#cardholder_name ⇒ String
The current value of cardholder_name.
-
#cryptogram ⇒ String
The current value of cryptogram.
-
#dpan ⇒ String
The current value of dpan.
-
#eci ⇒ Integer
The current value of eci.
-
#expiry_date ⇒ String
The current value of expiry_date.
Instance Method Summary collapse
Methods inherited from Ingenico::Direct::SDK::DataObject
Instance Attribute Details
#cardholder_name ⇒ String
Returns the current value of cardholder_name.
15 16 17 |
# File 'lib/ingenico/direct/sdk/domain/decrypted_payment_data.rb', line 15 def cardholder_name @cardholder_name end |
#cryptogram ⇒ String
Returns the current value of cryptogram.
15 16 17 |
# File 'lib/ingenico/direct/sdk/domain/decrypted_payment_data.rb', line 15 def cryptogram @cryptogram end |
#dpan ⇒ String
Returns the current value of dpan.
15 16 17 |
# File 'lib/ingenico/direct/sdk/domain/decrypted_payment_data.rb', line 15 def dpan @dpan end |
#eci ⇒ Integer
Returns the current value of eci.
15 16 17 |
# File 'lib/ingenico/direct/sdk/domain/decrypted_payment_data.rb', line 15 def eci @eci end |
#expiry_date ⇒ String
Returns the current value of expiry_date.
15 16 17 |
# File 'lib/ingenico/direct/sdk/domain/decrypted_payment_data.rb', line 15 def expiry_date @expiry_date end |
Instance Method Details
#from_hash(hash) ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/ingenico/direct/sdk/domain/decrypted_payment_data.rb', line 33 def from_hash(hash) super @cardholder_name = hash['cardholderName'] if hash.key? 'cardholderName' @cryptogram = hash['cryptogram'] if hash.key? 'cryptogram' @dpan = hash['dpan'] if hash.key? 'dpan' @eci = hash['eci'] if hash.key? 'eci' @expiry_date = hash['expiryDate'] if hash.key? 'expiryDate' end |
#to_h ⇒ Hash
23 24 25 26 27 28 29 30 31 |
# File 'lib/ingenico/direct/sdk/domain/decrypted_payment_data.rb', line 23 def to_h hash = super hash['cardholderName'] = @cardholder_name unless @cardholder_name.nil? hash['cryptogram'] = @cryptogram unless @cryptogram.nil? hash['dpan'] = @dpan unless @dpan.nil? hash['eci'] = @eci unless @eci.nil? hash['expiryDate'] = @expiry_date unless @expiry_date.nil? hash end |