livery_stripe_customer (livery_stripe v0.1.0)

View Source

Stripe Customers API.

Summary

Functions

Like create/2 with request options: idempotency_key, stripe_account, timeout, and extra headers. (Every POST gets an auto-generated idempotency key when none is supplied.)

Remove a customer's active discount.

List a customer's payment methods; Params may carry type.

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, stripe_account, timeout, and extra headers. (Every POST gets an auto-generated idempotency key when none is supplied.)

delete(Client, Id)

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

delete_discount(Client, Id)

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

Remove a customer'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()}.

list_payment_methods(Client, Id)

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

list_payment_methods(Client, Id, Params)

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

List a customer's payment methods; Params may carry type.

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

update(Client, Id, Params, Opts)

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