GoCardlessClient.Resources.BillingRequestTemplates
(GoCardlessClient v2.0.0)
Copy Markdown
View Source
GoCardless Billing Request Templates API.
Reusable templates for creating Billing Requests with pre-defined parameters. Useful for recurring setups where the same mandate/payment configuration is used many times (e.g. a SaaS signup flow).
Example
{:ok, template} = GoCardlessClient.Resources.BillingRequestTemplates.create(client, %{
name: "Standard Monthly DD",
mandate_request_currency: "GBP",
mandate_request_scheme: "bacs",
redirect_uri: "https://myapp.com/complete"
})
# Later, create a billing request from the template
Summary
Functions
Eagerly collects all Billing Request Templates into a list.
Creates a Billing Request Template.
Retrieves a single Billing Request Template by ID.
Returns a page of Billing Request Templates with optional filters.
Returns a lazy Stream over all pages of Billing Request Templates.
Updates a Billing Request Template. All params are optional.
Functions
@spec collect_all(GoCardlessClient.Client.t(), map(), keyword()) :: {:ok, [map()]} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Eagerly collects all Billing Request Templates into a list.
@spec create(GoCardlessClient.Client.t(), map(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Creates a Billing Request Template.
@spec get(GoCardlessClient.Client.t(), String.t(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Retrieves a single Billing Request Template by ID.
@spec list(GoCardlessClient.Client.t(), map(), keyword()) :: {:ok, %{items: [map()], meta: map()}} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Returns a page of Billing Request Templates with optional filters.
@spec stream(GoCardlessClient.Client.t(), map(), keyword()) :: Enumerable.t()
Returns a lazy Stream over all pages of Billing Request Templates.
@spec update(GoCardlessClient.Client.t(), String.t(), map(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Updates a Billing Request Template. All params are optional.