MollieAPI.Api.SalesInvoicesAPI (mollie_api v0.1.0-20260819)

View Source

API calls for all endpoints tagged SalesInvoicesAPI.

Summary

Functions

Create sales invoice With the Sales Invoice API you can generate sales invoices to send to your customers.

Delete sales invoice Sales invoices which are in status draft can be deleted. For all other statuses, please use the Update sales invoice endpoint instead.

Get sales invoice Retrieve a single sales invoice by its ID.

List sales invoices Retrieve a list of all sales invoices created through the API. The results are paginated.

Update sales invoice Certain details of an existing sales invoice can be updated. For draft it is all values listed below, but for statuses paid and issued there are certain additional requirements (paymentDetails and emailDetails, respectively).

Functions

create_sales_invoice(connection, opts \\ [])

@spec create_sales_invoice(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, MollieAPI.Model.ErrorResponse.t()}
  | {:ok, MollieAPI.Model.SalesInvoiceResponse.t()}
  | {:error, Tesla.Env.t()}

Create sales invoice With the Sales Invoice API you can generate sales invoices to send to your customers.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.
    • :body (SalesInvoiceRequest):

Returns

  • {:ok, MollieAPI.Model.SalesInvoiceResponse.t} on success
  • {:error, Tesla.Env.t} on failure

delete_sales_invoice(connection, sales_invoice_id, opts \\ [])

@spec delete_sales_invoice(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil}
  | {:ok, MollieAPI.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

Delete sales invoice Sales invoices which are in status draft can be deleted. For all other statuses, please use the Update sales invoice endpoint instead.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • sales_invoice_id (String.t): Provide the ID of the related sales invoice.
  • opts (keyword): Optional parameters
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.
    • :body (DeleteValuesSalesInvoice):

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

get_sales_invoice(connection, sales_invoice_id, opts \\ [])

@spec get_sales_invoice(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, MollieAPI.Model.ErrorResponse.t()}
  | {:ok, MollieAPI.Model.SalesInvoiceResponse.t()}
  | {:error, Tesla.Env.t()}

Get sales invoice Retrieve a single sales invoice by its ID.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • sales_invoice_id (String.t): Provide the ID of the related sales invoice.
  • opts (keyword): Optional parameters
    • :testmode (boolean()): Most API credentials are specifically created for either live mode or test mode. In those cases the testmode query parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting the testmode query parameter to true. Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.

Returns

  • {:ok, MollieAPI.Model.SalesInvoiceResponse.t} on success
  • {:error, Tesla.Env.t} on failure

list_sales_invoices(connection, opts \\ [])

@spec list_sales_invoices(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, MollieAPI.Model.ErrorResponse.t()}
  | {:ok, MollieAPI.Model.ListSalesInvoices200Response.t()}
  | {:error, Tesla.Env.t()}

List sales invoices Retrieve a list of all sales invoices created through the API. The results are paginated.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :from (String.t): Provide an ID to start the result set from the item with the given ID and onwards. This allows you to paginate the result set.
    • :limit (integer()): The maximum number of items to return. Defaults to 50 items.
    • :testmode (boolean()): Most API credentials are specifically created for either live mode or test mode. In those cases the testmode query parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting the testmode query parameter to true. Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.

Returns

  • {:ok, MollieAPI.Model.ListSalesInvoices200Response.t} on success
  • {:error, Tesla.Env.t} on failure

update_sales_invoice(connection, sales_invoice_id, opts \\ [])

@spec update_sales_invoice(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, MollieAPI.Model.ErrorResponse.t()}
  | {:ok, MollieAPI.Model.SalesInvoiceResponse.t()}
  | {:error, Tesla.Env.t()}

Update sales invoice Certain details of an existing sales invoice can be updated. For draft it is all values listed below, but for statuses paid and issued there are certain additional requirements (paymentDetails and emailDetails, respectively).

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • sales_invoice_id (String.t): Provide the ID of the related sales invoice.
  • opts (keyword): Optional parameters
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.
    • :body (UpdateSalesInvoiceRequest):

Returns

  • {:ok, MollieAPI.Model.SalesInvoiceResponse.t} on success
  • {:error, Tesla.Env.t} on failure