Class: Increase::Resources::Documents
- Inherits:
-
Object
- Object
- Increase::Resources::Documents
- Defined in:
- lib/increase/resources/documents.rb
Instance Method Summary collapse
-
#create(category: , account_verification_letter: nil, funding_instructions: nil, request_options: {}) ⇒ Increase::Models::Document
Some parameter documentations has been truncated, see Models::DocumentCreateParams for more details.
-
#initialize(client:) ⇒ Documents
constructor
private
A new instance of Documents.
-
#list(category: nil, created_at: nil, cursor: nil, entity_id: nil, idempotency_key: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::Document>
Some parameter documentations has been truncated, see Models::DocumentListParams for more details.
-
#retrieve(document_id, request_options: {}) ⇒ Increase::Models::Document
Retrieve a Document.
Constructor Details
#initialize(client:) ⇒ Documents
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Documents.
94 95 96 |
# File 'lib/increase/resources/documents.rb', line 94 def initialize(client:) @client = client end |
Instance Method Details
#create(category: , account_verification_letter: nil, funding_instructions: nil, request_options: {}) ⇒ Increase::Models::Document
Some parameter documentations has been truncated, see Models::DocumentCreateParams for more details.
Create a Document
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/increase/resources/documents.rb', line 24 def create(params) parsed, = Increase::DocumentCreateParams.dump_request(params) @client.request( method: :post, path: "documents", body: parsed, model: Increase::Document, options: ) end |
#list(category: nil, created_at: nil, cursor: nil, entity_id: nil, idempotency_key: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::Document>
Some parameter documentations has been truncated, see Models::DocumentListParams for more details.
List Documents
79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/increase/resources/documents.rb', line 79 def list(params = {}) parsed, = Increase::DocumentListParams.dump_request(params) @client.request( method: :get, path: "documents", query: parsed, page: Increase::Internal::Page, model: Increase::Document, options: ) end |
#retrieve(document_id, request_options: {}) ⇒ Increase::Models::Document
Retrieve a Document
46 47 48 49 50 51 52 53 |
# File 'lib/increase/resources/documents.rb', line 46 def retrieve(document_id, params = {}) @client.request( method: :get, path: ["documents/%1$s", document_id], model: Increase::Document, options: params[:request_options] ) end |