# `ExFattureincloud.ReceivedDocuments`
[🔗](https://github.com/elchemista/ex_fattureincloud/blob/v0.1.0/lib/ex_fattureincloud/resources/received_documents.ex#L2)

Operations in the Fatture in Cloud ReceivedDocuments resource.

# `create_received_document`

```elixir
@spec create_received_document(
  ExFattureincloud.Client.t(),
  ExFattureincloud.API.path_parameter(),
  map() | nil,
  ExFattureincloud.API.parameters()
) :: ExFattureincloud.Response.result()
```

Creates a new document.

Sends `POST /c/{company_id}/received_documents` (`createReceivedDocument`).

Pass the JSON body with the provider's envelope. Use `nil` to omit it.

# `delete_bin_received_document`

```elixir
@spec delete_bin_received_document(
  ExFattureincloud.Client.t(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.parameters()
) :: ExFattureincloud.Response.result()
```

Delete Bin Received Document

Sends `DELETE /c/{company_id}/bin/received_documents/{document_id}` (`DeleteBinReceivedDocument`).

# `delete_received_document`

```elixir
@spec delete_received_document(
  ExFattureincloud.Client.t(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.parameters()
) :: ExFattureincloud.Response.result()
```

Deletes the specified document.

Sends `DELETE /c/{company_id}/received_documents/{document_id}` (`deleteReceivedDocument`).

# `delete_received_document_attachment`

```elixir
@spec delete_received_document_attachment(
  ExFattureincloud.Client.t(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.parameters()
) :: ExFattureincloud.Response.result()
```

Removes the attachment of the specified document.

Sends `DELETE /c/{company_id}/received_documents/{document_id}/attachment` (`deleteReceivedDocumentAttachment`).

# `get_bin_received_document`

```elixir
@spec get_bin_received_document(
  ExFattureincloud.Client.t(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.parameters()
) :: ExFattureincloud.Response.result()
```

Get bin issued documents detail

Sends `GET /c/{company_id}/bin/received_documents/{document_id}` (`GetBinReceivedDocument`).

# `get_existing_received_document_totals`

```elixir
@spec get_existing_received_document_totals(
  ExFattureincloud.Client.t(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.path_parameter(),
  map() | nil,
  ExFattureincloud.API.parameters()
) :: ExFattureincloud.Response.result()
```

Returns the totals for the specified document.

Sends `POST /c/{company_id}/received_documents/{document_id}/totals` (`getExistingReceivedDocumentTotals`).

Pass the JSON body with the provider's envelope. Use `nil` to omit it.

# `get_new_received_document_totals`

```elixir
@spec get_new_received_document_totals(
  ExFattureincloud.Client.t(),
  ExFattureincloud.API.path_parameter(),
  map() | nil,
  ExFattureincloud.API.parameters()
) :: ExFattureincloud.Response.result()
```

Returns the totals for a new document.

Sends `POST /c/{company_id}/received_documents/totals` (`getNewReceivedDocumentTotals`).

Pass the JSON body with the provider's envelope. Use `nil` to omit it.

# `get_pending_received_document`

```elixir
@spec get_pending_received_document(
  ExFattureincloud.Client.t(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.parameters()
) :: ExFattureincloud.Response.result()
```

Gets the specified pending received document.

Sends `GET /c/{company_id}/received_documents/pending/{document_id}` (`getPendingReceivedDocument`).

## Query options

* `:fields` (string)
* `:fieldset` (string, one of `"basic"`, `"detailed"`, `"fic_view"`)

# `get_received_document`

```elixir
@spec get_received_document(
  ExFattureincloud.Client.t(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.parameters()
) :: ExFattureincloud.Response.result()
```

Gets the specified document.

Sends `GET /c/{company_id}/received_documents/{document_id}` (`getReceivedDocument`).

## Query options

* `:fields` (string)
* `:fieldset` (string, one of `"basic"`, `"detailed"`, `"fic_view"`)

# `get_received_document_pre_create_info`

```elixir
@spec get_received_document_pre_create_info(
  ExFattureincloud.Client.t(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.parameters()
) :: ExFattureincloud.Response.result()
```

Retrieves the information useful while creating a new document.

Sends `GET /c/{company_id}/received_documents/info` (`getReceivedDocumentPreCreateInfo`).

## Query options

* `:type` (string, required, one of `"expense"`, `"passive_credit_note"`, `"passive_delivery_note"`, `"self_invoice"`)

# `list_bin_received_documents`

```elixir
@spec list_bin_received_documents(
  ExFattureincloud.Client.t(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.parameters()
) :: ExFattureincloud.Response.result()
```

Get bin Received documents list

Sends `GET /c/{company_id}/bin/received_documents` (`ListBinReceivedDocuments`).

# `list_pending_received_documents`

```elixir
@spec list_pending_received_documents(
  ExFattureincloud.Client.t(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.parameters()
) :: ExFattureincloud.Response.result()
```

Lists the pending received documents.

Sends `GET /c/{company_id}/received_documents/pending` (`listPendingReceivedDocuments`).

## Query options

* `:type` (string, required, one of `"agyo"`, `"mail"`, `"browser"`)
* `:fields` (string)
* `:fieldset` (string, one of `"basic"`, `"detailed"`, `"fic_view"`)
* `:sort` (string)
* `:page` (integer, minimum 1)
* `:per_page` (integer, minimum 1, maximum 100)
* `:q` (string)

# `list_received_documents`

```elixir
@spec list_received_documents(
  ExFattureincloud.Client.t(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.parameters()
) :: ExFattureincloud.Response.result()
```

Lists the received documents.

Sends `GET /c/{company_id}/received_documents` (`listReceivedDocuments`).

## Query options

* `:type` (string, required, one of `"expense"`, `"passive_credit_note"`, `"passive_delivery_note"`, `"self_invoice"`)
* `:fields` (string)
* `:fieldset` (string, one of `"basic"`, `"detailed"`, `"fic_view"`)
* `:sort` (string)
* `:page` (integer, minimum 1)
* `:per_page` (integer, minimum 1, maximum 100)
* `:q` (string)

# `modify_received_document`

```elixir
@spec modify_received_document(
  ExFattureincloud.Client.t(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.path_parameter(),
  map() | nil,
  ExFattureincloud.API.parameters()
) :: ExFattureincloud.Response.result()
```

Modifies the specified document.

Sends `PUT /c/{company_id}/received_documents/{document_id}` (`modifyReceivedDocument`).

Pass the JSON body with the provider's envelope. Use `nil` to omit it.

# `recover_bin_received_document`

```elixir
@spec recover_bin_received_document(
  ExFattureincloud.Client.t(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.path_parameter(),
  ExFattureincloud.API.parameters()
) :: ExFattureincloud.Response.result()
```

Recover Received Document From The Bin

Sends `POST /c/{company_id}/bin/received_documents/{document_id}/recover` (`RecoverBinReceivedDocument`).

# `upload_received_document_attachment`

```elixir
@spec upload_received_document_attachment(
  ExFattureincloud.Client.t(),
  ExFattureincloud.API.path_parameter(),
  list(),
  ExFattureincloud.API.parameters()
) :: ExFattureincloud.Response.result()
```

Uploads an attachment destined to a received document. The actual association between the document and the attachment must be implemented separately, using the returned token.

Sends `POST /c/{company_id}/received_documents/attachment` (`uploadReceivedDocumentAttachment`).

Pass a list of Req multipart fields as the body.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
