invoiceitem

package
v78.7.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package invoiceitem provides the /invoiceitems APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Del

Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice.

func Get

Retrieves the invoice item with the given ID.

func New

Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.

func Update

func Update(id string, params *stripe.InvoiceItemParams) (*stripe.InvoiceItem, error)

Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it's attached to is closed.

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke /invoiceitems APIs.

func (Client) Del

func (c Client) Del(id string, params *stripe.InvoiceItemParams) (*stripe.InvoiceItem, error)

Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice.

func (Client) Get

func (c Client) Get(id string, params *stripe.InvoiceItemParams) (*stripe.InvoiceItem, error)

Retrieves the invoice item with the given ID.

func (Client) List

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

Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.

func (Client) New

Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.

func (Client) Update

func (c Client) Update(id string, params *stripe.InvoiceItemParams) (*stripe.InvoiceItem, error)

Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it's attached to is closed.

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for invoice items.

func List

func List(params *stripe.InvoiceItemListParams) *Iter

Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.

func (*Iter) InvoiceItem

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

InvoiceItem returns the invoice item which the iterator is currently pointing to.

func (*Iter) InvoiceItemList

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

InvoiceItemList 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