session

package
v76.25.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 3 Imported by: 12

Documentation

Overview

Package session provides the /checkout/sessions APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expire

Expire is the method for the `POST /v1/checkout/sessions/{session}/expire` API.

func Get

Get returns the details of a checkout session.

func New

New creates a new checkout session.

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke /checkout/sessions APIs.

func (Client) Expire

Expire is the method for the `POST /v1/checkout/sessions/{session}/expire` API.

func (Client) Get

Get returns the details of a checkout session.

func (Client) List

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

List returns a list of checkout sessions.

func (Client) ListLineItems

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

ListLineItems is the method for the `GET /v1/checkout/sessions/{session}/line_items` API.

func (Client) New

New creates a new checkout session.

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for checkout sessions.

func List

func List(params *stripe.CheckoutSessionListParams) *Iter

List returns a list of checkout sessions.

func (*Iter) CheckoutSession

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

CheckoutSession returns the checkout session which the iterator is currently pointing to.

func (*Iter) CheckoutSessionList

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

CheckoutSessionList 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

ListLineItems is the method for the `GET /v1/checkout/sessions/{session}/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