CampaignFlow.Client.Invoices (CampaignFlow Client v2.0.0)
View SourceInvoice resource operations for the Campaign Flow API.
Summary
Functions
Applies a payment to an invoice.
Retrieves a specific invoice by ID.
Retrieves a specific payment for an invoice.
Lists all invoices.
Functions
@spec create_payment(CampaignFlow.Client.t(), integer(), map()) :: CampaignFlow.Client.Request.response()
Applies a payment to an invoice.
Examples
{:ok, payment} = CampaignFlow.Client.Invoices.create_payment(client, 123, %{
amount: 500.00,
payment_method: "credit_card"
})
@spec get(CampaignFlow.Client.t(), integer()) :: CampaignFlow.Client.Request.response()
Retrieves a specific invoice by ID.
Examples
{:ok, invoice} = CampaignFlow.Client.Invoices.get(client, 123)
@spec get_payment(CampaignFlow.Client.t(), integer(), integer()) :: CampaignFlow.Client.Request.response()
Retrieves a specific payment for an invoice.
Examples
{:ok, payment} = CampaignFlow.Client.Invoices.get_payment(client, 123, 1)
@spec list( CampaignFlow.Client.t(), keyword() ) :: CampaignFlow.Client.Request.response()
Lists all invoices.
Options
:page- Page number for pagination:per_page- Number of items per page
Examples
{:ok, invoices} = CampaignFlow.Client.Invoices.list(client)
{:ok, invoices} = CampaignFlow.Client.Invoices.list(client, page: 2)