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

Link to this section Summary

Functions

description: <p>Returns a list of top-ups.</p>

description: <p>Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.</p>

description: <p>Top up the balance of an account</p>

description: <p>Updates the metadata of a top-up. Other top-up details are not editable by design.</p>

description: <p>Cancels a top-up. Only pending top-ups can be canceled.</p>

Link to this section Types

@type get_topups_opts() ::
  {:status, String.t()}
  | {:starting_after, String.t()}
  | {:limit, String.t()}
  | {:expand, String.t()}
  | {:ending_before, String.t()}
  | {:created, String.t()}
  | {:amount, String.t()}
Link to this type

get_topups_topup_opts()

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

Link to this section Functions

Link to this function

get_topups(client, opts \\ [])

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

description: <p>Returns a list of top-ups.</p>

Link to this function

get_topups_topup(client, topup, opts \\ [])

View Source
@spec get_topups_topup(
  client :: ExOAPI.Client.t(),
  topup :: String.t(),
  [get_topups_topup_opts()]
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Topup.t() | map()}
  | {:error, any()}

description: <p>Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.</p>

Link to this function

post_topups(client, body)

View Source
@spec post_topups(
  client :: ExOAPI.Client.t(),
  body ::
    %{
      transfer_group: String.t(),
      statement_descriptor: String.t(),
      source: String.t(),
      metadata: String.t() | map(),
      expand: [String.t()],
      description: String.t(),
      currency: String.t(),
      amount: integer()
    }
    | map()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Topup.t() | map()}
  | {:error, any()}

description: <p>Top up the balance of an account</p>

Link to this function

post_topups_topup(client, body, topup)

View Source
@spec post_topups_topup(
  client :: ExOAPI.Client.t(),
  body ::
    %{
      metadata: String.t() | map(),
      expand: [String.t()],
      description: String.t()
    }
    | map(),
  topup :: String.t()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Topup.t() | map()}
  | {:error, any()}

description: <p>Updates the metadata of a top-up. Other top-up details are not editable by design.</p>

Link to this function

post_topups_topup_cancel(client, body, topup)

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

description: <p>Cancels a top-up. Only pending top-ups can be canceled.</p>