The Bills (accounts payable) resource: creating, listing, updating, and voiding bills owed to vendors.
Bills created via the API are auto-approved, skipping the draft phase.
Summary
Functions
Creates a bill owed to vendor_id for amount. Bills created via the
API are auto-approved (they skip the draft phase).
Fetches a single bill by ID.
Returns a lazily auto-paginating Stream of Ramp.Bills.Bills.
Fetches a single page of bills. See Ramp.Page.
Updates a bill's memo, due date, invoice number, and/or payment method.
Permanently cancels (voids) a bill.
Types
@type create_line_item() :: %{ :amount => Ramp.Money.t(), optional(:description) => String.t() }
@type create_opt() :: {:due_at, DateTime.t()} | {:invoice_date, DateTime.t()} | {:invoice_number, String.t()} | {:memo, String.t()} | {:payment_method, String.t()} | {:line_items, [create_line_item()]}
@type list_opt() :: {:start, String.t()} | {:page_size, pos_integer()} | {:vendor_id, String.t()} | {:status, String.t()} | {:from_due_date, DateTime.t()} | {:to_due_date, DateTime.t()}
@type update_opt() :: {:memo, String.t()} | {:due_at, DateTime.t()} | {:invoice_number, String.t()} | {:payment_method, String.t()}
Functions
@spec create(Ramp.Client.t(), String.t(), Ramp.Money.t(), [create_opt()]) :: {:ok, Ramp.Bills.Bill.t()} | {:error, Ramp.Error.t()}
Creates a bill owed to vendor_id for amount. Bills created via the
API are auto-approved (they skip the draft phase).
@spec get(Ramp.Client.t(), String.t()) :: {:ok, Ramp.Bills.Bill.t()} | {:error, Ramp.Error.t()}
Fetches a single bill by ID.
@spec list(Ramp.Client.t(), [list_opt()]) :: Enumerable.t(Ramp.Bills.Bill.t())
Returns a lazily auto-paginating Stream of Ramp.Bills.Bills.
@spec list_page(Ramp.Client.t(), [list_opt()]) :: {:ok, Ramp.Page.t(Ramp.Bills.Bill.t())} | {:error, Ramp.Error.t()}
Fetches a single page of bills. See Ramp.Page.
@spec update(Ramp.Client.t(), String.t(), [update_opt()]) :: {:ok, Ramp.Bills.Bill.t()} | {:error, Ramp.Error.t()}
Updates a bill's memo, due date, invoice number, and/or payment method.
@spec void(Ramp.Client.t(), String.t()) :: :ok | {:error, Ramp.Error.t()}
Permanently cancels (voids) a bill.