Documentation ¶
Overview ¶
Package subscription provides the /subscriptions APIs
Index ¶
- func Cancel(id string, params *stripe.SubscriptionCancelParams) (*stripe.Subscription, error)
- func DeleteDiscount(id string, params *stripe.SubscriptionDeleteDiscountParams) (*stripe.Subscription, error)
- func Get(id string, params *stripe.SubscriptionParams) (*stripe.Subscription, error)
- func New(params *stripe.SubscriptionParams) (*stripe.Subscription, error)
- func Update(id string, params *stripe.SubscriptionParams) (*stripe.Subscription, error)
- type Client
- func (c Client) Cancel(id string, params *stripe.SubscriptionCancelParams) (*stripe.Subscription, error)
- func (c Client) DeleteDiscount(id string, params *stripe.SubscriptionDeleteDiscountParams) (*stripe.Subscription, error)
- func (c Client) Get(id string, params *stripe.SubscriptionParams) (*stripe.Subscription, error)
- func (c Client) List(listParams *stripe.SubscriptionListParams) *Iter
- func (c Client) New(params *stripe.SubscriptionParams) (*stripe.Subscription, error)
- func (c Client) Search(params *stripe.SubscriptionSearchParams) *SearchIter
- func (c Client) Update(id string, params *stripe.SubscriptionParams) (*stripe.Subscription, error)
- type Iter
- type SearchIter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cancel ¶
func Cancel(id string, params *stripe.SubscriptionCancelParams) (*stripe.Subscription, error)
Cancel is the method for the `DELETE /v1/subscriptions/{subscription_exposed_id}` API.
func DeleteDiscount ¶
func DeleteDiscount(id string, params *stripe.SubscriptionDeleteDiscountParams) (*stripe.Subscription, error)
DeleteDiscount is the method for the `DELETE /v1/subscriptions/{subscription_exposed_id}/discount` API.
func Get ¶
func Get(id string, params *stripe.SubscriptionParams) (*stripe.Subscription, error)
Get returns the details of a subscription.
func New ¶
func New(params *stripe.SubscriptionParams) (*stripe.Subscription, error)
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 ¶
Client is used to invoke /subscriptions APIs.
func (Client) Cancel ¶
func (c Client) Cancel(id string, params *stripe.SubscriptionCancelParams) (*stripe.Subscription, error)
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 ¶
func (c Client) Get(id string, params *stripe.SubscriptionParams) (*stripe.Subscription, error)
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 ¶
func (c Client) New(params *stripe.SubscriptionParams) (*stripe.Subscription, error)
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 ¶
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.
func Search ¶
func Search(params *stripe.SubscriptionSearchParams) *SearchIter
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.