Stripe.Issuing.Card (stripity_stripe v2.17.2) View Source

Work with Stripe Issuing card objects.

You can:

  • Create a card
  • Retrieve a card
  • Update a card
  • List all cards

Stripe API reference: https://stripe.com/docs/api/issuing/cards

Link to this section Summary

Link to this section Types

Specs

t() :: %Stripe.Issuing.Card{
  brand: String.t(),
  cancellation_reason: String.t() | nil,
  cardholder: Stripe.id() | Stripe.Issuing.Cardholder.t(),
  created: Stripe.timestamp(),
  currency: String.t(),
  exp_month: pos_integer(),
  exp_year: pos_integer(),
  id: Stripe.id(),
  last4: String.t(),
  livemode: boolean(),
  metadata: Stripe.Types.metadata(),
  object: String.t(),
  replaced_by: t() | Stripe.id() | nil,
  replacement_for: t() | Stripe.id() | nil,
  replacement_reason: String.t() | nil,
  shipping: Stripe.Types.shipping() | nil,
  spending_controls: Stripe.Issuing.Types.spending_controls(),
  status: String.t(),
  type: atom() | String.t()
}

Link to this section Functions

Link to this function

create(params, opts \\ [])

View Source

Specs

create(params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()}
when params:
       %{
         :currency => String.t(),
         :type => :physical | :virtual,
         optional(:authorization_controls) =>
           Stripe.Issuing.Types.authorization_controls(),
         optional(:cardholder) => Stripe.id() | Stripe.Issuing.Cardholder.t(),
         optional(:metadata) => Stripe.Types.metadata(),
         optional(:replacement_for) => t() | Stripe.id(),
         optional(:replacement_reason) => String.t(),
         optional(:shipping) => Stripe.Types.shipping(),
         optional(:status) => String.t()
       }
       | %{}

Create a card.

Link to this function

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

View Source

Specs

list(params, Stripe.options()) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.Error.t()}
when params:
       %{
         optional(:cardholder) => Stripe.id() | Stripe.Issuing.Cardholder.t(),
         optional(:created) => String.t() | Stripe.date_query(),
         optional(:ending_before) => t() | Stripe.id(),
         optional(:exp_month) => String.t(),
         optional(:exp_year) => String.t(),
         optional(:last4) => String.t(),
         optional(:limit) => 1..100,
         optional(:source) => String.t(),
         optional(:starting_after) => t() | Stripe.id(),
         optional(:status) => String.t(),
         optional(:type) => String.t()
       }
       | %{}

List all cards.

Link to this function

retrieve(id, opts \\ [])

View Source

Specs

retrieve(Stripe.id() | t(), Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}

Retrieve a card.

Link to this function

update(id, params, opts \\ [])

View Source

Specs

update(Stripe.id() | t(), params, Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}
when params:
       %{
         optional(:authorization_controls) =>
           Stripe.Issuing.Types.authorization_controls(),
         optional(:cardholder) => Stripe.id() | Stripe.Issuing.Cardholder.t(),
         optional(:metadata) => Stripe.Types.metadata(),
         optional(:replacement_for) => t() | Stripe.id(),
         optional(:replacement_reason) => String.t(),
         optional(:shipping) => Stripe.Types.shipping(),
         optional(:status) => String.t()
       }
       | %{}

Update a card.