Class: OnlinePayments::SDK::Domain::CardToken
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::CardToken
- Defined in:
- lib/onlinepayments/sdk/domain/card_token.rb
Instance Attribute Summary collapse
-
#cardholder_name ⇒ String
The current value of cardholder_name.
-
#expiry_date ⇒ String
The current value of expiry_date.
-
#logo_url ⇒ String
The current value of logo_url.
-
#masked_pan ⇒ String
The current value of masked_pan.
-
#payment_product_id ⇒ Integer
The current value of payment_product_id.
-
#product_name ⇒ String
The current value of product_name.
-
#token ⇒ String
The current value of token.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#cardholder_name ⇒ String
Returns the current value of cardholder_name.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/card_token.rb', line 16 def cardholder_name @cardholder_name end |
#expiry_date ⇒ String
Returns the current value of expiry_date.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/card_token.rb', line 16 def expiry_date @expiry_date end |
#logo_url ⇒ String
Returns the current value of logo_url.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/card_token.rb', line 16 def logo_url @logo_url end |
#masked_pan ⇒ String
Returns the current value of masked_pan.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/card_token.rb', line 16 def masked_pan @masked_pan end |
#payment_product_id ⇒ Integer
Returns the current value of payment_product_id.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/card_token.rb', line 16 def payment_product_id @payment_product_id end |
#product_name ⇒ String
Returns the current value of product_name.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/card_token.rb', line 16 def product_name @product_name end |
#token ⇒ String
Returns the current value of token.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/card_token.rb', line 16 def token @token end |
Instance Method Details
#from_hash(hash) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/onlinepayments/sdk/domain/card_token.rb', line 45 def from_hash(hash) super if hash.has_key? 'cardholderName' @cardholder_name = hash['cardholderName'] end if hash.has_key? 'expiryDate' @expiry_date = hash['expiryDate'] end if hash.has_key? 'logoUrl' @logo_url = hash['logoUrl'] end if hash.has_key? 'maskedPan' @masked_pan = hash['maskedPan'] end if hash.has_key? 'paymentProductId' @payment_product_id = hash['paymentProductId'] end if hash.has_key? 'productName' @product_name = hash['productName'] end if hash.has_key? 'token' @token = hash['token'] end end |
#to_h ⇒ Hash
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/onlinepayments/sdk/domain/card_token.rb', line 33 def to_h hash = super hash['cardholderName'] = @cardholder_name unless @cardholder_name.nil? hash['expiryDate'] = @expiry_date unless @expiry_date.nil? hash['logoUrl'] = @logo_url unless @logo_url.nil? hash['maskedPan'] = @masked_pan unless @masked_pan.nil? hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil? hash['productName'] = @product_name unless @product_name.nil? hash['token'] = @token unless @token.nil? hash end |