Class: OnlinePayments::SDK::Domain::DetokenizedTokenResponse
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::DetokenizedTokenResponse
- Defined in:
- lib/onlinepayments/sdk/domain/detokenized_token_response.rb
Instance Attribute Summary collapse
-
#card_brand ⇒ String
The current value of card_brand.
-
#card_expiry_date ⇒ String
The current value of card_expiry_date.
-
#card_holder_name ⇒ String
The current value of card_holder_name.
-
#encrypted_card_number ⇒ String
The current value of encrypted_card_number.
-
#payment_id ⇒ String
The current value of payment_id.
-
#scheme_reference_data ⇒ String
The current value of scheme_reference_data.
-
#token ⇒ String
The current value of token.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#card_brand ⇒ String
Returns the current value of card_brand.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/detokenized_token_response.rb', line 16 def card_brand @card_brand end |
#card_expiry_date ⇒ String
Returns the current value of card_expiry_date.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/detokenized_token_response.rb', line 16 def card_expiry_date @card_expiry_date end |
#card_holder_name ⇒ String
Returns the current value of card_holder_name.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/detokenized_token_response.rb', line 16 def card_holder_name @card_holder_name end |
#encrypted_card_number ⇒ String
Returns the current value of encrypted_card_number.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/detokenized_token_response.rb', line 16 def encrypted_card_number @encrypted_card_number end |
#payment_id ⇒ String
Returns the current value of payment_id.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/detokenized_token_response.rb', line 16 def payment_id @payment_id end |
#scheme_reference_data ⇒ String
Returns the current value of scheme_reference_data.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/detokenized_token_response.rb', line 16 def scheme_reference_data @scheme_reference_data end |
#token ⇒ String
Returns the current value of token.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/detokenized_token_response.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/detokenized_token_response.rb', line 45 def from_hash(hash) super if hash.has_key? 'cardBrand' @card_brand = hash['cardBrand'] end if hash.has_key? 'cardExpiryDate' @card_expiry_date = hash['cardExpiryDate'] end if hash.has_key? 'cardHolderName' @card_holder_name = hash['cardHolderName'] end if hash.has_key? 'encryptedCardNumber' @encrypted_card_number = hash['encryptedCardNumber'] end if hash.has_key? 'paymentId' @payment_id = hash['paymentId'] end if hash.has_key? 'schemeReferenceData' @scheme_reference_data = hash['schemeReferenceData'] 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/detokenized_token_response.rb', line 33 def to_h hash = super hash['cardBrand'] = @card_brand unless @card_brand.nil? hash['cardExpiryDate'] = @card_expiry_date unless @card_expiry_date.nil? hash['cardHolderName'] = @card_holder_name unless @card_holder_name.nil? hash['encryptedCardNumber'] = @encrypted_card_number unless @encrypted_card_number.nil? hash['paymentId'] = @payment_id unless @payment_id.nil? hash['schemeReferenceData'] = @scheme_reference_data unless @scheme_reference_data.nil? hash['token'] = @token unless @token.nil? hash end |