product

package
v72.65.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 3 Imported by: 12

Documentation

Overview

Package product provides the /products APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Del

func Del(id string, params *stripe.ProductParams) (*stripe.Product, error)

Del removes a product.

func Get

func Get(id string, params *stripe.ProductParams) (*stripe.Product, error)

Get returns the details of a product.

func New

func New(params *stripe.ProductParams) (*stripe.Product, error)

New creates a new product.

func Update

func Update(id string, params *stripe.ProductParams) (*stripe.Product, error)

Update updates a product's properties.

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke /products APIs.

func (Client) Del

func (c Client) Del(id string, params *stripe.ProductParams) (*stripe.Product, error)

Del removes a product.

func (Client) Get

func (c Client) Get(id string, params *stripe.ProductParams) (*stripe.Product, error)

Get returns the details of a product.

func (Client) List

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

List returns a list of products.

func (Client) New

func (c Client) New(params *stripe.ProductParams) (*stripe.Product, error)

New creates a new product.

func (Client) Update

func (c Client) Update(id string, params *stripe.ProductParams) (*stripe.Product, error)

Update updates a product's properties.

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for products.

func List

func List(params *stripe.ProductListParams) *Iter

List returns a list of products.

func (*Iter) Product

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

Product returns the product which the iterator is currently pointing to.

func (*Iter) ProductList

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

ProductList 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