livery_stripe_subscription (livery_stripe v0.1.0)

View Source

Stripe Subscriptions API.

Summary

Functions

Cancel a subscription immediately (Stripe DELETE).

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

Remove a subscription's active discount.

Pause collection on a subscription (voids invoices while paused).

Resume a paused subscription by clearing pause_collection.

Functions

cancel(Client, Id)

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

Cancel a subscription immediately (Stripe DELETE).

cancel(Client, Id, Params)

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

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_discount(Client, Id)

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

Remove a subscription's active discount.

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()}.

pause(Client, Id)

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

Pause collection on a subscription (voids invoices while paused).

resume(Client, Id)

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

Resume a paused subscription by clearing pause_collection.

retrieve(Client, Id)

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

update(Client, Id, Params)

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