Class: PaypalServerSdk::VenmoWalletResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/paypal_server_sdk/models/venmo_wallet_response.rb

Overview

Venmo wallet response.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#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.



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 =  unless  == 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_idString

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.

Returns:

  • (String)


25
26
27
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 25

def 
  @account_id
end

#addressAddress

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).

Returns:



47
48
49
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 47

def address
  @address
end

#attributesVenmoWalletAttributesResponse

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_addressString

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>

Returns:

  • (String)


18
19
20
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 18

def email_address
  @email_address
end

#nameName

The name of the party.

Returns:



33
34
35
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 33

def name
  @name
end

#phone_numberPhoneNumber

The phone number in its canonical international [E.164 numbering plan format](www.itu.int/rec/T-REC-E.164/en).

Returns:



38
39
40
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 38

def phone_number
  @phone_number
end

#user_nameString

The Venmo user name chosen by the user, also know as a Venmo handle.

Returns:

  • (String)


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
   = 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: ,
                          user_name: user_name,
                          name: name,
                          phone_number: phone_number,
                          address: address,
                          attributes: attributes)
end

.namesObject

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

.nullablesObject

An array for nullable fields



80
81
82
# File 'lib/paypal_server_sdk/models/venmo_wallet_response.rb', line 80

def self.nullables
  []
end

.optionalsObject

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