meter

package
v81.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package meter provides the /billing/meters APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deactivate

When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price.

func Get

Retrieves a billing meter given an ID.

func New

Creates a billing meter.

func Reactivate

When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price.

func Update

func Update(id string, params *stripe.BillingMeterParams) (*stripe.BillingMeter, error)

Updates a billing meter.

Types

type Client

type Client struct {
	B   stripe.Backend
	Key string
}

Client is used to invoke /billing/meters APIs.

func (Client) Deactivate

When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price.

func (Client) Get

Retrieves a billing meter given an ID.

func (Client) List

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

Retrieve a list of billing meters.

func (Client) New

Creates a billing meter.

func (Client) Reactivate

When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price.

func (Client) Update

func (c Client) Update(id string, params *stripe.BillingMeterParams) (*stripe.BillingMeter, error)

Updates a billing meter.

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for billing meters.

func List

func List(params *stripe.BillingMeterListParams) *Iter

Retrieve a list of billing meters.

func (*Iter) BillingMeter

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

BillingMeter returns the billing meter which the iterator is currently pointing to.

func (*Iter) BillingMeterList

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

BillingMeterList 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