Class: ThePlaidApi::Originator
- Defined in:
- lib/the_plaid_api/models/originator.rb
Overview
Originator and their status.
Instance Attribute Summary collapse
-
#client_id ⇒ String
Originator’s client ID.
-
#company_name ⇒ String
The company name of the end customer.
-
#outstanding_requirements ⇒ Array[TransferPlatformRequirement]
List of outstanding requirements that must be submitted before Plaid can approve the originator.
-
#transfer_diligence_status ⇒ TransferDiligenceStatus
Originator’s diligence status.
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(client_id:, transfer_diligence_status:, company_name:, outstanding_requirements: SKIP, additional_properties: nil) ⇒ Originator
constructor
A new instance of Originator.
-
#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(client_id:, transfer_diligence_status:, company_name:, outstanding_requirements: SKIP, additional_properties: nil) ⇒ Originator
Returns a new instance of Originator.
52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/the_plaid_api/models/originator.rb', line 52 def initialize(client_id:, transfer_diligence_status:, company_name:, outstanding_requirements: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @client_id = client_id @transfer_diligence_status = transfer_diligence_status @company_name = company_name @outstanding_requirements = outstanding_requirements unless outstanding_requirements == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#client_id ⇒ String
Originator’s client ID.
14 15 16 |
# File 'lib/the_plaid_api/models/originator.rb', line 14 def client_id @client_id end |
#company_name ⇒ String
The company name of the end customer.
22 23 24 |
# File 'lib/the_plaid_api/models/originator.rb', line 22 def company_name @company_name end |
#outstanding_requirements ⇒ Array[TransferPlatformRequirement]
List of outstanding requirements that must be submitted before Plaid can approve the originator. Only populated when ‘transfer_diligence_status` is `more_information_required`.
28 29 30 |
# File 'lib/the_plaid_api/models/originator.rb', line 28 def outstanding_requirements @outstanding_requirements end |
#transfer_diligence_status ⇒ TransferDiligenceStatus
Originator’s diligence status.
18 19 20 |
# File 'lib/the_plaid_api/models/originator.rb', line 18 def transfer_diligence_status @transfer_diligence_status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/the_plaid_api/models/originator.rb', line 65 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. client_id = hash.key?('client_id') ? hash['client_id'] : nil transfer_diligence_status = hash.key?('transfer_diligence_status') ? hash['transfer_diligence_status'] : nil company_name = hash.key?('company_name') ? hash['company_name'] : nil # Parameter is an array, so we need to iterate through it outstanding_requirements = nil unless hash['outstanding_requirements'].nil? outstanding_requirements = [] hash['outstanding_requirements'].each do |structure| outstanding_requirements << (TransferPlatformRequirement.from_hash(structure) if structure) end end outstanding_requirements = SKIP unless hash.key?('outstanding_requirements') # 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. Originator.new(client_id: client_id, transfer_diligence_status: transfer_diligence_status, company_name: company_name, outstanding_requirements: outstanding_requirements, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
31 32 33 34 35 36 37 38 |
# File 'lib/the_plaid_api/models/originator.rb', line 31 def self.names @_hash = {} if @_hash.nil? @_hash['client_id'] = 'client_id' @_hash['transfer_diligence_status'] = 'transfer_diligence_status' @_hash['company_name'] = 'company_name' @_hash['outstanding_requirements'] = 'outstanding_requirements' @_hash end |
.nullables ⇒ Object
An array for nullable fields
48 49 50 |
# File 'lib/the_plaid_api/models/originator.rb', line 48 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
41 42 43 44 45 |
# File 'lib/the_plaid_api/models/originator.rb', line 41 def self.optionals %w[ outstanding_requirements ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
108 109 110 111 112 113 114 |
# File 'lib/the_plaid_api/models/originator.rb', line 108 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id.inspect}, transfer_diligence_status:"\ " #{@transfer_diligence_status.inspect}, company_name: #{@company_name.inspect},"\ " outstanding_requirements: #{@outstanding_requirements.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
100 101 102 103 104 105 |
# File 'lib/the_plaid_api/models/originator.rb', line 100 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id}, transfer_diligence_status:"\ " #{@transfer_diligence_status}, company_name: #{@company_name}, outstanding_requirements:"\ " #{@outstanding_requirements}, additional_properties: #{@additional_properties}>" end |