Class: OnlinePayments::SDK::Domain::DecryptedPaymentData
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::DecryptedPaymentData
- Defined in:
- lib/onlinepayments/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 DataObject
Instance Attribute Details
#cardholder_name ⇒ String
Returns the current value of cardholder_name.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/decrypted_payment_data.rb', line 14 def cardholder_name @cardholder_name end |
#cryptogram ⇒ String
Returns the current value of cryptogram.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/decrypted_payment_data.rb', line 14 def cryptogram @cryptogram end |
#dpan ⇒ String
Returns the current value of dpan.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/decrypted_payment_data.rb', line 14 def dpan @dpan end |
#eci ⇒ Integer
Returns the current value of eci.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/decrypted_payment_data.rb', line 14 def eci @eci end |
#expiry_date ⇒ String
Returns the current value of expiry_date.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/decrypted_payment_data.rb', line 14 def expiry_date @expiry_date end |
Instance Method Details
#from_hash(hash) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/onlinepayments/sdk/domain/decrypted_payment_data.rb', line 37 def from_hash(hash) super if hash.has_key? 'cardholderName' @cardholder_name = hash['cardholderName'] end if hash.has_key? 'cryptogram' @cryptogram = hash['cryptogram'] end if hash.has_key? 'dpan' @dpan = hash['dpan'] end if hash.has_key? 'eci' @eci = hash['eci'] end if hash.has_key? 'expiryDate' @expiry_date = hash['expiryDate'] end end |
#to_h ⇒ Hash
27 28 29 30 31 32 33 34 35 |
# File 'lib/onlinepayments/sdk/domain/decrypted_payment_data.rb', line 27 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 |