coupon

package
v15.5.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package coupon provides the /coupons APIs

Index

Constants

View Source
const (
	Forever   stripe.CouponDuration = "forever"
	Once      stripe.CouponDuration = "once"
	Repeating stripe.CouponDuration = "repeating"
)

Variables

This section is empty.

Functions

func Del

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

Del removes a coupon. For more details see https://stripe.com/docs/api#delete_coupon.

func Get

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

Get returns the details of a coupon. For more details see https://stripe.com/docs/api#retrieve_coupon.

func New

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

New POSTs new coupons. For more details see https://stripe.com/docs/api#create_coupon.

func Update

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

Update updates a coupon's properties. For more details see https://stripe.com/docs/api#update_coupon.

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) (*stripe.Coupon, error)

func (Client) Get

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

func (Client) List

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

func (Client) New

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

func (Client) Update

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

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for lists of Coupons. The embedded Iter carries methods with it; see its documentation for details.

func List

func List(params *stripe.CouponListParams) *Iter

List returns a list of coupons. For more details see https://stripe.com/docs/api#list_coupons.

func (*Iter) Coupon

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

Coupon returns the most recent Coupon visited by a call to Next.

Jump to

Keyboard shortcuts

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