invoice

package
v72.76.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: MIT Imports: 3 Imported by: 3

Documentation

Overview

Package invoice provides the /invoices APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Del

func Del(id string, params *stripe.InvoiceParams) (*stripe.Invoice, error)

Del removes an invoice.

func FinalizeInvoice

func FinalizeInvoice(id string, params *stripe.InvoiceFinalizeParams) (*stripe.Invoice, error)

FinalizeInvoice is the method for the `POST /v1/invoices/{invoice}/finalize` API.

func Get

func Get(id string, params *stripe.InvoiceParams) (*stripe.Invoice, error)

Get returns the details of an invoice.

func GetNext

func GetNext(params *stripe.InvoiceParams) (*stripe.Invoice, error)

GetNext is the method for the `GET /v1/invoices/upcoming` API.

func MarkUncollectible

func MarkUncollectible(id string, params *stripe.InvoiceMarkUncollectibleParams) (*stripe.Invoice, error)

MarkUncollectible is the method for the `POST /v1/invoices/{invoice}/mark_uncollectible` API.

func New

func New(params *stripe.InvoiceParams) (*stripe.Invoice, error)

New creates a new invoice.

func Pay

func Pay(id string, params *stripe.InvoicePayParams) (*stripe.Invoice, error)

Pay is the method for the `POST /v1/invoices/{invoice}/pay` API.

func SendInvoice

func SendInvoice(id string, params *stripe.InvoiceSendParams) (*stripe.Invoice, error)

SendInvoice is the method for the `POST /v1/invoices/{invoice}/send` API.

func Update

func Update(id string, params *stripe.InvoiceParams) (*stripe.Invoice, error)

Update updates an invoice's properties.

func VoidInvoice

func VoidInvoice(id string, params *stripe.InvoiceVoidParams) (*stripe.Invoice, error)

VoidInvoice is the method for the `POST /v1/invoices/{invoice}/void` API.

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke /invoices APIs.

func (Client) Del

func (c Client) Del(id string, params *stripe.InvoiceParams) (*stripe.Invoice, error)

Del removes an invoice.

func (Client) FinalizeInvoice

func (c Client) FinalizeInvoice(id string, params *stripe.InvoiceFinalizeParams) (*stripe.Invoice, error)

FinalizeInvoice is the method for the `POST /v1/invoices/{invoice}/finalize` API.

func (Client) Get

func (c Client) Get(id string, params *stripe.InvoiceParams) (*stripe.Invoice, error)

Get returns the details of an invoice.

func (Client) GetNext

func (c Client) GetNext(params *stripe.InvoiceParams) (*stripe.Invoice, error)

GetNext is the method for the `GET /v1/invoices/upcoming` API.

func (Client) List

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

List returns a list of invoices.

func (Client) ListLines

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

ListLines is the method for the `GET /v1/invoices/{invoice}/lines` API.

func (Client) MarkUncollectible

func (c Client) MarkUncollectible(id string, params *stripe.InvoiceMarkUncollectibleParams) (*stripe.Invoice, error)

MarkUncollectible is the method for the `POST /v1/invoices/{invoice}/mark_uncollectible` API.

func (Client) New

func (c Client) New(params *stripe.InvoiceParams) (*stripe.Invoice, error)

New creates a new invoice.

func (Client) Pay

func (c Client) Pay(id string, params *stripe.InvoicePayParams) (*stripe.Invoice, error)

Pay is the method for the `POST /v1/invoices/{invoice}/pay` API.

func (Client) SendInvoice

func (c Client) SendInvoice(id string, params *stripe.InvoiceSendParams) (*stripe.Invoice, error)

SendInvoice is the method for the `POST /v1/invoices/{invoice}/send` API.

func (Client) Update

func (c Client) Update(id string, params *stripe.InvoiceParams) (*stripe.Invoice, error)

Update updates an invoice's properties.

func (Client) VoidInvoice

func (c Client) VoidInvoice(id string, params *stripe.InvoiceVoidParams) (*stripe.Invoice, error)

VoidInvoice is the method for the `POST /v1/invoices/{invoice}/void` API.

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for invoices.

func List

func List(params *stripe.InvoiceListParams) *Iter

List returns a list of invoices.

func (*Iter) Invoice

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

Invoice returns the invoice which the iterator is currently pointing to.

func (*Iter) InvoiceList

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

InvoiceList 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 invoice line items.

func ListLines

func ListLines(params *stripe.InvoiceLineListParams) *LineIter

ListLines is the method for the `GET /v1/invoices/{invoice}/lines` API.

func (*LineIter) InvoiceLine

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

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

func (*LineIter) InvoiceLineList

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

InvoiceLineList 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