StripeElixir.Services.CustomerPaymentSourceService (stripe_elixir v0.1.0)

Copy Markdown View Source

CustomerPaymentSource API operations.

Summary

Functions

create(client, customer, params \\ %{}, opts \\ [])

@spec create(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, StripeElixir.Error.t()}

Create a card

When you create a new credit card, you must specify a customer or recipient on which to create it.

If the card’s owner has no default card, then the new card will become the default. However, if the owner already has a default, then it will not change. To change the default, you should update the customer to have a new default_source.

delete(client, customer, id, params \\ %{}, opts \\ [])

@spec delete(StripeElixir.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, StripeElixir.Error.t()}

Delete a customer source

Delete a specified source for a given customer.

list(client, customer, params \\ %{}, opts \\ [])

@spec list(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, StripeElixir.Error.t()}

List sources for a specified customer.

retrieve(client, customer, id, params \\ %{}, opts \\ [])

@spec retrieve(StripeElixir.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, StripeElixir.Error.t()}

Retrieve a specified source for a given customer.

update(client, customer, id, params \\ %{}, opts \\ [])

@spec update(StripeElixir.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, StripeElixir.Error.t()}

Update a specified source for a given customer.

verify(client, customer, id, params \\ %{}, opts \\ [])

@spec verify(StripeElixir.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, StripeElixir.Error.t()}

Verify a bank account

Verify a specified bank account for a given customer.