Class: PaypalServerSdk::VaultedDigitalWallet
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::VaultedDigitalWallet
- Defined in:
- lib/paypal_server_sdk/models/vaulted_digital_wallet.rb
Overview
Resource consolidating common request and response attributes for vaulting a Digital Wallet.
Instance Attribute Summary collapse
-
#customer_type ⇒ String
The customer type associated with a digital wallet payment token.
-
#description ⇒ String
The description displayed to the consumer on the approval flow for a digital wallet, as well as on the merchant view of the payment token management experience.
-
#permit_multiple_payment_tokens ⇒ TrueClass | FalseClass
Create multiple payment tokens for the same payer, merchant/platform combination.
-
#shipping ⇒ VaultedDigitalWalletShippingDetails
The shipping details.
-
#usage_type ⇒ String
The usage type associated with a digital wallet payment token.
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(description: SKIP, shipping: SKIP, permit_multiple_payment_tokens: false, usage_type: SKIP, customer_type: SKIP) ⇒ VaultedDigitalWallet
constructor
A new instance of VaultedDigitalWallet.
Methods inherited from BaseModel
Constructor Details
#initialize(description: SKIP, shipping: SKIP, permit_multiple_payment_tokens: false, usage_type: SKIP, customer_type: SKIP) ⇒ VaultedDigitalWallet
Returns a new instance of VaultedDigitalWallet.
72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/paypal_server_sdk/models/vaulted_digital_wallet.rb', line 72 def initialize(description: SKIP, shipping: SKIP, permit_multiple_payment_tokens: false, usage_type: SKIP, customer_type: SKIP) @description = description unless description == SKIP @shipping = shipping unless shipping == SKIP unless permit_multiple_payment_tokens == SKIP @permit_multiple_payment_tokens = permit_multiple_payment_tokens end @usage_type = usage_type unless usage_type == SKIP @customer_type = customer_type unless customer_type == SKIP end |
Instance Attribute Details
#customer_type ⇒ String
The customer type associated with a digital wallet payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
42 43 44 |
# File 'lib/paypal_server_sdk/models/vaulted_digital_wallet.rb', line 42 def customer_type @customer_type end |
#description ⇒ String
The description displayed to the consumer on the approval flow for a digital wallet, as well as on the merchant view of the payment token management experience. exp: PayPal.com.
17 18 19 |
# File 'lib/paypal_server_sdk/models/vaulted_digital_wallet.rb', line 17 def description @description end |
#permit_multiple_payment_tokens ⇒ TrueClass | FalseClass
Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.
32 33 34 |
# File 'lib/paypal_server_sdk/models/vaulted_digital_wallet.rb', line 32 def permit_multiple_payment_tokens @permit_multiple_payment_tokens end |
#shipping ⇒ VaultedDigitalWalletShippingDetails
The shipping details.
21 22 23 |
# File 'lib/paypal_server_sdk/models/vaulted_digital_wallet.rb', line 21 def shipping @shipping end |
#usage_type ⇒ String
The usage type associated with a digital wallet payment token.
36 37 38 |
# File 'lib/paypal_server_sdk/models/vaulted_digital_wallet.rb', line 36 def usage_type @usage_type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/paypal_server_sdk/models/vaulted_digital_wallet.rb', line 86 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. description = hash.key?('description') ? hash['description'] : SKIP shipping = VaultedDigitalWalletShippingDetails.from_hash(hash['shipping']) if hash['shipping'] permit_multiple_payment_tokens = hash['permit_multiple_payment_tokens'] ||= false usage_type = hash.key?('usage_type') ? hash['usage_type'] : SKIP customer_type = hash.key?('customer_type') ? hash['customer_type'] : SKIP # Create object from extracted values. VaultedDigitalWallet.new(description: description, shipping: shipping, permit_multiple_payment_tokens: permit_multiple_payment_tokens, usage_type: usage_type, customer_type: customer_type) end |
.names ⇒ Object
A mapping from model property names to API property names.
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/paypal_server_sdk/models/vaulted_digital_wallet.rb', line 45 def self.names @_hash = {} if @_hash.nil? @_hash['description'] = 'description' @_hash['shipping'] = 'shipping' @_hash['permit_multiple_payment_tokens'] = 'permit_multiple_payment_tokens' @_hash['usage_type'] = 'usage_type' @_hash['customer_type'] = 'customer_type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
68 69 70 |
# File 'lib/paypal_server_sdk/models/vaulted_digital_wallet.rb', line 68 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
57 58 59 60 61 62 63 64 65 |
# File 'lib/paypal_server_sdk/models/vaulted_digital_wallet.rb', line 57 def self.optionals %w[ description shipping permit_multiple_payment_tokens usage_type customer_type ] end |