Apruve v0.1.0 Apruve.InvoiceReturn View Source

Module for invoice returns.

Link to this section Summary

Link to this section Types

Link to this type invoice_return_id() View Source
invoice_return_id() :: String.t()
Link to this type t() View Source
t() :: %Apruve.InvoiceReturn{
  amount_cents: term(),
  created_at: term(),
  created_by_id: term(),
  currency: term(),
  id: term(),
  invoice_id: term(),
  merchant_notes: term(),
  reason: term(),
  updated_at: term(),
  uuid: term()
}

Link to this section Functions

Link to this function all_by_invoice_id(invoice_id, p_client_config \\ :from_app_config) View Source
all_by_invoice_id(
  Apruve.Invoice.invoice_id(),
  Apruve.ClientConfig.t() | :from_app_config
) :: {:ok, [t()]} | {:error, any()}
Link to this function create(invoice_return, p_client_config \\ :from_app_config) View Source
create(t(), Apruve.ClientConfig.t() | :from_app_config) ::
  {:ok, t()} | {:error, any()}

Create invoice return on the Apruve system.

Note that returns cannot be issued on invoices which have been cancelled or fully refunded.

Link to this function from_json(json_string) View Source
from_json(String.t()) ::
  {:ok, t()} | {:error, :could_not_make_struct_from_json}

InvoiceReturn struct from JSON string.

Link to this function get_by_invoice_id_and_return_id(invoice_id, return_id, p_client_config \\ :from_app_config) View Source
get_by_invoice_id_and_return_id(
  Apruve.Invoice.invoice_id(),
  invoice_return_id(),
  Apruve.ClientConfig.t() | :from_app_config
) :: {:ok, t()} | {:error, any()}