Class: PaypalServerSdk::GooglePayDecryptedTokenData
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::GooglePayDecryptedTokenData
- Defined in:
- lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb
Overview
Details shared by Google for the merchant to be shared with PayPal. This is required to process the transaction using the Google Pay payment method.
Instance Attribute Summary collapse
-
#authentication_method ⇒ GooglePayAuthenticationMethod
Authentication Method which is used for the card transaction.
-
#card ⇒ GooglePayCard
The payment card used to fund a Google Pay payment.
-
#cryptogram ⇒ String
Base-64 cryptographic identifier used by card schemes to validate the token verification result.
-
#eci_indicator ⇒ String
Electronic Commerce Indicator may not always be present.
-
#message_expiration ⇒ String
Date and time at which the message expires as UTC milliseconds since epoch.
-
#message_id ⇒ String
A unique ID that identifies the message in case it needs to be revoked or located at a later time.
-
#payment_method ⇒ GooglePayPaymentMethod
The type of the payment credential.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(payment_method:, card:, authentication_method:, message_id: SKIP, message_expiration: SKIP, cryptogram: SKIP, eci_indicator: SKIP) ⇒ GooglePayDecryptedTokenData
constructor
A new instance of GooglePayDecryptedTokenData.
Methods inherited from BaseModel
Constructor Details
#initialize(payment_method:, card:, authentication_method:, message_id: SKIP, message_expiration: SKIP, cryptogram: SKIP, eci_indicator: SKIP) ⇒ GooglePayDecryptedTokenData
Returns a new instance of GooglePayDecryptedTokenData.
76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb', line 76 def initialize(payment_method:, card:, authentication_method:, message_id: SKIP, message_expiration: SKIP, cryptogram: SKIP, eci_indicator: SKIP) @message_id = unless == SKIP @message_expiration = unless == SKIP @payment_method = payment_method @card = card @authentication_method = authentication_method @cryptogram = cryptogram unless cryptogram == SKIP @eci_indicator = eci_indicator unless eci_indicator == SKIP end |
Instance Attribute Details
#authentication_method ⇒ GooglePayAuthenticationMethod
Authentication Method which is used for the card transaction.
34 35 36 |
# File 'lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb', line 34 def authentication_method @authentication_method end |
#card ⇒ GooglePayCard
The payment card used to fund a Google Pay payment. Can be a credit or debit card.
30 31 32 |
# File 'lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb', line 30 def card @card end |
#cryptogram ⇒ String
Base-64 cryptographic identifier used by card schemes to validate the token verification result. This is a conditionally required field if authentication_method is CRYPTOGRAM_3DS.
40 41 42 |
# File 'lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb', line 40 def cryptogram @cryptogram end |
#eci_indicator ⇒ String
Electronic Commerce Indicator may not always be present. It is only returned for tokens on the Visa card network. This value is passed through in the payment authorization request.
46 47 48 |
# File 'lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb', line 46 def eci_indicator @eci_indicator end |
#message_expiration ⇒ String
Date and time at which the message expires as UTC milliseconds since epoch. Integrators should reject any message that’s expired.
21 22 23 |
# File 'lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb', line 21 def @message_expiration end |
#message_id ⇒ String
A unique ID that identifies the message in case it needs to be revoked or located at a later time.
16 17 18 |
# File 'lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb', line 16 def @message_id end |
#payment_method ⇒ GooglePayPaymentMethod
The type of the payment credential. Currently, only CARD is supported.
25 26 27 |
# File 'lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb', line 25 def payment_method @payment_method end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb', line 89 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. payment_method = hash.key?('payment_method') ? hash['payment_method'] : nil card = GooglePayCard.from_hash(hash['card']) if hash['card'] authentication_method = hash.key?('authentication_method') ? hash['authentication_method'] : nil = hash.key?('message_id') ? hash['message_id'] : SKIP = hash.key?('message_expiration') ? hash['message_expiration'] : SKIP cryptogram = hash.key?('cryptogram') ? hash['cryptogram'] : SKIP eci_indicator = hash.key?('eci_indicator') ? hash['eci_indicator'] : SKIP # Create object from extracted values. GooglePayDecryptedTokenData.new(payment_method: payment_method, card: card, authentication_method: authentication_method, message_id: , message_expiration: , cryptogram: cryptogram, eci_indicator: eci_indicator) end |
.names ⇒ Object
A mapping from model property names to API property names.
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb', line 49 def self.names @_hash = {} if @_hash.nil? @_hash['message_id'] = 'message_id' @_hash['message_expiration'] = 'message_expiration' @_hash['payment_method'] = 'payment_method' @_hash['card'] = 'card' @_hash['authentication_method'] = 'authentication_method' @_hash['cryptogram'] = 'cryptogram' @_hash['eci_indicator'] = 'eci_indicator' @_hash end |
.nullables ⇒ Object
An array for nullable fields
72 73 74 |
# File 'lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb', line 72 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
62 63 64 65 66 67 68 69 |
# File 'lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb', line 62 def self.optionals %w[ message_id message_expiration cryptogram eci_indicator ] end |