stripity_stripe v2.0.1 Stripe.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
Link to this type
ach_credit_transfer()
Link to this type
ach_debit()
Link to this type
alipay()
Link to this type
bancontact()
Link to this type
bitcoin()
Link to this type
card()
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
}
Link to this type
code_verification_flow()
Link to this type
eps()
Link to this type
giropay()
Link to this type
ideal()
Link to this type
multibanco()
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
}
Link to this type
owner()
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
}
Link to this type
receiver_flow()
Link to this type
redirect_flow()
Link to this type
sepa_debit()
Link to this type
sofort()
Link to this type
t()
t() :: %Stripe.Source{
ach_credit_transfer: ach_credit_transfer() | nil,
ach_debit: ach_debit() | nil,
alipay: alipay() | nil,
amount: 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,
eps: eps() | nil,
flow: String.t(),
giropay: giropay() | nil,
id: Stripe.id(),
ideal: ideal() | nil,
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
}
Link to this type
three_d_secure()
Link to this section Functions
Link to this function
attach(params, opts \\ [])
attach(map(), Keyword.t()) :: {:ok, t()} | {:error, Stripe.Error.t()}
Attach a source to a customer.
Link to this function
create(params, opts \\ [])
create(params, Keyword.t()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{ :type => String.t(), optional(:amount) => String.t(), 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.
Link to this function
detach(id, params, opts \\ [])
detach(Stripe.id() | t(), map(), Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()}
Detach a source from a customer.
Link to this function
retrieve(id, params, opts \\ [])
retrieve(Stripe.id() | t(), params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{optional(:client_secret) => String.t()}
Retrieve a source.
Link to this function
update(id, params, opts \\ [])
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