price

package
v79.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 3 Imported by: 5

Documentation

Overview

Package price provides the /prices APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(id string, params *stripe.PriceParams) (*stripe.Price, error)

Retrieves the price with the given ID.

func New

func New(params *stripe.PriceParams) (*stripe.Price, error)

Creates a new price for an existing product. The price can be recurring or one-time.

func Update

func Update(id string, params *stripe.PriceParams) (*stripe.Price, error)

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke /prices APIs.

func (Client) Get

func (c Client) Get(id string, params *stripe.PriceParams) (*stripe.Price, error)

Retrieves the price with the given ID.

func (Client) List

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

Returns a list of your active prices, excluding [inline prices](https://stripe.com/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set active to false.

func (Client) New

func (c Client) New(params *stripe.PriceParams) (*stripe.Price, error)

Creates a new price for an existing product. The price can be recurring or one-time.

func (Client) Search

func (c Client) Search(params *stripe.PriceSearchParams) *SearchIter

Search for prices you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.

func (Client) Update

func (c Client) Update(id string, params *stripe.PriceParams) (*stripe.Price, error)

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for prices.

func List

func List(params *stripe.PriceListParams) *Iter

Returns a list of your active prices, excluding [inline prices](https://stripe.com/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set active to false.

func (*Iter) Price

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

Price returns the price which the iterator is currently pointing to.

func (*Iter) PriceList

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

PriceList 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 SearchIter

type SearchIter struct {
	*stripe.SearchIter
}

SearchIter is an iterator for prices.

func Search(params *stripe.PriceSearchParams) *SearchIter

Search for prices you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.

func (*SearchIter) Price

func (i *SearchIter) Price() *stripe.Price

Price returns the price which the iterator is currently pointing to.

func (*SearchIter) PriceSearchResult

func (i *SearchIter) PriceSearchResult() *stripe.PriceSearchResult

PriceSearchResult 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