Class: PaypalServerSdk::VaultVenmoRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::VaultVenmoRequest
- Defined in:
- lib/paypal_server_sdk/models/vault_venmo_request.rb
Overview
VaultVenmoRequest Model.
Instance Attribute Summary collapse
-
#customer_type ⇒ PaypalPaymentTokenCustomerType
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.
-
#experience_context ⇒ VaultVenmoExperienceContext
Customizes the Vault creation flow experience for your customers.
-
#permit_multiple_payment_tokens ⇒ TrueClass | FalseClass
Create multiple payment tokens for the same payer, merchant/platform combination.
-
#shipping ⇒ VaultedDigitalWalletShippingDetails
The shipping details.
-
#usage_pattern ⇒ UsagePattern
Expected business/charge model for the billing agreement.
-
#usage_type ⇒ PaypalPaymentTokenUsageType
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, usage_pattern: SKIP, shipping: SKIP, permit_multiple_payment_tokens: false, usage_type: SKIP, customer_type: SKIP, experience_context: SKIP) ⇒ VaultVenmoRequest
constructor
A new instance of VaultVenmoRequest.
-
#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(description: SKIP, usage_pattern: SKIP, shipping: SKIP, permit_multiple_payment_tokens: false, usage_type: SKIP, customer_type: SKIP, experience_context: SKIP) ⇒ VaultVenmoRequest
Returns a new instance of VaultVenmoRequest.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/paypal_server_sdk/models/vault_venmo_request.rb', line 83 def initialize(description: SKIP, usage_pattern: SKIP, shipping: SKIP, permit_multiple_payment_tokens: false, usage_type: SKIP, customer_type: SKIP, experience_context: SKIP) @description = description unless description == SKIP @usage_pattern = usage_pattern unless usage_pattern == 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 @experience_context = experience_context unless experience_context == SKIP end |
Instance Attribute Details
#customer_type ⇒ PaypalPaymentTokenCustomerType
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.
45 46 47 |
# File 'lib/paypal_server_sdk/models/vault_venmo_request.rb', line 45 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.
16 17 18 |
# File 'lib/paypal_server_sdk/models/vault_venmo_request.rb', line 16 def description @description end |
#experience_context ⇒ VaultVenmoExperienceContext
Customizes the Vault creation flow experience for your customers.
49 50 51 |
# File 'lib/paypal_server_sdk/models/vault_venmo_request.rb', line 49 def experience_context @experience_context 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.
35 36 37 |
# File 'lib/paypal_server_sdk/models/vault_venmo_request.rb', line 35 def permit_multiple_payment_tokens @permit_multiple_payment_tokens end |
#shipping ⇒ VaultedDigitalWalletShippingDetails
The shipping details.
24 25 26 |
# File 'lib/paypal_server_sdk/models/vault_venmo_request.rb', line 24 def shipping @shipping end |
#usage_pattern ⇒ UsagePattern
Expected business/charge model for the billing agreement.
20 21 22 |
# File 'lib/paypal_server_sdk/models/vault_venmo_request.rb', line 20 def usage_pattern @usage_pattern end |
#usage_type ⇒ PaypalPaymentTokenUsageType
The usage type associated with a digital wallet payment token.
39 40 41 |
# File 'lib/paypal_server_sdk/models/vault_venmo_request.rb', line 39 def usage_type @usage_type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/paypal_server_sdk/models/vault_venmo_request.rb', line 99 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. description = hash.key?('description') ? hash['description'] : SKIP usage_pattern = hash.key?('usage_pattern') ? hash['usage_pattern'] : 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 experience_context = VaultVenmoExperienceContext.from_hash(hash['experience_context']) if hash['experience_context'] # Create object from extracted values. VaultVenmoRequest.new(description: description, usage_pattern: usage_pattern, shipping: shipping, permit_multiple_payment_tokens: permit_multiple_payment_tokens, usage_type: usage_type, customer_type: customer_type, experience_context: experience_context) end |
.names ⇒ Object
A mapping from model property names to API property names.
52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/paypal_server_sdk/models/vault_venmo_request.rb', line 52 def self.names @_hash = {} if @_hash.nil? @_hash['description'] = 'description' @_hash['usage_pattern'] = 'usage_pattern' @_hash['shipping'] = 'shipping' @_hash['permit_multiple_payment_tokens'] = 'permit_multiple_payment_tokens' @_hash['usage_type'] = 'usage_type' @_hash['customer_type'] = 'customer_type' @_hash['experience_context'] = 'experience_context' @_hash end |
.nullables ⇒ Object
An array for nullable fields
79 80 81 |
# File 'lib/paypal_server_sdk/models/vault_venmo_request.rb', line 79 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/paypal_server_sdk/models/vault_venmo_request.rb', line 66 def self.optionals %w[ description usage_pattern shipping permit_multiple_payment_tokens usage_type customer_type experience_context ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
134 135 136 137 138 139 140 141 |
# File 'lib/paypal_server_sdk/models/vault_venmo_request.rb', line 134 def inspect class_name = self.class.name.split('::').last "<#{class_name} description: #{@description.inspect}, usage_pattern:"\ " #{@usage_pattern.inspect}, shipping: #{@shipping.inspect}, permit_multiple_payment_tokens:"\ " #{@permit_multiple_payment_tokens.inspect}, usage_type: #{@usage_type.inspect},"\ " customer_type: #{@customer_type.inspect}, experience_context:"\ " #{@experience_context.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
125 126 127 128 129 130 131 |
# File 'lib/paypal_server_sdk/models/vault_venmo_request.rb', line 125 def to_s class_name = self.class.name.split('::').last "<#{class_name} description: #{@description}, usage_pattern: #{@usage_pattern}, shipping:"\ " #{@shipping}, permit_multiple_payment_tokens: #{@permit_multiple_payment_tokens},"\ " usage_type: #{@usage_type}, customer_type: #{@customer_type}, experience_context:"\ " #{@experience_context}>" end |