Stripe.Source (stripity_stripe v2.17.3) View Source
Work with Stripe source objects.
Stripe API reference: https://stripe.com/docs/api#sources
Link to this section Summary
Functions
Attach a source to a customer.
Create a source.
Detach a source from a customer.
Retrieve a source.
Update a source.
Link to this section Types
Specs
Specs
Specs
Specs
Specs
Specs
card() :: %{ address_line1_check: String.t() | nil, address_zip_check: String.t() | nil, brand: String.t() | nil, country: String.t() | nil, cvc_check: String.t() | nil, dynamic_last4: String.t() | nil, exp_month: integer() | nil, exp_year: integer() | nil, fingerprint: String.t(), funding: String.t() | nil, last4: String.t() | nil, skip_validation: boolean(), three_d_secure: String.t(), tokenization_method: String.t() | nil }
Specs
Specs
customer() :: Stripe.id()
Specs
Specs
Specs
Specs
multibanco() :: %{ entity: String.t() | nil, reference: String.t() | nil, refund_account_holder_address_city: String.t() | nil, refund_account_holder_address_country: String.t() | nil, refund_account_holder_address_line1: String.t() | nil, refund_account_holder_address_line2: String.t() | nil, refund_account_holder_address_postal_code: String.t() | nil, refund_account_holder_address_state: String.t() | nil, refund_account_holder_name: String.t() | nil, refund_iban: String.t() | nil }
Specs
owner() :: %{ address: Stripe.Types.address() | nil, email: String.t() | nil, name: String.t() | nil, phone: String.t() | nil, verifired_address: Stripe.Types.address() | nil, verified_email: String.t() | nil, verified_name: String.t() | nil, verified_phone: String.t() | nil }
Specs
p24() :: %{reference: String.t() | nil}
Specs
Specs
Specs
Specs
Specs
source_type() :: String.t()
Specs
t() :: %Stripe.Source{ ach_credit_transfer: ach_credit_transfer() | nil, ach_debit: ach_debit() | nil, alipay: alipay() | nil, amount: non_neg_integer() | nil, bancontact: bancontact() | nil, bitcoin: bitcoin() | nil, card: card() | nil, client_secret: String.t(), code_verification: code_verification_flow() | nil, created: Stripe.timestamp(), currency: String.t() | nil, customer: term(), eps: eps() | nil, flow: String.t(), giropay: giropay() | nil, id: Stripe.id(), ideal: ideal() | nil, klarna: term(), livemode: boolean(), metadata: Stripe.Types.metadata(), multibanco: multibanco() | nil, object: String.t(), owner: owner() | nil, p24: p24() | nil, receiver: receiver_flow() | nil, redirect: redirect_flow() | nil, sepa_debit: sepa_debit() | nil, sofort: sofort() | nil, statement_descriptor: String.t() | nil, status: String.t(), three_d_secure: three_d_secure() | nil, type: source_type(), usage: String.t() | nil }
Specs
Link to this section Functions
Specs
attach(map(), Keyword.t()) :: {:ok, t()} | {:error, Stripe.Error.t()}
Attach a source to a customer.
Specs
create(params, Keyword.t()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{ :type => String.t(), optional(:amount) => non_neg_integer(), optional(:currency) => String.t(), optional(:flow) => String.t(), optional(:mandate) => map(), optional(:metadata) => Stripe.Types.metadata(), optional(:owner) => owner(), optional(:receiver) => receiver_flow(), optional(:redirect) => redirect_flow(), optional(:statement_descriptor) => String.t(), optional(:token) => String.t(), optional(:usage) => String.t() }
Create a source.
Specs
detach(Stripe.id() | t(), map(), Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()}
Detach a source from a customer.
Specs
retrieve(Stripe.id() | t(), params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{optional(:client_secret) => String.t()}
Retrieve a source.
Specs
update(Stripe.id() | t(), params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{ optional(:mandate) => map(), optional(:metadata) => Stripe.Types.metadata(), optional(:owner) => owner() }
Update a source.
Takes the id
and a map of changes