Class: PaypalServerSdk::VenmoWalletResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::VenmoWalletResponse
- Defined in:
- lib/paypal_server_sdk/models/venmo_wallet_response.rb
Overview
Venmo wallet response.
Instance Attribute Summary collapse
-
#account_id ⇒ String
The PayPal payer ID, which is a masked version of the PayPal account number intended for use with third parties.
-
#address ⇒ Address
The portable international postal address.
-
#attributes ⇒ VenmoWalletAttributesResponse
Additional attributes associated with the use of a 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. -
#name ⇒ Name
The name of the party.
-
#phone_number ⇒ PhoneNumber
The phone number in its canonical international [E.164 numbering plan format](www.itu.int/rec/T-REC-E.164/en).
-
#user_name ⇒ String
The Venmo user name chosen by the user, also know as a Venmo handle.
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(email_address: SKIP, account_id: SKIP, user_name: SKIP, name: SKIP, phone_number: SKIP, address: SKIP, attributes: SKIP) ⇒ VenmoWalletResponse
constructor
A new instance of VenmoWalletResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(email_address: SKIP, account_id: SKIP, user_name: SKIP, name: SKIP, phone_number: SKIP, address: SKIP, attributes: SKIP) ⇒ VenmoWalletResponse
Returns a new instance of VenmoWalletResponse.
84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 84 def initialize(email_address: SKIP, account_id: SKIP, user_name: SKIP, name: SKIP, phone_number: SKIP, address: SKIP, attributes: SKIP) @email_address = email_address unless email_address == SKIP @account_id = account_id unless account_id == SKIP @user_name = user_name unless user_name == SKIP @name = name unless name == SKIP @phone_number = phone_number unless phone_number == SKIP @address = address unless address == SKIP @attributes = attributes unless attributes == SKIP end |
Instance Attribute Details
#account_id ⇒ String
The PayPal payer ID, which is a masked version of the PayPal account number intended for use with third parties. The account number is reversibly encrypted and a proprietary variant of Base32 is used to encode the result.
25 26 27 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 25 def account_id @account_id end |
#address ⇒ Address
The portable international postal address. Maps to [AddressValidationMetadata](github.com/googlei18n/libaddressinput/ wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](www.w3.org/TR/html51/sec-forms.html#autofilling-form-co ntrols-the-autocomplete-attribute).
47 48 49 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 47 def address @address end |
#attributes ⇒ VenmoWalletAttributesResponse
Additional attributes associated with the use of a Venmo Wallet.
51 52 53 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 51 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>
18 19 20 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 18 def email_address @email_address end |
#name ⇒ Name
The name of the party.
33 34 35 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 33 def name @name end |
#phone_number ⇒ PhoneNumber
The phone number in its canonical international [E.164 numbering plan format](www.itu.int/rec/T-REC-E.164/en).
38 39 40 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 38 def phone_number @phone_number end |
#user_name ⇒ String
The Venmo user name chosen by the user, also know as a Venmo handle.
29 30 31 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 29 def user_name @user_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 97 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. email_address = hash.key?('email_address') ? hash['email_address'] : SKIP account_id = hash.key?('account_id') ? hash['account_id'] : SKIP user_name = hash.key?('user_name') ? hash['user_name'] : SKIP name = Name.from_hash(hash['name']) if hash['name'] phone_number = PhoneNumber.from_hash(hash['phone_number']) if hash['phone_number'] address = Address.from_hash(hash['address']) if hash['address'] attributes = VenmoWalletAttributesResponse.from_hash(hash['attributes']) if hash['attributes'] # Create object from extracted values. VenmoWalletResponse.new(email_address: email_address, account_id: account_id, user_name: user_name, name: name, phone_number: phone_number, address: address, attributes: attributes) end |
.names ⇒ Object
A mapping from model property names to API property names.
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 54 def self.names @_hash = {} if @_hash.nil? @_hash['email_address'] = 'email_address' @_hash['account_id'] = 'account_id' @_hash['user_name'] = 'user_name' @_hash['name'] = 'name' @_hash['phone_number'] = 'phone_number' @_hash['address'] = 'address' @_hash['attributes'] = 'attributes' @_hash end |
.nullables ⇒ Object
An array for nullable fields
80 81 82 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 80 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 67 def self.optionals %w[ email_address account_id user_name name phone_number address attributes ] end |