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

#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 =  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)


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

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:



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

def address
  @address
end

#attributesVenmoWalletAttributesResponse

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_addressString

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.

Returns:

  • (String)


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

def email_address
  @email_address
end

#nameName

The name of the party.

Returns:



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

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:



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

def phone_number
  @phone_number
end

#user_nameString

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

Returns:

  • (String)


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



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

.nullablesObject

An array for nullable fields



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

def self.nullables
  []
end

.optionalsObject

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

#inspectObject

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_sObject

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