Class: PaypalServerSdk::Payee
- Defined in:
- lib/paypal_server_sdk/models/payee.rb
Overview
The merchant who receives the funds and fulfills the order. The merchant is also known as the payee., The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee.
Instance Attribute Summary collapse
-
#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. -
#merchant_id ⇒ String
The account identifier for a PayPal account.
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, merchant_id: SKIP) ⇒ Payee
constructor
A new instance of Payee.
Methods inherited from BaseModel
Constructor Details
#initialize(email_address: SKIP, merchant_id: SKIP) ⇒ Payee
Returns a new instance of Payee.
47 48 49 50 |
# File 'lib/paypal_server_sdk/models/payee.rb', line 47 def initialize(email_address: SKIP, merchant_id: SKIP) @email_address = email_address unless email_address == SKIP @merchant_id = merchant_id unless merchant_id == SKIP end |
Instance Attribute Details
#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>
20 21 22 |
# File 'lib/paypal_server_sdk/models/payee.rb', line 20 def email_address @email_address end |
#merchant_id ⇒ String
The account identifier for a PayPal account.
24 25 26 |
# File 'lib/paypal_server_sdk/models/payee.rb', line 24 def merchant_id @merchant_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/paypal_server_sdk/models/payee.rb', line 53 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. email_address = hash.key?('email_address') ? hash['email_address'] : SKIP merchant_id = hash.key?('merchant_id') ? hash['merchant_id'] : SKIP # Create object from extracted values. Payee.new(email_address: email_address, merchant_id: merchant_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
27 28 29 30 31 32 |
# File 'lib/paypal_server_sdk/models/payee.rb', line 27 def self.names @_hash = {} if @_hash.nil? @_hash['email_address'] = 'email_address' @_hash['merchant_id'] = 'merchant_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 |
# File 'lib/paypal_server_sdk/models/payee.rb', line 43 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
35 36 37 38 39 40 |
# File 'lib/paypal_server_sdk/models/payee.rb', line 35 def self.optionals %w[ email_address merchant_id ] end |