Documentation ¶
Overview ¶
Package promotioncode provides the /promotion_codes APIs
Index ¶
- func Get(id string, params *stripe.PromotionCodeParams) (*stripe.PromotionCode, error)
- func New(params *stripe.PromotionCodeParams) (*stripe.PromotionCode, error)
- func Update(id string, params *stripe.PromotionCodeParams) (*stripe.PromotionCode, error)
- type Client
- func (c Client) Get(id string, params *stripe.PromotionCodeParams) (*stripe.PromotionCode, error)
- func (c Client) List(listParams *stripe.PromotionCodeListParams) *Iter
- func (c Client) New(params *stripe.PromotionCodeParams) (*stripe.PromotionCode, error)
- func (c Client) Update(id string, params *stripe.PromotionCodeParams) (*stripe.PromotionCode, error)
- type Iter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
func Get(id string, params *stripe.PromotionCodeParams) (*stripe.PromotionCode, error)
Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use [list](https://stripe.com/docs/api/promotion_codes/list) with the desired code.
func New ¶
func New(params *stripe.PromotionCodeParams) (*stripe.PromotionCode, error)
A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.
func Update ¶
func Update(id string, params *stripe.PromotionCodeParams) (*stripe.PromotionCode, error)
Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.
Types ¶
type Client ¶
Client is used to invoke /promotion_codes APIs.
func (Client) Get ¶
func (c Client) Get(id string, params *stripe.PromotionCodeParams) (*stripe.PromotionCode, error)
Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use [list](https://stripe.com/docs/api/promotion_codes/list) with the desired code.
func (Client) List ¶
func (c Client) List(listParams *stripe.PromotionCodeListParams) *Iter
Returns a list of your promotion codes.
func (Client) New ¶
func (c Client) New(params *stripe.PromotionCodeParams) (*stripe.PromotionCode, error)
A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.
func (Client) Update ¶
func (c Client) Update(id string, params *stripe.PromotionCodeParams) (*stripe.PromotionCode, error)
Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.
type Iter ¶
Iter is an iterator for promotion codes.
func List ¶
func List(params *stripe.PromotionCodeListParams) *Iter
Returns a list of your promotion codes.
func (*Iter) PromotionCode ¶
func (i *Iter) PromotionCode() *stripe.PromotionCode
PromotionCode returns the promotion code which the iterator is currently pointing to.
func (*Iter) PromotionCodeList ¶
func (i *Iter) PromotionCodeList() *stripe.PromotionCodeList
PromotionCodeList returns the current list object which the iterator is currently using. List objects will change as new API calls are made to continue pagination.