Class: PaypalServerSdk::VenmoWalletVaultAttributes
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::VenmoWalletVaultAttributes
- Defined in:
- lib/paypal_server_sdk/models/venmo_wallet_vault_attributes.rb
Overview
Resource consolidating common request and response attirbutes for vaulting Venmo Wallet.
Instance Attribute Summary collapse
-
#customer_type ⇒ VenmoPaymentTokenCustomerType
The customer type associated with the Venmo payment token.
-
#description ⇒ String
The description displayed to Venmo consumer on the approval flow for Venmo, as well as on the Venmo payment token management experience on Venmo.com.
-
#permit_multiple_payment_tokens ⇒ TrueClass | FalseClass
Create multiple payment tokens for the same payer, merchant/platform combination.
-
#store_in_vault ⇒ StoreInVaultInstruction
Defines how and when the payment source gets vaulted.
-
#usage_pattern ⇒ VenmoPaymentTokenUsagePattern
Expected business/pricing model for the billing agreement.
-
#usage_type ⇒ VenmoPaymentTokenUsageType
The usage type associated with the Venmo 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(store_in_vault:, usage_type:, description: SKIP, usage_pattern: SKIP, customer_type: VenmoPaymentTokenCustomerType::CONSUMER, permit_multiple_payment_tokens: false) ⇒ VenmoWalletVaultAttributes
constructor
A new instance of VenmoWalletVaultAttributes.
Methods inherited from BaseModel
Constructor Details
#initialize(store_in_vault:, usage_type:, description: SKIP, usage_pattern: SKIP, customer_type: VenmoPaymentTokenCustomerType::CONSUMER, permit_multiple_payment_tokens: false) ⇒ VenmoWalletVaultAttributes
Returns a new instance of VenmoWalletVaultAttributes.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_vault_attributes.rb', line 75 def initialize(store_in_vault:, usage_type:, description: SKIP, usage_pattern: SKIP, customer_type: VenmoPaymentTokenCustomerType::CONSUMER, permit_multiple_payment_tokens: false) @store_in_vault = store_in_vault @description = description unless description == SKIP @usage_pattern = usage_pattern unless usage_pattern == SKIP @usage_type = usage_type @customer_type = customer_type unless customer_type == SKIP unless permit_multiple_payment_tokens == SKIP @permit_multiple_payment_tokens = permit_multiple_payment_tokens end end |
Instance Attribute Details
#customer_type ⇒ VenmoPaymentTokenCustomerType
The customer type associated with the Venmo payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
35 36 37 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_vault_attributes.rb', line 35 def customer_type @customer_type end |
#description ⇒ String
The description displayed to Venmo consumer on the approval flow for Venmo, as well as on the Venmo payment token management experience on Venmo.com.
21 22 23 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_vault_attributes.rb', line 21 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 Venmo account.
45 46 47 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_vault_attributes.rb', line 45 def permit_multiple_payment_tokens @permit_multiple_payment_tokens end |
#store_in_vault ⇒ StoreInVaultInstruction
Defines how and when the payment source gets vaulted.
15 16 17 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_vault_attributes.rb', line 15 def store_in_vault @store_in_vault end |
#usage_pattern ⇒ VenmoPaymentTokenUsagePattern
Expected business/pricing model for the billing agreement.
25 26 27 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_vault_attributes.rb', line 25 def usage_pattern @usage_pattern end |
#usage_type ⇒ VenmoPaymentTokenUsageType
The usage type associated with the Venmo payment token.
29 30 31 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_vault_attributes.rb', line 29 def usage_type @usage_type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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/venmo_wallet_vault_attributes.rb', line 91 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. store_in_vault = hash.key?('store_in_vault') ? hash['store_in_vault'] : nil usage_type = hash.key?('usage_type') ? hash['usage_type'] : nil description = hash.key?('description') ? hash['description'] : SKIP usage_pattern = hash.key?('usage_pattern') ? hash['usage_pattern'] : SKIP customer_type = hash['customer_type'] ||= VenmoPaymentTokenCustomerType::CONSUMER permit_multiple_payment_tokens = hash['permit_multiple_payment_tokens'] ||= false # Create object from extracted values. VenmoWalletVaultAttributes.new(store_in_vault: store_in_vault, usage_type: usage_type, description: description, usage_pattern: usage_pattern, customer_type: customer_type, permit_multiple_payment_tokens: permit_multiple_payment_tokens) end |
.names ⇒ Object
A mapping from model property names to API property names.
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_vault_attributes.rb', line 48 def self.names @_hash = {} if @_hash.nil? @_hash['store_in_vault'] = 'store_in_vault' @_hash['description'] = 'description' @_hash['usage_pattern'] = 'usage_pattern' @_hash['usage_type'] = 'usage_type' @_hash['customer_type'] = 'customer_type' @_hash['permit_multiple_payment_tokens'] = 'permit_multiple_payment_tokens' @_hash end |
.nullables ⇒ Object
An array for nullable fields
71 72 73 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_vault_attributes.rb', line 71 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
61 62 63 64 65 66 67 68 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_vault_attributes.rb', line 61 def self.optionals %w[ description usage_pattern customer_type permit_multiple_payment_tokens ] end |