Class: PaypalServerSdk::PayeeBase
- Defined in:
- lib/paypal_server_sdk/models/payee_base.rb
Overview
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) ⇒ PayeeBase
constructor
A new instance of PayeeBase.
Methods inherited from BaseModel
Constructor Details
#initialize(email_address: SKIP, merchant_id: SKIP) ⇒ PayeeBase
Returns a new instance of PayeeBase.
46 47 48 49 |
# File 'lib/paypal_server_sdk/models/payee_base.rb', line 46 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>
19 20 21 |
# File 'lib/paypal_server_sdk/models/payee_base.rb', line 19 def email_address @email_address end |
#merchant_id ⇒ String
The account identifier for a PayPal account.
23 24 25 |
# File 'lib/paypal_server_sdk/models/payee_base.rb', line 23 def merchant_id @merchant_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/paypal_server_sdk/models/payee_base.rb', line 52 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. PayeeBase.new(email_address: email_address, merchant_id: merchant_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 31 |
# File 'lib/paypal_server_sdk/models/payee_base.rb', line 26 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
42 43 44 |
# File 'lib/paypal_server_sdk/models/payee_base.rb', line 42 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 37 38 39 |
# File 'lib/paypal_server_sdk/models/payee_base.rb', line 34 def self.optionals %w[ email_address merchant_id ] end |