Class: ThePlaidApi::TransferOriginatorDiligence
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::TransferOriginatorDiligence
- Defined in:
- lib/the_plaid_api/models/transfer_originator_diligence.rb
Overview
The diligence information for the originator.
Instance Attribute Summary collapse
-
#address ⇒ TransferOriginatorAddress
The originator’s address.
-
#credit_usage_configuration ⇒ TransferCreditUsageConfiguration
Specifies the originator’s expected usage of credits.
-
#dba ⇒ String
The business name of the originator.
-
#debit_usage_configuration ⇒ TransferDebitUsageConfiguration
Specifies the originator’s expected usage of debits.
-
#funding_account ⇒ TransferFundingAccount
The originator’s funding account, linked with Plaid Link or ‘/transfer/migrate_account`.
-
#naics_code ⇒ String
The NAICS code of the originator.
-
#tax_id ⇒ String
The tax ID of the originator.
-
#website ⇒ String
The website of the originator.
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(dba:, tax_id:, address:, website:, naics_code:, funding_account:, credit_usage_configuration: SKIP, debit_usage_configuration: SKIP, additional_properties: nil) ⇒ TransferOriginatorDiligence
constructor
A new instance of TransferOriginatorDiligence.
-
#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(dba:, tax_id:, address:, website:, naics_code:, funding_account:, credit_usage_configuration: SKIP, debit_usage_configuration: SKIP, additional_properties: nil) ⇒ TransferOriginatorDiligence
Returns a new instance of TransferOriginatorDiligence.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/the_plaid_api/models/transfer_originator_diligence.rb', line 81 def initialize(dba:, tax_id:, address:, website:, naics_code:, funding_account:, credit_usage_configuration: SKIP, debit_usage_configuration: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @dba = dba @tax_id = tax_id unless credit_usage_configuration == SKIP @credit_usage_configuration = credit_usage_configuration end unless debit_usage_configuration == SKIP @debit_usage_configuration = debit_usage_configuration end @address = address @website = website @naics_code = naics_code @funding_account = funding_account @additional_properties = additional_properties end |
Instance Attribute Details
#address ⇒ TransferOriginatorAddress
The originator’s address.
36 37 38 |
# File 'lib/the_plaid_api/models/transfer_originator_diligence.rb', line 36 def address @address end |
#credit_usage_configuration ⇒ TransferCreditUsageConfiguration
Specifies the originator’s expected usage of credits. For all dollar amounts, use a decimal string with two digits of precision e.g. “10.00”. This field is required if the originator is expected to process credit transfers.
25 26 27 |
# File 'lib/the_plaid_api/models/transfer_originator_diligence.rb', line 25 def credit_usage_configuration @credit_usage_configuration end |
#dba ⇒ String
The business name of the originator.
14 15 16 |
# File 'lib/the_plaid_api/models/transfer_originator_diligence.rb', line 14 def dba @dba end |
#debit_usage_configuration ⇒ TransferDebitUsageConfiguration
Specifies the originator’s expected usage of debits. For all dollar amounts, use a decimal string with two digits of precision e.g. “10.00”. This field is required if the originator is expected to process debit transfers.
32 33 34 |
# File 'lib/the_plaid_api/models/transfer_originator_diligence.rb', line 32 def debit_usage_configuration @debit_usage_configuration end |
#funding_account ⇒ TransferFundingAccount
The originator’s funding account, linked with Plaid Link or ‘/transfer/migrate_account`.
49 50 51 |
# File 'lib/the_plaid_api/models/transfer_originator_diligence.rb', line 49 def funding_account @funding_account end |
#naics_code ⇒ String
The NAICS code of the originator.
44 45 46 |
# File 'lib/the_plaid_api/models/transfer_originator_diligence.rb', line 44 def naics_code @naics_code end |
#tax_id ⇒ String
The tax ID of the originator.
18 19 20 |
# File 'lib/the_plaid_api/models/transfer_originator_diligence.rb', line 18 def tax_id @tax_id end |
#website ⇒ String
The website of the originator.
40 41 42 |
# File 'lib/the_plaid_api/models/transfer_originator_diligence.rb', line 40 def website @website end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/the_plaid_api/models/transfer_originator_diligence.rb', line 105 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. dba = hash.key?('dba') ? hash['dba'] : nil tax_id = hash.key?('tax_id') ? hash['tax_id'] : nil address = TransferOriginatorAddress.from_hash(hash['address']) if hash['address'] website = hash.key?('website') ? hash['website'] : nil naics_code = hash.key?('naics_code') ? hash['naics_code'] : nil funding_account = TransferFundingAccount.from_hash(hash['funding_account']) if hash['funding_account'] if hash['credit_usage_configuration'] credit_usage_configuration = TransferCreditUsageConfiguration.from_hash(hash['credit_usage_configuration']) end if hash['debit_usage_configuration'] debit_usage_configuration = TransferDebitUsageConfiguration.from_hash(hash['debit_usage_configuration']) end # 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. TransferOriginatorDiligence.new(dba: dba, tax_id: tax_id, address: address, website: website, naics_code: naics_code, funding_account: funding_account, credit_usage_configuration: credit_usage_configuration, debit_usage_configuration: debit_usage_configuration, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/the_plaid_api/models/transfer_originator_diligence.rb', line 52 def self.names @_hash = {} if @_hash.nil? @_hash['dba'] = 'dba' @_hash['tax_id'] = 'tax_id' @_hash['credit_usage_configuration'] = 'credit_usage_configuration' @_hash['debit_usage_configuration'] = 'debit_usage_configuration' @_hash['address'] = 'address' @_hash['website'] = 'website' @_hash['naics_code'] = 'naics_code' @_hash['funding_account'] = 'funding_account' @_hash end |
.nullables ⇒ Object
An array for nullable fields
74 75 76 77 78 79 |
# File 'lib/the_plaid_api/models/transfer_originator_diligence.rb', line 74 def self.nullables %w[ credit_usage_configuration debit_usage_configuration ] end |
.optionals ⇒ Object
An array for optional fields
66 67 68 69 70 71 |
# File 'lib/the_plaid_api/models/transfer_originator_diligence.rb', line 66 def self.optionals %w[ credit_usage_configuration debit_usage_configuration ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
152 153 154 155 156 157 158 159 160 |
# File 'lib/the_plaid_api/models/transfer_originator_diligence.rb', line 152 def inspect class_name = self.class.name.split('::').last "<#{class_name} dba: #{@dba.inspect}, tax_id: #{@tax_id.inspect},"\ " credit_usage_configuration: #{@credit_usage_configuration.inspect},"\ " debit_usage_configuration: #{@debit_usage_configuration.inspect}, address:"\ " #{@address.inspect}, website: #{@website.inspect}, naics_code: #{@naics_code.inspect},"\ " funding_account: #{@funding_account.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
143 144 145 146 147 148 149 |
# File 'lib/the_plaid_api/models/transfer_originator_diligence.rb', line 143 def to_s class_name = self.class.name.split('::').last "<#{class_name} dba: #{@dba}, tax_id: #{@tax_id}, credit_usage_configuration:"\ " #{@credit_usage_configuration}, debit_usage_configuration: #{@debit_usage_configuration},"\ " address: #{@address}, website: #{@website}, naics_code: #{@naics_code}, funding_account:"\ " #{@funding_account}, additional_properties: #{@additional_properties}>" end |