coupon

package
v70.11.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package coupon provides the /coupons APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Del

func Del(id string, params *stripe.CouponParams) (*stripe.Coupon, error)

Del removes a coupon.

func Get

func Get(id string, params *stripe.CouponParams) (*stripe.Coupon, error)

Get returns the details of a coupon.

func New

func New(params *stripe.CouponParams) (*stripe.Coupon, error)

New creates a new coupon.

func Update

func Update(id string, params *stripe.CouponParams) (*stripe.Coupon, error)

Update updates a coupon's properties.

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke /coupons APIs.

func (Client) Del

func (c Client) Del(id string, params *stripe.CouponParams) (*stripe.Coupon, error)

Del removes a coupon.

func (Client) Get

func (c Client) Get(id string, params *stripe.CouponParams) (*stripe.Coupon, error)

Get returns the details of a coupon.

func (Client) List

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

List returns a list of coupons.

func (Client) New

func (c Client) New(params *stripe.CouponParams) (*stripe.Coupon, error)

New creates a new coupon.

func (Client) Update

func (c Client) Update(id string, params *stripe.CouponParams) (*stripe.Coupon, error)

Update updates a coupon's properties.

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for coupons.

func List

func List(params *stripe.CouponListParams) *Iter

List returns a list of coupons.

func (*Iter) Coupon

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

Coupon returns the coupon which the iterator is currently pointing to.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL