Documentation ¶
Overview ¶
Package subscriptionitem provides the /subscription_items APIs
Index ¶
- func Del(id string, params *stripe.SubscriptionItemParams) (*stripe.SubscriptionItem, error)
- func Get(id string, params *stripe.SubscriptionItemParams) (*stripe.SubscriptionItem, error)
- func New(params *stripe.SubscriptionItemParams) (*stripe.SubscriptionItem, error)
- func Update(id string, params *stripe.SubscriptionItemParams) (*stripe.SubscriptionItem, error)
- type Client
- func (c Client) Del(id string, params *stripe.SubscriptionItemParams) (*stripe.SubscriptionItem, error)
- func (c Client) Get(id string, params *stripe.SubscriptionItemParams) (*stripe.SubscriptionItem, error)
- func (c Client) List(listParams *stripe.SubscriptionItemListParams) *Iter
- func (c Client) New(params *stripe.SubscriptionItemParams) (*stripe.SubscriptionItem, error)
- func (c Client) Update(id string, params *stripe.SubscriptionItemParams) (*stripe.SubscriptionItem, error)
- func (c Client) UsageRecordSummaries(listParams *stripe.SubscriptionItemUsageRecordSummariesParams) *UsageRecordSummaryIter
- type Iter
- type UsageRecordSummaryIter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Del ¶
func Del(id string, params *stripe.SubscriptionItemParams) (*stripe.SubscriptionItem, error)
Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.
func Get ¶
func Get(id string, params *stripe.SubscriptionItemParams) (*stripe.SubscriptionItem, error)
Retrieves the subscription item with the given ID.
func New ¶
func New(params *stripe.SubscriptionItemParams) (*stripe.SubscriptionItem, error)
Adds a new item to an existing subscription. No existing items will be changed or replaced.
func Update ¶
func Update(id string, params *stripe.SubscriptionItemParams) (*stripe.SubscriptionItem, error)
Updates the plan or quantity of an item on a current subscription.
Types ¶
type Client ¶
Client is used to invoke /subscription_items APIs.
func (Client) Del ¶
func (c Client) Del(id string, params *stripe.SubscriptionItemParams) (*stripe.SubscriptionItem, error)
Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.
func (Client) Get ¶
func (c Client) Get(id string, params *stripe.SubscriptionItemParams) (*stripe.SubscriptionItem, error)
Retrieves the subscription item with the given ID.
func (Client) List ¶
func (c Client) List(listParams *stripe.SubscriptionItemListParams) *Iter
Returns a list of your subscription items for a given subscription.
func (Client) New ¶
func (c Client) New(params *stripe.SubscriptionItemParams) (*stripe.SubscriptionItem, error)
Adds a new item to an existing subscription. No existing items will be changed or replaced.
func (Client) Update ¶
func (c Client) Update(id string, params *stripe.SubscriptionItemParams) (*stripe.SubscriptionItem, error)
Updates the plan or quantity of an item on a current subscription.
func (Client) UsageRecordSummaries ¶
func (c Client) UsageRecordSummaries(listParams *stripe.SubscriptionItemUsageRecordSummariesParams) *UsageRecordSummaryIter
For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that's been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).
The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn't ended yet. Since new usage records can still be added, the returned summary information for the subscription item's ID should be seen as unstable until the subscription billing period ends.
type Iter ¶
Iter is an iterator for subscription items.
func List ¶
func List(params *stripe.SubscriptionItemListParams) *Iter
Returns a list of your subscription items for a given subscription.
func (*Iter) SubscriptionItem ¶
func (i *Iter) SubscriptionItem() *stripe.SubscriptionItem
SubscriptionItem returns the subscription item which the iterator is currently pointing to.
func (*Iter) SubscriptionItemList ¶
func (i *Iter) SubscriptionItemList() *stripe.SubscriptionItemList
SubscriptionItemList 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 UsageRecordSummaryIter ¶
UsageRecordSummaryIter is an iterator for usage record summaries.
func UsageRecordSummaries ¶
func UsageRecordSummaries(params *stripe.SubscriptionItemUsageRecordSummariesParams) *UsageRecordSummaryIter
For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that's been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).
The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn't ended yet. Since new usage records can still be added, the returned summary information for the subscription item's ID should be seen as unstable until the subscription billing period ends.
func (*UsageRecordSummaryIter) UsageRecordSummary ¶
func (i *UsageRecordSummaryIter) UsageRecordSummary() *stripe.UsageRecordSummary
UsageRecordSummary returns the usage record summary which the iterator is currently pointing to.
func (*UsageRecordSummaryIter) UsageRecordSummaryList ¶
func (i *UsageRecordSummaryIter) UsageRecordSummaryList() *stripe.UsageRecordSummaryList
UsageRecordSummaryList returns the current list object which the iterator is currently using. List objects will change as new API calls are made to continue pagination.