View Source ExOAPI.Stripe.SDK.Sources (exoapi_stripe v0.1.4)

Link to this section Summary

Functions

description: <p>Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.</p>

description: <p>List source transactions for a given source.</p>

description: <p>Retrieve an existing source transaction object. Supply the unique source ID from a source creation request and the source transaction ID and Stripe will return the corresponding up-to-date source object information.</p>

description: <p>Creates a new source object.</p>

description: <p>Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>

description: <p>Verify a given source.</p>

Link to this section Types

Link to this type

get_sources_source_mandate_notifications_mandate_notification_opts()

View Source
@type get_sources_source_mandate_notifications_mandate_notification_opts() ::
  {:expand, String.t()}
Link to this type

get_sources_source_opts()

View Source
@type get_sources_source_opts() ::
  {:expand, String.t()} | {:client_secret, String.t()}
Link to this type

get_sources_source_source_transactions_opts()

View Source
@type get_sources_source_source_transactions_opts() ::
  {:starting_after, String.t()}
  | {:limit, String.t()}
  | {:expand, String.t()}
  | {:ending_before, String.t()}
Link to this type

get_sources_source_source_transactions_source_transaction_opts()

View Source
@type get_sources_source_source_transactions_source_transaction_opts() ::
  {:expand, String.t()}

Link to this section Functions

Link to this function

get_sources_source(client, source, opts \\ [])

View Source
@spec get_sources_source(
  client :: ExOAPI.Client.t(),
  source :: String.t(),
  [get_sources_source_opts()]
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Source.t() | map()}
  | {:error, any()}

description: <p>Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.</p>

Link to this function

get_sources_source_mandate_notifications_mandate_notification(client, source, mandate_notification, opts \\ [])

View Source
@spec get_sources_source_mandate_notifications_mandate_notification(
  client :: ExOAPI.Client.t(),
  source :: String.t(),
  mandate_notification :: String.t(),
  [get_sources_source_mandate_notifications_mandate_notification_opts()]
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | ExOAPI.Stripe.Schemas.SourceMandateNotification.t()
   | map()}
  | {:error, any()}

description: <p>Retrieves a new Source MandateNotification.</p>

Link to this function

get_sources_source_source_transactions(client, source, opts \\ [])

View Source
@spec get_sources_source_source_transactions(
  client :: ExOAPI.Client.t(),
  source :: String.t(),
  [get_sources_source_source_transactions_opts()]
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | %{
       url: String.t(),
       object: String.t() | :list,
       has_more: boolean(),
       data: [ExOAPI.Stripe.Schemas.SourceTransaction.t()]
     }
   | map()}
  | {:error, any()}

description: <p>List source transactions for a given source.</p>

Link to this function

get_sources_source_source_transactions_source_transaction(client, source_transaction, source, opts \\ [])

View Source
@spec get_sources_source_source_transactions_source_transaction(
  client :: ExOAPI.Client.t(),
  source_transaction :: String.t(),
  source :: String.t(),
  [get_sources_source_source_transactions_source_transaction_opts()]
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | ExOAPI.Stripe.Schemas.SourceTransaction.t()
   | map()}
  | {:error, any()}

description: <p>Retrieve an existing source transaction object. Supply the unique source ID from a source creation request and the source transaction ID and Stripe will return the corresponding up-to-date source object information.</p>

Link to this function

post_sources(client, body)

View Source
@spec post_sources(
  client :: ExOAPI.Client.t(),
  body ::
    %{
      usage: String.t() | :reusable | :single_use,
      type: String.t(),
      token: String.t(),
      statement_descriptor: String.t(),
      source_order: %{
        shipping: %{
          tracking_number: String.t(),
          phone: String.t(),
          name: String.t(),
          carrier: String.t(),
          address: %{
            state: String.t(),
            postal_code: String.t(),
            line2: String.t(),
            line1: String.t(),
            country: String.t(),
            city: String.t()
          }
        },
        items: [
          %{
            type: String.t() | :discount | :shipping | :sku | :tax,
            quantity: integer(),
            parent: String.t(),
            description: String.t(),
            currency: String.t(),
            amount: integer()
          }
        ]
      },
      redirect: %{return_url: String.t()},
      receiver: %{
        refund_attributes_method: String.t() | :email | :manual | :none
      },
      owner: %{
        phone: String.t(),
        name: String.t(),
        email: String.t(),
        address: %{
          state: String.t(),
          postal_code: String.t(),
          line2: String.t(),
          line1: String.t(),
          country: String.t(),
          city: String.t()
        }
      },
      original_source: String.t(),
      metadata: map(),
      mandate: %{
        notification_method:
          String.t()
          | :deprecated_none
          | :email
          | :manual
          | :none
          | :stripe_email,
        interval: String.t() | :one_time | :scheduled | :variable,
        currency: String.t(),
        amount: String.t() | integer(),
        acceptance: %{
          user_agent: String.t(),
          type: String.t() | :offline | :online,
          status: String.t() | :accepted | :pending | :refused | :revoked,
          online: %{user_agent: String.t(), ip: String.t(), date: integer()},
          offline: %{contact_email: String.t()},
          ip: String.t(),
          date: integer()
        }
      },
      flow: String.t() | :code_verification | :none | :receiver | :redirect,
      expand: [String.t()],
      customer: String.t(),
      currency: String.t(),
      amount: integer()
    }
    | map()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Source.t() | map()}
  | {:error, any()}

description: <p>Creates a new source object.</p>

Link to this function

post_sources_source(client, body, source)

View Source
@spec post_sources_source(
  client :: ExOAPI.Client.t(),
  body ::
    %{
      source_order: %{
        shipping: %{
          tracking_number: String.t(),
          phone: String.t(),
          name: String.t(),
          carrier: String.t(),
          address: %{
            state: String.t(),
            postal_code: String.t(),
            line2: String.t(),
            line1: String.t(),
            country: String.t(),
            city: String.t()
          }
        },
        items: [
          %{
            type: String.t() | :discount | :shipping | :sku | :tax,
            quantity: integer(),
            parent: String.t(),
            description: String.t(),
            currency: String.t(),
            amount: integer()
          }
        ]
      },
      owner: %{
        phone: String.t(),
        name: String.t(),
        email: String.t(),
        address: %{
          state: String.t(),
          postal_code: String.t(),
          line2: String.t(),
          line1: String.t(),
          country: String.t(),
          city: String.t()
        }
      },
      metadata: String.t() | map(),
      mandate: %{
        notification_method:
          String.t()
          | :deprecated_none
          | :email
          | :manual
          | :none
          | :stripe_email,
        interval: String.t() | :one_time | :scheduled | :variable,
        currency: String.t(),
        amount: String.t() | integer(),
        acceptance: %{
          user_agent: String.t(),
          type: String.t() | :offline | :online,
          status: String.t() | :accepted | :pending | :refused | :revoked,
          online: %{user_agent: String.t(), ip: String.t(), date: integer()},
          offline: %{contact_email: String.t()},
          ip: String.t(),
          date: integer()
        }
      },
      expand: [String.t()],
      amount: integer()
    }
    | map(),
  source :: String.t()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Source.t() | map()}
  | {:error, any()}

description: <p>Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>

This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.

Link to this function

post_sources_source_verify(client, body, source)

View Source
@spec post_sources_source_verify(
  client :: ExOAPI.Client.t(),
  body :: %{values: [String.t()], expand: [String.t()]} | map(),
  source :: String.t()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Source.t() | map()}
  | {:error, any()}

description: <p>Verify a given source.</p>