order

package
v76.13.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package order provides the /orders APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cancel

func Cancel(id string, params *stripe.OrderCancelParams) (*stripe.Order, error)

Cancel is the method for the `POST /v1/orders/{id}/cancel` API.

func Get

func Get(id string, params *stripe.OrderParams) (*stripe.Order, error)

Get returns the details of an order.

func New

func New(params *stripe.OrderParams) (*stripe.Order, error)

New creates a new order.

func Reopen

func Reopen(id string, params *stripe.OrderReopenParams) (*stripe.Order, error)

Reopen is the method for the `POST /v1/orders/{id}/reopen` API.

func Submit

func Submit(id string, params *stripe.OrderSubmitParams) (*stripe.Order, error)

Submit is the method for the `POST /v1/orders/{id}/submit` API.

func Update

func Update(id string, params *stripe.OrderParams) (*stripe.Order, error)

Update updates an order's properties.

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke /orders APIs.

func (Client) Cancel

func (c Client) Cancel(id string, params *stripe.OrderCancelParams) (*stripe.Order, error)

Cancel is the method for the `POST /v1/orders/{id}/cancel` API.

func (Client) Get

func (c Client) Get(id string, params *stripe.OrderParams) (*stripe.Order, error)

Get returns the details of an order.

func (Client) List

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

List returns a list of orders.

func (Client) ListLineItems

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

ListLineItems is the method for the `GET /v1/orders/{id}/line_items` API.

func (Client) New

func (c Client) New(params *stripe.OrderParams) (*stripe.Order, error)

New creates a new order.

func (Client) Reopen

func (c Client) Reopen(id string, params *stripe.OrderReopenParams) (*stripe.Order, error)

Reopen is the method for the `POST /v1/orders/{id}/reopen` API.

func (Client) Submit

func (c Client) Submit(id string, params *stripe.OrderSubmitParams) (*stripe.Order, error)

Submit is the method for the `POST /v1/orders/{id}/submit` API.

func (Client) Update

func (c Client) Update(id string, params *stripe.OrderParams) (*stripe.Order, error)

Update updates an order's properties.

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for orders.

func List

func List(params *stripe.OrderListParams) *Iter

List returns a list of orders.

func (*Iter) Order

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

Order returns the order which the iterator is currently pointing to.

func (*Iter) OrderList

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

OrderList 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 ListLineItems

func ListLineItems(params *stripe.OrderListLineItemsParams) *LineItemIter

ListLineItems is the method for the `GET /v1/orders/{id}/line_items` API.

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.

Jump to

Keyboard shortcuts

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