Class: PaypalServerSdk::VenmoWalletRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::VenmoWalletRequest
- Defined in:
- lib/paypal_server_sdk/models/venmo_wallet_request.rb
Overview
Information needed to pay using Venmo.
Instance Attribute Summary collapse
-
#attributes ⇒ VenmoWalletAdditionalAttributes
Additional attributes associated with the use of this Venmo Wallet.
-
#email_address ⇒ String
The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are allowed before and 255 characters are allowed after the
@
sign. -
#experience_context ⇒ VenmoWalletExperienceContext
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>. -
#vault_id ⇒ String
The PayPal-generated ID for the vaulted payment source.
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(vault_id: SKIP, email_address: SKIP, experience_context: SKIP, attributes: SKIP) ⇒ VenmoWalletRequest
constructor
A new instance of VenmoWalletRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(vault_id: SKIP, email_address: SKIP, experience_context: SKIP, attributes: SKIP) ⇒ VenmoWalletRequest
Returns a new instance of VenmoWalletRequest.
62 63 64 65 66 67 68 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 62 def initialize(vault_id: SKIP, email_address: SKIP, experience_context: SKIP, attributes: SKIP) @vault_id = vault_id unless vault_id == SKIP @email_address = email_address unless email_address == SKIP @experience_context = experience_context unless experience_context == SKIP @attributes = attributes unless attributes == SKIP end |
Instance Attribute Details
#attributes ⇒ VenmoWalletAdditionalAttributes
Additional attributes associated with the use of this Venmo Wallet.
35 36 37 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 35 def attributes @attributes end |
#email_address ⇒ String
The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are allowed before and 255 characters are allowed after the @
sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @
sign exists.</blockquote>
24 25 26 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 24 def email_address @email_address end |
#experience_context ⇒ VenmoWalletExperienceContext
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>
31 32 33 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 31 def experience_context @experience_context end |
#vault_id ⇒ String
The PayPal-generated ID for the vaulted payment source. This ID should be stored on the merchant’s server so the saved payment source can be used for future transactions.
16 17 18 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 16 def vault_id @vault_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 71 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. vault_id = hash.key?('vault_id') ? hash['vault_id'] : SKIP email_address = hash.key?('email_address') ? hash['email_address'] : SKIP experience_context = VenmoWalletExperienceContext.from_hash(hash['experience_context']) if hash['experience_context'] attributes = VenmoWalletAdditionalAttributes.from_hash(hash['attributes']) if hash['attributes'] # Create object from extracted values. VenmoWalletRequest.new(vault_id: vault_id, email_address: email_address, experience_context: experience_context, attributes: attributes) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 44 45 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['vault_id'] = 'vault_id' @_hash['email_address'] = 'email_address' @_hash['experience_context'] = 'experience_context' @_hash['attributes'] = 'attributes' @_hash end |
.nullables ⇒ Object
An array for nullable fields
58 59 60 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 58 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
48 49 50 51 52 53 54 55 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 48 def self.optionals %w[ vault_id email_address experience_context attributes ] end |