Class: PaypalServerSdk::VenmoExperienceContext
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::VenmoExperienceContext
- Defined in:
- lib/paypal_server_sdk/models/venmo_experience_context.rb
Overview
A resource representing an experience context of vault a venmo account.
Instance Attribute Summary collapse
-
#brand_name ⇒ String
The label that overrides the business name in the PayPal account on the PayPal site.
-
#shipping_preference ⇒ ExperienceContextShippingPreference
The shipping preference.
-
#user_action ⇒ VaultUserAction
User Action on action to be performed after a successful payer approval.
-
#vault_instruction ⇒ VaultInstructionAction
DEPRECATED.
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: ExperienceContextShippingPreference::GET_FROM_FILE, vault_instruction: SKIP, user_action: VaultUserAction::CONTINUE) ⇒ VenmoExperienceContext
constructor
A new instance of VenmoExperienceContext.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(brand_name: SKIP, shipping_preference: ExperienceContextShippingPreference::GET_FROM_FILE, vault_instruction: SKIP, user_action: VaultUserAction::CONTINUE) ⇒ VenmoExperienceContext
Returns a new instance of VenmoExperienceContext.
56 57 58 59 60 61 62 63 64 65 |
# File 'lib/paypal_server_sdk/models/venmo_experience_context.rb', line 56 def initialize( brand_name: SKIP, shipping_preference: ExperienceContextShippingPreference::GET_FROM_FILE, vault_instruction: SKIP, user_action: VaultUserAction::CONTINUE ) @brand_name = brand_name unless brand_name == SKIP @shipping_preference = shipping_preference unless shipping_preference == SKIP @vault_instruction = vault_instruction unless vault_instruction == SKIP @user_action = user_action unless user_action == 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/venmo_experience_context.rb', line 16 def brand_name @brand_name end |
#shipping_preference ⇒ ExperienceContextShippingPreference
The shipping preference. This only applies to PayPal payment source.
20 21 22 |
# File 'lib/paypal_server_sdk/models/venmo_experience_context.rb', line 20 def shipping_preference @shipping_preference end |
#user_action ⇒ VaultUserAction
User Action on action to be performed after a successful payer approval.
29 30 31 |
# File 'lib/paypal_server_sdk/models/venmo_experience_context.rb', line 29 def user_action @user_action end |
#vault_instruction ⇒ VaultInstructionAction
DEPRECATED. Vault Instruction on action to be performed after a successful payer approval.
25 26 27 |
# File 'lib/paypal_server_sdk/models/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.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/paypal_server_sdk/models/venmo_experience_context.rb', line 68 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'] ||= ExperienceContextShippingPreference::GET_FROM_FILE vault_instruction = hash.key?('vault_instruction') ? hash['vault_instruction'] : SKIP user_action = hash['user_action'] ||= VaultUserAction::CONTINUE # Create object from extracted values. VenmoExperienceContext.new(brand_name: brand_name, shipping_preference: shipping_preference, vault_instruction: vault_instruction, user_action: user_action) end |
.names ⇒ Object
A mapping from model property names to API property names.
32 33 34 35 36 37 38 39 |
# File 'lib/paypal_server_sdk/models/venmo_experience_context.rb', line 32 def self.names @_hash = {} if @_hash.nil? @_hash['brand_name'] = 'brand_name' @_hash['shipping_preference'] = 'shipping_preference' @_hash['vault_instruction'] = 'vault_instruction' @_hash['user_action'] = 'user_action' @_hash end |
.nullables ⇒ Object
An array for nullable fields
52 53 54 |
# File 'lib/paypal_server_sdk/models/venmo_experience_context.rb', line 52 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
42 43 44 45 46 47 48 49 |
# File 'lib/paypal_server_sdk/models/venmo_experience_context.rb', line 42 def self.optionals %w[ brand_name shipping_preference vault_instruction user_action ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
94 95 96 97 98 99 |
# File 'lib/paypal_server_sdk/models/venmo_experience_context.rb', line 94 def inspect class_name = self.class.name.split('::').last "<#{class_name} brand_name: #{@brand_name.inspect}, shipping_preference:"\ " #{@shipping_preference.inspect}, vault_instruction: #{@vault_instruction.inspect},"\ " user_action: #{@user_action.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
87 88 89 90 91 |
# File 'lib/paypal_server_sdk/models/venmo_experience_context.rb', line 87 def to_s class_name = self.class.name.split('::').last "<#{class_name} brand_name: #{@brand_name}, shipping_preference: #{@shipping_preference},"\ " vault_instruction: #{@vault_instruction}, user_action: #{@user_action}>" end |