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.
-
#experience_context ⇒ VenmoWalletExperienceContext
Customizes the buyer experience during the approval process for payment with Venmo.
-
#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.
-
#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(vault_id: SKIP, email_address: SKIP, experience_context: SKIP, attributes: SKIP) ⇒ VenmoWalletRequest
Returns a new instance of VenmoWalletRequest.
61 62 63 64 65 66 67 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 61 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.
34 35 36 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 34 def attributes @attributes end |
#email_address ⇒ String
The internationalized email address. Note: 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.
23 24 25 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 23 def email_address @email_address end |
#experience_context ⇒ VenmoWalletExperienceContext
Customizes the buyer experience during the approval process for payment with Venmo. Note: Partners and Marketplaces might configure shipping_preference during partner account setup, which overrides the request values.
30 31 32 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 30 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.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 70 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.
37 38 39 40 41 42 43 44 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 37 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
57 58 59 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 57 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
47 48 49 50 51 52 53 54 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 47 def self.optionals %w[ vault_id email_address experience_context attributes ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
96 97 98 99 100 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 96 def inspect class_name = self.class.name.split('::').last "<#{class_name} vault_id: #{@vault_id.inspect}, email_address: #{@email_address.inspect},"\ " experience_context: #{@experience_context.inspect}, attributes: #{@attributes.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
89 90 91 92 93 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_request.rb', line 89 def to_s class_name = self.class.name.split('::').last "<#{class_name} vault_id: #{@vault_id}, email_address: #{@email_address},"\ " experience_context: #{@experience_context}, attributes: #{@attributes}>" end |