Class: ThePlaidApi::TransferDiligenceDocumentUploadRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::TransferDiligenceDocumentUploadRequest
- Defined in:
- lib/the_plaid_api/models/transfer_diligence_document_upload_request.rb
Overview
Defines the request schema for ‘/transfer/diligence/document/upload`
Instance Attribute Summary collapse
-
#file ⇒ Binary
A file to upload.
-
#originator_client_id ⇒ String
The Client ID of the originator whose document that you want to upload.
-
#purpose ⇒ String
readonly
Specifies the purpose of the uploaded file.
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(originator_client_id:, file:, additional_properties: nil) ⇒ TransferDiligenceDocumentUploadRequest
constructor
A new instance of TransferDiligenceDocumentUploadRequest.
-
#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(originator_client_id:, file:, additional_properties: nil) ⇒ TransferDiligenceDocumentUploadRequest
Returns a new instance of TransferDiligenceDocumentUploadRequest.
45 46 47 48 49 50 51 52 53 |
# File 'lib/the_plaid_api/models/transfer_diligence_document_upload_request.rb', line 45 def initialize(originator_client_id:, file:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @originator_client_id = originator_client_id @file = file @purpose = 'DUE_DILIGENCE' @additional_properties = additional_properties end |
Instance Attribute Details
#file ⇒ Binary
A file to upload. The file size must be less than 20MB. Supported file extensions: .pdf.
19 20 21 |
# File 'lib/the_plaid_api/models/transfer_diligence_document_upload_request.rb', line 19 def file @file end |
#originator_client_id ⇒ String
The Client ID of the originator whose document that you want to upload.
14 15 16 |
# File 'lib/the_plaid_api/models/transfer_diligence_document_upload_request.rb', line 14 def originator_client_id @originator_client_id end |
#purpose ⇒ String (readonly)
Specifies the purpose of the uploaded file. ‘“DUE_DILIGENCE”` - The transfer due diligence document of the originator.
24 25 26 |
# File 'lib/the_plaid_api/models/transfer_diligence_document_upload_request.rb', line 24 def purpose @purpose end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/the_plaid_api/models/transfer_diligence_document_upload_request.rb', line 56 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. originator_client_id = hash.key?('originator_client_id') ? hash['originator_client_id'] : nil file = hash.key?('file') ? hash['file'] : nil # 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. TransferDiligenceDocumentUploadRequest.new(originator_client_id: originator_client_id, file: file, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
27 28 29 30 31 32 33 |
# File 'lib/the_plaid_api/models/transfer_diligence_document_upload_request.rb', line 27 def self.names @_hash = {} if @_hash.nil? @_hash['originator_client_id'] = 'originator_client_id' @_hash['file'] = 'file' @_hash['purpose'] = 'purpose' @_hash end |
.nullables ⇒ Object
An array for nullable fields
41 42 43 |
# File 'lib/the_plaid_api/models/transfer_diligence_document_upload_request.rb', line 41 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
36 37 38 |
# File 'lib/the_plaid_api/models/transfer_diligence_document_upload_request.rb', line 36 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
85 86 87 88 89 90 |
# File 'lib/the_plaid_api/models/transfer_diligence_document_upload_request.rb', line 85 def inspect class_name = self.class.name.split('::').last "<#{class_name} originator_client_id: #{@originator_client_id.inspect}, file:"\ " #{@file.inspect}, purpose: #{@purpose.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
78 79 80 81 82 |
# File 'lib/the_plaid_api/models/transfer_diligence_document_upload_request.rb', line 78 def to_s class_name = self.class.name.split('::').last "<#{class_name} originator_client_id: #{@originator_client_id}, file: #{@file}, purpose:"\ " #{@purpose}, additional_properties: #{@additional_properties}>" end |