quote

package
v79.12.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package quote provides the /quotes APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Accept

func Accept(id string, params *stripe.QuoteAcceptParams) (*stripe.Quote, error)

Accepts the specified quote.

func Cancel

func Cancel(id string, params *stripe.QuoteCancelParams) (*stripe.Quote, error)

Cancels the quote.

func FinalizeQuote

func FinalizeQuote(id string, params *stripe.QuoteFinalizeQuoteParams) (*stripe.Quote, error)

Finalizes the quote.

func Get

func Get(id string, params *stripe.QuoteParams) (*stripe.Quote, error)

Retrieves the quote with the given ID.

func MarkDraft

func MarkDraft(id string, params *stripe.QuoteMarkDraftParams) (*stripe.Quote, error)

Converts a stale quote to draft.

func MarkStale

func MarkStale(id string, params *stripe.QuoteMarkStaleParams) (*stripe.Quote, error)

Converts a draft or open quote to stale.

func New

func New(params *stripe.QuoteParams) (*stripe.Quote, error)

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](https://dashboard.stripe.com/settings/billing/quote).

func PDF

func PDF(id string, params *stripe.QuotePDFParams) (*stripe.APIStream, error)

Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)

func Reestimate

func Reestimate(id string, params *stripe.QuoteReestimateParams) (*stripe.Quote, error)

Recompute the upcoming invoice estimate for the quote.

func Update

func Update(id string, params *stripe.QuoteParams) (*stripe.Quote, error)

A quote models prices and services for a customer.

Types

type Client

type Client struct {
	B        stripe.Backend
	BUploads stripe.Backend
	Key      string
}

Client is used to invoke /quotes APIs.

func (Client) Accept

func (c Client) Accept(id string, params *stripe.QuoteAcceptParams) (*stripe.Quote, error)

Accepts the specified quote.

func (Client) Cancel

func (c Client) Cancel(id string, params *stripe.QuoteCancelParams) (*stripe.Quote, error)

Cancels the quote.

func (Client) FinalizeQuote

func (c Client) FinalizeQuote(id string, params *stripe.QuoteFinalizeQuoteParams) (*stripe.Quote, error)

Finalizes the quote.

func (Client) Get

func (c Client) Get(id string, params *stripe.QuoteParams) (*stripe.Quote, error)

Retrieves the quote with the given ID.

func (Client) List

func (c Client) List(listParams *stripe.QuoteListParams) *Iter

Returns a list of your quotes.

func (Client) ListComputedUpfrontLineItems

func (c Client) ListComputedUpfrontLineItems(listParams *stripe.QuoteListComputedUpfrontLineItemsParams) *LineItemIter

When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) 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.

func (Client) ListLineItems

func (c Client) ListLineItems(listParams *stripe.QuoteListLineItemsParams) *LineItemIter

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

func (Client) ListLines

func (c Client) ListLines(listParams *stripe.QuoteListLinesParams) *LineIter

Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.

func (Client) ListPreviewInvoiceLines

func (c Client) ListPreviewInvoiceLines(listParams *stripe.QuoteListPreviewInvoiceLinesParams) *InvoiceLineItemIter

Preview the invoice line items that would be generated by accepting the quote.

func (Client) MarkDraft

func (c Client) MarkDraft(id string, params *stripe.QuoteMarkDraftParams) (*stripe.Quote, error)

Converts a stale quote to draft.

func (Client) MarkStale

func (c Client) MarkStale(id string, params *stripe.QuoteMarkStaleParams) (*stripe.Quote, error)

Converts a draft or open quote to stale.

func (Client) New

func (c Client) New(params *stripe.QuoteParams) (*stripe.Quote, error)

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](https://dashboard.stripe.com/settings/billing/quote).

func (Client) PDF

func (c Client) PDF(id string, params *stripe.QuotePDFParams) (*stripe.APIStream, error)

Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)

func (Client) Reestimate

func (c Client) Reestimate(id string, params *stripe.QuoteReestimateParams) (*stripe.Quote, error)

Recompute the upcoming invoice estimate for the quote.

func (Client) Update

func (c Client) Update(id string, params *stripe.QuoteParams) (*stripe.Quote, error)

A quote models prices and services for a customer.

type InvoiceLineItemIter

type InvoiceLineItemIter struct {
	*stripe.Iter
}

InvoiceLineItemIter is an iterator for invoice line items.

func ListPreviewInvoiceLines

func ListPreviewInvoiceLines(params *stripe.QuoteListPreviewInvoiceLinesParams) *InvoiceLineItemIter

Preview the invoice line items that would be generated by accepting the quote.

func (*InvoiceLineItemIter) InvoiceLineItem

func (i *InvoiceLineItemIter) InvoiceLineItem() *stripe.InvoiceLineItem

InvoiceLineItem returns the invoice line item which the iterator is currently pointing to.

func (*InvoiceLineItemIter) InvoiceLineItemList

func (i *InvoiceLineItemIter) InvoiceLineItemList() *stripe.InvoiceLineItemList

InvoiceLineItemList returns the current list object which the iterator is currently using. List objects will change as new API calls are made to continue pagination.

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for quotes.

func List

func List(params *stripe.QuoteListParams) *Iter

Returns a list of your quotes.

func (*Iter) Quote

func (i *Iter) Quote() *stripe.Quote

Quote returns the quote which the iterator is currently pointing to.

func (*Iter) QuoteList

func (i *Iter) QuoteList() *stripe.QuoteList

QuoteList returns the current list object which the iterator is currently using. List objects will change as new API calls are made to continue pagination.

type LineItemIter

type LineItemIter struct {
	*stripe.Iter
}

LineItemIter is an iterator for line items.

func ListComputedUpfrontLineItems

func ListComputedUpfrontLineItems(params *stripe.QuoteListComputedUpfrontLineItemsParams) *LineItemIter

When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) 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.

func ListLineItems

func ListLineItems(params *stripe.QuoteListLineItemsParams) *LineItemIter

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

func (*LineItemIter) LineItem

func (i *LineItemIter) LineItem() *stripe.LineItem

LineItem returns the line item which the iterator is currently pointing to.

func (*LineItemIter) LineItemList

func (i *LineItemIter) LineItemList() *stripe.LineItemList

LineItemList returns the current list object which the iterator is currently using. List objects will change as new API calls are made to continue pagination.

type LineIter

type LineIter struct {
	*stripe.Iter
}

LineIter is an iterator for quote lines.

func ListLines

func ListLines(params *stripe.QuoteListLinesParams) *LineIter

Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.

func (*LineIter) QuoteLine

func (i *LineIter) QuoteLine() *stripe.QuoteLine

QuoteLine returns the quote line which the iterator is currently pointing to.

func (*LineIter) QuoteLineList

func (i *LineIter) QuoteLineList() *stripe.QuoteLineList

QuoteLineList returns the current list object which the iterator is currently using. List objects will change as new API calls are made to continue pagination.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL