Documentation ¶
Overview ¶
Package sub provides the /subscriptions APIs
Index ¶
- func Cancel(id string, params *stripe.SubscriptionCancelParams) (*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) Get(id string, params *stripe.SubscriptionParams) (*stripe.Subscription, error)
- func (c Client) List(params *stripe.SubscriptionListParams) *Iter
- func (c Client) New(params *stripe.SubscriptionParams) (*stripe.Subscription, error)
- func (c Client) Update(id string, params *stripe.SubscriptionParams) (*stripe.Subscription, error)
- type Iter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cancel ¶
func Cancel(id string, params *stripe.SubscriptionCancelParams) (*stripe.Subscription, error)
Cancel removes a subscription. For more details see https://stripe.com/docs/api#cancel_subscription.
func Get ¶
func Get(id string, params *stripe.SubscriptionParams) (*stripe.Subscription, error)
Get returns the details of a subscription. For more details see https://stripe.com/docs/api#retrieve_subscription.
func New ¶
func New(params *stripe.SubscriptionParams) (*stripe.Subscription, error)
New POSTS a new subscription for a customer. For more details see https://stripe.com/docs/api#create_subscription.
func Update ¶
func Update(id string, params *stripe.SubscriptionParams) (*stripe.Subscription, error)
Update updates a subscription's properties. For more details see https://stripe.com/docs/api#update_subscription.
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)
func (Client) Get ¶
func (c Client) Get(id string, params *stripe.SubscriptionParams) (*stripe.Subscription, error)
func (Client) New ¶
func (c Client) New(params *stripe.SubscriptionParams) (*stripe.Subscription, error)
func (Client) Update ¶
func (c Client) Update(id string, params *stripe.SubscriptionParams) (*stripe.Subscription, error)
type Iter ¶
Iter is an iterator for lists of Subs. The embedded Iter carries methods with it; see its documentation for details.
func List ¶
func List(params *stripe.SubscriptionListParams) *Iter
List returns a list of subscriptions. For more details see https://stripe.com/docs/api#list_subscriptions.
func (*Iter) Subscription ¶
func (i *Iter) Subscription() *stripe.Subscription
Subscription returns the most recent Subscription visited by a call to Next.