Class: PaypalServerSdk::VenmoWalletExperienceContext
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::VenmoWalletExperienceContext
- Defined in:
- lib/paypal_server_sdk/models/venmo_wallet_experience_context.rb
Overview
Customizes the buyer experience during the approval process for payment with Venmo.<blockquote><strong>Note:</strong> Partners and Marketplaces might configure shipping_preference
during partner account setup, which overrides the request values.</blockquote>
Instance Attribute Summary collapse
-
#brand_name ⇒ String
The business name of the merchant.
-
#shipping_preference ⇒ ShippingPreference
The location from which the shipping address is derived.
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: ShippingPreference::GET_FROM_FILE) ⇒ VenmoWalletExperienceContext
constructor
A new instance of VenmoWalletExperienceContext.
Methods inherited from BaseModel
Constructor Details
#initialize(brand_name: SKIP, shipping_preference: ShippingPreference::GET_FROM_FILE) ⇒ VenmoWalletExperienceContext
Returns a new instance of VenmoWalletExperienceContext.
45 46 47 48 49 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_experience_context.rb', line 45 def initialize(brand_name: SKIP, shipping_preference: ShippingPreference::GET_FROM_FILE) @brand_name = brand_name unless brand_name == SKIP @shipping_preference = shipping_preference unless shipping_preference == SKIP end |
Instance Attribute Details
#brand_name ⇒ String
The business name of the merchant. The pattern is defined by an external party and supports Unicode.
18 19 20 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_experience_context.rb', line 18 def brand_name @brand_name end |
#shipping_preference ⇒ ShippingPreference
The location from which the shipping address is derived.
22 23 24 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_experience_context.rb', line 22 def shipping_preference @shipping_preference end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_experience_context.rb', line 52 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'] ||= ShippingPreference::GET_FROM_FILE # Create object from extracted values. VenmoWalletExperienceContext.new(brand_name: brand_name, shipping_preference: shipping_preference) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_experience_context.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['brand_name'] = 'brand_name' @_hash['shipping_preference'] = 'shipping_preference' @_hash end |
.nullables ⇒ Object
An array for nullable fields
41 42 43 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_experience_context.rb', line 41 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
33 34 35 36 37 38 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_experience_context.rb', line 33 def self.optionals %w[ brand_name shipping_preference ] end |