Documentation ¶
Overview ¶
Package product provides the /products APIs
Index ¶
- func Del(id string, params *stripe.ProductParams) (*stripe.Product, error)
- func Get(id string, params *stripe.ProductParams) (*stripe.Product, error)
- func New(params *stripe.ProductParams) (*stripe.Product, error)
- func Update(id string, params *stripe.ProductParams) (*stripe.Product, error)
- type Client
- func (c Client) Del(id string, params *stripe.ProductParams) (*stripe.Product, error)
- func (c Client) Get(id string, params *stripe.ProductParams) (*stripe.Product, error)
- func (c Client) List(listParams *stripe.ProductListParams) *Iter
- func (c Client) New(params *stripe.ProductParams) (*stripe.Product, error)
- func (c Client) Search(params *stripe.ProductSearchParams) *SearchIter
- func (c Client) Update(id string, params *stripe.ProductParams) (*stripe.Product, error)
- type Iter
- type SearchIter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Del ¶
Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.
func Get ¶
Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.
Types ¶
type Client ¶
Client is used to invoke /products APIs.
func (Client) Del ¶
Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.
func (Client) Get ¶
Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.
func (Client) List ¶
func (c Client) List(listParams *stripe.ProductListParams) *Iter
Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.
func (Client) Search ¶
func (c Client) Search(params *stripe.ProductSearchParams) *SearchIter
Search for products 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.
type Iter ¶
Iter is an iterator for products.
func List ¶
func List(params *stripe.ProductListParams) *Iter
Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.
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.
type SearchIter ¶
type SearchIter struct {
*stripe.SearchIter
}
SearchIter is an iterator for products.
func Search ¶
func Search(params *stripe.ProductSearchParams) *SearchIter
Search for products 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) Product ¶
func (i *SearchIter) Product() *stripe.Product
Product returns the product which the iterator is currently pointing to.
func (*SearchIter) ProductSearchResult ¶
func (i *SearchIter) ProductSearchResult() *stripe.ProductSearchResult
ProductSearchResult returns the current list object which the iterator is currently using. List objects will change as new API calls are made to continue pagination.