livery_stripe_invoice (livery_stripe v0.1.0)

View Source

Stripe Invoices API.

Summary

Functions

Like create/2 with request options (idempotency_key, etc.).

Delete a draft invoice (only drafts can be deleted).

Finalize a draft invoice so it is ready to pay.

Send an invoice to the customer (out-of-band collection).

Preview the upcoming invoice for a customer or subscription.

Functions

create(Client, Params)

-spec create(livery_client:client(), map() | list()) -> {ok, map()} | {error, term()}.

create(Client, Params, Opts)

-spec create(livery_client:client(), map() | list(), map()) -> {ok, map()} | {error, term()}.

Like create/2 with request options (idempotency_key, etc.).

delete(Client, Id)

-spec delete(livery_client:client(), binary()) -> {ok, map()} | {error, term()}.

Delete a draft invoice (only drafts can be deleted).

finalize(Client, Id)

-spec finalize(livery_client:client(), binary()) -> {ok, map()} | {error, term()}.

Finalize a draft invoice so it is ready to pay.

list(Client)

-spec list(livery_client:client()) -> {ok, map()} | {error, term()}.

list(Client, Params)

-spec list(livery_client:client(), map() | list()) -> {ok, map()} | {error, term()}.

mark_uncollectible(Client, Id)

-spec mark_uncollectible(livery_client:client(), binary()) -> {ok, map()} | {error, term()}.

pay(Client, Id)

-spec pay(livery_client:client(), binary()) -> {ok, map()} | {error, term()}.

pay(Client, Id, Params)

-spec pay(livery_client:client(), binary(), map() | list()) -> {ok, map()} | {error, term()}.

retrieve(Client, Id)

-spec retrieve(livery_client:client(), binary()) -> {ok, map()} | {error, term()}.

send(Client, Id)

-spec send(livery_client:client(), binary()) -> {ok, map()} | {error, term()}.

Send an invoice to the customer (out-of-band collection).

upcoming(Client, Params)

-spec upcoming(livery_client:client(), map() | list()) -> {ok, map()} | {error, term()}.

Preview the upcoming invoice for a customer or subscription.

void(Client, Id)

-spec void(livery_client:client(), binary()) -> {ok, map()} | {error, term()}.