subscription

package
v73.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 3 Imported by: 3

Documentation

Overview

Package subscription provides the /subscriptions APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cancel

Cancel is the method for the `DELETE /v1/subscriptions/{subscription_exposed_id}` API.

func DeleteDiscount

DeleteDiscount is the method for the `DELETE /v1/subscriptions/{subscription_exposed_id}/discount` API.

func Get

Get returns the details of a subscription.

func New

New creates a new subscription.

func Update

func Update(id string, params *stripe.SubscriptionParams) (*stripe.Subscription, error)

Update updates a subscription's properties.

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke /subscriptions APIs.

func (Client) Cancel

Cancel is the method for the `DELETE /v1/subscriptions/{subscription_exposed_id}` API.

func (Client) DeleteDiscount

func (c Client) DeleteDiscount(id string, params *stripe.SubscriptionDeleteDiscountParams) (*stripe.Subscription, error)

DeleteDiscount is the method for the `DELETE /v1/subscriptions/{subscription_exposed_id}/discount` API.

func (Client) Get

Get returns the details of a subscription.

func (Client) List

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

List returns a list of subscriptions.

func (Client) New

New creates a new subscription.

func (Client) Search

func (c Client) Search(params *stripe.SubscriptionSearchParams) *SearchIter

Search returns a search result containing subscriptions.

func (Client) Update

func (c Client) Update(id string, params *stripe.SubscriptionParams) (*stripe.Subscription, error)

Update updates a subscription's properties.

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for subscriptions.

func List

func List(params *stripe.SubscriptionListParams) *Iter

List returns a list of subscriptions.

func (*Iter) Subscription

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

Subscription returns the subscription which the iterator is currently pointing to.

func (*Iter) SubscriptionList

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

SubscriptionList 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 subscriptions.

Search returns a search result containing subscriptions.

func (*SearchIter) Subscription

func (i *SearchIter) Subscription() *stripe.Subscription

Subscription returns the subscription which the iterator is currently pointing to.

func (*SearchIter) SubscriptionSearchResult

func (i *SearchIter) SubscriptionSearchResult() *stripe.SubscriptionSearchResult

SubscriptionSearchResult 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