Class: Increase::Resources::SupplementalDocuments

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/supplemental_documents.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ SupplementalDocuments

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 SupplementalDocuments.

Parameters:



65
66
67
# File 'lib/increase/resources/supplemental_documents.rb', line 65

def initialize(client:)
  @client = client
end

Instance Method Details

#create(entity_id: , file_id: , request_options: {}) ⇒ Increase::Models::EntitySupplementalDocument

Create a supplemental document for an Entity

Parameters:

  • entity_id (String)

    The identifier of the Entity to associate with the supplemental document.

  • file_id (String)

    The identifier of the File containing the document.

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



19
20
21
22
23
24
25
26
27
28
# File 'lib/increase/resources/supplemental_documents.rb', line 19

def create(params)
  parsed, options = Increase::SupplementalDocumentCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "entity_supplemental_documents",
    body: parsed,
    model: Increase::EntitySupplementalDocument,
    options: options
  )
end

#list(entity_id: , cursor: nil, idempotency_key: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::EntitySupplementalDocument>

Some parameter documentations has been truncated, see Models::SupplementalDocumentListParams for more details.

List Entity Supplemental Document Submissions

Parameters:

  • entity_id (String)

    The identifier of the Entity to list supplemental documents for.

  • cursor (String)

    Return the page of entries after this one.

  • idempotency_key (String)

    Filter records to the one with the specified ‘idempotency_key` you chose for tha

  • limit (Integer)

    Limit the size of the list that is returned. The default (and maximum) is 100 ob

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



50
51
52
53
54
55
56
57
58
59
60
# File 'lib/increase/resources/supplemental_documents.rb', line 50

def list(params)
  parsed, options = Increase::SupplementalDocumentListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "entity_supplemental_documents",
    query: parsed,
    page: Increase::Internal::Page,
    model: Increase::EntitySupplementalDocument,
    options: options
  )
end