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

Link to this section Summary

Functions

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

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

description: <p>When retrieving a quote, there is an includable <a href="https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items"><strong>computed.upfront.line_items</strong></a> property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.</p>

description: <p>When retrieving a quote, there is an includable <strong>line_items</strong> property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.</p>

description: <p>Download the PDF for a finalized quote</p>

description: <p>A quote models prices and services for a customer. Default options for <code>header</code>, <code>description</code>, <code>footer</code>, and <code>expires_at</code> can be set in the dashboard via the <a href="https://dashboard.stripe.com/settings/billing/quote">quote template</a>.</p>

description: <p>A quote models prices and services for a customer.</p>

description: <p>Accepts the specified quote.</p>

description: <p>Cancels the quote.</p>

description: <p>Finalizes the quote.</p>

Link to this section Types

@type get_quotes_opts() ::
  {:test_clock, String.t()}
  | {:status, String.t()}
  | {:starting_after, String.t()}
  | {:limit, String.t()}
  | {:expand, String.t()}
  | {:ending_before, String.t()}
  | {:customer, String.t()}
Link to this type

get_quotes_quote_computed_upfront_line_items_opts()

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

get_quotes_quote_line_items_opts()

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

get_quotes_quote_opts()

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

get_quotes_quote_pdf_opts()

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

Link to this section Functions

Link to this function

get_quotes(client, opts \\ [])

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

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

Link to this function

get_quotes_quote(client, quote, opts \\ [])

View Source
@spec get_quotes_quote(
  client :: ExOAPI.Client.t(),
  quote :: String.t(),
  [get_quotes_quote_opts()]
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Quote.t() | map()}
  | {:error, any()}

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

Link to this function

get_quotes_quote_computed_upfront_line_items(client, quote, opts \\ [])

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

description: <p>When retrieving a quote, there is an includable <a href="https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items"><strong>computed.upfront.line_items</strong></a> property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.</p>

Link to this function

get_quotes_quote_line_items(client, quote, opts \\ [])

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

description: <p>When retrieving a quote, there is an includable <strong>line_items</strong> property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.</p>

Link to this function

get_quotes_quote_pdf(client, quote, opts \\ [])

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

description: <p>Download the PDF for a finalized quote</p>

Link to this function

post_quotes(client, body)

View Source
@spec post_quotes(
  client :: ExOAPI.Client.t(),
  body ::
    %{
      transfer_data:
        String.t()
        | %{
            destination: String.t(),
            amount_percent: number(),
            amount: integer()
          },
      test_clock: String.t(),
      subscription_data: %{
        trial_period_days: String.t() | integer(),
        effective_date:
          String.t() | integer() | String.t() | :current_period_end
      },
      on_behalf_of: String.t(),
      metadata: map(),
      line_items: [
        %{
          tax_rates: String.t() | [String.t()],
          quantity: integer(),
          price_data: %{
            unit_amount_decimal: String.t(),
            unit_amount: integer(),
            tax_behavior: String.t() | :exclusive | :inclusive | :unspecified,
            recurring: %{
              interval_count: integer(),
              interval: String.t() | :day | :month | :week | :year
            },
            product: String.t(),
            currency: String.t()
          },
          price: String.t()
        }
      ],
      invoice_settings: %{days_until_due: integer()},
      header: String.t(),
      from_quote: %{quote: String.t(), is_revision: boolean()},
      footer: String.t(),
      expires_at: integer(),
      expand: [String.t()],
      discounts: String.t() | [%{discount: String.t(), coupon: String.t()}],
      description: String.t(),
      default_tax_rates: String.t() | [String.t()],
      customer: String.t(),
      collection_method: String.t() | :charge_automatically | :send_invoice,
      automatic_tax: %{enabled: boolean()},
      application_fee_percent: String.t() | number(),
      application_fee_amount: String.t() | integer()
    }
    | map()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Quote.t() | map()}
  | {:error, any()}

description: <p>A quote models prices and services for a customer. Default options for <code>header</code>, <code>description</code>, <code>footer</code>, and <code>expires_at</code> can be set in the dashboard via the <a href="https://dashboard.stripe.com/settings/billing/quote">quote template</a>.</p>

Link to this function

post_quotes_quote(client, body, quote)

View Source
@spec post_quotes_quote(
  client :: ExOAPI.Client.t(),
  body ::
    %{
      transfer_data:
        String.t()
        | %{
            destination: String.t(),
            amount_percent: number(),
            amount: integer()
          },
      subscription_data: %{
        trial_period_days: String.t() | integer(),
        effective_date:
          String.t() | integer() | String.t() | :current_period_end
      },
      on_behalf_of: String.t(),
      metadata: map(),
      line_items: [
        %{
          tax_rates: String.t() | [String.t()],
          quantity: integer(),
          price_data: %{
            unit_amount_decimal: String.t(),
            unit_amount: integer(),
            tax_behavior: String.t() | :exclusive | :inclusive | :unspecified,
            recurring: %{
              interval_count: integer(),
              interval: String.t() | :day | :month | :week | :year
            },
            product: String.t(),
            currency: String.t()
          },
          price: String.t(),
          id: String.t()
        }
      ],
      invoice_settings: %{days_until_due: integer()},
      header: String.t(),
      footer: String.t(),
      expires_at: integer(),
      expand: [String.t()],
      discounts: String.t() | [%{discount: String.t(), coupon: String.t()}],
      description: String.t(),
      default_tax_rates: String.t() | [String.t()],
      customer: String.t(),
      collection_method: String.t() | :charge_automatically | :send_invoice,
      automatic_tax: %{enabled: boolean()},
      application_fee_percent: String.t() | number(),
      application_fee_amount: String.t() | integer()
    }
    | map(),
  quote :: String.t()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Quote.t() | map()}
  | {:error, any()}

description: <p>A quote models prices and services for a customer.</p>

Link to this function

post_quotes_quote_accept(client, body, quote)

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

description: <p>Accepts the specified quote.</p>

Link to this function

post_quotes_quote_cancel(client, body, quote)

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

description: <p>Cancels the quote.</p>

Link to this function

post_quotes_quote_finalize(client, body, quote)

View Source
@spec post_quotes_quote_finalize(
  client :: ExOAPI.Client.t(),
  body :: %{expires_at: integer(), expand: [String.t()]} | map(),
  quote :: String.t()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Quote.t() | map()}
  | {:error, any()}

description: <p>Finalizes the quote.</p>