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

Returns a new instance of SupplementalDocuments.



6
7
8
# File 'lib/increase/resources/supplemental_documents.rb', line 6

def initialize(client:)
  @client = client
end

Instance Method Details

#create(params = {}, opts = {}) ⇒ Increase::Models::EntitySupplementalDocument

Create a supplemental document for an Entity

Parameters:

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :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.

Returns:



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

def create(params = {}, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/entity_supplemental_documents"
  req[:body] = params
  req[:model] = Increase::Models::EntitySupplementalDocument
  @client.request(req, opts)
end

#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::EntitySupplementalDocument>

List Entity Supplemental Document Submissions

Parameters:

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :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 that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about idempotency.

  • :limit (Integer)

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

Returns:



43
44
45
46
47
48
49
50
51
# File 'lib/increase/resources/supplemental_documents.rb', line 43

def list(params = {}, opts = {})
  req = {}
  req[:method] = :get
  req[:path] = "/entity_supplemental_documents"
  req[:query] = params
  req[:page] = Increase::Page
  req[:model] = Increase::Models::EntitySupplementalDocument
  @client.request(req, opts)
end