Increase.Files (Increase v1.0.0)

Copy Markdown View Source

Files are objects that represent a file hosted on Increase's servers. The file may have been uploaded by you (for example, when uploading a check image) or it may have been created by Increase (for example, an autogenerated statement PDF). If you need to download a File, create a File Link.

See https://increase.com/documentation/api/files for the full API reference for this resource.

Summary

Functions

To upload a file to Increase, you'll need to send a request of Content-Type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.

Functions

create(client, params \\ %{}, opts \\ [])

@spec create(Increase.Client.t() | keyword() | nil, map() | keyword(), keyword()) ::
  {:ok, Increase.Files.File.t()} | {:error, Increase.Error.t()}

To upload a file to Increase, you'll need to send a request of Content-Type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.

POST /files

list(client, params \\ %{}, opts \\ [])

@spec list(Increase.Client.t() | keyword() | nil, map() | keyword(), keyword()) ::
  {:ok, Increase.Page.t()} | {:error, Increase.Error.t()}

List Files

Returns a %Increase.Page{} whose data is a list of %__MODULE__. File{} structs. Page through results with Increase.Page.auto_paging_stream/1 or Increase.Page.auto_paging_each/2.

GET /files

retrieve(client, file_id, opts \\ [])

@spec retrieve(Increase.Client.t() | keyword() | nil, String.t(), keyword()) ::
  {:ok, Increase.Files.File.t()} | {:error, Increase.Error.t()}

Retrieve a File

GET /files/{file_id}