Class: ThePlaidApi::PaymentInitiationConsentPayerDetails
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::PaymentInitiationConsentPayerDetails
- Defined in:
- lib/the_plaid_api/models/payment_initiation_consent_payer_details.rb
Overview
An object representing the payment consent payer details. Payer ‘name` and account `numbers` are required to lock the account to which the consent can be created.
Instance Attribute Summary collapse
-
#address ⇒ PaymentInitiationAddress
The optional address of the payment recipient’s bank account.
-
#date_of_birth ⇒ Date
The payer’s birthdate, in [ISO 8601](wikipedia.org/wiki/ISO_8601) (YYYY-MM-DD) format.
-
#emails ⇒ Array[String]
The payer’s emails.
-
#name ⇒ String
The name of the payer as it appears in their bank account.
-
#numbers ⇒ PaymentInitiationConsentPayerNumbers
The counterparty’s bank account numbers.
-
#phone_numbers ⇒ Array[String]
The payer’s phone numbers in E.164 format: +countrycodenumber.
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(name:, numbers:, address: SKIP, date_of_birth: SKIP, phone_numbers: SKIP, emails: SKIP, additional_properties: nil) ⇒ PaymentInitiationConsentPayerDetails
constructor
A new instance of PaymentInitiationConsentPayerDetails.
-
#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(name:, numbers:, address: SKIP, date_of_birth: SKIP, phone_numbers: SKIP, emails: SKIP, additional_properties: nil) ⇒ PaymentInitiationConsentPayerDetails
Returns a new instance of PaymentInitiationConsentPayerDetails.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_payer_details.rb', line 71 def initialize(name:, numbers:, address: SKIP, date_of_birth: SKIP, phone_numbers: SKIP, emails: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @name = name @numbers = numbers @address = address unless address == SKIP @date_of_birth = date_of_birth unless date_of_birth == SKIP @phone_numbers = phone_numbers unless phone_numbers == SKIP @emails = emails unless emails == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#address ⇒ PaymentInitiationAddress
The optional address of the payment recipient’s bank account. Required by most institutions outside of the UK.
26 27 28 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_payer_details.rb', line 26 def address @address end |
#date_of_birth ⇒ Date
The payer’s birthdate, in [ISO 8601](wikipedia.org/wiki/ISO_8601) (YYYY-MM-DD) format.
31 32 33 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_payer_details.rb', line 31 def date_of_birth @date_of_birth end |
#emails ⇒ Array[String]
The payer’s emails
39 40 41 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_payer_details.rb', line 39 def emails @emails end |
#name ⇒ String
The name of the payer as it appears in their bank account
16 17 18 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_payer_details.rb', line 16 def name @name end |
#numbers ⇒ PaymentInitiationConsentPayerNumbers
The counterparty’s bank account numbers. Exactly one of IBAN or BACS data is required.
21 22 23 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_payer_details.rb', line 21 def numbers @numbers end |
#phone_numbers ⇒ Array[String]
The payer’s phone numbers in E.164 format: +countrycodenumber
35 36 37 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_payer_details.rb', line 35 def phone_numbers @phone_numbers end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_payer_details.rb', line 87 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : nil numbers = PaymentInitiationConsentPayerNumbers.from_hash(hash['numbers']) if hash['numbers'] address = PaymentInitiationAddress.from_hash(hash['address']) if hash['address'] date_of_birth = hash.key?('date_of_birth') ? hash['date_of_birth'] : SKIP phone_numbers = hash.key?('phone_numbers') ? hash['phone_numbers'] : SKIP emails = hash.key?('emails') ? hash['emails'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. PaymentInitiationConsentPayerDetails.new(name: name, numbers: numbers, address: address, date_of_birth: date_of_birth, phone_numbers: phone_numbers, emails: emails, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_payer_details.rb', line 42 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['numbers'] = 'numbers' @_hash['address'] = 'address' @_hash['date_of_birth'] = 'date_of_birth' @_hash['phone_numbers'] = 'phone_numbers' @_hash['emails'] = 'emails' @_hash end |
.nullables ⇒ Object
An array for nullable fields
64 65 66 67 68 69 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_payer_details.rb', line 64 def self.nullables %w[ address date_of_birth ] end |
.optionals ⇒ Object
An array for optional fields
54 55 56 57 58 59 60 61 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_payer_details.rb', line 54 def self.optionals %w[ address date_of_birth phone_numbers emails ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
124 125 126 127 128 129 130 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_payer_details.rb', line 124 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, numbers: #{@numbers.inspect}, address:"\ " #{@address.inspect}, date_of_birth: #{@date_of_birth.inspect}, phone_numbers:"\ " #{@phone_numbers.inspect}, emails: #{@emails.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
116 117 118 119 120 121 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_payer_details.rb', line 116 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, numbers: #{@numbers}, address: #{@address}, date_of_birth:"\ " #{@date_of_birth}, phone_numbers: #{@phone_numbers}, emails: #{@emails},"\ " additional_properties: #{@additional_properties}>" end |