card

package
v78.11.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package card provides the /gift_cards/cards APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

Retrieve a gift card by id

func New

Creates a new gift card object.

func Update

Update a gift card

func Validate

Validates a gift card code, returning the matching gift card object if it exists.

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke /gift_cards/cards APIs.

func (Client) Get

Retrieve a gift card by id

func (Client) List

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

List gift cards for an account

func (Client) New

Creates a new gift card object.

func (Client) Update

func (c Client) Update(id string, params *stripe.GiftCardsCardParams) (*stripe.GiftCardsCard, error)

Update a gift card

func (Client) Validate

Validates a gift card code, returning the matching gift card object if it exists.

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for gift cards cards.

func List

func List(params *stripe.GiftCardsCardListParams) *Iter

List gift cards for an account

func (*Iter) GiftCardsCard

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

GiftCardsCard returns the gift cards card which the iterator is currently pointing to.

func (*Iter) GiftCardsCardList

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

GiftCardsCardList 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