invoice

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2014 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package invoice provides the /invoices APIs

Index

Constants

View Source
const (
	TypeInvoiceItem  stripe.InvoiceLineType = "invoiceitem"
	TypeSubscription stripe.InvoiceLineType = "subscription"
)

Variables

This section is empty.

Functions

func Get

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

Get returns the details of an invoice. For more details see https://stripe.com/docs/api#retrieve_invoice.

func GetNext

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

GetNext returns the upcoming invoice's properties. For more details see https://stripe.com/docs/api#retrieve_customer_invoice.

func New

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

New POSTs new invoices. For more details see https://stripe.com/docs/api#create_invoice.

func Pay

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

Pay pays an invoice. For more details see https://stripe.com/docs/api#pay_invoice.

func Update

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

Update updates an invoice's properties. For more details see https://stripe.com/docs/api#update_invoice.

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is the client used to invoke /invoices APIs.

func (Client) Get

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

func (Client) GetNext

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

func (Client) List

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

func (Client) ListLines

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

func (Client) New

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

func (Client) Pay

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

func (Client) Update

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

type Iter

type Iter struct {
	Iter *stripe.Iter
}

Iter is a iterator for list responses.

func List

func List(params *stripe.InvoiceListParams) *Iter

List returns a list of invoices. For more details see https://stripe.com/docs/api#list_customer_invoices.

func (*Iter) Meta

func (i *Iter) Meta() *stripe.ListMeta

Meta returns the list metadata.

func (*Iter) Next

func (i *Iter) Next() (*stripe.Invoice, error)

Next returns the next value in the list.

func (*Iter) Stop

func (i *Iter) Stop() bool

Stop returns true if there are no more iterations to be performed.

type LineIter

type LineIter struct {
	Iter *stripe.Iter
}

LineIter is a iterator for list responses.

func ListLines

func ListLines(params *stripe.InvoiceLineListParams) *LineIter

ListLines returns a list of line items. For more details see https://stripe.com/docs/api#invoice_lines.

func (*LineIter) Meta

func (i *LineIter) Meta() *stripe.ListMeta

Meta returns the list metadata.

func (*LineIter) Next

func (i *LineIter) Next() (*stripe.InvoiceLine, error)

Next returns the next value in the list.

func (*LineIter) Stop

func (i *LineIter) Stop() bool

Stop returns true if there are no more iterations to be performed.

Jump to

Keyboard shortcuts

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