Class: PaypalServerSdk::PaypalWalletResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::PaypalWalletResponse
- Defined in:
- lib/paypal_server_sdk/models/paypal_wallet_response.rb
Overview
The PayPal 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.
-
#account_status ⇒ PaypalWalletAccountVerificationStatus
The account status indicates whether the buyer has verified the financial details associated with their PayPal account.
-
#address ⇒ Address
The portable international postal address.
-
#attributes ⇒ PaypalWalletAttributesResponse
Additional attributes associated with the use of a PayPal Wallet.
-
#birth_date ⇒ String
The stand-alone date, in [Internet date and time format](tools.ietf.org/html/rfc3339#section-5.6).
-
#business_name ⇒ String
The business name of the PayPal account holder (populated for business accounts only).
-
#email_address ⇒ String
The internationalized email address.
-
#experience_status ⇒ ExperienceStatus
This field indicates the status of PayPal’s Checkout experience throughout the order lifecycle.
-
#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).
-
#phone_type ⇒ PhoneType
The phone type.
-
#stored_credential ⇒ PaypalWalletStoredCredential
Provides additional details to process a payment using the PayPal wallet billing agreement or a vaulted payment method that has been stored or is intended to be stored.
-
#tax_info ⇒ TaxInfo
The tax ID of the customer.
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, account_status: SKIP, name: SKIP, phone_type: SKIP, phone_number: SKIP, birth_date: SKIP, business_name: SKIP, tax_info: SKIP, address: SKIP, attributes: SKIP, stored_credential: SKIP, experience_status: SKIP) ⇒ PaypalWalletResponse
constructor
A new instance of PaypalWalletResponse.
-
#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, account_status: SKIP, name: SKIP, phone_type: SKIP, phone_number: SKIP, birth_date: SKIP, business_name: SKIP, tax_info: SKIP, address: SKIP, attributes: SKIP, stored_credential: SKIP, experience_status: SKIP) ⇒ PaypalWalletResponse
Returns a new instance of PaypalWalletResponse.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_response.rb', line 131 def initialize(email_address: SKIP, account_id: SKIP, account_status: SKIP, name: SKIP, phone_type: SKIP, phone_number: SKIP, birth_date: SKIP, business_name: SKIP, tax_info: SKIP, address: SKIP, attributes: SKIP, stored_credential: SKIP, experience_status: SKIP) @email_address = email_address unless email_address == SKIP @account_id = account_id unless account_id == SKIP @account_status = account_status unless account_status == SKIP @name = name unless name == SKIP @phone_type = phone_type unless phone_type == SKIP @phone_number = phone_number unless phone_number == SKIP @birth_date = birth_date unless birth_date == SKIP @business_name = business_name unless business_name == SKIP @tax_info = tax_info unless tax_info == SKIP @address = address unless address == SKIP @attributes = attributes unless attributes == SKIP @stored_credential = stored_credential unless stored_credential == SKIP @experience_status = experience_status unless experience_status == 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/paypal_wallet_response.rb', line 24 def account_id @account_id end |
#account_status ⇒ PaypalWalletAccountVerificationStatus
The account status indicates whether the buyer has verified the financial details associated with their PayPal account.
29 30 31 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_response.rb', line 29 def account_status @account_status 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).
70 71 72 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_response.rb', line 70 def address @address end |
#attributes ⇒ PaypalWalletAttributesResponse
Additional attributes associated with the use of a PayPal Wallet.
74 75 76 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_response.rb', line 74 def attributes @attributes end |
#birth_date ⇒ String
The stand-alone date, in [Internet date and time format](tools.ietf.org/html/rfc3339#section-5.6). To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard ‘date_time` type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years.
51 52 53 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_response.rb', line 51 def birth_date @birth_date end |
#business_name ⇒ String
The business name of the PayPal account holder (populated for business accounts only)
56 57 58 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_response.rb', line 56 def business_name @business_name 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/paypal_wallet_response.rb', line 17 def email_address @email_address end |
#experience_status ⇒ ExperienceStatus
This field indicates the status of PayPal’s Checkout experience throughout the order lifecycle. The values reflect the current stage of the checkout process.
86 87 88 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_response.rb', line 86 def experience_status @experience_status end |
#name ⇒ Name
The name of the party.
33 34 35 |
# File 'lib/paypal_server_sdk/models/paypal_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).
42 43 44 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_response.rb', line 42 def phone_number @phone_number end |
#phone_type ⇒ PhoneType
The phone type.
37 38 39 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_response.rb', line 37 def phone_type @phone_type end |
#stored_credential ⇒ PaypalWalletStoredCredential
Provides additional details to process a payment using the PayPal wallet billing agreement or a vaulted payment method that has been stored or is intended to be stored.
80 81 82 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_response.rb', line 80 def stored_credential @stored_credential end |
#tax_info ⇒ TaxInfo
The tax ID of the customer. The customer is also known as the payer. Both ‘tax_id` and `tax_id_type` are required.
61 62 63 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_response.rb', line 61 def tax_info @tax_info end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_response.rb', line 152 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 account_status = hash.key?('account_status') ? hash['account_status'] : SKIP name = Name.from_hash(hash['name']) if hash['name'] phone_type = hash.key?('phone_type') ? hash['phone_type'] : SKIP phone_number = PhoneNumber.from_hash(hash['phone_number']) if hash['phone_number'] birth_date = hash.key?('birth_date') ? hash['birth_date'] : SKIP business_name = hash.key?('business_name') ? hash['business_name'] : SKIP tax_info = TaxInfo.from_hash(hash['tax_info']) if hash['tax_info'] address = Address.from_hash(hash['address']) if hash['address'] attributes = PaypalWalletAttributesResponse.from_hash(hash['attributes']) if hash['attributes'] stored_credential = PaypalWalletStoredCredential.from_hash(hash['stored_credential']) if hash['stored_credential'] experience_status = hash.key?('experience_status') ? hash['experience_status'] : SKIP # Create object from extracted values. PaypalWalletResponse.new(email_address: email_address, account_id: account_id, account_status: account_status, name: name, phone_type: phone_type, phone_number: phone_number, birth_date: birth_date, business_name: business_name, tax_info: tax_info, address: address, attributes: attributes, stored_credential: stored_credential, experience_status: experience_status) end |
.names ⇒ Object
A mapping from model property names to API property names.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_response.rb', line 89 def self.names @_hash = {} if @_hash.nil? @_hash['email_address'] = 'email_address' @_hash['account_id'] = 'account_id' @_hash['account_status'] = 'account_status' @_hash['name'] = 'name' @_hash['phone_type'] = 'phone_type' @_hash['phone_number'] = 'phone_number' @_hash['birth_date'] = 'birth_date' @_hash['business_name'] = 'business_name' @_hash['tax_info'] = 'tax_info' @_hash['address'] = 'address' @_hash['attributes'] = 'attributes' @_hash['stored_credential'] = 'stored_credential' @_hash['experience_status'] = 'experience_status' @_hash end |
.nullables ⇒ Object
An array for nullable fields
127 128 129 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_response.rb', line 127 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_response.rb', line 108 def self.optionals %w[ email_address account_id account_status name phone_type phone_number birth_date business_name tax_info address attributes stored_credential experience_status ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
202 203 204 205 206 207 208 209 210 211 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_response.rb', line 202 def inspect class_name = self.class.name.split('::').last "<#{class_name} email_address: #{@email_address.inspect}, account_id:"\ " #{@account_id.inspect}, account_status: #{@account_status.inspect}, name:"\ " #{@name.inspect}, phone_type: #{@phone_type.inspect}, phone_number:"\ " #{@phone_number.inspect}, birth_date: #{@birth_date.inspect}, business_name:"\ " #{@business_name.inspect}, tax_info: #{@tax_info.inspect}, address: #{@address.inspect},"\ " attributes: #{@attributes.inspect}, stored_credential: #{@stored_credential.inspect},"\ " experience_status: #{@experience_status.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
191 192 193 194 195 196 197 198 199 |
# File 'lib/paypal_server_sdk/models/paypal_wallet_response.rb', line 191 def to_s class_name = self.class.name.split('::').last "<#{class_name} email_address: #{@email_address}, account_id: #{@account_id},"\ " account_status: #{@account_status}, name: #{@name}, phone_type: #{@phone_type},"\ " phone_number: #{@phone_number}, birth_date: #{@birth_date}, business_name:"\ " #{@business_name}, tax_info: #{@tax_info}, address: #{@address}, attributes:"\ " #{@attributes}, stored_credential: #{@stored_credential}, experience_status:"\ " #{@experience_status}>" end |