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

Link to this section Summary

Functions

description: <p>Returns a list of your prices.</p>

description: <p>Retrieves the price with the given ID.</p>

description: <p>Search for prices you’ve previously created using Stripe’s <a href="/docs/search#search-query-language">Search Query Language</a>. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.</p>

description: <p>Creates a new price for an existing product. The price can be recurring or one-time.</p>

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

Link to this section Types

@type get_prices_opts() ::
  {:type, String.t()}
  | {:starting_after, String.t()}
  | {:recurring, String.t()}
  | {:product, String.t()}
  | {:lookup_keys, String.t()}
  | {:limit, String.t()}
  | {:expand, String.t()}
  | {:ending_before, String.t()}
  | {:currency, String.t()}
  | {:created, String.t()}
  | {:active, String.t()}
Link to this type

get_prices_price_opts()

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

get_prices_search_opts()

View Source
@type get_prices_search_opts() ::
  {:page, String.t()} | {:limit, String.t()} | {:expand, String.t()}

Link to this section Functions

Link to this function

get_prices(client, opts \\ [])

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

description: <p>Returns a list of your prices.</p>

Link to this function

get_prices_price(client, price, opts \\ [])

View Source
@spec get_prices_price(
  client :: ExOAPI.Client.t(),
  price :: String.t(),
  [get_prices_price_opts()]
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Price.t() | map()}
  | {:error, any()}

description: <p>Retrieves the price with the given ID.</p>

Link to this function

get_prices_search(client, query, opts \\ [])

View Source
@spec get_prices_search(
  client :: ExOAPI.Client.t(),
  query :: String.t(),
  [get_prices_search_opts()]
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | %{
       url: String.t(),
       total_count: integer(),
       object: String.t() | :search_result,
       next_page: String.t(),
       has_more: boolean(),
       data: [ExOAPI.Stripe.Schemas.Price.t()]
     }
   | map()}
  | {:error, any()}

description: <p>Search for prices you’ve previously created using Stripe’s <a href="/docs/search#search-query-language">Search Query Language</a>. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.</p>

Link to this function

post_prices(client, body)

View Source
@spec post_prices(
  client :: ExOAPI.Client.t(),
  body ::
    %{
      unit_amount_decimal: String.t(),
      unit_amount: integer(),
      transform_quantity: %{
        round: String.t() | :down | :up,
        divide_by: integer()
      },
      transfer_lookup_key: boolean(),
      tiers_mode: String.t() | :graduated | :volume,
      tiers: [
        %{
          up_to: integer() | String.t() | :inf,
          unit_amount_decimal: String.t(),
          unit_amount: integer(),
          flat_amount_decimal: String.t(),
          flat_amount: integer()
        }
      ],
      tax_behavior: String.t() | :exclusive | :inclusive | :unspecified,
      recurring: %{
        usage_type: String.t() | :licensed | :metered,
        interval_count: integer(),
        interval: String.t() | :day | :month | :week | :year,
        aggregate_usage:
          String.t() | :last_during_period | :last_ever | :max | :sum
      },
      product_data: %{
        unit_label: String.t(),
        tax_code: String.t(),
        statement_descriptor: String.t(),
        name: String.t(),
        metadata: map(),
        id: String.t(),
        active: boolean()
      },
      product: String.t(),
      nickname: String.t(),
      metadata: map(),
      lookup_key: String.t(),
      expand: [String.t()],
      currency: String.t(),
      billing_scheme: String.t() | :per_unit | :tiered,
      active: boolean()
    }
    | map()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Price.t() | map()}
  | {:error, any()}

description: <p>Creates a new price for an existing product. The price can be recurring or one-time.</p>

Link to this function

post_prices_price(client, body, price)

View Source
@spec post_prices_price(
  client :: ExOAPI.Client.t(),
  body ::
    %{
      transfer_lookup_key: boolean(),
      tax_behavior: String.t() | :exclusive | :inclusive | :unspecified,
      nickname: String.t(),
      metadata: String.t() | map(),
      lookup_key: String.t(),
      expand: [String.t()],
      active: boolean()
    }
    | map(),
  price :: String.t()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Price.t() | map()}
  | {:error, any()}

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