Search documentation of stripe_elixir

# StripeElixir.Services.QuoteService (stripe_elixir v0.1.0)

Copy Markdown View Source

Quote

A Quote is a way to model prices that you'd like to provide to a customer. Once accepted, it will automatically create an invoice, subscription or subscription schedule.

## Summary

### Functions

accept(client, quote, params \\ %{}, opts \\ [])

Accept a quote

cancel(client, quote, params \\ %{}, opts \\ [])

Cancel a quote

create(client, params \\ %{}, opts \\ [])

Create a quote

finalize_quote(client, quote, params \\ %{}, opts \\ [])

Finalize a quote

list(client, params \\ %{}, opts \\ [])

List all quotes

pdf(client, quote, params \\ %{}, opts \\ [])

Download quote PDF

retrieve(client, quote, params \\ %{}, opts \\ [])

Retrieve a quote

update(client, quote, params \\ %{}, opts \\ [])

Update a quote

## Functions

# accept(client, quote, params \\ %{}, opts \\ [])

    @spec accept(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Accept a quote

Accepts the specified quote.

# cancel(client, quote, params \\ %{}, opts \\ [])

    @spec cancel(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Cancel a quote

Cancels the quote.

# create(client, params \\ %{}, opts \\ [])

    @spec create(StripeElixir.Client.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Create a quote

A quote models prices and services for a customer. Default options for `header`, `description`, `footer`, and `expires_at` can be set in the dashboard via the quote template.

# finalize_quote(client, quote, params \\ %{}, opts \\ [])

    @spec finalize_quote(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Finalize a quote

Finalizes the quote.

# list(client, params \\ %{}, opts \\ [])

    @spec list(StripeElixir.Client.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

List all quotes

Returns a list of your quotes.

# pdf(client, quote, params \\ %{}, opts \\ [])

    @spec pdf(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Download quote PDF

Download the PDF for a finalized quote. Explanation for special handling can be found here

# retrieve(client, quote, params \\ %{}, opts \\ [])

    @spec retrieve(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Retrieve a quote

Retrieves the quote with the given ID.

# update(client, quote, params \\ %{}, opts \\ [])

    @spec update(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Update a quote

A quote models prices and services for a customer.