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.
-
#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.
-
#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(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.
83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 83 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.
24 25 26 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 24 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).
46 47 48 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 46 def address @address end |
#attributes ⇒ VenmoWalletAttributesResponse
Additional attributes associated with the use of a Venmo Wallet.
50 51 52 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 50 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.
17 18 19 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 17 def email_address @email_address end |
#name ⇒ Name
The name of the party.
32 33 34 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 32 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).
37 38 39 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 37 def phone_number @phone_number end |
#user_name ⇒ String
The Venmo user name chosen by the user, also know as a Venmo handle.
28 29 30 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 28 def user_name @user_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 96 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.
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 53 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
79 80 81 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.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/venmo_wallet_response.rb', line 66 def self.optionals %w[ email_address account_id user_name name phone_number address attributes ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
128 129 130 131 132 133 134 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 128 def inspect class_name = self.class.name.split('::').last "<#{class_name} email_address: #{@email_address.inspect}, account_id:"\ " #{@account_id.inspect}, user_name: #{@user_name.inspect}, name: #{@name.inspect},"\ " phone_number: #{@phone_number.inspect}, address: #{@address.inspect}, attributes:"\ " #{@attributes.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
120 121 122 123 124 125 |
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 120 def to_s class_name = self.class.name.split('::').last "<#{class_name} email_address: #{@email_address}, account_id: #{@account_id}, user_name:"\ " #{@user_name}, name: #{@name}, phone_number: #{@phone_number}, address: #{@address},"\ " attributes: #{@attributes}>" end |