Class: PaypalServerSdk::VaultVenmoExperienceContext
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::VaultVenmoExperienceContext
- Defined in:
- lib/paypal_server_sdk/models/vault_venmo_experience_context.rb
Overview
Customizes the Vault creation flow experience for your customers.
Instance Attribute Summary collapse
-
#brand_name ⇒ String
The label that overrides the business name in the PayPal account on the PayPal site.
-
#shipping_preference ⇒ String
The shipping preference.
-
#vault_instruction ⇒ String
Vault Instruction on action to be performed after a successful payer approval.
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(brand_name: SKIP, shipping_preference: 'GET_FROM_FILE', vault_instruction: 'ON_CREATE_PAYMENT_TOKENS') ⇒ VaultVenmoExperienceContext
constructor
A new instance of VaultVenmoExperienceContext.
Methods inherited from BaseModel
Constructor Details
#initialize(brand_name: SKIP, shipping_preference: 'GET_FROM_FILE', vault_instruction: 'ON_CREATE_PAYMENT_TOKENS') ⇒ VaultVenmoExperienceContext
Returns a new instance of VaultVenmoExperienceContext.
50 51 52 53 54 55 |
# File 'lib/paypal_server_sdk/models/vault_venmo_experience_context.rb', line 50 def initialize(brand_name: SKIP, shipping_preference: 'GET_FROM_FILE', vault_instruction: 'ON_CREATE_PAYMENT_TOKENS') @brand_name = brand_name unless brand_name == SKIP @shipping_preference = shipping_preference unless shipping_preference == SKIP @vault_instruction = vault_instruction unless vault_instruction == SKIP end |
Instance Attribute Details
#brand_name ⇒ String
The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode.
16 17 18 |
# File 'lib/paypal_server_sdk/models/vault_venmo_experience_context.rb', line 16 def brand_name @brand_name end |
#shipping_preference ⇒ String
The shipping preference. This only applies to PayPal payment source.
20 21 22 |
# File 'lib/paypal_server_sdk/models/vault_venmo_experience_context.rb', line 20 def shipping_preference @shipping_preference end |
#vault_instruction ⇒ String
Vault Instruction on action to be performed after a successful payer approval.
25 26 27 |
# File 'lib/paypal_server_sdk/models/vault_venmo_experience_context.rb', line 25 def vault_instruction @vault_instruction end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/paypal_server_sdk/models/vault_venmo_experience_context.rb', line 58 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP shipping_preference = hash['shipping_preference'] ||= 'GET_FROM_FILE' vault_instruction = hash['vault_instruction'] ||= 'ON_CREATE_PAYMENT_TOKENS' # Create object from extracted values. VaultVenmoExperienceContext.new(brand_name: brand_name, shipping_preference: shipping_preference, vault_instruction: vault_instruction) end |
.names ⇒ Object
A mapping from model property names to API property names.
28 29 30 31 32 33 34 |
# File 'lib/paypal_server_sdk/models/vault_venmo_experience_context.rb', line 28 def self.names @_hash = {} if @_hash.nil? @_hash['brand_name'] = 'brand_name' @_hash['shipping_preference'] = 'shipping_preference' @_hash['vault_instruction'] = 'vault_instruction' @_hash end |
.nullables ⇒ Object
An array for nullable fields
46 47 48 |
# File 'lib/paypal_server_sdk/models/vault_venmo_experience_context.rb', line 46 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
37 38 39 40 41 42 43 |
# File 'lib/paypal_server_sdk/models/vault_venmo_experience_context.rb', line 37 def self.optionals %w[ brand_name shipping_preference vault_instruction ] end |