orb

package module
v0.123.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: Apache-2.0 Imports: 22 Imported by: 1

README

Orb Go API Library

Go Reference

The Orb Go library provides convenient access to the Orb REST API from applications written in Go.

Installation

import (
	"github.com/orbcorp/orb-go" // imported as orb
)

Or to pin the version:

go get -u 'github.com/orbcorp/orb-go@v0.123.0'

Requirements

This library requires Go 1.18+.

Usage

The full API of this library can be found in api.md.

package main

import (
	"context"
	"fmt"

	"github.com/orbcorp/orb-go"
	"github.com/orbcorp/orb-go/option"
)

func main() {
	client := orb.NewClient(
		option.WithAPIKey("My API Key"), // defaults to os.LookupEnv("ORB_API_KEY")
	)
	customer, err := client.Customers.New(context.TODO(), orb.CustomerNewParams{
		Email: orb.F("example-customer@withorb.com"),
		Name:  orb.F("My Customer"),
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", customer.ID)
}

Request fields

All request parameters are wrapped in a generic Field type, which we use to distinguish zero values from null or omitted fields.

This prevents accidentally sending a zero value if you forget a required parameter, and enables explicitly sending null, false, '', or 0 on optional parameters. Any field not specified is not sent.

To construct fields with values, use the helpers String(), Int(), Float(), or most commonly, the generic F[T](). To send a null, use Null[T](), and to send a nonconforming value, use Raw[T](any). For example:

params := FooParams{
	Name: orb.F("hello"),

	// Explicitly send `"description": null`
	Description: orb.Null[string](),

	Point: orb.F(orb.Point{
		X: orb.Int(0),
		Y: orb.Int(1),

		// In cases where the API specifies a given type,
		// but you want to send something else, use `Raw`:
		Z: orb.Raw[int64](0.01), // sends a float
	}),
}
Response objects

All fields in response structs are value types (not pointers or wrappers).

If a given field is null, not present, or invalid, the corresponding field will simply be its zero value.

All response structs also include a special JSON field, containing more detailed information about each property, which you can use like so:

if res.Name == "" {
	// true if `"name"` is either not present or explicitly null
	res.JSON.Name.IsNull()

	// true if the `"name"` key was not present in the response JSON at all
	res.JSON.Name.IsMissing()

	// When the API returns data that cannot be coerced to the expected type:
	if res.JSON.Name.IsInvalid() {
		raw := res.JSON.Name.Raw()

		legacyName := struct{
			First string `json:"first"`
			Last  string `json:"last"`
		}{}
		json.Unmarshal([]byte(raw), &legacyName)
		name = legacyName.First + " " + legacyName.Last
	}
}

These .JSON structs also include an Extras map containing any properties in the json response that were not specified in the struct. This can be useful for API features not yet present in the SDK.

body := res.JSON.ExtraFields["my_unexpected_field"].Raw()
RequestOptions

This library uses the functional options pattern. Functions defined in the option package return a RequestOption, which is a closure that mutates a RequestConfig. These options can be supplied to the client or at individual requests. For example:

client := orb.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.Customers.New(context.TODO(), ...,
	// Override the header
	option.WithHeader("X-Some-Header", "some_other_custom_header_info"),
	// Add an undocumented field to the request body, using sjson syntax
	option.WithJSONSet("some.json.path", map[string]string{"my": "object"}),
)

See the full list of request options.

Pagination

This library provides some conveniences for working with paginated list endpoints.

You can use .ListAutoPaging() methods to iterate through items across all pages:

iter := client.Coupons.ListAutoPaging(context.TODO(), orb.CouponListParams{})
// Automatically fetches more pages as needed.
for iter.Next() {
	coupon := iter.Current()
	fmt.Printf("%+v\n", coupon)
}
if err := iter.Err(); err != nil {
	panic(err.Error())
}

Or you can use simple .List() methods to fetch a single page and receive a standard response object with additional helper methods like .GetNextPage(), e.g.:

page, err := client.Coupons.List(context.TODO(), orb.CouponListParams{})
for page != nil {
	for _, coupon := range page.Data {
		fmt.Printf("%+v\n", coupon)
	}
	page, err = page.GetNextPage()
}
if err != nil {
	panic(err.Error())
}
Errors

When the API returns a non-success status code, we return an error with type *orb.Error. This contains the StatusCode, *http.Request, and *http.Response values of the request, as well as the JSON of the error body (much like other response objects in the SDK).

To handle errors, we recommend that you use the errors.As pattern:

_, err := client.Customers.New(context.TODO(), orb.CustomerNewParams{
	Email: orb.F("example-customer@withorb.com"),
	Name:  orb.F("My Customer"),
})
if err != nil {
	var apierr *orb.Error
	if errors.As(err, &apierr) {
		println(string(apierr.DumpRequest(true)))  // Prints the serialized HTTP request
		println(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response
	}
	panic(err.Error()) // GET "/customers": 400 Bad Request { ... }
}

When other errors occur, they are returned unwrapped; for example, if HTTP transport fails, you might receive *url.Error wrapping *net.OpError.

Timeouts

Requests do not time out by default; use context to configure a timeout for a request lifecycle.

Note that if a request is retried, the context timeout does not start over. To set a per-retry timeout, use option.WithRequestTimeout().

// This sets the timeout for the request, including all the retries.
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
client.Customers.New(
	ctx,
	orb.CustomerNewParams{
		Email: orb.F("example-customer@withorb.com"),
		Name:  orb.F("My Customer"),
	},
	// This sets the per-retry timeout
	option.WithRequestTimeout(20*time.Second),
)
File uploads

Request parameters that correspond to file uploads in multipart requests are typed as param.Field[io.Reader]. The contents of the io.Reader will by default be sent as a multipart form part with the file name of "anonymous_file" and content-type of "application/octet-stream".

The file name and content-type can be customized by implementing Name() string or ContentType() string on the run-time type of io.Reader. Note that os.File implements Name() string, so a file returned by os.Open will be sent with the file name on disk.

We also provide a helper orb.FileParam(reader io.Reader, filename string, contentType string) which can be used to wrap any io.Reader with the appropriate file name and content type.

Retries

Certain errors will be automatically retried 2 times by default, with a short exponential backoff. We retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors.

You can use the WithMaxRetries option to configure or disable this:

// Configure the default for all requests:
client := orb.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.Customers.New(
	context.TODO(),
	orb.CustomerNewParams{
		Email: orb.F("example-customer@withorb.com"),
		Name:  orb.F("My Customer"),
	},
	option.WithMaxRetries(5),
)
Middleware

We provide option.WithMiddleware which applies the given middleware to requests.

func Logger(req *http.Request, next option.MiddlewareNext) (res *http.Response, err error) {
	// Before the request
	start := time.Now()
	LogReq(req)

	// Forward the request to the next handler
	res, err = next(req)

	// Handle stuff after the request
	end := time.Now()
	LogRes(res, err, start - end)

    return res, err
}

client := orb.NewClient(
	option.WithMiddleware(Logger),
)

When multiple middlewares are provided as variadic arguments, the middlewares are applied left to right. If option.WithMiddleware is given multiple times, for example first in the client then the method, the middleware in the client will run first and the middleware given in the method will run next.

You may also replace the default http.Client with option.WithHTTPClient(client). Only one http client is accepted (this overwrites any previous client) and receives requests after any middleware has been applied.

Webhook Verification

We provide the method orb.Webhooks.VerifySignature(payload []byte, headers http.Header, secret string, now time.Time) for verifying that a webhook request came from Orb, and not a malicious third party.

Note that the payload parameter must be the raw JSON string sent from the server (do not parse it first). To use the webhook secret defined at the client level pass an empty string as the secret parameter.

func handler(w http.ResponseWriter, r *http.Request) {
    if r.Method != http.MethodPost {
        http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
        return
    }

    body, err := ioutil.ReadAll(r.Body)
    if err != nil {
        http.Error(w, "Error reading request body", http.StatusInternalServerError)
        return
    }
    defer r.Body.Close()

    secret := os.Getenv("ORB_WEBHOOK_SECRET") // env var used by default; explicit here.
    now := time.Now()

    err = orb.Webhooks.VerifySignature(body, r.Header, secret, now)
    if err != nil {
        http.Error(w, `{"error": "invalid signature"}`, http.StatusBadRequest)
        return
    }

    w.Header().Set("Content-Type", "application/json")
    w.Write([]byte(`{"ok": true}`))
}

Semantic versioning

This package generally follows SemVer conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes to library internals which are technically public but not intended or documented for external use. (Please open a GitHub issue to let us know if you are relying on such internals.)
  2. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an issue with questions, bugs, or suggestions.

Contributing

See the contributing documentation.

Documentation

Index

Constants

View Source
const AdjustmentIntervalAdjustmentAdjustmentTypeAmountDiscount = shared.AdjustmentIntervalAdjustmentAdjustmentTypeAmountDiscount

This is an alias to an internal value.

View Source
const AdjustmentIntervalAdjustmentAdjustmentTypeMaximum = shared.AdjustmentIntervalAdjustmentAdjustmentTypeMaximum

This is an alias to an internal value.

View Source
const AdjustmentIntervalAdjustmentAdjustmentTypeMinimum = shared.AdjustmentIntervalAdjustmentAdjustmentTypeMinimum

This is an alias to an internal value.

View Source
const AdjustmentIntervalAdjustmentAdjustmentTypePercentageDiscount = shared.AdjustmentIntervalAdjustmentAdjustmentTypePercentageDiscount

This is an alias to an internal value.

View Source
const AdjustmentIntervalAdjustmentAdjustmentTypeUsageDiscount = shared.AdjustmentIntervalAdjustmentAdjustmentTypeUsageDiscount

This is an alias to an internal value.

View Source
const AmountDiscountDiscountTypeAmount = shared.AmountDiscountDiscountTypeAmount

This is an alias to an internal value.

View Source
const AmountDiscountIntervalDiscountTypeAmount = shared.AmountDiscountIntervalDiscountTypeAmount

This is an alias to an internal value.

View Source
const BillingCycleConfigurationDurationUnitDay = shared.BillingCycleConfigurationDurationUnitDay

This is an alias to an internal value.

View Source
const BillingCycleConfigurationDurationUnitMonth = shared.BillingCycleConfigurationDurationUnitMonth

This is an alias to an internal value.

View Source
const BillingCycleRelativeDateEndOfTerm = shared.BillingCycleRelativeDateEndOfTerm

This is an alias to an internal value.

View Source
const BillingCycleRelativeDateStartOfTerm = shared.BillingCycleRelativeDateStartOfTerm

This is an alias to an internal value.

View Source
const CreditNoteDiscountsDiscountTypePercentage = shared.CreditNoteDiscountsDiscountTypePercentage

This is an alias to an internal value.

View Source
const CreditNoteLineItemsDiscountsDiscountTypeAmount = shared.CreditNoteLineItemsDiscountsDiscountTypeAmount

This is an alias to an internal value.

View Source
const CreditNoteLineItemsDiscountsDiscountTypePercentage = shared.CreditNoteLineItemsDiscountsDiscountTypePercentage

This is an alias to an internal value.

View Source
const CreditNoteMaximumAmountAdjustmentDiscountTypePercentage = shared.CreditNoteMaximumAmountAdjustmentDiscountTypePercentage

This is an alias to an internal value.

View Source
const CreditNoteReasonDuplicate = shared.CreditNoteReasonDuplicate

This is an alias to an internal value.

View Source
const CreditNoteReasonFraudulent = shared.CreditNoteReasonFraudulent

This is an alias to an internal value.

View Source
const CreditNoteReasonOrderChange = shared.CreditNoteReasonOrderChange

This is an alias to an internal value.

View Source
const CreditNoteReasonProductUnsatisfactory = shared.CreditNoteReasonProductUnsatisfactory

This is an alias to an internal value.

View Source
const CreditNoteTypeAdjustment = shared.CreditNoteTypeAdjustment

This is an alias to an internal value.

View Source
const CreditNoteTypeRefund = shared.CreditNoteTypeRefund

This is an alias to an internal value.

View Source
const CustomExpirationDurationUnitDay = shared.CustomExpirationDurationUnitDay

This is an alias to an internal value.

View Source
const CustomExpirationDurationUnitMonth = shared.CustomExpirationDurationUnitMonth

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryAd = shared.CustomerTaxIDCountryAd

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryAe = shared.CustomerTaxIDCountryAe

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryAr = shared.CustomerTaxIDCountryAr

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryAt = shared.CustomerTaxIDCountryAt

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryAu = shared.CustomerTaxIDCountryAu

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryBe = shared.CustomerTaxIDCountryBe

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryBg = shared.CustomerTaxIDCountryBg

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryBh = shared.CustomerTaxIDCountryBh

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryBo = shared.CustomerTaxIDCountryBo

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryBr = shared.CustomerTaxIDCountryBr

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryCa = shared.CustomerTaxIDCountryCa

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryCh = shared.CustomerTaxIDCountryCh

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryCl = shared.CustomerTaxIDCountryCl

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryCn = shared.CustomerTaxIDCountryCn

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryCo = shared.CustomerTaxIDCountryCo

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryCr = shared.CustomerTaxIDCountryCr

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryCy = shared.CustomerTaxIDCountryCy

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryCz = shared.CustomerTaxIDCountryCz

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryDe = shared.CustomerTaxIDCountryDe

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryDk = shared.CustomerTaxIDCountryDk

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryDo = shared.CustomerTaxIDCountryDo

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryEc = shared.CustomerTaxIDCountryEc

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryEe = shared.CustomerTaxIDCountryEe

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryEg = shared.CustomerTaxIDCountryEg

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryEs = shared.CustomerTaxIDCountryEs

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryEu = shared.CustomerTaxIDCountryEu

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryFi = shared.CustomerTaxIDCountryFi

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryFr = shared.CustomerTaxIDCountryFr

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryGB = shared.CustomerTaxIDCountryGB

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryGe = shared.CustomerTaxIDCountryGe

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryGr = shared.CustomerTaxIDCountryGr

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryHk = shared.CustomerTaxIDCountryHk

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryHr = shared.CustomerTaxIDCountryHr

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryHu = shared.CustomerTaxIDCountryHu

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryID = shared.CustomerTaxIDCountryID

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryIe = shared.CustomerTaxIDCountryIe

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryIl = shared.CustomerTaxIDCountryIl

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryIn = shared.CustomerTaxIDCountryIn

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryIs = shared.CustomerTaxIDCountryIs

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryIt = shared.CustomerTaxIDCountryIt

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryJp = shared.CustomerTaxIDCountryJp

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryKe = shared.CustomerTaxIDCountryKe

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryKr = shared.CustomerTaxIDCountryKr

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryKz = shared.CustomerTaxIDCountryKz

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryLi = shared.CustomerTaxIDCountryLi

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryLt = shared.CustomerTaxIDCountryLt

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryLu = shared.CustomerTaxIDCountryLu

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryLv = shared.CustomerTaxIDCountryLv

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryMt = shared.CustomerTaxIDCountryMt

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryMx = shared.CustomerTaxIDCountryMx

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryMy = shared.CustomerTaxIDCountryMy

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryNg = shared.CustomerTaxIDCountryNg

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryNl = shared.CustomerTaxIDCountryNl

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryNo = shared.CustomerTaxIDCountryNo

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryNz = shared.CustomerTaxIDCountryNz

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryOm = shared.CustomerTaxIDCountryOm

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryPe = shared.CustomerTaxIDCountryPe

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryPh = shared.CustomerTaxIDCountryPh

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryPl = shared.CustomerTaxIDCountryPl

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryPt = shared.CustomerTaxIDCountryPt

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryRo = shared.CustomerTaxIDCountryRo

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryRs = shared.CustomerTaxIDCountryRs

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryRu = shared.CustomerTaxIDCountryRu

This is an alias to an internal value.

View Source
const CustomerTaxIDCountrySa = shared.CustomerTaxIDCountrySa

This is an alias to an internal value.

View Source
const CustomerTaxIDCountrySe = shared.CustomerTaxIDCountrySe

This is an alias to an internal value.

View Source
const CustomerTaxIDCountrySg = shared.CustomerTaxIDCountrySg

This is an alias to an internal value.

View Source
const CustomerTaxIDCountrySi = shared.CustomerTaxIDCountrySi

This is an alias to an internal value.

View Source
const CustomerTaxIDCountrySk = shared.CustomerTaxIDCountrySk

This is an alias to an internal value.

View Source
const CustomerTaxIDCountrySv = shared.CustomerTaxIDCountrySv

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryTh = shared.CustomerTaxIDCountryTh

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryTr = shared.CustomerTaxIDCountryTr

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryTw = shared.CustomerTaxIDCountryTw

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryUa = shared.CustomerTaxIDCountryUa

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryUs = shared.CustomerTaxIDCountryUs

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryUy = shared.CustomerTaxIDCountryUy

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryVe = shared.CustomerTaxIDCountryVe

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryVn = shared.CustomerTaxIDCountryVn

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryZa = shared.CustomerTaxIDCountryZa

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeAdNrt = shared.CustomerTaxIDTypeAdNrt

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeAeTrn = shared.CustomerTaxIDTypeAeTrn

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeArCuit = shared.CustomerTaxIDTypeArCuit

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeAuAbn = shared.CustomerTaxIDTypeAuAbn

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeAuArn = shared.CustomerTaxIDTypeAuArn

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeBgUic = shared.CustomerTaxIDTypeBgUic

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeBhVat = shared.CustomerTaxIDTypeBhVat

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeBoTin = shared.CustomerTaxIDTypeBoTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeBrCnpj = shared.CustomerTaxIDTypeBrCnpj

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeBrCpf = shared.CustomerTaxIDTypeBrCpf

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeCaBn = shared.CustomerTaxIDTypeCaBn

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeCaGstHst = shared.CustomerTaxIDTypeCaGstHst

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeCaPstBc = shared.CustomerTaxIDTypeCaPstBc

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeCaPstMB = shared.CustomerTaxIDTypeCaPstMB

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeCaPstSk = shared.CustomerTaxIDTypeCaPstSk

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeCaQst = shared.CustomerTaxIDTypeCaQst

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeChVat = shared.CustomerTaxIDTypeChVat

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeClTin = shared.CustomerTaxIDTypeClTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeCnTin = shared.CustomerTaxIDTypeCnTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeCoNit = shared.CustomerTaxIDTypeCoNit

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeCrTin = shared.CustomerTaxIDTypeCrTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeDoRcn = shared.CustomerTaxIDTypeDoRcn

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeEcRuc = shared.CustomerTaxIDTypeEcRuc

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeEgTin = shared.CustomerTaxIDTypeEgTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeEsCif = shared.CustomerTaxIDTypeEsCif

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeEuOssVat = shared.CustomerTaxIDTypeEuOssVat

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeEuVat = shared.CustomerTaxIDTypeEuVat

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeGBVat = shared.CustomerTaxIDTypeGBVat

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeGeVat = shared.CustomerTaxIDTypeGeVat

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeHkBr = shared.CustomerTaxIDTypeHkBr

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeHuTin = shared.CustomerTaxIDTypeHuTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeIDNpwp = shared.CustomerTaxIDTypeIDNpwp

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeIlVat = shared.CustomerTaxIDTypeIlVat

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeInGst = shared.CustomerTaxIDTypeInGst

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeIsVat = shared.CustomerTaxIDTypeIsVat

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeJpCn = shared.CustomerTaxIDTypeJpCn

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeJpRn = shared.CustomerTaxIDTypeJpRn

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeJpTrn = shared.CustomerTaxIDTypeJpTrn

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeKePin = shared.CustomerTaxIDTypeKePin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeKrBrn = shared.CustomerTaxIDTypeKrBrn

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeKzBin = shared.CustomerTaxIDTypeKzBin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeLiUid = shared.CustomerTaxIDTypeLiUid

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeMxRfc = shared.CustomerTaxIDTypeMxRfc

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeMyFrp = shared.CustomerTaxIDTypeMyFrp

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeMyItn = shared.CustomerTaxIDTypeMyItn

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeMySst = shared.CustomerTaxIDTypeMySst

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeNgTin = shared.CustomerTaxIDTypeNgTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeNoVat = shared.CustomerTaxIDTypeNoVat

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeNoVoec = shared.CustomerTaxIDTypeNoVoec

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeNzGst = shared.CustomerTaxIDTypeNzGst

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeOmVat = shared.CustomerTaxIDTypeOmVat

This is an alias to an internal value.

View Source
const CustomerTaxIDTypePeRuc = shared.CustomerTaxIDTypePeRuc

This is an alias to an internal value.

View Source
const CustomerTaxIDTypePhTin = shared.CustomerTaxIDTypePhTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeRoTin = shared.CustomerTaxIDTypeRoTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeRsPib = shared.CustomerTaxIDTypeRsPib

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeRuInn = shared.CustomerTaxIDTypeRuInn

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeRuKpp = shared.CustomerTaxIDTypeRuKpp

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeSaVat = shared.CustomerTaxIDTypeSaVat

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeSgGst = shared.CustomerTaxIDTypeSgGst

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeSgUen = shared.CustomerTaxIDTypeSgUen

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeSiTin = shared.CustomerTaxIDTypeSiTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeSvNit = shared.CustomerTaxIDTypeSvNit

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeThVat = shared.CustomerTaxIDTypeThVat

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeTrTin = shared.CustomerTaxIDTypeTrTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeTwVat = shared.CustomerTaxIDTypeTwVat

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeUaVat = shared.CustomerTaxIDTypeUaVat

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeUsEin = shared.CustomerTaxIDTypeUsEin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeUyRuc = shared.CustomerTaxIDTypeUyRuc

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeVeRif = shared.CustomerTaxIDTypeVeRif

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeVnTin = shared.CustomerTaxIDTypeVnTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeZaVat = shared.CustomerTaxIDTypeZaVat

This is an alias to an internal value.

View Source
const DiscountDiscountTypeAmount = shared.DiscountDiscountTypeAmount

This is an alias to an internal value.

View Source
const DiscountDiscountTypePercentage = shared.DiscountDiscountTypePercentage

This is an alias to an internal value.

View Source
const DiscountDiscountTypeTrial = shared.DiscountDiscountTypeTrial

This is an alias to an internal value.

View Source
const DiscountDiscountTypeUsage = shared.DiscountDiscountTypeUsage

This is an alias to an internal value.

View Source
const ErrorStatus400 = apierror.ErrorStatus400
View Source
const ErrorStatus401 = apierror.ErrorStatus401
View Source
const ErrorStatus404 = apierror.ErrorStatus404
View Source
const ErrorStatus409 = apierror.ErrorStatus409
View Source
const ErrorStatus413 = apierror.ErrorStatus413
View Source
const ErrorStatus429 = apierror.ErrorStatus429
View Source
const ErrorStatus500 = apierror.ErrorStatus500
View Source
const ErrorTypeConstraintViolation = apierror.ErrorTypeConstraintViolation
View Source
const ErrorTypeDuplicateResourceCreation = apierror.ErrorTypeDuplicateResourceCreation
View Source
const ErrorTypeFeatureNotAvailable = apierror.ErrorTypeFeatureNotAvailable
View Source
const ErrorTypeOrbAuthenticationError = apierror.ErrorTypeOrbAuthenticationError
View Source
const ErrorTypeOrbInternalServerError = apierror.ErrorTypeOrbInternalServerError
View Source
const ErrorTypeRequestTooLarge = apierror.ErrorTypeRequestTooLarge
View Source
const ErrorTypeRequestValidationError = apierror.ErrorTypeRequestValidationError
View Source
const ErrorTypeResourceConflict = apierror.ErrorTypeResourceConflict
View Source
const ErrorTypeResourceNotFound = apierror.ErrorTypeResourceNotFound
View Source
const ErrorTypeResourceTooLarge = apierror.ErrorTypeResourceTooLarge
View Source
const ErrorTypeTooManyRequests = apierror.ErrorTypeTooManyRequests
View Source
const ErrorTypeURLNotFound = apierror.ErrorTypeURLNotFound
View Source
const InvoiceCustomerBalanceTransactionsActionAppliedToInvoice = shared.InvoiceCustomerBalanceTransactionsActionAppliedToInvoice

This is an alias to an internal value.

View Source
const InvoiceCustomerBalanceTransactionsActionCreditNoteApplied = shared.InvoiceCustomerBalanceTransactionsActionCreditNoteApplied

This is an alias to an internal value.

View Source
const InvoiceCustomerBalanceTransactionsActionCreditNoteVoided = shared.InvoiceCustomerBalanceTransactionsActionCreditNoteVoided

This is an alias to an internal value.

View Source
const InvoiceCustomerBalanceTransactionsActionExternalPayment = shared.InvoiceCustomerBalanceTransactionsActionExternalPayment

This is an alias to an internal value.

View Source
const InvoiceCustomerBalanceTransactionsActionManualAdjustment = shared.InvoiceCustomerBalanceTransactionsActionManualAdjustment

This is an alias to an internal value.

View Source
const InvoiceCustomerBalanceTransactionsActionOverpaymentRefund = shared.InvoiceCustomerBalanceTransactionsActionOverpaymentRefund

This is an alias to an internal value.

View Source
const InvoiceCustomerBalanceTransactionsActionProratedRefund = shared.InvoiceCustomerBalanceTransactionsActionProratedRefund

This is an alias to an internal value.

View Source
const InvoiceCustomerBalanceTransactionsActionReturnFromVoiding = shared.InvoiceCustomerBalanceTransactionsActionReturnFromVoiding

This is an alias to an internal value.

View Source
const InvoiceCustomerBalanceTransactionsActionRevertProratedRefund = shared.InvoiceCustomerBalanceTransactionsActionRevertProratedRefund

This is an alias to an internal value.

View Source
const InvoiceCustomerBalanceTransactionsTypeDecrement = shared.InvoiceCustomerBalanceTransactionsTypeDecrement

This is an alias to an internal value.

View Source
const InvoiceCustomerBalanceTransactionsTypeIncrement = shared.InvoiceCustomerBalanceTransactionsTypeIncrement

This is an alias to an internal value.

View Source
const InvoiceInvoiceSourceOneOff = shared.InvoiceInvoiceSourceOneOff

This is an alias to an internal value.

View Source
const InvoiceInvoiceSourcePartial = shared.InvoiceInvoiceSourcePartial

This is an alias to an internal value.

View Source
const InvoiceInvoiceSourceSubscription = shared.InvoiceInvoiceSourceSubscription

This is an alias to an internal value.

View Source
const InvoiceLevelDiscountDiscountTypeAmount = shared.InvoiceLevelDiscountDiscountTypeAmount

This is an alias to an internal value.

View Source
const InvoiceLevelDiscountDiscountTypePercentage = shared.InvoiceLevelDiscountDiscountTypePercentage

This is an alias to an internal value.

View Source
const InvoiceLevelDiscountDiscountTypeTrial = shared.InvoiceLevelDiscountDiscountTypeTrial

This is an alias to an internal value.

View Source
const InvoiceLineItemsAdjustmentsAdjustmentTypeAmountDiscount = shared.InvoiceLineItemsAdjustmentsAdjustmentTypeAmountDiscount

This is an alias to an internal value.

View Source
const InvoiceLineItemsAdjustmentsAdjustmentTypeMaximum = shared.InvoiceLineItemsAdjustmentsAdjustmentTypeMaximum

This is an alias to an internal value.

View Source
const InvoiceLineItemsAdjustmentsAdjustmentTypeMinimum = shared.InvoiceLineItemsAdjustmentsAdjustmentTypeMinimum

This is an alias to an internal value.

View Source
const InvoiceLineItemsAdjustmentsAdjustmentTypePercentageDiscount = shared.InvoiceLineItemsAdjustmentsAdjustmentTypePercentageDiscount

This is an alias to an internal value.

View Source
const InvoiceLineItemsAdjustmentsAdjustmentTypeUsageDiscount = shared.InvoiceLineItemsAdjustmentsAdjustmentTypeUsageDiscount

This is an alias to an internal value.

View Source
const InvoiceLineItemsSubLineItemsTypeMatrix = shared.InvoiceLineItemsSubLineItemsTypeMatrix

This is an alias to an internal value.

View Source
const InvoiceLineItemsSubLineItemsTypeNull = shared.InvoiceLineItemsSubLineItemsTypeNull

This is an alias to an internal value.

View Source
const InvoiceLineItemsSubLineItemsTypeTier = shared.InvoiceLineItemsSubLineItemsTypeTier

This is an alias to an internal value.

View Source
const InvoicePaymentAttemptsPaymentProviderStripe = shared.InvoicePaymentAttemptsPaymentProviderStripe

This is an alias to an internal value.

View Source
const InvoiceStatusDraft = shared.InvoiceStatusDraft

This is an alias to an internal value.

View Source
const InvoiceStatusIssued = shared.InvoiceStatusIssued

This is an alias to an internal value.

View Source
const InvoiceStatusPaid = shared.InvoiceStatusPaid

This is an alias to an internal value.

View Source
const InvoiceStatusSynced = shared.InvoiceStatusSynced

This is an alias to an internal value.

View Source
const InvoiceStatusVoid = shared.InvoiceStatusVoid

This is an alias to an internal value.

View Source
const MatrixSubLineItemTypeMatrix = shared.MatrixSubLineItemTypeMatrix

This is an alias to an internal value.

View Source
const MonetaryAmountDiscountAdjustmentAdjustmentTypeAmountDiscount = shared.MonetaryAmountDiscountAdjustmentAdjustmentTypeAmountDiscount

This is an alias to an internal value.

View Source
const MonetaryMaximumAdjustmentAdjustmentTypeMaximum = shared.MonetaryMaximumAdjustmentAdjustmentTypeMaximum

This is an alias to an internal value.

View Source
const MonetaryMinimumAdjustmentAdjustmentTypeMinimum = shared.MonetaryMinimumAdjustmentAdjustmentTypeMinimum

This is an alias to an internal value.

View Source
const MonetaryPercentageDiscountAdjustmentAdjustmentTypePercentageDiscount = shared.MonetaryPercentageDiscountAdjustmentAdjustmentTypePercentageDiscount

This is an alias to an internal value.

View Source
const MonetaryUsageDiscountAdjustmentAdjustmentTypeUsageDiscount = shared.MonetaryUsageDiscountAdjustmentAdjustmentTypeUsageDiscount

This is an alias to an internal value.

View Source
const NewAllocationPriceCadenceAnnual = shared.NewAllocationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewAllocationPriceCadenceCustom = shared.NewAllocationPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewAllocationPriceCadenceMonthly = shared.NewAllocationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewAllocationPriceCadenceOneTime = shared.NewAllocationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewAllocationPriceCadenceQuarterly = shared.NewAllocationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewAllocationPriceCadenceSemiAnnual = shared.NewAllocationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewAmountDiscountAdjustmentTypeAmountDiscount = shared.NewAmountDiscountAdjustmentTypeAmountDiscount

This is an alias to an internal value.

View Source
const NewAmountDiscountAppliesToAllTrue = shared.NewAmountDiscountAppliesToAllTrue

This is an alias to an internal value.

View Source
const NewAmountDiscountPriceTypeFixed = shared.NewAmountDiscountPriceTypeFixed

This is an alias to an internal value.

View Source
const NewAmountDiscountPriceTypeFixedInAdvance = shared.NewAmountDiscountPriceTypeFixedInAdvance

This is an alias to an internal value.

View Source
const NewAmountDiscountPriceTypeFixedInArrears = shared.NewAmountDiscountPriceTypeFixedInArrears

This is an alias to an internal value.

View Source
const NewAmountDiscountPriceTypeInArrears = shared.NewAmountDiscountPriceTypeInArrears

This is an alias to an internal value.

View Source
const NewAmountDiscountPriceTypeUsage = shared.NewAmountDiscountPriceTypeUsage

This is an alias to an internal value.

View Source
const NewBillingCycleConfigurationDurationUnitDay = shared.NewBillingCycleConfigurationDurationUnitDay

This is an alias to an internal value.

View Source
const NewBillingCycleConfigurationDurationUnitMonth = shared.NewBillingCycleConfigurationDurationUnitMonth

This is an alias to an internal value.

View Source
const NewFloatingBPSPriceCadenceAnnual = shared.NewFloatingBPSPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingBPSPriceCadenceCustom = shared.NewFloatingBPSPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingBPSPriceCadenceMonthly = shared.NewFloatingBPSPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingBPSPriceCadenceOneTime = shared.NewFloatingBPSPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingBPSPriceCadenceQuarterly = shared.NewFloatingBPSPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingBPSPriceCadenceSemiAnnual = shared.NewFloatingBPSPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingBPSPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingBPSPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingBPSPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingBPSPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingBPSPriceModelTypeBPS = shared.NewFloatingBPSPriceModelTypeBPS

This is an alias to an internal value.

View Source
const NewFloatingBulkBPSPriceCadenceAnnual = shared.NewFloatingBulkBPSPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingBulkBPSPriceCadenceCustom = shared.NewFloatingBulkBPSPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingBulkBPSPriceCadenceMonthly = shared.NewFloatingBulkBPSPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingBulkBPSPriceCadenceOneTime = shared.NewFloatingBulkBPSPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingBulkBPSPriceCadenceQuarterly = shared.NewFloatingBulkBPSPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingBulkBPSPriceCadenceSemiAnnual = shared.NewFloatingBulkBPSPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingBulkBPSPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingBulkBPSPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingBulkBPSPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingBulkBPSPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingBulkBPSPriceModelTypeBulkBPS = shared.NewFloatingBulkBPSPriceModelTypeBulkBPS

This is an alias to an internal value.

View Source
const NewFloatingBulkPriceCadenceAnnual = shared.NewFloatingBulkPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingBulkPriceCadenceCustom = shared.NewFloatingBulkPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingBulkPriceCadenceMonthly = shared.NewFloatingBulkPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingBulkPriceCadenceOneTime = shared.NewFloatingBulkPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingBulkPriceCadenceQuarterly = shared.NewFloatingBulkPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingBulkPriceCadenceSemiAnnual = shared.NewFloatingBulkPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingBulkPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingBulkPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingBulkPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingBulkPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingBulkPriceModelTypeBulk = shared.NewFloatingBulkPriceModelTypeBulk

This is an alias to an internal value.

View Source
const NewFloatingBulkWithProrationPriceCadenceAnnual = shared.NewFloatingBulkWithProrationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingBulkWithProrationPriceCadenceCustom = shared.NewFloatingBulkWithProrationPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingBulkWithProrationPriceCadenceMonthly = shared.NewFloatingBulkWithProrationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingBulkWithProrationPriceCadenceOneTime = shared.NewFloatingBulkWithProrationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingBulkWithProrationPriceCadenceQuarterly = shared.NewFloatingBulkWithProrationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingBulkWithProrationPriceCadenceSemiAnnual = shared.NewFloatingBulkWithProrationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingBulkWithProrationPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingBulkWithProrationPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingBulkWithProrationPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingBulkWithProrationPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingBulkWithProrationPriceModelTypeBulkWithProration = shared.NewFloatingBulkWithProrationPriceModelTypeBulkWithProration

This is an alias to an internal value.

View Source
const NewFloatingCumulativeGroupedBulkPriceCadenceAnnual = shared.NewFloatingCumulativeGroupedBulkPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingCumulativeGroupedBulkPriceCadenceCustom = shared.NewFloatingCumulativeGroupedBulkPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingCumulativeGroupedBulkPriceCadenceMonthly = shared.NewFloatingCumulativeGroupedBulkPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingCumulativeGroupedBulkPriceCadenceOneTime = shared.NewFloatingCumulativeGroupedBulkPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingCumulativeGroupedBulkPriceCadenceQuarterly = shared.NewFloatingCumulativeGroupedBulkPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingCumulativeGroupedBulkPriceCadenceSemiAnnual = shared.NewFloatingCumulativeGroupedBulkPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingCumulativeGroupedBulkPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingCumulativeGroupedBulkPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingCumulativeGroupedBulkPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingCumulativeGroupedBulkPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingCumulativeGroupedBulkPriceModelTypeCumulativeGroupedBulk = shared.NewFloatingCumulativeGroupedBulkPriceModelTypeCumulativeGroupedBulk

This is an alias to an internal value.

View Source
const NewFloatingGroupedAllocationPriceCadenceAnnual = shared.NewFloatingGroupedAllocationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingGroupedAllocationPriceCadenceCustom = shared.NewFloatingGroupedAllocationPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingGroupedAllocationPriceCadenceMonthly = shared.NewFloatingGroupedAllocationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingGroupedAllocationPriceCadenceOneTime = shared.NewFloatingGroupedAllocationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingGroupedAllocationPriceCadenceQuarterly = shared.NewFloatingGroupedAllocationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingGroupedAllocationPriceCadenceSemiAnnual = shared.NewFloatingGroupedAllocationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingGroupedAllocationPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingGroupedAllocationPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingGroupedAllocationPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingGroupedAllocationPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingGroupedAllocationPriceModelTypeGroupedAllocation = shared.NewFloatingGroupedAllocationPriceModelTypeGroupedAllocation

This is an alias to an internal value.

View Source
const NewFloatingGroupedTieredPackagePriceCadenceAnnual = shared.NewFloatingGroupedTieredPackagePriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingGroupedTieredPackagePriceCadenceCustom = shared.NewFloatingGroupedTieredPackagePriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingGroupedTieredPackagePriceCadenceMonthly = shared.NewFloatingGroupedTieredPackagePriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingGroupedTieredPackagePriceCadenceOneTime = shared.NewFloatingGroupedTieredPackagePriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingGroupedTieredPackagePriceCadenceQuarterly = shared.NewFloatingGroupedTieredPackagePriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingGroupedTieredPackagePriceCadenceSemiAnnual = shared.NewFloatingGroupedTieredPackagePriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingGroupedTieredPackagePriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingGroupedTieredPackagePriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingGroupedTieredPackagePriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingGroupedTieredPackagePriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingGroupedTieredPackagePriceModelTypeGroupedTieredPackage = shared.NewFloatingGroupedTieredPackagePriceModelTypeGroupedTieredPackage

This is an alias to an internal value.

View Source
const NewFloatingGroupedTieredPriceCadenceAnnual = shared.NewFloatingGroupedTieredPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingGroupedTieredPriceCadenceCustom = shared.NewFloatingGroupedTieredPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingGroupedTieredPriceCadenceMonthly = shared.NewFloatingGroupedTieredPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingGroupedTieredPriceCadenceOneTime = shared.NewFloatingGroupedTieredPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingGroupedTieredPriceCadenceQuarterly = shared.NewFloatingGroupedTieredPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingGroupedTieredPriceCadenceSemiAnnual = shared.NewFloatingGroupedTieredPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingGroupedTieredPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingGroupedTieredPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingGroupedTieredPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingGroupedTieredPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingGroupedTieredPriceModelTypeGroupedTiered = shared.NewFloatingGroupedTieredPriceModelTypeGroupedTiered

This is an alias to an internal value.

View Source
const NewFloatingGroupedWithMeteredMinimumPriceCadenceAnnual = shared.NewFloatingGroupedWithMeteredMinimumPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingGroupedWithMeteredMinimumPriceCadenceCustom = shared.NewFloatingGroupedWithMeteredMinimumPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingGroupedWithMeteredMinimumPriceCadenceMonthly = shared.NewFloatingGroupedWithMeteredMinimumPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingGroupedWithMeteredMinimumPriceCadenceOneTime = shared.NewFloatingGroupedWithMeteredMinimumPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingGroupedWithMeteredMinimumPriceCadenceQuarterly = shared.NewFloatingGroupedWithMeteredMinimumPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingGroupedWithMeteredMinimumPriceCadenceSemiAnnual = shared.NewFloatingGroupedWithMeteredMinimumPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingGroupedWithMeteredMinimumPriceModelTypeGroupedWithMeteredMinimum = shared.NewFloatingGroupedWithMeteredMinimumPriceModelTypeGroupedWithMeteredMinimum

This is an alias to an internal value.

View Source
const NewFloatingGroupedWithProratedMinimumPriceCadenceAnnual = shared.NewFloatingGroupedWithProratedMinimumPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingGroupedWithProratedMinimumPriceCadenceCustom = shared.NewFloatingGroupedWithProratedMinimumPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingGroupedWithProratedMinimumPriceCadenceMonthly = shared.NewFloatingGroupedWithProratedMinimumPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingGroupedWithProratedMinimumPriceCadenceOneTime = shared.NewFloatingGroupedWithProratedMinimumPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingGroupedWithProratedMinimumPriceCadenceQuarterly = shared.NewFloatingGroupedWithProratedMinimumPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingGroupedWithProratedMinimumPriceCadenceSemiAnnual = shared.NewFloatingGroupedWithProratedMinimumPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingGroupedWithProratedMinimumPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingGroupedWithProratedMinimumPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingGroupedWithProratedMinimumPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingGroupedWithProratedMinimumPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingGroupedWithProratedMinimumPriceModelTypeGroupedWithProratedMinimum = shared.NewFloatingGroupedWithProratedMinimumPriceModelTypeGroupedWithProratedMinimum

This is an alias to an internal value.

View Source
const NewFloatingMatrixPriceCadenceAnnual = shared.NewFloatingMatrixPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingMatrixPriceCadenceCustom = shared.NewFloatingMatrixPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingMatrixPriceCadenceMonthly = shared.NewFloatingMatrixPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingMatrixPriceCadenceOneTime = shared.NewFloatingMatrixPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingMatrixPriceCadenceQuarterly = shared.NewFloatingMatrixPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingMatrixPriceCadenceSemiAnnual = shared.NewFloatingMatrixPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingMatrixPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingMatrixPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingMatrixPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingMatrixPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingMatrixPriceModelTypeMatrix = shared.NewFloatingMatrixPriceModelTypeMatrix

This is an alias to an internal value.

View Source
const NewFloatingMatrixWithAllocationPriceCadenceAnnual = shared.NewFloatingMatrixWithAllocationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingMatrixWithAllocationPriceCadenceCustom = shared.NewFloatingMatrixWithAllocationPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingMatrixWithAllocationPriceCadenceMonthly = shared.NewFloatingMatrixWithAllocationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingMatrixWithAllocationPriceCadenceOneTime = shared.NewFloatingMatrixWithAllocationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingMatrixWithAllocationPriceCadenceQuarterly = shared.NewFloatingMatrixWithAllocationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingMatrixWithAllocationPriceCadenceSemiAnnual = shared.NewFloatingMatrixWithAllocationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingMatrixWithAllocationPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingMatrixWithAllocationPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingMatrixWithAllocationPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingMatrixWithAllocationPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingMatrixWithAllocationPriceModelTypeMatrixWithAllocation = shared.NewFloatingMatrixWithAllocationPriceModelTypeMatrixWithAllocation

This is an alias to an internal value.

View Source
const NewFloatingMatrixWithDisplayNamePriceCadenceAnnual = shared.NewFloatingMatrixWithDisplayNamePriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingMatrixWithDisplayNamePriceCadenceCustom = shared.NewFloatingMatrixWithDisplayNamePriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingMatrixWithDisplayNamePriceCadenceMonthly = shared.NewFloatingMatrixWithDisplayNamePriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingMatrixWithDisplayNamePriceCadenceOneTime = shared.NewFloatingMatrixWithDisplayNamePriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingMatrixWithDisplayNamePriceCadenceQuarterly = shared.NewFloatingMatrixWithDisplayNamePriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingMatrixWithDisplayNamePriceCadenceSemiAnnual = shared.NewFloatingMatrixWithDisplayNamePriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingMatrixWithDisplayNamePriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingMatrixWithDisplayNamePriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingMatrixWithDisplayNamePriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingMatrixWithDisplayNamePriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingMatrixWithDisplayNamePriceModelTypeMatrixWithDisplayName = shared.NewFloatingMatrixWithDisplayNamePriceModelTypeMatrixWithDisplayName

This is an alias to an internal value.

View Source
const NewFloatingMaxGroupTieredPackagePriceCadenceAnnual = shared.NewFloatingMaxGroupTieredPackagePriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingMaxGroupTieredPackagePriceCadenceCustom = shared.NewFloatingMaxGroupTieredPackagePriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingMaxGroupTieredPackagePriceCadenceMonthly = shared.NewFloatingMaxGroupTieredPackagePriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingMaxGroupTieredPackagePriceCadenceOneTime = shared.NewFloatingMaxGroupTieredPackagePriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingMaxGroupTieredPackagePriceCadenceQuarterly = shared.NewFloatingMaxGroupTieredPackagePriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingMaxGroupTieredPackagePriceCadenceSemiAnnual = shared.NewFloatingMaxGroupTieredPackagePriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingMaxGroupTieredPackagePriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingMaxGroupTieredPackagePriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingMaxGroupTieredPackagePriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingMaxGroupTieredPackagePriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingMaxGroupTieredPackagePriceModelTypeMaxGroupTieredPackage = shared.NewFloatingMaxGroupTieredPackagePriceModelTypeMaxGroupTieredPackage

This is an alias to an internal value.

View Source
const NewFloatingPackagePriceCadenceAnnual = shared.NewFloatingPackagePriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingPackagePriceCadenceCustom = shared.NewFloatingPackagePriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingPackagePriceCadenceMonthly = shared.NewFloatingPackagePriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingPackagePriceCadenceOneTime = shared.NewFloatingPackagePriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingPackagePriceCadenceQuarterly = shared.NewFloatingPackagePriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingPackagePriceCadenceSemiAnnual = shared.NewFloatingPackagePriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingPackagePriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingPackagePriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingPackagePriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingPackagePriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingPackagePriceModelTypePackage = shared.NewFloatingPackagePriceModelTypePackage

This is an alias to an internal value.

View Source
const NewFloatingPackageWithAllocationPriceCadenceAnnual = shared.NewFloatingPackageWithAllocationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingPackageWithAllocationPriceCadenceCustom = shared.NewFloatingPackageWithAllocationPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingPackageWithAllocationPriceCadenceMonthly = shared.NewFloatingPackageWithAllocationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingPackageWithAllocationPriceCadenceOneTime = shared.NewFloatingPackageWithAllocationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingPackageWithAllocationPriceCadenceQuarterly = shared.NewFloatingPackageWithAllocationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingPackageWithAllocationPriceCadenceSemiAnnual = shared.NewFloatingPackageWithAllocationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingPackageWithAllocationPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingPackageWithAllocationPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingPackageWithAllocationPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingPackageWithAllocationPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingPackageWithAllocationPriceModelTypePackageWithAllocation = shared.NewFloatingPackageWithAllocationPriceModelTypePackageWithAllocation

This is an alias to an internal value.

View Source
const NewFloatingScalableMatrixWithTieredPricingPriceCadenceAnnual = shared.NewFloatingScalableMatrixWithTieredPricingPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingScalableMatrixWithTieredPricingPriceCadenceCustom = shared.NewFloatingScalableMatrixWithTieredPricingPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingScalableMatrixWithTieredPricingPriceCadenceMonthly = shared.NewFloatingScalableMatrixWithTieredPricingPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingScalableMatrixWithTieredPricingPriceCadenceOneTime = shared.NewFloatingScalableMatrixWithTieredPricingPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingScalableMatrixWithTieredPricingPriceCadenceQuarterly = shared.NewFloatingScalableMatrixWithTieredPricingPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingScalableMatrixWithTieredPricingPriceCadenceSemiAnnual = shared.NewFloatingScalableMatrixWithTieredPricingPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingScalableMatrixWithTieredPricingPriceModelTypeScalableMatrixWithTieredPricing = shared.NewFloatingScalableMatrixWithTieredPricingPriceModelTypeScalableMatrixWithTieredPricing

This is an alias to an internal value.

View Source
const NewFloatingScalableMatrixWithUnitPricingPriceCadenceAnnual = shared.NewFloatingScalableMatrixWithUnitPricingPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingScalableMatrixWithUnitPricingPriceCadenceCustom = shared.NewFloatingScalableMatrixWithUnitPricingPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingScalableMatrixWithUnitPricingPriceCadenceMonthly = shared.NewFloatingScalableMatrixWithUnitPricingPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingScalableMatrixWithUnitPricingPriceCadenceOneTime = shared.NewFloatingScalableMatrixWithUnitPricingPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingScalableMatrixWithUnitPricingPriceCadenceQuarterly = shared.NewFloatingScalableMatrixWithUnitPricingPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingScalableMatrixWithUnitPricingPriceCadenceSemiAnnual = shared.NewFloatingScalableMatrixWithUnitPricingPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingScalableMatrixWithUnitPricingPriceModelTypeScalableMatrixWithUnitPricing = shared.NewFloatingScalableMatrixWithUnitPricingPriceModelTypeScalableMatrixWithUnitPricing

This is an alias to an internal value.

View Source
const NewFloatingThresholdTotalAmountPriceCadenceAnnual = shared.NewFloatingThresholdTotalAmountPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingThresholdTotalAmountPriceCadenceCustom = shared.NewFloatingThresholdTotalAmountPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingThresholdTotalAmountPriceCadenceMonthly = shared.NewFloatingThresholdTotalAmountPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingThresholdTotalAmountPriceCadenceOneTime = shared.NewFloatingThresholdTotalAmountPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingThresholdTotalAmountPriceCadenceQuarterly = shared.NewFloatingThresholdTotalAmountPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingThresholdTotalAmountPriceCadenceSemiAnnual = shared.NewFloatingThresholdTotalAmountPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingThresholdTotalAmountPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingThresholdTotalAmountPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingThresholdTotalAmountPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingThresholdTotalAmountPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingThresholdTotalAmountPriceModelTypeThresholdTotalAmount = shared.NewFloatingThresholdTotalAmountPriceModelTypeThresholdTotalAmount

This is an alias to an internal value.

View Source
const NewFloatingTieredBPSPriceCadenceAnnual = shared.NewFloatingTieredBPSPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingTieredBPSPriceCadenceCustom = shared.NewFloatingTieredBPSPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingTieredBPSPriceCadenceMonthly = shared.NewFloatingTieredBPSPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingTieredBPSPriceCadenceOneTime = shared.NewFloatingTieredBPSPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingTieredBPSPriceCadenceQuarterly = shared.NewFloatingTieredBPSPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingTieredBPSPriceCadenceSemiAnnual = shared.NewFloatingTieredBPSPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingTieredBPSPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingTieredBPSPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingTieredBPSPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingTieredBPSPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingTieredBPSPriceModelTypeTieredBPS = shared.NewFloatingTieredBPSPriceModelTypeTieredBPS

This is an alias to an internal value.

View Source
const NewFloatingTieredPackagePriceCadenceAnnual = shared.NewFloatingTieredPackagePriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingTieredPackagePriceCadenceCustom = shared.NewFloatingTieredPackagePriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingTieredPackagePriceCadenceMonthly = shared.NewFloatingTieredPackagePriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingTieredPackagePriceCadenceOneTime = shared.NewFloatingTieredPackagePriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingTieredPackagePriceCadenceQuarterly = shared.NewFloatingTieredPackagePriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingTieredPackagePriceCadenceSemiAnnual = shared.NewFloatingTieredPackagePriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingTieredPackagePriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingTieredPackagePriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingTieredPackagePriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingTieredPackagePriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingTieredPackagePriceModelTypeTieredPackage = shared.NewFloatingTieredPackagePriceModelTypeTieredPackage

This is an alias to an internal value.

View Source
const NewFloatingTieredPackageWithMinimumPriceCadenceAnnual = shared.NewFloatingTieredPackageWithMinimumPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingTieredPackageWithMinimumPriceCadenceCustom = shared.NewFloatingTieredPackageWithMinimumPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingTieredPackageWithMinimumPriceCadenceMonthly = shared.NewFloatingTieredPackageWithMinimumPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingTieredPackageWithMinimumPriceCadenceOneTime = shared.NewFloatingTieredPackageWithMinimumPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingTieredPackageWithMinimumPriceCadenceQuarterly = shared.NewFloatingTieredPackageWithMinimumPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingTieredPackageWithMinimumPriceCadenceSemiAnnual = shared.NewFloatingTieredPackageWithMinimumPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingTieredPackageWithMinimumPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingTieredPackageWithMinimumPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingTieredPackageWithMinimumPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingTieredPackageWithMinimumPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingTieredPackageWithMinimumPriceModelTypeTieredPackageWithMinimum = shared.NewFloatingTieredPackageWithMinimumPriceModelTypeTieredPackageWithMinimum

This is an alias to an internal value.

View Source
const NewFloatingTieredPriceCadenceAnnual = shared.NewFloatingTieredPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingTieredPriceCadenceCustom = shared.NewFloatingTieredPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingTieredPriceCadenceMonthly = shared.NewFloatingTieredPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingTieredPriceCadenceOneTime = shared.NewFloatingTieredPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingTieredPriceCadenceQuarterly = shared.NewFloatingTieredPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingTieredPriceCadenceSemiAnnual = shared.NewFloatingTieredPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingTieredPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingTieredPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingTieredPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingTieredPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingTieredPriceModelTypeTiered = shared.NewFloatingTieredPriceModelTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingTieredWithMinimumPriceCadenceAnnual = shared.NewFloatingTieredWithMinimumPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingTieredWithMinimumPriceCadenceCustom = shared.NewFloatingTieredWithMinimumPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingTieredWithMinimumPriceCadenceMonthly = shared.NewFloatingTieredWithMinimumPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingTieredWithMinimumPriceCadenceOneTime = shared.NewFloatingTieredWithMinimumPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingTieredWithMinimumPriceCadenceQuarterly = shared.NewFloatingTieredWithMinimumPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingTieredWithMinimumPriceCadenceSemiAnnual = shared.NewFloatingTieredWithMinimumPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingTieredWithMinimumPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingTieredWithMinimumPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingTieredWithMinimumPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingTieredWithMinimumPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingTieredWithMinimumPriceModelTypeTieredWithMinimum = shared.NewFloatingTieredWithMinimumPriceModelTypeTieredWithMinimum

This is an alias to an internal value.

View Source
const NewFloatingTieredWithProrationPriceCadenceAnnual = shared.NewFloatingTieredWithProrationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingTieredWithProrationPriceCadenceCustom = shared.NewFloatingTieredWithProrationPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingTieredWithProrationPriceCadenceMonthly = shared.NewFloatingTieredWithProrationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingTieredWithProrationPriceCadenceOneTime = shared.NewFloatingTieredWithProrationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingTieredWithProrationPriceCadenceQuarterly = shared.NewFloatingTieredWithProrationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingTieredWithProrationPriceCadenceSemiAnnual = shared.NewFloatingTieredWithProrationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingTieredWithProrationPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingTieredWithProrationPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingTieredWithProrationPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingTieredWithProrationPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingTieredWithProrationPriceModelTypeTieredWithProration = shared.NewFloatingTieredWithProrationPriceModelTypeTieredWithProration

This is an alias to an internal value.

View Source
const NewFloatingUnitPriceCadenceAnnual = shared.NewFloatingUnitPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingUnitPriceCadenceCustom = shared.NewFloatingUnitPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingUnitPriceCadenceMonthly = shared.NewFloatingUnitPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingUnitPriceCadenceOneTime = shared.NewFloatingUnitPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingUnitPriceCadenceQuarterly = shared.NewFloatingUnitPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingUnitPriceCadenceSemiAnnual = shared.NewFloatingUnitPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingUnitPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingUnitPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingUnitPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingUnitPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingUnitPriceModelTypeUnit = shared.NewFloatingUnitPriceModelTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingUnitWithPercentPriceCadenceAnnual = shared.NewFloatingUnitWithPercentPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingUnitWithPercentPriceCadenceCustom = shared.NewFloatingUnitWithPercentPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingUnitWithPercentPriceCadenceMonthly = shared.NewFloatingUnitWithPercentPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingUnitWithPercentPriceCadenceOneTime = shared.NewFloatingUnitWithPercentPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingUnitWithPercentPriceCadenceQuarterly = shared.NewFloatingUnitWithPercentPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingUnitWithPercentPriceCadenceSemiAnnual = shared.NewFloatingUnitWithPercentPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingUnitWithPercentPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingUnitWithPercentPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingUnitWithPercentPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingUnitWithPercentPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingUnitWithPercentPriceModelTypeUnitWithPercent = shared.NewFloatingUnitWithPercentPriceModelTypeUnitWithPercent

This is an alias to an internal value.

View Source
const NewFloatingUnitWithProrationPriceCadenceAnnual = shared.NewFloatingUnitWithProrationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingUnitWithProrationPriceCadenceCustom = shared.NewFloatingUnitWithProrationPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingUnitWithProrationPriceCadenceMonthly = shared.NewFloatingUnitWithProrationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingUnitWithProrationPriceCadenceOneTime = shared.NewFloatingUnitWithProrationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingUnitWithProrationPriceCadenceQuarterly = shared.NewFloatingUnitWithProrationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingUnitWithProrationPriceCadenceSemiAnnual = shared.NewFloatingUnitWithProrationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingUnitWithProrationPriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingUnitWithProrationPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingUnitWithProrationPriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingUnitWithProrationPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingUnitWithProrationPriceModelTypeUnitWithProration = shared.NewFloatingUnitWithProrationPriceModelTypeUnitWithProration

This is an alias to an internal value.

View Source
const NewMaximumAdjustmentTypeMaximum = shared.NewMaximumAdjustmentTypeMaximum

This is an alias to an internal value.

View Source
const NewMaximumAppliesToAllTrue = shared.NewMaximumAppliesToAllTrue

This is an alias to an internal value.

View Source
const NewMaximumPriceTypeFixed = shared.NewMaximumPriceTypeFixed

This is an alias to an internal value.

View Source
const NewMaximumPriceTypeFixedInAdvance = shared.NewMaximumPriceTypeFixedInAdvance

This is an alias to an internal value.

View Source
const NewMaximumPriceTypeFixedInArrears = shared.NewMaximumPriceTypeFixedInArrears

This is an alias to an internal value.

View Source
const NewMaximumPriceTypeInArrears = shared.NewMaximumPriceTypeInArrears

This is an alias to an internal value.

View Source
const NewMaximumPriceTypeUsage = shared.NewMaximumPriceTypeUsage

This is an alias to an internal value.

View Source
const NewMinimumAdjustmentTypeMinimum = shared.NewMinimumAdjustmentTypeMinimum

This is an alias to an internal value.

View Source
const NewMinimumAppliesToAllTrue = shared.NewMinimumAppliesToAllTrue

This is an alias to an internal value.

View Source
const NewMinimumPriceTypeFixed = shared.NewMinimumPriceTypeFixed

This is an alias to an internal value.

View Source
const NewMinimumPriceTypeFixedInAdvance = shared.NewMinimumPriceTypeFixedInAdvance

This is an alias to an internal value.

View Source
const NewMinimumPriceTypeFixedInArrears = shared.NewMinimumPriceTypeFixedInArrears

This is an alias to an internal value.

View Source
const NewMinimumPriceTypeInArrears = shared.NewMinimumPriceTypeInArrears

This is an alias to an internal value.

View Source
const NewMinimumPriceTypeUsage = shared.NewMinimumPriceTypeUsage

This is an alias to an internal value.

View Source
const NewPercentageDiscountAdjustmentTypePercentageDiscount = shared.NewPercentageDiscountAdjustmentTypePercentageDiscount

This is an alias to an internal value.

View Source
const NewPercentageDiscountAppliesToAllTrue = shared.NewPercentageDiscountAppliesToAllTrue

This is an alias to an internal value.

View Source
const NewPercentageDiscountPriceTypeFixed = shared.NewPercentageDiscountPriceTypeFixed

This is an alias to an internal value.

View Source
const NewPercentageDiscountPriceTypeFixedInAdvance = shared.NewPercentageDiscountPriceTypeFixedInAdvance

This is an alias to an internal value.

View Source
const NewPercentageDiscountPriceTypeFixedInArrears = shared.NewPercentageDiscountPriceTypeFixedInArrears

This is an alias to an internal value.

View Source
const NewPercentageDiscountPriceTypeInArrears = shared.NewPercentageDiscountPriceTypeInArrears

This is an alias to an internal value.

View Source
const NewPercentageDiscountPriceTypeUsage = shared.NewPercentageDiscountPriceTypeUsage

This is an alias to an internal value.

View Source
const NewPlanBPSPriceCadenceAnnual = shared.NewPlanBPSPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanBPSPriceCadenceCustom = shared.NewPlanBPSPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanBPSPriceCadenceMonthly = shared.NewPlanBPSPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanBPSPriceCadenceOneTime = shared.NewPlanBPSPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanBPSPriceCadenceQuarterly = shared.NewPlanBPSPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanBPSPriceCadenceSemiAnnual = shared.NewPlanBPSPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanBPSPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanBPSPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanBPSPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanBPSPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanBPSPriceModelTypeBPS = shared.NewPlanBPSPriceModelTypeBPS

This is an alias to an internal value.

View Source
const NewPlanBulkBPSPriceCadenceAnnual = shared.NewPlanBulkBPSPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanBulkBPSPriceCadenceCustom = shared.NewPlanBulkBPSPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanBulkBPSPriceCadenceMonthly = shared.NewPlanBulkBPSPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanBulkBPSPriceCadenceOneTime = shared.NewPlanBulkBPSPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanBulkBPSPriceCadenceQuarterly = shared.NewPlanBulkBPSPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanBulkBPSPriceCadenceSemiAnnual = shared.NewPlanBulkBPSPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanBulkBPSPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanBulkBPSPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanBulkBPSPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanBulkBPSPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanBulkBPSPriceModelTypeBulkBPS = shared.NewPlanBulkBPSPriceModelTypeBulkBPS

This is an alias to an internal value.

View Source
const NewPlanBulkPriceCadenceAnnual = shared.NewPlanBulkPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanBulkPriceCadenceCustom = shared.NewPlanBulkPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanBulkPriceCadenceMonthly = shared.NewPlanBulkPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanBulkPriceCadenceOneTime = shared.NewPlanBulkPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanBulkPriceCadenceQuarterly = shared.NewPlanBulkPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanBulkPriceCadenceSemiAnnual = shared.NewPlanBulkPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanBulkPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanBulkPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanBulkPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanBulkPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanBulkPriceModelTypeBulk = shared.NewPlanBulkPriceModelTypeBulk

This is an alias to an internal value.

View Source
const NewPlanBulkWithProrationPriceCadenceAnnual = shared.NewPlanBulkWithProrationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanBulkWithProrationPriceCadenceCustom = shared.NewPlanBulkWithProrationPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanBulkWithProrationPriceCadenceMonthly = shared.NewPlanBulkWithProrationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanBulkWithProrationPriceCadenceOneTime = shared.NewPlanBulkWithProrationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanBulkWithProrationPriceCadenceQuarterly = shared.NewPlanBulkWithProrationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanBulkWithProrationPriceCadenceSemiAnnual = shared.NewPlanBulkWithProrationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanBulkWithProrationPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanBulkWithProrationPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanBulkWithProrationPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanBulkWithProrationPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanBulkWithProrationPriceModelTypeBulkWithProration = shared.NewPlanBulkWithProrationPriceModelTypeBulkWithProration

This is an alias to an internal value.

View Source
const NewPlanCumulativeGroupedBulkPriceCadenceAnnual = shared.NewPlanCumulativeGroupedBulkPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanCumulativeGroupedBulkPriceCadenceCustom = shared.NewPlanCumulativeGroupedBulkPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanCumulativeGroupedBulkPriceCadenceMonthly = shared.NewPlanCumulativeGroupedBulkPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanCumulativeGroupedBulkPriceCadenceOneTime = shared.NewPlanCumulativeGroupedBulkPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanCumulativeGroupedBulkPriceCadenceQuarterly = shared.NewPlanCumulativeGroupedBulkPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanCumulativeGroupedBulkPriceCadenceSemiAnnual = shared.NewPlanCumulativeGroupedBulkPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanCumulativeGroupedBulkPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanCumulativeGroupedBulkPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanCumulativeGroupedBulkPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanCumulativeGroupedBulkPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanCumulativeGroupedBulkPriceModelTypeCumulativeGroupedBulk = shared.NewPlanCumulativeGroupedBulkPriceModelTypeCumulativeGroupedBulk

This is an alias to an internal value.

View Source
const NewPlanGroupedAllocationPriceCadenceAnnual = shared.NewPlanGroupedAllocationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanGroupedAllocationPriceCadenceCustom = shared.NewPlanGroupedAllocationPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanGroupedAllocationPriceCadenceMonthly = shared.NewPlanGroupedAllocationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanGroupedAllocationPriceCadenceOneTime = shared.NewPlanGroupedAllocationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanGroupedAllocationPriceCadenceQuarterly = shared.NewPlanGroupedAllocationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanGroupedAllocationPriceCadenceSemiAnnual = shared.NewPlanGroupedAllocationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanGroupedAllocationPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanGroupedAllocationPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanGroupedAllocationPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanGroupedAllocationPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanGroupedAllocationPriceModelTypeGroupedAllocation = shared.NewPlanGroupedAllocationPriceModelTypeGroupedAllocation

This is an alias to an internal value.

View Source
const NewPlanGroupedTieredPackagePriceCadenceAnnual = shared.NewPlanGroupedTieredPackagePriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanGroupedTieredPackagePriceCadenceCustom = shared.NewPlanGroupedTieredPackagePriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanGroupedTieredPackagePriceCadenceMonthly = shared.NewPlanGroupedTieredPackagePriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanGroupedTieredPackagePriceCadenceOneTime = shared.NewPlanGroupedTieredPackagePriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanGroupedTieredPackagePriceCadenceQuarterly = shared.NewPlanGroupedTieredPackagePriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanGroupedTieredPackagePriceCadenceSemiAnnual = shared.NewPlanGroupedTieredPackagePriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanGroupedTieredPackagePriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanGroupedTieredPackagePriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanGroupedTieredPackagePriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanGroupedTieredPackagePriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanGroupedTieredPackagePriceModelTypeGroupedTieredPackage = shared.NewPlanGroupedTieredPackagePriceModelTypeGroupedTieredPackage

This is an alias to an internal value.

View Source
const NewPlanGroupedTieredPriceCadenceAnnual = shared.NewPlanGroupedTieredPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanGroupedTieredPriceCadenceCustom = shared.NewPlanGroupedTieredPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanGroupedTieredPriceCadenceMonthly = shared.NewPlanGroupedTieredPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanGroupedTieredPriceCadenceOneTime = shared.NewPlanGroupedTieredPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanGroupedTieredPriceCadenceQuarterly = shared.NewPlanGroupedTieredPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanGroupedTieredPriceCadenceSemiAnnual = shared.NewPlanGroupedTieredPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanGroupedTieredPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanGroupedTieredPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanGroupedTieredPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanGroupedTieredPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanGroupedTieredPriceModelTypeGroupedTiered = shared.NewPlanGroupedTieredPriceModelTypeGroupedTiered

This is an alias to an internal value.

View Source
const NewPlanGroupedWithMeteredMinimumPriceCadenceAnnual = shared.NewPlanGroupedWithMeteredMinimumPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanGroupedWithMeteredMinimumPriceCadenceCustom = shared.NewPlanGroupedWithMeteredMinimumPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanGroupedWithMeteredMinimumPriceCadenceMonthly = shared.NewPlanGroupedWithMeteredMinimumPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanGroupedWithMeteredMinimumPriceCadenceOneTime = shared.NewPlanGroupedWithMeteredMinimumPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanGroupedWithMeteredMinimumPriceCadenceQuarterly = shared.NewPlanGroupedWithMeteredMinimumPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanGroupedWithMeteredMinimumPriceCadenceSemiAnnual = shared.NewPlanGroupedWithMeteredMinimumPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanGroupedWithMeteredMinimumPriceModelTypeGroupedWithMeteredMinimum = shared.NewPlanGroupedWithMeteredMinimumPriceModelTypeGroupedWithMeteredMinimum

This is an alias to an internal value.

View Source
const NewPlanGroupedWithProratedMinimumPriceCadenceAnnual = shared.NewPlanGroupedWithProratedMinimumPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanGroupedWithProratedMinimumPriceCadenceCustom = shared.NewPlanGroupedWithProratedMinimumPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanGroupedWithProratedMinimumPriceCadenceMonthly = shared.NewPlanGroupedWithProratedMinimumPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanGroupedWithProratedMinimumPriceCadenceOneTime = shared.NewPlanGroupedWithProratedMinimumPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanGroupedWithProratedMinimumPriceCadenceQuarterly = shared.NewPlanGroupedWithProratedMinimumPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanGroupedWithProratedMinimumPriceCadenceSemiAnnual = shared.NewPlanGroupedWithProratedMinimumPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanGroupedWithProratedMinimumPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanGroupedWithProratedMinimumPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanGroupedWithProratedMinimumPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanGroupedWithProratedMinimumPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanGroupedWithProratedMinimumPriceModelTypeGroupedWithProratedMinimum = shared.NewPlanGroupedWithProratedMinimumPriceModelTypeGroupedWithProratedMinimum

This is an alias to an internal value.

View Source
const NewPlanMatrixPriceCadenceAnnual = shared.NewPlanMatrixPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanMatrixPriceCadenceCustom = shared.NewPlanMatrixPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanMatrixPriceCadenceMonthly = shared.NewPlanMatrixPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanMatrixPriceCadenceOneTime = shared.NewPlanMatrixPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanMatrixPriceCadenceQuarterly = shared.NewPlanMatrixPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanMatrixPriceCadenceSemiAnnual = shared.NewPlanMatrixPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanMatrixPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanMatrixPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanMatrixPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanMatrixPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanMatrixPriceModelTypeMatrix = shared.NewPlanMatrixPriceModelTypeMatrix

This is an alias to an internal value.

View Source
const NewPlanMatrixWithAllocationPriceCadenceAnnual = shared.NewPlanMatrixWithAllocationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanMatrixWithAllocationPriceCadenceCustom = shared.NewPlanMatrixWithAllocationPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanMatrixWithAllocationPriceCadenceMonthly = shared.NewPlanMatrixWithAllocationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanMatrixWithAllocationPriceCadenceOneTime = shared.NewPlanMatrixWithAllocationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanMatrixWithAllocationPriceCadenceQuarterly = shared.NewPlanMatrixWithAllocationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanMatrixWithAllocationPriceCadenceSemiAnnual = shared.NewPlanMatrixWithAllocationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanMatrixWithAllocationPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanMatrixWithAllocationPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanMatrixWithAllocationPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanMatrixWithAllocationPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanMatrixWithAllocationPriceModelTypeMatrixWithAllocation = shared.NewPlanMatrixWithAllocationPriceModelTypeMatrixWithAllocation

This is an alias to an internal value.

View Source
const NewPlanMatrixWithDisplayNamePriceCadenceAnnual = shared.NewPlanMatrixWithDisplayNamePriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanMatrixWithDisplayNamePriceCadenceCustom = shared.NewPlanMatrixWithDisplayNamePriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanMatrixWithDisplayNamePriceCadenceMonthly = shared.NewPlanMatrixWithDisplayNamePriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanMatrixWithDisplayNamePriceCadenceOneTime = shared.NewPlanMatrixWithDisplayNamePriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanMatrixWithDisplayNamePriceCadenceQuarterly = shared.NewPlanMatrixWithDisplayNamePriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanMatrixWithDisplayNamePriceCadenceSemiAnnual = shared.NewPlanMatrixWithDisplayNamePriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanMatrixWithDisplayNamePriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanMatrixWithDisplayNamePriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanMatrixWithDisplayNamePriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanMatrixWithDisplayNamePriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanMatrixWithDisplayNamePriceModelTypeMatrixWithDisplayName = shared.NewPlanMatrixWithDisplayNamePriceModelTypeMatrixWithDisplayName

This is an alias to an internal value.

View Source
const NewPlanMaxGroupTieredPackagePriceCadenceAnnual = shared.NewPlanMaxGroupTieredPackagePriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanMaxGroupTieredPackagePriceCadenceCustom = shared.NewPlanMaxGroupTieredPackagePriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanMaxGroupTieredPackagePriceCadenceMonthly = shared.NewPlanMaxGroupTieredPackagePriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanMaxGroupTieredPackagePriceCadenceOneTime = shared.NewPlanMaxGroupTieredPackagePriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanMaxGroupTieredPackagePriceCadenceQuarterly = shared.NewPlanMaxGroupTieredPackagePriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanMaxGroupTieredPackagePriceCadenceSemiAnnual = shared.NewPlanMaxGroupTieredPackagePriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanMaxGroupTieredPackagePriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanMaxGroupTieredPackagePriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanMaxGroupTieredPackagePriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanMaxGroupTieredPackagePriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanMaxGroupTieredPackagePriceModelTypeMaxGroupTieredPackage = shared.NewPlanMaxGroupTieredPackagePriceModelTypeMaxGroupTieredPackage

This is an alias to an internal value.

View Source
const NewPlanPackagePriceCadenceAnnual = shared.NewPlanPackagePriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanPackagePriceCadenceCustom = shared.NewPlanPackagePriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanPackagePriceCadenceMonthly = shared.NewPlanPackagePriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanPackagePriceCadenceOneTime = shared.NewPlanPackagePriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanPackagePriceCadenceQuarterly = shared.NewPlanPackagePriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanPackagePriceCadenceSemiAnnual = shared.NewPlanPackagePriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanPackagePriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanPackagePriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanPackagePriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanPackagePriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanPackagePriceModelTypePackage = shared.NewPlanPackagePriceModelTypePackage

This is an alias to an internal value.

View Source
const NewPlanPackageWithAllocationPriceCadenceAnnual = shared.NewPlanPackageWithAllocationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanPackageWithAllocationPriceCadenceCustom = shared.NewPlanPackageWithAllocationPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanPackageWithAllocationPriceCadenceMonthly = shared.NewPlanPackageWithAllocationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanPackageWithAllocationPriceCadenceOneTime = shared.NewPlanPackageWithAllocationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanPackageWithAllocationPriceCadenceQuarterly = shared.NewPlanPackageWithAllocationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanPackageWithAllocationPriceCadenceSemiAnnual = shared.NewPlanPackageWithAllocationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanPackageWithAllocationPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanPackageWithAllocationPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanPackageWithAllocationPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanPackageWithAllocationPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanPackageWithAllocationPriceModelTypePackageWithAllocation = shared.NewPlanPackageWithAllocationPriceModelTypePackageWithAllocation

This is an alias to an internal value.

View Source
const NewPlanScalableMatrixWithTieredPricingPriceCadenceAnnual = shared.NewPlanScalableMatrixWithTieredPricingPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanScalableMatrixWithTieredPricingPriceCadenceCustom = shared.NewPlanScalableMatrixWithTieredPricingPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanScalableMatrixWithTieredPricingPriceCadenceMonthly = shared.NewPlanScalableMatrixWithTieredPricingPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanScalableMatrixWithTieredPricingPriceCadenceOneTime = shared.NewPlanScalableMatrixWithTieredPricingPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanScalableMatrixWithTieredPricingPriceCadenceQuarterly = shared.NewPlanScalableMatrixWithTieredPricingPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanScalableMatrixWithTieredPricingPriceCadenceSemiAnnual = shared.NewPlanScalableMatrixWithTieredPricingPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanScalableMatrixWithTieredPricingPriceModelTypeScalableMatrixWithTieredPricing = shared.NewPlanScalableMatrixWithTieredPricingPriceModelTypeScalableMatrixWithTieredPricing

This is an alias to an internal value.

View Source
const NewPlanScalableMatrixWithUnitPricingPriceCadenceAnnual = shared.NewPlanScalableMatrixWithUnitPricingPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanScalableMatrixWithUnitPricingPriceCadenceCustom = shared.NewPlanScalableMatrixWithUnitPricingPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanScalableMatrixWithUnitPricingPriceCadenceMonthly = shared.NewPlanScalableMatrixWithUnitPricingPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanScalableMatrixWithUnitPricingPriceCadenceOneTime = shared.NewPlanScalableMatrixWithUnitPricingPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanScalableMatrixWithUnitPricingPriceCadenceQuarterly = shared.NewPlanScalableMatrixWithUnitPricingPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanScalableMatrixWithUnitPricingPriceCadenceSemiAnnual = shared.NewPlanScalableMatrixWithUnitPricingPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanScalableMatrixWithUnitPricingPriceModelTypeScalableMatrixWithUnitPricing = shared.NewPlanScalableMatrixWithUnitPricingPriceModelTypeScalableMatrixWithUnitPricing

This is an alias to an internal value.

View Source
const NewPlanThresholdTotalAmountPriceCadenceAnnual = shared.NewPlanThresholdTotalAmountPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanThresholdTotalAmountPriceCadenceCustom = shared.NewPlanThresholdTotalAmountPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanThresholdTotalAmountPriceCadenceMonthly = shared.NewPlanThresholdTotalAmountPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanThresholdTotalAmountPriceCadenceOneTime = shared.NewPlanThresholdTotalAmountPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanThresholdTotalAmountPriceCadenceQuarterly = shared.NewPlanThresholdTotalAmountPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanThresholdTotalAmountPriceCadenceSemiAnnual = shared.NewPlanThresholdTotalAmountPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanThresholdTotalAmountPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanThresholdTotalAmountPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanThresholdTotalAmountPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanThresholdTotalAmountPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanThresholdTotalAmountPriceModelTypeThresholdTotalAmount = shared.NewPlanThresholdTotalAmountPriceModelTypeThresholdTotalAmount

This is an alias to an internal value.

View Source
const NewPlanTierWithProrationPriceCadenceAnnual = shared.NewPlanTierWithProrationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanTierWithProrationPriceCadenceCustom = shared.NewPlanTierWithProrationPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanTierWithProrationPriceCadenceMonthly = shared.NewPlanTierWithProrationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanTierWithProrationPriceCadenceOneTime = shared.NewPlanTierWithProrationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanTierWithProrationPriceCadenceQuarterly = shared.NewPlanTierWithProrationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanTierWithProrationPriceCadenceSemiAnnual = shared.NewPlanTierWithProrationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanTierWithProrationPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanTierWithProrationPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanTierWithProrationPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanTierWithProrationPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanTierWithProrationPriceModelTypeTieredWithProration = shared.NewPlanTierWithProrationPriceModelTypeTieredWithProration

This is an alias to an internal value.

View Source
const NewPlanTieredBPSPriceCadenceAnnual = shared.NewPlanTieredBPSPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanTieredBPSPriceCadenceCustom = shared.NewPlanTieredBPSPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanTieredBPSPriceCadenceMonthly = shared.NewPlanTieredBPSPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanTieredBPSPriceCadenceOneTime = shared.NewPlanTieredBPSPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanTieredBPSPriceCadenceQuarterly = shared.NewPlanTieredBPSPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanTieredBPSPriceCadenceSemiAnnual = shared.NewPlanTieredBPSPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanTieredBPSPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanTieredBPSPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanTieredBPSPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanTieredBPSPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanTieredBPSPriceModelTypeTieredBPS = shared.NewPlanTieredBPSPriceModelTypeTieredBPS

This is an alias to an internal value.

View Source
const NewPlanTieredPackagePriceCadenceAnnual = shared.NewPlanTieredPackagePriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanTieredPackagePriceCadenceCustom = shared.NewPlanTieredPackagePriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanTieredPackagePriceCadenceMonthly = shared.NewPlanTieredPackagePriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanTieredPackagePriceCadenceOneTime = shared.NewPlanTieredPackagePriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanTieredPackagePriceCadenceQuarterly = shared.NewPlanTieredPackagePriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanTieredPackagePriceCadenceSemiAnnual = shared.NewPlanTieredPackagePriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanTieredPackagePriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanTieredPackagePriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanTieredPackagePriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanTieredPackagePriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanTieredPackagePriceModelTypeTieredPackage = shared.NewPlanTieredPackagePriceModelTypeTieredPackage

This is an alias to an internal value.

View Source
const NewPlanTieredPackageWithMinimumPriceCadenceAnnual = shared.NewPlanTieredPackageWithMinimumPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanTieredPackageWithMinimumPriceCadenceCustom = shared.NewPlanTieredPackageWithMinimumPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanTieredPackageWithMinimumPriceCadenceMonthly = shared.NewPlanTieredPackageWithMinimumPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanTieredPackageWithMinimumPriceCadenceOneTime = shared.NewPlanTieredPackageWithMinimumPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanTieredPackageWithMinimumPriceCadenceQuarterly = shared.NewPlanTieredPackageWithMinimumPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanTieredPackageWithMinimumPriceCadenceSemiAnnual = shared.NewPlanTieredPackageWithMinimumPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanTieredPackageWithMinimumPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanTieredPackageWithMinimumPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanTieredPackageWithMinimumPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanTieredPackageWithMinimumPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanTieredPackageWithMinimumPriceModelTypeTieredPackageWithMinimum = shared.NewPlanTieredPackageWithMinimumPriceModelTypeTieredPackageWithMinimum

This is an alias to an internal value.

View Source
const NewPlanTieredPriceCadenceAnnual = shared.NewPlanTieredPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanTieredPriceCadenceCustom = shared.NewPlanTieredPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanTieredPriceCadenceMonthly = shared.NewPlanTieredPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanTieredPriceCadenceOneTime = shared.NewPlanTieredPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanTieredPriceCadenceQuarterly = shared.NewPlanTieredPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanTieredPriceCadenceSemiAnnual = shared.NewPlanTieredPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanTieredPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanTieredPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanTieredPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanTieredPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanTieredPriceModelTypeTiered = shared.NewPlanTieredPriceModelTypeTiered

This is an alias to an internal value.

View Source
const NewPlanTieredWithMinimumPriceCadenceAnnual = shared.NewPlanTieredWithMinimumPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanTieredWithMinimumPriceCadenceCustom = shared.NewPlanTieredWithMinimumPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanTieredWithMinimumPriceCadenceMonthly = shared.NewPlanTieredWithMinimumPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanTieredWithMinimumPriceCadenceOneTime = shared.NewPlanTieredWithMinimumPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanTieredWithMinimumPriceCadenceQuarterly = shared.NewPlanTieredWithMinimumPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanTieredWithMinimumPriceCadenceSemiAnnual = shared.NewPlanTieredWithMinimumPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanTieredWithMinimumPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanTieredWithMinimumPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanTieredWithMinimumPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanTieredWithMinimumPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanTieredWithMinimumPriceModelTypeTieredWithMinimum = shared.NewPlanTieredWithMinimumPriceModelTypeTieredWithMinimum

This is an alias to an internal value.

View Source
const NewPlanUnitPriceCadenceAnnual = shared.NewPlanUnitPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanUnitPriceCadenceCustom = shared.NewPlanUnitPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanUnitPriceCadenceMonthly = shared.NewPlanUnitPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanUnitPriceCadenceOneTime = shared.NewPlanUnitPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanUnitPriceCadenceQuarterly = shared.NewPlanUnitPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanUnitPriceCadenceSemiAnnual = shared.NewPlanUnitPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanUnitPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanUnitPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanUnitPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanUnitPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanUnitPriceModelTypeUnit = shared.NewPlanUnitPriceModelTypeUnit

This is an alias to an internal value.

View Source
const NewPlanUnitWithPercentPriceCadenceAnnual = shared.NewPlanUnitWithPercentPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanUnitWithPercentPriceCadenceCustom = shared.NewPlanUnitWithPercentPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanUnitWithPercentPriceCadenceMonthly = shared.NewPlanUnitWithPercentPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanUnitWithPercentPriceCadenceOneTime = shared.NewPlanUnitWithPercentPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanUnitWithPercentPriceCadenceQuarterly = shared.NewPlanUnitWithPercentPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanUnitWithPercentPriceCadenceSemiAnnual = shared.NewPlanUnitWithPercentPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanUnitWithPercentPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanUnitWithPercentPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanUnitWithPercentPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanUnitWithPercentPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanUnitWithPercentPriceModelTypeUnitWithPercent = shared.NewPlanUnitWithPercentPriceModelTypeUnitWithPercent

This is an alias to an internal value.

View Source
const NewPlanUnitWithProrationPriceCadenceAnnual = shared.NewPlanUnitWithProrationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanUnitWithProrationPriceCadenceCustom = shared.NewPlanUnitWithProrationPriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanUnitWithProrationPriceCadenceMonthly = shared.NewPlanUnitWithProrationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanUnitWithProrationPriceCadenceOneTime = shared.NewPlanUnitWithProrationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanUnitWithProrationPriceCadenceQuarterly = shared.NewPlanUnitWithProrationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanUnitWithProrationPriceCadenceSemiAnnual = shared.NewPlanUnitWithProrationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanUnitWithProrationPriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanUnitWithProrationPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanUnitWithProrationPriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanUnitWithProrationPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanUnitWithProrationPriceModelTypeUnitWithProration = shared.NewPlanUnitWithProrationPriceModelTypeUnitWithProration

This is an alias to an internal value.

View Source
const NewUsageDiscountAdjustmentTypeUsageDiscount = shared.NewUsageDiscountAdjustmentTypeUsageDiscount

This is an alias to an internal value.

View Source
const NewUsageDiscountAppliesToAllTrue = shared.NewUsageDiscountAppliesToAllTrue

This is an alias to an internal value.

View Source
const NewUsageDiscountPriceTypeFixed = shared.NewUsageDiscountPriceTypeFixed

This is an alias to an internal value.

View Source
const NewUsageDiscountPriceTypeFixedInAdvance = shared.NewUsageDiscountPriceTypeFixedInAdvance

This is an alias to an internal value.

View Source
const NewUsageDiscountPriceTypeFixedInArrears = shared.NewUsageDiscountPriceTypeFixedInArrears

This is an alias to an internal value.

View Source
const NewUsageDiscountPriceTypeInArrears = shared.NewUsageDiscountPriceTypeInArrears

This is an alias to an internal value.

View Source
const NewUsageDiscountPriceTypeUsage = shared.NewUsageDiscountPriceTypeUsage

This is an alias to an internal value.

View Source
const OtherSubLineItemTypeNull = shared.OtherSubLineItemTypeNull

This is an alias to an internal value.

View Source
const PercentageDiscountDiscountTypePercentage = shared.PercentageDiscountDiscountTypePercentage

This is an alias to an internal value.

View Source
const PercentageDiscountIntervalDiscountTypePercentage = shared.PercentageDiscountIntervalDiscountTypePercentage

This is an alias to an internal value.

View Source
const PlanPhaseAmountDiscountAdjustmentAdjustmentTypeAmountDiscount = shared.PlanPhaseAmountDiscountAdjustmentAdjustmentTypeAmountDiscount

This is an alias to an internal value.

View Source
const PlanPhaseMaximumAdjustmentAdjustmentTypeMaximum = shared.PlanPhaseMaximumAdjustmentAdjustmentTypeMaximum

This is an alias to an internal value.

View Source
const PlanPhaseMinimumAdjustmentAdjustmentTypeMinimum = shared.PlanPhaseMinimumAdjustmentAdjustmentTypeMinimum

This is an alias to an internal value.

View Source
const PlanPhasePercentageDiscountAdjustmentAdjustmentTypePercentageDiscount = shared.PlanPhasePercentageDiscountAdjustmentAdjustmentTypePercentageDiscount

This is an alias to an internal value.

View Source
const PlanPhaseUsageDiscountAdjustmentAdjustmentTypeUsageDiscount = shared.PlanPhaseUsageDiscountAdjustmentAdjustmentTypeUsageDiscount

This is an alias to an internal value.

View Source
const PriceBPSPriceCadenceAnnual = shared.PriceBPSPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceBPSPriceCadenceCustom = shared.PriceBPSPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceBPSPriceCadenceMonthly = shared.PriceBPSPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceBPSPriceCadenceOneTime = shared.PriceBPSPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceBPSPriceCadenceQuarterly = shared.PriceBPSPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceBPSPriceCadenceSemiAnnual = shared.PriceBPSPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceBPSPriceConversionRateConfigConversionRateTypeTiered = shared.PriceBPSPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceBPSPriceConversionRateConfigConversionRateTypeUnit = shared.PriceBPSPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceBPSPriceModelTypeBPS = shared.PriceBPSPriceModelTypeBPS

This is an alias to an internal value.

View Source
const PriceBPSPricePriceTypeFixedPrice = shared.PriceBPSPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceBPSPricePriceTypeUsagePrice = shared.PriceBPSPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceBulkBPSPriceCadenceAnnual = shared.PriceBulkBPSPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceBulkBPSPriceCadenceCustom = shared.PriceBulkBPSPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceBulkBPSPriceCadenceMonthly = shared.PriceBulkBPSPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceBulkBPSPriceCadenceOneTime = shared.PriceBulkBPSPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceBulkBPSPriceCadenceQuarterly = shared.PriceBulkBPSPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceBulkBPSPriceCadenceSemiAnnual = shared.PriceBulkBPSPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceBulkBPSPriceConversionRateConfigConversionRateTypeTiered = shared.PriceBulkBPSPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceBulkBPSPriceConversionRateConfigConversionRateTypeUnit = shared.PriceBulkBPSPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceBulkBPSPriceModelTypeBulkBPS = shared.PriceBulkBPSPriceModelTypeBulkBPS

This is an alias to an internal value.

View Source
const PriceBulkBPSPricePriceTypeFixedPrice = shared.PriceBulkBPSPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceBulkBPSPricePriceTypeUsagePrice = shared.PriceBulkBPSPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceBulkPriceCadenceAnnual = shared.PriceBulkPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceBulkPriceCadenceCustom = shared.PriceBulkPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceBulkPriceCadenceMonthly = shared.PriceBulkPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceBulkPriceCadenceOneTime = shared.PriceBulkPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceBulkPriceCadenceQuarterly = shared.PriceBulkPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceBulkPriceCadenceSemiAnnual = shared.PriceBulkPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceBulkPriceConversionRateConfigConversionRateTypeTiered = shared.PriceBulkPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceBulkPriceConversionRateConfigConversionRateTypeUnit = shared.PriceBulkPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceBulkPriceModelTypeBulk = shared.PriceBulkPriceModelTypeBulk

This is an alias to an internal value.

View Source
const PriceBulkPricePriceTypeFixedPrice = shared.PriceBulkPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceBulkPricePriceTypeUsagePrice = shared.PriceBulkPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceBulkWithProrationPriceCadenceAnnual = shared.PriceBulkWithProrationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceBulkWithProrationPriceCadenceCustom = shared.PriceBulkWithProrationPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceBulkWithProrationPriceCadenceMonthly = shared.PriceBulkWithProrationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceBulkWithProrationPriceCadenceOneTime = shared.PriceBulkWithProrationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceBulkWithProrationPriceCadenceQuarterly = shared.PriceBulkWithProrationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceBulkWithProrationPriceCadenceSemiAnnual = shared.PriceBulkWithProrationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceBulkWithProrationPriceConversionRateConfigConversionRateTypeTiered = shared.PriceBulkWithProrationPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceBulkWithProrationPriceConversionRateConfigConversionRateTypeUnit = shared.PriceBulkWithProrationPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceBulkWithProrationPriceModelTypeBulkWithProration = shared.PriceBulkWithProrationPriceModelTypeBulkWithProration

This is an alias to an internal value.

View Source
const PriceBulkWithProrationPricePriceTypeFixedPrice = shared.PriceBulkWithProrationPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceBulkWithProrationPricePriceTypeUsagePrice = shared.PriceBulkWithProrationPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceCadenceAnnual = shared.PriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceCadenceCustom = shared.PriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceCadenceMonthly = shared.PriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceCadenceOneTime = shared.PriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceCadenceQuarterly = shared.PriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceCadenceSemiAnnual = shared.PriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceCumulativeGroupedBulkPriceCadenceAnnual = shared.PriceCumulativeGroupedBulkPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceCumulativeGroupedBulkPriceCadenceCustom = shared.PriceCumulativeGroupedBulkPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceCumulativeGroupedBulkPriceCadenceMonthly = shared.PriceCumulativeGroupedBulkPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceCumulativeGroupedBulkPriceCadenceOneTime = shared.PriceCumulativeGroupedBulkPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceCumulativeGroupedBulkPriceCadenceQuarterly = shared.PriceCumulativeGroupedBulkPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceCumulativeGroupedBulkPriceCadenceSemiAnnual = shared.PriceCumulativeGroupedBulkPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceCumulativeGroupedBulkPriceConversionRateConfigConversionRateTypeTiered = shared.PriceCumulativeGroupedBulkPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceCumulativeGroupedBulkPriceConversionRateConfigConversionRateTypeUnit = shared.PriceCumulativeGroupedBulkPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceCumulativeGroupedBulkPriceModelTypeCumulativeGroupedBulk = shared.PriceCumulativeGroupedBulkPriceModelTypeCumulativeGroupedBulk

This is an alias to an internal value.

View Source
const PriceCumulativeGroupedBulkPricePriceTypeFixedPrice = shared.PriceCumulativeGroupedBulkPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceCumulativeGroupedBulkPricePriceTypeUsagePrice = shared.PriceCumulativeGroupedBulkPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceGroupedAllocationPriceCadenceAnnual = shared.PriceGroupedAllocationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceGroupedAllocationPriceCadenceCustom = shared.PriceGroupedAllocationPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceGroupedAllocationPriceCadenceMonthly = shared.PriceGroupedAllocationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceGroupedAllocationPriceCadenceOneTime = shared.PriceGroupedAllocationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceGroupedAllocationPriceCadenceQuarterly = shared.PriceGroupedAllocationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceGroupedAllocationPriceCadenceSemiAnnual = shared.PriceGroupedAllocationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceGroupedAllocationPriceConversionRateConfigConversionRateTypeTiered = shared.PriceGroupedAllocationPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceGroupedAllocationPriceConversionRateConfigConversionRateTypeUnit = shared.PriceGroupedAllocationPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceGroupedAllocationPriceModelTypeGroupedAllocation = shared.PriceGroupedAllocationPriceModelTypeGroupedAllocation

This is an alias to an internal value.

View Source
const PriceGroupedAllocationPricePriceTypeFixedPrice = shared.PriceGroupedAllocationPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceGroupedAllocationPricePriceTypeUsagePrice = shared.PriceGroupedAllocationPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceGroupedTieredPackagePriceCadenceAnnual = shared.PriceGroupedTieredPackagePriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceGroupedTieredPackagePriceCadenceCustom = shared.PriceGroupedTieredPackagePriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceGroupedTieredPackagePriceCadenceMonthly = shared.PriceGroupedTieredPackagePriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceGroupedTieredPackagePriceCadenceOneTime = shared.PriceGroupedTieredPackagePriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceGroupedTieredPackagePriceCadenceQuarterly = shared.PriceGroupedTieredPackagePriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceGroupedTieredPackagePriceCadenceSemiAnnual = shared.PriceGroupedTieredPackagePriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceGroupedTieredPackagePriceConversionRateConfigConversionRateTypeTiered = shared.PriceGroupedTieredPackagePriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceGroupedTieredPackagePriceConversionRateConfigConversionRateTypeUnit = shared.PriceGroupedTieredPackagePriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceGroupedTieredPackagePriceModelTypeGroupedTieredPackage = shared.PriceGroupedTieredPackagePriceModelTypeGroupedTieredPackage

This is an alias to an internal value.

View Source
const PriceGroupedTieredPackagePricePriceTypeFixedPrice = shared.PriceGroupedTieredPackagePricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceGroupedTieredPackagePricePriceTypeUsagePrice = shared.PriceGroupedTieredPackagePricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceGroupedTieredPriceCadenceAnnual = shared.PriceGroupedTieredPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceGroupedTieredPriceCadenceCustom = shared.PriceGroupedTieredPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceGroupedTieredPriceCadenceMonthly = shared.PriceGroupedTieredPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceGroupedTieredPriceCadenceOneTime = shared.PriceGroupedTieredPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceGroupedTieredPriceCadenceQuarterly = shared.PriceGroupedTieredPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceGroupedTieredPriceCadenceSemiAnnual = shared.PriceGroupedTieredPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceGroupedTieredPriceConversionRateConfigConversionRateTypeTiered = shared.PriceGroupedTieredPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceGroupedTieredPriceConversionRateConfigConversionRateTypeUnit = shared.PriceGroupedTieredPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceGroupedTieredPriceModelTypeGroupedTiered = shared.PriceGroupedTieredPriceModelTypeGroupedTiered

This is an alias to an internal value.

View Source
const PriceGroupedTieredPricePriceTypeFixedPrice = shared.PriceGroupedTieredPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceGroupedTieredPricePriceTypeUsagePrice = shared.PriceGroupedTieredPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceGroupedWithMeteredMinimumPriceCadenceAnnual = shared.PriceGroupedWithMeteredMinimumPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceGroupedWithMeteredMinimumPriceCadenceCustom = shared.PriceGroupedWithMeteredMinimumPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceGroupedWithMeteredMinimumPriceCadenceMonthly = shared.PriceGroupedWithMeteredMinimumPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceGroupedWithMeteredMinimumPriceCadenceOneTime = shared.PriceGroupedWithMeteredMinimumPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceGroupedWithMeteredMinimumPriceCadenceQuarterly = shared.PriceGroupedWithMeteredMinimumPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceGroupedWithMeteredMinimumPriceCadenceSemiAnnual = shared.PriceGroupedWithMeteredMinimumPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateTypeTiered = shared.PriceGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateTypeUnit = shared.PriceGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceGroupedWithMeteredMinimumPriceModelTypeGroupedWithMeteredMinimum = shared.PriceGroupedWithMeteredMinimumPriceModelTypeGroupedWithMeteredMinimum

This is an alias to an internal value.

View Source
const PriceGroupedWithMeteredMinimumPricePriceTypeFixedPrice = shared.PriceGroupedWithMeteredMinimumPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceGroupedWithMeteredMinimumPricePriceTypeUsagePrice = shared.PriceGroupedWithMeteredMinimumPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceGroupedWithProratedMinimumPriceCadenceAnnual = shared.PriceGroupedWithProratedMinimumPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceGroupedWithProratedMinimumPriceCadenceCustom = shared.PriceGroupedWithProratedMinimumPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceGroupedWithProratedMinimumPriceCadenceMonthly = shared.PriceGroupedWithProratedMinimumPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceGroupedWithProratedMinimumPriceCadenceOneTime = shared.PriceGroupedWithProratedMinimumPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceGroupedWithProratedMinimumPriceCadenceQuarterly = shared.PriceGroupedWithProratedMinimumPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceGroupedWithProratedMinimumPriceCadenceSemiAnnual = shared.PriceGroupedWithProratedMinimumPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceGroupedWithProratedMinimumPriceConversionRateConfigConversionRateTypeTiered = shared.PriceGroupedWithProratedMinimumPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceGroupedWithProratedMinimumPriceConversionRateConfigConversionRateTypeUnit = shared.PriceGroupedWithProratedMinimumPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceGroupedWithProratedMinimumPriceModelTypeGroupedWithProratedMinimum = shared.PriceGroupedWithProratedMinimumPriceModelTypeGroupedWithProratedMinimum

This is an alias to an internal value.

View Source
const PriceGroupedWithProratedMinimumPricePriceTypeFixedPrice = shared.PriceGroupedWithProratedMinimumPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceGroupedWithProratedMinimumPricePriceTypeUsagePrice = shared.PriceGroupedWithProratedMinimumPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceMatrixPriceCadenceAnnual = shared.PriceMatrixPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceMatrixPriceCadenceCustom = shared.PriceMatrixPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceMatrixPriceCadenceMonthly = shared.PriceMatrixPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceMatrixPriceCadenceOneTime = shared.PriceMatrixPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceMatrixPriceCadenceQuarterly = shared.PriceMatrixPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceMatrixPriceCadenceSemiAnnual = shared.PriceMatrixPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceMatrixPriceConversionRateConfigConversionRateTypeTiered = shared.PriceMatrixPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceMatrixPriceConversionRateConfigConversionRateTypeUnit = shared.PriceMatrixPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceMatrixPriceModelTypeMatrix = shared.PriceMatrixPriceModelTypeMatrix

This is an alias to an internal value.

View Source
const PriceMatrixPricePriceTypeFixedPrice = shared.PriceMatrixPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceMatrixPricePriceTypeUsagePrice = shared.PriceMatrixPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceMatrixWithAllocationPriceCadenceAnnual = shared.PriceMatrixWithAllocationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceMatrixWithAllocationPriceCadenceCustom = shared.PriceMatrixWithAllocationPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceMatrixWithAllocationPriceCadenceMonthly = shared.PriceMatrixWithAllocationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceMatrixWithAllocationPriceCadenceOneTime = shared.PriceMatrixWithAllocationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceMatrixWithAllocationPriceCadenceQuarterly = shared.PriceMatrixWithAllocationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceMatrixWithAllocationPriceCadenceSemiAnnual = shared.PriceMatrixWithAllocationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceMatrixWithAllocationPriceConversionRateConfigConversionRateTypeTiered = shared.PriceMatrixWithAllocationPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceMatrixWithAllocationPriceConversionRateConfigConversionRateTypeUnit = shared.PriceMatrixWithAllocationPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceMatrixWithAllocationPriceModelTypeMatrixWithAllocation = shared.PriceMatrixWithAllocationPriceModelTypeMatrixWithAllocation

This is an alias to an internal value.

View Source
const PriceMatrixWithAllocationPricePriceTypeFixedPrice = shared.PriceMatrixWithAllocationPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceMatrixWithAllocationPricePriceTypeUsagePrice = shared.PriceMatrixWithAllocationPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceMatrixWithDisplayNamePriceCadenceAnnual = shared.PriceMatrixWithDisplayNamePriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceMatrixWithDisplayNamePriceCadenceCustom = shared.PriceMatrixWithDisplayNamePriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceMatrixWithDisplayNamePriceCadenceMonthly = shared.PriceMatrixWithDisplayNamePriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceMatrixWithDisplayNamePriceCadenceOneTime = shared.PriceMatrixWithDisplayNamePriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceMatrixWithDisplayNamePriceCadenceQuarterly = shared.PriceMatrixWithDisplayNamePriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceMatrixWithDisplayNamePriceCadenceSemiAnnual = shared.PriceMatrixWithDisplayNamePriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceMatrixWithDisplayNamePriceConversionRateConfigConversionRateTypeTiered = shared.PriceMatrixWithDisplayNamePriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceMatrixWithDisplayNamePriceConversionRateConfigConversionRateTypeUnit = shared.PriceMatrixWithDisplayNamePriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceMatrixWithDisplayNamePriceModelTypeMatrixWithDisplayName = shared.PriceMatrixWithDisplayNamePriceModelTypeMatrixWithDisplayName

This is an alias to an internal value.

View Source
const PriceMatrixWithDisplayNamePricePriceTypeFixedPrice = shared.PriceMatrixWithDisplayNamePricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceMatrixWithDisplayNamePricePriceTypeUsagePrice = shared.PriceMatrixWithDisplayNamePricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceMaxGroupTieredPackagePriceCadenceAnnual = shared.PriceMaxGroupTieredPackagePriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceMaxGroupTieredPackagePriceCadenceCustom = shared.PriceMaxGroupTieredPackagePriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceMaxGroupTieredPackagePriceCadenceMonthly = shared.PriceMaxGroupTieredPackagePriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceMaxGroupTieredPackagePriceCadenceOneTime = shared.PriceMaxGroupTieredPackagePriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceMaxGroupTieredPackagePriceCadenceQuarterly = shared.PriceMaxGroupTieredPackagePriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceMaxGroupTieredPackagePriceCadenceSemiAnnual = shared.PriceMaxGroupTieredPackagePriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceMaxGroupTieredPackagePriceConversionRateConfigConversionRateTypeTiered = shared.PriceMaxGroupTieredPackagePriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceMaxGroupTieredPackagePriceConversionRateConfigConversionRateTypeUnit = shared.PriceMaxGroupTieredPackagePriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceMaxGroupTieredPackagePriceModelTypeMaxGroupTieredPackage = shared.PriceMaxGroupTieredPackagePriceModelTypeMaxGroupTieredPackage

This is an alias to an internal value.

View Source
const PriceMaxGroupTieredPackagePricePriceTypeFixedPrice = shared.PriceMaxGroupTieredPackagePricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceMaxGroupTieredPackagePricePriceTypeUsagePrice = shared.PriceMaxGroupTieredPackagePricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceModelTypeBPS = shared.PriceModelTypeBPS

This is an alias to an internal value.

View Source
const PriceModelTypeBulk = shared.PriceModelTypeBulk

This is an alias to an internal value.

View Source
const PriceModelTypeBulkBPS = shared.PriceModelTypeBulkBPS

This is an alias to an internal value.

View Source
const PriceModelTypeBulkWithProration = shared.PriceModelTypeBulkWithProration

This is an alias to an internal value.

View Source
const PriceModelTypeCumulativeGroupedBulk = shared.PriceModelTypeCumulativeGroupedBulk

This is an alias to an internal value.

View Source
const PriceModelTypeGroupedAllocation = shared.PriceModelTypeGroupedAllocation

This is an alias to an internal value.

View Source
const PriceModelTypeGroupedTiered = shared.PriceModelTypeGroupedTiered

This is an alias to an internal value.

View Source
const PriceModelTypeGroupedTieredPackage = shared.PriceModelTypeGroupedTieredPackage

This is an alias to an internal value.

View Source
const PriceModelTypeGroupedWithMeteredMinimum = shared.PriceModelTypeGroupedWithMeteredMinimum

This is an alias to an internal value.

View Source
const PriceModelTypeGroupedWithProratedMinimum = shared.PriceModelTypeGroupedWithProratedMinimum

This is an alias to an internal value.

View Source
const PriceModelTypeMatrix = shared.PriceModelTypeMatrix

This is an alias to an internal value.

View Source
const PriceModelTypeMatrixWithAllocation = shared.PriceModelTypeMatrixWithAllocation

This is an alias to an internal value.

View Source
const PriceModelTypeMatrixWithDisplayName = shared.PriceModelTypeMatrixWithDisplayName

This is an alias to an internal value.

View Source
const PriceModelTypeMaxGroupTieredPackage = shared.PriceModelTypeMaxGroupTieredPackage

This is an alias to an internal value.

View Source
const PriceModelTypePackage = shared.PriceModelTypePackage

This is an alias to an internal value.

View Source
const PriceModelTypePackageWithAllocation = shared.PriceModelTypePackageWithAllocation

This is an alias to an internal value.

View Source
const PriceModelTypeScalableMatrixWithTieredPricing = shared.PriceModelTypeScalableMatrixWithTieredPricing

This is an alias to an internal value.

View Source
const PriceModelTypeScalableMatrixWithUnitPricing = shared.PriceModelTypeScalableMatrixWithUnitPricing

This is an alias to an internal value.

View Source
const PriceModelTypeThresholdTotalAmount = shared.PriceModelTypeThresholdTotalAmount

This is an alias to an internal value.

View Source
const PriceModelTypeTiered = shared.PriceModelTypeTiered

This is an alias to an internal value.

View Source
const PriceModelTypeTieredBPS = shared.PriceModelTypeTieredBPS

This is an alias to an internal value.

View Source
const PriceModelTypeTieredPackage = shared.PriceModelTypeTieredPackage

This is an alias to an internal value.

View Source
const PriceModelTypeTieredPackageWithMinimum = shared.PriceModelTypeTieredPackageWithMinimum

This is an alias to an internal value.

View Source
const PriceModelTypeTieredWithMinimum = shared.PriceModelTypeTieredWithMinimum

This is an alias to an internal value.

View Source
const PriceModelTypeTieredWithProration = shared.PriceModelTypeTieredWithProration

This is an alias to an internal value.

View Source
const PriceModelTypeUnit = shared.PriceModelTypeUnit

This is an alias to an internal value.

View Source
const PriceModelTypeUnitWithPercent = shared.PriceModelTypeUnitWithPercent

This is an alias to an internal value.

View Source
const PriceModelTypeUnitWithProration = shared.PriceModelTypeUnitWithProration

This is an alias to an internal value.

View Source
const PricePackagePriceCadenceAnnual = shared.PricePackagePriceCadenceAnnual

This is an alias to an internal value.

View Source
const PricePackagePriceCadenceCustom = shared.PricePackagePriceCadenceCustom

This is an alias to an internal value.

View Source
const PricePackagePriceCadenceMonthly = shared.PricePackagePriceCadenceMonthly

This is an alias to an internal value.

View Source
const PricePackagePriceCadenceOneTime = shared.PricePackagePriceCadenceOneTime

This is an alias to an internal value.

View Source
const PricePackagePriceCadenceQuarterly = shared.PricePackagePriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PricePackagePriceCadenceSemiAnnual = shared.PricePackagePriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PricePackagePriceConversionRateConfigConversionRateTypeTiered = shared.PricePackagePriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PricePackagePriceConversionRateConfigConversionRateTypeUnit = shared.PricePackagePriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PricePackagePriceModelTypePackage = shared.PricePackagePriceModelTypePackage

This is an alias to an internal value.

View Source
const PricePackagePricePriceTypeFixedPrice = shared.PricePackagePricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PricePackagePricePriceTypeUsagePrice = shared.PricePackagePricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PricePackageWithAllocationPriceCadenceAnnual = shared.PricePackageWithAllocationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PricePackageWithAllocationPriceCadenceCustom = shared.PricePackageWithAllocationPriceCadenceCustom

This is an alias to an internal value.

View Source
const PricePackageWithAllocationPriceCadenceMonthly = shared.PricePackageWithAllocationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PricePackageWithAllocationPriceCadenceOneTime = shared.PricePackageWithAllocationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PricePackageWithAllocationPriceCadenceQuarterly = shared.PricePackageWithAllocationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PricePackageWithAllocationPriceCadenceSemiAnnual = shared.PricePackageWithAllocationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PricePackageWithAllocationPriceConversionRateConfigConversionRateTypeTiered = shared.PricePackageWithAllocationPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PricePackageWithAllocationPriceConversionRateConfigConversionRateTypeUnit = shared.PricePackageWithAllocationPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PricePackageWithAllocationPriceModelTypePackageWithAllocation = shared.PricePackageWithAllocationPriceModelTypePackageWithAllocation

This is an alias to an internal value.

View Source
const PricePackageWithAllocationPricePriceTypeFixedPrice = shared.PricePackageWithAllocationPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PricePackageWithAllocationPricePriceTypeUsagePrice = shared.PricePackageWithAllocationPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PricePriceTypeFixedPrice = shared.PricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PricePriceTypeUsagePrice = shared.PricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithTieredPricingPriceCadenceAnnual = shared.PriceScalableMatrixWithTieredPricingPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithTieredPricingPriceCadenceCustom = shared.PriceScalableMatrixWithTieredPricingPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithTieredPricingPriceCadenceMonthly = shared.PriceScalableMatrixWithTieredPricingPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithTieredPricingPriceCadenceOneTime = shared.PriceScalableMatrixWithTieredPricingPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithTieredPricingPriceCadenceQuarterly = shared.PriceScalableMatrixWithTieredPricingPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithTieredPricingPriceCadenceSemiAnnual = shared.PriceScalableMatrixWithTieredPricingPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateTypeTiered = shared.PriceScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateTypeUnit = shared.PriceScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithTieredPricingPriceModelTypeScalableMatrixWithTieredPricing = shared.PriceScalableMatrixWithTieredPricingPriceModelTypeScalableMatrixWithTieredPricing

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithTieredPricingPricePriceTypeFixedPrice = shared.PriceScalableMatrixWithTieredPricingPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithTieredPricingPricePriceTypeUsagePrice = shared.PriceScalableMatrixWithTieredPricingPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithUnitPricingPriceCadenceAnnual = shared.PriceScalableMatrixWithUnitPricingPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithUnitPricingPriceCadenceCustom = shared.PriceScalableMatrixWithUnitPricingPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithUnitPricingPriceCadenceMonthly = shared.PriceScalableMatrixWithUnitPricingPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithUnitPricingPriceCadenceOneTime = shared.PriceScalableMatrixWithUnitPricingPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithUnitPricingPriceCadenceQuarterly = shared.PriceScalableMatrixWithUnitPricingPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithUnitPricingPriceCadenceSemiAnnual = shared.PriceScalableMatrixWithUnitPricingPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateTypeTiered = shared.PriceScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateTypeUnit = shared.PriceScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithUnitPricingPriceModelTypeScalableMatrixWithUnitPricing = shared.PriceScalableMatrixWithUnitPricingPriceModelTypeScalableMatrixWithUnitPricing

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithUnitPricingPricePriceTypeFixedPrice = shared.PriceScalableMatrixWithUnitPricingPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithUnitPricingPricePriceTypeUsagePrice = shared.PriceScalableMatrixWithUnitPricingPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceThresholdTotalAmountPriceCadenceAnnual = shared.PriceThresholdTotalAmountPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceThresholdTotalAmountPriceCadenceCustom = shared.PriceThresholdTotalAmountPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceThresholdTotalAmountPriceCadenceMonthly = shared.PriceThresholdTotalAmountPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceThresholdTotalAmountPriceCadenceOneTime = shared.PriceThresholdTotalAmountPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceThresholdTotalAmountPriceCadenceQuarterly = shared.PriceThresholdTotalAmountPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceThresholdTotalAmountPriceCadenceSemiAnnual = shared.PriceThresholdTotalAmountPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceThresholdTotalAmountPriceConversionRateConfigConversionRateTypeTiered = shared.PriceThresholdTotalAmountPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceThresholdTotalAmountPriceConversionRateConfigConversionRateTypeUnit = shared.PriceThresholdTotalAmountPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceThresholdTotalAmountPriceModelTypeThresholdTotalAmount = shared.PriceThresholdTotalAmountPriceModelTypeThresholdTotalAmount

This is an alias to an internal value.

View Source
const PriceThresholdTotalAmountPricePriceTypeFixedPrice = shared.PriceThresholdTotalAmountPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceThresholdTotalAmountPricePriceTypeUsagePrice = shared.PriceThresholdTotalAmountPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceTieredBPSPriceCadenceAnnual = shared.PriceTieredBPSPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceTieredBPSPriceCadenceCustom = shared.PriceTieredBPSPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceTieredBPSPriceCadenceMonthly = shared.PriceTieredBPSPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceTieredBPSPriceCadenceOneTime = shared.PriceTieredBPSPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceTieredBPSPriceCadenceQuarterly = shared.PriceTieredBPSPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceTieredBPSPriceCadenceSemiAnnual = shared.PriceTieredBPSPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceTieredBPSPriceConversionRateConfigConversionRateTypeTiered = shared.PriceTieredBPSPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceTieredBPSPriceConversionRateConfigConversionRateTypeUnit = shared.PriceTieredBPSPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceTieredBPSPriceModelTypeTieredBPS = shared.PriceTieredBPSPriceModelTypeTieredBPS

This is an alias to an internal value.

View Source
const PriceTieredBPSPricePriceTypeFixedPrice = shared.PriceTieredBPSPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceTieredBPSPricePriceTypeUsagePrice = shared.PriceTieredBPSPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceTieredPackagePriceCadenceAnnual = shared.PriceTieredPackagePriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceTieredPackagePriceCadenceCustom = shared.PriceTieredPackagePriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceTieredPackagePriceCadenceMonthly = shared.PriceTieredPackagePriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceTieredPackagePriceCadenceOneTime = shared.PriceTieredPackagePriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceTieredPackagePriceCadenceQuarterly = shared.PriceTieredPackagePriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceTieredPackagePriceCadenceSemiAnnual = shared.PriceTieredPackagePriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceTieredPackagePriceConversionRateConfigConversionRateTypeTiered = shared.PriceTieredPackagePriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceTieredPackagePriceConversionRateConfigConversionRateTypeUnit = shared.PriceTieredPackagePriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceTieredPackagePriceModelTypeTieredPackage = shared.PriceTieredPackagePriceModelTypeTieredPackage

This is an alias to an internal value.

View Source
const PriceTieredPackagePricePriceTypeFixedPrice = shared.PriceTieredPackagePricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceTieredPackagePricePriceTypeUsagePrice = shared.PriceTieredPackagePricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceTieredPackageWithMinimumPriceCadenceAnnual = shared.PriceTieredPackageWithMinimumPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceTieredPackageWithMinimumPriceCadenceCustom = shared.PriceTieredPackageWithMinimumPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceTieredPackageWithMinimumPriceCadenceMonthly = shared.PriceTieredPackageWithMinimumPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceTieredPackageWithMinimumPriceCadenceOneTime = shared.PriceTieredPackageWithMinimumPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceTieredPackageWithMinimumPriceCadenceQuarterly = shared.PriceTieredPackageWithMinimumPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceTieredPackageWithMinimumPriceCadenceSemiAnnual = shared.PriceTieredPackageWithMinimumPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceTieredPackageWithMinimumPriceConversionRateConfigConversionRateTypeTiered = shared.PriceTieredPackageWithMinimumPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceTieredPackageWithMinimumPriceConversionRateConfigConversionRateTypeUnit = shared.PriceTieredPackageWithMinimumPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceTieredPackageWithMinimumPriceModelTypeTieredPackageWithMinimum = shared.PriceTieredPackageWithMinimumPriceModelTypeTieredPackageWithMinimum

This is an alias to an internal value.

View Source
const PriceTieredPackageWithMinimumPricePriceTypeFixedPrice = shared.PriceTieredPackageWithMinimumPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceTieredPackageWithMinimumPricePriceTypeUsagePrice = shared.PriceTieredPackageWithMinimumPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceTieredPriceCadenceAnnual = shared.PriceTieredPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceTieredPriceCadenceCustom = shared.PriceTieredPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceTieredPriceCadenceMonthly = shared.PriceTieredPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceTieredPriceCadenceOneTime = shared.PriceTieredPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceTieredPriceCadenceQuarterly = shared.PriceTieredPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceTieredPriceCadenceSemiAnnual = shared.PriceTieredPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceTieredPriceConversionRateConfigConversionRateTypeTiered = shared.PriceTieredPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceTieredPriceConversionRateConfigConversionRateTypeUnit = shared.PriceTieredPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceTieredPriceModelTypeTiered = shared.PriceTieredPriceModelTypeTiered

This is an alias to an internal value.

View Source
const PriceTieredPricePriceTypeFixedPrice = shared.PriceTieredPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceTieredPricePriceTypeUsagePrice = shared.PriceTieredPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceTieredWithMinimumPriceCadenceAnnual = shared.PriceTieredWithMinimumPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceTieredWithMinimumPriceCadenceCustom = shared.PriceTieredWithMinimumPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceTieredWithMinimumPriceCadenceMonthly = shared.PriceTieredWithMinimumPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceTieredWithMinimumPriceCadenceOneTime = shared.PriceTieredWithMinimumPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceTieredWithMinimumPriceCadenceQuarterly = shared.PriceTieredWithMinimumPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceTieredWithMinimumPriceCadenceSemiAnnual = shared.PriceTieredWithMinimumPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceTieredWithMinimumPriceConversionRateConfigConversionRateTypeTiered = shared.PriceTieredWithMinimumPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceTieredWithMinimumPriceConversionRateConfigConversionRateTypeUnit = shared.PriceTieredWithMinimumPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceTieredWithMinimumPriceModelTypeTieredWithMinimum = shared.PriceTieredWithMinimumPriceModelTypeTieredWithMinimum

This is an alias to an internal value.

View Source
const PriceTieredWithMinimumPricePriceTypeFixedPrice = shared.PriceTieredWithMinimumPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceTieredWithMinimumPricePriceTypeUsagePrice = shared.PriceTieredWithMinimumPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceTieredWithProrationPriceCadenceAnnual = shared.PriceTieredWithProrationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceTieredWithProrationPriceCadenceCustom = shared.PriceTieredWithProrationPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceTieredWithProrationPriceCadenceMonthly = shared.PriceTieredWithProrationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceTieredWithProrationPriceCadenceOneTime = shared.PriceTieredWithProrationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceTieredWithProrationPriceCadenceQuarterly = shared.PriceTieredWithProrationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceTieredWithProrationPriceCadenceSemiAnnual = shared.PriceTieredWithProrationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceTieredWithProrationPriceConversionRateConfigConversionRateTypeTiered = shared.PriceTieredWithProrationPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceTieredWithProrationPriceConversionRateConfigConversionRateTypeUnit = shared.PriceTieredWithProrationPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceTieredWithProrationPriceModelTypeTieredWithProration = shared.PriceTieredWithProrationPriceModelTypeTieredWithProration

This is an alias to an internal value.

View Source
const PriceTieredWithProrationPricePriceTypeFixedPrice = shared.PriceTieredWithProrationPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceTieredWithProrationPricePriceTypeUsagePrice = shared.PriceTieredWithProrationPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceUnitPriceCadenceAnnual = shared.PriceUnitPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceUnitPriceCadenceCustom = shared.PriceUnitPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceUnitPriceCadenceMonthly = shared.PriceUnitPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceUnitPriceCadenceOneTime = shared.PriceUnitPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceUnitPriceCadenceQuarterly = shared.PriceUnitPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceUnitPriceCadenceSemiAnnual = shared.PriceUnitPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceUnitPriceConversionRateConfigConversionRateTypeTiered = shared.PriceUnitPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceUnitPriceConversionRateConfigConversionRateTypeUnit = shared.PriceUnitPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceUnitPriceModelTypeUnit = shared.PriceUnitPriceModelTypeUnit

This is an alias to an internal value.

View Source
const PriceUnitPricePriceTypeFixedPrice = shared.PriceUnitPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceUnitPricePriceTypeUsagePrice = shared.PriceUnitPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceUnitWithPercentPriceCadenceAnnual = shared.PriceUnitWithPercentPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceUnitWithPercentPriceCadenceCustom = shared.PriceUnitWithPercentPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceUnitWithPercentPriceCadenceMonthly = shared.PriceUnitWithPercentPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceUnitWithPercentPriceCadenceOneTime = shared.PriceUnitWithPercentPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceUnitWithPercentPriceCadenceQuarterly = shared.PriceUnitWithPercentPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceUnitWithPercentPriceCadenceSemiAnnual = shared.PriceUnitWithPercentPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceUnitWithPercentPriceConversionRateConfigConversionRateTypeTiered = shared.PriceUnitWithPercentPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceUnitWithPercentPriceConversionRateConfigConversionRateTypeUnit = shared.PriceUnitWithPercentPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceUnitWithPercentPriceModelTypeUnitWithPercent = shared.PriceUnitWithPercentPriceModelTypeUnitWithPercent

This is an alias to an internal value.

View Source
const PriceUnitWithPercentPricePriceTypeFixedPrice = shared.PriceUnitWithPercentPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceUnitWithPercentPricePriceTypeUsagePrice = shared.PriceUnitWithPercentPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceUnitWithProrationPriceCadenceAnnual = shared.PriceUnitWithProrationPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceUnitWithProrationPriceCadenceCustom = shared.PriceUnitWithProrationPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceUnitWithProrationPriceCadenceMonthly = shared.PriceUnitWithProrationPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceUnitWithProrationPriceCadenceOneTime = shared.PriceUnitWithProrationPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceUnitWithProrationPriceCadenceQuarterly = shared.PriceUnitWithProrationPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceUnitWithProrationPriceCadenceSemiAnnual = shared.PriceUnitWithProrationPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceUnitWithProrationPriceConversionRateConfigConversionRateTypeTiered = shared.PriceUnitWithProrationPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceUnitWithProrationPriceConversionRateConfigConversionRateTypeUnit = shared.PriceUnitWithProrationPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceUnitWithProrationPriceModelTypeUnitWithProration = shared.PriceUnitWithProrationPriceModelTypeUnitWithProration

This is an alias to an internal value.

View Source
const PriceUnitWithProrationPricePriceTypeFixedPrice = shared.PriceUnitWithProrationPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceUnitWithProrationPricePriceTypeUsagePrice = shared.PriceUnitWithProrationPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const TierSubLineItemTypeTier = shared.TierSubLineItemTypeTier

This is an alias to an internal value.

View Source
const TieredConversionRateConfigConversionRateTypeTiered = shared.TieredConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const TransformPriceFilterFieldCurrency = shared.TransformPriceFilterFieldCurrency

This is an alias to an internal value.

View Source
const TransformPriceFilterFieldItemID = shared.TransformPriceFilterFieldItemID

This is an alias to an internal value.

View Source
const TransformPriceFilterFieldPriceID = shared.TransformPriceFilterFieldPriceID

This is an alias to an internal value.

View Source
const TransformPriceFilterFieldPriceType = shared.TransformPriceFilterFieldPriceType

This is an alias to an internal value.

View Source
const TransformPriceFilterFieldPricingUnitID = shared.TransformPriceFilterFieldPricingUnitID

This is an alias to an internal value.

View Source
const TransformPriceFilterOperatorExcludes = shared.TransformPriceFilterOperatorExcludes

This is an alias to an internal value.

View Source
const TransformPriceFilterOperatorIncludes = shared.TransformPriceFilterOperatorIncludes

This is an alias to an internal value.

View Source
const TrialDiscountDiscountTypeTrial = shared.TrialDiscountDiscountTypeTrial

This is an alias to an internal value.

View Source
const UnitConversionRateConfigConversionRateTypeUnit = shared.UnitConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const UsageDiscountDiscountTypeUsage = shared.UsageDiscountDiscountTypeUsage

This is an alias to an internal value.

View Source
const UsageDiscountIntervalDiscountTypeUsage = shared.UsageDiscountIntervalDiscountTypeUsage

This is an alias to an internal value.

View Source
const WebhookHeaderTimestampFormat = "2006-01-02T15:04:05.999999999"

WebhookHeaderTimestampFormat is the format of the header X-Orb-Timestamp for webhook requests sent by Orb.

Variables

This section is empty.

Functions

func Bool

func Bool(value bool) param.Field[bool]

Bool is a param field helper which helps specify bools.

func DefaultClientOptions added in v0.110.0

func DefaultClientOptions() []option.RequestOption

DefaultClientOptions read from the environment (ORB_API_KEY, ORB_WEBHOOK_SECRET, ORB_BASE_URL). This should be used to initialize new clients.

func F

func F[T any](value T) param.Field[T]

F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.

func FileParam added in v0.24.0

func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]

FileParam is a param field helper which helps files with a mime content-type.

func Float

func Float(value float64) param.Field[float64]

Float is a param field helper which helps specify floats.

func Int

func Int(value int64) param.Field[int64]

Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.

func Null

func Null[T any]() param.Field[T]

Null is a param field helper which explicitly sends null to the API.

func Raw

func Raw[T any](value any) param.Field[T]

Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).

func String

func String(value string) param.Field[string]

String is a param field helper which helps specify strings.

Types

type AccountingProviderConfigParam added in v0.121.0

type AccountingProviderConfigParam struct {
	ExternalProviderID param.Field[string] `json:"external_provider_id,required"`
	ProviderType       param.Field[string] `json:"provider_type,required"`
}

func (AccountingProviderConfigParam) MarshalJSON added in v0.121.0

func (r AccountingProviderConfigParam) MarshalJSON() (data []byte, err error)

type Address added in v0.121.0

type Address = shared.Address

This is an alias to an internal type.

type AddressInputParam added in v0.121.0

type AddressInputParam struct {
	City       param.Field[string] `json:"city"`
	Country    param.Field[string] `json:"country"`
	Line1      param.Field[string] `json:"line1"`
	Line2      param.Field[string] `json:"line2"`
	PostalCode param.Field[string] `json:"postal_code"`
	State      param.Field[string] `json:"state"`
}

func (AddressInputParam) MarshalJSON added in v0.121.0

func (r AddressInputParam) MarshalJSON() (data []byte, err error)

type AdjustmentInterval added in v0.121.0

type AdjustmentInterval = shared.AdjustmentInterval

This is an alias to an internal type.

type AdjustmentIntervalAdjustment added in v0.121.0

type AdjustmentIntervalAdjustment = shared.AdjustmentIntervalAdjustment

This is an alias to an internal type.

type AdjustmentIntervalAdjustmentAdjustmentType added in v0.121.0

type AdjustmentIntervalAdjustmentAdjustmentType = shared.AdjustmentIntervalAdjustmentAdjustmentType

This is an alias to an internal type.

type AffectedBlock added in v0.121.0

type AffectedBlock struct {
	ID               string            `json:"id,required"`
	ExpiryDate       time.Time         `json:"expiry_date,required,nullable" format:"date-time"`
	PerUnitCostBasis string            `json:"per_unit_cost_basis,required,nullable"`
	JSON             affectedBlockJSON `json:"-"`
}

func (*AffectedBlock) UnmarshalJSON added in v0.121.0

func (r *AffectedBlock) UnmarshalJSON(data []byte) (err error)

type AggregatedCost added in v0.121.0

type AggregatedCost = shared.AggregatedCost

This is an alias to an internal type.

type Alert added in v0.26.0

type Alert struct {
	// Also referred to as alert_id in this documentation.
	ID string `json:"id,required"`
	// The creation time of the resource in Orb.
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// The name of the currency the credit balance or invoice cost is denominated in.
	Currency string `json:"currency,required,nullable"`
	// The customer the alert applies to.
	Customer shared.CustomerMinified `json:"customer,required,nullable"`
	// Whether the alert is enabled or disabled.
	Enabled bool `json:"enabled,required"`
	// The metric the alert applies to.
	Metric AlertMetric `json:"metric,required,nullable"`
	// The plan the alert applies to.
	Plan AlertPlan `json:"plan,required,nullable"`
	// The subscription the alert applies to.
	Subscription shared.SubscriptionMinified `json:"subscription,required,nullable"`
	// The thresholds that define the conditions under which the alert will be
	// triggered.
	Thresholds []Threshold `json:"thresholds,required,nullable"`
	// The type of alert. This must be a valid alert type.
	Type AlertType `json:"type,required"`
	// The current status of the alert. This field is only present for credit balance
	// alerts.
	BalanceAlertStatus []AlertBalanceAlertStatus `json:"balance_alert_status,nullable"`
	JSON               alertJSON                 `json:"-"`
}

[Alerts within Orb](/product-catalog/configuring-alerts) monitor spending, usage, or credit balance and trigger webhooks when a threshold is exceeded.

Alerts created through the API can be scoped to either customers or subscriptions.

func (*Alert) UnmarshalJSON added in v0.26.0

func (r *Alert) UnmarshalJSON(data []byte) (err error)

type AlertBalanceAlertStatus added in v0.116.0

type AlertBalanceAlertStatus struct {
	// Whether the alert is currently in-alert or not.
	InAlert bool `json:"in_alert,required"`
	// The value of the threshold that defines the alert status.
	ThresholdValue float64                     `json:"threshold_value,required"`
	JSON           alertBalanceAlertStatusJSON `json:"-"`
}

Alert status is used to determine if an alert is currently in-alert or not.

func (*AlertBalanceAlertStatus) UnmarshalJSON added in v0.116.0

func (r *AlertBalanceAlertStatus) UnmarshalJSON(data []byte) (err error)

type AlertDisableParams added in v0.27.0

type AlertDisableParams struct {
	// Used to update the status of a plan alert scoped to this subscription_id
	SubscriptionID param.Field[string] `query:"subscription_id"`
}

func (AlertDisableParams) URLQuery added in v0.27.0

func (r AlertDisableParams) URLQuery() (v url.Values)

URLQuery serializes AlertDisableParams's query parameters as `url.Values`.

type AlertEnableParams added in v0.27.0

type AlertEnableParams struct {
	// Used to update the status of a plan alert scoped to this subscription_id
	SubscriptionID param.Field[string] `query:"subscription_id"`
}

func (AlertEnableParams) URLQuery added in v0.27.0

func (r AlertEnableParams) URLQuery() (v url.Values)

URLQuery serializes AlertEnableParams's query parameters as `url.Values`.

type AlertListParams added in v0.27.0

type AlertListParams struct {
	CreatedAtGt  param.Field[time.Time] `query:"created_at[gt]" format:"date-time"`
	CreatedAtGte param.Field[time.Time] `query:"created_at[gte]" format:"date-time"`
	CreatedAtLt  param.Field[time.Time] `query:"created_at[lt]" format:"date-time"`
	CreatedAtLte param.Field[time.Time] `query:"created_at[lte]" format:"date-time"`
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor param.Field[string] `query:"cursor"`
	// Fetch alerts scoped to this customer_id
	CustomerID param.Field[string] `query:"customer_id"`
	// Fetch alerts scoped to this external_customer_id
	ExternalCustomerID param.Field[string] `query:"external_customer_id"`
	// The number of items to fetch. Defaults to 20.
	Limit param.Field[int64] `query:"limit"`
	// Fetch alerts scoped to this subscription_id
	SubscriptionID param.Field[string] `query:"subscription_id"`
}

func (AlertListParams) URLQuery added in v0.27.0

func (r AlertListParams) URLQuery() (v url.Values)

URLQuery serializes AlertListParams's query parameters as `url.Values`.

type AlertMetric added in v0.85.0

type AlertMetric struct {
	ID   string          `json:"id,required"`
	JSON alertMetricJSON `json:"-"`
}

The metric the alert applies to.

func (*AlertMetric) UnmarshalJSON added in v0.85.0

func (r *AlertMetric) UnmarshalJSON(data []byte) (err error)

type AlertNewForCustomerParams added in v0.27.0

type AlertNewForCustomerParams struct {
	// The case sensitive currency or custom pricing unit to use for this alert.
	Currency param.Field[string] `json:"currency,required"`
	// The type of alert to create. This must be a valid alert type.
	Type param.Field[AlertNewForCustomerParamsType] `json:"type,required"`
	// The thresholds that define the values at which the alert will be triggered.
	Thresholds param.Field[[]ThresholdParam] `json:"thresholds"`
}

func (AlertNewForCustomerParams) MarshalJSON added in v0.27.0

func (r AlertNewForCustomerParams) MarshalJSON() (data []byte, err error)

type AlertNewForCustomerParamsType added in v0.45.0

type AlertNewForCustomerParamsType string

The type of alert to create. This must be a valid alert type.

const (
	AlertNewForCustomerParamsTypeCreditBalanceDepleted  AlertNewForCustomerParamsType = "credit_balance_depleted"
	AlertNewForCustomerParamsTypeCreditBalanceDropped   AlertNewForCustomerParamsType = "credit_balance_dropped"
	AlertNewForCustomerParamsTypeCreditBalanceRecovered AlertNewForCustomerParamsType = "credit_balance_recovered"
)

func (AlertNewForCustomerParamsType) IsKnown added in v0.45.0

func (r AlertNewForCustomerParamsType) IsKnown() bool

type AlertNewForExternalCustomerParams added in v0.27.0

type AlertNewForExternalCustomerParams struct {
	// The case sensitive currency or custom pricing unit to use for this alert.
	Currency param.Field[string] `json:"currency,required"`
	// The type of alert to create. This must be a valid alert type.
	Type param.Field[AlertNewForExternalCustomerParamsType] `json:"type,required"`
	// The thresholds that define the values at which the alert will be triggered.
	Thresholds param.Field[[]ThresholdParam] `json:"thresholds"`
}

func (AlertNewForExternalCustomerParams) MarshalJSON added in v0.27.0

func (r AlertNewForExternalCustomerParams) MarshalJSON() (data []byte, err error)

type AlertNewForExternalCustomerParamsType added in v0.45.0

type AlertNewForExternalCustomerParamsType string

The type of alert to create. This must be a valid alert type.

const (
	AlertNewForExternalCustomerParamsTypeCreditBalanceDepleted  AlertNewForExternalCustomerParamsType = "credit_balance_depleted"
	AlertNewForExternalCustomerParamsTypeCreditBalanceDropped   AlertNewForExternalCustomerParamsType = "credit_balance_dropped"
	AlertNewForExternalCustomerParamsTypeCreditBalanceRecovered AlertNewForExternalCustomerParamsType = "credit_balance_recovered"
)

func (AlertNewForExternalCustomerParamsType) IsKnown added in v0.45.0

type AlertNewForSubscriptionParams added in v0.27.0

type AlertNewForSubscriptionParams struct {
	// The thresholds that define the values at which the alert will be triggered.
	Thresholds param.Field[[]ThresholdParam] `json:"thresholds,required"`
	// The type of alert to create. This must be a valid alert type.
	Type param.Field[AlertNewForSubscriptionParamsType] `json:"type,required"`
	// The metric to track usage for.
	MetricID param.Field[string] `json:"metric_id"`
}

func (AlertNewForSubscriptionParams) MarshalJSON added in v0.27.0

func (r AlertNewForSubscriptionParams) MarshalJSON() (data []byte, err error)

type AlertNewForSubscriptionParamsType added in v0.45.0

type AlertNewForSubscriptionParamsType string

The type of alert to create. This must be a valid alert type.

const (
	AlertNewForSubscriptionParamsTypeUsageExceeded AlertNewForSubscriptionParamsType = "usage_exceeded"
	AlertNewForSubscriptionParamsTypeCostExceeded  AlertNewForSubscriptionParamsType = "cost_exceeded"
)

func (AlertNewForSubscriptionParamsType) IsKnown added in v0.45.0

type AlertPlan added in v0.85.0

type AlertPlan struct {
	ID string `json:"id,required,nullable"`
	// An optional user-defined ID for this plan resource, used throughout the system
	// as an alias for this Plan. Use this field to identify a plan by an existing
	// identifier in your system.
	ExternalPlanID string        `json:"external_plan_id,required,nullable"`
	Name           string        `json:"name,required,nullable"`
	PlanVersion    string        `json:"plan_version,required"`
	JSON           alertPlanJSON `json:"-"`
}

The plan the alert applies to.

func (*AlertPlan) UnmarshalJSON added in v0.85.0

func (r *AlertPlan) UnmarshalJSON(data []byte) (err error)

type AlertService added in v0.26.0

type AlertService struct {
	Options []option.RequestOption
}

AlertService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAlertService method instead.

func NewAlertService added in v0.26.0

func NewAlertService(opts ...option.RequestOption) (r *AlertService)

NewAlertService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AlertService) Disable added in v0.27.0

func (r *AlertService) Disable(ctx context.Context, alertConfigurationID string, body AlertDisableParams, opts ...option.RequestOption) (res *Alert, err error)

This endpoint allows you to disable an alert. To disable a plan-level alert for a specific subscription, you must include the `subscription_id`. The `subscription_id` is not required for customer or subscription level alerts.

func (*AlertService) Enable added in v0.26.0

func (r *AlertService) Enable(ctx context.Context, alertConfigurationID string, body AlertEnableParams, opts ...option.RequestOption) (res *Alert, err error)

This endpoint allows you to enable an alert. To enable a plan-level alert for a specific subscription, you must include the `subscription_id`. The `subscription_id` is not required for customer or subscription level alerts.

func (*AlertService) Get added in v0.27.0

func (r *AlertService) Get(ctx context.Context, alertID string, opts ...option.RequestOption) (res *Alert, err error)

This endpoint retrieves an alert by its ID.

func (*AlertService) List added in v0.27.0

func (r *AlertService) List(ctx context.Context, query AlertListParams, opts ...option.RequestOption) (res *pagination.Page[Alert], err error)

This endpoint returns a list of alerts within Orb.

The request must specify one of `customer_id`, `external_customer_id`, or `subscription_id`.

If querying by subscripion_id, the endpoint will return the subscription level alerts as well as the plan level alerts associated with the subscription.

The list of alerts is ordered starting from the most recently created alert. This endpoint follows Orb's [standardized pagination format](/api-reference/pagination).

func (*AlertService) ListAutoPaging added in v0.27.0

This endpoint returns a list of alerts within Orb.

The request must specify one of `customer_id`, `external_customer_id`, or `subscription_id`.

If querying by subscripion_id, the endpoint will return the subscription level alerts as well as the plan level alerts associated with the subscription.

The list of alerts is ordered starting from the most recently created alert. This endpoint follows Orb's [standardized pagination format](/api-reference/pagination).

func (*AlertService) NewForCustomer added in v0.27.0

func (r *AlertService) NewForCustomer(ctx context.Context, customerID string, body AlertNewForCustomerParams, opts ...option.RequestOption) (res *Alert, err error)

This endpoint creates a new alert to monitor a customer's credit balance. There are three types of alerts that can be scoped to customers: `credit_balance_depleted`, `credit_balance_dropped`, and `credit_balance_recovered`. Customers can have a maximum of one of each type of alert per [credit balance currency](/product-catalog/prepurchase). `credit_balance_dropped` alerts require a list of thresholds to be provided while `credit_balance_depleted` and `credit_balance_recovered` alerts do not require thresholds.

func (*AlertService) NewForExternalCustomer added in v0.27.0

func (r *AlertService) NewForExternalCustomer(ctx context.Context, externalCustomerID string, body AlertNewForExternalCustomerParams, opts ...option.RequestOption) (res *Alert, err error)

This endpoint creates a new alert to monitor a customer's credit balance. There are three types of alerts that can be scoped to customers: `credit_balance_depleted`, `credit_balance_dropped`, and `credit_balance_recovered`. Customers can have a maximum of one of each type of alert per [credit balance currency](/product-catalog/prepurchase). `credit_balance_dropped` alerts require a list of thresholds to be provided while `credit_balance_depleted` and `credit_balance_recovered` alerts do not require thresholds.

func (*AlertService) NewForSubscription added in v0.27.0

func (r *AlertService) NewForSubscription(ctx context.Context, subscriptionID string, body AlertNewForSubscriptionParams, opts ...option.RequestOption) (res *Alert, err error)

This endpoint is used to create alerts at the subscription level.

Subscription level alerts can be one of two types: `usage_exceeded` or `cost_exceeded`. A `usage_exceeded` alert is scoped to a particular metric and is triggered when the usage of that metric exceeds predefined thresholds during the current billing cycle. A `cost_exceeded` alert is triggered when the total amount due during the current billing cycle surpasses predefined thresholds. `cost_exceeded` alerts do not include burndown of pre-purchase credits. Each subscription can have one `cost_exceeded` alert and one `usage_exceeded` alert per metric that is a part of the subscription. Alerts are triggered based on usage or cost conditions met during the current billing cycle.

func (*AlertService) Update added in v0.50.0

func (r *AlertService) Update(ctx context.Context, alertConfigurationID string, body AlertUpdateParams, opts ...option.RequestOption) (res *Alert, err error)

This endpoint updates the thresholds of an alert.

type AlertType added in v0.26.0

type AlertType string

The type of alert. This must be a valid alert type.

const (
	AlertTypeCreditBalanceDepleted  AlertType = "credit_balance_depleted"
	AlertTypeCreditBalanceDropped   AlertType = "credit_balance_dropped"
	AlertTypeCreditBalanceRecovered AlertType = "credit_balance_recovered"
	AlertTypeUsageExceeded          AlertType = "usage_exceeded"
	AlertTypeCostExceeded           AlertType = "cost_exceeded"
)

func (AlertType) IsKnown added in v0.26.0

func (r AlertType) IsKnown() bool

type AlertUpdateParams added in v0.50.0

type AlertUpdateParams struct {
	// The thresholds that define the values at which the alert will be triggered.
	Thresholds param.Field[[]ThresholdParam] `json:"thresholds,required"`
}

func (AlertUpdateParams) MarshalJSON added in v0.50.0

func (r AlertUpdateParams) MarshalJSON() (data []byte, err error)

type Allocation added in v0.121.0

type Allocation = shared.Allocation

This is an alias to an internal type.

type AmendmentLedgerEntry added in v0.121.0

type AmendmentLedgerEntry struct {
	ID                   string                          `json:"id,required"`
	Amount               float64                         `json:"amount,required"`
	CreatedAt            time.Time                       `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlock                   `json:"credit_block,required"`
	Currency             string                          `json:"currency,required"`
	Customer             shared.CustomerMinified         `json:"customer,required"`
	Description          string                          `json:"description,required,nullable"`
	EndingBalance        float64                         `json:"ending_balance,required"`
	EntryStatus          AmendmentLedgerEntryEntryStatus `json:"entry_status,required"`
	EntryType            AmendmentLedgerEntryEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                           `json:"ledger_sequence_number,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata        map[string]string        `json:"metadata,required"`
	StartingBalance float64                  `json:"starting_balance,required"`
	JSON            amendmentLedgerEntryJSON `json:"-"`
}

func (*AmendmentLedgerEntry) UnmarshalJSON added in v0.121.0

func (r *AmendmentLedgerEntry) UnmarshalJSON(data []byte) (err error)

type AmendmentLedgerEntryEntryStatus added in v0.121.0

type AmendmentLedgerEntryEntryStatus string
const (
	AmendmentLedgerEntryEntryStatusCommitted AmendmentLedgerEntryEntryStatus = "committed"
	AmendmentLedgerEntryEntryStatusPending   AmendmentLedgerEntryEntryStatus = "pending"
)

func (AmendmentLedgerEntryEntryStatus) IsKnown added in v0.121.0

type AmendmentLedgerEntryEntryType added in v0.121.0

type AmendmentLedgerEntryEntryType string
const (
	AmendmentLedgerEntryEntryTypeAmendment AmendmentLedgerEntryEntryType = "amendment"
)

func (AmendmentLedgerEntryEntryType) IsKnown added in v0.121.0

func (r AmendmentLedgerEntryEntryType) IsKnown() bool

type AmountDiscount added in v0.67.0

type AmountDiscount = shared.AmountDiscount

This is an alias to an internal type.

type AmountDiscountDiscountType added in v0.67.0

type AmountDiscountDiscountType = shared.AmountDiscountDiscountType

This is an alias to an internal type.

type AmountDiscountInterval added in v0.121.0

type AmountDiscountInterval = shared.AmountDiscountInterval

This is an alias to an internal type.

type AmountDiscountIntervalDiscountType added in v0.121.0

type AmountDiscountIntervalDiscountType = shared.AmountDiscountIntervalDiscountType

This is an alias to an internal type.

type AmountDiscountParam added in v0.67.0

type AmountDiscountParam = shared.AmountDiscountParam

This is an alias to an internal type.

type BPSConfig added in v0.121.0

type BPSConfig = shared.BPSConfig

This is an alias to an internal type.

type BPSConfigParam added in v0.121.0

type BPSConfigParam = shared.BPSConfigParam

This is an alias to an internal type.

type BPSTier added in v0.121.0

type BPSTier = shared.BPSTier

This is an alias to an internal type.

type BPSTierParam added in v0.121.0

type BPSTierParam = shared.BPSTierParam

This is an alias to an internal type.

type BetaExternalPlanIDNewPlanVersionParams added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParams struct {
	// New version number.
	Version param.Field[int64] `json:"version,required"`
	// Additional adjustments to be added to the plan.
	AddAdjustments param.Field[[]BetaExternalPlanIDNewPlanVersionParamsAddAdjustment] `json:"add_adjustments"`
	// Additional prices to be added to the plan.
	AddPrices param.Field[[]BetaExternalPlanIDNewPlanVersionParamsAddPrice] `json:"add_prices"`
	// Adjustments to be removed from the plan.
	RemoveAdjustments param.Field[[]BetaExternalPlanIDNewPlanVersionParamsRemoveAdjustment] `json:"remove_adjustments"`
	// Prices to be removed from the plan.
	RemovePrices param.Field[[]BetaExternalPlanIDNewPlanVersionParamsRemovePrice] `json:"remove_prices"`
	// Adjustments to be replaced with additional adjustments on the plan.
	ReplaceAdjustments param.Field[[]BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustment] `json:"replace_adjustments"`
	// Prices to be replaced with additional prices on the plan.
	ReplacePrices param.Field[[]BetaExternalPlanIDNewPlanVersionParamsReplacePrice] `json:"replace_prices"`
	// Set this new plan version as the default
	SetAsDefault param.Field[bool] `json:"set_as_default"`
}

func (BetaExternalPlanIDNewPlanVersionParams) MarshalJSON added in v0.116.0

func (r BetaExternalPlanIDNewPlanVersionParams) MarshalJSON() (data []byte, err error)

type BetaExternalPlanIDNewPlanVersionParamsAddAdjustment added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsAddAdjustment struct {
	// The definition of a new adjustment to create and add to the plan.
	Adjustment param.Field[BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentUnion] `json:"adjustment,required"`
	// The phase to add this adjustment to.
	PlanPhaseOrder param.Field[int64] `json:"plan_phase_order"`
}

func (BetaExternalPlanIDNewPlanVersionParamsAddAdjustment) MarshalJSON added in v0.116.0

func (r BetaExternalPlanIDNewPlanVersionParamsAddAdjustment) MarshalJSON() (data []byte, err error)

type BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustment added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustment struct {
	AdjustmentType param.Field[BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentType] `json:"adjustment_type,required"`
	AmountDiscount param.Field[string]                                                                       `json:"amount_discount"`
	// If set, the adjustment will apply to every price on the subscription.
	AppliesToAll      param.Field[BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAppliesToAll] `json:"applies_to_all"`
	AppliesToItemIDs  param.Field[interface{}]                                                                `json:"applies_to_item_ids"`
	AppliesToPriceIDs param.Field[interface{}]                                                                `json:"applies_to_price_ids"`
	// If set, only prices in the specified currency will have the adjustment applied.
	Currency param.Field[string]      `json:"currency"`
	Filters  param.Field[interface{}] `json:"filters"`
	// When false, this adjustment will be applied to a single price. Otherwise, it
	// will be applied at the invoice level, possibly to multiple prices.
	IsInvoiceLevel param.Field[bool] `json:"is_invoice_level"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID             param.Field[string]  `json:"item_id"`
	MaximumAmount      param.Field[string]  `json:"maximum_amount"`
	MinimumAmount      param.Field[string]  `json:"minimum_amount"`
	PercentageDiscount param.Field[float64] `json:"percentage_discount"`
	// If set, only prices of the specified type will have the adjustment applied.
	PriceType     param.Field[BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentPriceType] `json:"price_type"`
	UsageDiscount param.Field[float64]                                                                 `json:"usage_discount"`
}

The definition of a new adjustment to create and add to the plan.

func (BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustment) ImplementsBetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentUnion added in v0.121.0

func (r BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustment) ImplementsBetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentUnion()

func (BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustment) MarshalJSON added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentType added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentType string
const (
	BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentTypePercentageDiscount BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentType = "percentage_discount"
	BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentTypeUsageDiscount      BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentType = "usage_discount"
	BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentTypeAmountDiscount     BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentType = "amount_discount"
	BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentTypeMinimum            BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentType = "minimum"
	BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentTypeMaximum            BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentType = "maximum"
)

func (BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentType) IsKnown added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAppliesToAll added in v0.120.0

type BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAppliesToAll bool

If set, the adjustment will apply to every price on the subscription.

const (
	BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAppliesToAllTrue BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAppliesToAll = true
)

func (BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentAppliesToAll) IsKnown added in v0.120.0

type BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentPriceType added in v0.120.0

type BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentPriceType string

If set, only prices of the specified type will have the adjustment applied.

const (
	BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentPriceTypeUsage          BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentPriceType = "usage"
	BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentPriceTypeFixedInAdvance BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentPriceType = "fixed_in_advance"
	BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentPriceTypeFixedInArrears BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentPriceType = "fixed_in_arrears"
	BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentPriceTypeFixed          BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentPriceType = "fixed"
	BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentPriceTypeInArrears      BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentPriceType = "in_arrears"
)

func (BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentPriceType) IsKnown added in v0.120.0

type BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentUnion added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentUnion interface {
	ImplementsBetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustmentUnion()
}

The definition of a new adjustment to create and add to the plan.

Satisfied by shared.NewPercentageDiscountParam, shared.NewUsageDiscountParam, shared.NewAmountDiscountParam, shared.NewMinimumParam, shared.NewMaximumParam, BetaExternalPlanIDNewPlanVersionParamsAddAdjustmentsAdjustment.

type BetaExternalPlanIDNewPlanVersionParamsAddPrice added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsAddPrice struct {
	// The allocation price to add to the plan.
	AllocationPrice param.Field[shared.NewAllocationPriceParam] `json:"allocation_price"`
	// The phase to add this price to.
	PlanPhaseOrder param.Field[int64] `json:"plan_phase_order"`
	// The price to add to the plan
	Price param.Field[BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceUnion] `json:"price"`
}

func (BetaExternalPlanIDNewPlanVersionParamsAddPrice) MarshalJSON added in v0.116.0

func (r BetaExternalPlanIDNewPlanVersionParamsAddPrice) MarshalJSON() (data []byte, err error)

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPrice added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                        `json:"item_id,required"`
	ModelType param.Field[BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	BPSConfig                 param.Field[shared.BPSConfigParam]                    `json:"bps_config"`
	BulkBPSConfig             param.Field[shared.BulkBPSConfigParam]                `json:"bulk_bps_config"`
	BulkConfig                param.Field[shared.BulkConfigParam]                   `json:"bulk_config"`
	BulkWithProrationConfig   param.Field[interface{}]                              `json:"bulk_with_proration_config"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate              param.Field[float64]     `json:"conversion_rate"`
	ConversionRateConfig        param.Field[interface{}] `json:"conversion_rate_config"`
	CumulativeGroupedBulkConfig param.Field[interface{}] `json:"cumulative_grouped_bulk_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity               param.Field[float64]     `json:"fixed_price_quantity"`
	GroupedAllocationConfig          param.Field[interface{}] `json:"grouped_allocation_config"`
	GroupedTieredConfig              param.Field[interface{}] `json:"grouped_tiered_config"`
	GroupedTieredPackageConfig       param.Field[interface{}] `json:"grouped_tiered_package_config"`
	GroupedWithMeteredMinimumConfig  param.Field[interface{}] `json:"grouped_with_metered_minimum_config"`
	GroupedWithProratedMinimumConfig param.Field[interface{}] `json:"grouped_with_prorated_minimum_config"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration           param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	MatrixConfig                          param.Field[shared.MatrixConfigParam]                 `json:"matrix_config"`
	MatrixWithAllocationConfig            param.Field[shared.MatrixWithAllocationConfigParam]   `json:"matrix_with_allocation_config"`
	MatrixWithDisplayNameConfig           param.Field[interface{}]                              `json:"matrix_with_display_name_config"`
	MaxGroupTieredPackageConfig           param.Field[interface{}]                              `json:"max_group_tiered_package_config"`
	Metadata                              param.Field[interface{}]                              `json:"metadata"`
	PackageConfig                         param.Field[shared.PackageConfigParam]                `json:"package_config"`
	PackageWithAllocationConfig           param.Field[interface{}]                              `json:"package_with_allocation_config"`
	ScalableMatrixWithTieredPricingConfig param.Field[interface{}]                              `json:"scalable_matrix_with_tiered_pricing_config"`
	ScalableMatrixWithUnitPricingConfig   param.Field[interface{}]                              `json:"scalable_matrix_with_unit_pricing_config"`
	ThresholdTotalAmountConfig            param.Field[interface{}]                              `json:"threshold_total_amount_config"`
	TieredBPSConfig                       param.Field[shared.TieredBPSConfigParam]              `json:"tiered_bps_config"`
	TieredConfig                          param.Field[shared.TieredConfigParam]                 `json:"tiered_config"`
	TieredPackageConfig                   param.Field[interface{}]                              `json:"tiered_package_config"`
	TieredPackageWithMinimumConfig        param.Field[interface{}]                              `json:"tiered_package_with_minimum_config"`
	TieredWithMinimumConfig               param.Field[interface{}]                              `json:"tiered_with_minimum_config"`
	TieredWithProrationConfig             param.Field[interface{}]                              `json:"tiered_with_proration_config"`
	UnitConfig                            param.Field[shared.UnitConfigParam]                   `json:"unit_config"`
	UnitWithPercentConfig                 param.Field[interface{}]                              `json:"unit_with_percent_config"`
	UnitWithProrationConfig               param.Field[interface{}]                              `json:"unit_with_proration_config"`
}

The price to add to the plan

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPrice) ImplementsBetaExternalPlanIDNewPlanVersionParamsAddPricesPriceUnion added in v0.121.0

func (r BetaExternalPlanIDNewPlanVersionParamsAddPricesPrice) ImplementsBetaExternalPlanIDNewPlanVersionParamsAddPricesPriceUnion()

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPrice) MarshalJSON added in v0.116.0

func (r BetaExternalPlanIDNewPlanVersionParamsAddPricesPrice) MarshalJSON() (data []byte, err error)

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceCadence added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceCadence string

The cadence to bill for this price on.

const (
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceCadenceAnnual     BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceCadence = "annual"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceCadenceSemiAnnual BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceCadence = "semi_annual"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceCadenceMonthly    BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceCadence = "monthly"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceCadenceQuarterly  BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceCadence = "quarterly"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceCadenceOneTime    BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceCadence = "one_time"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceCadenceCustom     BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceCadence = "custom"
)

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceCadence) IsKnown added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType string
const (
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeUnit                            BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "unit"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypePackage                         BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "package"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeMatrix                          BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "matrix"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeTiered                          BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "tiered"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeTieredBPS                       BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "tiered_bps"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeBPS                             BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "bps"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeBulkBPS                         BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "bulk_bps"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeBulk                            BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "bulk"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeThresholdTotalAmount            BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "threshold_total_amount"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeTieredPackage                   BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "tiered_package"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeTieredWithMinimum               BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "tiered_with_minimum"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeUnitWithPercent                 BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "unit_with_percent"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypePackageWithAllocation           BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "package_with_allocation"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeTieredWithProration             BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "tiered_with_proration"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeUnitWithProration               BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "unit_with_proration"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeGroupedAllocation               BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "grouped_allocation"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeGroupedWithProratedMinimum      BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "grouped_with_prorated_minimum"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeGroupedWithMeteredMinimum       BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "grouped_with_metered_minimum"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeMatrixWithDisplayName           BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "matrix_with_display_name"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeBulkWithProration               BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "bulk_with_proration"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeGroupedTieredPackage            BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "grouped_tiered_package"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeMaxGroupTieredPackage           BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "max_group_tiered_package"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeScalableMatrixWithUnitPricing   BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "scalable_matrix_with_unit_pricing"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeScalableMatrixWithTieredPricing BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "scalable_matrix_with_tiered_pricing"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeCumulativeGroupedBulk           BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "cumulative_grouped_bulk"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeTieredPackageWithMinimum        BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "tiered_package_with_minimum"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeMatrixWithAllocation            BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "matrix_with_allocation"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeGroupedTiered                   BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "grouped_tiered"
)

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType) IsKnown added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceUnion added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceUnion interface {
	ImplementsBetaExternalPlanIDNewPlanVersionParamsAddPricesPriceUnion()
}

The price to add to the plan

Satisfied by shared.NewPlanUnitPriceParam, shared.NewPlanPackagePriceParam, shared.NewPlanMatrixPriceParam, shared.NewPlanTieredPriceParam, shared.NewPlanTieredBPSPriceParam, shared.NewPlanBPSPriceParam, shared.NewPlanBulkBPSPriceParam, shared.NewPlanBulkPriceParam, shared.NewPlanThresholdTotalAmountPriceParam, shared.NewPlanTieredPackagePriceParam, shared.NewPlanTieredWithMinimumPriceParam, shared.NewPlanUnitWithPercentPriceParam, shared.NewPlanPackageWithAllocationPriceParam, shared.NewPlanTierWithProrationPriceParam, shared.NewPlanUnitWithProrationPriceParam, shared.NewPlanGroupedAllocationPriceParam, shared.NewPlanGroupedWithProratedMinimumPriceParam, shared.NewPlanGroupedWithMeteredMinimumPriceParam, shared.NewPlanMatrixWithDisplayNamePriceParam, shared.NewPlanBulkWithProrationPriceParam, shared.NewPlanGroupedTieredPackagePriceParam, shared.NewPlanMaxGroupTieredPackagePriceParam, shared.NewPlanScalableMatrixWithUnitPricingPriceParam, shared.NewPlanScalableMatrixWithTieredPricingPriceParam, shared.NewPlanCumulativeGroupedBulkPriceParam, shared.NewPlanTieredPackageWithMinimumPriceParam, shared.NewPlanMatrixWithAllocationPriceParam, shared.NewPlanGroupedTieredPriceParam, BetaExternalPlanIDNewPlanVersionParamsAddPricesPrice.

type BetaExternalPlanIDNewPlanVersionParamsRemoveAdjustment added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsRemoveAdjustment struct {
	// The id of the adjustment to remove from on the plan.
	AdjustmentID param.Field[string] `json:"adjustment_id,required"`
	// The phase to remove this adjustment from.
	PlanPhaseOrder param.Field[int64] `json:"plan_phase_order"`
}

func (BetaExternalPlanIDNewPlanVersionParamsRemoveAdjustment) MarshalJSON added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsRemovePrice added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsRemovePrice struct {
	// The id of the price to remove from the plan.
	PriceID param.Field[string] `json:"price_id,required"`
	// The phase to remove this price from.
	PlanPhaseOrder param.Field[int64] `json:"plan_phase_order"`
}

func (BetaExternalPlanIDNewPlanVersionParamsRemovePrice) MarshalJSON added in v0.116.0

func (r BetaExternalPlanIDNewPlanVersionParamsRemovePrice) MarshalJSON() (data []byte, err error)

type BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustment added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustment struct {
	// The definition of a new adjustment to create and add to the plan.
	Adjustment param.Field[BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentUnion] `json:"adjustment,required"`
	// The id of the adjustment on the plan to replace in the plan.
	ReplacesAdjustmentID param.Field[string] `json:"replaces_adjustment_id,required"`
	// The phase to replace this adjustment from.
	PlanPhaseOrder param.Field[int64] `json:"plan_phase_order"`
}

func (BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustment) MarshalJSON added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustment added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustment struct {
	AdjustmentType param.Field[BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentType] `json:"adjustment_type,required"`
	AmountDiscount param.Field[string]                                                                           `json:"amount_discount"`
	// If set, the adjustment will apply to every price on the subscription.
	AppliesToAll      param.Field[BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAppliesToAll] `json:"applies_to_all"`
	AppliesToItemIDs  param.Field[interface{}]                                                                    `json:"applies_to_item_ids"`
	AppliesToPriceIDs param.Field[interface{}]                                                                    `json:"applies_to_price_ids"`
	// If set, only prices in the specified currency will have the adjustment applied.
	Currency param.Field[string]      `json:"currency"`
	Filters  param.Field[interface{}] `json:"filters"`
	// When false, this adjustment will be applied to a single price. Otherwise, it
	// will be applied at the invoice level, possibly to multiple prices.
	IsInvoiceLevel param.Field[bool] `json:"is_invoice_level"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID             param.Field[string]  `json:"item_id"`
	MaximumAmount      param.Field[string]  `json:"maximum_amount"`
	MinimumAmount      param.Field[string]  `json:"minimum_amount"`
	PercentageDiscount param.Field[float64] `json:"percentage_discount"`
	// If set, only prices of the specified type will have the adjustment applied.
	PriceType     param.Field[BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceType] `json:"price_type"`
	UsageDiscount param.Field[float64]                                                                     `json:"usage_discount"`
}

The definition of a new adjustment to create and add to the plan.

func (BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustment) ImplementsBetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentUnion added in v0.121.0

func (r BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustment) ImplementsBetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentUnion()

func (BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustment) MarshalJSON added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentType added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentType string
const (
	BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentTypePercentageDiscount BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentType = "percentage_discount"
	BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentTypeUsageDiscount      BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentType = "usage_discount"
	BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentTypeAmountDiscount     BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentType = "amount_discount"
	BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentTypeMinimum            BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentType = "minimum"
	BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentTypeMaximum            BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentType = "maximum"
)

func (BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentType) IsKnown added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAppliesToAll added in v0.120.0

type BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAppliesToAll bool

If set, the adjustment will apply to every price on the subscription.

const (
	BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAppliesToAllTrue BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAppliesToAll = true
)

func (BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentAppliesToAll) IsKnown added in v0.120.0

type BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceType added in v0.120.0

type BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceType string

If set, only prices of the specified type will have the adjustment applied.

const (
	BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceTypeUsage          BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceType = "usage"
	BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceTypeFixedInAdvance BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceType = "fixed_in_advance"
	BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceTypeFixedInArrears BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceType = "fixed_in_arrears"
	BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceTypeFixed          BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceType = "fixed"
	BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceTypeInArrears      BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceType = "in_arrears"
)

func (BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceType) IsKnown added in v0.120.0

type BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentUnion added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentUnion interface {
	ImplementsBetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustmentUnion()
}

The definition of a new adjustment to create and add to the plan.

Satisfied by shared.NewPercentageDiscountParam, shared.NewUsageDiscountParam, shared.NewAmountDiscountParam, shared.NewMinimumParam, shared.NewMaximumParam, BetaExternalPlanIDNewPlanVersionParamsReplaceAdjustmentsAdjustment.

type BetaExternalPlanIDNewPlanVersionParamsReplacePrice added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePrice struct {
	// The id of the price on the plan to replace in the plan.
	ReplacesPriceID param.Field[string] `json:"replaces_price_id,required"`
	// The allocation price to add to the plan.
	AllocationPrice param.Field[shared.NewAllocationPriceParam] `json:"allocation_price"`
	// The phase to replace this price from.
	PlanPhaseOrder param.Field[int64] `json:"plan_phase_order"`
	// The price to add to the plan
	Price param.Field[BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceUnion] `json:"price"`
}

func (BetaExternalPlanIDNewPlanVersionParamsReplacePrice) MarshalJSON added in v0.116.0

func (r BetaExternalPlanIDNewPlanVersionParamsReplacePrice) MarshalJSON() (data []byte, err error)

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPrice added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                            `json:"item_id,required"`
	ModelType param.Field[BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	BPSConfig                 param.Field[shared.BPSConfigParam]                    `json:"bps_config"`
	BulkBPSConfig             param.Field[shared.BulkBPSConfigParam]                `json:"bulk_bps_config"`
	BulkConfig                param.Field[shared.BulkConfigParam]                   `json:"bulk_config"`
	BulkWithProrationConfig   param.Field[interface{}]                              `json:"bulk_with_proration_config"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate              param.Field[float64]     `json:"conversion_rate"`
	ConversionRateConfig        param.Field[interface{}] `json:"conversion_rate_config"`
	CumulativeGroupedBulkConfig param.Field[interface{}] `json:"cumulative_grouped_bulk_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity               param.Field[float64]     `json:"fixed_price_quantity"`
	GroupedAllocationConfig          param.Field[interface{}] `json:"grouped_allocation_config"`
	GroupedTieredConfig              param.Field[interface{}] `json:"grouped_tiered_config"`
	GroupedTieredPackageConfig       param.Field[interface{}] `json:"grouped_tiered_package_config"`
	GroupedWithMeteredMinimumConfig  param.Field[interface{}] `json:"grouped_with_metered_minimum_config"`
	GroupedWithProratedMinimumConfig param.Field[interface{}] `json:"grouped_with_prorated_minimum_config"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration           param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	MatrixConfig                          param.Field[shared.MatrixConfigParam]                 `json:"matrix_config"`
	MatrixWithAllocationConfig            param.Field[shared.MatrixWithAllocationConfigParam]   `json:"matrix_with_allocation_config"`
	MatrixWithDisplayNameConfig           param.Field[interface{}]                              `json:"matrix_with_display_name_config"`
	MaxGroupTieredPackageConfig           param.Field[interface{}]                              `json:"max_group_tiered_package_config"`
	Metadata                              param.Field[interface{}]                              `json:"metadata"`
	PackageConfig                         param.Field[shared.PackageConfigParam]                `json:"package_config"`
	PackageWithAllocationConfig           param.Field[interface{}]                              `json:"package_with_allocation_config"`
	ScalableMatrixWithTieredPricingConfig param.Field[interface{}]                              `json:"scalable_matrix_with_tiered_pricing_config"`
	ScalableMatrixWithUnitPricingConfig   param.Field[interface{}]                              `json:"scalable_matrix_with_unit_pricing_config"`
	ThresholdTotalAmountConfig            param.Field[interface{}]                              `json:"threshold_total_amount_config"`
	TieredBPSConfig                       param.Field[shared.TieredBPSConfigParam]              `json:"tiered_bps_config"`
	TieredConfig                          param.Field[shared.TieredConfigParam]                 `json:"tiered_config"`
	TieredPackageConfig                   param.Field[interface{}]                              `json:"tiered_package_config"`
	TieredPackageWithMinimumConfig        param.Field[interface{}]                              `json:"tiered_package_with_minimum_config"`
	TieredWithMinimumConfig               param.Field[interface{}]                              `json:"tiered_with_minimum_config"`
	TieredWithProrationConfig             param.Field[interface{}]                              `json:"tiered_with_proration_config"`
	UnitConfig                            param.Field[shared.UnitConfigParam]                   `json:"unit_config"`
	UnitWithPercentConfig                 param.Field[interface{}]                              `json:"unit_with_percent_config"`
	UnitWithProrationConfig               param.Field[interface{}]                              `json:"unit_with_proration_config"`
}

The price to add to the plan

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPrice) ImplementsBetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceUnion added in v0.121.0

func (r BetaExternalPlanIDNewPlanVersionParamsReplacePricesPrice) ImplementsBetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceUnion()

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPrice) MarshalJSON added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceCadence added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceCadence string

The cadence to bill for this price on.

const (
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceCadenceAnnual     BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceCadence = "annual"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceCadenceSemiAnnual BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceCadence = "semi_annual"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceCadenceMonthly    BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceCadence = "monthly"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceCadenceQuarterly  BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceCadence = "quarterly"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceCadenceOneTime    BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceCadence = "one_time"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceCadenceCustom     BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceCadence = "custom"
)

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceCadence) IsKnown added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType string
const (
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeUnit                            BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "unit"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypePackage                         BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "package"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeMatrix                          BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "matrix"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeTiered                          BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "tiered"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeTieredBPS                       BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "tiered_bps"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeBPS                             BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "bps"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeBulkBPS                         BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "bulk_bps"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeBulk                            BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "bulk"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeThresholdTotalAmount            BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "threshold_total_amount"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeTieredPackage                   BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "tiered_package"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeTieredWithMinimum               BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "tiered_with_minimum"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeUnitWithPercent                 BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "unit_with_percent"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypePackageWithAllocation           BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "package_with_allocation"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeTieredWithProration             BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "tiered_with_proration"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeUnitWithProration               BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "unit_with_proration"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeGroupedAllocation               BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "grouped_allocation"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeGroupedWithProratedMinimum      BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "grouped_with_prorated_minimum"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeGroupedWithMeteredMinimum       BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "grouped_with_metered_minimum"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeMatrixWithDisplayName           BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "matrix_with_display_name"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeBulkWithProration               BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "bulk_with_proration"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeGroupedTieredPackage            BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "grouped_tiered_package"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeMaxGroupTieredPackage           BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "max_group_tiered_package"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeScalableMatrixWithUnitPricing   BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "scalable_matrix_with_unit_pricing"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeScalableMatrixWithTieredPricing BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "scalable_matrix_with_tiered_pricing"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeCumulativeGroupedBulk           BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "cumulative_grouped_bulk"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeTieredPackageWithMinimum        BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "tiered_package_with_minimum"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeMatrixWithAllocation            BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "matrix_with_allocation"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeGroupedTiered                   BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "grouped_tiered"
)

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType) IsKnown added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceUnion added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceUnion interface {
	ImplementsBetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceUnion()
}

The price to add to the plan

Satisfied by shared.NewPlanUnitPriceParam, shared.NewPlanPackagePriceParam, shared.NewPlanMatrixPriceParam, shared.NewPlanTieredPriceParam, shared.NewPlanTieredBPSPriceParam, shared.NewPlanBPSPriceParam, shared.NewPlanBulkBPSPriceParam, shared.NewPlanBulkPriceParam, shared.NewPlanThresholdTotalAmountPriceParam, shared.NewPlanTieredPackagePriceParam, shared.NewPlanTieredWithMinimumPriceParam, shared.NewPlanUnitWithPercentPriceParam, shared.NewPlanPackageWithAllocationPriceParam, shared.NewPlanTierWithProrationPriceParam, shared.NewPlanUnitWithProrationPriceParam, shared.NewPlanGroupedAllocationPriceParam, shared.NewPlanGroupedWithProratedMinimumPriceParam, shared.NewPlanGroupedWithMeteredMinimumPriceParam, shared.NewPlanMatrixWithDisplayNamePriceParam, shared.NewPlanBulkWithProrationPriceParam, shared.NewPlanGroupedTieredPackagePriceParam, shared.NewPlanMaxGroupTieredPackagePriceParam, shared.NewPlanScalableMatrixWithUnitPricingPriceParam, shared.NewPlanScalableMatrixWithTieredPricingPriceParam, shared.NewPlanCumulativeGroupedBulkPriceParam, shared.NewPlanTieredPackageWithMinimumPriceParam, shared.NewPlanMatrixWithAllocationPriceParam, shared.NewPlanGroupedTieredPriceParam, BetaExternalPlanIDNewPlanVersionParamsReplacePricesPrice.

type BetaExternalPlanIDService added in v0.116.0

type BetaExternalPlanIDService struct {
	Options []option.RequestOption
}

BetaExternalPlanIDService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBetaExternalPlanIDService method instead.

func NewBetaExternalPlanIDService added in v0.116.0

func NewBetaExternalPlanIDService(opts ...option.RequestOption) (r *BetaExternalPlanIDService)

NewBetaExternalPlanIDService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*BetaExternalPlanIDService) FetchPlanVersion added in v0.116.0

func (r *BetaExternalPlanIDService) FetchPlanVersion(ctx context.Context, externalPlanID string, version string, opts ...option.RequestOption) (res *PlanVersion, err error)

This API endpoint is in beta and its interface may change. It is recommended for use only in test mode.

This endpoint is used to fetch a plan version. It returns the phases, prices, and adjustments present on this version of the plan.

func (*BetaExternalPlanIDService) NewPlanVersion added in v0.116.0

func (r *BetaExternalPlanIDService) NewPlanVersion(ctx context.Context, externalPlanID string, body BetaExternalPlanIDNewPlanVersionParams, opts ...option.RequestOption) (res *PlanVersion, err error)

This API endpoint is in beta and its interface may change. It is recommended for use only in test mode.

This endpoint allows the creation of a new plan version for an existing plan.

func (*BetaExternalPlanIDService) SetDefaultPlanVersion added in v0.116.0

func (r *BetaExternalPlanIDService) SetDefaultPlanVersion(ctx context.Context, externalPlanID string, body BetaExternalPlanIDSetDefaultPlanVersionParams, opts ...option.RequestOption) (res *Plan, err error)

This API endpoint is in beta and its interface may change. It is recommended for use only in test mode.

This endpoint allows setting the default version of a plan.

type BetaExternalPlanIDSetDefaultPlanVersionParams added in v0.116.0

type BetaExternalPlanIDSetDefaultPlanVersionParams struct {
	// Plan version to set as the default.
	Version param.Field[int64] `json:"version,required"`
}

func (BetaExternalPlanIDSetDefaultPlanVersionParams) MarshalJSON added in v0.116.0

func (r BetaExternalPlanIDSetDefaultPlanVersionParams) MarshalJSON() (data []byte, err error)

type BetaNewPlanVersionParams added in v0.116.0

type BetaNewPlanVersionParams struct {
	// New version number.
	Version param.Field[int64] `json:"version,required"`
	// Additional adjustments to be added to the plan.
	AddAdjustments param.Field[[]BetaNewPlanVersionParamsAddAdjustment] `json:"add_adjustments"`
	// Additional prices to be added to the plan.
	AddPrices param.Field[[]BetaNewPlanVersionParamsAddPrice] `json:"add_prices"`
	// Adjustments to be removed from the plan.
	RemoveAdjustments param.Field[[]BetaNewPlanVersionParamsRemoveAdjustment] `json:"remove_adjustments"`
	// Prices to be removed from the plan.
	RemovePrices param.Field[[]BetaNewPlanVersionParamsRemovePrice] `json:"remove_prices"`
	// Adjustments to be replaced with additional adjustments on the plan.
	ReplaceAdjustments param.Field[[]BetaNewPlanVersionParamsReplaceAdjustment] `json:"replace_adjustments"`
	// Prices to be replaced with additional prices on the plan.
	ReplacePrices param.Field[[]BetaNewPlanVersionParamsReplacePrice] `json:"replace_prices"`
	// Set this new plan version as the default
	SetAsDefault param.Field[bool] `json:"set_as_default"`
}

func (BetaNewPlanVersionParams) MarshalJSON added in v0.116.0

func (r BetaNewPlanVersionParams) MarshalJSON() (data []byte, err error)

type BetaNewPlanVersionParamsAddAdjustment added in v0.116.0

type BetaNewPlanVersionParamsAddAdjustment struct {
	// The definition of a new adjustment to create and add to the plan.
	Adjustment param.Field[BetaNewPlanVersionParamsAddAdjustmentsAdjustmentUnion] `json:"adjustment,required"`
	// The phase to add this adjustment to.
	PlanPhaseOrder param.Field[int64] `json:"plan_phase_order"`
}

func (BetaNewPlanVersionParamsAddAdjustment) MarshalJSON added in v0.116.0

func (r BetaNewPlanVersionParamsAddAdjustment) MarshalJSON() (data []byte, err error)

type BetaNewPlanVersionParamsAddAdjustmentsAdjustment added in v0.116.0

type BetaNewPlanVersionParamsAddAdjustmentsAdjustment struct {
	AdjustmentType param.Field[BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentType] `json:"adjustment_type,required"`
	AmountDiscount param.Field[string]                                                         `json:"amount_discount"`
	// If set, the adjustment will apply to every price on the subscription.
	AppliesToAll      param.Field[BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAppliesToAll] `json:"applies_to_all"`
	AppliesToItemIDs  param.Field[interface{}]                                                  `json:"applies_to_item_ids"`
	AppliesToPriceIDs param.Field[interface{}]                                                  `json:"applies_to_price_ids"`
	// If set, only prices in the specified currency will have the adjustment applied.
	Currency param.Field[string]      `json:"currency"`
	Filters  param.Field[interface{}] `json:"filters"`
	// When false, this adjustment will be applied to a single price. Otherwise, it
	// will be applied at the invoice level, possibly to multiple prices.
	IsInvoiceLevel param.Field[bool] `json:"is_invoice_level"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID             param.Field[string]  `json:"item_id"`
	MaximumAmount      param.Field[string]  `json:"maximum_amount"`
	MinimumAmount      param.Field[string]  `json:"minimum_amount"`
	PercentageDiscount param.Field[float64] `json:"percentage_discount"`
	// If set, only prices of the specified type will have the adjustment applied.
	PriceType     param.Field[BetaNewPlanVersionParamsAddAdjustmentsAdjustmentPriceType] `json:"price_type"`
	UsageDiscount param.Field[float64]                                                   `json:"usage_discount"`
}

The definition of a new adjustment to create and add to the plan.

func (BetaNewPlanVersionParamsAddAdjustmentsAdjustment) ImplementsBetaNewPlanVersionParamsAddAdjustmentsAdjustmentUnion added in v0.121.0

func (r BetaNewPlanVersionParamsAddAdjustmentsAdjustment) ImplementsBetaNewPlanVersionParamsAddAdjustmentsAdjustmentUnion()

func (BetaNewPlanVersionParamsAddAdjustmentsAdjustment) MarshalJSON added in v0.116.0

func (r BetaNewPlanVersionParamsAddAdjustmentsAdjustment) MarshalJSON() (data []byte, err error)

type BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentType added in v0.116.0

type BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentType string
const (
	BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentTypePercentageDiscount BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentType = "percentage_discount"
	BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentTypeUsageDiscount      BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentType = "usage_discount"
	BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentTypeAmountDiscount     BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentType = "amount_discount"
	BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentTypeMinimum            BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentType = "minimum"
	BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentTypeMaximum            BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentType = "maximum"
)

func (BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAdjustmentType) IsKnown added in v0.116.0

type BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAppliesToAll added in v0.120.0

type BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAppliesToAll bool

If set, the adjustment will apply to every price on the subscription.

const (
	BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAppliesToAllTrue BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAppliesToAll = true
)

func (BetaNewPlanVersionParamsAddAdjustmentsAdjustmentAppliesToAll) IsKnown added in v0.120.0

type BetaNewPlanVersionParamsAddAdjustmentsAdjustmentPriceType added in v0.120.0

type BetaNewPlanVersionParamsAddAdjustmentsAdjustmentPriceType string

If set, only prices of the specified type will have the adjustment applied.

const (
	BetaNewPlanVersionParamsAddAdjustmentsAdjustmentPriceTypeUsage          BetaNewPlanVersionParamsAddAdjustmentsAdjustmentPriceType = "usage"
	BetaNewPlanVersionParamsAddAdjustmentsAdjustmentPriceTypeFixedInAdvance BetaNewPlanVersionParamsAddAdjustmentsAdjustmentPriceType = "fixed_in_advance"
	BetaNewPlanVersionParamsAddAdjustmentsAdjustmentPriceTypeFixedInArrears BetaNewPlanVersionParamsAddAdjustmentsAdjustmentPriceType = "fixed_in_arrears"
	BetaNewPlanVersionParamsAddAdjustmentsAdjustmentPriceTypeFixed          BetaNewPlanVersionParamsAddAdjustmentsAdjustmentPriceType = "fixed"
	BetaNewPlanVersionParamsAddAdjustmentsAdjustmentPriceTypeInArrears      BetaNewPlanVersionParamsAddAdjustmentsAdjustmentPriceType = "in_arrears"
)

func (BetaNewPlanVersionParamsAddAdjustmentsAdjustmentPriceType) IsKnown added in v0.120.0

type BetaNewPlanVersionParamsAddAdjustmentsAdjustmentUnion added in v0.116.0

type BetaNewPlanVersionParamsAddAdjustmentsAdjustmentUnion interface {
	ImplementsBetaNewPlanVersionParamsAddAdjustmentsAdjustmentUnion()
}

The definition of a new adjustment to create and add to the plan.

Satisfied by shared.NewPercentageDiscountParam, shared.NewUsageDiscountParam, shared.NewAmountDiscountParam, shared.NewMinimumParam, shared.NewMaximumParam, BetaNewPlanVersionParamsAddAdjustmentsAdjustment.

type BetaNewPlanVersionParamsAddPrice added in v0.116.0

type BetaNewPlanVersionParamsAddPrice struct {
	// The allocation price to add to the plan.
	AllocationPrice param.Field[shared.NewAllocationPriceParam] `json:"allocation_price"`
	// The phase to add this price to.
	PlanPhaseOrder param.Field[int64] `json:"plan_phase_order"`
	// The price to add to the plan
	Price param.Field[BetaNewPlanVersionParamsAddPricesPriceUnion] `json:"price"`
}

func (BetaNewPlanVersionParamsAddPrice) MarshalJSON added in v0.116.0

func (r BetaNewPlanVersionParamsAddPrice) MarshalJSON() (data []byte, err error)

type BetaNewPlanVersionParamsAddPricesPrice added in v0.116.0

type BetaNewPlanVersionParamsAddPricesPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[BetaNewPlanVersionParamsAddPricesPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                          `json:"item_id,required"`
	ModelType param.Field[BetaNewPlanVersionParamsAddPricesPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	BPSConfig                 param.Field[shared.BPSConfigParam]                    `json:"bps_config"`
	BulkBPSConfig             param.Field[shared.BulkBPSConfigParam]                `json:"bulk_bps_config"`
	BulkConfig                param.Field[shared.BulkConfigParam]                   `json:"bulk_config"`
	BulkWithProrationConfig   param.Field[interface{}]                              `json:"bulk_with_proration_config"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate              param.Field[float64]     `json:"conversion_rate"`
	ConversionRateConfig        param.Field[interface{}] `json:"conversion_rate_config"`
	CumulativeGroupedBulkConfig param.Field[interface{}] `json:"cumulative_grouped_bulk_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity               param.Field[float64]     `json:"fixed_price_quantity"`
	GroupedAllocationConfig          param.Field[interface{}] `json:"grouped_allocation_config"`
	GroupedTieredConfig              param.Field[interface{}] `json:"grouped_tiered_config"`
	GroupedTieredPackageConfig       param.Field[interface{}] `json:"grouped_tiered_package_config"`
	GroupedWithMeteredMinimumConfig  param.Field[interface{}] `json:"grouped_with_metered_minimum_config"`
	GroupedWithProratedMinimumConfig param.Field[interface{}] `json:"grouped_with_prorated_minimum_config"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration           param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	MatrixConfig                          param.Field[shared.MatrixConfigParam]                 `json:"matrix_config"`
	MatrixWithAllocationConfig            param.Field[shared.MatrixWithAllocationConfigParam]   `json:"matrix_with_allocation_config"`
	MatrixWithDisplayNameConfig           param.Field[interface{}]                              `json:"matrix_with_display_name_config"`
	MaxGroupTieredPackageConfig           param.Field[interface{}]                              `json:"max_group_tiered_package_config"`
	Metadata                              param.Field[interface{}]                              `json:"metadata"`
	PackageConfig                         param.Field[shared.PackageConfigParam]                `json:"package_config"`
	PackageWithAllocationConfig           param.Field[interface{}]                              `json:"package_with_allocation_config"`
	ScalableMatrixWithTieredPricingConfig param.Field[interface{}]                              `json:"scalable_matrix_with_tiered_pricing_config"`
	ScalableMatrixWithUnitPricingConfig   param.Field[interface{}]                              `json:"scalable_matrix_with_unit_pricing_config"`
	ThresholdTotalAmountConfig            param.Field[interface{}]                              `json:"threshold_total_amount_config"`
	TieredBPSConfig                       param.Field[shared.TieredBPSConfigParam]              `json:"tiered_bps_config"`
	TieredConfig                          param.Field[shared.TieredConfigParam]                 `json:"tiered_config"`
	TieredPackageConfig                   param.Field[interface{}]                              `json:"tiered_package_config"`
	TieredPackageWithMinimumConfig        param.Field[interface{}]                              `json:"tiered_package_with_minimum_config"`
	TieredWithMinimumConfig               param.Field[interface{}]                              `json:"tiered_with_minimum_config"`
	TieredWithProrationConfig             param.Field[interface{}]                              `json:"tiered_with_proration_config"`
	UnitConfig                            param.Field[shared.UnitConfigParam]                   `json:"unit_config"`
	UnitWithPercentConfig                 param.Field[interface{}]                              `json:"unit_with_percent_config"`
	UnitWithProrationConfig               param.Field[interface{}]                              `json:"unit_with_proration_config"`
}

The price to add to the plan

func (BetaNewPlanVersionParamsAddPricesPrice) ImplementsBetaNewPlanVersionParamsAddPricesPriceUnion added in v0.121.0

func (r BetaNewPlanVersionParamsAddPricesPrice) ImplementsBetaNewPlanVersionParamsAddPricesPriceUnion()

func (BetaNewPlanVersionParamsAddPricesPrice) MarshalJSON added in v0.116.0

func (r BetaNewPlanVersionParamsAddPricesPrice) MarshalJSON() (data []byte, err error)

type BetaNewPlanVersionParamsAddPricesPriceCadence added in v0.116.0

type BetaNewPlanVersionParamsAddPricesPriceCadence string

The cadence to bill for this price on.

const (
	BetaNewPlanVersionParamsAddPricesPriceCadenceAnnual     BetaNewPlanVersionParamsAddPricesPriceCadence = "annual"
	BetaNewPlanVersionParamsAddPricesPriceCadenceSemiAnnual BetaNewPlanVersionParamsAddPricesPriceCadence = "semi_annual"
	BetaNewPlanVersionParamsAddPricesPriceCadenceMonthly    BetaNewPlanVersionParamsAddPricesPriceCadence = "monthly"
	BetaNewPlanVersionParamsAddPricesPriceCadenceQuarterly  BetaNewPlanVersionParamsAddPricesPriceCadence = "quarterly"
	BetaNewPlanVersionParamsAddPricesPriceCadenceOneTime    BetaNewPlanVersionParamsAddPricesPriceCadence = "one_time"
	BetaNewPlanVersionParamsAddPricesPriceCadenceCustom     BetaNewPlanVersionParamsAddPricesPriceCadence = "custom"
)

func (BetaNewPlanVersionParamsAddPricesPriceCadence) IsKnown added in v0.116.0

type BetaNewPlanVersionParamsAddPricesPriceModelType added in v0.116.0

type BetaNewPlanVersionParamsAddPricesPriceModelType string
const (
	BetaNewPlanVersionParamsAddPricesPriceModelTypeUnit                            BetaNewPlanVersionParamsAddPricesPriceModelType = "unit"
	BetaNewPlanVersionParamsAddPricesPriceModelTypePackage                         BetaNewPlanVersionParamsAddPricesPriceModelType = "package"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeMatrix                          BetaNewPlanVersionParamsAddPricesPriceModelType = "matrix"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeTiered                          BetaNewPlanVersionParamsAddPricesPriceModelType = "tiered"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeTieredBPS                       BetaNewPlanVersionParamsAddPricesPriceModelType = "tiered_bps"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeBPS                             BetaNewPlanVersionParamsAddPricesPriceModelType = "bps"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeBulkBPS                         BetaNewPlanVersionParamsAddPricesPriceModelType = "bulk_bps"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeBulk                            BetaNewPlanVersionParamsAddPricesPriceModelType = "bulk"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeThresholdTotalAmount            BetaNewPlanVersionParamsAddPricesPriceModelType = "threshold_total_amount"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeTieredPackage                   BetaNewPlanVersionParamsAddPricesPriceModelType = "tiered_package"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeTieredWithMinimum               BetaNewPlanVersionParamsAddPricesPriceModelType = "tiered_with_minimum"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeUnitWithPercent                 BetaNewPlanVersionParamsAddPricesPriceModelType = "unit_with_percent"
	BetaNewPlanVersionParamsAddPricesPriceModelTypePackageWithAllocation           BetaNewPlanVersionParamsAddPricesPriceModelType = "package_with_allocation"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeTieredWithProration             BetaNewPlanVersionParamsAddPricesPriceModelType = "tiered_with_proration"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeUnitWithProration               BetaNewPlanVersionParamsAddPricesPriceModelType = "unit_with_proration"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeGroupedAllocation               BetaNewPlanVersionParamsAddPricesPriceModelType = "grouped_allocation"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeGroupedWithProratedMinimum      BetaNewPlanVersionParamsAddPricesPriceModelType = "grouped_with_prorated_minimum"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeGroupedWithMeteredMinimum       BetaNewPlanVersionParamsAddPricesPriceModelType = "grouped_with_metered_minimum"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeMatrixWithDisplayName           BetaNewPlanVersionParamsAddPricesPriceModelType = "matrix_with_display_name"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeBulkWithProration               BetaNewPlanVersionParamsAddPricesPriceModelType = "bulk_with_proration"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeGroupedTieredPackage            BetaNewPlanVersionParamsAddPricesPriceModelType = "grouped_tiered_package"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeMaxGroupTieredPackage           BetaNewPlanVersionParamsAddPricesPriceModelType = "max_group_tiered_package"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeScalableMatrixWithUnitPricing   BetaNewPlanVersionParamsAddPricesPriceModelType = "scalable_matrix_with_unit_pricing"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeScalableMatrixWithTieredPricing BetaNewPlanVersionParamsAddPricesPriceModelType = "scalable_matrix_with_tiered_pricing"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeCumulativeGroupedBulk           BetaNewPlanVersionParamsAddPricesPriceModelType = "cumulative_grouped_bulk"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeTieredPackageWithMinimum        BetaNewPlanVersionParamsAddPricesPriceModelType = "tiered_package_with_minimum"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeMatrixWithAllocation            BetaNewPlanVersionParamsAddPricesPriceModelType = "matrix_with_allocation"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeGroupedTiered                   BetaNewPlanVersionParamsAddPricesPriceModelType = "grouped_tiered"
)

func (BetaNewPlanVersionParamsAddPricesPriceModelType) IsKnown added in v0.116.0

type BetaNewPlanVersionParamsRemoveAdjustment added in v0.116.0

type BetaNewPlanVersionParamsRemoveAdjustment struct {
	// The id of the adjustment to remove from on the plan.
	AdjustmentID param.Field[string] `json:"adjustment_id,required"`
	// The phase to remove this adjustment from.
	PlanPhaseOrder param.Field[int64] `json:"plan_phase_order"`
}

func (BetaNewPlanVersionParamsRemoveAdjustment) MarshalJSON added in v0.116.0

func (r BetaNewPlanVersionParamsRemoveAdjustment) MarshalJSON() (data []byte, err error)

type BetaNewPlanVersionParamsRemovePrice added in v0.116.0

type BetaNewPlanVersionParamsRemovePrice struct {
	// The id of the price to remove from the plan.
	PriceID param.Field[string] `json:"price_id,required"`
	// The phase to remove this price from.
	PlanPhaseOrder param.Field[int64] `json:"plan_phase_order"`
}

func (BetaNewPlanVersionParamsRemovePrice) MarshalJSON added in v0.116.0

func (r BetaNewPlanVersionParamsRemovePrice) MarshalJSON() (data []byte, err error)

type BetaNewPlanVersionParamsReplaceAdjustment added in v0.116.0

type BetaNewPlanVersionParamsReplaceAdjustment struct {
	// The definition of a new adjustment to create and add to the plan.
	Adjustment param.Field[BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentUnion] `json:"adjustment,required"`
	// The id of the adjustment on the plan to replace in the plan.
	ReplacesAdjustmentID param.Field[string] `json:"replaces_adjustment_id,required"`
	// The phase to replace this adjustment from.
	PlanPhaseOrder param.Field[int64] `json:"plan_phase_order"`
}

func (BetaNewPlanVersionParamsReplaceAdjustment) MarshalJSON added in v0.116.0

func (r BetaNewPlanVersionParamsReplaceAdjustment) MarshalJSON() (data []byte, err error)

type BetaNewPlanVersionParamsReplaceAdjustmentsAdjustment added in v0.116.0

type BetaNewPlanVersionParamsReplaceAdjustmentsAdjustment struct {
	AdjustmentType param.Field[BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentType] `json:"adjustment_type,required"`
	AmountDiscount param.Field[string]                                                             `json:"amount_discount"`
	// If set, the adjustment will apply to every price on the subscription.
	AppliesToAll      param.Field[BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAppliesToAll] `json:"applies_to_all"`
	AppliesToItemIDs  param.Field[interface{}]                                                      `json:"applies_to_item_ids"`
	AppliesToPriceIDs param.Field[interface{}]                                                      `json:"applies_to_price_ids"`
	// If set, only prices in the specified currency will have the adjustment applied.
	Currency param.Field[string]      `json:"currency"`
	Filters  param.Field[interface{}] `json:"filters"`
	// When false, this adjustment will be applied to a single price. Otherwise, it
	// will be applied at the invoice level, possibly to multiple prices.
	IsInvoiceLevel param.Field[bool] `json:"is_invoice_level"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID             param.Field[string]  `json:"item_id"`
	MaximumAmount      param.Field[string]  `json:"maximum_amount"`
	MinimumAmount      param.Field[string]  `json:"minimum_amount"`
	PercentageDiscount param.Field[float64] `json:"percentage_discount"`
	// If set, only prices of the specified type will have the adjustment applied.
	PriceType     param.Field[BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceType] `json:"price_type"`
	UsageDiscount param.Field[float64]                                                       `json:"usage_discount"`
}

The definition of a new adjustment to create and add to the plan.

func (BetaNewPlanVersionParamsReplaceAdjustmentsAdjustment) ImplementsBetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentUnion added in v0.121.0

func (r BetaNewPlanVersionParamsReplaceAdjustmentsAdjustment) ImplementsBetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentUnion()

func (BetaNewPlanVersionParamsReplaceAdjustmentsAdjustment) MarshalJSON added in v0.116.0

func (r BetaNewPlanVersionParamsReplaceAdjustmentsAdjustment) MarshalJSON() (data []byte, err error)

type BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentType added in v0.116.0

type BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentType string
const (
	BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentTypePercentageDiscount BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentType = "percentage_discount"
	BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentTypeUsageDiscount      BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentType = "usage_discount"
	BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentTypeAmountDiscount     BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentType = "amount_discount"
	BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentTypeMinimum            BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentType = "minimum"
	BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentTypeMaximum            BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentType = "maximum"
)

func (BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAdjustmentType) IsKnown added in v0.116.0

type BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAppliesToAll added in v0.120.0

type BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAppliesToAll bool

If set, the adjustment will apply to every price on the subscription.

const (
	BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAppliesToAllTrue BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAppliesToAll = true
)

func (BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentAppliesToAll) IsKnown added in v0.120.0

type BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceType added in v0.120.0

type BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceType string

If set, only prices of the specified type will have the adjustment applied.

const (
	BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceTypeUsage          BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceType = "usage"
	BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceTypeFixedInAdvance BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceType = "fixed_in_advance"
	BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceTypeFixedInArrears BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceType = "fixed_in_arrears"
	BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceTypeFixed          BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceType = "fixed"
	BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceTypeInArrears      BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceType = "in_arrears"
)

func (BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentPriceType) IsKnown added in v0.120.0

type BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentUnion added in v0.116.0

type BetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentUnion interface {
	ImplementsBetaNewPlanVersionParamsReplaceAdjustmentsAdjustmentUnion()
}

The definition of a new adjustment to create and add to the plan.

Satisfied by shared.NewPercentageDiscountParam, shared.NewUsageDiscountParam, shared.NewAmountDiscountParam, shared.NewMinimumParam, shared.NewMaximumParam, BetaNewPlanVersionParamsReplaceAdjustmentsAdjustment.

type BetaNewPlanVersionParamsReplacePrice added in v0.116.0

type BetaNewPlanVersionParamsReplacePrice struct {
	// The id of the price on the plan to replace in the plan.
	ReplacesPriceID param.Field[string] `json:"replaces_price_id,required"`
	// The allocation price to add to the plan.
	AllocationPrice param.Field[shared.NewAllocationPriceParam] `json:"allocation_price"`
	// The phase to replace this price from.
	PlanPhaseOrder param.Field[int64] `json:"plan_phase_order"`
	// The price to add to the plan
	Price param.Field[BetaNewPlanVersionParamsReplacePricesPriceUnion] `json:"price"`
}

func (BetaNewPlanVersionParamsReplacePrice) MarshalJSON added in v0.116.0

func (r BetaNewPlanVersionParamsReplacePrice) MarshalJSON() (data []byte, err error)

type BetaNewPlanVersionParamsReplacePricesPrice added in v0.116.0

type BetaNewPlanVersionParamsReplacePricesPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[BetaNewPlanVersionParamsReplacePricesPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                              `json:"item_id,required"`
	ModelType param.Field[BetaNewPlanVersionParamsReplacePricesPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	BPSConfig                 param.Field[shared.BPSConfigParam]                    `json:"bps_config"`
	BulkBPSConfig             param.Field[shared.BulkBPSConfigParam]                `json:"bulk_bps_config"`
	BulkConfig                param.Field[shared.BulkConfigParam]                   `json:"bulk_config"`
	BulkWithProrationConfig   param.Field[interface{}]                              `json:"bulk_with_proration_config"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate              param.Field[float64]     `json:"conversion_rate"`
	ConversionRateConfig        param.Field[interface{}] `json:"conversion_rate_config"`
	CumulativeGroupedBulkConfig param.Field[interface{}] `json:"cumulative_grouped_bulk_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity               param.Field[float64]     `json:"fixed_price_quantity"`
	GroupedAllocationConfig          param.Field[interface{}] `json:"grouped_allocation_config"`
	GroupedTieredConfig              param.Field[interface{}] `json:"grouped_tiered_config"`
	GroupedTieredPackageConfig       param.Field[interface{}] `json:"grouped_tiered_package_config"`
	GroupedWithMeteredMinimumConfig  param.Field[interface{}] `json:"grouped_with_metered_minimum_config"`
	GroupedWithProratedMinimumConfig param.Field[interface{}] `json:"grouped_with_prorated_minimum_config"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration           param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	MatrixConfig                          param.Field[shared.MatrixConfigParam]                 `json:"matrix_config"`
	MatrixWithAllocationConfig            param.Field[shared.MatrixWithAllocationConfigParam]   `json:"matrix_with_allocation_config"`
	MatrixWithDisplayNameConfig           param.Field[interface{}]                              `json:"matrix_with_display_name_config"`
	MaxGroupTieredPackageConfig           param.Field[interface{}]                              `json:"max_group_tiered_package_config"`
	Metadata                              param.Field[interface{}]                              `json:"metadata"`
	PackageConfig                         param.Field[shared.PackageConfigParam]                `json:"package_config"`
	PackageWithAllocationConfig           param.Field[interface{}]                              `json:"package_with_allocation_config"`
	ScalableMatrixWithTieredPricingConfig param.Field[interface{}]                              `json:"scalable_matrix_with_tiered_pricing_config"`
	ScalableMatrixWithUnitPricingConfig   param.Field[interface{}]                              `json:"scalable_matrix_with_unit_pricing_config"`
	ThresholdTotalAmountConfig            param.Field[interface{}]                              `json:"threshold_total_amount_config"`
	TieredBPSConfig                       param.Field[shared.TieredBPSConfigParam]              `json:"tiered_bps_config"`
	TieredConfig                          param.Field[shared.TieredConfigParam]                 `json:"tiered_config"`
	TieredPackageConfig                   param.Field[interface{}]                              `json:"tiered_package_config"`
	TieredPackageWithMinimumConfig        param.Field[interface{}]                              `json:"tiered_package_with_minimum_config"`
	TieredWithMinimumConfig               param.Field[interface{}]                              `json:"tiered_with_minimum_config"`
	TieredWithProrationConfig             param.Field[interface{}]                              `json:"tiered_with_proration_config"`
	UnitConfig                            param.Field[shared.UnitConfigParam]                   `json:"unit_config"`
	UnitWithPercentConfig                 param.Field[interface{}]                              `json:"unit_with_percent_config"`
	UnitWithProrationConfig               param.Field[interface{}]                              `json:"unit_with_proration_config"`
}

The price to add to the plan

func (BetaNewPlanVersionParamsReplacePricesPrice) ImplementsBetaNewPlanVersionParamsReplacePricesPriceUnion added in v0.121.0

func (r BetaNewPlanVersionParamsReplacePricesPrice) ImplementsBetaNewPlanVersionParamsReplacePricesPriceUnion()

func (BetaNewPlanVersionParamsReplacePricesPrice) MarshalJSON added in v0.116.0

func (r BetaNewPlanVersionParamsReplacePricesPrice) MarshalJSON() (data []byte, err error)

type BetaNewPlanVersionParamsReplacePricesPriceCadence added in v0.116.0

type BetaNewPlanVersionParamsReplacePricesPriceCadence string

The cadence to bill for this price on.

const (
	BetaNewPlanVersionParamsReplacePricesPriceCadenceAnnual     BetaNewPlanVersionParamsReplacePricesPriceCadence = "annual"
	BetaNewPlanVersionParamsReplacePricesPriceCadenceSemiAnnual BetaNewPlanVersionParamsReplacePricesPriceCadence = "semi_annual"
	BetaNewPlanVersionParamsReplacePricesPriceCadenceMonthly    BetaNewPlanVersionParamsReplacePricesPriceCadence = "monthly"
	BetaNewPlanVersionParamsReplacePricesPriceCadenceQuarterly  BetaNewPlanVersionParamsReplacePricesPriceCadence = "quarterly"
	BetaNewPlanVersionParamsReplacePricesPriceCadenceOneTime    BetaNewPlanVersionParamsReplacePricesPriceCadence = "one_time"
	BetaNewPlanVersionParamsReplacePricesPriceCadenceCustom     BetaNewPlanVersionParamsReplacePricesPriceCadence = "custom"
)

func (BetaNewPlanVersionParamsReplacePricesPriceCadence) IsKnown added in v0.116.0

type BetaNewPlanVersionParamsReplacePricesPriceModelType added in v0.116.0

type BetaNewPlanVersionParamsReplacePricesPriceModelType string
const (
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeUnit                            BetaNewPlanVersionParamsReplacePricesPriceModelType = "unit"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypePackage                         BetaNewPlanVersionParamsReplacePricesPriceModelType = "package"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeMatrix                          BetaNewPlanVersionParamsReplacePricesPriceModelType = "matrix"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeTiered                          BetaNewPlanVersionParamsReplacePricesPriceModelType = "tiered"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeTieredBPS                       BetaNewPlanVersionParamsReplacePricesPriceModelType = "tiered_bps"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeBPS                             BetaNewPlanVersionParamsReplacePricesPriceModelType = "bps"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeBulkBPS                         BetaNewPlanVersionParamsReplacePricesPriceModelType = "bulk_bps"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeBulk                            BetaNewPlanVersionParamsReplacePricesPriceModelType = "bulk"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeThresholdTotalAmount            BetaNewPlanVersionParamsReplacePricesPriceModelType = "threshold_total_amount"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeTieredPackage                   BetaNewPlanVersionParamsReplacePricesPriceModelType = "tiered_package"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeTieredWithMinimum               BetaNewPlanVersionParamsReplacePricesPriceModelType = "tiered_with_minimum"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeUnitWithPercent                 BetaNewPlanVersionParamsReplacePricesPriceModelType = "unit_with_percent"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypePackageWithAllocation           BetaNewPlanVersionParamsReplacePricesPriceModelType = "package_with_allocation"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeTieredWithProration             BetaNewPlanVersionParamsReplacePricesPriceModelType = "tiered_with_proration"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeUnitWithProration               BetaNewPlanVersionParamsReplacePricesPriceModelType = "unit_with_proration"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeGroupedAllocation               BetaNewPlanVersionParamsReplacePricesPriceModelType = "grouped_allocation"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeGroupedWithProratedMinimum      BetaNewPlanVersionParamsReplacePricesPriceModelType = "grouped_with_prorated_minimum"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeGroupedWithMeteredMinimum       BetaNewPlanVersionParamsReplacePricesPriceModelType = "grouped_with_metered_minimum"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeMatrixWithDisplayName           BetaNewPlanVersionParamsReplacePricesPriceModelType = "matrix_with_display_name"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeBulkWithProration               BetaNewPlanVersionParamsReplacePricesPriceModelType = "bulk_with_proration"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeGroupedTieredPackage            BetaNewPlanVersionParamsReplacePricesPriceModelType = "grouped_tiered_package"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeMaxGroupTieredPackage           BetaNewPlanVersionParamsReplacePricesPriceModelType = "max_group_tiered_package"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeScalableMatrixWithUnitPricing   BetaNewPlanVersionParamsReplacePricesPriceModelType = "scalable_matrix_with_unit_pricing"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeScalableMatrixWithTieredPricing BetaNewPlanVersionParamsReplacePricesPriceModelType = "scalable_matrix_with_tiered_pricing"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeCumulativeGroupedBulk           BetaNewPlanVersionParamsReplacePricesPriceModelType = "cumulative_grouped_bulk"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeTieredPackageWithMinimum        BetaNewPlanVersionParamsReplacePricesPriceModelType = "tiered_package_with_minimum"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeMatrixWithAllocation            BetaNewPlanVersionParamsReplacePricesPriceModelType = "matrix_with_allocation"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeGroupedTiered                   BetaNewPlanVersionParamsReplacePricesPriceModelType = "grouped_tiered"
)

func (BetaNewPlanVersionParamsReplacePricesPriceModelType) IsKnown added in v0.116.0

type BetaService added in v0.12.0

type BetaService struct {
	Options        []option.RequestOption
	ExternalPlanID *BetaExternalPlanIDService
}

BetaService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBetaService method instead.

func NewBetaService added in v0.12.0

func NewBetaService(opts ...option.RequestOption) (r *BetaService)

NewBetaService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*BetaService) FetchPlanVersion added in v0.116.0

func (r *BetaService) FetchPlanVersion(ctx context.Context, planID string, version string, opts ...option.RequestOption) (res *PlanVersion, err error)

This API endpoint is in beta and its interface may change. It is recommended for use only in test mode.

This endpoint is used to fetch a plan version. It returns the phases, prices, and adjustments present on this version of the plan.

func (*BetaService) NewPlanVersion added in v0.116.0

func (r *BetaService) NewPlanVersion(ctx context.Context, planID string, body BetaNewPlanVersionParams, opts ...option.RequestOption) (res *PlanVersion, err error)

This API endpoint is in beta and its interface may change. It is recommended for use only in test mode.

This endpoint allows the creation of a new plan version for an existing plan.

func (*BetaService) SetDefaultPlanVersion added in v0.116.0

func (r *BetaService) SetDefaultPlanVersion(ctx context.Context, planID string, body BetaSetDefaultPlanVersionParams, opts ...option.RequestOption) (res *Plan, err error)

This API endpoint is in beta and its interface may change. It is recommended for use only in test mode.

This endpoint allows setting the default version of a plan.

type BetaSetDefaultPlanVersionParams added in v0.116.0

type BetaSetDefaultPlanVersionParams struct {
	// Plan version to set as the default.
	Version param.Field[int64] `json:"version,required"`
}

func (BetaSetDefaultPlanVersionParams) MarshalJSON added in v0.116.0

func (r BetaSetDefaultPlanVersionParams) MarshalJSON() (data []byte, err error)

type BillableMetric added in v0.50.0

type BillableMetric struct {
	ID          string `json:"id,required"`
	Description string `json:"description,required,nullable"`
	// The Item resource represents a sellable product or good. Items are associated
	// with all line items, billable metrics, and prices and are used for defining
	// external sync behavior for invoices and tax calculation purposes.
	Item Item `json:"item,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata map[string]string    `json:"metadata,required"`
	Name     string               `json:"name,required"`
	Status   BillableMetricStatus `json:"status,required"`
	JSON     billableMetricJSON   `json:"-"`
}

The Metric resource represents a calculation of a quantity based on events. Metrics are defined by the query that transforms raw usage events into meaningful values for your customers.

func (*BillableMetric) UnmarshalJSON added in v0.50.0

func (r *BillableMetric) UnmarshalJSON(data []byte) (err error)

type BillableMetricStatus added in v0.50.0

type BillableMetricStatus string
const (
	BillableMetricStatusActive   BillableMetricStatus = "active"
	BillableMetricStatusDraft    BillableMetricStatus = "draft"
	BillableMetricStatusArchived BillableMetricStatus = "archived"
)

func (BillableMetricStatus) IsKnown added in v0.50.0

func (r BillableMetricStatus) IsKnown() bool

type BillableMetricTiny added in v0.121.0

type BillableMetricTiny = shared.BillableMetricTiny

This is an alias to an internal type.

type BillingCycleAnchorConfiguration added in v0.121.0

type BillingCycleAnchorConfiguration = shared.BillingCycleAnchorConfiguration

This is an alias to an internal type.

type BillingCycleAnchorConfigurationParam added in v0.121.0

type BillingCycleAnchorConfigurationParam = shared.BillingCycleAnchorConfigurationParam

This is an alias to an internal type.

type BillingCycleConfiguration added in v0.121.0

type BillingCycleConfiguration = shared.BillingCycleConfiguration

This is an alias to an internal type.

type BillingCycleConfigurationDurationUnit added in v0.121.0

type BillingCycleConfigurationDurationUnit = shared.BillingCycleConfigurationDurationUnit

This is an alias to an internal type.

type BillingCycleRelativeDate added in v0.25.0

type BillingCycleRelativeDate = shared.BillingCycleRelativeDate

This is an alias to an internal type.

type BulkBPSConfig added in v0.121.0

type BulkBPSConfig = shared.BulkBPSConfig

This is an alias to an internal type.

type BulkBPSConfigParam added in v0.121.0

type BulkBPSConfigParam = shared.BulkBPSConfigParam

This is an alias to an internal type.

type BulkBPSTier added in v0.121.0

type BulkBPSTier = shared.BulkBPSTier

This is an alias to an internal type.

type BulkBPSTierParam added in v0.121.0

type BulkBPSTierParam = shared.BulkBPSTierParam

This is an alias to an internal type.

type BulkConfig added in v0.121.0

type BulkConfig = shared.BulkConfig

This is an alias to an internal type.

type BulkConfigParam added in v0.121.0

type BulkConfigParam = shared.BulkConfigParam

This is an alias to an internal type.

type BulkTier added in v0.121.0

type BulkTier = shared.BulkTier

This is an alias to an internal type.

type BulkTierParam added in v0.121.0

type BulkTierParam = shared.BulkTierParam

This is an alias to an internal type.

type ChangedSubscriptionResources added in v0.121.0

type ChangedSubscriptionResources = shared.ChangedSubscriptionResources

This is an alias to an internal type.

type Client

type Client struct {
	Options                []option.RequestOption
	TopLevel               *TopLevelService
	Beta                   *BetaService
	Coupons                *CouponService
	CreditNotes            *CreditNoteService
	Customers              *CustomerService
	Events                 *EventService
	InvoiceLineItems       *InvoiceLineItemService
	Invoices               *InvoiceService
	Items                  *ItemService
	Metrics                *MetricService
	Plans                  *PlanService
	Prices                 *PriceService
	Subscriptions          *SubscriptionService
	Alerts                 *AlertService
	DimensionalPriceGroups *DimensionalPriceGroupService

	Webhooks            *WebhookService
	SubscriptionChanges *SubscriptionChangeService
}

Client creates a struct with services and top level methods that help with interacting with the orb API. You should not instantiate this client directly, and instead use the NewClient method instead.

func NewClient

func NewClient(opts ...option.RequestOption) (r *Client)

NewClient generates a new client with the default option read from the environment (ORB_API_KEY, ORB_WEBHOOK_SECRET, ORB_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.

func (*Client) Delete added in v0.25.0

func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Execute added in v0.25.0

func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.

If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.

The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.

If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.

Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.

The response body will be deserialized into the res variable, depending on its type:

  • A pointer to a *http.Response is populated by the raw response.
  • A pointer to a byte array will be populated with the contents of the request body.
  • A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
  • A nil value will not read the response body.

For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.

func (*Client) Get added in v0.25.0

func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Patch added in v0.25.0

func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Post added in v0.25.0

func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Put added in v0.25.0

func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Put makes a PUT request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

type ConversionRateTier added in v0.123.0

type ConversionRateTier = shared.ConversionRateTier

This is an alias to an internal type.

type ConversionRateTierParam added in v0.123.0

type ConversionRateTierParam = shared.ConversionRateTierParam

This is an alias to an internal type.

type ConversionRateTieredConfig added in v0.123.0

type ConversionRateTieredConfig = shared.ConversionRateTieredConfig

This is an alias to an internal type.

type ConversionRateTieredConfigParam added in v0.123.0

type ConversionRateTieredConfigParam = shared.ConversionRateTieredConfigParam

This is an alias to an internal type.

type ConversionRateUnitConfig added in v0.123.0

type ConversionRateUnitConfig = shared.ConversionRateUnitConfig

This is an alias to an internal type.

type ConversionRateUnitConfigParam added in v0.123.0

type ConversionRateUnitConfigParam = shared.ConversionRateUnitConfigParam

This is an alias to an internal type.

type Coupon

type Coupon struct {
	// Also referred to as coupon_id in this documentation.
	ID string `json:"id,required"`
	// An archived coupon can no longer be redeemed. Active coupons will have a value
	// of null for `archived_at`; this field will be non-null for archived coupons.
	ArchivedAt time.Time      `json:"archived_at,required,nullable" format:"date-time"`
	Discount   CouponDiscount `json:"discount,required"`
	// This allows for a coupon's discount to apply for a limited time (determined in
	// months); a `null` value here means "unlimited time".
	DurationInMonths int64 `json:"duration_in_months,required,nullable"`
	// The maximum number of redemptions allowed for this coupon before it is
	// exhausted; `null` here means "unlimited".
	MaxRedemptions int64 `json:"max_redemptions,required,nullable"`
	// This string can be used to redeem this coupon for a given subscription.
	RedemptionCode string `json:"redemption_code,required"`
	// The number of times this coupon has been redeemed.
	TimesRedeemed int64      `json:"times_redeemed,required"`
	JSON          couponJSON `json:"-"`
}

A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users.

func (*Coupon) UnmarshalJSON

func (r *Coupon) UnmarshalJSON(data []byte) (err error)

type CouponDiscount added in v0.2.0

type CouponDiscount struct {
	DiscountType CouponDiscountDiscountType `json:"discount_type,required"`
	// Only available if discount_type is `amount`.
	AmountDiscount string `json:"amount_discount"`
	// This field can have the runtime type of [[]string].
	AppliesToPriceIDs interface{} `json:"applies_to_price_ids"`
	// This field can have the runtime type of [[]shared.TransformPriceFilter].
	Filters interface{} `json:"filters"`
	// Only available if discount_type is `percentage`. This is a number between 0
	// and 1.
	PercentageDiscount float64            `json:"percentage_discount"`
	Reason             string             `json:"reason,nullable"`
	JSON               couponDiscountJSON `json:"-"`
	// contains filtered or unexported fields
}

func (CouponDiscount) AsUnion added in v0.25.0

func (r CouponDiscount) AsUnion() CouponDiscountUnion

AsUnion returns a CouponDiscountUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are shared.PercentageDiscount, shared.AmountDiscount.

func (*CouponDiscount) UnmarshalJSON added in v0.25.0

func (r *CouponDiscount) UnmarshalJSON(data []byte) (err error)

type CouponDiscountDiscountType added in v0.25.0

type CouponDiscountDiscountType string
const (
	CouponDiscountDiscountTypePercentage CouponDiscountDiscountType = "percentage"
	CouponDiscountDiscountTypeAmount     CouponDiscountDiscountType = "amount"
)

func (CouponDiscountDiscountType) IsKnown added in v0.25.0

func (r CouponDiscountDiscountType) IsKnown() bool

type CouponDiscountUnion added in v0.25.0

type CouponDiscountUnion interface {
	ImplementsCouponDiscount()
}

Union satisfied by shared.PercentageDiscount or shared.AmountDiscount.

type CouponListParams

type CouponListParams struct {
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor param.Field[string] `query:"cursor"`
	// The number of items to fetch. Defaults to 20.
	Limit param.Field[int64] `query:"limit"`
	// Filter to coupons matching this redemption code.
	RedemptionCode param.Field[string] `query:"redemption_code"`
	// Show archived coupons as well (by default, this endpoint only returns active
	// coupons).
	ShowArchived param.Field[bool] `query:"show_archived"`
}

func (CouponListParams) URLQuery

func (r CouponListParams) URLQuery() (v url.Values)

URLQuery serializes CouponListParams's query parameters as `url.Values`.

type CouponNewParams

type CouponNewParams struct {
	Discount param.Field[CouponNewParamsDiscountUnion] `json:"discount,required"`
	// This string can be used to redeem this coupon for a given subscription.
	RedemptionCode param.Field[string] `json:"redemption_code,required"`
	// This allows for a coupon's discount to apply for a limited time (determined in
	// months); a `null` value here means "unlimited time".
	DurationInMonths param.Field[int64] `json:"duration_in_months"`
	// The maximum number of redemptions allowed for this coupon before it is
	// exhausted;`null` here means "unlimited".
	MaxRedemptions param.Field[int64] `json:"max_redemptions"`
}

func (CouponNewParams) MarshalJSON

func (r CouponNewParams) MarshalJSON() (data []byte, err error)

type CouponNewParamsDiscount added in v0.2.0

type CouponNewParamsDiscount struct {
	DiscountType       param.Field[CouponNewParamsDiscountDiscountType] `json:"discount_type,required"`
	AmountDiscount     param.Field[string]                              `json:"amount_discount"`
	PercentageDiscount param.Field[float64]                             `json:"percentage_discount"`
}

func (CouponNewParamsDiscount) MarshalJSON added in v0.25.0

func (r CouponNewParamsDiscount) MarshalJSON() (data []byte, err error)

type CouponNewParamsDiscountDiscountType added in v0.25.0

type CouponNewParamsDiscountDiscountType string
const (
	CouponNewParamsDiscountDiscountTypePercentage CouponNewParamsDiscountDiscountType = "percentage"
	CouponNewParamsDiscountDiscountTypeAmount     CouponNewParamsDiscountDiscountType = "amount"
)

func (CouponNewParamsDiscountDiscountType) IsKnown added in v0.25.0

type CouponNewParamsDiscountNewCouponAmountDiscount added in v0.25.0

type CouponNewParamsDiscountNewCouponAmountDiscount struct {
	AmountDiscount param.Field[string]                                                     `json:"amount_discount,required"`
	DiscountType   param.Field[CouponNewParamsDiscountNewCouponAmountDiscountDiscountType] `json:"discount_type,required"`
}

func (CouponNewParamsDiscountNewCouponAmountDiscount) MarshalJSON added in v0.25.0

func (r CouponNewParamsDiscountNewCouponAmountDiscount) MarshalJSON() (data []byte, err error)

type CouponNewParamsDiscountNewCouponAmountDiscountDiscountType added in v0.25.0

type CouponNewParamsDiscountNewCouponAmountDiscountDiscountType string
const (
	CouponNewParamsDiscountNewCouponAmountDiscountDiscountTypeAmount CouponNewParamsDiscountNewCouponAmountDiscountDiscountType = "amount"
)

func (CouponNewParamsDiscountNewCouponAmountDiscountDiscountType) IsKnown added in v0.25.0

type CouponNewParamsDiscountNewCouponPercentageDiscount added in v0.25.0

type CouponNewParamsDiscountNewCouponPercentageDiscount struct {
	DiscountType       param.Field[CouponNewParamsDiscountNewCouponPercentageDiscountDiscountType] `json:"discount_type,required"`
	PercentageDiscount param.Field[float64]                                                        `json:"percentage_discount,required"`
}

func (CouponNewParamsDiscountNewCouponPercentageDiscount) MarshalJSON added in v0.25.0

func (r CouponNewParamsDiscountNewCouponPercentageDiscount) MarshalJSON() (data []byte, err error)

type CouponNewParamsDiscountNewCouponPercentageDiscountDiscountType added in v0.25.0

type CouponNewParamsDiscountNewCouponPercentageDiscountDiscountType string
const (
	CouponNewParamsDiscountNewCouponPercentageDiscountDiscountTypePercentage CouponNewParamsDiscountNewCouponPercentageDiscountDiscountType = "percentage"
)

func (CouponNewParamsDiscountNewCouponPercentageDiscountDiscountType) IsKnown added in v0.25.0

type CouponNewParamsDiscountUnion added in v0.25.0

type CouponNewParamsDiscountUnion interface {
	// contains filtered or unexported methods
}

Satisfied by CouponNewParamsDiscountNewCouponPercentageDiscount, CouponNewParamsDiscountNewCouponAmountDiscount, CouponNewParamsDiscount.

type CouponRedemption added in v0.121.0

type CouponRedemption = shared.CouponRedemption

This is an alias to an internal type.

type CouponService

type CouponService struct {
	Options       []option.RequestOption
	Subscriptions *CouponSubscriptionService
}

CouponService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCouponService method instead.

func NewCouponService

func NewCouponService(opts ...option.RequestOption) (r *CouponService)

NewCouponService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CouponService) Archive

func (r *CouponService) Archive(ctx context.Context, couponID string, opts ...option.RequestOption) (res *Coupon, err error)

This endpoint allows a coupon to be archived. Archived coupons can no longer be redeemed, and will be hidden from lists of active coupons. Additionally, once a coupon is archived, its redemption code can be reused for a different coupon.

func (*CouponService) Fetch

func (r *CouponService) Fetch(ctx context.Context, couponID string, opts ...option.RequestOption) (res *Coupon, err error)

This endpoint retrieves a coupon by its ID. To fetch coupons by their redemption code, use the [List coupons](list-coupons) endpoint with the redemption_code parameter.

func (*CouponService) List

func (r *CouponService) List(ctx context.Context, query CouponListParams, opts ...option.RequestOption) (res *pagination.Page[Coupon], err error)

This endpoint returns a list of all coupons for an account in a list format.

The list of coupons is ordered starting from the most recently created coupon. The response also includes `pagination_metadata`, which lets the caller retrieve the next page of results if they exist. More information about pagination can be found in the Pagination-metadata schema.

func (*CouponService) ListAutoPaging

This endpoint returns a list of all coupons for an account in a list format.

The list of coupons is ordered starting from the most recently created coupon. The response also includes `pagination_metadata`, which lets the caller retrieve the next page of results if they exist. More information about pagination can be found in the Pagination-metadata schema.

func (*CouponService) New

func (r *CouponService) New(ctx context.Context, body CouponNewParams, opts ...option.RequestOption) (res *Coupon, err error)

This endpoint allows the creation of coupons, which can then be redeemed at subscription creation or plan change.

type CouponSubscriptionListParams

type CouponSubscriptionListParams struct {
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor param.Field[string] `query:"cursor"`
	// The number of items to fetch. Defaults to 20.
	Limit param.Field[int64] `query:"limit"`
}

func (CouponSubscriptionListParams) URLQuery

func (r CouponSubscriptionListParams) URLQuery() (v url.Values)

URLQuery serializes CouponSubscriptionListParams's query parameters as `url.Values`.

type CouponSubscriptionService

type CouponSubscriptionService struct {
	Options []option.RequestOption
}

CouponSubscriptionService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCouponSubscriptionService method instead.

func NewCouponSubscriptionService

func NewCouponSubscriptionService(opts ...option.RequestOption) (r *CouponSubscriptionService)

NewCouponSubscriptionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CouponSubscriptionService) List

This endpoint returns a list of all subscriptions that have redeemed a given coupon as a [paginated](/api-reference/pagination) list, ordered starting from the most recently created subscription. For a full discussion of the subscription resource, see Subscription(/core-concepts#subscription).

func (*CouponSubscriptionService) ListAutoPaging

This endpoint returns a list of all subscriptions that have redeemed a given coupon as a [paginated](/api-reference/pagination) list, ordered starting from the most recently created subscription. For a full discussion of the subscription resource, see Subscription(/core-concepts#subscription).

type CreditBlockExpiryLedgerEntry added in v0.121.0

type CreditBlockExpiryLedgerEntry struct {
	ID                   string                                  `json:"id,required"`
	Amount               float64                                 `json:"amount,required"`
	CreatedAt            time.Time                               `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlock                           `json:"credit_block,required"`
	Currency             string                                  `json:"currency,required"`
	Customer             shared.CustomerMinified                 `json:"customer,required"`
	Description          string                                  `json:"description,required,nullable"`
	EndingBalance        float64                                 `json:"ending_balance,required"`
	EntryStatus          CreditBlockExpiryLedgerEntryEntryStatus `json:"entry_status,required"`
	EntryType            CreditBlockExpiryLedgerEntryEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                                   `json:"ledger_sequence_number,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata        map[string]string                `json:"metadata,required"`
	StartingBalance float64                          `json:"starting_balance,required"`
	JSON            creditBlockExpiryLedgerEntryJSON `json:"-"`
}

func (*CreditBlockExpiryLedgerEntry) UnmarshalJSON added in v0.121.0

func (r *CreditBlockExpiryLedgerEntry) UnmarshalJSON(data []byte) (err error)

type CreditBlockExpiryLedgerEntryEntryStatus added in v0.121.0

type CreditBlockExpiryLedgerEntryEntryStatus string
const (
	CreditBlockExpiryLedgerEntryEntryStatusCommitted CreditBlockExpiryLedgerEntryEntryStatus = "committed"
	CreditBlockExpiryLedgerEntryEntryStatusPending   CreditBlockExpiryLedgerEntryEntryStatus = "pending"
)

func (CreditBlockExpiryLedgerEntryEntryStatus) IsKnown added in v0.121.0

type CreditBlockExpiryLedgerEntryEntryType added in v0.121.0

type CreditBlockExpiryLedgerEntryEntryType string
const (
	CreditBlockExpiryLedgerEntryEntryTypeCreditBlockExpiry CreditBlockExpiryLedgerEntryEntryType = "credit_block_expiry"
)

func (CreditBlockExpiryLedgerEntryEntryType) IsKnown added in v0.121.0

type CreditNote

type CreditNote = shared.CreditNote

The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a particular invoice.

This is an alias to an internal type.

type CreditNoteDiscount added in v0.2.0

type CreditNoteDiscount = shared.CreditNoteDiscount

This is an alias to an internal type.

type CreditNoteDiscountsAppliesToPrice added in v0.2.0

type CreditNoteDiscountsAppliesToPrice = shared.CreditNoteDiscountsAppliesToPrice

This is an alias to an internal type.

type CreditNoteDiscountsDiscountType added in v0.2.0

type CreditNoteDiscountsDiscountType = shared.CreditNoteDiscountsDiscountType

This is an alias to an internal type.

type CreditNoteLineItem

type CreditNoteLineItem = shared.CreditNoteLineItem

This is an alias to an internal type.

type CreditNoteLineItemsDiscount added in v0.2.0

type CreditNoteLineItemsDiscount = shared.CreditNoteLineItemsDiscount

This is an alias to an internal type.

type CreditNoteLineItemsDiscountsDiscountType added in v0.2.0

type CreditNoteLineItemsDiscountsDiscountType = shared.CreditNoteLineItemsDiscountsDiscountType

This is an alias to an internal type.

type CreditNoteListParams

type CreditNoteListParams struct {
	CreatedAtGt  param.Field[time.Time] `query:"created_at[gt]" format:"date-time"`
	CreatedAtGte param.Field[time.Time] `query:"created_at[gte]" format:"date-time"`
	CreatedAtLt  param.Field[time.Time] `query:"created_at[lt]" format:"date-time"`
	CreatedAtLte param.Field[time.Time] `query:"created_at[lte]" format:"date-time"`
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor param.Field[string] `query:"cursor"`
	// The number of items to fetch. Defaults to 20.
	Limit param.Field[int64] `query:"limit"`
}

func (CreditNoteListParams) URLQuery

func (r CreditNoteListParams) URLQuery() (v url.Values)

URLQuery serializes CreditNoteListParams's query parameters as `url.Values`.

type CreditNoteMaximumAmountAdjustment added in v0.2.0

type CreditNoteMaximumAmountAdjustment = shared.CreditNoteMaximumAmountAdjustment

The maximum amount applied on the original invoice

This is an alias to an internal type.

type CreditNoteMaximumAmountAdjustmentAppliesToPrice added in v0.2.0

type CreditNoteMaximumAmountAdjustmentAppliesToPrice = shared.CreditNoteMaximumAmountAdjustmentAppliesToPrice

This is an alias to an internal type.

type CreditNoteMaximumAmountAdjustmentDiscountType added in v0.2.0

type CreditNoteMaximumAmountAdjustmentDiscountType = shared.CreditNoteMaximumAmountAdjustmentDiscountType

This is an alias to an internal type.

type CreditNoteNewParams added in v0.80.0

type CreditNoteNewParams struct {
	LineItems param.Field[[]CreditNoteNewParamsLineItem] `json:"line_items,required"`
	// An optional reason for the credit note.
	Reason param.Field[CreditNoteNewParamsReason] `json:"reason,required"`
	// An optional memo to attach to the credit note.
	Memo param.Field[string] `json:"memo"`
}

func (CreditNoteNewParams) MarshalJSON added in v0.80.0

func (r CreditNoteNewParams) MarshalJSON() (data []byte, err error)

type CreditNoteNewParamsLineItem added in v0.80.0

type CreditNoteNewParamsLineItem struct {
	// The total amount in the invoice's currency to credit this line item.
	Amount param.Field[string] `json:"amount,required"`
	// The ID of the line item to credit.
	InvoiceLineItemID param.Field[string] `json:"invoice_line_item_id,required"`
}

func (CreditNoteNewParamsLineItem) MarshalJSON added in v0.80.0

func (r CreditNoteNewParamsLineItem) MarshalJSON() (data []byte, err error)

type CreditNoteNewParamsReason added in v0.80.0

type CreditNoteNewParamsReason string

An optional reason for the credit note.

const (
	CreditNoteNewParamsReasonDuplicate             CreditNoteNewParamsReason = "duplicate"
	CreditNoteNewParamsReasonFraudulent            CreditNoteNewParamsReason = "fraudulent"
	CreditNoteNewParamsReasonOrderChange           CreditNoteNewParamsReason = "order_change"
	CreditNoteNewParamsReasonProductUnsatisfactory CreditNoteNewParamsReason = "product_unsatisfactory"
)

func (CreditNoteNewParamsReason) IsKnown added in v0.80.0

func (r CreditNoteNewParamsReason) IsKnown() bool

type CreditNoteReason

type CreditNoteReason = shared.CreditNoteReason

This is an alias to an internal type.

type CreditNoteService

type CreditNoteService struct {
	Options []option.RequestOption
}

CreditNoteService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCreditNoteService method instead.

func NewCreditNoteService

func NewCreditNoteService(opts ...option.RequestOption) (r *CreditNoteService)

NewCreditNoteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CreditNoteService) Fetch

func (r *CreditNoteService) Fetch(ctx context.Context, creditNoteID string, opts ...option.RequestOption) (res *shared.CreditNote, err error)

This endpoint is used to fetch a single [`Credit Note`](/invoicing/credit-notes) given an identifier.

func (*CreditNoteService) List

Get a paginated list of CreditNotes. Users can also filter by customer_id, subscription_id, or external_customer_id. The credit notes will be returned in reverse chronological order by `creation_time`.

func (*CreditNoteService) ListAutoPaging

Get a paginated list of CreditNotes. Users can also filter by customer_id, subscription_id, or external_customer_id. The credit notes will be returned in reverse chronological order by `creation_time`.

func (*CreditNoteService) New added in v0.80.0

This endpoint is used to create a single [`Credit Note`](/invoicing/credit-notes).

type CreditNoteTiny added in v0.121.0

type CreditNoteTiny = shared.CreditNoteTiny

This is an alias to an internal type.

type CreditNoteType

type CreditNoteType = shared.CreditNoteType

This is an alias to an internal type.

type CustomExpiration added in v0.121.0

type CustomExpiration = shared.CustomExpiration

This is an alias to an internal type.

type CustomExpirationDurationUnit added in v0.121.0

type CustomExpirationDurationUnit = shared.CustomExpirationDurationUnit

This is an alias to an internal type.

type CustomExpirationParam added in v0.121.0

type CustomExpirationParam = shared.CustomExpirationParam

This is an alias to an internal type.

type Customer

type Customer struct {
	ID               string   `json:"id,required"`
	AdditionalEmails []string `json:"additional_emails,required"`
	AutoCollection   bool     `json:"auto_collection,required"`
	// The customer's current balance in their currency.
	Balance        string         `json:"balance,required"`
	BillingAddress shared.Address `json:"billing_address,required,nullable"`
	CreatedAt      time.Time      `json:"created_at,required" format:"date-time"`
	Currency       string         `json:"currency,required,nullable"`
	// A valid customer email, to be used for notifications. When Orb triggers payment
	// through a payment gateway, this email will be used for any automatically issued
	// receipts.
	Email                  string `json:"email,required"`
	EmailDelivery          bool   `json:"email_delivery,required"`
	ExemptFromAutomatedTax bool   `json:"exempt_from_automated_tax,required,nullable"`
	// An optional user-defined ID for this customer resource, used throughout the
	// system as an alias for this Customer. Use this field to identify a customer by
	// an existing identifier in your system.
	ExternalCustomerID string `json:"external_customer_id,required,nullable"`
	// The hierarchical relationships for this customer.
	Hierarchy CustomerHierarchy `json:"hierarchy,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata map[string]string `json:"metadata,required"`
	// The full name of the customer
	Name string `json:"name,required"`
	// This is used for creating charges or invoices in an external system via Orb.
	// When not in test mode, the connection must first be configured in the Orb
	// webapp.
	PaymentProvider CustomerPaymentProvider `json:"payment_provider,required,nullable"`
	// The ID of this customer in an external payments solution, such as Stripe. This
	// is used for creating charges or invoices in the external system via Orb.
	PaymentProviderID string         `json:"payment_provider_id,required,nullable"`
	PortalURL         string         `json:"portal_url,required,nullable"`
	ShippingAddress   shared.Address `json:"shipping_address,required,nullable"`
	// Tax IDs are commonly required to be displayed on customer invoices, which are
	// added to the headers of invoices.
	//
	// ### Supported Tax ID Countries and Types
	//
	// | Country              | Type         | Description                                                                                             |
	// | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
	// | Andorra              | `ad_nrt`     | Andorran NRT Number                                                                                     |
	// | Argentina            | `ar_cuit`    | Argentinian Tax ID Number                                                                               |
	// | Australia            | `au_abn`     | Australian Business Number (AU ABN)                                                                     |
	// | Australia            | `au_arn`     | Australian Taxation Office Reference Number                                                             |
	// | Austria              | `eu_vat`     | European VAT Number                                                                                     |
	// | Bahrain              | `bh_vat`     | Bahraini VAT Number                                                                                     |
	// | Belgium              | `eu_vat`     | European VAT Number                                                                                     |
	// | Bolivia              | `bo_tin`     | Bolivian Tax ID                                                                                         |
	// | Brazil               | `br_cnpj`    | Brazilian CNPJ Number                                                                                   |
	// | Brazil               | `br_cpf`     | Brazilian CPF Number                                                                                    |
	// | Bulgaria             | `bg_uic`     | Bulgaria Unified Identification Code                                                                    |
	// | Bulgaria             | `eu_vat`     | European VAT Number                                                                                     |
	// | Canada               | `ca_bn`      | Canadian BN                                                                                             |
	// | Canada               | `ca_gst_hst` | Canadian GST/HST Number                                                                                 |
	// | Canada               | `ca_pst_bc`  | Canadian PST Number (British Columbia)                                                                  |
	// | Canada               | `ca_pst_mb`  | Canadian PST Number (Manitoba)                                                                          |
	// | Canada               | `ca_pst_sk`  | Canadian PST Number (Saskatchewan)                                                                      |
	// | Canada               | `ca_qst`     | Canadian QST Number (Québec)                                                                            |
	// | Chile                | `cl_tin`     | Chilean TIN                                                                                             |
	// | China                | `cn_tin`     | Chinese Tax ID                                                                                          |
	// | Colombia             | `co_nit`     | Colombian NIT Number                                                                                    |
	// | Costa Rica           | `cr_tin`     | Costa Rican Tax ID                                                                                      |
	// | Croatia              | `eu_vat`     | European VAT Number                                                                                     |
	// | Cyprus               | `eu_vat`     | European VAT Number                                                                                     |
	// | Czech Republic       | `eu_vat`     | European VAT Number                                                                                     |
	// | Denmark              | `eu_vat`     | European VAT Number                                                                                     |
	// | Dominican Republic   | `do_rcn`     | Dominican RCN Number                                                                                    |
	// | Ecuador              | `ec_ruc`     | Ecuadorian RUC Number                                                                                   |
	// | Egypt                | `eg_tin`     | Egyptian Tax Identification Number                                                                      |
	// | El Salvador          | `sv_nit`     | El Salvadorian NIT Number                                                                               |
	// | Estonia              | `eu_vat`     | European VAT Number                                                                                     |
	// | EU                   | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme                                                  |
	// | Finland              | `eu_vat`     | European VAT Number                                                                                     |
	// | France               | `eu_vat`     | European VAT Number                                                                                     |
	// | Georgia              | `ge_vat`     | Georgian VAT                                                                                            |
	// | Germany              | `eu_vat`     | European VAT Number                                                                                     |
	// | Greece               | `eu_vat`     | European VAT Number                                                                                     |
	// | Hong Kong            | `hk_br`      | Hong Kong BR Number                                                                                     |
	// | Hungary              | `eu_vat`     | European VAT Number                                                                                     |
	// | Hungary              | `hu_tin`     | Hungary Tax Number (adószám)                                                                            |
	// | Iceland              | `is_vat`     | Icelandic VAT                                                                                           |
	// | India                | `in_gst`     | Indian GST Number                                                                                       |
	// | Indonesia            | `id_npwp`    | Indonesian NPWP Number                                                                                  |
	// | Ireland              | `eu_vat`     | European VAT Number                                                                                     |
	// | Israel               | `il_vat`     | Israel VAT                                                                                              |
	// | Italy                | `eu_vat`     | European VAT Number                                                                                     |
	// | Japan                | `jp_cn`      | Japanese Corporate Number (_Hōjin Bangō_)                                                               |
	// | Japan                | `jp_rn`      | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
	// | Japan                | `jp_trn`     | Japanese Tax Registration Number (_Tōroku Bangō_)                                                       |
	// | Kazakhstan           | `kz_bin`     | Kazakhstani Business Identification Number                                                              |
	// | Kenya                | `ke_pin`     | Kenya Revenue Authority Personal Identification Number                                                  |
	// | Latvia               | `eu_vat`     | European VAT Number                                                                                     |
	// | Liechtenstein        | `li_uid`     | Liechtensteinian UID Number                                                                             |
	// | Lithuania            | `eu_vat`     | European VAT Number                                                                                     |
	// | Luxembourg           | `eu_vat`     | European VAT Number                                                                                     |
	// | Malaysia             | `my_frp`     | Malaysian FRP Number                                                                                    |
	// | Malaysia             | `my_itn`     | Malaysian ITN                                                                                           |
	// | Malaysia             | `my_sst`     | Malaysian SST Number                                                                                    |
	// | Malta                | `eu_vat `    | European VAT Number                                                                                     |
	// | Mexico               | `mx_rfc`     | Mexican RFC Number                                                                                      |
	// | Netherlands          | `eu_vat`     | European VAT Number                                                                                     |
	// | New Zealand          | `nz_gst`     | New Zealand GST Number                                                                                  |
	// | Nigeria              | `ng_tin`     | Nigerian Tax Identification Number                                                                      |
	// | Norway               | `no_vat`     | Norwegian VAT Number                                                                                    |
	// | Norway               | `no_voec`    | Norwegian VAT on e-commerce Number                                                                      |
	// | Oman                 | `om_vat`     | Omani VAT Number                                                                                        |
	// | Peru                 | `pe_ruc`     | Peruvian RUC Number                                                                                     |
	// | Philippines          | `ph_tin `    | Philippines Tax Identification Number                                                                   |
	// | Poland               | `eu_vat`     | European VAT Number                                                                                     |
	// | Portugal             | `eu_vat`     | European VAT Number                                                                                     |
	// | Romania              | `eu_vat`     | European VAT Number                                                                                     |
	// | Romania              | `ro_tin`     | Romanian Tax ID Number                                                                                  |
	// | Russia               | `ru_inn`     | Russian INN                                                                                             |
	// | Russia               | `ru_kpp`     | Russian KPP                                                                                             |
	// | Saudi Arabia         | `sa_vat`     | Saudi Arabia VAT                                                                                        |
	// | Serbia               | `rs_pib`     | Serbian PIB Number                                                                                      |
	// | Singapore            | `sg_gst`     | Singaporean GST                                                                                         |
	// | Singapore            | `sg_uen`     | Singaporean UEN                                                                                         |
	// | Slovakia             | `eu_vat`     | European VAT Number                                                                                     |
	// | Slovenia             | `eu_vat`     | European VAT Number                                                                                     |
	// | Slovenia             | `si_tin`     | Slovenia Tax Number (davčna številka)                                                                   |
	// | South Africa         | `za_vat`     | South African VAT Number                                                                                |
	// | South Korea          | `kr_brn`     | Korean BRN                                                                                              |
	// | Spain                | `es_cif`     | Spanish NIF Number (previously Spanish CIF Number)                                                      |
	// | Spain                | `eu_vat`     | European VAT Number                                                                                     |
	// | Sweden               | `eu_vat`     | European VAT Number                                                                                     |
	// | Switzerland          | `ch_vat`     | Switzerland VAT Number                                                                                  |
	// | Taiwan               | `tw_vat`     | Taiwanese VAT                                                                                           |
	// | Thailand             | `th_vat`     | Thai VAT                                                                                                |
	// | Turkey               | `tr_tin`     | Turkish Tax Identification Number                                                                       |
	// | Ukraine              | `ua_vat`     | Ukrainian VAT                                                                                           |
	// | United Arab Emirates | `ae_trn`     | United Arab Emirates TRN                                                                                |
	// | United Kingdom       | `eu_vat`     | Northern Ireland VAT Number                                                                             |
	// | United Kingdom       | `gb_vat`     | United Kingdom VAT Number                                                                               |
	// | United States        | `us_ein`     | United States EIN                                                                                       |
	// | Uruguay              | `uy_ruc`     | Uruguayan RUC Number                                                                                    |
	// | Venezuela            | `ve_rif`     | Venezuelan RIF Number                                                                                   |
	// | Vietnam              | `vn_tin`     | Vietnamese Tax ID Number                                                                                |
	TaxID shared.CustomerTaxID `json:"tax_id,required,nullable"`
	// A timezone identifier from the IANA timezone database, such as
	// "America/Los_Angeles". This "defaults to your account's timezone if not set.
	// This cannot be changed after customer creation.
	Timezone                    string                              `json:"timezone,required"`
	AccountingSyncConfiguration CustomerAccountingSyncConfiguration `json:"accounting_sync_configuration,nullable"`
	ReportingConfiguration      CustomerReportingConfiguration      `json:"reporting_configuration,nullable"`
	JSON                        customerJSON                        `json:"-"`
}

A customer is a buyer of your products, and the other party to the billing relationship.

In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an `external_customer_id` with your own identifier. See [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these aliases work in Orb.

In addition to having an identifier in your system, a customer may exist in a payment provider solution like Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping.

A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for information on what this timezone parameter influences within Orb.

func (*Customer) UnmarshalJSON

func (r *Customer) UnmarshalJSON(data []byte) (err error)

type CustomerAccountingSyncConfiguration

type CustomerAccountingSyncConfiguration struct {
	AccountingProviders []CustomerAccountingSyncConfigurationAccountingProvider `json:"accounting_providers,required"`
	Excluded            bool                                                    `json:"excluded,required"`
	JSON                customerAccountingSyncConfigurationJSON                 `json:"-"`
}

func (*CustomerAccountingSyncConfiguration) UnmarshalJSON

func (r *CustomerAccountingSyncConfiguration) UnmarshalJSON(data []byte) (err error)

type CustomerAccountingSyncConfigurationAccountingProvider

type CustomerAccountingSyncConfigurationAccountingProvider struct {
	ExternalProviderID string                                                             `json:"external_provider_id,required,nullable"`
	ProviderType       CustomerAccountingSyncConfigurationAccountingProvidersProviderType `json:"provider_type,required"`
	JSON               customerAccountingSyncConfigurationAccountingProviderJSON          `json:"-"`
}

func (*CustomerAccountingSyncConfigurationAccountingProvider) UnmarshalJSON

func (r *CustomerAccountingSyncConfigurationAccountingProvider) UnmarshalJSON(data []byte) (err error)

type CustomerAccountingSyncConfigurationAccountingProvidersProviderType

type CustomerAccountingSyncConfigurationAccountingProvidersProviderType string
const (
	CustomerAccountingSyncConfigurationAccountingProvidersProviderTypeQuickbooks CustomerAccountingSyncConfigurationAccountingProvidersProviderType = "quickbooks"
	CustomerAccountingSyncConfigurationAccountingProvidersProviderTypeNetsuite   CustomerAccountingSyncConfigurationAccountingProvidersProviderType = "netsuite"
)

func (CustomerAccountingSyncConfigurationAccountingProvidersProviderType) IsKnown added in v0.24.0

type CustomerBalanceTransactionListParams

type CustomerBalanceTransactionListParams struct {
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor param.Field[string] `query:"cursor"`
	// The number of items to fetch. Defaults to 20.
	Limit            param.Field[int64]     `query:"limit"`
	OperationTimeGt  param.Field[time.Time] `query:"operation_time[gt]" format:"date-time"`
	OperationTimeGte param.Field[time.Time] `query:"operation_time[gte]" format:"date-time"`
	OperationTimeLt  param.Field[time.Time] `query:"operation_time[lt]" format:"date-time"`
	OperationTimeLte param.Field[time.Time] `query:"operation_time[lte]" format:"date-time"`
}

func (CustomerBalanceTransactionListParams) URLQuery

URLQuery serializes CustomerBalanceTransactionListParams's query parameters as `url.Values`.

type CustomerBalanceTransactionListResponse

type CustomerBalanceTransactionListResponse struct {
	// A unique id for this transaction.
	ID     string                                       `json:"id,required"`
	Action CustomerBalanceTransactionListResponseAction `json:"action,required"`
	// The value of the amount changed in the transaction.
	Amount string `json:"amount,required"`
	// The creation time of this transaction.
	CreatedAt  time.Time             `json:"created_at,required" format:"date-time"`
	CreditNote shared.CreditNoteTiny `json:"credit_note,required,nullable"`
	// An optional description provided for manual customer balance adjustments.
	Description string `json:"description,required,nullable"`
	// The new value of the customer's balance prior to the transaction, in the
	// customer's currency.
	EndingBalance string             `json:"ending_balance,required"`
	Invoice       shared.InvoiceTiny `json:"invoice,required,nullable"`
	// The original value of the customer's balance prior to the transaction, in the
	// customer's currency.
	StartingBalance string                                     `json:"starting_balance,required"`
	Type            CustomerBalanceTransactionListResponseType `json:"type,required"`
	JSON            customerBalanceTransactionListResponseJSON `json:"-"`
}

func (*CustomerBalanceTransactionListResponse) UnmarshalJSON

func (r *CustomerBalanceTransactionListResponse) UnmarshalJSON(data []byte) (err error)

type CustomerBalanceTransactionListResponseAction

type CustomerBalanceTransactionListResponseAction string
const (
	CustomerBalanceTransactionListResponseActionAppliedToInvoice     CustomerBalanceTransactionListResponseAction = "applied_to_invoice"
	CustomerBalanceTransactionListResponseActionManualAdjustment     CustomerBalanceTransactionListResponseAction = "manual_adjustment"
	CustomerBalanceTransactionListResponseActionProratedRefund       CustomerBalanceTransactionListResponseAction = "prorated_refund"
	CustomerBalanceTransactionListResponseActionRevertProratedRefund CustomerBalanceTransactionListResponseAction = "revert_prorated_refund"
	CustomerBalanceTransactionListResponseActionReturnFromVoiding    CustomerBalanceTransactionListResponseAction = "return_from_voiding"
	CustomerBalanceTransactionListResponseActionCreditNoteApplied    CustomerBalanceTransactionListResponseAction = "credit_note_applied"
	CustomerBalanceTransactionListResponseActionCreditNoteVoided     CustomerBalanceTransactionListResponseAction = "credit_note_voided"
	CustomerBalanceTransactionListResponseActionOverpaymentRefund    CustomerBalanceTransactionListResponseAction = "overpayment_refund"
	CustomerBalanceTransactionListResponseActionExternalPayment      CustomerBalanceTransactionListResponseAction = "external_payment"
)

func (CustomerBalanceTransactionListResponseAction) IsKnown added in v0.24.0

type CustomerBalanceTransactionListResponseType

type CustomerBalanceTransactionListResponseType string
const (
	CustomerBalanceTransactionListResponseTypeIncrement CustomerBalanceTransactionListResponseType = "increment"
	CustomerBalanceTransactionListResponseTypeDecrement CustomerBalanceTransactionListResponseType = "decrement"
)

func (CustomerBalanceTransactionListResponseType) IsKnown added in v0.24.0

type CustomerBalanceTransactionNewParams

type CustomerBalanceTransactionNewParams struct {
	Amount param.Field[string]                                  `json:"amount,required"`
	Type   param.Field[CustomerBalanceTransactionNewParamsType] `json:"type,required"`
	// An optional description that can be specified around this entry.
	Description param.Field[string] `json:"description"`
}

func (CustomerBalanceTransactionNewParams) MarshalJSON

func (r CustomerBalanceTransactionNewParams) MarshalJSON() (data []byte, err error)

type CustomerBalanceTransactionNewParamsType

type CustomerBalanceTransactionNewParamsType string
const (
	CustomerBalanceTransactionNewParamsTypeIncrement CustomerBalanceTransactionNewParamsType = "increment"
	CustomerBalanceTransactionNewParamsTypeDecrement CustomerBalanceTransactionNewParamsType = "decrement"
)

func (CustomerBalanceTransactionNewParamsType) IsKnown added in v0.24.0

type CustomerBalanceTransactionNewResponse

type CustomerBalanceTransactionNewResponse struct {
	// A unique id for this transaction.
	ID     string                                      `json:"id,required"`
	Action CustomerBalanceTransactionNewResponseAction `json:"action,required"`
	// The value of the amount changed in the transaction.
	Amount string `json:"amount,required"`
	// The creation time of this transaction.
	CreatedAt  time.Time             `json:"created_at,required" format:"date-time"`
	CreditNote shared.CreditNoteTiny `json:"credit_note,required,nullable"`
	// An optional description provided for manual customer balance adjustments.
	Description string `json:"description,required,nullable"`
	// The new value of the customer's balance prior to the transaction, in the
	// customer's currency.
	EndingBalance string             `json:"ending_balance,required"`
	Invoice       shared.InvoiceTiny `json:"invoice,required,nullable"`
	// The original value of the customer's balance prior to the transaction, in the
	// customer's currency.
	StartingBalance string                                    `json:"starting_balance,required"`
	Type            CustomerBalanceTransactionNewResponseType `json:"type,required"`
	JSON            customerBalanceTransactionNewResponseJSON `json:"-"`
}

func (*CustomerBalanceTransactionNewResponse) UnmarshalJSON

func (r *CustomerBalanceTransactionNewResponse) UnmarshalJSON(data []byte) (err error)

type CustomerBalanceTransactionNewResponseAction

type CustomerBalanceTransactionNewResponseAction string
const (
	CustomerBalanceTransactionNewResponseActionAppliedToInvoice     CustomerBalanceTransactionNewResponseAction = "applied_to_invoice"
	CustomerBalanceTransactionNewResponseActionManualAdjustment     CustomerBalanceTransactionNewResponseAction = "manual_adjustment"
	CustomerBalanceTransactionNewResponseActionProratedRefund       CustomerBalanceTransactionNewResponseAction = "prorated_refund"
	CustomerBalanceTransactionNewResponseActionRevertProratedRefund CustomerBalanceTransactionNewResponseAction = "revert_prorated_refund"
	CustomerBalanceTransactionNewResponseActionReturnFromVoiding    CustomerBalanceTransactionNewResponseAction = "return_from_voiding"
	CustomerBalanceTransactionNewResponseActionCreditNoteApplied    CustomerBalanceTransactionNewResponseAction = "credit_note_applied"
	CustomerBalanceTransactionNewResponseActionCreditNoteVoided     CustomerBalanceTransactionNewResponseAction = "credit_note_voided"
	CustomerBalanceTransactionNewResponseActionOverpaymentRefund    CustomerBalanceTransactionNewResponseAction = "overpayment_refund"
	CustomerBalanceTransactionNewResponseActionExternalPayment      CustomerBalanceTransactionNewResponseAction = "external_payment"
)

func (CustomerBalanceTransactionNewResponseAction) IsKnown added in v0.24.0

type CustomerBalanceTransactionNewResponseType

type CustomerBalanceTransactionNewResponseType string
const (
	CustomerBalanceTransactionNewResponseTypeIncrement CustomerBalanceTransactionNewResponseType = "increment"
	CustomerBalanceTransactionNewResponseTypeDecrement CustomerBalanceTransactionNewResponseType = "decrement"
)

func (CustomerBalanceTransactionNewResponseType) IsKnown added in v0.24.0

type CustomerBalanceTransactionService

type CustomerBalanceTransactionService struct {
	Options []option.RequestOption
}

CustomerBalanceTransactionService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCustomerBalanceTransactionService method instead.

func NewCustomerBalanceTransactionService

func NewCustomerBalanceTransactionService(opts ...option.RequestOption) (r *CustomerBalanceTransactionService)

NewCustomerBalanceTransactionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CustomerBalanceTransactionService) List

## The customer balance

The customer balance is an amount in the customer's currency, which Orb automatically applies to subsequent invoices. This balance can be adjusted manually via Orb's webapp on the customer details page. You can use this balance to provide a fixed mid-period credit to the customer. Commonly, this is done due to system downtime/SLA violation, or an adhoc adjustment discussed with the customer.

If the balance is a positive value at the time of invoicing, it represents that the customer has credit that should be used to offset the amount due on the next issued invoice. In this case, Orb will automatically reduce the next invoice by the balance amount, and roll over any remaining balance if the invoice is fully discounted.

If the balance is a negative value at the time of invoicing, Orb will increase the invoice's amount due with a positive adjustment, and reset the balance to 0.

This endpoint retrieves all customer balance transactions in reverse chronological order for a single customer, providing a complete audit trail of all adjustments and invoice applications.

func (*CustomerBalanceTransactionService) ListAutoPaging

## The customer balance

The customer balance is an amount in the customer's currency, which Orb automatically applies to subsequent invoices. This balance can be adjusted manually via Orb's webapp on the customer details page. You can use this balance to provide a fixed mid-period credit to the customer. Commonly, this is done due to system downtime/SLA violation, or an adhoc adjustment discussed with the customer.

If the balance is a positive value at the time of invoicing, it represents that the customer has credit that should be used to offset the amount due on the next issued invoice. In this case, Orb will automatically reduce the next invoice by the balance amount, and roll over any remaining balance if the invoice is fully discounted.

If the balance is a negative value at the time of invoicing, Orb will increase the invoice's amount due with a positive adjustment, and reset the balance to 0.

This endpoint retrieves all customer balance transactions in reverse chronological order for a single customer, providing a complete audit trail of all adjustments and invoice applications.

func (*CustomerBalanceTransactionService) New

Creates an immutable balance transaction that updates the customer's balance and returns back the newly created transaction.

type CustomerCostListByExternalIDParams

type CustomerCostListByExternalIDParams struct {
	// The currency or custom pricing unit to use.
	Currency param.Field[string] `query:"currency"`
	// Costs returned are exclusive of `timeframe_end`.
	TimeframeEnd param.Field[time.Time] `query:"timeframe_end" format:"date-time"`
	// Costs returned are inclusive of `timeframe_start`.
	TimeframeStart param.Field[time.Time] `query:"timeframe_start" format:"date-time"`
	// Controls whether Orb returns cumulative costs since the start of the billing
	// period, or incremental day-by-day costs. If your customer has minimums or
	// discounts, it's strongly recommended that you use the default cumulative
	// behavior.
	ViewMode param.Field[CustomerCostListByExternalIDParamsViewMode] `query:"view_mode"`
}

func (CustomerCostListByExternalIDParams) URLQuery

URLQuery serializes CustomerCostListByExternalIDParams's query parameters as `url.Values`.

type CustomerCostListByExternalIDParamsViewMode

type CustomerCostListByExternalIDParamsViewMode string

Controls whether Orb returns cumulative costs since the start of the billing period, or incremental day-by-day costs. If your customer has minimums or discounts, it's strongly recommended that you use the default cumulative behavior.

const (
	CustomerCostListByExternalIDParamsViewModePeriodic   CustomerCostListByExternalIDParamsViewMode = "periodic"
	CustomerCostListByExternalIDParamsViewModeCumulative CustomerCostListByExternalIDParamsViewMode = "cumulative"
)

func (CustomerCostListByExternalIDParamsViewMode) IsKnown added in v0.24.0

type CustomerCostListByExternalIDResponse

type CustomerCostListByExternalIDResponse struct {
	Data []shared.AggregatedCost                  `json:"data,required"`
	JSON customerCostListByExternalIDResponseJSON `json:"-"`
}

func (*CustomerCostListByExternalIDResponse) UnmarshalJSON

func (r *CustomerCostListByExternalIDResponse) UnmarshalJSON(data []byte) (err error)

type CustomerCostListParams

type CustomerCostListParams struct {
	// The currency or custom pricing unit to use.
	Currency param.Field[string] `query:"currency"`
	// Costs returned are exclusive of `timeframe_end`.
	TimeframeEnd param.Field[time.Time] `query:"timeframe_end" format:"date-time"`
	// Costs returned are inclusive of `timeframe_start`.
	TimeframeStart param.Field[time.Time] `query:"timeframe_start" format:"date-time"`
	// Controls whether Orb returns cumulative costs since the start of the billing
	// period, or incremental day-by-day costs. If your customer has minimums or
	// discounts, it's strongly recommended that you use the default cumulative
	// behavior.
	ViewMode param.Field[CustomerCostListParamsViewMode] `query:"view_mode"`
}

func (CustomerCostListParams) URLQuery

func (r CustomerCostListParams) URLQuery() (v url.Values)

URLQuery serializes CustomerCostListParams's query parameters as `url.Values`.

type CustomerCostListParamsViewMode

type CustomerCostListParamsViewMode string

Controls whether Orb returns cumulative costs since the start of the billing period, or incremental day-by-day costs. If your customer has minimums or discounts, it's strongly recommended that you use the default cumulative behavior.

const (
	CustomerCostListParamsViewModePeriodic   CustomerCostListParamsViewMode = "periodic"
	CustomerCostListParamsViewModeCumulative CustomerCostListParamsViewMode = "cumulative"
)

func (CustomerCostListParamsViewMode) IsKnown added in v0.24.0

type CustomerCostListResponse

type CustomerCostListResponse struct {
	Data []shared.AggregatedCost      `json:"data,required"`
	JSON customerCostListResponseJSON `json:"-"`
}

func (*CustomerCostListResponse) UnmarshalJSON

func (r *CustomerCostListResponse) UnmarshalJSON(data []byte) (err error)

type CustomerCostService

type CustomerCostService struct {
	Options []option.RequestOption
}

CustomerCostService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCustomerCostService method instead.

func NewCustomerCostService

func NewCustomerCostService(opts ...option.RequestOption) (r *CustomerCostService)

NewCustomerCostService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CustomerCostService) List

This endpoint is used to fetch a day-by-day snapshot of a customer's costs in Orb, calculated by applying pricing information to the underlying usage (see the [subscription usage endpoint](/api-reference/subscription/fetch-subscription-usage) to fetch usage per metric, in usage units rather than a currency).

This endpoint can be leveraged for internal tooling and to provide a more transparent billing experience for your end users:

  1. Understand the cost breakdown per line item historically and in real-time for the current billing period.
  2. Provide customer visibility into how different services are contributing to the overall invoice with a per-day timeseries (as compared to the [upcoming invoice](/api-reference/invoice/fetch-upcoming-invoice) resource, which represents a snapshot for the current period).
  3. Assess how minimums and discounts affect your customers by teasing apart costs directly as a result of usage, as opposed to minimums and discounts at the plan and price level.
  4. Gain insight into key customer health metrics, such as the percent utilization of the minimum committed spend.

## Fetching subscriptions

By default, this endpoint fetches the currently active subscription for the customer, and returns cost information for the subscription's current billing period, broken down by each participating price. If there are no currently active subscriptions, this will instead default to the most recently active subscription or return an empty series if none are found. For example, if your plan charges for compute hours, job runs, and data syncs, then this endpoint would provide a daily breakdown of your customer's cost for each of those axes.

If timeframe bounds are specified, Orb fetches all subscriptions that were active in that timeframe. If two subscriptions overlap on a single day, costs from each price will be summed, and prices for both subscriptions will be included in the breakdown.

## Prepaid plans

For plans that include prices which deduct credits rather than accrue in-arrears charges in a billable currency, this endpoint will return the total deduction amount, in credits, for the specified timeframe.

## Cumulative subtotals and totals

Since the subtotal and total must factor in any billing-period level discounts and minimums, it's most meaningful to consider costs relative to the start of the subscription's billing period. As a result, by default this endpoint returns cumulative totals since the beginning of the billing period. In particular, the `timeframe_start` of a returned timeframe window is _always_ the beginning of the billing period and `timeframe_end` is incremented one day at a time to build the result.

A customer that uses a few API calls a day but has a minimum commitment might exhibit the following pattern for their subtotal and total in the first few days of the month. Here, we assume that each API call is $2.50, the customer's plan has a monthly minimum of $50 for this price, and that the subscription's billing period bounds are aligned to the first of the month:

| timeframe_start | timeframe_end | Cumulative usage | Subtotal | Total (incl. commitment) | | --------------- | ------------- | ---------------- | -------- | ------------------------ | | 2023-02-01 | 2023-02-02 | 9 | $22.50 | $50.00 | | 2023-02-01 | 2023-02-03 | 19 | $47.50 | $50.00 | | 2023-02-01 | 2023-02-04 | 20 | $50.00 | $50.00 | | 2023-02-01 | 2023-02-05 | 28 | $70.00 | $70.00 | | 2023-02-01 | 2023-02-06 | 36 | $90.00 | $90.00 |

### Periodic values

When the query parameter `view_mode=periodic` is specified, Orb will return an incremental day-by-day view of costs. In this case, there will always be a one-day difference between `timeframe_start` and `timeframe_end` for the timeframes returned. This is a transform on top of the cumulative costs, calculated by taking the difference of each timeframe with the last. Note that in the above example, the `Total` value would be 0 for the second two data points, since the minimum commitment has not yet been hit and each day is not contributing anything to the total cost.

## Timeframe bounds

For an active subscription, both timeframes should be specified in the request. If a subscription starts or ends within the timeframe, the response will only include windows where the subscription is active. If a subscription has ended, no timeframe bounds need to be specified and the response will default to the billing period when the subscription was last active.

As noted above, `timeframe_start` for a given cumulative datapoint is always the beginning of the billing period, and `timeframe_end` is incremented one day at a time to construct the response. When a timeframe is passed in that is not aligned to the current subscription's billing period, the response will contain cumulative totals from multiple billing periods.

Suppose the queried customer has a subscription aligned to the 15th of every month. If this endpoint is queried with the date range `2023-06-01` - `2023-07-01`, the first data point will represent about half a billing period's worth of costs, accounting for accruals from the start of the billing period and inclusive of the first day of the timeframe (`timeframe_start = 2023-05-15 00:00:00`, `timeframe_end = 2023-06-02 00:00:00`)

| datapoint index | timeframe_start | timeframe_end | | --------------- | --------------- | ------------- | | 0 | 2023-05-15 | 2023-06-02 | | 1 | 2023-05-15 | 2023-06-03 | | 2 | ... | ... | | 3 | 2023-05-15 | 2023-06-14 | | 4 | 2023-06-15 | 2023-06-16 | | 5 | 2023-06-15 | 2023-06-17 | | 6 | ... | ... | | 7 | 2023-06-15 | 2023-07-01 |

You can see this sliced timeframe visualized [here](https://i.imgur.com/TXhYgme.png).

### Matrix prices

When a price uses matrix pricing, it's important to view costs grouped by those matrix dimensions. Orb will return `price_groups` with the `grouping_key` and `secondary_grouping_key` based on the matrix price definition, for each `grouping_value` and `secondary_grouping_value` available.

func (*CustomerCostService) ListByExternalID

func (r *CustomerCostService) ListByExternalID(ctx context.Context, externalCustomerID string, query CustomerCostListByExternalIDParams, opts ...option.RequestOption) (res *CustomerCostListByExternalIDResponse, err error)

This endpoint is used to fetch a day-by-day snapshot of a customer's costs in Orb, calculated by applying pricing information to the underlying usage (see the [subscription usage endpoint](/api-reference/subscription/fetch-subscription-usage) to fetch usage per metric, in usage units rather than a currency).

This endpoint can be leveraged for internal tooling and to provide a more transparent billing experience for your end users:

  1. Understand the cost breakdown per line item historically and in real-time for the current billing period.
  2. Provide customer visibility into how different services are contributing to the overall invoice with a per-day timeseries (as compared to the [upcoming invoice](/api-reference/invoice/fetch-upcoming-invoice) resource, which represents a snapshot for the current period).
  3. Assess how minimums and discounts affect your customers by teasing apart costs directly as a result of usage, as opposed to minimums and discounts at the plan and price level.
  4. Gain insight into key customer health metrics, such as the percent utilization of the minimum committed spend.

## Fetching subscriptions

By default, this endpoint fetches the currently active subscription for the customer, and returns cost information for the subscription's current billing period, broken down by each participating price. If there are no currently active subscriptions, this will instead default to the most recently active subscription or return an empty series if none are found. For example, if your plan charges for compute hours, job runs, and data syncs, then this endpoint would provide a daily breakdown of your customer's cost for each of those axes.

If timeframe bounds are specified, Orb fetches all subscriptions that were active in that timeframe. If two subscriptions overlap on a single day, costs from each price will be summed, and prices for both subscriptions will be included in the breakdown.

## Prepaid plans

For plans that include prices which deduct credits rather than accrue in-arrears charges in a billable currency, this endpoint will return the total deduction amount, in credits, for the specified timeframe.

## Cumulative subtotals and totals

Since the subtotal and total must factor in any billing-period level discounts and minimums, it's most meaningful to consider costs relative to the start of the subscription's billing period. As a result, by default this endpoint returns cumulative totals since the beginning of the billing period. In particular, the `timeframe_start` of a returned timeframe window is _always_ the beginning of the billing period and `timeframe_end` is incremented one day at a time to build the result.

A customer that uses a few API calls a day but has a minimum commitment might exhibit the following pattern for their subtotal and total in the first few days of the month. Here, we assume that each API call is $2.50, the customer's plan has a monthly minimum of $50 for this price, and that the subscription's billing period bounds are aligned to the first of the month:

| timeframe_start | timeframe_end | Cumulative usage | Subtotal | Total (incl. commitment) | | --------------- | ------------- | ---------------- | -------- | ------------------------ | | 2023-02-01 | 2023-02-02 | 9 | $22.50 | $50.00 | | 2023-02-01 | 2023-02-03 | 19 | $47.50 | $50.00 | | 2023-02-01 | 2023-02-04 | 20 | $50.00 | $50.00 | | 2023-02-01 | 2023-02-05 | 28 | $70.00 | $70.00 | | 2023-02-01 | 2023-02-06 | 36 | $90.00 | $90.00 |

### Periodic values

When the query parameter `view_mode=periodic` is specified, Orb will return an incremental day-by-day view of costs. In this case, there will always be a one-day difference between `timeframe_start` and `timeframe_end` for the timeframes returned. This is a transform on top of the cumulative costs, calculated by taking the difference of each timeframe with the last. Note that in the above example, the `Total` value would be 0 for the second two data points, since the minimum commitment has not yet been hit and each day is not contributing anything to the total cost.

## Timeframe bounds

For an active subscription, both timeframes should be specified in the request. If a subscription starts or ends within the timeframe, the response will only include windows where the subscription is active. If a subscription has ended, no timeframe bounds need to be specified and the response will default to the billing period when the subscription was last active.

As noted above, `timeframe_start` for a given cumulative datapoint is always the beginning of the billing period, and `timeframe_end` is incremented one day at a time to construct the response. When a timeframe is passed in that is not aligned to the current subscription's billing period, the response will contain cumulative totals from multiple billing periods.

Suppose the queried customer has a subscription aligned to the 15th of every month. If this endpoint is queried with the date range `2023-06-01` - `2023-07-01`, the first data point will represent about half a billing period's worth of costs, accounting for accruals from the start of the billing period and inclusive of the first day of the timeframe (`timeframe_start = 2023-05-15 00:00:00`, `timeframe_end = 2023-06-02 00:00:00`)

| datapoint index | timeframe_start | timeframe_end | | --------------- | --------------- | ------------- | | 0 | 2023-05-15 | 2023-06-02 | | 1 | 2023-05-15 | 2023-06-03 | | 2 | ... | ... | | 3 | 2023-05-15 | 2023-06-14 | | 4 | 2023-06-15 | 2023-06-16 | | 5 | 2023-06-15 | 2023-06-17 | | 6 | ... | ... | | 7 | 2023-06-15 | 2023-07-01 |

You can see this sliced timeframe visualized [here](https://i.imgur.com/TXhYgme.png).

### Matrix prices

When a price uses matrix pricing, it's important to view costs grouped by those matrix dimensions. Orb will return `price_groups` with the `grouping_key` and `secondary_grouping_key` based on the matrix price definition, for each `grouping_value` and `secondary_grouping_value` available.

type CustomerCreditLedgerListByExternalIDParams

type CustomerCreditLedgerListByExternalIDParams struct {
	CreatedAtGt  param.Field[time.Time] `query:"created_at[gt]" format:"date-time"`
	CreatedAtGte param.Field[time.Time] `query:"created_at[gte]" format:"date-time"`
	CreatedAtLt  param.Field[time.Time] `query:"created_at[lt]" format:"date-time"`
	CreatedAtLte param.Field[time.Time] `query:"created_at[lte]" format:"date-time"`
	// The ledger currency or custom pricing unit to use.
	Currency param.Field[string] `query:"currency"`
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor      param.Field[string]                                                `query:"cursor"`
	EntryStatus param.Field[CustomerCreditLedgerListByExternalIDParamsEntryStatus] `query:"entry_status"`
	EntryType   param.Field[CustomerCreditLedgerListByExternalIDParamsEntryType]   `query:"entry_type"`
	// The number of items to fetch. Defaults to 20.
	Limit         param.Field[int64]  `query:"limit"`
	MinimumAmount param.Field[string] `query:"minimum_amount"`
}

func (CustomerCreditLedgerListByExternalIDParams) URLQuery

URLQuery serializes CustomerCreditLedgerListByExternalIDParams's query parameters as `url.Values`.

type CustomerCreditLedgerListByExternalIDParamsEntryStatus

type CustomerCreditLedgerListByExternalIDParamsEntryStatus string
const (
	CustomerCreditLedgerListByExternalIDParamsEntryStatusCommitted CustomerCreditLedgerListByExternalIDParamsEntryStatus = "committed"
	CustomerCreditLedgerListByExternalIDParamsEntryStatusPending   CustomerCreditLedgerListByExternalIDParamsEntryStatus = "pending"
)

func (CustomerCreditLedgerListByExternalIDParamsEntryStatus) IsKnown added in v0.24.0

type CustomerCreditLedgerListByExternalIDParamsEntryType

type CustomerCreditLedgerListByExternalIDParamsEntryType string
const (
	CustomerCreditLedgerListByExternalIDParamsEntryTypeIncrement         CustomerCreditLedgerListByExternalIDParamsEntryType = "increment"
	CustomerCreditLedgerListByExternalIDParamsEntryTypeDecrement         CustomerCreditLedgerListByExternalIDParamsEntryType = "decrement"
	CustomerCreditLedgerListByExternalIDParamsEntryTypeExpirationChange  CustomerCreditLedgerListByExternalIDParamsEntryType = "expiration_change"
	CustomerCreditLedgerListByExternalIDParamsEntryTypeCreditBlockExpiry CustomerCreditLedgerListByExternalIDParamsEntryType = "credit_block_expiry"
	CustomerCreditLedgerListByExternalIDParamsEntryTypeVoid              CustomerCreditLedgerListByExternalIDParamsEntryType = "void"
	CustomerCreditLedgerListByExternalIDParamsEntryTypeVoidInitiated     CustomerCreditLedgerListByExternalIDParamsEntryType = "void_initiated"
	CustomerCreditLedgerListByExternalIDParamsEntryTypeAmendment         CustomerCreditLedgerListByExternalIDParamsEntryType = "amendment"
)

func (CustomerCreditLedgerListByExternalIDParamsEntryType) IsKnown added in v0.24.0

type CustomerCreditLedgerListByExternalIDResponse

type CustomerCreditLedgerListByExternalIDResponse struct {
	ID                   string                                                  `json:"id,required"`
	Amount               float64                                                 `json:"amount,required"`
	CreatedAt            time.Time                                               `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlock                                           `json:"credit_block,required"`
	Currency             string                                                  `json:"currency,required"`
	Customer             shared.CustomerMinified                                 `json:"customer,required"`
	Description          string                                                  `json:"description,required,nullable"`
	EndingBalance        float64                                                 `json:"ending_balance,required"`
	EntryStatus          CustomerCreditLedgerListByExternalIDResponseEntryStatus `json:"entry_status,required"`
	EntryType            CustomerCreditLedgerListByExternalIDResponseEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                                                   `json:"ledger_sequence_number,required"`
	// This field can have the runtime type of [map[string]string].
	Metadata        interface{} `json:"metadata,required"`
	StartingBalance float64     `json:"starting_balance,required"`
	// This field can have the runtime type of [[]shared.Invoice].
	CreatedInvoices    interface{}                                      `json:"created_invoices"`
	EventID            string                                           `json:"event_id,nullable"`
	InvoiceID          string                                           `json:"invoice_id,nullable"`
	NewBlockExpiryDate time.Time                                        `json:"new_block_expiry_date,nullable" format:"date-time"`
	PriceID            string                                           `json:"price_id,nullable"`
	VoidAmount         float64                                          `json:"void_amount"`
	VoidReason         string                                           `json:"void_reason,nullable"`
	JSON               customerCreditLedgerListByExternalIDResponseJSON `json:"-"`
	// contains filtered or unexported fields
}

The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.

func (CustomerCreditLedgerListByExternalIDResponse) AsUnion added in v0.25.0

AsUnion returns a CustomerCreditLedgerListByExternalIDResponseUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are IncrementLedgerEntry, DecrementLedgerEntry, ExpirationChangeLedgerEntry, CreditBlockExpiryLedgerEntry, VoidLedgerEntry, VoidInitiatedLedgerEntry, AmendmentLedgerEntry.

func (*CustomerCreditLedgerListByExternalIDResponse) UnmarshalJSON added in v0.25.0

func (r *CustomerCreditLedgerListByExternalIDResponse) UnmarshalJSON(data []byte) (err error)

type CustomerCreditLedgerListByExternalIDResponseEntryStatus added in v0.25.0

type CustomerCreditLedgerListByExternalIDResponseEntryStatus string
const (
	CustomerCreditLedgerListByExternalIDResponseEntryStatusCommitted CustomerCreditLedgerListByExternalIDResponseEntryStatus = "committed"
	CustomerCreditLedgerListByExternalIDResponseEntryStatusPending   CustomerCreditLedgerListByExternalIDResponseEntryStatus = "pending"
)

func (CustomerCreditLedgerListByExternalIDResponseEntryStatus) IsKnown added in v0.25.0

type CustomerCreditLedgerListByExternalIDResponseEntryType added in v0.25.0

type CustomerCreditLedgerListByExternalIDResponseEntryType string
const (
	CustomerCreditLedgerListByExternalIDResponseEntryTypeIncrement         CustomerCreditLedgerListByExternalIDResponseEntryType = "increment"
	CustomerCreditLedgerListByExternalIDResponseEntryTypeDecrement         CustomerCreditLedgerListByExternalIDResponseEntryType = "decrement"
	CustomerCreditLedgerListByExternalIDResponseEntryTypeExpirationChange  CustomerCreditLedgerListByExternalIDResponseEntryType = "expiration_change"
	CustomerCreditLedgerListByExternalIDResponseEntryTypeCreditBlockExpiry CustomerCreditLedgerListByExternalIDResponseEntryType = "credit_block_expiry"
	CustomerCreditLedgerListByExternalIDResponseEntryTypeVoid              CustomerCreditLedgerListByExternalIDResponseEntryType = "void"
	CustomerCreditLedgerListByExternalIDResponseEntryTypeVoidInitiated     CustomerCreditLedgerListByExternalIDResponseEntryType = "void_initiated"
	CustomerCreditLedgerListByExternalIDResponseEntryTypeAmendment         CustomerCreditLedgerListByExternalIDResponseEntryType = "amendment"
)

func (CustomerCreditLedgerListByExternalIDResponseEntryType) IsKnown added in v0.25.0

type CustomerCreditLedgerListByExternalIDResponseUnion added in v0.25.0

type CustomerCreditLedgerListByExternalIDResponseUnion interface {
	// contains filtered or unexported methods
}

The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.

Union satisfied by IncrementLedgerEntry, DecrementLedgerEntry, ExpirationChangeLedgerEntry, CreditBlockExpiryLedgerEntry, VoidLedgerEntry, VoidInitiatedLedgerEntry or AmendmentLedgerEntry.

type CustomerCreditLedgerListParams

type CustomerCreditLedgerListParams struct {
	CreatedAtGt  param.Field[time.Time] `query:"created_at[gt]" format:"date-time"`
	CreatedAtGte param.Field[time.Time] `query:"created_at[gte]" format:"date-time"`
	CreatedAtLt  param.Field[time.Time] `query:"created_at[lt]" format:"date-time"`
	CreatedAtLte param.Field[time.Time] `query:"created_at[lte]" format:"date-time"`
	// The ledger currency or custom pricing unit to use.
	Currency param.Field[string] `query:"currency"`
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor      param.Field[string]                                    `query:"cursor"`
	EntryStatus param.Field[CustomerCreditLedgerListParamsEntryStatus] `query:"entry_status"`
	EntryType   param.Field[CustomerCreditLedgerListParamsEntryType]   `query:"entry_type"`
	// The number of items to fetch. Defaults to 20.
	Limit         param.Field[int64]  `query:"limit"`
	MinimumAmount param.Field[string] `query:"minimum_amount"`
}

func (CustomerCreditLedgerListParams) URLQuery

func (r CustomerCreditLedgerListParams) URLQuery() (v url.Values)

URLQuery serializes CustomerCreditLedgerListParams's query parameters as `url.Values`.

type CustomerCreditLedgerListParamsEntryStatus

type CustomerCreditLedgerListParamsEntryStatus string
const (
	CustomerCreditLedgerListParamsEntryStatusCommitted CustomerCreditLedgerListParamsEntryStatus = "committed"
	CustomerCreditLedgerListParamsEntryStatusPending   CustomerCreditLedgerListParamsEntryStatus = "pending"
)

func (CustomerCreditLedgerListParamsEntryStatus) IsKnown added in v0.24.0

type CustomerCreditLedgerListParamsEntryType

type CustomerCreditLedgerListParamsEntryType string
const (
	CustomerCreditLedgerListParamsEntryTypeIncrement         CustomerCreditLedgerListParamsEntryType = "increment"
	CustomerCreditLedgerListParamsEntryTypeDecrement         CustomerCreditLedgerListParamsEntryType = "decrement"
	CustomerCreditLedgerListParamsEntryTypeExpirationChange  CustomerCreditLedgerListParamsEntryType = "expiration_change"
	CustomerCreditLedgerListParamsEntryTypeCreditBlockExpiry CustomerCreditLedgerListParamsEntryType = "credit_block_expiry"
	CustomerCreditLedgerListParamsEntryTypeVoid              CustomerCreditLedgerListParamsEntryType = "void"
	CustomerCreditLedgerListParamsEntryTypeVoidInitiated     CustomerCreditLedgerListParamsEntryType = "void_initiated"
	CustomerCreditLedgerListParamsEntryTypeAmendment         CustomerCreditLedgerListParamsEntryType = "amendment"
)

func (CustomerCreditLedgerListParamsEntryType) IsKnown added in v0.24.0

type CustomerCreditLedgerListResponse

type CustomerCreditLedgerListResponse struct {
	ID                   string                                      `json:"id,required"`
	Amount               float64                                     `json:"amount,required"`
	CreatedAt            time.Time                                   `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlock                               `json:"credit_block,required"`
	Currency             string                                      `json:"currency,required"`
	Customer             shared.CustomerMinified                     `json:"customer,required"`
	Description          string                                      `json:"description,required,nullable"`
	EndingBalance        float64                                     `json:"ending_balance,required"`
	EntryStatus          CustomerCreditLedgerListResponseEntryStatus `json:"entry_status,required"`
	EntryType            CustomerCreditLedgerListResponseEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                                       `json:"ledger_sequence_number,required"`
	// This field can have the runtime type of [map[string]string].
	Metadata        interface{} `json:"metadata,required"`
	StartingBalance float64     `json:"starting_balance,required"`
	// This field can have the runtime type of [[]shared.Invoice].
	CreatedInvoices    interface{}                          `json:"created_invoices"`
	EventID            string                               `json:"event_id,nullable"`
	InvoiceID          string                               `json:"invoice_id,nullable"`
	NewBlockExpiryDate time.Time                            `json:"new_block_expiry_date,nullable" format:"date-time"`
	PriceID            string                               `json:"price_id,nullable"`
	VoidAmount         float64                              `json:"void_amount"`
	VoidReason         string                               `json:"void_reason,nullable"`
	JSON               customerCreditLedgerListResponseJSON `json:"-"`
	// contains filtered or unexported fields
}

The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.

func (CustomerCreditLedgerListResponse) AsUnion added in v0.25.0

AsUnion returns a CustomerCreditLedgerListResponseUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are IncrementLedgerEntry, DecrementLedgerEntry, ExpirationChangeLedgerEntry, CreditBlockExpiryLedgerEntry, VoidLedgerEntry, VoidInitiatedLedgerEntry, AmendmentLedgerEntry.

func (*CustomerCreditLedgerListResponse) UnmarshalJSON added in v0.25.0

func (r *CustomerCreditLedgerListResponse) UnmarshalJSON(data []byte) (err error)

type CustomerCreditLedgerListResponseEntryStatus added in v0.25.0

type CustomerCreditLedgerListResponseEntryStatus string
const (
	CustomerCreditLedgerListResponseEntryStatusCommitted CustomerCreditLedgerListResponseEntryStatus = "committed"
	CustomerCreditLedgerListResponseEntryStatusPending   CustomerCreditLedgerListResponseEntryStatus = "pending"
)

func (CustomerCreditLedgerListResponseEntryStatus) IsKnown added in v0.25.0

type CustomerCreditLedgerListResponseEntryType added in v0.25.0

type CustomerCreditLedgerListResponseEntryType string
const (
	CustomerCreditLedgerListResponseEntryTypeIncrement         CustomerCreditLedgerListResponseEntryType = "increment"
	CustomerCreditLedgerListResponseEntryTypeDecrement         CustomerCreditLedgerListResponseEntryType = "decrement"
	CustomerCreditLedgerListResponseEntryTypeExpirationChange  CustomerCreditLedgerListResponseEntryType = "expiration_change"
	CustomerCreditLedgerListResponseEntryTypeCreditBlockExpiry CustomerCreditLedgerListResponseEntryType = "credit_block_expiry"
	CustomerCreditLedgerListResponseEntryTypeVoid              CustomerCreditLedgerListResponseEntryType = "void"
	CustomerCreditLedgerListResponseEntryTypeVoidInitiated     CustomerCreditLedgerListResponseEntryType = "void_initiated"
	CustomerCreditLedgerListResponseEntryTypeAmendment         CustomerCreditLedgerListResponseEntryType = "amendment"
)

func (CustomerCreditLedgerListResponseEntryType) IsKnown added in v0.25.0

type CustomerCreditLedgerListResponseUnion added in v0.25.0

type CustomerCreditLedgerListResponseUnion interface {
	// contains filtered or unexported methods
}

The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.

Union satisfied by IncrementLedgerEntry, DecrementLedgerEntry, ExpirationChangeLedgerEntry, CreditBlockExpiryLedgerEntry, VoidLedgerEntry, VoidInitiatedLedgerEntry or AmendmentLedgerEntry.

type CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParams added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParams struct {
	// The number of credits to effect. Note that this is required for increment,
	// decrement or void operations.
	Amount param.Field[float64] `json:"amount,required"`
	// The ID of the block to reverse a decrement from.
	BlockID   param.Field[string]                                                                                            `json:"block_id,required"`
	EntryType param.Field[CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType] `json:"entry_type,required"`
	// The currency or custom pricing unit to use for this ledger entry. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency param.Field[string] `json:"currency"`
	// Optional metadata that can be specified when adding ledger results via the API.
	// For example, this can be used to note an increment refers to trial credits, or
	// for noting corrections as a result of an incident, etc.
	Description param.Field[string] `json:"description"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams added in v0.2.1

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams()

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParams) MarshalJSON added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType string
const (
	CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParamsEntryTypeAmendment CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType = "amendment"
)

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType) IsKnown added in v0.24.0

type CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParams added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParams struct {
	// The number of credits to effect. Note that this is required for increment,
	// decrement, void, or undo operations.
	Amount    param.Field[float64]                                                                                           `json:"amount,required"`
	EntryType param.Field[CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParamsEntryType] `json:"entry_type,required"`
	// The currency or custom pricing unit to use for this ledger entry. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency param.Field[string] `json:"currency"`
	// Optional metadata that can be specified when adding ledger results via the API.
	// For example, this can be used to note an increment refers to trial credits, or
	// for noting corrections as a result of an incident, etc.
	Description param.Field[string] `json:"description"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams added in v0.2.1

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams()

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParams) MarshalJSON added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParamsEntryType added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParamsEntryType string
const (
	CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParamsEntryTypeDecrement CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParamsEntryType = "decrement"
)

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParamsEntryType) IsKnown added in v0.24.0

type CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParams added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParams struct {
	EntryType param.Field[CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType] `json:"entry_type,required"`
	// An ISO 8601 format date that identifies the origination credit block to expire
	ExpiryDate param.Field[time.Time] `json:"expiry_date,required" format:"date-time"`
	// A future date (specified in YYYY-MM-DD format) used for expiration change,
	// denoting when credits transferred (as part of a partial block expiration) should
	// expire.
	TargetExpiryDate param.Field[time.Time] `json:"target_expiry_date,required" format:"date"`
	// The number of credits to effect. Note that this is required for increment,
	// decrement, void, or undo operations.
	Amount param.Field[float64] `json:"amount"`
	// The ID of the block affected by an expiration_change, used to differentiate
	// between multiple blocks with the same `expiry_date`.
	BlockID param.Field[string] `json:"block_id"`
	// The currency or custom pricing unit to use for this ledger entry. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency param.Field[string] `json:"currency"`
	// Optional metadata that can be specified when adding ledger results via the API.
	// For example, this can be used to note an increment refers to trial credits, or
	// for noting corrections as a result of an incident, etc.
	Description param.Field[string] `json:"description"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams added in v0.2.1

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams()

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParams) MarshalJSON added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType string
const (
	CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryTypeExpirationChange CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType = "expiration_change"
)

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType) IsKnown added in v0.24.0

type CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParams added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParams struct {
	// The number of credits to effect. Note that this is required for increment,
	// decrement, void, or undo operations.
	Amount    param.Field[float64]                                                                                           `json:"amount,required"`
	EntryType param.Field[CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsEntryType] `json:"entry_type,required"`
	// The currency or custom pricing unit to use for this ledger entry. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency param.Field[string] `json:"currency"`
	// Optional metadata that can be specified when adding ledger results via the API.
	// For example, this can be used to note an increment refers to trial credits, or
	// for noting corrections as a result of an incident, etc.
	Description param.Field[string] `json:"description"`
	// An ISO 8601 format date that denotes when this credit balance should become
	// available for use.
	EffectiveDate param.Field[time.Time] `json:"effective_date" format:"date-time"`
	// An ISO 8601 format date that denotes when this credit balance should expire.
	ExpiryDate param.Field[time.Time] `json:"expiry_date" format:"date-time"`
	// Passing `invoice_settings` automatically generates an invoice for the newly
	// added credits. If `invoice_settings` is passed, you must specify
	// per_unit_cost_basis, as the calculation of the invoice total is done on that
	// basis.
	InvoiceSettings param.Field[CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings] `json:"invoice_settings"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// Can only be specified when entry_type=increment. How much, in the customer's
	// currency, a customer paid for a single credit in this block
	PerUnitCostBasis param.Field[string] `json:"per_unit_cost_basis"`
}

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams added in v0.2.1

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams()

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParams) MarshalJSON added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsEntryType added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsEntryType string
const (
	CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsEntryTypeIncrement CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsEntryType = "increment"
)

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsEntryType) IsKnown added in v0.24.0

type CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings struct {
	// Whether the credits purchase invoice should auto collect with the customer's
	// saved payment method.
	AutoCollection param.Field[bool] `json:"auto_collection,required"`
	// The net terms determines the difference between the invoice date and the issue
	// date for the invoice. If you intend the invoice to be due on issue, set this
	// to 0.
	NetTerms param.Field[int64] `json:"net_terms,required"`
	// An optional memo to display on the invoice.
	Memo param.Field[string] `json:"memo"`
	// If true, the new credit block will require that the corresponding invoice is
	// paid before it can be drawn down from.
	RequireSuccessfulPayment param.Field[bool] `json:"require_successful_payment"`
}

Passing `invoice_settings` automatically generates an invoice for the newly added credits. If `invoice_settings` is passed, you must specify per_unit_cost_basis, as the calculation of the invoice total is done on that basis.

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings) MarshalJSON added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParams added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParams struct {
	// The number of credits to effect. Note that this is required for increment,
	// decrement, void, or undo operations.
	Amount param.Field[float64] `json:"amount,required"`
	// The ID of the block to void.
	BlockID   param.Field[string]                                                                                       `json:"block_id,required"`
	EntryType param.Field[CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsEntryType] `json:"entry_type,required"`
	// The currency or custom pricing unit to use for this ledger entry. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency param.Field[string] `json:"currency"`
	// Optional metadata that can be specified when adding ledger results via the API.
	// For example, this can be used to note an increment refers to trial credits, or
	// for noting corrections as a result of an incident, etc.
	Description param.Field[string] `json:"description"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// Can only be specified when `entry_type=void`. The reason for the void.
	VoidReason param.Field[CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsVoidReason] `json:"void_reason"`
}

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams added in v0.2.1

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams()

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParams) MarshalJSON added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsEntryType added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsEntryType string
const (
	CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsEntryTypeVoid CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsEntryType = "void"
)

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsEntryType) IsKnown added in v0.24.0

type CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsVoidReason added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsVoidReason string

Can only be specified when `entry_type=void`. The reason for the void.

const (
	CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsVoidReasonRefund CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsVoidReason = "refund"
)

func (CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsVoidReason) IsKnown added in v0.24.0

type CustomerCreditLedgerNewEntryByExternalIDResponse added in v0.2.1

type CustomerCreditLedgerNewEntryByExternalIDResponse struct {
	ID                   string                                                      `json:"id,required"`
	Amount               float64                                                     `json:"amount,required"`
	CreatedAt            time.Time                                                   `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlock                                               `json:"credit_block,required"`
	Currency             string                                                      `json:"currency,required"`
	Customer             shared.CustomerMinified                                     `json:"customer,required"`
	Description          string                                                      `json:"description,required,nullable"`
	EndingBalance        float64                                                     `json:"ending_balance,required"`
	EntryStatus          CustomerCreditLedgerNewEntryByExternalIDResponseEntryStatus `json:"entry_status,required"`
	EntryType            CustomerCreditLedgerNewEntryByExternalIDResponseEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                                                       `json:"ledger_sequence_number,required"`
	// This field can have the runtime type of [map[string]string].
	Metadata        interface{} `json:"metadata,required"`
	StartingBalance float64     `json:"starting_balance,required"`
	// This field can have the runtime type of [[]shared.Invoice].
	CreatedInvoices    interface{}                                          `json:"created_invoices"`
	EventID            string                                               `json:"event_id,nullable"`
	InvoiceID          string                                               `json:"invoice_id,nullable"`
	NewBlockExpiryDate time.Time                                            `json:"new_block_expiry_date,nullable" format:"date-time"`
	PriceID            string                                               `json:"price_id,nullable"`
	VoidAmount         float64                                              `json:"void_amount"`
	VoidReason         string                                               `json:"void_reason,nullable"`
	JSON               customerCreditLedgerNewEntryByExternalIDResponseJSON `json:"-"`
	// contains filtered or unexported fields
}

The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.

func (CustomerCreditLedgerNewEntryByExternalIDResponse) AsUnion added in v0.25.0

AsUnion returns a CustomerCreditLedgerNewEntryByExternalIDResponseUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are IncrementLedgerEntry, DecrementLedgerEntry, ExpirationChangeLedgerEntry, CreditBlockExpiryLedgerEntry, VoidLedgerEntry, VoidInitiatedLedgerEntry, AmendmentLedgerEntry.

func (*CustomerCreditLedgerNewEntryByExternalIDResponse) UnmarshalJSON added in v0.25.0

func (r *CustomerCreditLedgerNewEntryByExternalIDResponse) UnmarshalJSON(data []byte) (err error)

type CustomerCreditLedgerNewEntryByExternalIDResponseEntryStatus added in v0.25.0

type CustomerCreditLedgerNewEntryByExternalIDResponseEntryStatus string
const (
	CustomerCreditLedgerNewEntryByExternalIDResponseEntryStatusCommitted CustomerCreditLedgerNewEntryByExternalIDResponseEntryStatus = "committed"
	CustomerCreditLedgerNewEntryByExternalIDResponseEntryStatusPending   CustomerCreditLedgerNewEntryByExternalIDResponseEntryStatus = "pending"
)

func (CustomerCreditLedgerNewEntryByExternalIDResponseEntryStatus) IsKnown added in v0.25.0

type CustomerCreditLedgerNewEntryByExternalIDResponseEntryType added in v0.25.0

type CustomerCreditLedgerNewEntryByExternalIDResponseEntryType string
const (
	CustomerCreditLedgerNewEntryByExternalIDResponseEntryTypeIncrement         CustomerCreditLedgerNewEntryByExternalIDResponseEntryType = "increment"
	CustomerCreditLedgerNewEntryByExternalIDResponseEntryTypeDecrement         CustomerCreditLedgerNewEntryByExternalIDResponseEntryType = "decrement"
	CustomerCreditLedgerNewEntryByExternalIDResponseEntryTypeExpirationChange  CustomerCreditLedgerNewEntryByExternalIDResponseEntryType = "expiration_change"
	CustomerCreditLedgerNewEntryByExternalIDResponseEntryTypeCreditBlockExpiry CustomerCreditLedgerNewEntryByExternalIDResponseEntryType = "credit_block_expiry"
	CustomerCreditLedgerNewEntryByExternalIDResponseEntryTypeVoid              CustomerCreditLedgerNewEntryByExternalIDResponseEntryType = "void"
	CustomerCreditLedgerNewEntryByExternalIDResponseEntryTypeVoidInitiated     CustomerCreditLedgerNewEntryByExternalIDResponseEntryType = "void_initiated"
	CustomerCreditLedgerNewEntryByExternalIDResponseEntryTypeAmendment         CustomerCreditLedgerNewEntryByExternalIDResponseEntryType = "amendment"
)

func (CustomerCreditLedgerNewEntryByExternalIDResponseEntryType) IsKnown added in v0.25.0

type CustomerCreditLedgerNewEntryByExternalIDResponseUnion added in v0.25.0

type CustomerCreditLedgerNewEntryByExternalIDResponseUnion interface {
	// contains filtered or unexported methods
}

The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.

Union satisfied by IncrementLedgerEntry, DecrementLedgerEntry, ExpirationChangeLedgerEntry, CreditBlockExpiryLedgerEntry, VoidLedgerEntry, VoidInitiatedLedgerEntry or AmendmentLedgerEntry.

type CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParams

type CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParams struct {
	// The number of credits to effect. Note that this is required for increment,
	// decrement or void operations.
	Amount param.Field[float64] `json:"amount,required"`
	// The ID of the block to reverse a decrement from.
	BlockID   param.Field[string]                                                                                `json:"block_id,required"`
	EntryType param.Field[CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType] `json:"entry_type,required"`
	// The currency or custom pricing unit to use for this ledger entry. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency param.Field[string] `json:"currency"`
	// Optional metadata that can be specified when adding ledger results via the API.
	// For example, this can be used to note an increment refers to trial credits, or
	// for noting corrections as a result of an incident, etc.
	Description param.Field[string] `json:"description"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams

func (CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams()

func (CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParams) MarshalJSON

type CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType

type CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType string
const (
	CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParamsEntryTypeAmendment CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType = "amendment"
)

func (CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType) IsKnown added in v0.24.0

type CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParams

type CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParams struct {
	// The number of credits to effect. Note that this is required for increment,
	// decrement, void, or undo operations.
	Amount    param.Field[float64]                                                                               `json:"amount,required"`
	EntryType param.Field[CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParamsEntryType] `json:"entry_type,required"`
	// The currency or custom pricing unit to use for this ledger entry. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency param.Field[string] `json:"currency"`
	// Optional metadata that can be specified when adding ledger results via the API.
	// For example, this can be used to note an increment refers to trial credits, or
	// for noting corrections as a result of an incident, etc.
	Description param.Field[string] `json:"description"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams

func (CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams()

func (CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParams) MarshalJSON

type CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParamsEntryType

type CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParamsEntryType string
const (
	CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParamsEntryTypeDecrement CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParamsEntryType = "decrement"
)

func (CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParamsEntryType) IsKnown added in v0.24.0

type CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParams

type CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParams struct {
	EntryType param.Field[CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType] `json:"entry_type,required"`
	// An ISO 8601 format date that identifies the origination credit block to expire
	ExpiryDate param.Field[time.Time] `json:"expiry_date,required" format:"date-time"`
	// A future date (specified in YYYY-MM-DD format) used for expiration change,
	// denoting when credits transferred (as part of a partial block expiration) should
	// expire.
	TargetExpiryDate param.Field[time.Time] `json:"target_expiry_date,required" format:"date"`
	// The number of credits to effect. Note that this is required for increment,
	// decrement, void, or undo operations.
	Amount param.Field[float64] `json:"amount"`
	// The ID of the block affected by an expiration_change, used to differentiate
	// between multiple blocks with the same `expiry_date`.
	BlockID param.Field[string] `json:"block_id"`
	// The currency or custom pricing unit to use for this ledger entry. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency param.Field[string] `json:"currency"`
	// Optional metadata that can be specified when adding ledger results via the API.
	// For example, this can be used to note an increment refers to trial credits, or
	// for noting corrections as a result of an incident, etc.
	Description param.Field[string] `json:"description"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams

func (CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams()

func (CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParams) MarshalJSON

type CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType

type CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType string
const (
	CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryTypeExpirationChange CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType = "expiration_change"
)

func (CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType) IsKnown added in v0.24.0

type CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParams

type CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParams struct {
	// The number of credits to effect. Note that this is required for increment,
	// decrement, void, or undo operations.
	Amount    param.Field[float64]                                                                               `json:"amount,required"`
	EntryType param.Field[CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsEntryType] `json:"entry_type,required"`
	// The currency or custom pricing unit to use for this ledger entry. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency param.Field[string] `json:"currency"`
	// Optional metadata that can be specified when adding ledger results via the API.
	// For example, this can be used to note an increment refers to trial credits, or
	// for noting corrections as a result of an incident, etc.
	Description param.Field[string] `json:"description"`
	// An ISO 8601 format date that denotes when this credit balance should become
	// available for use.
	EffectiveDate param.Field[time.Time] `json:"effective_date" format:"date-time"`
	// An ISO 8601 format date that denotes when this credit balance should expire.
	ExpiryDate param.Field[time.Time] `json:"expiry_date" format:"date-time"`
	// Passing `invoice_settings` automatically generates an invoice for the newly
	// added credits. If `invoice_settings` is passed, you must specify
	// per_unit_cost_basis, as the calculation of the invoice total is done on that
	// basis.
	InvoiceSettings param.Field[CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings] `json:"invoice_settings"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// Can only be specified when entry_type=increment. How much, in the customer's
	// currency, a customer paid for a single credit in this block
	PerUnitCostBasis param.Field[string] `json:"per_unit_cost_basis"`
}

func (CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams

func (CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams()

func (CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParams) MarshalJSON

type CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsEntryType

type CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsEntryType string
const (
	CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsEntryTypeIncrement CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsEntryType = "increment"
)

func (CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsEntryType) IsKnown added in v0.24.0

type CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings

type CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings struct {
	// Whether the credits purchase invoice should auto collect with the customer's
	// saved payment method.
	AutoCollection param.Field[bool] `json:"auto_collection,required"`
	// The net terms determines the difference between the invoice date and the issue
	// date for the invoice. If you intend the invoice to be due on issue, set this
	// to 0.
	NetTerms param.Field[int64] `json:"net_terms,required"`
	// An optional memo to display on the invoice.
	Memo param.Field[string] `json:"memo"`
	// If true, the new credit block will require that the corresponding invoice is
	// paid before it can be drawn down from.
	RequireSuccessfulPayment param.Field[bool] `json:"require_successful_payment"`
}

Passing `invoice_settings` automatically generates an invoice for the newly added credits. If `invoice_settings` is passed, you must specify per_unit_cost_basis, as the calculation of the invoice total is done on that basis.

func (CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings) MarshalJSON

type CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParams

type CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParams struct {
	// The number of credits to effect. Note that this is required for increment,
	// decrement, void, or undo operations.
	Amount param.Field[float64] `json:"amount,required"`
	// The ID of the block to void.
	BlockID   param.Field[string]                                                                           `json:"block_id,required"`
	EntryType param.Field[CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsEntryType] `json:"entry_type,required"`
	// The currency or custom pricing unit to use for this ledger entry. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency param.Field[string] `json:"currency"`
	// Optional metadata that can be specified when adding ledger results via the API.
	// For example, this can be used to note an increment refers to trial credits, or
	// for noting corrections as a result of an incident, etc.
	Description param.Field[string] `json:"description"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// Can only be specified when `entry_type=void`. The reason for the void.
	VoidReason param.Field[CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsVoidReason] `json:"void_reason"`
}

func (CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams

func (CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams()

func (CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParams) MarshalJSON

type CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsEntryType

type CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsEntryType string
const (
	CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsEntryTypeVoid CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsEntryType = "void"
)

func (CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsEntryType) IsKnown added in v0.24.0

type CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsVoidReason

type CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsVoidReason string

Can only be specified when `entry_type=void`. The reason for the void.

const (
	CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsVoidReasonRefund CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsVoidReason = "refund"
)

func (CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsVoidReason) IsKnown added in v0.24.0

type CustomerCreditLedgerNewEntryResponse

type CustomerCreditLedgerNewEntryResponse struct {
	ID                   string                                          `json:"id,required"`
	Amount               float64                                         `json:"amount,required"`
	CreatedAt            time.Time                                       `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlock                                   `json:"credit_block,required"`
	Currency             string                                          `json:"currency,required"`
	Customer             shared.CustomerMinified                         `json:"customer,required"`
	Description          string                                          `json:"description,required,nullable"`
	EndingBalance        float64                                         `json:"ending_balance,required"`
	EntryStatus          CustomerCreditLedgerNewEntryResponseEntryStatus `json:"entry_status,required"`
	EntryType            CustomerCreditLedgerNewEntryResponseEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                                           `json:"ledger_sequence_number,required"`
	// This field can have the runtime type of [map[string]string].
	Metadata        interface{} `json:"metadata,required"`
	StartingBalance float64     `json:"starting_balance,required"`
	// This field can have the runtime type of [[]shared.Invoice].
	CreatedInvoices    interface{}                              `json:"created_invoices"`
	EventID            string                                   `json:"event_id,nullable"`
	InvoiceID          string                                   `json:"invoice_id,nullable"`
	NewBlockExpiryDate time.Time                                `json:"new_block_expiry_date,nullable" format:"date-time"`
	PriceID            string                                   `json:"price_id,nullable"`
	VoidAmount         float64                                  `json:"void_amount"`
	VoidReason         string                                   `json:"void_reason,nullable"`
	JSON               customerCreditLedgerNewEntryResponseJSON `json:"-"`
	// contains filtered or unexported fields
}

The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.

func (CustomerCreditLedgerNewEntryResponse) AsUnion added in v0.25.0

AsUnion returns a CustomerCreditLedgerNewEntryResponseUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are IncrementLedgerEntry, DecrementLedgerEntry, ExpirationChangeLedgerEntry, CreditBlockExpiryLedgerEntry, VoidLedgerEntry, VoidInitiatedLedgerEntry, AmendmentLedgerEntry.

func (*CustomerCreditLedgerNewEntryResponse) UnmarshalJSON added in v0.25.0

func (r *CustomerCreditLedgerNewEntryResponse) UnmarshalJSON(data []byte) (err error)

type CustomerCreditLedgerNewEntryResponseEntryStatus added in v0.25.0

type CustomerCreditLedgerNewEntryResponseEntryStatus string
const (
	CustomerCreditLedgerNewEntryResponseEntryStatusCommitted CustomerCreditLedgerNewEntryResponseEntryStatus = "committed"
	CustomerCreditLedgerNewEntryResponseEntryStatusPending   CustomerCreditLedgerNewEntryResponseEntryStatus = "pending"
)

func (CustomerCreditLedgerNewEntryResponseEntryStatus) IsKnown added in v0.25.0

type CustomerCreditLedgerNewEntryResponseEntryType added in v0.25.0

type CustomerCreditLedgerNewEntryResponseEntryType string
const (
	CustomerCreditLedgerNewEntryResponseEntryTypeIncrement         CustomerCreditLedgerNewEntryResponseEntryType = "increment"
	CustomerCreditLedgerNewEntryResponseEntryTypeDecrement         CustomerCreditLedgerNewEntryResponseEntryType = "decrement"
	CustomerCreditLedgerNewEntryResponseEntryTypeExpirationChange  CustomerCreditLedgerNewEntryResponseEntryType = "expiration_change"
	CustomerCreditLedgerNewEntryResponseEntryTypeCreditBlockExpiry CustomerCreditLedgerNewEntryResponseEntryType = "credit_block_expiry"
	CustomerCreditLedgerNewEntryResponseEntryTypeVoid              CustomerCreditLedgerNewEntryResponseEntryType = "void"
	CustomerCreditLedgerNewEntryResponseEntryTypeVoidInitiated     CustomerCreditLedgerNewEntryResponseEntryType = "void_initiated"
	CustomerCreditLedgerNewEntryResponseEntryTypeAmendment         CustomerCreditLedgerNewEntryResponseEntryType = "amendment"
)

func (CustomerCreditLedgerNewEntryResponseEntryType) IsKnown added in v0.25.0

type CustomerCreditLedgerNewEntryResponseUnion added in v0.25.0

type CustomerCreditLedgerNewEntryResponseUnion interface {
	// contains filtered or unexported methods
}

The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.

Union satisfied by IncrementLedgerEntry, DecrementLedgerEntry, ExpirationChangeLedgerEntry, CreditBlockExpiryLedgerEntry, VoidLedgerEntry, VoidInitiatedLedgerEntry or AmendmentLedgerEntry.

type CustomerCreditLedgerService

type CustomerCreditLedgerService struct {
	Options []option.RequestOption
}

CustomerCreditLedgerService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCustomerCreditLedgerService method instead.

func NewCustomerCreditLedgerService

func NewCustomerCreditLedgerService(opts ...option.RequestOption) (r *CustomerCreditLedgerService)

NewCustomerCreditLedgerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CustomerCreditLedgerService) List

The credits ledger provides _auditing_ functionality over Orb's credits system with a list of actions that have taken place to modify a customer's credit balance. This [paginated endpoint](/api-reference/pagination) lists these entries, starting from the most recent ledger entry.

More details on using Orb's real-time credit feature are [here](/product-catalog/prepurchase).

There are four major types of modifications to credit balance, detailed below.

## Increment

Credits (which optionally expire on a future date) can be added via the API ([Add Ledger Entry](create-ledger-entry)). The ledger entry for such an action will always contain the total eligible starting and ending balance for the customer at the time the entry was added to the ledger.

## Decrement

Deductions can occur as a result of an API call to create a ledger entry (see [Add Ledger Entry](create-ledger-entry)), or automatically as a result of incurring usage. Both ledger entries present the `decrement` entry type.

As usage for a customer is reported into Orb, credits may be deducted according to the customer's plan configuration. An automated deduction of this type will result in a ledger entry, also with a starting and ending balance. In order to provide better tracing capabilities for automatic deductions, Orb always associates each automatic deduction with the `event_id` at the time of ingestion, used to pinpoint _why_ credit deduction took place and to ensure that credits are never deducted without an associated usage event.

By default, Orb uses an algorithm that automatically deducts from the _soonest expiring credit block_ first in order to ensure that all credits are utilized appropriately. As an example, if trial credits with an expiration date of 2 weeks from now are present for a customer, they will be used before any deductions take place from a non-expiring credit block.

If there are multiple blocks with the same expiration date, Orb will deduct from the block with the _lower cost basis_ first (e.g. trial credits with a $0 cost basis before paid credits with a $5.00 cost basis).

It's also possible for a single usage event's deduction to _span_ credit blocks. In this case, Orb will deduct from the next block, ending at the credit block which consists of unexpiring credits. Each of these deductions will lead to a _separate_ ledger entry, one per credit block that is deducted from. By default, the customer's total credit balance in Orb can be negative as a result of a decrement.

## Expiration change

The expiry of credits can be changed as a result of the API (See [Add Ledger Entry](create-ledger-entry)). This will create a ledger entry that specifies the balance as well as the initial and target expiry dates.

Note that for this entry type, `starting_balance` will equal `ending_balance`, and the `amount` represents the balance transferred. The credit block linked to the ledger entry is the source credit block from which there was an expiration change

## Credits expiry

When a set of credits expire on pre-set expiration date, the customer's balance automatically reflects this change and adds an entry to the ledger indicating this event. Note that credit expiry should always happen close to a date boundary in the customer's timezone.

## Void initiated

Credit blocks can be voided via the API. The `amount` on this entry corresponds to the number of credits that were remaining in the block at time of void. `void_reason` will be populated if the void is created with a reason.

## Void

When a set of credits is voided, the customer's balance automatically reflects this change and adds an entry to the ledger indicating this event.

## Amendment

When credits are added to a customer's balance as a result of a correction, this entry will be added to the ledger to indicate the adjustment of credits.

func (*CustomerCreditLedgerService) ListAutoPaging

The credits ledger provides _auditing_ functionality over Orb's credits system with a list of actions that have taken place to modify a customer's credit balance. This [paginated endpoint](/api-reference/pagination) lists these entries, starting from the most recent ledger entry.

More details on using Orb's real-time credit feature are [here](/product-catalog/prepurchase).

There are four major types of modifications to credit balance, detailed below.

## Increment

Credits (which optionally expire on a future date) can be added via the API ([Add Ledger Entry](create-ledger-entry)). The ledger entry for such an action will always contain the total eligible starting and ending balance for the customer at the time the entry was added to the ledger.

## Decrement

Deductions can occur as a result of an API call to create a ledger entry (see [Add Ledger Entry](create-ledger-entry)), or automatically as a result of incurring usage. Both ledger entries present the `decrement` entry type.

As usage for a customer is reported into Orb, credits may be deducted according to the customer's plan configuration. An automated deduction of this type will result in a ledger entry, also with a starting and ending balance. In order to provide better tracing capabilities for automatic deductions, Orb always associates each automatic deduction with the `event_id` at the time of ingestion, used to pinpoint _why_ credit deduction took place and to ensure that credits are never deducted without an associated usage event.

By default, Orb uses an algorithm that automatically deducts from the _soonest expiring credit block_ first in order to ensure that all credits are utilized appropriately. As an example, if trial credits with an expiration date of 2 weeks from now are present for a customer, they will be used before any deductions take place from a non-expiring credit block.

If there are multiple blocks with the same expiration date, Orb will deduct from the block with the _lower cost basis_ first (e.g. trial credits with a $0 cost basis before paid credits with a $5.00 cost basis).

It's also possible for a single usage event's deduction to _span_ credit blocks. In this case, Orb will deduct from the next block, ending at the credit block which consists of unexpiring credits. Each of these deductions will lead to a _separate_ ledger entry, one per credit block that is deducted from. By default, the customer's total credit balance in Orb can be negative as a result of a decrement.

## Expiration change

The expiry of credits can be changed as a result of the API (See [Add Ledger Entry](create-ledger-entry)). This will create a ledger entry that specifies the balance as well as the initial and target expiry dates.

Note that for this entry type, `starting_balance` will equal `ending_balance`, and the `amount` represents the balance transferred. The credit block linked to the ledger entry is the source credit block from which there was an expiration change

## Credits expiry

When a set of credits expire on pre-set expiration date, the customer's balance automatically reflects this change and adds an entry to the ledger indicating this event. Note that credit expiry should always happen close to a date boundary in the customer's timezone.

## Void initiated

Credit blocks can be voided via the API. The `amount` on this entry corresponds to the number of credits that were remaining in the block at time of void. `void_reason` will be populated if the void is created with a reason.

## Void

When a set of credits is voided, the customer's balance automatically reflects this change and adds an entry to the ledger indicating this event.

## Amendment

When credits are added to a customer's balance as a result of a correction, this entry will be added to the ledger to indicate the adjustment of credits.

func (*CustomerCreditLedgerService) ListByExternalID

The credits ledger provides _auditing_ functionality over Orb's credits system with a list of actions that have taken place to modify a customer's credit balance. This [paginated endpoint](/api-reference/pagination) lists these entries, starting from the most recent ledger entry.

More details on using Orb's real-time credit feature are [here](/product-catalog/prepurchase).

There are four major types of modifications to credit balance, detailed below.

## Increment

Credits (which optionally expire on a future date) can be added via the API ([Add Ledger Entry](create-ledger-entry)). The ledger entry for such an action will always contain the total eligible starting and ending balance for the customer at the time the entry was added to the ledger.

## Decrement

Deductions can occur as a result of an API call to create a ledger entry (see [Add Ledger Entry](create-ledger-entry)), or automatically as a result of incurring usage. Both ledger entries present the `decrement` entry type.

As usage for a customer is reported into Orb, credits may be deducted according to the customer's plan configuration. An automated deduction of this type will result in a ledger entry, also with a starting and ending balance. In order to provide better tracing capabilities for automatic deductions, Orb always associates each automatic deduction with the `event_id` at the time of ingestion, used to pinpoint _why_ credit deduction took place and to ensure that credits are never deducted without an associated usage event.

By default, Orb uses an algorithm that automatically deducts from the _soonest expiring credit block_ first in order to ensure that all credits are utilized appropriately. As an example, if trial credits with an expiration date of 2 weeks from now are present for a customer, they will be used before any deductions take place from a non-expiring credit block.

If there are multiple blocks with the same expiration date, Orb will deduct from the block with the _lower cost basis_ first (e.g. trial credits with a $0 cost basis before paid credits with a $5.00 cost basis).

It's also possible for a single usage event's deduction to _span_ credit blocks. In this case, Orb will deduct from the next block, ending at the credit block which consists of unexpiring credits. Each of these deductions will lead to a _separate_ ledger entry, one per credit block that is deducted from. By default, the customer's total credit balance in Orb can be negative as a result of a decrement.

## Expiration change

The expiry of credits can be changed as a result of the API (See [Add Ledger Entry](create-ledger-entry)). This will create a ledger entry that specifies the balance as well as the initial and target expiry dates.

Note that for this entry type, `starting_balance` will equal `ending_balance`, and the `amount` represents the balance transferred. The credit block linked to the ledger entry is the source credit block from which there was an expiration change

## Credits expiry

When a set of credits expire on pre-set expiration date, the customer's balance automatically reflects this change and adds an entry to the ledger indicating this event. Note that credit expiry should always happen close to a date boundary in the customer's timezone.

## Void initiated

Credit blocks can be voided via the API. The `amount` on this entry corresponds to the number of credits that were remaining in the block at time of void. `void_reason` will be populated if the void is created with a reason.

## Void

When a set of credits is voided, the customer's balance automatically reflects this change and adds an entry to the ledger indicating this event.

## Amendment

When credits are added to a customer's balance as a result of a correction, this entry will be added to the ledger to indicate the adjustment of credits.

func (*CustomerCreditLedgerService) ListByExternalIDAutoPaging

The credits ledger provides _auditing_ functionality over Orb's credits system with a list of actions that have taken place to modify a customer's credit balance. This [paginated endpoint](/api-reference/pagination) lists these entries, starting from the most recent ledger entry.

More details on using Orb's real-time credit feature are [here](/product-catalog/prepurchase).

There are four major types of modifications to credit balance, detailed below.

## Increment

Credits (which optionally expire on a future date) can be added via the API ([Add Ledger Entry](create-ledger-entry)). The ledger entry for such an action will always contain the total eligible starting and ending balance for the customer at the time the entry was added to the ledger.

## Decrement

Deductions can occur as a result of an API call to create a ledger entry (see [Add Ledger Entry](create-ledger-entry)), or automatically as a result of incurring usage. Both ledger entries present the `decrement` entry type.

As usage for a customer is reported into Orb, credits may be deducted according to the customer's plan configuration. An automated deduction of this type will result in a ledger entry, also with a starting and ending balance. In order to provide better tracing capabilities for automatic deductions, Orb always associates each automatic deduction with the `event_id` at the time of ingestion, used to pinpoint _why_ credit deduction took place and to ensure that credits are never deducted without an associated usage event.

By default, Orb uses an algorithm that automatically deducts from the _soonest expiring credit block_ first in order to ensure that all credits are utilized appropriately. As an example, if trial credits with an expiration date of 2 weeks from now are present for a customer, they will be used before any deductions take place from a non-expiring credit block.

If there are multiple blocks with the same expiration date, Orb will deduct from the block with the _lower cost basis_ first (e.g. trial credits with a $0 cost basis before paid credits with a $5.00 cost basis).

It's also possible for a single usage event's deduction to _span_ credit blocks. In this case, Orb will deduct from the next block, ending at the credit block which consists of unexpiring credits. Each of these deductions will lead to a _separate_ ledger entry, one per credit block that is deducted from. By default, the customer's total credit balance in Orb can be negative as a result of a decrement.

## Expiration change

The expiry of credits can be changed as a result of the API (See [Add Ledger Entry](create-ledger-entry)). This will create a ledger entry that specifies the balance as well as the initial and target expiry dates.

Note that for this entry type, `starting_balance` will equal `ending_balance`, and the `amount` represents the balance transferred. The credit block linked to the ledger entry is the source credit block from which there was an expiration change

## Credits expiry

When a set of credits expire on pre-set expiration date, the customer's balance automatically reflects this change and adds an entry to the ledger indicating this event. Note that credit expiry should always happen close to a date boundary in the customer's timezone.

## Void initiated

Credit blocks can be voided via the API. The `amount` on this entry corresponds to the number of credits that were remaining in the block at time of void. `void_reason` will be populated if the void is created with a reason.

## Void

When a set of credits is voided, the customer's balance automatically reflects this change and adds an entry to the ledger indicating this event.

## Amendment

When credits are added to a customer's balance as a result of a correction, this entry will be added to the ledger to indicate the adjustment of credits.

func (*CustomerCreditLedgerService) NewEntry

This endpoint allows you to create a new ledger entry for a specified customer's balance. This can be used to increment balance, deduct credits, and change the expiry date of existing credits.

## Effects of adding a ledger entry

  1. After calling this endpoint, [Fetch Credit Balance](fetch-customer-credits) will return a credit block that represents the changes (i.e. balance changes or transfers).
  2. A ledger entry will be added to the credits ledger for this customer, and therefore returned in the [View Credits Ledger](fetch-customer-credits-ledger) response as well as serialized in the response to this request. In the case of deductions without a specified block, multiple ledger entries may be created if the deduction spans credit blocks.
  3. If `invoice_settings` is specified, an invoice will be created that reflects the cost of the credits (based on `amount` and `per_unit_cost_basis`).

## Adding credits

Adding credits is done by creating an entry of type `increment`. This requires the caller to specify a number of credits as well as an optional expiry date in `YYYY-MM-DD` format. Orb also recommends specifying a description to assist with auditing. When adding credits, the caller can also specify a cost basis per-credit, to indicate how much in USD a customer paid for a single credit in a block. This can later be used for revenue recognition.

The following snippet illustrates a sample request body to increment credits which will expire in January of 2022.

```json

{
  "entry_type": "increment",
  "amount": 100,
  "expiry_date": "2022-12-28",
  "per_unit_cost_basis": "0.20",
  "description": "Purchased 100 credits"
}

```

Note that by default, Orb will always first increment any _negative_ balance in existing blocks before adding the remaining amount to the desired credit block.

### Invoicing for credits

By default, Orb manipulates the credit ledger but does not charge for credits. However, if you pass `invoice_settings` in the body of this request, Orb will also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of credit units added.

## Deducting Credits

Orb allows you to deduct credits from a customer by creating an entry of type `decrement`. Orb matches the algorithm for automatic deductions for determining which credit blocks to decrement from. In the case that the deduction leads to multiple ledger entries, the response from this endpoint will be the final deduction. Orb also optionally allows specifying a description to assist with auditing.

The following snippet illustrates a sample request body to decrement credits.

```json

{
  "entry_type": "decrement",
  "amount": 20,
  "description": "Removing excess credits"
}

```

## Changing credits expiry

If you'd like to change when existing credits expire, you should create a ledger entry of type `expiration_change`. For this entry, the required parameter `expiry_date` identifies the _originating_ block, and the required parameter `target_expiry_date` identifies when the transferred credits should now expire. A new credit block will be created with expiry date `target_expiry_date`, with the same cost basis data as the original credit block, if present.

Note that the balance of the block with the given `expiry_date` must be at least equal to the desired transfer amount determined by the `amount` parameter.

The following snippet illustrates a sample request body to extend the expiration date of credits by one year:

```json

{
  "entry_type": "expiration_change",
  "amount": 10,
  "expiry_date": "2022-12-28",
  "block_id": "UiUhFWeLHPrBY4Ad",
  "target_expiry_date": "2023-12-28",
  "description": "Extending credit validity"
}

```

## Voiding credits

If you'd like to void a credit block, create a ledger entry of type `void`. For this entry, `block_id` is required to identify the block, and `amount` indicates how many credits to void, up to the block's initial balance. Pass in a `void_reason` of `refund` if the void is due to a refund.

## Amendment

If you'd like to undo a decrement on a credit block, create a ledger entry of type `amendment`. For this entry, `block_id` is required to identify the block that was originally decremented from, and `amount` indicates how many credits to return to the customer, up to the block's initial balance.

func (*CustomerCreditLedgerService) NewEntryByExternalID added in v0.2.1

This endpoint allows you to create a new ledger entry for a specified customer's balance. This can be used to increment balance, deduct credits, and change the expiry date of existing credits.

## Effects of adding a ledger entry

  1. After calling this endpoint, [Fetch Credit Balance](fetch-customer-credits) will return a credit block that represents the changes (i.e. balance changes or transfers).
  2. A ledger entry will be added to the credits ledger for this customer, and therefore returned in the [View Credits Ledger](fetch-customer-credits-ledger) response as well as serialized in the response to this request. In the case of deductions without a specified block, multiple ledger entries may be created if the deduction spans credit blocks.
  3. If `invoice_settings` is specified, an invoice will be created that reflects the cost of the credits (based on `amount` and `per_unit_cost_basis`).

## Adding credits

Adding credits is done by creating an entry of type `increment`. This requires the caller to specify a number of credits as well as an optional expiry date in `YYYY-MM-DD` format. Orb also recommends specifying a description to assist with auditing. When adding credits, the caller can also specify a cost basis per-credit, to indicate how much in USD a customer paid for a single credit in a block. This can later be used for revenue recognition.

The following snippet illustrates a sample request body to increment credits which will expire in January of 2022.

```json

{
  "entry_type": "increment",
  "amount": 100,
  "expiry_date": "2022-12-28",
  "per_unit_cost_basis": "0.20",
  "description": "Purchased 100 credits"
}

```

Note that by default, Orb will always first increment any _negative_ balance in existing blocks before adding the remaining amount to the desired credit block.

### Invoicing for credits

By default, Orb manipulates the credit ledger but does not charge for credits. However, if you pass `invoice_settings` in the body of this request, Orb will also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of credit units added.

## Deducting Credits

Orb allows you to deduct credits from a customer by creating an entry of type `decrement`. Orb matches the algorithm for automatic deductions for determining which credit blocks to decrement from. In the case that the deduction leads to multiple ledger entries, the response from this endpoint will be the final deduction. Orb also optionally allows specifying a description to assist with auditing.

The following snippet illustrates a sample request body to decrement credits.

```json

{
  "entry_type": "decrement",
  "amount": 20,
  "description": "Removing excess credits"
}

```

## Changing credits expiry

If you'd like to change when existing credits expire, you should create a ledger entry of type `expiration_change`. For this entry, the required parameter `expiry_date` identifies the _originating_ block, and the required parameter `target_expiry_date` identifies when the transferred credits should now expire. A new credit block will be created with expiry date `target_expiry_date`, with the same cost basis data as the original credit block, if present.

Note that the balance of the block with the given `expiry_date` must be at least equal to the desired transfer amount determined by the `amount` parameter.

The following snippet illustrates a sample request body to extend the expiration date of credits by one year:

```json

{
  "entry_type": "expiration_change",
  "amount": 10,
  "expiry_date": "2022-12-28",
  "block_id": "UiUhFWeLHPrBY4Ad",
  "target_expiry_date": "2023-12-28",
  "description": "Extending credit validity"
}

```

## Voiding credits

If you'd like to void a credit block, create a ledger entry of type `void`. For this entry, `block_id` is required to identify the block, and `amount` indicates how many credits to void, up to the block's initial balance. Pass in a `void_reason` of `refund` if the void is due to a refund.

## Amendment

If you'd like to undo a decrement on a credit block, create a ledger entry of type `amendment`. For this entry, `block_id` is required to identify the block that was originally decremented from, and `amount` indicates how many credits to return to the customer, up to the block's initial balance.

type CustomerCreditListByExternalIDParams

type CustomerCreditListByExternalIDParams struct {
	// The ledger currency or custom pricing unit to use.
	Currency param.Field[string] `query:"currency"`
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor param.Field[string] `query:"cursor"`
	// If set to True, all expired and depleted blocks, as well as active block will be
	// returned.
	IncludeAllBlocks param.Field[bool] `query:"include_all_blocks"`
	// The number of items to fetch. Defaults to 20.
	Limit param.Field[int64] `query:"limit"`
}

func (CustomerCreditListByExternalIDParams) URLQuery

URLQuery serializes CustomerCreditListByExternalIDParams's query parameters as `url.Values`.

type CustomerCreditListByExternalIDResponse

type CustomerCreditListByExternalIDResponse struct {
	ID                    string                                       `json:"id,required"`
	Balance               float64                                      `json:"balance,required"`
	EffectiveDate         time.Time                                    `json:"effective_date,required,nullable" format:"date-time"`
	ExpiryDate            time.Time                                    `json:"expiry_date,required,nullable" format:"date-time"`
	MaximumInitialBalance float64                                      `json:"maximum_initial_balance,required,nullable"`
	PerUnitCostBasis      string                                       `json:"per_unit_cost_basis,required,nullable"`
	Status                CustomerCreditListByExternalIDResponseStatus `json:"status,required"`
	JSON                  customerCreditListByExternalIDResponseJSON   `json:"-"`
}

func (*CustomerCreditListByExternalIDResponse) UnmarshalJSON

func (r *CustomerCreditListByExternalIDResponse) UnmarshalJSON(data []byte) (err error)

type CustomerCreditListByExternalIDResponseStatus added in v0.24.0

type CustomerCreditListByExternalIDResponseStatus string
const (
	CustomerCreditListByExternalIDResponseStatusActive         CustomerCreditListByExternalIDResponseStatus = "active"
	CustomerCreditListByExternalIDResponseStatusPendingPayment CustomerCreditListByExternalIDResponseStatus = "pending_payment"
)

func (CustomerCreditListByExternalIDResponseStatus) IsKnown added in v0.24.0

type CustomerCreditListParams

type CustomerCreditListParams struct {
	// The ledger currency or custom pricing unit to use.
	Currency param.Field[string] `query:"currency"`
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor param.Field[string] `query:"cursor"`
	// If set to True, all expired and depleted blocks, as well as active block will be
	// returned.
	IncludeAllBlocks param.Field[bool] `query:"include_all_blocks"`
	// The number of items to fetch. Defaults to 20.
	Limit param.Field[int64] `query:"limit"`
}

func (CustomerCreditListParams) URLQuery

func (r CustomerCreditListParams) URLQuery() (v url.Values)

URLQuery serializes CustomerCreditListParams's query parameters as `url.Values`.

type CustomerCreditListResponse

type CustomerCreditListResponse struct {
	ID                    string                           `json:"id,required"`
	Balance               float64                          `json:"balance,required"`
	EffectiveDate         time.Time                        `json:"effective_date,required,nullable" format:"date-time"`
	ExpiryDate            time.Time                        `json:"expiry_date,required,nullable" format:"date-time"`
	MaximumInitialBalance float64                          `json:"maximum_initial_balance,required,nullable"`
	PerUnitCostBasis      string                           `json:"per_unit_cost_basis,required,nullable"`
	Status                CustomerCreditListResponseStatus `json:"status,required"`
	JSON                  customerCreditListResponseJSON   `json:"-"`
}

func (*CustomerCreditListResponse) UnmarshalJSON

func (r *CustomerCreditListResponse) UnmarshalJSON(data []byte) (err error)

type CustomerCreditListResponseStatus added in v0.24.0

type CustomerCreditListResponseStatus string
const (
	CustomerCreditListResponseStatusActive         CustomerCreditListResponseStatus = "active"
	CustomerCreditListResponseStatusPendingPayment CustomerCreditListResponseStatus = "pending_payment"
)

func (CustomerCreditListResponseStatus) IsKnown added in v0.24.0

type CustomerCreditService

type CustomerCreditService struct {
	Options []option.RequestOption
	Ledger  *CustomerCreditLedgerService
	TopUps  *CustomerCreditTopUpService
}

CustomerCreditService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCustomerCreditService method instead.

func NewCustomerCreditService

func NewCustomerCreditService(opts ...option.RequestOption) (r *CustomerCreditService)

NewCustomerCreditService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CustomerCreditService) List

Returns a paginated list of unexpired, non-zero credit blocks for a customer.

If `include_all_blocks` is set to `true`, all credit blocks (including expired and depleted blocks) will be included in the response.

Note that `currency` defaults to credits if not specified. To use a real world currency, set `currency` to an ISO 4217 string.

func (*CustomerCreditService) ListAutoPaging

Returns a paginated list of unexpired, non-zero credit blocks for a customer.

If `include_all_blocks` is set to `true`, all credit blocks (including expired and depleted blocks) will be included in the response.

Note that `currency` defaults to credits if not specified. To use a real world currency, set `currency` to an ISO 4217 string.

func (*CustomerCreditService) ListByExternalID

Returns a paginated list of unexpired, non-zero credit blocks for a customer.

If `include_all_blocks` is set to `true`, all credit blocks (including expired and depleted blocks) will be included in the response.

Note that `currency` defaults to credits if not specified. To use a real world currency, set `currency` to an ISO 4217 string.

func (*CustomerCreditService) ListByExternalIDAutoPaging

Returns a paginated list of unexpired, non-zero credit blocks for a customer.

If `include_all_blocks` is set to `true`, all credit blocks (including expired and depleted blocks) will be included in the response.

Note that `currency` defaults to credits if not specified. To use a real world currency, set `currency` to an ISO 4217 string.

type CustomerCreditTopUpListByExternalIDParams added in v0.15.0

type CustomerCreditTopUpListByExternalIDParams struct {
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor param.Field[string] `query:"cursor"`
	// The number of items to fetch. Defaults to 20.
	Limit param.Field[int64] `query:"limit"`
}

func (CustomerCreditTopUpListByExternalIDParams) URLQuery added in v0.15.0

URLQuery serializes CustomerCreditTopUpListByExternalIDParams's query parameters as `url.Values`.

type CustomerCreditTopUpListByExternalIDResponse added in v0.15.0

type CustomerCreditTopUpListByExternalIDResponse struct {
	ID string `json:"id,required"`
	// The amount to increment when the threshold is reached.
	Amount string `json:"amount,required"`
	// The currency or custom pricing unit to use for this top-up. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency string `json:"currency,required"`
	// Settings for invoices generated by triggered top-ups.
	InvoiceSettings TopUpInvoiceSettings `json:"invoice_settings,required"`
	// How much, in the customer's currency, to charge for each unit.
	PerUnitCostBasis string `json:"per_unit_cost_basis,required"`
	// The threshold at which to trigger the top-up. If the balance is at or below this
	// threshold, the top-up will be triggered.
	Threshold string `json:"threshold,required"`
	// The number of days or months after which the top-up expires. If unspecified, it
	// does not expire.
	ExpiresAfter int64 `json:"expires_after,nullable"`
	// The unit of expires_after.
	ExpiresAfterUnit CustomerCreditTopUpListByExternalIDResponseExpiresAfterUnit `json:"expires_after_unit,nullable"`
	JSON             customerCreditTopUpListByExternalIDResponseJSON             `json:"-"`
}

func (*CustomerCreditTopUpListByExternalIDResponse) UnmarshalJSON added in v0.15.0

func (r *CustomerCreditTopUpListByExternalIDResponse) UnmarshalJSON(data []byte) (err error)

type CustomerCreditTopUpListByExternalIDResponseExpiresAfterUnit added in v0.15.0

type CustomerCreditTopUpListByExternalIDResponseExpiresAfterUnit string

The unit of expires_after.

const (
	CustomerCreditTopUpListByExternalIDResponseExpiresAfterUnitDay   CustomerCreditTopUpListByExternalIDResponseExpiresAfterUnit = "day"
	CustomerCreditTopUpListByExternalIDResponseExpiresAfterUnitMonth CustomerCreditTopUpListByExternalIDResponseExpiresAfterUnit = "month"
)

func (CustomerCreditTopUpListByExternalIDResponseExpiresAfterUnit) IsKnown added in v0.24.0

type CustomerCreditTopUpListParams added in v0.15.0

type CustomerCreditTopUpListParams struct {
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor param.Field[string] `query:"cursor"`
	// The number of items to fetch. Defaults to 20.
	Limit param.Field[int64] `query:"limit"`
}

func (CustomerCreditTopUpListParams) URLQuery added in v0.15.0

func (r CustomerCreditTopUpListParams) URLQuery() (v url.Values)

URLQuery serializes CustomerCreditTopUpListParams's query parameters as `url.Values`.

type CustomerCreditTopUpListResponse added in v0.15.0

type CustomerCreditTopUpListResponse struct {
	ID string `json:"id,required"`
	// The amount to increment when the threshold is reached.
	Amount string `json:"amount,required"`
	// The currency or custom pricing unit to use for this top-up. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency string `json:"currency,required"`
	// Settings for invoices generated by triggered top-ups.
	InvoiceSettings TopUpInvoiceSettings `json:"invoice_settings,required"`
	// How much, in the customer's currency, to charge for each unit.
	PerUnitCostBasis string `json:"per_unit_cost_basis,required"`
	// The threshold at which to trigger the top-up. If the balance is at or below this
	// threshold, the top-up will be triggered.
	Threshold string `json:"threshold,required"`
	// The number of days or months after which the top-up expires. If unspecified, it
	// does not expire.
	ExpiresAfter int64 `json:"expires_after,nullable"`
	// The unit of expires_after.
	ExpiresAfterUnit CustomerCreditTopUpListResponseExpiresAfterUnit `json:"expires_after_unit,nullable"`
	JSON             customerCreditTopUpListResponseJSON             `json:"-"`
}

func (*CustomerCreditTopUpListResponse) UnmarshalJSON added in v0.15.0

func (r *CustomerCreditTopUpListResponse) UnmarshalJSON(data []byte) (err error)

type CustomerCreditTopUpListResponseExpiresAfterUnit added in v0.15.0

type CustomerCreditTopUpListResponseExpiresAfterUnit string

The unit of expires_after.

const (
	CustomerCreditTopUpListResponseExpiresAfterUnitDay   CustomerCreditTopUpListResponseExpiresAfterUnit = "day"
	CustomerCreditTopUpListResponseExpiresAfterUnitMonth CustomerCreditTopUpListResponseExpiresAfterUnit = "month"
)

func (CustomerCreditTopUpListResponseExpiresAfterUnit) IsKnown added in v0.24.0

type CustomerCreditTopUpNewByExternalIDParams added in v0.15.0

type CustomerCreditTopUpNewByExternalIDParams struct {
	// The amount to increment when the threshold is reached.
	Amount param.Field[string] `json:"amount,required"`
	// The currency or custom pricing unit to use for this top-up. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency param.Field[string] `json:"currency,required"`
	// Settings for invoices generated by triggered top-ups.
	InvoiceSettings param.Field[CustomerCreditTopUpNewByExternalIDParamsInvoiceSettings] `json:"invoice_settings,required"`
	// How much, in the customer's currency, to charge for each unit.
	PerUnitCostBasis param.Field[string] `json:"per_unit_cost_basis,required"`
	// The threshold at which to trigger the top-up. If the balance is at or below this
	// threshold, the top-up will be triggered.
	Threshold param.Field[string] `json:"threshold,required"`
	// The date from which the top-up is active. If unspecified, the top-up is active
	// immediately. This should not be more than 10 days in the past.
	ActiveFrom param.Field[time.Time] `json:"active_from" format:"date-time"`
	// The number of days or months after which the top-up expires. If unspecified, it
	// does not expire.
	ExpiresAfter param.Field[int64] `json:"expires_after"`
	// The unit of expires_after.
	ExpiresAfterUnit param.Field[CustomerCreditTopUpNewByExternalIDParamsExpiresAfterUnit] `json:"expires_after_unit"`
}

func (CustomerCreditTopUpNewByExternalIDParams) MarshalJSON added in v0.15.0

func (r CustomerCreditTopUpNewByExternalIDParams) MarshalJSON() (data []byte, err error)

type CustomerCreditTopUpNewByExternalIDParamsExpiresAfterUnit added in v0.15.0

type CustomerCreditTopUpNewByExternalIDParamsExpiresAfterUnit string

The unit of expires_after.

const (
	CustomerCreditTopUpNewByExternalIDParamsExpiresAfterUnitDay   CustomerCreditTopUpNewByExternalIDParamsExpiresAfterUnit = "day"
	CustomerCreditTopUpNewByExternalIDParamsExpiresAfterUnitMonth CustomerCreditTopUpNewByExternalIDParamsExpiresAfterUnit = "month"
)

func (CustomerCreditTopUpNewByExternalIDParamsExpiresAfterUnit) IsKnown added in v0.24.0

type CustomerCreditTopUpNewByExternalIDParamsInvoiceSettings added in v0.15.0

type CustomerCreditTopUpNewByExternalIDParamsInvoiceSettings struct {
	// Whether the credits purchase invoice should auto collect with the customer's
	// saved payment method.
	AutoCollection param.Field[bool] `json:"auto_collection,required"`
	// The net terms determines the difference between the invoice date and the issue
	// date for the invoice. If you intend the invoice to be due on issue, set this
	// to 0.
	NetTerms param.Field[int64] `json:"net_terms,required"`
	// An optional memo to display on the invoice.
	Memo param.Field[string] `json:"memo"`
	// When true, credit blocks created by this top-up will require that the
	// corresponding invoice is paid before they are drawn down from. If any topup
	// block is pending payment, further automatic top-ups will be paused until the
	// invoice is paid or voided.
	RequireSuccessfulPayment param.Field[bool] `json:"require_successful_payment"`
}

Settings for invoices generated by triggered top-ups.

func (CustomerCreditTopUpNewByExternalIDParamsInvoiceSettings) MarshalJSON added in v0.15.0

type CustomerCreditTopUpNewByExternalIDResponse added in v0.15.0

type CustomerCreditTopUpNewByExternalIDResponse struct {
	ID string `json:"id,required"`
	// The amount to increment when the threshold is reached.
	Amount string `json:"amount,required"`
	// The currency or custom pricing unit to use for this top-up. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency string `json:"currency,required"`
	// Settings for invoices generated by triggered top-ups.
	InvoiceSettings TopUpInvoiceSettings `json:"invoice_settings,required"`
	// How much, in the customer's currency, to charge for each unit.
	PerUnitCostBasis string `json:"per_unit_cost_basis,required"`
	// The threshold at which to trigger the top-up. If the balance is at or below this
	// threshold, the top-up will be triggered.
	Threshold string `json:"threshold,required"`
	// The number of days or months after which the top-up expires. If unspecified, it
	// does not expire.
	ExpiresAfter int64 `json:"expires_after,nullable"`
	// The unit of expires_after.
	ExpiresAfterUnit CustomerCreditTopUpNewByExternalIDResponseExpiresAfterUnit `json:"expires_after_unit,nullable"`
	JSON             customerCreditTopUpNewByExternalIDResponseJSON             `json:"-"`
}

func (*CustomerCreditTopUpNewByExternalIDResponse) UnmarshalJSON added in v0.15.0

func (r *CustomerCreditTopUpNewByExternalIDResponse) UnmarshalJSON(data []byte) (err error)

type CustomerCreditTopUpNewByExternalIDResponseExpiresAfterUnit added in v0.15.0

type CustomerCreditTopUpNewByExternalIDResponseExpiresAfterUnit string

The unit of expires_after.

const (
	CustomerCreditTopUpNewByExternalIDResponseExpiresAfterUnitDay   CustomerCreditTopUpNewByExternalIDResponseExpiresAfterUnit = "day"
	CustomerCreditTopUpNewByExternalIDResponseExpiresAfterUnitMonth CustomerCreditTopUpNewByExternalIDResponseExpiresAfterUnit = "month"
)

func (CustomerCreditTopUpNewByExternalIDResponseExpiresAfterUnit) IsKnown added in v0.24.0

type CustomerCreditTopUpNewParams added in v0.15.0

type CustomerCreditTopUpNewParams struct {
	// The amount to increment when the threshold is reached.
	Amount param.Field[string] `json:"amount,required"`
	// The currency or custom pricing unit to use for this top-up. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency param.Field[string] `json:"currency,required"`
	// Settings for invoices generated by triggered top-ups.
	InvoiceSettings param.Field[CustomerCreditTopUpNewParamsInvoiceSettings] `json:"invoice_settings,required"`
	// How much, in the customer's currency, to charge for each unit.
	PerUnitCostBasis param.Field[string] `json:"per_unit_cost_basis,required"`
	// The threshold at which to trigger the top-up. If the balance is at or below this
	// threshold, the top-up will be triggered.
	Threshold param.Field[string] `json:"threshold,required"`
	// The date from which the top-up is active. If unspecified, the top-up is active
	// immediately. This should not be more than 10 days in the past.
	ActiveFrom param.Field[time.Time] `json:"active_from" format:"date-time"`
	// The number of days or months after which the top-up expires. If unspecified, it
	// does not expire.
	ExpiresAfter param.Field[int64] `json:"expires_after"`
	// The unit of expires_after.
	ExpiresAfterUnit param.Field[CustomerCreditTopUpNewParamsExpiresAfterUnit] `json:"expires_after_unit"`
}

func (CustomerCreditTopUpNewParams) MarshalJSON added in v0.15.0

func (r CustomerCreditTopUpNewParams) MarshalJSON() (data []byte, err error)

type CustomerCreditTopUpNewParamsExpiresAfterUnit added in v0.15.0

type CustomerCreditTopUpNewParamsExpiresAfterUnit string

The unit of expires_after.

const (
	CustomerCreditTopUpNewParamsExpiresAfterUnitDay   CustomerCreditTopUpNewParamsExpiresAfterUnit = "day"
	CustomerCreditTopUpNewParamsExpiresAfterUnitMonth CustomerCreditTopUpNewParamsExpiresAfterUnit = "month"
)

func (CustomerCreditTopUpNewParamsExpiresAfterUnit) IsKnown added in v0.24.0

type CustomerCreditTopUpNewParamsInvoiceSettings added in v0.15.0

type CustomerCreditTopUpNewParamsInvoiceSettings struct {
	// Whether the credits purchase invoice should auto collect with the customer's
	// saved payment method.
	AutoCollection param.Field[bool] `json:"auto_collection,required"`
	// The net terms determines the difference between the invoice date and the issue
	// date for the invoice. If you intend the invoice to be due on issue, set this
	// to 0.
	NetTerms param.Field[int64] `json:"net_terms,required"`
	// An optional memo to display on the invoice.
	Memo param.Field[string] `json:"memo"`
	// When true, credit blocks created by this top-up will require that the
	// corresponding invoice is paid before they are drawn down from. If any topup
	// block is pending payment, further automatic top-ups will be paused until the
	// invoice is paid or voided.
	RequireSuccessfulPayment param.Field[bool] `json:"require_successful_payment"`
}

Settings for invoices generated by triggered top-ups.

func (CustomerCreditTopUpNewParamsInvoiceSettings) MarshalJSON added in v0.15.0

func (r CustomerCreditTopUpNewParamsInvoiceSettings) MarshalJSON() (data []byte, err error)

type CustomerCreditTopUpNewResponse added in v0.15.0

type CustomerCreditTopUpNewResponse struct {
	ID string `json:"id,required"`
	// The amount to increment when the threshold is reached.
	Amount string `json:"amount,required"`
	// The currency or custom pricing unit to use for this top-up. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency string `json:"currency,required"`
	// Settings for invoices generated by triggered top-ups.
	InvoiceSettings TopUpInvoiceSettings `json:"invoice_settings,required"`
	// How much, in the customer's currency, to charge for each unit.
	PerUnitCostBasis string `json:"per_unit_cost_basis,required"`
	// The threshold at which to trigger the top-up. If the balance is at or below this
	// threshold, the top-up will be triggered.
	Threshold string `json:"threshold,required"`
	// The number of days or months after which the top-up expires. If unspecified, it
	// does not expire.
	ExpiresAfter int64 `json:"expires_after,nullable"`
	// The unit of expires_after.
	ExpiresAfterUnit CustomerCreditTopUpNewResponseExpiresAfterUnit `json:"expires_after_unit,nullable"`
	JSON             customerCreditTopUpNewResponseJSON             `json:"-"`
}

func (*CustomerCreditTopUpNewResponse) UnmarshalJSON added in v0.15.0

func (r *CustomerCreditTopUpNewResponse) UnmarshalJSON(data []byte) (err error)

type CustomerCreditTopUpNewResponseExpiresAfterUnit added in v0.15.0

type CustomerCreditTopUpNewResponseExpiresAfterUnit string

The unit of expires_after.

const (
	CustomerCreditTopUpNewResponseExpiresAfterUnitDay   CustomerCreditTopUpNewResponseExpiresAfterUnit = "day"
	CustomerCreditTopUpNewResponseExpiresAfterUnitMonth CustomerCreditTopUpNewResponseExpiresAfterUnit = "month"
)

func (CustomerCreditTopUpNewResponseExpiresAfterUnit) IsKnown added in v0.24.0

type CustomerCreditTopUpService added in v0.15.0

type CustomerCreditTopUpService struct {
	Options []option.RequestOption
}

CustomerCreditTopUpService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCustomerCreditTopUpService method instead.

func NewCustomerCreditTopUpService added in v0.15.0

func NewCustomerCreditTopUpService(opts ...option.RequestOption) (r *CustomerCreditTopUpService)

NewCustomerCreditTopUpService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CustomerCreditTopUpService) Delete added in v0.15.0

func (r *CustomerCreditTopUpService) Delete(ctx context.Context, customerID string, topUpID string, opts ...option.RequestOption) (err error)

This deactivates the top-up and voids any invoices associated with pending credit blocks purchased through the top-up.

func (*CustomerCreditTopUpService) DeleteByExternalID added in v0.15.0

func (r *CustomerCreditTopUpService) DeleteByExternalID(ctx context.Context, externalCustomerID string, topUpID string, opts ...option.RequestOption) (err error)

This deactivates the top-up and voids any invoices associated with pending credit blocks purchased through the top-up.

func (*CustomerCreditTopUpService) List added in v0.15.0

List top-ups

func (*CustomerCreditTopUpService) ListAutoPaging added in v0.15.0

List top-ups

func (*CustomerCreditTopUpService) ListByExternalID added in v0.15.0

List top-ups by external ID

func (*CustomerCreditTopUpService) ListByExternalIDAutoPaging added in v0.15.0

List top-ups by external ID

func (*CustomerCreditTopUpService) New added in v0.15.0

This endpoint allows you to create a new top-up for a specified customer's balance. While this top-up is active, the customer's balance will added in increments of the specified amount whenever the balance reaches the specified threshold.

If a top-up already exists for this customer in the same currency, the existing top-up will be replaced.

func (*CustomerCreditTopUpService) NewByExternalID added in v0.15.0

This endpoint allows you to create a new top-up for a specified customer's balance. While this top-up is active, the customer's balance will added in increments of the specified amount whenever the balance reaches the specified threshold.

If a top-up already exists for this customer in the same currency, the existing top-up will be replaced.

type CustomerHierarchy added in v0.98.0

type CustomerHierarchy struct {
	Children []shared.CustomerMinified `json:"children,required"`
	Parent   shared.CustomerMinified   `json:"parent,required,nullable"`
	JSON     customerHierarchyJSON     `json:"-"`
}

The hierarchical relationships for this customer.

func (*CustomerHierarchy) UnmarshalJSON added in v0.98.0

func (r *CustomerHierarchy) UnmarshalJSON(data []byte) (err error)

type CustomerHierarchyConfigParam added in v0.121.0

type CustomerHierarchyConfigParam struct {
	// A list of child customer IDs to add to the hierarchy. The desired child
	// customers must not already be part of another hierarchy.
	ChildCustomerIDs param.Field[[]string] `json:"child_customer_ids"`
	// The ID of the parent customer in the hierarchy. The desired parent customer must
	// not be a child of another customer.
	ParentCustomerID param.Field[string] `json:"parent_customer_id"`
}

func (CustomerHierarchyConfigParam) MarshalJSON added in v0.121.0

func (r CustomerHierarchyConfigParam) MarshalJSON() (data []byte, err error)

type CustomerListParams

type CustomerListParams struct {
	CreatedAtGt  param.Field[time.Time] `query:"created_at[gt]" format:"date-time"`
	CreatedAtGte param.Field[time.Time] `query:"created_at[gte]" format:"date-time"`
	CreatedAtLt  param.Field[time.Time] `query:"created_at[lt]" format:"date-time"`
	CreatedAtLte param.Field[time.Time] `query:"created_at[lte]" format:"date-time"`
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor param.Field[string] `query:"cursor"`
	// The number of items to fetch. Defaults to 20.
	Limit param.Field[int64] `query:"limit"`
}

func (CustomerListParams) URLQuery

func (r CustomerListParams) URLQuery() (v url.Values)

URLQuery serializes CustomerListParams's query parameters as `url.Values`.

type CustomerMinified added in v0.121.0

type CustomerMinified = shared.CustomerMinified

This is an alias to an internal type.

type CustomerNewParams

type CustomerNewParams struct {
	// A valid customer email, to be used for notifications. When Orb triggers payment
	// through a payment gateway, this email will be used for any automatically issued
	// receipts.
	Email param.Field[string] `json:"email,required" format:"email"`
	// The full name of the customer
	Name                        param.Field[string]                              `json:"name,required"`
	AccountingSyncConfiguration param.Field[NewAccountingSyncConfigurationParam] `json:"accounting_sync_configuration"`
	// Additional email addresses for this customer. If populated, these email
	// addresses will be CC'd for customer communications.
	AdditionalEmails param.Field[[]string] `json:"additional_emails" format:"email"`
	// Used to determine if invoices for this customer will automatically attempt to
	// charge a saved payment method, if available. This parameter defaults to `True`
	// when a payment provider is provided on customer creation.
	AutoCollection param.Field[bool]              `json:"auto_collection"`
	BillingAddress param.Field[AddressInputParam] `json:"billing_address"`
	// An ISO 4217 currency string used for the customer's invoices and balance. If not
	// set at creation time, will be set at subscription creation time.
	Currency      param.Field[string] `json:"currency"`
	EmailDelivery param.Field[bool]   `json:"email_delivery"`
	// An optional user-defined ID for this customer resource, used throughout the
	// system as an alias for this Customer. Use this field to identify a customer by
	// an existing identifier in your system.
	ExternalCustomerID param.Field[string] `json:"external_customer_id"`
	// The hierarchical relationships for this customer.
	Hierarchy param.Field[CustomerHierarchyConfigParam] `json:"hierarchy"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// This is used for creating charges or invoices in an external system via Orb.
	// When not in test mode, the connection must first be configured in the Orb
	// webapp.
	PaymentProvider param.Field[CustomerNewParamsPaymentProvider] `json:"payment_provider"`
	// The ID of this customer in an external payments solution, such as Stripe. This
	// is used for creating charges or invoices in the external system via Orb.
	PaymentProviderID      param.Field[string]                                 `json:"payment_provider_id"`
	ReportingConfiguration param.Field[NewReportingConfigurationParam]         `json:"reporting_configuration"`
	ShippingAddress        param.Field[AddressInputParam]                      `json:"shipping_address"`
	TaxConfiguration       param.Field[CustomerNewParamsTaxConfigurationUnion] `json:"tax_configuration"`
	// Tax IDs are commonly required to be displayed on customer invoices, which are
	// added to the headers of invoices.
	//
	// ### Supported Tax ID Countries and Types
	//
	// | Country              | Type         | Description                                                                                             |
	// | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
	// | Andorra              | `ad_nrt`     | Andorran NRT Number                                                                                     |
	// | Argentina            | `ar_cuit`    | Argentinian Tax ID Number                                                                               |
	// | Australia            | `au_abn`     | Australian Business Number (AU ABN)                                                                     |
	// | Australia            | `au_arn`     | Australian Taxation Office Reference Number                                                             |
	// | Austria              | `eu_vat`     | European VAT Number                                                                                     |
	// | Bahrain              | `bh_vat`     | Bahraini VAT Number                                                                                     |
	// | Belgium              | `eu_vat`     | European VAT Number                                                                                     |
	// | Bolivia              | `bo_tin`     | Bolivian Tax ID                                                                                         |
	// | Brazil               | `br_cnpj`    | Brazilian CNPJ Number                                                                                   |
	// | Brazil               | `br_cpf`     | Brazilian CPF Number                                                                                    |
	// | Bulgaria             | `bg_uic`     | Bulgaria Unified Identification Code                                                                    |
	// | Bulgaria             | `eu_vat`     | European VAT Number                                                                                     |
	// | Canada               | `ca_bn`      | Canadian BN                                                                                             |
	// | Canada               | `ca_gst_hst` | Canadian GST/HST Number                                                                                 |
	// | Canada               | `ca_pst_bc`  | Canadian PST Number (British Columbia)                                                                  |
	// | Canada               | `ca_pst_mb`  | Canadian PST Number (Manitoba)                                                                          |
	// | Canada               | `ca_pst_sk`  | Canadian PST Number (Saskatchewan)                                                                      |
	// | Canada               | `ca_qst`     | Canadian QST Number (Québec)                                                                            |
	// | Chile                | `cl_tin`     | Chilean TIN                                                                                             |
	// | China                | `cn_tin`     | Chinese Tax ID                                                                                          |
	// | Colombia             | `co_nit`     | Colombian NIT Number                                                                                    |
	// | Costa Rica           | `cr_tin`     | Costa Rican Tax ID                                                                                      |
	// | Croatia              | `eu_vat`     | European VAT Number                                                                                     |
	// | Cyprus               | `eu_vat`     | European VAT Number                                                                                     |
	// | Czech Republic       | `eu_vat`     | European VAT Number                                                                                     |
	// | Denmark              | `eu_vat`     | European VAT Number                                                                                     |
	// | Dominican Republic   | `do_rcn`     | Dominican RCN Number                                                                                    |
	// | Ecuador              | `ec_ruc`     | Ecuadorian RUC Number                                                                                   |
	// | Egypt                | `eg_tin`     | Egyptian Tax Identification Number                                                                      |
	// | El Salvador          | `sv_nit`     | El Salvadorian NIT Number                                                                               |
	// | Estonia              | `eu_vat`     | European VAT Number                                                                                     |
	// | EU                   | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme                                                  |
	// | Finland              | `eu_vat`     | European VAT Number                                                                                     |
	// | France               | `eu_vat`     | European VAT Number                                                                                     |
	// | Georgia              | `ge_vat`     | Georgian VAT                                                                                            |
	// | Germany              | `eu_vat`     | European VAT Number                                                                                     |
	// | Greece               | `eu_vat`     | European VAT Number                                                                                     |
	// | Hong Kong            | `hk_br`      | Hong Kong BR Number                                                                                     |
	// | Hungary              | `eu_vat`     | European VAT Number                                                                                     |
	// | Hungary              | `hu_tin`     | Hungary Tax Number (adószám)                                                                            |
	// | Iceland              | `is_vat`     | Icelandic VAT                                                                                           |
	// | India                | `in_gst`     | Indian GST Number                                                                                       |
	// | Indonesia            | `id_npwp`    | Indonesian NPWP Number                                                                                  |
	// | Ireland              | `eu_vat`     | European VAT Number                                                                                     |
	// | Israel               | `il_vat`     | Israel VAT                                                                                              |
	// | Italy                | `eu_vat`     | European VAT Number                                                                                     |
	// | Japan                | `jp_cn`      | Japanese Corporate Number (_Hōjin Bangō_)                                                               |
	// | Japan                | `jp_rn`      | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
	// | Japan                | `jp_trn`     | Japanese Tax Registration Number (_Tōroku Bangō_)                                                       |
	// | Kazakhstan           | `kz_bin`     | Kazakhstani Business Identification Number                                                              |
	// | Kenya                | `ke_pin`     | Kenya Revenue Authority Personal Identification Number                                                  |
	// | Latvia               | `eu_vat`     | European VAT Number                                                                                     |
	// | Liechtenstein        | `li_uid`     | Liechtensteinian UID Number                                                                             |
	// | Lithuania            | `eu_vat`     | European VAT Number                                                                                     |
	// | Luxembourg           | `eu_vat`     | European VAT Number                                                                                     |
	// | Malaysia             | `my_frp`     | Malaysian FRP Number                                                                                    |
	// | Malaysia             | `my_itn`     | Malaysian ITN                                                                                           |
	// | Malaysia             | `my_sst`     | Malaysian SST Number                                                                                    |
	// | Malta                | `eu_vat `    | European VAT Number                                                                                     |
	// | Mexico               | `mx_rfc`     | Mexican RFC Number                                                                                      |
	// | Netherlands          | `eu_vat`     | European VAT Number                                                                                     |
	// | New Zealand          | `nz_gst`     | New Zealand GST Number                                                                                  |
	// | Nigeria              | `ng_tin`     | Nigerian Tax Identification Number                                                                      |
	// | Norway               | `no_vat`     | Norwegian VAT Number                                                                                    |
	// | Norway               | `no_voec`    | Norwegian VAT on e-commerce Number                                                                      |
	// | Oman                 | `om_vat`     | Omani VAT Number                                                                                        |
	// | Peru                 | `pe_ruc`     | Peruvian RUC Number                                                                                     |
	// | Philippines          | `ph_tin `    | Philippines Tax Identification Number                                                                   |
	// | Poland               | `eu_vat`     | European VAT Number                                                                                     |
	// | Portugal             | `eu_vat`     | European VAT Number                                                                                     |
	// | Romania              | `eu_vat`     | European VAT Number                                                                                     |
	// | Romania              | `ro_tin`     | Romanian Tax ID Number                                                                                  |
	// | Russia               | `ru_inn`     | Russian INN                                                                                             |
	// | Russia               | `ru_kpp`     | Russian KPP                                                                                             |
	// | Saudi Arabia         | `sa_vat`     | Saudi Arabia VAT                                                                                        |
	// | Serbia               | `rs_pib`     | Serbian PIB Number                                                                                      |
	// | Singapore            | `sg_gst`     | Singaporean GST                                                                                         |
	// | Singapore            | `sg_uen`     | Singaporean UEN                                                                                         |
	// | Slovakia             | `eu_vat`     | European VAT Number                                                                                     |
	// | Slovenia             | `eu_vat`     | European VAT Number                                                                                     |
	// | Slovenia             | `si_tin`     | Slovenia Tax Number (davčna številka)                                                                   |
	// | South Africa         | `za_vat`     | South African VAT Number                                                                                |
	// | South Korea          | `kr_brn`     | Korean BRN                                                                                              |
	// | Spain                | `es_cif`     | Spanish NIF Number (previously Spanish CIF Number)                                                      |
	// | Spain                | `eu_vat`     | European VAT Number                                                                                     |
	// | Sweden               | `eu_vat`     | European VAT Number                                                                                     |
	// | Switzerland          | `ch_vat`     | Switzerland VAT Number                                                                                  |
	// | Taiwan               | `tw_vat`     | Taiwanese VAT                                                                                           |
	// | Thailand             | `th_vat`     | Thai VAT                                                                                                |
	// | Turkey               | `tr_tin`     | Turkish Tax Identification Number                                                                       |
	// | Ukraine              | `ua_vat`     | Ukrainian VAT                                                                                           |
	// | United Arab Emirates | `ae_trn`     | United Arab Emirates TRN                                                                                |
	// | United Kingdom       | `eu_vat`     | Northern Ireland VAT Number                                                                             |
	// | United Kingdom       | `gb_vat`     | United Kingdom VAT Number                                                                               |
	// | United States        | `us_ein`     | United States EIN                                                                                       |
	// | Uruguay              | `uy_ruc`     | Uruguayan RUC Number                                                                                    |
	// | Venezuela            | `ve_rif`     | Venezuelan RIF Number                                                                                   |
	// | Vietnam              | `vn_tin`     | Vietnamese Tax ID Number                                                                                |
	TaxID param.Field[shared.CustomerTaxIDParam] `json:"tax_id"`
	// A timezone identifier from the IANA timezone database, such as
	// `"America/Los_Angeles"`. This defaults to your account's timezone if not set.
	// This cannot be changed after customer creation.
	Timezone param.Field[string] `json:"timezone"`
}

func (CustomerNewParams) MarshalJSON

func (r CustomerNewParams) MarshalJSON() (data []byte, err error)

type CustomerNewParamsPaymentProvider

type CustomerNewParamsPaymentProvider string

This is used for creating charges or invoices in an external system via Orb. When not in test mode, the connection must first be configured in the Orb webapp.

const (
	CustomerNewParamsPaymentProviderQuickbooks    CustomerNewParamsPaymentProvider = "quickbooks"
	CustomerNewParamsPaymentProviderBillCom       CustomerNewParamsPaymentProvider = "bill.com"
	CustomerNewParamsPaymentProviderStripeCharge  CustomerNewParamsPaymentProvider = "stripe_charge"
	CustomerNewParamsPaymentProviderStripeInvoice CustomerNewParamsPaymentProvider = "stripe_invoice"
	CustomerNewParamsPaymentProviderNetsuite      CustomerNewParamsPaymentProvider = "netsuite"
)

func (CustomerNewParamsPaymentProvider) IsKnown added in v0.24.0

type CustomerNewParamsTaxConfiguration added in v0.66.0

type CustomerNewParamsTaxConfiguration struct {
	TaxExempt        param.Field[bool]                                         `json:"tax_exempt,required"`
	TaxProvider      param.Field[CustomerNewParamsTaxConfigurationTaxProvider] `json:"tax_provider,required"`
	TaxExemptionCode param.Field[string]                                       `json:"tax_exemption_code"`
}

func (CustomerNewParamsTaxConfiguration) MarshalJSON added in v0.66.0

func (r CustomerNewParamsTaxConfiguration) MarshalJSON() (data []byte, err error)

type CustomerNewParamsTaxConfigurationTaxProvider added in v0.66.0

type CustomerNewParamsTaxConfigurationTaxProvider string
const (
	CustomerNewParamsTaxConfigurationTaxProviderAvalara CustomerNewParamsTaxConfigurationTaxProvider = "avalara"
	CustomerNewParamsTaxConfigurationTaxProviderTaxjar  CustomerNewParamsTaxConfigurationTaxProvider = "taxjar"
	CustomerNewParamsTaxConfigurationTaxProviderSphere  CustomerNewParamsTaxConfigurationTaxProvider = "sphere"
)

func (CustomerNewParamsTaxConfigurationTaxProvider) IsKnown added in v0.66.0

type CustomerNewParamsTaxConfigurationUnion added in v0.66.0

type CustomerNewParamsTaxConfigurationUnion interface {
	// contains filtered or unexported methods
}

Satisfied by NewAvalaraTaxConfigurationParam, NewTaxJarConfigurationParam, NewSphereConfigurationParam, CustomerNewParamsTaxConfiguration.

type CustomerPaymentProvider

type CustomerPaymentProvider string

This is used for creating charges or invoices in an external system via Orb. When not in test mode, the connection must first be configured in the Orb webapp.

const (
	CustomerPaymentProviderQuickbooks    CustomerPaymentProvider = "quickbooks"
	CustomerPaymentProviderBillCom       CustomerPaymentProvider = "bill.com"
	CustomerPaymentProviderStripeCharge  CustomerPaymentProvider = "stripe_charge"
	CustomerPaymentProviderStripeInvoice CustomerPaymentProvider = "stripe_invoice"
	CustomerPaymentProviderNetsuite      CustomerPaymentProvider = "netsuite"
)

func (CustomerPaymentProvider) IsKnown added in v0.24.0

func (r CustomerPaymentProvider) IsKnown() bool

type CustomerReportingConfiguration

type CustomerReportingConfiguration struct {
	Exempt bool                               `json:"exempt,required"`
	JSON   customerReportingConfigurationJSON `json:"-"`
}

func (*CustomerReportingConfiguration) UnmarshalJSON

func (r *CustomerReportingConfiguration) UnmarshalJSON(data []byte) (err error)

type CustomerService

type CustomerService struct {
	Options             []option.RequestOption
	Costs               *CustomerCostService
	Credits             *CustomerCreditService
	BalanceTransactions *CustomerBalanceTransactionService
}

CustomerService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCustomerService method instead.

func NewCustomerService

func NewCustomerService(opts ...option.RequestOption) (r *CustomerService)

NewCustomerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CustomerService) Delete

func (r *CustomerService) Delete(ctx context.Context, customerID string, opts ...option.RequestOption) (err error)

This performs a deletion of this customer, its subscriptions, and its invoices, provided the customer does not have any issued invoices. Customers with issued invoices cannot be deleted. This operation is irreversible. Note that this is a _soft_ deletion, but the data will be inaccessible through the API and Orb dashboard.

For a hard-deletion, please reach out to the Orb team directly.

**Note**: This operation happens asynchronously and can be expected to take a few minutes to propagate to related resources. However, querying for the customer on subsequent GET requests while deletion is in process will reflect its deletion.

func (*CustomerService) Fetch

func (r *CustomerService) Fetch(ctx context.Context, customerID string, opts ...option.RequestOption) (res *Customer, err error)

This endpoint is used to fetch customer details given an identifier. If the `Customer` is in the process of being deleted, only the properties `id` and `deleted: true` will be returned.

See the [Customer resource](/core-concepts#customer) for a full discussion of the Customer model.

func (*CustomerService) FetchByExternalID

func (r *CustomerService) FetchByExternalID(ctx context.Context, externalCustomerID string, opts ...option.RequestOption) (res *Customer, err error)

This endpoint is used to fetch customer details given an `external_customer_id` (see [Customer ID Aliases](/events-and-metrics/customer-aliases)).

Note that the resource and semantics of this endpoint exactly mirror [Get Customer](fetch-customer).

func (*CustomerService) List

This endpoint returns a list of all customers for an account. The list of customers is ordered starting from the most recently created customer. This endpoint follows Orb's [standardized pagination format](/api-reference/pagination).

See Customer(/core-concepts##customer) for an overview of the customer model.

func (*CustomerService) ListAutoPaging

This endpoint returns a list of all customers for an account. The list of customers is ordered starting from the most recently created customer. This endpoint follows Orb's [standardized pagination format](/api-reference/pagination).

See Customer(/core-concepts##customer) for an overview of the customer model.

func (*CustomerService) New

func (r *CustomerService) New(ctx context.Context, body CustomerNewParams, opts ...option.RequestOption) (res *Customer, err error)

This operation is used to create an Orb customer, who is party to the core billing relationship. See Customer(/core-concepts##customer) for an overview of the customer resource.

This endpoint is critical in the following Orb functionality:

  • Automated charges can be configured by setting `payment_provider` and `payment_provider_id` to automatically issue invoices
  • [Customer ID Aliases](/events-and-metrics/customer-aliases) can be configured by setting `external_customer_id`
  • [Timezone localization](/essentials/timezones) can be configured on a per-customer basis by setting the `timezone` parameter

func (*CustomerService) SyncPaymentMethodsFromGateway added in v0.89.0

func (r *CustomerService) SyncPaymentMethodsFromGateway(ctx context.Context, customerID string, opts ...option.RequestOption) (err error)

Sync Orb's payment methods for the customer with their gateway.

This method can be called before taking an action that may cause the customer to be charged, ensuring that the most up-to-date payment method is charged.

**Note**: This functionality is currently only available for Stripe.

func (*CustomerService) SyncPaymentMethodsFromGatewayByExternalCustomerID added in v0.89.0

func (r *CustomerService) SyncPaymentMethodsFromGatewayByExternalCustomerID(ctx context.Context, externalCustomerID string, opts ...option.RequestOption) (err error)

Sync Orb's payment methods for the customer with their gateway.

This method can be called before taking an action that may cause the customer to be charged, ensuring that the most up-to-date payment method is charged.

**Note**: This functionality is currently only available for Stripe.

func (*CustomerService) Update

func (r *CustomerService) Update(ctx context.Context, customerID string, body CustomerUpdateParams, opts ...option.RequestOption) (res *Customer, err error)

This endpoint can be used to update the `payment_provider`, `payment_provider_id`, `name`, `email`, `email_delivery`, `tax_id`, `auto_collection`, `metadata`, `shipping_address`, `billing_address`, and `additional_emails` of an existing customer. Other fields on a customer are currently immutable.

func (*CustomerService) UpdateByExternalID

func (r *CustomerService) UpdateByExternalID(ctx context.Context, id string, body CustomerUpdateByExternalIDParams, opts ...option.RequestOption) (res *Customer, err error)

This endpoint is used to update customer details given an `external_customer_id` (see [Customer ID Aliases](/events-and-metrics/customer-aliases)). Note that the resource and semantics of this endpoint exactly mirror [Update Customer](update-customer).

type CustomerTaxID

type CustomerTaxID = shared.CustomerTaxID

Tax IDs are commonly required to be displayed on customer invoices, which are added to the headers of invoices.

### Supported Tax ID Countries and Types

| Country | Type | Description | | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | | Andorra | `ad_nrt` | Andorran NRT Number | | Argentina | `ar_cuit` | Argentinian Tax ID Number | | Australia | `au_abn` | Australian Business Number (AU ABN) | | Australia | `au_arn` | Australian Taxation Office Reference Number | | Austria | `eu_vat` | European VAT Number | | Bahrain | `bh_vat` | Bahraini VAT Number | | Belgium | `eu_vat` | European VAT Number | | Bolivia | `bo_tin` | Bolivian Tax ID | | Brazil | `br_cnpj` | Brazilian CNPJ Number | | Brazil | `br_cpf` | Brazilian CPF Number | | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | | Bulgaria | `eu_vat` | European VAT Number | | Canada | `ca_bn` | Canadian BN | | Canada | `ca_gst_hst` | Canadian GST/HST Number | | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | | Canada | `ca_qst` | Canadian QST Number (Québec) | | Chile | `cl_tin` | Chilean TIN | | China | `cn_tin` | Chinese Tax ID | | Colombia | `co_nit` | Colombian NIT Number | | Costa Rica | `cr_tin` | Costa Rican Tax ID | | Croatia | `eu_vat` | European VAT Number | | Cyprus | `eu_vat` | European VAT Number | | Czech Republic | `eu_vat` | European VAT Number | | Denmark | `eu_vat` | European VAT Number | | Dominican Republic | `do_rcn` | Dominican RCN Number | | Ecuador | `ec_ruc` | Ecuadorian RUC Number | | Egypt | `eg_tin` | Egyptian Tax Identification Number | | El Salvador | `sv_nit` | El Salvadorian NIT Number | | Estonia | `eu_vat` | European VAT Number | | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | | Finland | `eu_vat` | European VAT Number | | France | `eu_vat` | European VAT Number | | Georgia | `ge_vat` | Georgian VAT | | Germany | `eu_vat` | European VAT Number | | Greece | `eu_vat` | European VAT Number | | Hong Kong | `hk_br` | Hong Kong BR Number | | Hungary | `eu_vat` | European VAT Number | | Hungary | `hu_tin` | Hungary Tax Number (adószám) | | Iceland | `is_vat` | Icelandic VAT | | India | `in_gst` | Indian GST Number | | Indonesia | `id_npwp` | Indonesian NPWP Number | | Ireland | `eu_vat` | European VAT Number | | Israel | `il_vat` | Israel VAT | | Italy | `eu_vat` | European VAT Number | | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | | Latvia | `eu_vat` | European VAT Number | | Liechtenstein | `li_uid` | Liechtensteinian UID Number | | Lithuania | `eu_vat` | European VAT Number | | Luxembourg | `eu_vat` | European VAT Number | | Malaysia | `my_frp` | Malaysian FRP Number | | Malaysia | `my_itn` | Malaysian ITN | | Malaysia | `my_sst` | Malaysian SST Number | | Malta | `eu_vat ` | European VAT Number | | Mexico | `mx_rfc` | Mexican RFC Number | | Netherlands | `eu_vat` | European VAT Number | | New Zealand | `nz_gst` | New Zealand GST Number | | Nigeria | `ng_tin` | Nigerian Tax Identification Number | | Norway | `no_vat` | Norwegian VAT Number | | Norway | `no_voec` | Norwegian VAT on e-commerce Number | | Oman | `om_vat` | Omani VAT Number | | Peru | `pe_ruc` | Peruvian RUC Number | | Philippines | `ph_tin ` | Philippines Tax Identification Number | | Poland | `eu_vat` | European VAT Number | | Portugal | `eu_vat` | European VAT Number | | Romania | `eu_vat` | European VAT Number | | Romania | `ro_tin` | Romanian Tax ID Number | | Russia | `ru_inn` | Russian INN | | Russia | `ru_kpp` | Russian KPP | | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | | Serbia | `rs_pib` | Serbian PIB Number | | Singapore | `sg_gst` | Singaporean GST | | Singapore | `sg_uen` | Singaporean UEN | | Slovakia | `eu_vat` | European VAT Number | | Slovenia | `eu_vat` | European VAT Number | | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | | South Africa | `za_vat` | South African VAT Number | | South Korea | `kr_brn` | Korean BRN | | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | | Spain | `eu_vat` | European VAT Number | | Sweden | `eu_vat` | European VAT Number | | Switzerland | `ch_vat` | Switzerland VAT Number | | Taiwan | `tw_vat` | Taiwanese VAT | | Thailand | `th_vat` | Thai VAT | | Turkey | `tr_tin` | Turkish Tax Identification Number | | Ukraine | `ua_vat` | Ukrainian VAT | | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | | United Kingdom | `eu_vat` | Northern Ireland VAT Number | | United Kingdom | `gb_vat` | United Kingdom VAT Number | | United States | `us_ein` | United States EIN | | Uruguay | `uy_ruc` | Uruguayan RUC Number | | Venezuela | `ve_rif` | Venezuelan RIF Number | | Vietnam | `vn_tin` | Vietnamese Tax ID Number |

This is an alias to an internal type.

type CustomerTaxIDCountry added in v0.2.0

type CustomerTaxIDCountry = shared.CustomerTaxIDCountry

This is an alias to an internal type.

type CustomerTaxIDParam added in v0.121.0

type CustomerTaxIDParam = shared.CustomerTaxIDParam

Tax IDs are commonly required to be displayed on customer invoices, which are added to the headers of invoices.

### Supported Tax ID Countries and Types

| Country | Type | Description | | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | | Andorra | `ad_nrt` | Andorran NRT Number | | Argentina | `ar_cuit` | Argentinian Tax ID Number | | Australia | `au_abn` | Australian Business Number (AU ABN) | | Australia | `au_arn` | Australian Taxation Office Reference Number | | Austria | `eu_vat` | European VAT Number | | Bahrain | `bh_vat` | Bahraini VAT Number | | Belgium | `eu_vat` | European VAT Number | | Bolivia | `bo_tin` | Bolivian Tax ID | | Brazil | `br_cnpj` | Brazilian CNPJ Number | | Brazil | `br_cpf` | Brazilian CPF Number | | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | | Bulgaria | `eu_vat` | European VAT Number | | Canada | `ca_bn` | Canadian BN | | Canada | `ca_gst_hst` | Canadian GST/HST Number | | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | | Canada | `ca_qst` | Canadian QST Number (Québec) | | Chile | `cl_tin` | Chilean TIN | | China | `cn_tin` | Chinese Tax ID | | Colombia | `co_nit` | Colombian NIT Number | | Costa Rica | `cr_tin` | Costa Rican Tax ID | | Croatia | `eu_vat` | European VAT Number | | Cyprus | `eu_vat` | European VAT Number | | Czech Republic | `eu_vat` | European VAT Number | | Denmark | `eu_vat` | European VAT Number | | Dominican Republic | `do_rcn` | Dominican RCN Number | | Ecuador | `ec_ruc` | Ecuadorian RUC Number | | Egypt | `eg_tin` | Egyptian Tax Identification Number | | El Salvador | `sv_nit` | El Salvadorian NIT Number | | Estonia | `eu_vat` | European VAT Number | | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | | Finland | `eu_vat` | European VAT Number | | France | `eu_vat` | European VAT Number | | Georgia | `ge_vat` | Georgian VAT | | Germany | `eu_vat` | European VAT Number | | Greece | `eu_vat` | European VAT Number | | Hong Kong | `hk_br` | Hong Kong BR Number | | Hungary | `eu_vat` | European VAT Number | | Hungary | `hu_tin` | Hungary Tax Number (adószám) | | Iceland | `is_vat` | Icelandic VAT | | India | `in_gst` | Indian GST Number | | Indonesia | `id_npwp` | Indonesian NPWP Number | | Ireland | `eu_vat` | European VAT Number | | Israel | `il_vat` | Israel VAT | | Italy | `eu_vat` | European VAT Number | | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | | Latvia | `eu_vat` | European VAT Number | | Liechtenstein | `li_uid` | Liechtensteinian UID Number | | Lithuania | `eu_vat` | European VAT Number | | Luxembourg | `eu_vat` | European VAT Number | | Malaysia | `my_frp` | Malaysian FRP Number | | Malaysia | `my_itn` | Malaysian ITN | | Malaysia | `my_sst` | Malaysian SST Number | | Malta | `eu_vat ` | European VAT Number | | Mexico | `mx_rfc` | Mexican RFC Number | | Netherlands | `eu_vat` | European VAT Number | | New Zealand | `nz_gst` | New Zealand GST Number | | Nigeria | `ng_tin` | Nigerian Tax Identification Number | | Norway | `no_vat` | Norwegian VAT Number | | Norway | `no_voec` | Norwegian VAT on e-commerce Number | | Oman | `om_vat` | Omani VAT Number | | Peru | `pe_ruc` | Peruvian RUC Number | | Philippines | `ph_tin ` | Philippines Tax Identification Number | | Poland | `eu_vat` | European VAT Number | | Portugal | `eu_vat` | European VAT Number | | Romania | `eu_vat` | European VAT Number | | Romania | `ro_tin` | Romanian Tax ID Number | | Russia | `ru_inn` | Russian INN | | Russia | `ru_kpp` | Russian KPP | | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | | Serbia | `rs_pib` | Serbian PIB Number | | Singapore | `sg_gst` | Singaporean GST | | Singapore | `sg_uen` | Singaporean UEN | | Slovakia | `eu_vat` | European VAT Number | | Slovenia | `eu_vat` | European VAT Number | | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | | South Africa | `za_vat` | South African VAT Number | | South Korea | `kr_brn` | Korean BRN | | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | | Spain | `eu_vat` | European VAT Number | | Sweden | `eu_vat` | European VAT Number | | Switzerland | `ch_vat` | Switzerland VAT Number | | Taiwan | `tw_vat` | Taiwanese VAT | | Thailand | `th_vat` | Thai VAT | | Turkey | `tr_tin` | Turkish Tax Identification Number | | Ukraine | `ua_vat` | Ukrainian VAT | | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | | United Kingdom | `eu_vat` | Northern Ireland VAT Number | | United Kingdom | `gb_vat` | United Kingdom VAT Number | | United States | `us_ein` | United States EIN | | Uruguay | `uy_ruc` | Uruguayan RUC Number | | Venezuela | `ve_rif` | Venezuelan RIF Number | | Vietnam | `vn_tin` | Vietnamese Tax ID Number |

This is an alias to an internal type.

type CustomerTaxIDType added in v0.2.0

type CustomerTaxIDType = shared.CustomerTaxIDType

This is an alias to an internal type.

type CustomerUpdateByExternalIDParams

type CustomerUpdateByExternalIDParams struct {
	AccountingSyncConfiguration param.Field[NewAccountingSyncConfigurationParam] `json:"accounting_sync_configuration"`
	// Additional email addresses for this customer. If populated, these email
	// addresses will be CC'd for customer communications.
	AdditionalEmails param.Field[[]string] `json:"additional_emails"`
	// Used to determine if invoices for this customer will automatically attempt to
	// charge a saved payment method, if available. This parameter defaults to `True`
	// when a payment provider is provided on customer creation.
	AutoCollection param.Field[bool]              `json:"auto_collection"`
	BillingAddress param.Field[AddressInputParam] `json:"billing_address"`
	// An ISO 4217 currency string used for the customer's invoices and balance. If not
	// set at creation time, will be set at subscription creation time.
	Currency param.Field[string] `json:"currency"`
	// A valid customer email, to be used for invoicing and notifications.
	Email         param.Field[string] `json:"email" format:"email"`
	EmailDelivery param.Field[bool]   `json:"email_delivery"`
	// The external customer ID. This can only be set if empty and the customer has no
	// past or current subscriptions.
	ExternalCustomerID param.Field[string] `json:"external_customer_id"`
	// The hierarchical relationships for this customer.
	Hierarchy param.Field[CustomerHierarchyConfigParam] `json:"hierarchy"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// The full name of the customer
	Name param.Field[string] `json:"name"`
	// This is used for creating charges or invoices in an external system via Orb.
	// When not in test mode:
	//
	//   - the connection must first be configured in the Orb webapp.
	//   - if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`,
	//     `bill.com`, `netsuite`), any product mappings must first be configured with
	//     the Orb team.
	PaymentProvider param.Field[CustomerUpdateByExternalIDParamsPaymentProvider] `json:"payment_provider"`
	// The ID of this customer in an external payments solution, such as Stripe. This
	// is used for creating charges or invoices in the external system via Orb.
	PaymentProviderID      param.Field[string]                                                `json:"payment_provider_id"`
	ReportingConfiguration param.Field[NewReportingConfigurationParam]                        `json:"reporting_configuration"`
	ShippingAddress        param.Field[AddressInputParam]                                     `json:"shipping_address"`
	TaxConfiguration       param.Field[CustomerUpdateByExternalIDParamsTaxConfigurationUnion] `json:"tax_configuration"`
	// Tax IDs are commonly required to be displayed on customer invoices, which are
	// added to the headers of invoices.
	//
	// ### Supported Tax ID Countries and Types
	//
	// | Country              | Type         | Description                                                                                             |
	// | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
	// | Andorra              | `ad_nrt`     | Andorran NRT Number                                                                                     |
	// | Argentina            | `ar_cuit`    | Argentinian Tax ID Number                                                                               |
	// | Australia            | `au_abn`     | Australian Business Number (AU ABN)                                                                     |
	// | Australia            | `au_arn`     | Australian Taxation Office Reference Number                                                             |
	// | Austria              | `eu_vat`     | European VAT Number                                                                                     |
	// | Bahrain              | `bh_vat`     | Bahraini VAT Number                                                                                     |
	// | Belgium              | `eu_vat`     | European VAT Number                                                                                     |
	// | Bolivia              | `bo_tin`     | Bolivian Tax ID                                                                                         |
	// | Brazil               | `br_cnpj`    | Brazilian CNPJ Number                                                                                   |
	// | Brazil               | `br_cpf`     | Brazilian CPF Number                                                                                    |
	// | Bulgaria             | `bg_uic`     | Bulgaria Unified Identification Code                                                                    |
	// | Bulgaria             | `eu_vat`     | European VAT Number                                                                                     |
	// | Canada               | `ca_bn`      | Canadian BN                                                                                             |
	// | Canada               | `ca_gst_hst` | Canadian GST/HST Number                                                                                 |
	// | Canada               | `ca_pst_bc`  | Canadian PST Number (British Columbia)                                                                  |
	// | Canada               | `ca_pst_mb`  | Canadian PST Number (Manitoba)                                                                          |
	// | Canada               | `ca_pst_sk`  | Canadian PST Number (Saskatchewan)                                                                      |
	// | Canada               | `ca_qst`     | Canadian QST Number (Québec)                                                                            |
	// | Chile                | `cl_tin`     | Chilean TIN                                                                                             |
	// | China                | `cn_tin`     | Chinese Tax ID                                                                                          |
	// | Colombia             | `co_nit`     | Colombian NIT Number                                                                                    |
	// | Costa Rica           | `cr_tin`     | Costa Rican Tax ID                                                                                      |
	// | Croatia              | `eu_vat`     | European VAT Number                                                                                     |
	// | Cyprus               | `eu_vat`     | European VAT Number                                                                                     |
	// | Czech Republic       | `eu_vat`     | European VAT Number                                                                                     |
	// | Denmark              | `eu_vat`     | European VAT Number                                                                                     |
	// | Dominican Republic   | `do_rcn`     | Dominican RCN Number                                                                                    |
	// | Ecuador              | `ec_ruc`     | Ecuadorian RUC Number                                                                                   |
	// | Egypt                | `eg_tin`     | Egyptian Tax Identification Number                                                                      |
	// | El Salvador          | `sv_nit`     | El Salvadorian NIT Number                                                                               |
	// | Estonia              | `eu_vat`     | European VAT Number                                                                                     |
	// | EU                   | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme                                                  |
	// | Finland              | `eu_vat`     | European VAT Number                                                                                     |
	// | France               | `eu_vat`     | European VAT Number                                                                                     |
	// | Georgia              | `ge_vat`     | Georgian VAT                                                                                            |
	// | Germany              | `eu_vat`     | European VAT Number                                                                                     |
	// | Greece               | `eu_vat`     | European VAT Number                                                                                     |
	// | Hong Kong            | `hk_br`      | Hong Kong BR Number                                                                                     |
	// | Hungary              | `eu_vat`     | European VAT Number                                                                                     |
	// | Hungary              | `hu_tin`     | Hungary Tax Number (adószám)                                                                            |
	// | Iceland              | `is_vat`     | Icelandic VAT                                                                                           |
	// | India                | `in_gst`     | Indian GST Number                                                                                       |
	// | Indonesia            | `id_npwp`    | Indonesian NPWP Number                                                                                  |
	// | Ireland              | `eu_vat`     | European VAT Number                                                                                     |
	// | Israel               | `il_vat`     | Israel VAT                                                                                              |
	// | Italy                | `eu_vat`     | European VAT Number                                                                                     |
	// | Japan                | `jp_cn`      | Japanese Corporate Number (_Hōjin Bangō_)                                                               |
	// | Japan                | `jp_rn`      | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
	// | Japan                | `jp_trn`     | Japanese Tax Registration Number (_Tōroku Bangō_)                                                       |
	// | Kazakhstan           | `kz_bin`     | Kazakhstani Business Identification Number                                                              |
	// | Kenya                | `ke_pin`     | Kenya Revenue Authority Personal Identification Number                                                  |
	// | Latvia               | `eu_vat`     | European VAT Number                                                                                     |
	// | Liechtenstein        | `li_uid`     | Liechtensteinian UID Number                                                                             |
	// | Lithuania            | `eu_vat`     | European VAT Number                                                                                     |
	// | Luxembourg           | `eu_vat`     | European VAT Number                                                                                     |
	// | Malaysia             | `my_frp`     | Malaysian FRP Number                                                                                    |
	// | Malaysia             | `my_itn`     | Malaysian ITN                                                                                           |
	// | Malaysia             | `my_sst`     | Malaysian SST Number                                                                                    |
	// | Malta                | `eu_vat `    | European VAT Number                                                                                     |
	// | Mexico               | `mx_rfc`     | Mexican RFC Number                                                                                      |
	// | Netherlands          | `eu_vat`     | European VAT Number                                                                                     |
	// | New Zealand          | `nz_gst`     | New Zealand GST Number                                                                                  |
	// | Nigeria              | `ng_tin`     | Nigerian Tax Identification Number                                                                      |
	// | Norway               | `no_vat`     | Norwegian VAT Number                                                                                    |
	// | Norway               | `no_voec`    | Norwegian VAT on e-commerce Number                                                                      |
	// | Oman                 | `om_vat`     | Omani VAT Number                                                                                        |
	// | Peru                 | `pe_ruc`     | Peruvian RUC Number                                                                                     |
	// | Philippines          | `ph_tin `    | Philippines Tax Identification Number                                                                   |
	// | Poland               | `eu_vat`     | European VAT Number                                                                                     |
	// | Portugal             | `eu_vat`     | European VAT Number                                                                                     |
	// | Romania              | `eu_vat`     | European VAT Number                                                                                     |
	// | Romania              | `ro_tin`     | Romanian Tax ID Number                                                                                  |
	// | Russia               | `ru_inn`     | Russian INN                                                                                             |
	// | Russia               | `ru_kpp`     | Russian KPP                                                                                             |
	// | Saudi Arabia         | `sa_vat`     | Saudi Arabia VAT                                                                                        |
	// | Serbia               | `rs_pib`     | Serbian PIB Number                                                                                      |
	// | Singapore            | `sg_gst`     | Singaporean GST                                                                                         |
	// | Singapore            | `sg_uen`     | Singaporean UEN                                                                                         |
	// | Slovakia             | `eu_vat`     | European VAT Number                                                                                     |
	// | Slovenia             | `eu_vat`     | European VAT Number                                                                                     |
	// | Slovenia             | `si_tin`     | Slovenia Tax Number (davčna številka)                                                                   |
	// | South Africa         | `za_vat`     | South African VAT Number                                                                                |
	// | South Korea          | `kr_brn`     | Korean BRN                                                                                              |
	// | Spain                | `es_cif`     | Spanish NIF Number (previously Spanish CIF Number)                                                      |
	// | Spain                | `eu_vat`     | European VAT Number                                                                                     |
	// | Sweden               | `eu_vat`     | European VAT Number                                                                                     |
	// | Switzerland          | `ch_vat`     | Switzerland VAT Number                                                                                  |
	// | Taiwan               | `tw_vat`     | Taiwanese VAT                                                                                           |
	// | Thailand             | `th_vat`     | Thai VAT                                                                                                |
	// | Turkey               | `tr_tin`     | Turkish Tax Identification Number                                                                       |
	// | Ukraine              | `ua_vat`     | Ukrainian VAT                                                                                           |
	// | United Arab Emirates | `ae_trn`     | United Arab Emirates TRN                                                                                |
	// | United Kingdom       | `eu_vat`     | Northern Ireland VAT Number                                                                             |
	// | United Kingdom       | `gb_vat`     | United Kingdom VAT Number                                                                               |
	// | United States        | `us_ein`     | United States EIN                                                                                       |
	// | Uruguay              | `uy_ruc`     | Uruguayan RUC Number                                                                                    |
	// | Venezuela            | `ve_rif`     | Venezuelan RIF Number                                                                                   |
	// | Vietnam              | `vn_tin`     | Vietnamese Tax ID Number                                                                                |
	TaxID param.Field[shared.CustomerTaxIDParam] `json:"tax_id"`
}

func (CustomerUpdateByExternalIDParams) MarshalJSON

func (r CustomerUpdateByExternalIDParams) MarshalJSON() (data []byte, err error)

type CustomerUpdateByExternalIDParamsPaymentProvider

type CustomerUpdateByExternalIDParamsPaymentProvider string

This is used for creating charges or invoices in an external system via Orb. When not in test mode:

  • the connection must first be configured in the Orb webapp.
  • if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`, `bill.com`, `netsuite`), any product mappings must first be configured with the Orb team.
const (
	CustomerUpdateByExternalIDParamsPaymentProviderQuickbooks    CustomerUpdateByExternalIDParamsPaymentProvider = "quickbooks"
	CustomerUpdateByExternalIDParamsPaymentProviderBillCom       CustomerUpdateByExternalIDParamsPaymentProvider = "bill.com"
	CustomerUpdateByExternalIDParamsPaymentProviderStripeCharge  CustomerUpdateByExternalIDParamsPaymentProvider = "stripe_charge"
	CustomerUpdateByExternalIDParamsPaymentProviderStripeInvoice CustomerUpdateByExternalIDParamsPaymentProvider = "stripe_invoice"
	CustomerUpdateByExternalIDParamsPaymentProviderNetsuite      CustomerUpdateByExternalIDParamsPaymentProvider = "netsuite"
)

func (CustomerUpdateByExternalIDParamsPaymentProvider) IsKnown added in v0.24.0

type CustomerUpdateByExternalIDParamsTaxConfiguration added in v0.64.0

type CustomerUpdateByExternalIDParamsTaxConfiguration struct {
	TaxExempt        param.Field[bool]                                                        `json:"tax_exempt,required"`
	TaxProvider      param.Field[CustomerUpdateByExternalIDParamsTaxConfigurationTaxProvider] `json:"tax_provider,required"`
	TaxExemptionCode param.Field[string]                                                      `json:"tax_exemption_code"`
}

func (CustomerUpdateByExternalIDParamsTaxConfiguration) MarshalJSON added in v0.64.0

func (r CustomerUpdateByExternalIDParamsTaxConfiguration) MarshalJSON() (data []byte, err error)

type CustomerUpdateByExternalIDParamsTaxConfigurationTaxProvider added in v0.64.0

type CustomerUpdateByExternalIDParamsTaxConfigurationTaxProvider string
const (
	CustomerUpdateByExternalIDParamsTaxConfigurationTaxProviderAvalara CustomerUpdateByExternalIDParamsTaxConfigurationTaxProvider = "avalara"
	CustomerUpdateByExternalIDParamsTaxConfigurationTaxProviderTaxjar  CustomerUpdateByExternalIDParamsTaxConfigurationTaxProvider = "taxjar"
	CustomerUpdateByExternalIDParamsTaxConfigurationTaxProviderSphere  CustomerUpdateByExternalIDParamsTaxConfigurationTaxProvider = "sphere"
)

func (CustomerUpdateByExternalIDParamsTaxConfigurationTaxProvider) IsKnown added in v0.64.0

type CustomerUpdateByExternalIDParamsTaxConfigurationUnion added in v0.64.0

type CustomerUpdateByExternalIDParamsTaxConfigurationUnion interface {
	// contains filtered or unexported methods
}

Satisfied by NewAvalaraTaxConfigurationParam, NewTaxJarConfigurationParam, NewSphereConfigurationParam, CustomerUpdateByExternalIDParamsTaxConfiguration.

type CustomerUpdateParams

type CustomerUpdateParams struct {
	AccountingSyncConfiguration param.Field[NewAccountingSyncConfigurationParam] `json:"accounting_sync_configuration"`
	// Additional email addresses for this customer. If populated, these email
	// addresses will be CC'd for customer communications.
	AdditionalEmails param.Field[[]string] `json:"additional_emails"`
	// Used to determine if invoices for this customer will automatically attempt to
	// charge a saved payment method, if available. This parameter defaults to `True`
	// when a payment provider is provided on customer creation.
	AutoCollection param.Field[bool]              `json:"auto_collection"`
	BillingAddress param.Field[AddressInputParam] `json:"billing_address"`
	// An ISO 4217 currency string used for the customer's invoices and balance. If not
	// set at creation time, will be set at subscription creation time.
	Currency param.Field[string] `json:"currency"`
	// A valid customer email, to be used for invoicing and notifications.
	Email         param.Field[string] `json:"email" format:"email"`
	EmailDelivery param.Field[bool]   `json:"email_delivery"`
	// The external customer ID. This can only be set if empty and the customer has no
	// past or current subscriptions.
	ExternalCustomerID param.Field[string] `json:"external_customer_id"`
	// The hierarchical relationships for this customer.
	Hierarchy param.Field[CustomerHierarchyConfigParam] `json:"hierarchy"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// The full name of the customer
	Name param.Field[string] `json:"name"`
	// This is used for creating charges or invoices in an external system via Orb.
	// When not in test mode:
	//
	//   - the connection must first be configured in the Orb webapp.
	//   - if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`,
	//     `bill.com`, `netsuite`), any product mappings must first be configured with
	//     the Orb team.
	PaymentProvider param.Field[CustomerUpdateParamsPaymentProvider] `json:"payment_provider"`
	// The ID of this customer in an external payments solution, such as Stripe. This
	// is used for creating charges or invoices in the external system via Orb.
	PaymentProviderID      param.Field[string]                                    `json:"payment_provider_id"`
	ReportingConfiguration param.Field[NewReportingConfigurationParam]            `json:"reporting_configuration"`
	ShippingAddress        param.Field[AddressInputParam]                         `json:"shipping_address"`
	TaxConfiguration       param.Field[CustomerUpdateParamsTaxConfigurationUnion] `json:"tax_configuration"`
	// Tax IDs are commonly required to be displayed on customer invoices, which are
	// added to the headers of invoices.
	//
	// ### Supported Tax ID Countries and Types
	//
	// | Country              | Type         | Description                                                                                             |
	// | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
	// | Andorra              | `ad_nrt`     | Andorran NRT Number                                                                                     |
	// | Argentina            | `ar_cuit`    | Argentinian Tax ID Number                                                                               |
	// | Australia            | `au_abn`     | Australian Business Number (AU ABN)                                                                     |
	// | Australia            | `au_arn`     | Australian Taxation Office Reference Number                                                             |
	// | Austria              | `eu_vat`     | European VAT Number                                                                                     |
	// | Bahrain              | `bh_vat`     | Bahraini VAT Number                                                                                     |
	// | Belgium              | `eu_vat`     | European VAT Number                                                                                     |
	// | Bolivia              | `bo_tin`     | Bolivian Tax ID                                                                                         |
	// | Brazil               | `br_cnpj`    | Brazilian CNPJ Number                                                                                   |
	// | Brazil               | `br_cpf`     | Brazilian CPF Number                                                                                    |
	// | Bulgaria             | `bg_uic`     | Bulgaria Unified Identification Code                                                                    |
	// | Bulgaria             | `eu_vat`     | European VAT Number                                                                                     |
	// | Canada               | `ca_bn`      | Canadian BN                                                                                             |
	// | Canada               | `ca_gst_hst` | Canadian GST/HST Number                                                                                 |
	// | Canada               | `ca_pst_bc`  | Canadian PST Number (British Columbia)                                                                  |
	// | Canada               | `ca_pst_mb`  | Canadian PST Number (Manitoba)                                                                          |
	// | Canada               | `ca_pst_sk`  | Canadian PST Number (Saskatchewan)                                                                      |
	// | Canada               | `ca_qst`     | Canadian QST Number (Québec)                                                                            |
	// | Chile                | `cl_tin`     | Chilean TIN                                                                                             |
	// | China                | `cn_tin`     | Chinese Tax ID                                                                                          |
	// | Colombia             | `co_nit`     | Colombian NIT Number                                                                                    |
	// | Costa Rica           | `cr_tin`     | Costa Rican Tax ID                                                                                      |
	// | Croatia              | `eu_vat`     | European VAT Number                                                                                     |
	// | Cyprus               | `eu_vat`     | European VAT Number                                                                                     |
	// | Czech Republic       | `eu_vat`     | European VAT Number                                                                                     |
	// | Denmark              | `eu_vat`     | European VAT Number                                                                                     |
	// | Dominican Republic   | `do_rcn`     | Dominican RCN Number                                                                                    |
	// | Ecuador              | `ec_ruc`     | Ecuadorian RUC Number                                                                                   |
	// | Egypt                | `eg_tin`     | Egyptian Tax Identification Number                                                                      |
	// | El Salvador          | `sv_nit`     | El Salvadorian NIT Number                                                                               |
	// | Estonia              | `eu_vat`     | European VAT Number                                                                                     |
	// | EU                   | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme                                                  |
	// | Finland              | `eu_vat`     | European VAT Number                                                                                     |
	// | France               | `eu_vat`     | European VAT Number                                                                                     |
	// | Georgia              | `ge_vat`     | Georgian VAT                                                                                            |
	// | Germany              | `eu_vat`     | European VAT Number                                                                                     |
	// | Greece               | `eu_vat`     | European VAT Number                                                                                     |
	// | Hong Kong            | `hk_br`      | Hong Kong BR Number                                                                                     |
	// | Hungary              | `eu_vat`     | European VAT Number                                                                                     |
	// | Hungary              | `hu_tin`     | Hungary Tax Number (adószám)                                                                            |
	// | Iceland              | `is_vat`     | Icelandic VAT                                                                                           |
	// | India                | `in_gst`     | Indian GST Number                                                                                       |
	// | Indonesia            | `id_npwp`    | Indonesian NPWP Number                                                                                  |
	// | Ireland              | `eu_vat`     | European VAT Number                                                                                     |
	// | Israel               | `il_vat`     | Israel VAT                                                                                              |
	// | Italy                | `eu_vat`     | European VAT Number                                                                                     |
	// | Japan                | `jp_cn`      | Japanese Corporate Number (_Hōjin Bangō_)                                                               |
	// | Japan                | `jp_rn`      | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
	// | Japan                | `jp_trn`     | Japanese Tax Registration Number (_Tōroku Bangō_)                                                       |
	// | Kazakhstan           | `kz_bin`     | Kazakhstani Business Identification Number                                                              |
	// | Kenya                | `ke_pin`     | Kenya Revenue Authority Personal Identification Number                                                  |
	// | Latvia               | `eu_vat`     | European VAT Number                                                                                     |
	// | Liechtenstein        | `li_uid`     | Liechtensteinian UID Number                                                                             |
	// | Lithuania            | `eu_vat`     | European VAT Number                                                                                     |
	// | Luxembourg           | `eu_vat`     | European VAT Number                                                                                     |
	// | Malaysia             | `my_frp`     | Malaysian FRP Number                                                                                    |
	// | Malaysia             | `my_itn`     | Malaysian ITN                                                                                           |
	// | Malaysia             | `my_sst`     | Malaysian SST Number                                                                                    |
	// | Malta                | `eu_vat `    | European VAT Number                                                                                     |
	// | Mexico               | `mx_rfc`     | Mexican RFC Number                                                                                      |
	// | Netherlands          | `eu_vat`     | European VAT Number                                                                                     |
	// | New Zealand          | `nz_gst`     | New Zealand GST Number                                                                                  |
	// | Nigeria              | `ng_tin`     | Nigerian Tax Identification Number                                                                      |
	// | Norway               | `no_vat`     | Norwegian VAT Number                                                                                    |
	// | Norway               | `no_voec`    | Norwegian VAT on e-commerce Number                                                                      |
	// | Oman                 | `om_vat`     | Omani VAT Number                                                                                        |
	// | Peru                 | `pe_ruc`     | Peruvian RUC Number                                                                                     |
	// | Philippines          | `ph_tin `    | Philippines Tax Identification Number                                                                   |
	// | Poland               | `eu_vat`     | European VAT Number                                                                                     |
	// | Portugal             | `eu_vat`     | European VAT Number                                                                                     |
	// | Romania              | `eu_vat`     | European VAT Number                                                                                     |
	// | Romania              | `ro_tin`     | Romanian Tax ID Number                                                                                  |
	// | Russia               | `ru_inn`     | Russian INN                                                                                             |
	// | Russia               | `ru_kpp`     | Russian KPP                                                                                             |
	// | Saudi Arabia         | `sa_vat`     | Saudi Arabia VAT                                                                                        |
	// | Serbia               | `rs_pib`     | Serbian PIB Number                                                                                      |
	// | Singapore            | `sg_gst`     | Singaporean GST                                                                                         |
	// | Singapore            | `sg_uen`     | Singaporean UEN                                                                                         |
	// | Slovakia             | `eu_vat`     | European VAT Number                                                                                     |
	// | Slovenia             | `eu_vat`     | European VAT Number                                                                                     |
	// | Slovenia             | `si_tin`     | Slovenia Tax Number (davčna številka)                                                                   |
	// | South Africa         | `za_vat`     | South African VAT Number                                                                                |
	// | South Korea          | `kr_brn`     | Korean BRN                                                                                              |
	// | Spain                | `es_cif`     | Spanish NIF Number (previously Spanish CIF Number)                                                      |
	// | Spain                | `eu_vat`     | European VAT Number                                                                                     |
	// | Sweden               | `eu_vat`     | European VAT Number                                                                                     |
	// | Switzerland          | `ch_vat`     | Switzerland VAT Number                                                                                  |
	// | Taiwan               | `tw_vat`     | Taiwanese VAT                                                                                           |
	// | Thailand             | `th_vat`     | Thai VAT                                                                                                |
	// | Turkey               | `tr_tin`     | Turkish Tax Identification Number                                                                       |
	// | Ukraine              | `ua_vat`     | Ukrainian VAT                                                                                           |
	// | United Arab Emirates | `ae_trn`     | United Arab Emirates TRN                                                                                |
	// | United Kingdom       | `eu_vat`     | Northern Ireland VAT Number                                                                             |
	// | United Kingdom       | `gb_vat`     | United Kingdom VAT Number                                                                               |
	// | United States        | `us_ein`     | United States EIN                                                                                       |
	// | Uruguay              | `uy_ruc`     | Uruguayan RUC Number                                                                                    |
	// | Venezuela            | `ve_rif`     | Venezuelan RIF Number                                                                                   |
	// | Vietnam              | `vn_tin`     | Vietnamese Tax ID Number                                                                                |
	TaxID param.Field[shared.CustomerTaxIDParam] `json:"tax_id"`
}

func (CustomerUpdateParams) MarshalJSON

func (r CustomerUpdateParams) MarshalJSON() (data []byte, err error)

type CustomerUpdateParamsPaymentProvider

type CustomerUpdateParamsPaymentProvider string

This is used for creating charges or invoices in an external system via Orb. When not in test mode:

  • the connection must first be configured in the Orb webapp.
  • if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`, `bill.com`, `netsuite`), any product mappings must first be configured with the Orb team.
const (
	CustomerUpdateParamsPaymentProviderQuickbooks    CustomerUpdateParamsPaymentProvider = "quickbooks"
	CustomerUpdateParamsPaymentProviderBillCom       CustomerUpdateParamsPaymentProvider = "bill.com"
	CustomerUpdateParamsPaymentProviderStripeCharge  CustomerUpdateParamsPaymentProvider = "stripe_charge"
	CustomerUpdateParamsPaymentProviderStripeInvoice CustomerUpdateParamsPaymentProvider = "stripe_invoice"
	CustomerUpdateParamsPaymentProviderNetsuite      CustomerUpdateParamsPaymentProvider = "netsuite"
)

func (CustomerUpdateParamsPaymentProvider) IsKnown added in v0.24.0

type CustomerUpdateParamsTaxConfiguration added in v0.64.0

type CustomerUpdateParamsTaxConfiguration struct {
	TaxExempt        param.Field[bool]                                            `json:"tax_exempt,required"`
	TaxProvider      param.Field[CustomerUpdateParamsTaxConfigurationTaxProvider] `json:"tax_provider,required"`
	TaxExemptionCode param.Field[string]                                          `json:"tax_exemption_code"`
}

func (CustomerUpdateParamsTaxConfiguration) MarshalJSON added in v0.64.0

func (r CustomerUpdateParamsTaxConfiguration) MarshalJSON() (data []byte, err error)

type CustomerUpdateParamsTaxConfigurationTaxProvider added in v0.64.0

type CustomerUpdateParamsTaxConfigurationTaxProvider string
const (
	CustomerUpdateParamsTaxConfigurationTaxProviderAvalara CustomerUpdateParamsTaxConfigurationTaxProvider = "avalara"
	CustomerUpdateParamsTaxConfigurationTaxProviderTaxjar  CustomerUpdateParamsTaxConfigurationTaxProvider = "taxjar"
	CustomerUpdateParamsTaxConfigurationTaxProviderSphere  CustomerUpdateParamsTaxConfigurationTaxProvider = "sphere"
)

func (CustomerUpdateParamsTaxConfigurationTaxProvider) IsKnown added in v0.64.0

type CustomerUpdateParamsTaxConfigurationUnion added in v0.64.0

type CustomerUpdateParamsTaxConfigurationUnion interface {
	// contains filtered or unexported methods
}

Satisfied by NewAvalaraTaxConfigurationParam, NewTaxJarConfigurationParam, NewSphereConfigurationParam, CustomerUpdateParamsTaxConfiguration.

type DecrementLedgerEntry added in v0.121.0

type DecrementLedgerEntry struct {
	ID                   string                          `json:"id,required"`
	Amount               float64                         `json:"amount,required"`
	CreatedAt            time.Time                       `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlock                   `json:"credit_block,required"`
	Currency             string                          `json:"currency,required"`
	Customer             shared.CustomerMinified         `json:"customer,required"`
	Description          string                          `json:"description,required,nullable"`
	EndingBalance        float64                         `json:"ending_balance,required"`
	EntryStatus          DecrementLedgerEntryEntryStatus `json:"entry_status,required"`
	EntryType            DecrementLedgerEntryEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                           `json:"ledger_sequence_number,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata        map[string]string        `json:"metadata,required"`
	StartingBalance float64                  `json:"starting_balance,required"`
	EventID         string                   `json:"event_id,nullable"`
	InvoiceID       string                   `json:"invoice_id,nullable"`
	PriceID         string                   `json:"price_id,nullable"`
	JSON            decrementLedgerEntryJSON `json:"-"`
}

func (*DecrementLedgerEntry) UnmarshalJSON added in v0.121.0

func (r *DecrementLedgerEntry) UnmarshalJSON(data []byte) (err error)

type DecrementLedgerEntryEntryStatus added in v0.121.0

type DecrementLedgerEntryEntryStatus string
const (
	DecrementLedgerEntryEntryStatusCommitted DecrementLedgerEntryEntryStatus = "committed"
	DecrementLedgerEntryEntryStatusPending   DecrementLedgerEntryEntryStatus = "pending"
)

func (DecrementLedgerEntryEntryStatus) IsKnown added in v0.121.0

type DecrementLedgerEntryEntryType added in v0.121.0

type DecrementLedgerEntryEntryType string
const (
	DecrementLedgerEntryEntryTypeDecrement DecrementLedgerEntryEntryType = "decrement"
)

func (DecrementLedgerEntryEntryType) IsKnown added in v0.121.0

func (r DecrementLedgerEntryEntryType) IsKnown() bool

type DimensionalPriceConfiguration added in v0.121.0

type DimensionalPriceConfiguration = shared.DimensionalPriceConfiguration

This is an alias to an internal type.

type DimensionalPriceGroup added in v0.85.0

type DimensionalPriceGroup struct {
	ID string `json:"id,required"`
	// The billable metric associated with this dimensional price group. All prices
	// associated with this dimensional price group will be computed using this
	// billable metric.
	BillableMetricID string `json:"billable_metric_id,required"`
	// The dimensions that this dimensional price group is defined over
	Dimensions []string `json:"dimensions,required"`
	// An alias for the dimensional price group
	ExternalDimensionalPriceGroupID string `json:"external_dimensional_price_group_id,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata map[string]string `json:"metadata,required"`
	// The name of the dimensional price group
	Name string                    `json:"name,required"`
	JSON dimensionalPriceGroupJSON `json:"-"`
}

A dimensional price group is used to partition the result of a billable metric by a set of dimensions. Prices in a price group must specify the parition used to derive their usage.

func (*DimensionalPriceGroup) UnmarshalJSON added in v0.85.0

func (r *DimensionalPriceGroup) UnmarshalJSON(data []byte) (err error)

type DimensionalPriceGroupExternalDimensionalPriceGroupIDService added in v0.85.0

type DimensionalPriceGroupExternalDimensionalPriceGroupIDService struct {
	Options []option.RequestOption
}

DimensionalPriceGroupExternalDimensionalPriceGroupIDService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDimensionalPriceGroupExternalDimensionalPriceGroupIDService method instead.

func NewDimensionalPriceGroupExternalDimensionalPriceGroupIDService added in v0.85.0

func NewDimensionalPriceGroupExternalDimensionalPriceGroupIDService(opts ...option.RequestOption) (r *DimensionalPriceGroupExternalDimensionalPriceGroupIDService)

NewDimensionalPriceGroupExternalDimensionalPriceGroupIDService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*DimensionalPriceGroupExternalDimensionalPriceGroupIDService) Get added in v0.85.0

Fetch dimensional price group by external ID

type DimensionalPriceGroupListParams added in v0.85.0

type DimensionalPriceGroupListParams struct {
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor param.Field[string] `query:"cursor"`
	// The number of items to fetch. Defaults to 20.
	Limit param.Field[int64] `query:"limit"`
}

func (DimensionalPriceGroupListParams) URLQuery added in v0.85.0

func (r DimensionalPriceGroupListParams) URLQuery() (v url.Values)

URLQuery serializes DimensionalPriceGroupListParams's query parameters as `url.Values`.

type DimensionalPriceGroupNewParams added in v0.85.0

type DimensionalPriceGroupNewParams struct {
	BillableMetricID param.Field[string] `json:"billable_metric_id,required"`
	// The set of keys (in order) used to disambiguate prices in the group.
	Dimensions                      param.Field[[]string] `json:"dimensions,required"`
	Name                            param.Field[string]   `json:"name,required"`
	ExternalDimensionalPriceGroupID param.Field[string]   `json:"external_dimensional_price_group_id"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (DimensionalPriceGroupNewParams) MarshalJSON added in v0.85.0

func (r DimensionalPriceGroupNewParams) MarshalJSON() (data []byte, err error)

type DimensionalPriceGroupService added in v0.85.0

type DimensionalPriceGroupService struct {
	Options                         []option.RequestOption
	ExternalDimensionalPriceGroupID *DimensionalPriceGroupExternalDimensionalPriceGroupIDService
}

DimensionalPriceGroupService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDimensionalPriceGroupService method instead.

func NewDimensionalPriceGroupService added in v0.85.0

func NewDimensionalPriceGroupService(opts ...option.RequestOption) (r *DimensionalPriceGroupService)

NewDimensionalPriceGroupService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*DimensionalPriceGroupService) Get added in v0.85.0

func (r *DimensionalPriceGroupService) Get(ctx context.Context, dimensionalPriceGroupID string, opts ...option.RequestOption) (res *DimensionalPriceGroup, err error)

Fetch dimensional price group

func (*DimensionalPriceGroupService) List added in v0.85.0

List dimensional price groups

func (*DimensionalPriceGroupService) ListAutoPaging added in v0.85.0

List dimensional price groups

func (*DimensionalPriceGroupService) New added in v0.85.0

A dimensional price group is used to partition the result of a billable metric by a set of dimensions. Prices in a price group must specify the parition used to derive their usage.

For example, suppose we have a billable metric that measures the number of widgets used and we want to charge differently depending on the color of the widget. We can create a price group with a dimension "color" and two prices: one that charges \$10 per red widget and one that charges \$20 per blue widget.

type DimensionalPriceGroups added in v0.85.0

type DimensionalPriceGroups struct {
	Data               []DimensionalPriceGroup    `json:"data,required"`
	PaginationMetadata shared.PaginationMetadata  `json:"pagination_metadata,required"`
	JSON               dimensionalPriceGroupsJSON `json:"-"`
}

func (*DimensionalPriceGroups) UnmarshalJSON added in v0.85.0

func (r *DimensionalPriceGroups) UnmarshalJSON(data []byte) (err error)

type Discount added in v0.2.0

type Discount = shared.Discount

This is an alias to an internal type.

type DiscountDiscountType

type DiscountDiscountType = shared.DiscountDiscountType

This is an alias to an internal type.

type DiscountOverrideDiscountType added in v0.121.0

type DiscountOverrideDiscountType string
const (
	DiscountOverrideDiscountTypePercentage DiscountOverrideDiscountType = "percentage"
	DiscountOverrideDiscountTypeUsage      DiscountOverrideDiscountType = "usage"
	DiscountOverrideDiscountTypeAmount     DiscountOverrideDiscountType = "amount"
)

func (DiscountOverrideDiscountType) IsKnown added in v0.121.0

func (r DiscountOverrideDiscountType) IsKnown() bool

type DiscountOverrideParam added in v0.121.0

type DiscountOverrideParam struct {
	DiscountType param.Field[DiscountOverrideDiscountType] `json:"discount_type,required"`
	// Only available if discount_type is `amount`.
	AmountDiscount param.Field[string] `json:"amount_discount"`
	// Only available if discount_type is `percentage`. This is a number between 0
	// and 1.
	PercentageDiscount param.Field[float64] `json:"percentage_discount"`
	// Only available if discount_type is `usage`. Number of usage units that this
	// discount is for
	UsageDiscount param.Field[float64] `json:"usage_discount"`
}

func (DiscountOverrideParam) MarshalJSON added in v0.121.0

func (r DiscountOverrideParam) MarshalJSON() (data []byte, err error)

type DiscountUnionParam added in v0.35.0

type DiscountUnionParam = shared.DiscountUnionParam

This is an alias to an internal type.

type Error

type Error = apierror.Error

type ErrorStatus added in v0.32.0

type ErrorStatus = apierror.ErrorStatus

type ErrorType added in v0.32.0

type ErrorType = apierror.ErrorType

type EvaluatePriceGroup added in v0.12.0

type EvaluatePriceGroup struct {
	// The price's output for the group
	Amount string `json:"amount,required"`
	// The values for the group in the order specified by `grouping_keys`
	GroupingValues []EvaluatePriceGroupGroupingValuesUnion `json:"grouping_values,required"`
	// The price's usage quantity for the group
	Quantity float64                `json:"quantity,required"`
	JSON     evaluatePriceGroupJSON `json:"-"`
}

func (*EvaluatePriceGroup) UnmarshalJSON added in v0.12.0

func (r *EvaluatePriceGroup) UnmarshalJSON(data []byte) (err error)

type EvaluatePriceGroupGroupingValuesUnion added in v0.25.0

type EvaluatePriceGroupGroupingValuesUnion interface {
	ImplementsEvaluatePriceGroupGroupingValuesUnion()
}

Union satisfied by shared.UnionString, shared.UnionFloat or shared.UnionBool.

type EventBackfillCloseResponse

type EventBackfillCloseResponse struct {
	ID string `json:"id,required"`
	// If in the future, the time at which the backfill will automatically close. If in
	// the past, the time at which the backfill was closed.
	CloseTime time.Time `json:"close_time,required,nullable" format:"date-time"`
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// The Orb-generated ID of the customer to which this backfill is scoped. If
	// `null`, this backfill is scoped to all customers.
	CustomerID string `json:"customer_id,required,nullable"`
	// The number of events ingested in this backfill.
	EventsIngested int64 `json:"events_ingested,required"`
	// If `true`, existing events in the backfill's timeframe will be replaced with the
	// newly ingested events associated with the backfill. If `false`, newly ingested
	// events will be added to the existing events.
	ReplaceExistingEvents bool `json:"replace_existing_events,required"`
	// The time at which this backfill was reverted.
	RevertedAt time.Time `json:"reverted_at,required,nullable" format:"date-time"`
	// The status of the backfill.
	Status         EventBackfillCloseResponseStatus `json:"status,required"`
	TimeframeEnd   time.Time                        `json:"timeframe_end,required" format:"date-time"`
	TimeframeStart time.Time                        `json:"timeframe_start,required" format:"date-time"`
	// A boolean
	// [computed property](/extensibility/advanced-metrics#computed-properties) used to
	// filter the set of events to deprecate
	DeprecationFilter string                         `json:"deprecation_filter,nullable"`
	JSON              eventBackfillCloseResponseJSON `json:"-"`
}

A backfill represents an update to historical usage data, adding or replacing events in a timeframe.

func (*EventBackfillCloseResponse) UnmarshalJSON

func (r *EventBackfillCloseResponse) UnmarshalJSON(data []byte) (err error)

type EventBackfillCloseResponseStatus

type EventBackfillCloseResponseStatus string

The status of the backfill.

const (
	EventBackfillCloseResponseStatusPending       EventBackfillCloseResponseStatus = "pending"
	EventBackfillCloseResponseStatusReflected     EventBackfillCloseResponseStatus = "reflected"
	EventBackfillCloseResponseStatusPendingRevert EventBackfillCloseResponseStatus = "pending_revert"
	EventBackfillCloseResponseStatusReverted      EventBackfillCloseResponseStatus = "reverted"
)

func (EventBackfillCloseResponseStatus) IsKnown added in v0.24.0

type EventBackfillFetchResponse

type EventBackfillFetchResponse struct {
	ID string `json:"id,required"`
	// If in the future, the time at which the backfill will automatically close. If in
	// the past, the time at which the backfill was closed.
	CloseTime time.Time `json:"close_time,required,nullable" format:"date-time"`
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// The Orb-generated ID of the customer to which this backfill is scoped. If
	// `null`, this backfill is scoped to all customers.
	CustomerID string `json:"customer_id,required,nullable"`
	// The number of events ingested in this backfill.
	EventsIngested int64 `json:"events_ingested,required"`
	// If `true`, existing events in the backfill's timeframe will be replaced with the
	// newly ingested events associated with the backfill. If `false`, newly ingested
	// events will be added to the existing events.
	ReplaceExistingEvents bool `json:"replace_existing_events,required"`
	// The time at which this backfill was reverted.
	RevertedAt time.Time `json:"reverted_at,required,nullable" format:"date-time"`
	// The status of the backfill.
	Status         EventBackfillFetchResponseStatus `json:"status,required"`
	TimeframeEnd   time.Time                        `json:"timeframe_end,required" format:"date-time"`
	TimeframeStart time.Time                        `json:"timeframe_start,required" format:"date-time"`
	// A boolean
	// [computed property](/extensibility/advanced-metrics#computed-properties) used to
	// filter the set of events to deprecate
	DeprecationFilter string                         `json:"deprecation_filter,nullable"`
	JSON              eventBackfillFetchResponseJSON `json:"-"`
}

A backfill represents an update to historical usage data, adding or replacing events in a timeframe.

func (*EventBackfillFetchResponse) UnmarshalJSON

func (r *EventBackfillFetchResponse) UnmarshalJSON(data []byte) (err error)

type EventBackfillFetchResponseStatus

type EventBackfillFetchResponseStatus string

The status of the backfill.

const (
	EventBackfillFetchResponseStatusPending       EventBackfillFetchResponseStatus = "pending"
	EventBackfillFetchResponseStatusReflected     EventBackfillFetchResponseStatus = "reflected"
	EventBackfillFetchResponseStatusPendingRevert EventBackfillFetchResponseStatus = "pending_revert"
	EventBackfillFetchResponseStatusReverted      EventBackfillFetchResponseStatus = "reverted"
)

func (EventBackfillFetchResponseStatus) IsKnown added in v0.24.0

type EventBackfillListParams

type EventBackfillListParams struct {
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor param.Field[string] `query:"cursor"`
	// The number of items to fetch. Defaults to 20.
	Limit param.Field[int64] `query:"limit"`
}

func (EventBackfillListParams) URLQuery

func (r EventBackfillListParams) URLQuery() (v url.Values)

URLQuery serializes EventBackfillListParams's query parameters as `url.Values`.

type EventBackfillListResponse

type EventBackfillListResponse struct {
	ID string `json:"id,required"`
	// If in the future, the time at which the backfill will automatically close. If in
	// the past, the time at which the backfill was closed.
	CloseTime time.Time `json:"close_time,required,nullable" format:"date-time"`
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// The Orb-generated ID of the customer to which this backfill is scoped. If
	// `null`, this backfill is scoped to all customers.
	CustomerID string `json:"customer_id,required,nullable"`
	// The number of events ingested in this backfill.
	EventsIngested int64 `json:"events_ingested,required"`
	// If `true`, existing events in the backfill's timeframe will be replaced with the
	// newly ingested events associated with the backfill. If `false`, newly ingested
	// events will be added to the existing events.
	ReplaceExistingEvents bool `json:"replace_existing_events,required"`
	// The time at which this backfill was reverted.
	RevertedAt time.Time `json:"reverted_at,required,nullable" format:"date-time"`
	// The status of the backfill.
	Status         EventBackfillListResponseStatus `json:"status,required"`
	TimeframeEnd   time.Time                       `json:"timeframe_end,required" format:"date-time"`
	TimeframeStart time.Time                       `json:"timeframe_start,required" format:"date-time"`
	// A boolean
	// [computed property](/extensibility/advanced-metrics#computed-properties) used to
	// filter the set of events to deprecate
	DeprecationFilter string                        `json:"deprecation_filter,nullable"`
	JSON              eventBackfillListResponseJSON `json:"-"`
}

A backfill represents an update to historical usage data, adding or replacing events in a timeframe.

func (*EventBackfillListResponse) UnmarshalJSON

func (r *EventBackfillListResponse) UnmarshalJSON(data []byte) (err error)

type EventBackfillListResponseStatus

type EventBackfillListResponseStatus string

The status of the backfill.

const (
	EventBackfillListResponseStatusPending       EventBackfillListResponseStatus = "pending"
	EventBackfillListResponseStatusReflected     EventBackfillListResponseStatus = "reflected"
	EventBackfillListResponseStatusPendingRevert EventBackfillListResponseStatus = "pending_revert"
	EventBackfillListResponseStatusReverted      EventBackfillListResponseStatus = "reverted"
)

func (EventBackfillListResponseStatus) IsKnown added in v0.24.0

type EventBackfillNewParams

type EventBackfillNewParams struct {
	// The (exclusive) end of the usage timeframe affected by this backfill. By
	// default, Orb allows backfills up to 10 days in duration at a time. Reach out to
	// discuss extending this limit and your use case.
	TimeframeEnd param.Field[time.Time] `json:"timeframe_end,required" format:"date-time"`
	// The (inclusive) start of the usage timeframe affected by this backfill. By
	// default, Orb allows backfills up to 10 days in duration at a time. Reach out to
	// discuss extending this limit and your use case.
	TimeframeStart param.Field[time.Time] `json:"timeframe_start,required" format:"date-time"`
	// The time at which no more events will be accepted for this backfill. The
	// backfill will automatically begin reflecting throughout Orb at the close time.
	// If not specified, it will default to 1 day after the creation of the backfill.
	CloseTime param.Field[time.Time] `json:"close_time" format:"date-time"`
	// The Orb-generated ID of the customer to which this backfill is scoped. Omitting
	// this field will scope the backfill to all customers.
	CustomerID param.Field[string] `json:"customer_id"`
	// A boolean
	// [computed property](/extensibility/advanced-metrics#computed-properties) used to
	// filter the set of events to deprecate
	DeprecationFilter param.Field[string] `json:"deprecation_filter"`
	// The external customer ID of the customer to which this backfill is scoped.
	// Omitting this field will scope the backfill to all customers.
	ExternalCustomerID param.Field[string] `json:"external_customer_id"`
	// If true, replaces all existing events in the timeframe with the newly ingested
	// events. If false, adds the newly ingested events to the existing events.
	ReplaceExistingEvents param.Field[bool] `json:"replace_existing_events"`
}

func (EventBackfillNewParams) MarshalJSON

func (r EventBackfillNewParams) MarshalJSON() (data []byte, err error)

type EventBackfillNewResponse

type EventBackfillNewResponse struct {
	ID string `json:"id,required"`
	// If in the future, the time at which the backfill will automatically close. If in
	// the past, the time at which the backfill was closed.
	CloseTime time.Time `json:"close_time,required,nullable" format:"date-time"`
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// The Orb-generated ID of the customer to which this backfill is scoped. If
	// `null`, this backfill is scoped to all customers.
	CustomerID string `json:"customer_id,required,nullable"`
	// The number of events ingested in this backfill.
	EventsIngested int64 `json:"events_ingested,required"`
	// If `true`, existing events in the backfill's timeframe will be replaced with the
	// newly ingested events associated with the backfill. If `false`, newly ingested
	// events will be added to the existing events.
	ReplaceExistingEvents bool `json:"replace_existing_events,required"`
	// The time at which this backfill was reverted.
	RevertedAt time.Time `json:"reverted_at,required,nullable" format:"date-time"`
	// The status of the backfill.
	Status         EventBackfillNewResponseStatus `json:"status,required"`
	TimeframeEnd   time.Time                      `json:"timeframe_end,required" format:"date-time"`
	TimeframeStart time.Time                      `json:"timeframe_start,required" format:"date-time"`
	// A boolean
	// [computed property](/extensibility/advanced-metrics#computed-properties) used to
	// filter the set of events to deprecate
	DeprecationFilter string                       `json:"deprecation_filter,nullable"`
	JSON              eventBackfillNewResponseJSON `json:"-"`
}

A backfill represents an update to historical usage data, adding or replacing events in a timeframe.

func (*EventBackfillNewResponse) UnmarshalJSON

func (r *EventBackfillNewResponse) UnmarshalJSON(data []byte) (err error)

type EventBackfillNewResponseStatus

type EventBackfillNewResponseStatus string

The status of the backfill.

const (
	EventBackfillNewResponseStatusPending       EventBackfillNewResponseStatus = "pending"
	EventBackfillNewResponseStatusReflected     EventBackfillNewResponseStatus = "reflected"
	EventBackfillNewResponseStatusPendingRevert EventBackfillNewResponseStatus = "pending_revert"
	EventBackfillNewResponseStatusReverted      EventBackfillNewResponseStatus = "reverted"
)

func (EventBackfillNewResponseStatus) IsKnown added in v0.24.0

type EventBackfillRevertResponse

type EventBackfillRevertResponse struct {
	ID string `json:"id,required"`
	// If in the future, the time at which the backfill will automatically close. If in
	// the past, the time at which the backfill was closed.
	CloseTime time.Time `json:"close_time,required,nullable" format:"date-time"`
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// The Orb-generated ID of the customer to which this backfill is scoped. If
	// `null`, this backfill is scoped to all customers.
	CustomerID string `json:"customer_id,required,nullable"`
	// The number of events ingested in this backfill.
	EventsIngested int64 `json:"events_ingested,required"`
	// If `true`, existing events in the backfill's timeframe will be replaced with the
	// newly ingested events associated with the backfill. If `false`, newly ingested
	// events will be added to the existing events.
	ReplaceExistingEvents bool `json:"replace_existing_events,required"`
	// The time at which this backfill was reverted.
	RevertedAt time.Time `json:"reverted_at,required,nullable" format:"date-time"`
	// The status of the backfill.
	Status         EventBackfillRevertResponseStatus `json:"status,required"`
	TimeframeEnd   time.Time                         `json:"timeframe_end,required" format:"date-time"`
	TimeframeStart time.Time                         `json:"timeframe_start,required" format:"date-time"`
	// A boolean
	// [computed property](/extensibility/advanced-metrics#computed-properties) used to
	// filter the set of events to deprecate
	DeprecationFilter string                          `json:"deprecation_filter,nullable"`
	JSON              eventBackfillRevertResponseJSON `json:"-"`
}

A backfill represents an update to historical usage data, adding or replacing events in a timeframe.

func (*EventBackfillRevertResponse) UnmarshalJSON

func (r *EventBackfillRevertResponse) UnmarshalJSON(data []byte) (err error)

type EventBackfillRevertResponseStatus

type EventBackfillRevertResponseStatus string

The status of the backfill.

const (
	EventBackfillRevertResponseStatusPending       EventBackfillRevertResponseStatus = "pending"
	EventBackfillRevertResponseStatusReflected     EventBackfillRevertResponseStatus = "reflected"
	EventBackfillRevertResponseStatusPendingRevert EventBackfillRevertResponseStatus = "pending_revert"
	EventBackfillRevertResponseStatusReverted      EventBackfillRevertResponseStatus = "reverted"
)

func (EventBackfillRevertResponseStatus) IsKnown added in v0.24.0

type EventBackfillService

type EventBackfillService struct {
	Options []option.RequestOption
}

EventBackfillService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEventBackfillService method instead.

func NewEventBackfillService

func NewEventBackfillService(opts ...option.RequestOption) (r *EventBackfillService)

NewEventBackfillService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EventBackfillService) Close

func (r *EventBackfillService) Close(ctx context.Context, backfillID string, opts ...option.RequestOption) (res *EventBackfillCloseResponse, err error)

Closing a backfill makes the updated usage visible in Orb. Upon closing a backfill, Orb will asynchronously reflect the updated usage in invoice amounts and usage graphs. Once all of the updates are complete, the backfill's status will transition to `reflected`.

func (*EventBackfillService) Fetch

func (r *EventBackfillService) Fetch(ctx context.Context, backfillID string, opts ...option.RequestOption) (res *EventBackfillFetchResponse, err error)

This endpoint is used to fetch a backfill given an identifier.

func (*EventBackfillService) List

This endpoint returns a list of all backfills in a list format.

The list of backfills is ordered starting from the most recently created backfill. The response also includes [`pagination_metadata`](/api-reference/pagination), which lets the caller retrieve the next page of results if they exist. More information about pagination can be found in the [Pagination-metadata schema](pagination).

func (*EventBackfillService) ListAutoPaging

This endpoint returns a list of all backfills in a list format.

The list of backfills is ordered starting from the most recently created backfill. The response also includes [`pagination_metadata`](/api-reference/pagination), which lets the caller retrieve the next page of results if they exist. More information about pagination can be found in the [Pagination-metadata schema](pagination).

func (*EventBackfillService) New

Creating the backfill enables adding or replacing past events, even those that are older than the ingestion grace period. Performing a backfill in Orb involves 3 steps:

  1. Create the backfill, specifying its parameters.
  2. [Ingest](ingest) usage events, referencing the backfill (query parameter `backfill_id`).
  3. [Close](close-backfill) the backfill, propagating the update in past usage throughout Orb.

Changes from a backfill are not reflected until the backfill is closed, so you won’t need to worry about your customers seeing partially updated usage data. Backfills are also reversible, so you’ll be able to revert a backfill if you’ve made a mistake.

This endpoint will return a backfill object, which contains an `id`. That `id` can then be used as the `backfill_id` query parameter to the event ingestion endpoint to associate ingested events with this backfill. The effects (e.g. updated usage graphs) of this backfill will not take place until the backfill is closed.

If the `replace_existing_events` is `true`, existing events in the backfill's timeframe will be replaced with the newly ingested events associated with the backfill. If `false`, newly ingested events will be added to the existing events.

If a `customer_id` or `external_customer_id` is specified, the backfill will only affect events for that customer. If neither is specified, the backfill will affect all customers.

When `replace_existing_events` is `true`, this indicates that existing events in the timeframe should no longer be counted towards invoiced usage. In this scenario, the parameter `filter` can be optionally added which enables filtering using [computed properties](/extensibility/advanced-metrics#computed-properties). The expressiveness of computed properties allows you to deprecate existing events based on both a period of time and specific property values.

func (*EventBackfillService) Revert

func (r *EventBackfillService) Revert(ctx context.Context, backfillID string, opts ...option.RequestOption) (res *EventBackfillRevertResponse, err error)

Reverting a backfill undoes all the effects of closing the backfill. If the backfill is reflected, the status will transition to `pending_revert` while the effects of the backfill are undone. Once all effects are undone, the backfill will transition to `reverted`.

If a backfill is reverted before its closed, no usage will be updated as a result of the backfill and it will immediately transition to `reverted`.

type EventDeprecateResponse

type EventDeprecateResponse struct {
	// event_id of the deprecated event, if successfully updated
	Deprecated string                     `json:"deprecated,required"`
	JSON       eventDeprecateResponseJSON `json:"-"`
}

func (*EventDeprecateResponse) UnmarshalJSON

func (r *EventDeprecateResponse) UnmarshalJSON(data []byte) (err error)

type EventIngestParams

type EventIngestParams struct {
	Events param.Field[[]EventIngestParamsEvent] `json:"events,required"`
	// If this ingestion request is part of a backfill, this parameter ties the
	// ingested events to the backfill
	BackfillID param.Field[string] `query:"backfill_id"`
	// Flag to enable additional debug information in the endpoint response
	Debug param.Field[bool] `query:"debug"`
}

func (EventIngestParams) MarshalJSON

func (r EventIngestParams) MarshalJSON() (data []byte, err error)

func (EventIngestParams) URLQuery

func (r EventIngestParams) URLQuery() (v url.Values)

URLQuery serializes EventIngestParams's query parameters as `url.Values`.

type EventIngestParamsEvent

type EventIngestParamsEvent struct {
	// A name to meaningfully identify the action or event type.
	EventName param.Field[string] `json:"event_name,required"`
	// A unique value, generated by the client, that is used to de-duplicate events.
	// Exactly one event with a given idempotency key will be ingested, which allows
	// for safe request retries.
	IdempotencyKey param.Field[string] `json:"idempotency_key,required"`
	// A dictionary of custom properties. Values in this dictionary must be numeric,
	// boolean, or strings. Nested dictionaries are disallowed.
	Properties param.Field[map[string]interface{}] `json:"properties,required"`
	// An ISO 8601 format date with no timezone offset (i.e. UTC). This should
	// represent the time that usage was recorded, and is particularly important to
	// attribute usage to a given billing period.
	Timestamp param.Field[time.Time] `json:"timestamp,required" format:"date-time"`
	// The Orb Customer identifier
	CustomerID param.Field[string] `json:"customer_id"`
	// An alias for the Orb customer, whose mapping is specified when creating the
	// customer
	ExternalCustomerID param.Field[string] `json:"external_customer_id"`
}

func (EventIngestParamsEvent) MarshalJSON

func (r EventIngestParamsEvent) MarshalJSON() (data []byte, err error)

type EventIngestResponse

type EventIngestResponse struct {
	// Contains all failing validation events. In the case of a 200, this array will
	// always be empty. This field will always be present.
	ValidationFailed []EventIngestResponseValidationFailed `json:"validation_failed,required"`
	// Optional debug information (only present when debug=true is passed to the
	// endpoint). Contains ingested and duplicate event idempotency keys.
	Debug EventIngestResponseDebug `json:"debug,nullable"`
	JSON  eventIngestResponseJSON  `json:"-"`
}

func (*EventIngestResponse) UnmarshalJSON

func (r *EventIngestResponse) UnmarshalJSON(data []byte) (err error)

type EventIngestResponseDebug

type EventIngestResponseDebug struct {
	Duplicate []string                     `json:"duplicate,required"`
	Ingested  []string                     `json:"ingested,required"`
	JSON      eventIngestResponseDebugJSON `json:"-"`
}

Optional debug information (only present when debug=true is passed to the endpoint). Contains ingested and duplicate event idempotency keys.

func (*EventIngestResponseDebug) UnmarshalJSON

func (r *EventIngestResponseDebug) UnmarshalJSON(data []byte) (err error)

type EventIngestResponseValidationFailed

type EventIngestResponseValidationFailed struct {
	// The passed idempotency_key corresponding to the validation_errors
	IdempotencyKey string `json:"idempotency_key,required"`
	// An array of strings corresponding to validation failures for this
	// idempotency_key.
	ValidationErrors []string                                `json:"validation_errors,required"`
	JSON             eventIngestResponseValidationFailedJSON `json:"-"`
}

func (*EventIngestResponseValidationFailed) UnmarshalJSON

func (r *EventIngestResponseValidationFailed) UnmarshalJSON(data []byte) (err error)

type EventSearchParams

type EventSearchParams struct {
	// This is an explicit array of IDs to filter by. Note that an event's ID is the
	// idempotency_key that was originally used for ingestion, and this only supports
	// events that have not been amended. Values in this array will be treated case
	// sensitively.
	EventIDs param.Field[[]string] `json:"event_ids,required"`
	// The end of the timeframe, exclusive, in which to search events. If not
	// specified, the current time is used.
	TimeframeEnd param.Field[time.Time] `json:"timeframe_end" format:"date-time"`
	// The start of the timeframe, inclusive, in which to search events. If not
	// specified, the one week ago is used.
	TimeframeStart param.Field[time.Time] `json:"timeframe_start" format:"date-time"`
}

func (EventSearchParams) MarshalJSON

func (r EventSearchParams) MarshalJSON() (data []byte, err error)

type EventSearchResponse

type EventSearchResponse struct {
	Data []EventSearchResponseData `json:"data,required"`
	JSON eventSearchResponseJSON   `json:"-"`
}

func (*EventSearchResponse) UnmarshalJSON

func (r *EventSearchResponse) UnmarshalJSON(data []byte) (err error)

type EventSearchResponseData

type EventSearchResponseData struct {
	// A unique value, generated by the client, that is used to de-duplicate events.
	// Exactly one event with a given idempotency key will be ingested, which allows
	// for safe request retries.
	ID string `json:"id,required"`
	// The Orb Customer identifier
	CustomerID string `json:"customer_id,required,nullable"`
	// A boolean indicating whether the event is currently deprecated.
	Deprecated bool `json:"deprecated,required"`
	// A name to meaningfully identify the action or event type.
	EventName string `json:"event_name,required"`
	// An alias for the Orb customer, whose mapping is specified when creating the
	// customer
	ExternalCustomerID string `json:"external_customer_id,required,nullable"`
	// A dictionary of custom properties. Values in this dictionary must be numeric,
	// boolean, or strings. Nested dictionaries are disallowed.
	Properties map[string]interface{} `json:"properties,required"`
	// An ISO 8601 format date with no timezone offset (i.e. UTC). This should
	// represent the time that usage was recorded, and is particularly important to
	// attribute usage to a given billing period.
	Timestamp time.Time                   `json:"timestamp,required" format:"date-time"`
	JSON      eventSearchResponseDataJSON `json:"-"`
}

The [Event](/core-concepts#event) resource represents a usage event that has been created for a customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for a given billing period.

func (*EventSearchResponseData) UnmarshalJSON

func (r *EventSearchResponseData) UnmarshalJSON(data []byte) (err error)

type EventService

type EventService struct {
	Options   []option.RequestOption
	Backfills *EventBackfillService
	Volume    *EventVolumeService
}

EventService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEventService method instead.

func NewEventService

func NewEventService(opts ...option.RequestOption) (r *EventService)

NewEventService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EventService) Deprecate

func (r *EventService) Deprecate(ctx context.Context, eventID string, opts ...option.RequestOption) (res *EventDeprecateResponse, err error)

This endpoint is used to deprecate a single usage event with a given `event_id`. `event_id` refers to the `idempotency_key` passed in during ingestion.

This endpoint will mark the existing event as ignored. Note that if you attempt to re-ingest an event with the same `event_id` as a deprecated event, Orb will return an error.

This is a powerful and audit-safe mechanism to retroactively deprecate a single event in cases where you need to:

  • no longer bill for an event that was improperly reported
  • no longer bill for an event based on the result of an external API call (e.g. call to a payment gateway failed and the user should not be billed)

If you want to only change specific properties of an event, but keep the event as part of the billing calculation, use the [Amend event](amend-event) endpoint instead.

This API is always audit-safe. The process will still retain the deprecated event, though it will be ignored for billing calculations. For auditing and data fidelity purposes, Orb never overwrites or permanently deletes ingested usage data.

## Request validation

  • Orb does not accept an `idempotency_key` with the event in this endpoint, since this request is by design idempotent. On retryable errors, you should retry the request and assume the deprecation operation has not succeeded until receipt of a 2xx.
  • The event's `timestamp` must fall within the customer's current subscription's billing period, or within the grace period of the customer's current subscription's previous billing period. Orb does not allow deprecating events for billing periods that have already invoiced customers.
  • The `customer_id` or the `external_customer_id` of the original event ingestion request must identify a Customer resource within Orb, even if this event was ingested during the initial integration period. We do not allow deprecating events for customers not in the Orb system.
  • By default, no more than 100 events can be deprecated for a single customer in a 100 day period. For higher volume updates, consider using the [event backfill](create-backfill) endpoint.

func (*EventService) Ingest

func (r *EventService) Ingest(ctx context.Context, params EventIngestParams, opts ...option.RequestOption) (res *EventIngestResponse, err error)

Orb's event ingestion model and API is designed around two core principles:

  1. **Data fidelity**: The accuracy of your billing model depends on a robust foundation of events. Orb's API protocol encourages usage patterns that ensure that your data is consistently complete and correct.
  2. **Fast integration**: Sending events into Orb requires no tedious setup steps or explicit field schema for your event shape, making it instant to start streaming in usage in real-time.

## Event shape

Events are the starting point for all usage calculations in the system, and are simple at their core:

```ts

{
  // customer_id and external_customer_id are used to
  // attribute usage to a given Customer. Exactly one of these
  // should be specified in a given ingestion event.

  // `customer_id` is the Orb generated identifier for the Customer,
  // which is returned from the Create customer API call.
  customer_id: string,

  // external_customer_id is an alternate identifier which is associated
  // with a Customer at creation time. This is treated as an alias for
  // customer_id, and is usually set to an identifier native to your system.
  external_customer_id: string,

  // A string name identifying the event, usually a usage
  // action. By convention, this should not contain any whitespace.
  event_name: string,

  // An ISO 8601 format date with no timezone offset.
  // This should represent the time that usage occurred
  // and is important to attribute usage to a given
  // billing period. See the notes below on determining the timestamp.
  // e.g. 2020-12-09T16:09:53Z
  timestamp: string,

  // A unique value, generated by the client, that is
  // used to de-duplicate events.
  // Exactly one event with a given
  // idempotency key will be ingested, which allows for
  // safe request retries.
  idempotency_key: string

  // Optional custom metadata to attach to the event.
  // This might include a numeric value used for aggregation,
  // or a string/boolean value used for filtering.
  // The schema of this dictionary need not be pre-declared, and
  // properties can be added at any time.
  properties: {
    [key: string]?: string | number | boolean,
  },
}

```

## Required fields

Because events streamed to Orb are meant to be as flexible as possible, there are only a few required fields in every event.

  • We recommend that `idempotency_key` are unique strings that you generated with V4 UUIDs, but only require that they uniquely identify an event (i.e. don’t collide).
  • The `timestamp` field in the event body will be used to determine which billable period a given event falls into. For example, with a monthly billing cycle starting from the first of December, Orb will calculate metrics based on events that fall into the range `12-01 00:00:00 <= timestamp < 01-01 00:00:00`.

## Logging metadata

Orb allows tagging events with metadata using a flexible properties dictionary. Since Orb does not enforce a rigid schema for this field-set, key-value pairs can be added dynamically as your events evolve.

This dictionary can be helpful for a wide variety of use cases:

  • Numeric properties on events like `compute_time_ms` can later be inputs to our flexible query engine to determine usage.
  • Logging a region or cluster with each event can help you provide customers more granular visibility into their usage.
  • If you are using matrix pricing and matching a matrix price key with a property, you should ensure the value for that property is sent as a string.

We encourage logging this metadata with an eye towards future use cases to ensure full coverage for historical data. The datatype of the value in the properties dictionary is important for metric creation from an event source. Values that you wish to numerically aggregate should be of numeric type in the event.

## Determining event timestamp

For cases where usage is being reported in real time as it is occurring, timestamp should correspond to the time that usage occurred.

In cases where usage is reported in aggregate for a historical timeframe at a regular interval, we recommend setting the event `timestamp` to the midpoint of the interval. As an example, if you have an hourly reporter that sends data once an hour for the previous hour of usage, setting the `timestamp` to the half-hour mark will ensure that the usage is counted within the correct period.

Note that other time-related fields (e.g. time elapsed) can be added to the properties dictionary as necessary.

In cases where usage is reported in aggregate for a historical timeframe, the timestamp must be within the grace period set for your account. Events with `timestamp < current_time - grace_period` will not be accepted as a valid event, and will throw validation errors. Enforcing the grace period enables Orb to accurately map usage to the correct billing cycle and ensure that all usage is billed for in the corresponding billing period.

In general, Orb does not expect events with future dated timestamps. In cases where the timestamp is at least 24 hours ahead of the current time, the event will not be accepted as a valid event, and will throw validation errors.

## Event validation

Orb’s validation ensures that you recognize errors in your events as quickly as possible, and the API provides informative error messages to help you fix problems quickly.

We validate the following:

  • Exactly one of `customer_id` and `external_customer_id` should be specified.
  • If the `customer_id` is specified, the customer in Orb must exist.
  • If the `external_customer_id` is specified, the customer in Orb does not need to exist. Events will be attributed to any future customers with the `external_customer_id` on subscription creation.
  • `timestamp` must conform to ISO 8601 and represent a timestamp at most 1 hour in the future. This timestamp should be sent in UTC timezone (no timezone offset).

## Idempotency and retry semantics

Orb's idempotency guarantees allow you to implement safe retry logic in the event of network or machine failures, ensuring data fidelity. Each event in the request payload is associated with an idempotency key, and Orb guarantees that a single idempotency key will be successfully ingested at most once. Note that when Orb encounters events with duplicate idempotency keys and differing event bodies in a batch of events, the entire batch will be rejected.

  • Successful responses return a 200 HTTP status code. The response contains information about previously processed events.
  • Requests that return a `4xx` HTTP status code indicate a payload error and contain at least one event with a validation failure. An event with a validation failure can be re-sent to the ingestion endpoint (after the payload is fixed) with the original idempotency key since that key is not marked as processed.
  • Requests that return a `5xx` HTTP status code indicate a server-side failure. These requests should be retried in their entirety.

## API usage and limits

The ingestion API is designed made for real-time streaming ingestion and architected for high throughput. Even if events are later deemed unnecessary or filtered out, we encourage you to log them to Orb if they may be relevant to billing calculations in the future.

To take advantage of the real-time features of the Orb platform and avoid any chance of dropped events by producers, we recommend reporting events to Orb frequently. Optionally, events can also be briefly aggregated at the source, as this API accepts an array of event bodies.

Orb does not currently enforce a hard rate-limit for API usage or a maximum request payload size, but please give us a heads up if you’re changing either of these factors by an order of magnitude from initial setup.

## Testing in debug mode

The ingestion API supports a debug mode, which returns additional verbose output to indicate which event idempotency keys were newly ingested or duplicates from previous requests. To enable this mode, mark `debug=true` as a query parameter.

If `debug=true` is not specified, the response will only contain `validation_failed`. Orb will still honor the idempotency guarantees set [here](/events-and-metrics/event-ingestion#event-volume-and-concurrency) in all cases.

We strongly recommend that you only use debug mode as part of testing your initial Orb integration. Once you're ready to switch to production, disable debug mode to take advantage of improved performance and maximal throughput.

#### Example: ingestion response with `debug=true`

```json

{
  "debug": {
    "duplicate": [],
    "ingested": ["B7E83HDMfJPAunXW", "SJs5DQJ3TnwSqEZE", "8SivfDsNKwCeAXim"]
  },
  "validation_failed": []
}

```

#### Example: ingestion response with `debug=false`

```json

{
  "validation_failed": []
}

```

func (*EventService) Search

func (r *EventService) Search(ctx context.Context, body EventSearchParams, opts ...option.RequestOption) (res *EventSearchResponse, err error)

This endpoint returns a filtered set of events for an account in a [paginated list format](/api-reference/pagination).

Note that this is a `POST` endpoint rather than a `GET` endpoint because it employs a JSON body for search criteria rather than query parameters, allowing for a more flexible search syntax.

Note that a search criteria _must_ be specified. Currently, Orb supports the following criteria:

  • `event_ids`: This is an explicit array of IDs to filter by. Note that an event's ID is the `idempotency_key` that was originally used for ingestion.

By default, Orb will not throw a `404` if no events matched, Orb will return an empty array for `data` instead.

func (*EventService) Update

func (r *EventService) Update(ctx context.Context, eventID string, body EventUpdateParams, opts ...option.RequestOption) (res *EventUpdateResponse, err error)

This endpoint is used to amend a single usage event with a given `event_id`. `event_id` refers to the `idempotency_key` passed in during ingestion. The event will maintain its existing `event_id` after the amendment.

This endpoint will mark the existing event as ignored, and Orb will only use the new event passed in the body of this request as the source of truth for that `event_id`. Note that a single event can be amended any number of times, so the same event can be overwritten in subsequent calls to this endpoint. Only a single event with a given `event_id` will be considered the source of truth at any given time.

This is a powerful and audit-safe mechanism to retroactively update a single event in cases where you need to:

  • update an event with new metadata as you iterate on your pricing model
  • update an event based on the result of an external API call (e.g. call to a payment gateway succeeded or failed)

This amendment API is always audit-safe. The process will still retain the original event, though it will be ignored for billing calculations. For auditing and data fidelity purposes, Orb never overwrites or permanently deletes ingested usage data.

## Request validation

  • The `timestamp` of the new event must match the `timestamp` of the existing event already ingested. As with ingestion, all timestamps must be sent in ISO8601 format with UTC timezone offset.
  • The `customer_id` or `external_customer_id` of the new event must match the `customer_id` or `external_customer_id` of the existing event already ingested. Exactly one of `customer_id` and `external_customer_id` should be specified, and similar to ingestion, the ID must identify a Customer resource within Orb. Unlike ingestion, for event amendment, we strictly enforce that the Customer must be in the Orb system, even during the initial integration period. We do not allow updating the `Customer` an event is associated with.
  • Orb does not accept an `idempotency_key` with the event in this endpoint, since this request is by design idempotent. On retryable errors, you should retry the request and assume the amendment operation has not succeeded until receipt of a 2xx.
  • The event's `timestamp` must fall within the customer's current subscription's billing period, or within the grace period of the customer's current subscription's previous billing period.
  • By default, no more than 100 events can be amended for a single customer in a 100 day period. For higher volume updates, consider using the [event backfill](create-backfill) endpoint.

type EventUpdateParams

type EventUpdateParams struct {
	// A name to meaningfully identify the action or event type.
	EventName param.Field[string] `json:"event_name,required"`
	// A dictionary of custom properties. Values in this dictionary must be numeric,
	// boolean, or strings. Nested dictionaries are disallowed.
	Properties param.Field[map[string]interface{}] `json:"properties,required"`
	// An ISO 8601 format date with no timezone offset (i.e. UTC). This should
	// represent the time that usage was recorded, and is particularly important to
	// attribute usage to a given billing period.
	Timestamp param.Field[time.Time] `json:"timestamp,required" format:"date-time"`
	// The Orb Customer identifier
	CustomerID param.Field[string] `json:"customer_id"`
	// An alias for the Orb customer, whose mapping is specified when creating the
	// customer
	ExternalCustomerID param.Field[string] `json:"external_customer_id"`
}

func (EventUpdateParams) MarshalJSON

func (r EventUpdateParams) MarshalJSON() (data []byte, err error)

type EventUpdateResponse

type EventUpdateResponse struct {
	// event_id of the amended event, if successfully ingested
	Amended string                  `json:"amended,required"`
	JSON    eventUpdateResponseJSON `json:"-"`
}

func (*EventUpdateResponse) UnmarshalJSON

func (r *EventUpdateResponse) UnmarshalJSON(data []byte) (err error)

type EventVolumeListParams added in v0.72.0

type EventVolumeListParams struct {
	// The start of the timeframe, inclusive, in which to return event volume. All
	// datetime values are converted to UTC time. If the specified time isn't
	// hour-aligned, the response includes the event volume count for the hour the time
	// falls in.
	TimeframeStart param.Field[time.Time] `query:"timeframe_start,required" format:"date-time"`
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor param.Field[string] `query:"cursor"`
	// The number of items to fetch. Defaults to 20.
	Limit param.Field[int64] `query:"limit"`
	// The end of the timeframe, exclusive, in which to return event volume. If not
	// specified, the current time is used. All datetime values are converted to UTC
	// time.If the specified time isn't hour-aligned, the response includes the event
	// volumecount for the hour the time falls in.
	TimeframeEnd param.Field[time.Time] `query:"timeframe_end" format:"date-time"`
}

func (EventVolumeListParams) URLQuery added in v0.72.0

func (r EventVolumeListParams) URLQuery() (v url.Values)

URLQuery serializes EventVolumeListParams's query parameters as `url.Values`.

type EventVolumeService added in v0.72.0

type EventVolumeService struct {
	Options []option.RequestOption
}

EventVolumeService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEventVolumeService method instead.

func NewEventVolumeService added in v0.72.0

func NewEventVolumeService(opts ...option.RequestOption) (r *EventVolumeService)

NewEventVolumeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EventVolumeService) List added in v0.72.0

This endpoint returns the event volume for an account in a [paginated list format](/api-reference/pagination).

The event volume is aggregated by the hour and the [timestamp](/api-reference/event/ingest-events) field is used to determine which hour an event is associated with. Note, this means that late-arriving events increment the volume count for the hour window the timestamp is in, not the latest hour window.

Each item in the response contains the count of events aggregated by the hour where the start and end time are hour-aligned and in UTC. When a specific timestamp is passed in for either start or end time, the response includes the hours the timestamp falls in.

type EventVolumes added in v0.72.0

type EventVolumes struct {
	Data []EventVolumesData `json:"data,required"`
	JSON eventVolumesJSON   `json:"-"`
}

func (*EventVolumes) UnmarshalJSON added in v0.72.0

func (r *EventVolumes) UnmarshalJSON(data []byte) (err error)

type EventVolumesData added in v0.72.0

type EventVolumesData struct {
	// The number of events ingested with a timestamp between the timeframe
	Count          int64                `json:"count,required"`
	TimeframeEnd   time.Time            `json:"timeframe_end,required" format:"date-time"`
	TimeframeStart time.Time            `json:"timeframe_start,required" format:"date-time"`
	JSON           eventVolumesDataJSON `json:"-"`
}

An EventVolume contains the event volume ingested in an hourly window. The timestamp used for the aggregation is the `timestamp` datetime field on events.

func (*EventVolumesData) UnmarshalJSON added in v0.72.0

func (r *EventVolumesData) UnmarshalJSON(data []byte) (err error)

type ExpirationChangeLedgerEntry added in v0.121.0

type ExpirationChangeLedgerEntry struct {
	ID                   string                                 `json:"id,required"`
	Amount               float64                                `json:"amount,required"`
	CreatedAt            time.Time                              `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlock                          `json:"credit_block,required"`
	Currency             string                                 `json:"currency,required"`
	Customer             shared.CustomerMinified                `json:"customer,required"`
	Description          string                                 `json:"description,required,nullable"`
	EndingBalance        float64                                `json:"ending_balance,required"`
	EntryStatus          ExpirationChangeLedgerEntryEntryStatus `json:"entry_status,required"`
	EntryType            ExpirationChangeLedgerEntryEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                                  `json:"ledger_sequence_number,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata           map[string]string               `json:"metadata,required"`
	NewBlockExpiryDate time.Time                       `json:"new_block_expiry_date,required,nullable" format:"date-time"`
	StartingBalance    float64                         `json:"starting_balance,required"`
	JSON               expirationChangeLedgerEntryJSON `json:"-"`
}

func (*ExpirationChangeLedgerEntry) UnmarshalJSON added in v0.121.0

func (r *ExpirationChangeLedgerEntry) UnmarshalJSON(data []byte) (err error)

type ExpirationChangeLedgerEntryEntryStatus added in v0.121.0

type ExpirationChangeLedgerEntryEntryStatus string
const (
	ExpirationChangeLedgerEntryEntryStatusCommitted ExpirationChangeLedgerEntryEntryStatus = "committed"
	ExpirationChangeLedgerEntryEntryStatusPending   ExpirationChangeLedgerEntryEntryStatus = "pending"
)

func (ExpirationChangeLedgerEntryEntryStatus) IsKnown added in v0.121.0

type ExpirationChangeLedgerEntryEntryType added in v0.121.0

type ExpirationChangeLedgerEntryEntryType string
const (
	ExpirationChangeLedgerEntryEntryTypeExpirationChange ExpirationChangeLedgerEntryEntryType = "expiration_change"
)

func (ExpirationChangeLedgerEntryEntryType) IsKnown added in v0.121.0

type FixedFeeQuantityScheduleEntry added in v0.121.0

type FixedFeeQuantityScheduleEntry = shared.FixedFeeQuantityScheduleEntry

This is an alias to an internal type.

type FixedFeeQuantityTransition added in v0.121.0

type FixedFeeQuantityTransition = shared.FixedFeeQuantityTransition

This is an alias to an internal type.

type IncrementLedgerEntry added in v0.121.0

type IncrementLedgerEntry struct {
	ID                   string                          `json:"id,required"`
	Amount               float64                         `json:"amount,required"`
	CreatedAt            time.Time                       `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlock                   `json:"credit_block,required"`
	Currency             string                          `json:"currency,required"`
	Customer             shared.CustomerMinified         `json:"customer,required"`
	Description          string                          `json:"description,required,nullable"`
	EndingBalance        float64                         `json:"ending_balance,required"`
	EntryStatus          IncrementLedgerEntryEntryStatus `json:"entry_status,required"`
	EntryType            IncrementLedgerEntryEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                           `json:"ledger_sequence_number,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata        map[string]string `json:"metadata,required"`
	StartingBalance float64           `json:"starting_balance,required"`
	// If the increment resulted in invoice creation, the list of created invoices
	CreatedInvoices []shared.Invoice         `json:"created_invoices,nullable"`
	JSON            incrementLedgerEntryJSON `json:"-"`
}

func (*IncrementLedgerEntry) UnmarshalJSON added in v0.121.0

func (r *IncrementLedgerEntry) UnmarshalJSON(data []byte) (err error)

type IncrementLedgerEntryEntryStatus added in v0.121.0

type IncrementLedgerEntryEntryStatus string
const (
	IncrementLedgerEntryEntryStatusCommitted IncrementLedgerEntryEntryStatus = "committed"
	IncrementLedgerEntryEntryStatusPending   IncrementLedgerEntryEntryStatus = "pending"
)

func (IncrementLedgerEntryEntryStatus) IsKnown added in v0.121.0

type IncrementLedgerEntryEntryType added in v0.121.0

type IncrementLedgerEntryEntryType string
const (
	IncrementLedgerEntryEntryTypeIncrement IncrementLedgerEntryEntryType = "increment"
)

func (IncrementLedgerEntryEntryType) IsKnown added in v0.121.0

func (r IncrementLedgerEntryEntryType) IsKnown() bool

type Invoice

type Invoice = shared.Invoice

An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as the result of an action, such as a cancellation.

This is an alias to an internal type.

type InvoiceAutoCollection

type InvoiceAutoCollection = shared.InvoiceAutoCollection

This is an alias to an internal type.

type InvoiceCreditNote

type InvoiceCreditNote = shared.InvoiceCreditNote

This is an alias to an internal type.

type InvoiceCustomerBalanceTransaction

type InvoiceCustomerBalanceTransaction = shared.InvoiceCustomerBalanceTransaction

This is an alias to an internal type.

type InvoiceCustomerBalanceTransactionsAction

type InvoiceCustomerBalanceTransactionsAction = shared.InvoiceCustomerBalanceTransactionsAction

This is an alias to an internal type.

type InvoiceCustomerBalanceTransactionsType

type InvoiceCustomerBalanceTransactionsType = shared.InvoiceCustomerBalanceTransactionsType

This is an alias to an internal type.

type InvoiceFetchUpcomingParams

type InvoiceFetchUpcomingParams struct {
	SubscriptionID param.Field[string] `query:"subscription_id,required"`
}

func (InvoiceFetchUpcomingParams) URLQuery

func (r InvoiceFetchUpcomingParams) URLQuery() (v url.Values)

URLQuery serializes InvoiceFetchUpcomingParams's query parameters as `url.Values`.

type InvoiceFetchUpcomingResponse

type InvoiceFetchUpcomingResponse struct {
	ID string `json:"id,required"`
	// This is the final amount required to be charged to the customer and reflects the
	// application of the customer balance to the `total` of the invoice.
	AmountDue      string                                     `json:"amount_due,required"`
	AutoCollection InvoiceFetchUpcomingResponseAutoCollection `json:"auto_collection,required"`
	BillingAddress shared.Address                             `json:"billing_address,required,nullable"`
	// The creation time of the resource in Orb.
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// A list of credit notes associated with the invoice
	CreditNotes []InvoiceFetchUpcomingResponseCreditNote `json:"credit_notes,required"`
	// An ISO 4217 currency string or `credits`
	Currency                    string                                                   `json:"currency,required"`
	Customer                    shared.CustomerMinified                                  `json:"customer,required"`
	CustomerBalanceTransactions []InvoiceFetchUpcomingResponseCustomerBalanceTransaction `json:"customer_balance_transactions,required"`
	// Tax IDs are commonly required to be displayed on customer invoices, which are
	// added to the headers of invoices.
	//
	// ### Supported Tax ID Countries and Types
	//
	// | Country              | Type         | Description                                                                                             |
	// | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
	// | Andorra              | `ad_nrt`     | Andorran NRT Number                                                                                     |
	// | Argentina            | `ar_cuit`    | Argentinian Tax ID Number                                                                               |
	// | Australia            | `au_abn`     | Australian Business Number (AU ABN)                                                                     |
	// | Australia            | `au_arn`     | Australian Taxation Office Reference Number                                                             |
	// | Austria              | `eu_vat`     | European VAT Number                                                                                     |
	// | Bahrain              | `bh_vat`     | Bahraini VAT Number                                                                                     |
	// | Belgium              | `eu_vat`     | European VAT Number                                                                                     |
	// | Bolivia              | `bo_tin`     | Bolivian Tax ID                                                                                         |
	// | Brazil               | `br_cnpj`    | Brazilian CNPJ Number                                                                                   |
	// | Brazil               | `br_cpf`     | Brazilian CPF Number                                                                                    |
	// | Bulgaria             | `bg_uic`     | Bulgaria Unified Identification Code                                                                    |
	// | Bulgaria             | `eu_vat`     | European VAT Number                                                                                     |
	// | Canada               | `ca_bn`      | Canadian BN                                                                                             |
	// | Canada               | `ca_gst_hst` | Canadian GST/HST Number                                                                                 |
	// | Canada               | `ca_pst_bc`  | Canadian PST Number (British Columbia)                                                                  |
	// | Canada               | `ca_pst_mb`  | Canadian PST Number (Manitoba)                                                                          |
	// | Canada               | `ca_pst_sk`  | Canadian PST Number (Saskatchewan)                                                                      |
	// | Canada               | `ca_qst`     | Canadian QST Number (Québec)                                                                            |
	// | Chile                | `cl_tin`     | Chilean TIN                                                                                             |
	// | China                | `cn_tin`     | Chinese Tax ID                                                                                          |
	// | Colombia             | `co_nit`     | Colombian NIT Number                                                                                    |
	// | Costa Rica           | `cr_tin`     | Costa Rican Tax ID                                                                                      |
	// | Croatia              | `eu_vat`     | European VAT Number                                                                                     |
	// | Cyprus               | `eu_vat`     | European VAT Number                                                                                     |
	// | Czech Republic       | `eu_vat`     | European VAT Number                                                                                     |
	// | Denmark              | `eu_vat`     | European VAT Number                                                                                     |
	// | Dominican Republic   | `do_rcn`     | Dominican RCN Number                                                                                    |
	// | Ecuador              | `ec_ruc`     | Ecuadorian RUC Number                                                                                   |
	// | Egypt                | `eg_tin`     | Egyptian Tax Identification Number                                                                      |
	// | El Salvador          | `sv_nit`     | El Salvadorian NIT Number                                                                               |
	// | Estonia              | `eu_vat`     | European VAT Number                                                                                     |
	// | EU                   | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme                                                  |
	// | Finland              | `eu_vat`     | European VAT Number                                                                                     |
	// | France               | `eu_vat`     | European VAT Number                                                                                     |
	// | Georgia              | `ge_vat`     | Georgian VAT                                                                                            |
	// | Germany              | `eu_vat`     | European VAT Number                                                                                     |
	// | Greece               | `eu_vat`     | European VAT Number                                                                                     |
	// | Hong Kong            | `hk_br`      | Hong Kong BR Number                                                                                     |
	// | Hungary              | `eu_vat`     | European VAT Number                                                                                     |
	// | Hungary              | `hu_tin`     | Hungary Tax Number (adószám)                                                                            |
	// | Iceland              | `is_vat`     | Icelandic VAT                                                                                           |
	// | India                | `in_gst`     | Indian GST Number                                                                                       |
	// | Indonesia            | `id_npwp`    | Indonesian NPWP Number                                                                                  |
	// | Ireland              | `eu_vat`     | European VAT Number                                                                                     |
	// | Israel               | `il_vat`     | Israel VAT                                                                                              |
	// | Italy                | `eu_vat`     | European VAT Number                                                                                     |
	// | Japan                | `jp_cn`      | Japanese Corporate Number (_Hōjin Bangō_)                                                               |
	// | Japan                | `jp_rn`      | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
	// | Japan                | `jp_trn`     | Japanese Tax Registration Number (_Tōroku Bangō_)                                                       |
	// | Kazakhstan           | `kz_bin`     | Kazakhstani Business Identification Number                                                              |
	// | Kenya                | `ke_pin`     | Kenya Revenue Authority Personal Identification Number                                                  |
	// | Latvia               | `eu_vat`     | European VAT Number                                                                                     |
	// | Liechtenstein        | `li_uid`     | Liechtensteinian UID Number                                                                             |
	// | Lithuania            | `eu_vat`     | European VAT Number                                                                                     |
	// | Luxembourg           | `eu_vat`     | European VAT Number                                                                                     |
	// | Malaysia             | `my_frp`     | Malaysian FRP Number                                                                                    |
	// | Malaysia             | `my_itn`     | Malaysian ITN                                                                                           |
	// | Malaysia             | `my_sst`     | Malaysian SST Number                                                                                    |
	// | Malta                | `eu_vat `    | European VAT Number                                                                                     |
	// | Mexico               | `mx_rfc`     | Mexican RFC Number                                                                                      |
	// | Netherlands          | `eu_vat`     | European VAT Number                                                                                     |
	// | New Zealand          | `nz_gst`     | New Zealand GST Number                                                                                  |
	// | Nigeria              | `ng_tin`     | Nigerian Tax Identification Number                                                                      |
	// | Norway               | `no_vat`     | Norwegian VAT Number                                                                                    |
	// | Norway               | `no_voec`    | Norwegian VAT on e-commerce Number                                                                      |
	// | Oman                 | `om_vat`     | Omani VAT Number                                                                                        |
	// | Peru                 | `pe_ruc`     | Peruvian RUC Number                                                                                     |
	// | Philippines          | `ph_tin `    | Philippines Tax Identification Number                                                                   |
	// | Poland               | `eu_vat`     | European VAT Number                                                                                     |
	// | Portugal             | `eu_vat`     | European VAT Number                                                                                     |
	// | Romania              | `eu_vat`     | European VAT Number                                                                                     |
	// | Romania              | `ro_tin`     | Romanian Tax ID Number                                                                                  |
	// | Russia               | `ru_inn`     | Russian INN                                                                                             |
	// | Russia               | `ru_kpp`     | Russian KPP                                                                                             |
	// | Saudi Arabia         | `sa_vat`     | Saudi Arabia VAT                                                                                        |
	// | Serbia               | `rs_pib`     | Serbian PIB Number                                                                                      |
	// | Singapore            | `sg_gst`     | Singaporean GST                                                                                         |
	// | Singapore            | `sg_uen`     | Singaporean UEN                                                                                         |
	// | Slovakia             | `eu_vat`     | European VAT Number                                                                                     |
	// | Slovenia             | `eu_vat`     | European VAT Number                                                                                     |
	// | Slovenia             | `si_tin`     | Slovenia Tax Number (davčna številka)                                                                   |
	// | South Africa         | `za_vat`     | South African VAT Number                                                                                |
	// | South Korea          | `kr_brn`     | Korean BRN                                                                                              |
	// | Spain                | `es_cif`     | Spanish NIF Number (previously Spanish CIF Number)                                                      |
	// | Spain                | `eu_vat`     | European VAT Number                                                                                     |
	// | Sweden               | `eu_vat`     | European VAT Number                                                                                     |
	// | Switzerland          | `ch_vat`     | Switzerland VAT Number                                                                                  |
	// | Taiwan               | `tw_vat`     | Taiwanese VAT                                                                                           |
	// | Thailand             | `th_vat`     | Thai VAT                                                                                                |
	// | Turkey               | `tr_tin`     | Turkish Tax Identification Number                                                                       |
	// | Ukraine              | `ua_vat`     | Ukrainian VAT                                                                                           |
	// | United Arab Emirates | `ae_trn`     | United Arab Emirates TRN                                                                                |
	// | United Kingdom       | `eu_vat`     | Northern Ireland VAT Number                                                                             |
	// | United Kingdom       | `gb_vat`     | United Kingdom VAT Number                                                                               |
	// | United States        | `us_ein`     | United States EIN                                                                                       |
	// | Uruguay              | `uy_ruc`     | Uruguayan RUC Number                                                                                    |
	// | Venezuela            | `ve_rif`     | Venezuelan RIF Number                                                                                   |
	// | Vietnam              | `vn_tin`     | Vietnamese Tax ID Number                                                                                |
	CustomerTaxID shared.CustomerTaxID `json:"customer_tax_id,required,nullable"`
	// This field is deprecated in favor of `discounts`. If a `discounts` list is
	// provided, the first discount in the list will be returned. If the list is empty,
	// `None` will be returned.
	//
	// Deprecated: deprecated
	Discount  interface{}                   `json:"discount,required"`
	Discounts []shared.InvoiceLevelDiscount `json:"discounts,required"`
	// When the invoice payment is due. The due date is null if the invoice is not yet
	// finalized.
	DueDate time.Time `json:"due_date,required,nullable" format:"date-time"`
	// If the invoice has a status of `draft`, this will be the time that the invoice
	// will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is
	// true, the invoice will automatically begin issuing at this time.
	EligibleToIssueAt time.Time `json:"eligible_to_issue_at,required,nullable" format:"date-time"`
	// A URL for the customer-facing invoice portal. This URL expires 30 days after the
	// invoice's due date, or 60 days after being re-generated through the UI.
	HostedInvoiceURL string `json:"hosted_invoice_url,required,nullable"`
	// Automatically generated invoice number to help track and reconcile invoices.
	// Invoice numbers have a prefix such as `RFOBWG`. These can be sequential per
	// account or customer.
	InvoiceNumber string `json:"invoice_number,required"`
	// The link to download the PDF representation of the `Invoice`.
	InvoicePdf    string                                    `json:"invoice_pdf,required,nullable"`
	InvoiceSource InvoiceFetchUpcomingResponseInvoiceSource `json:"invoice_source,required"`
	// If the invoice failed to issue, this will be the last time it failed to issue
	// (even if it is now in a different state.)
	IssueFailedAt time.Time `json:"issue_failed_at,required,nullable" format:"date-time"`
	// If the invoice has been issued, this will be the time it transitioned to
	// `issued` (even if it is now in a different state.)
	IssuedAt time.Time `json:"issued_at,required,nullable" format:"date-time"`
	// The breakdown of prices in this invoice.
	LineItems     []InvoiceFetchUpcomingResponseLineItem `json:"line_items,required"`
	Maximum       shared.Maximum                         `json:"maximum,required,nullable"`
	MaximumAmount string                                 `json:"maximum_amount,required,nullable"`
	// Free-form text which is available on the invoice PDF and the Orb invoice portal.
	Memo string `json:"memo,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata      map[string]string `json:"metadata,required"`
	Minimum       shared.Minimum    `json:"minimum,required,nullable"`
	MinimumAmount string            `json:"minimum_amount,required,nullable"`
	// If the invoice has a status of `paid`, this gives a timestamp when the invoice
	// was paid.
	PaidAt time.Time `json:"paid_at,required,nullable" format:"date-time"`
	// A list of payment attempts associated with the invoice
	PaymentAttempts []InvoiceFetchUpcomingResponsePaymentAttempt `json:"payment_attempts,required"`
	// If payment was attempted on this invoice but failed, this will be the time of
	// the most recent attempt.
	PaymentFailedAt time.Time `json:"payment_failed_at,required,nullable" format:"date-time"`
	// If payment was attempted on this invoice, this will be the start time of the
	// most recent attempt. This field is especially useful for delayed-notification
	// payment mechanisms (like bank transfers), where payment can take 3 days or more.
	PaymentStartedAt time.Time `json:"payment_started_at,required,nullable" format:"date-time"`
	// If the invoice is in draft, this timestamp will reflect when the invoice is
	// scheduled to be issued.
	ScheduledIssueAt time.Time                          `json:"scheduled_issue_at,required,nullable" format:"date-time"`
	ShippingAddress  shared.Address                     `json:"shipping_address,required,nullable"`
	Status           InvoiceFetchUpcomingResponseStatus `json:"status,required"`
	Subscription     shared.SubscriptionMinified        `json:"subscription,required,nullable"`
	// The total before any discounts and minimums are applied.
	Subtotal string `json:"subtotal,required"`
	// If the invoice failed to sync, this will be the last time an external invoicing
	// provider sync was attempted. This field will always be `null` for invoices using
	// Orb Invoicing.
	SyncFailedAt time.Time `json:"sync_failed_at,required,nullable" format:"date-time"`
	// The scheduled date of the invoice
	TargetDate time.Time `json:"target_date,required" format:"date-time"`
	// The total after any minimums and discounts have been applied.
	Total string `json:"total,required"`
	// If the invoice has a status of `void`, this gives a timestamp when the invoice
	// was voided.
	VoidedAt time.Time `json:"voided_at,required,nullable" format:"date-time"`
	// This is true if the invoice will be automatically issued in the future, and
	// false otherwise.
	WillAutoIssue bool                             `json:"will_auto_issue,required"`
	JSON          invoiceFetchUpcomingResponseJSON `json:"-"`
}

func (*InvoiceFetchUpcomingResponse) UnmarshalJSON

func (r *InvoiceFetchUpcomingResponse) UnmarshalJSON(data []byte) (err error)

type InvoiceFetchUpcomingResponseAutoCollection

type InvoiceFetchUpcomingResponseAutoCollection struct {
	// True only if auto-collection is enabled for this invoice.
	Enabled bool `json:"enabled,required,nullable"`
	// If the invoice is scheduled for auto-collection, this field will reflect when
	// the next attempt will occur. If dunning has been exhausted, or auto-collection
	// is not enabled for this invoice, this field will be `null`.
	NextAttemptAt time.Time `json:"next_attempt_at,required,nullable" format:"date-time"`
	// Number of auto-collection payment attempts.
	NumAttempts int64 `json:"num_attempts,required,nullable"`
	// If Orb has ever attempted payment auto-collection for this invoice, this field
	// will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
	// this can be used to tell whether the invoice is currently in dunning (that is,
	// `previously_attempted_at` is non-null, and `next_attempt_time` is non-null), or
	// if dunning has been exhausted (`previously_attempted_at` is non-null, but
	// `next_attempt_time` is null).
	PreviouslyAttemptedAt time.Time                                      `json:"previously_attempted_at,required,nullable" format:"date-time"`
	JSON                  invoiceFetchUpcomingResponseAutoCollectionJSON `json:"-"`
}

func (*InvoiceFetchUpcomingResponseAutoCollection) UnmarshalJSON

func (r *InvoiceFetchUpcomingResponseAutoCollection) UnmarshalJSON(data []byte) (err error)

type InvoiceFetchUpcomingResponseCreditNote

type InvoiceFetchUpcomingResponseCreditNote struct {
	ID               string `json:"id,required"`
	CreditNoteNumber string `json:"credit_note_number,required"`
	// An optional memo supplied on the credit note.
	Memo   string `json:"memo,required,nullable"`
	Reason string `json:"reason,required"`
	Total  string `json:"total,required"`
	Type   string `json:"type,required"`
	// If the credit note has a status of `void`, this gives a timestamp when the
	// credit note was voided.
	VoidedAt time.Time                                  `json:"voided_at,required,nullable" format:"date-time"`
	JSON     invoiceFetchUpcomingResponseCreditNoteJSON `json:"-"`
}

func (*InvoiceFetchUpcomingResponseCreditNote) UnmarshalJSON

func (r *InvoiceFetchUpcomingResponseCreditNote) UnmarshalJSON(data []byte) (err error)

type InvoiceFetchUpcomingResponseCustomerBalanceTransaction

type InvoiceFetchUpcomingResponseCustomerBalanceTransaction struct {
	// A unique id for this transaction.
	ID     string                                                        `json:"id,required"`
	Action InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction `json:"action,required"`
	// The value of the amount changed in the transaction.
	Amount string `json:"amount,required"`
	// The creation time of this transaction.
	CreatedAt  time.Time             `json:"created_at,required" format:"date-time"`
	CreditNote shared.CreditNoteTiny `json:"credit_note,required,nullable"`
	// An optional description provided for manual customer balance adjustments.
	Description string `json:"description,required,nullable"`
	// The new value of the customer's balance prior to the transaction, in the
	// customer's currency.
	EndingBalance string             `json:"ending_balance,required"`
	Invoice       shared.InvoiceTiny `json:"invoice,required,nullable"`
	// The original value of the customer's balance prior to the transaction, in the
	// customer's currency.
	StartingBalance string                                                      `json:"starting_balance,required"`
	Type            InvoiceFetchUpcomingResponseCustomerBalanceTransactionsType `json:"type,required"`
	JSON            invoiceFetchUpcomingResponseCustomerBalanceTransactionJSON  `json:"-"`
}

func (*InvoiceFetchUpcomingResponseCustomerBalanceTransaction) UnmarshalJSON

func (r *InvoiceFetchUpcomingResponseCustomerBalanceTransaction) UnmarshalJSON(data []byte) (err error)

type InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction

type InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction string
const (
	InvoiceFetchUpcomingResponseCustomerBalanceTransactionsActionAppliedToInvoice     InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction = "applied_to_invoice"
	InvoiceFetchUpcomingResponseCustomerBalanceTransactionsActionManualAdjustment     InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction = "manual_adjustment"
	InvoiceFetchUpcomingResponseCustomerBalanceTransactionsActionProratedRefund       InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction = "prorated_refund"
	InvoiceFetchUpcomingResponseCustomerBalanceTransactionsActionRevertProratedRefund InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction = "revert_prorated_refund"
	InvoiceFetchUpcomingResponseCustomerBalanceTransactionsActionReturnFromVoiding    InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction = "return_from_voiding"
	InvoiceFetchUpcomingResponseCustomerBalanceTransactionsActionCreditNoteApplied    InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction = "credit_note_applied"
	InvoiceFetchUpcomingResponseCustomerBalanceTransactionsActionCreditNoteVoided     InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction = "credit_note_voided"
	InvoiceFetchUpcomingResponseCustomerBalanceTransactionsActionOverpaymentRefund    InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction = "overpayment_refund"
	InvoiceFetchUpcomingResponseCustomerBalanceTransactionsActionExternalPayment      InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction = "external_payment"
)

func (InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction) IsKnown added in v0.24.0

type InvoiceFetchUpcomingResponseCustomerBalanceTransactionsType

type InvoiceFetchUpcomingResponseCustomerBalanceTransactionsType string
const (
	InvoiceFetchUpcomingResponseCustomerBalanceTransactionsTypeIncrement InvoiceFetchUpcomingResponseCustomerBalanceTransactionsType = "increment"
	InvoiceFetchUpcomingResponseCustomerBalanceTransactionsTypeDecrement InvoiceFetchUpcomingResponseCustomerBalanceTransactionsType = "decrement"
)

func (InvoiceFetchUpcomingResponseCustomerBalanceTransactionsType) IsKnown added in v0.24.0

type InvoiceFetchUpcomingResponseInvoiceSource added in v0.25.0

type InvoiceFetchUpcomingResponseInvoiceSource string
const (
	InvoiceFetchUpcomingResponseInvoiceSourceSubscription InvoiceFetchUpcomingResponseInvoiceSource = "subscription"
	InvoiceFetchUpcomingResponseInvoiceSourcePartial      InvoiceFetchUpcomingResponseInvoiceSource = "partial"
	InvoiceFetchUpcomingResponseInvoiceSourceOneOff       InvoiceFetchUpcomingResponseInvoiceSource = "one_off"
)

func (InvoiceFetchUpcomingResponseInvoiceSource) IsKnown added in v0.25.0

type InvoiceFetchUpcomingResponseLineItem

type InvoiceFetchUpcomingResponseLineItem struct {
	// A unique ID for this line item.
	ID string `json:"id,required"`
	// The line amount after any adjustments and before overage conversion, credits and
	// partial invoicing.
	AdjustedSubtotal string `json:"adjusted_subtotal,required"`
	// All adjustments applied to the line item in the order they were applied based on
	// invoice calculations (ie. usage discounts -> amount discounts -> percentage
	// discounts -> minimums -> maximums).
	Adjustments []InvoiceFetchUpcomingResponseLineItemsAdjustment `json:"adjustments,required"`
	// The final amount for a line item after all adjustments and pre paid credits have
	// been applied.
	Amount string `json:"amount,required"`
	// The number of prepaid credits applied.
	CreditsApplied string          `json:"credits_applied,required"`
	Discount       shared.Discount `json:"discount,required,nullable"`
	// The end date of the range of time applied for this line item's price.
	EndDate time.Time `json:"end_date,required" format:"date-time"`
	// An additional filter that was used to calculate the usage for this line item.
	Filter string `json:"filter,required,nullable"`
	// [DEPRECATED] For configured prices that are split by a grouping key, this will
	// be populated with the key and a value. The `amount` and `subtotal` will be the
	// values for this particular grouping.
	Grouping string `json:"grouping,required,nullable"`
	// This field is deprecated in favor of `adjustments`.
	//
	// Deprecated: deprecated
	Maximum shared.Maximum `json:"maximum,required,nullable"`
	// This field is deprecated in favor of `adjustments`.
	//
	// Deprecated: deprecated
	MaximumAmount string `json:"maximum_amount,required,nullable"`
	// This field is deprecated in favor of `adjustments`.
	//
	// Deprecated: deprecated
	Minimum shared.Minimum `json:"minimum,required,nullable"`
	// This field is deprecated in favor of `adjustments`.
	//
	// Deprecated: deprecated
	MinimumAmount string `json:"minimum_amount,required,nullable"`
	// The name of the price associated with this line item.
	Name string `json:"name,required"`
	// Any amount applied from a partial invoice
	PartiallyInvoicedAmount string `json:"partially_invoiced_amount,required"`
	// The Price resource represents a price that can be billed on a subscription,
	// resulting in a charge on an invoice in the form of an invoice line item. Prices
	// take a quantity and determine an amount to bill.
	//
	// Orb supports a few different pricing models out of the box. Each of these models
	// is serialized differently in a given Price object. The model_type field
	// determines the key for the configuration object that is present.
	//
	// For more on the types of prices, see
	// [the core concepts documentation](/core-concepts#plan-and-price)
	Price shared.Price `json:"price,required"`
	// Either the fixed fee quantity or the usage during the service period.
	Quantity float64 `json:"quantity,required"`
	// The start date of the range of time applied for this line item's price.
	StartDate time.Time `json:"start_date,required" format:"date-time"`
	// For complex pricing structures, the line item can be broken down further in
	// `sub_line_items`.
	SubLineItems []InvoiceFetchUpcomingResponseLineItemsSubLineItem `json:"sub_line_items,required"`
	// The line amount before before any adjustments.
	Subtotal string `json:"subtotal,required"`
	// An array of tax rates and their incurred tax amounts. Empty if no tax
	// integration is configured.
	TaxAmounts []shared.TaxAmount `json:"tax_amounts,required"`
	// A list of customer ids that were used to calculate the usage for this line item.
	UsageCustomerIDs []string                                 `json:"usage_customer_ids,required,nullable"`
	JSON             invoiceFetchUpcomingResponseLineItemJSON `json:"-"`
}

func (*InvoiceFetchUpcomingResponseLineItem) UnmarshalJSON

func (r *InvoiceFetchUpcomingResponseLineItem) UnmarshalJSON(data []byte) (err error)

type InvoiceFetchUpcomingResponseLineItemsAdjustment added in v0.91.0

type InvoiceFetchUpcomingResponseLineItemsAdjustment struct {
	ID             string                                                         `json:"id,required"`
	AdjustmentType InvoiceFetchUpcomingResponseLineItemsAdjustmentsAdjustmentType `json:"adjustment_type,required"`
	// The value applied by an adjustment.
	Amount string `json:"amount,required"`
	// This field can have the runtime type of [[]string].
	AppliesToPriceIDs interface{} `json:"applies_to_price_ids,required"`
	// This field can have the runtime type of [[]shared.TransformPriceFilter].
	Filters interface{} `json:"filters,required"`
	// True for adjustments that apply to an entire invocice, false for adjustments
	// that apply to only one price.
	IsInvoiceLevel bool `json:"is_invoice_level,required"`
	// The reason for the adjustment.
	Reason string `json:"reason,required,nullable"`
	// The amount by which to discount the prices this adjustment applies to in a given
	// billing period.
	AmountDiscount string `json:"amount_discount"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID string `json:"item_id"`
	// The maximum amount to charge in a given billing period for the prices this
	// adjustment applies to.
	MaximumAmount string `json:"maximum_amount"`
	// The minimum amount to charge in a given billing period for the prices this
	// adjustment applies to.
	MinimumAmount string `json:"minimum_amount"`
	// The percentage (as a value between 0 and 1) by which to discount the price
	// intervals this adjustment applies to in a given billing period.
	PercentageDiscount float64 `json:"percentage_discount"`
	// The number of usage units by which to discount the price this adjustment applies
	// to in a given billing period.
	UsageDiscount float64                                             `json:"usage_discount"`
	JSON          invoiceFetchUpcomingResponseLineItemsAdjustmentJSON `json:"-"`
	// contains filtered or unexported fields
}

func (InvoiceFetchUpcomingResponseLineItemsAdjustment) AsUnion added in v0.91.0

AsUnion returns a InvoiceFetchUpcomingResponseLineItemsAdjustmentsUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are shared.MonetaryUsageDiscountAdjustment, shared.MonetaryAmountDiscountAdjustment, shared.MonetaryPercentageDiscountAdjustment, shared.MonetaryMinimumAdjustment, shared.MonetaryMaximumAdjustment.

func (*InvoiceFetchUpcomingResponseLineItemsAdjustment) UnmarshalJSON added in v0.91.0

func (r *InvoiceFetchUpcomingResponseLineItemsAdjustment) UnmarshalJSON(data []byte) (err error)

type InvoiceFetchUpcomingResponseLineItemsAdjustmentsAdjustmentType added in v0.91.0

type InvoiceFetchUpcomingResponseLineItemsAdjustmentsAdjustmentType string
const (
	InvoiceFetchUpcomingResponseLineItemsAdjustmentsAdjustmentTypeUsageDiscount      InvoiceFetchUpcomingResponseLineItemsAdjustmentsAdjustmentType = "usage_discount"
	InvoiceFetchUpcomingResponseLineItemsAdjustmentsAdjustmentTypeAmountDiscount     InvoiceFetchUpcomingResponseLineItemsAdjustmentsAdjustmentType = "amount_discount"
	InvoiceFetchUpcomingResponseLineItemsAdjustmentsAdjustmentTypePercentageDiscount InvoiceFetchUpcomingResponseLineItemsAdjustmentsAdjustmentType = "percentage_discount"
	InvoiceFetchUpcomingResponseLineItemsAdjustmentsAdjustmentTypeMinimum            InvoiceFetchUpcomingResponseLineItemsAdjustmentsAdjustmentType = "minimum"
	InvoiceFetchUpcomingResponseLineItemsAdjustmentsAdjustmentTypeMaximum            InvoiceFetchUpcomingResponseLineItemsAdjustmentsAdjustmentType = "maximum"
)

func (InvoiceFetchUpcomingResponseLineItemsAdjustmentsAdjustmentType) IsKnown added in v0.91.0

type InvoiceFetchUpcomingResponseLineItemsAdjustmentsUnion added in v0.91.0

type InvoiceFetchUpcomingResponseLineItemsAdjustmentsUnion interface {
	ImplementsInvoiceFetchUpcomingResponseLineItemsAdjustment()
}

Union satisfied by shared.MonetaryUsageDiscountAdjustment, shared.MonetaryAmountDiscountAdjustment, shared.MonetaryPercentageDiscountAdjustment, shared.MonetaryMinimumAdjustment or shared.MonetaryMaximumAdjustment.

type InvoiceFetchUpcomingResponseLineItemsSubLineItem

type InvoiceFetchUpcomingResponseLineItemsSubLineItem struct {
	// The total amount for this sub line item.
	Amount       string                                                `json:"amount,required"`
	Grouping     shared.SubLineItemGrouping                            `json:"grouping,required,nullable"`
	Name         string                                                `json:"name,required"`
	Quantity     float64                                               `json:"quantity,required"`
	Type         InvoiceFetchUpcomingResponseLineItemsSubLineItemsType `json:"type,required"`
	MatrixConfig shared.SubLineItemMatrixConfig                        `json:"matrix_config"`
	TierConfig   shared.TierConfig                                     `json:"tier_config"`
	JSON         invoiceFetchUpcomingResponseLineItemsSubLineItemJSON  `json:"-"`
	// contains filtered or unexported fields
}

func (InvoiceFetchUpcomingResponseLineItemsSubLineItem) AsUnion added in v0.25.0

AsUnion returns a InvoiceFetchUpcomingResponseLineItemsSubLineItemsUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are shared.MatrixSubLineItem, shared.TierSubLineItem, shared.OtherSubLineItem.

func (*InvoiceFetchUpcomingResponseLineItemsSubLineItem) UnmarshalJSON added in v0.25.0

func (r *InvoiceFetchUpcomingResponseLineItemsSubLineItem) UnmarshalJSON(data []byte) (err error)

type InvoiceFetchUpcomingResponseLineItemsSubLineItemsType added in v0.25.0

type InvoiceFetchUpcomingResponseLineItemsSubLineItemsType string
const (
	InvoiceFetchUpcomingResponseLineItemsSubLineItemsTypeMatrix InvoiceFetchUpcomingResponseLineItemsSubLineItemsType = "matrix"
	InvoiceFetchUpcomingResponseLineItemsSubLineItemsTypeTier   InvoiceFetchUpcomingResponseLineItemsSubLineItemsType = "tier"
	InvoiceFetchUpcomingResponseLineItemsSubLineItemsTypeNull   InvoiceFetchUpcomingResponseLineItemsSubLineItemsType = "'null'"
)

func (InvoiceFetchUpcomingResponseLineItemsSubLineItemsType) IsKnown added in v0.25.0

type InvoiceFetchUpcomingResponseLineItemsSubLineItemsUnion added in v0.25.0

type InvoiceFetchUpcomingResponseLineItemsSubLineItemsUnion interface {
	ImplementsInvoiceFetchUpcomingResponseLineItemsSubLineItem()
}

Union satisfied by shared.MatrixSubLineItem, shared.TierSubLineItem or shared.OtherSubLineItem.

type InvoiceFetchUpcomingResponsePaymentAttempt added in v0.82.0

type InvoiceFetchUpcomingResponsePaymentAttempt struct {
	// The ID of the payment attempt.
	ID string `json:"id,required"`
	// The amount of the payment attempt.
	Amount string `json:"amount,required"`
	// The time at which the payment attempt was created.
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// The payment provider that attempted to collect the payment.
	PaymentProvider InvoiceFetchUpcomingResponsePaymentAttemptsPaymentProvider `json:"payment_provider,required,nullable"`
	// The ID of the payment attempt in the payment provider.
	PaymentProviderID string `json:"payment_provider_id,required,nullable"`
	// Whether the payment attempt succeeded.
	Succeeded bool                                           `json:"succeeded,required"`
	JSON      invoiceFetchUpcomingResponsePaymentAttemptJSON `json:"-"`
}

func (*InvoiceFetchUpcomingResponsePaymentAttempt) UnmarshalJSON added in v0.82.0

func (r *InvoiceFetchUpcomingResponsePaymentAttempt) UnmarshalJSON(data []byte) (err error)

type InvoiceFetchUpcomingResponsePaymentAttemptsPaymentProvider added in v0.82.0

type InvoiceFetchUpcomingResponsePaymentAttemptsPaymentProvider string

The payment provider that attempted to collect the payment.

const (
	InvoiceFetchUpcomingResponsePaymentAttemptsPaymentProviderStripe InvoiceFetchUpcomingResponsePaymentAttemptsPaymentProvider = "stripe"
)

func (InvoiceFetchUpcomingResponsePaymentAttemptsPaymentProvider) IsKnown added in v0.82.0

type InvoiceFetchUpcomingResponseStatus

type InvoiceFetchUpcomingResponseStatus string
const (
	InvoiceFetchUpcomingResponseStatusIssued InvoiceFetchUpcomingResponseStatus = "issued"
	InvoiceFetchUpcomingResponseStatusPaid   InvoiceFetchUpcomingResponseStatus = "paid"
	InvoiceFetchUpcomingResponseStatusSynced InvoiceFetchUpcomingResponseStatus = "synced"
	InvoiceFetchUpcomingResponseStatusVoid   InvoiceFetchUpcomingResponseStatus = "void"
	InvoiceFetchUpcomingResponseStatusDraft  InvoiceFetchUpcomingResponseStatus = "draft"
)

func (InvoiceFetchUpcomingResponseStatus) IsKnown added in v0.24.0

type InvoiceInvoiceSource added in v0.25.0

type InvoiceInvoiceSource = shared.InvoiceInvoiceSource

This is an alias to an internal type.

type InvoiceIssueParams added in v0.71.0

type InvoiceIssueParams struct {
	// If true, the invoice will be issued synchronously. If false, the invoice will be
	// issued asynchronously. The synchronous option is only available for invoices
	// that have no usage fees. If the invoice is configured to sync to an external
	// provider, a successful response from this endpoint guarantees the invoice is
	// present in the provider.
	Synchronous param.Field[bool] `json:"synchronous"`
}

func (InvoiceIssueParams) MarshalJSON added in v0.71.0

func (r InvoiceIssueParams) MarshalJSON() (data []byte, err error)

type InvoiceLevelDiscount added in v0.67.0

type InvoiceLevelDiscount = shared.InvoiceLevelDiscount

This is an alias to an internal type.

type InvoiceLevelDiscountDiscountType added in v0.67.0

type InvoiceLevelDiscountDiscountType = shared.InvoiceLevelDiscountDiscountType

This is an alias to an internal type.

type InvoiceLineItem

type InvoiceLineItem = shared.InvoiceLineItem

This is an alias to an internal type.

type InvoiceLineItemNewParams

type InvoiceLineItemNewParams struct {
	// The total amount in the invoice's currency to add to the line item.
	Amount param.Field[string] `json:"amount,required"`
	// A date string to specify the line item's end date in the customer's timezone.
	EndDate param.Field[time.Time] `json:"end_date,required" format:"date"`
	// The id of the Invoice to add this line item.
	InvoiceID param.Field[string] `json:"invoice_id,required"`
	// The item name associated with this line item. If an item with the same name
	// exists in Orb, that item will be associated with the line item.
	Name param.Field[string] `json:"name,required"`
	// The number of units on the line item
	Quantity param.Field[float64] `json:"quantity,required"`
	// A date string to specify the line item's start date in the customer's timezone.
	StartDate param.Field[time.Time] `json:"start_date,required" format:"date"`
}

func (InvoiceLineItemNewParams) MarshalJSON

func (r InvoiceLineItemNewParams) MarshalJSON() (data []byte, err error)

type InvoiceLineItemNewResponse

type InvoiceLineItemNewResponse struct {
	// A unique ID for this line item.
	ID string `json:"id,required"`
	// The line amount after any adjustments and before overage conversion, credits and
	// partial invoicing.
	AdjustedSubtotal string `json:"adjusted_subtotal,required"`
	// All adjustments applied to the line item in the order they were applied based on
	// invoice calculations (ie. usage discounts -> amount discounts -> percentage
	// discounts -> minimums -> maximums).
	Adjustments []InvoiceLineItemNewResponseAdjustment `json:"adjustments,required"`
	// The final amount for a line item after all adjustments and pre paid credits have
	// been applied.
	Amount string `json:"amount,required"`
	// The number of prepaid credits applied.
	CreditsApplied string          `json:"credits_applied,required"`
	Discount       shared.Discount `json:"discount,required,nullable"`
	// The end date of the range of time applied for this line item's price.
	EndDate time.Time `json:"end_date,required" format:"date-time"`
	// An additional filter that was used to calculate the usage for this line item.
	Filter string `json:"filter,required,nullable"`
	// [DEPRECATED] For configured prices that are split by a grouping key, this will
	// be populated with the key and a value. The `amount` and `subtotal` will be the
	// values for this particular grouping.
	Grouping string `json:"grouping,required,nullable"`
	// This field is deprecated in favor of `adjustments`.
	//
	// Deprecated: deprecated
	Maximum shared.Maximum `json:"maximum,required,nullable"`
	// This field is deprecated in favor of `adjustments`.
	//
	// Deprecated: deprecated
	MaximumAmount string `json:"maximum_amount,required,nullable"`
	// This field is deprecated in favor of `adjustments`.
	//
	// Deprecated: deprecated
	Minimum shared.Minimum `json:"minimum,required,nullable"`
	// This field is deprecated in favor of `adjustments`.
	//
	// Deprecated: deprecated
	MinimumAmount string `json:"minimum_amount,required,nullable"`
	// The name of the price associated with this line item.
	Name string `json:"name,required"`
	// Any amount applied from a partial invoice
	PartiallyInvoicedAmount string `json:"partially_invoiced_amount,required"`
	// The Price resource represents a price that can be billed on a subscription,
	// resulting in a charge on an invoice in the form of an invoice line item. Prices
	// take a quantity and determine an amount to bill.
	//
	// Orb supports a few different pricing models out of the box. Each of these models
	// is serialized differently in a given Price object. The model_type field
	// determines the key for the configuration object that is present.
	//
	// For more on the types of prices, see
	// [the core concepts documentation](/core-concepts#plan-and-price)
	Price shared.Price `json:"price,required"`
	// Either the fixed fee quantity or the usage during the service period.
	Quantity float64 `json:"quantity,required"`
	// The start date of the range of time applied for this line item's price.
	StartDate time.Time `json:"start_date,required" format:"date-time"`
	// For complex pricing structures, the line item can be broken down further in
	// `sub_line_items`.
	SubLineItems []InvoiceLineItemNewResponseSubLineItem `json:"sub_line_items,required"`
	// The line amount before before any adjustments.
	Subtotal string `json:"subtotal,required"`
	// An array of tax rates and their incurred tax amounts. Empty if no tax
	// integration is configured.
	TaxAmounts []shared.TaxAmount `json:"tax_amounts,required"`
	// A list of customer ids that were used to calculate the usage for this line item.
	UsageCustomerIDs []string                       `json:"usage_customer_ids,required,nullable"`
	JSON             invoiceLineItemNewResponseJSON `json:"-"`
}

func (*InvoiceLineItemNewResponse) UnmarshalJSON

func (r *InvoiceLineItemNewResponse) UnmarshalJSON(data []byte) (err error)

type InvoiceLineItemNewResponseAdjustment added in v0.91.0

type InvoiceLineItemNewResponseAdjustment struct {
	ID             string                                              `json:"id,required"`
	AdjustmentType InvoiceLineItemNewResponseAdjustmentsAdjustmentType `json:"adjustment_type,required"`
	// The value applied by an adjustment.
	Amount string `json:"amount,required"`
	// This field can have the runtime type of [[]string].
	AppliesToPriceIDs interface{} `json:"applies_to_price_ids,required"`
	// This field can have the runtime type of [[]shared.TransformPriceFilter].
	Filters interface{} `json:"filters,required"`
	// True for adjustments that apply to an entire invocice, false for adjustments
	// that apply to only one price.
	IsInvoiceLevel bool `json:"is_invoice_level,required"`
	// The reason for the adjustment.
	Reason string `json:"reason,required,nullable"`
	// The amount by which to discount the prices this adjustment applies to in a given
	// billing period.
	AmountDiscount string `json:"amount_discount"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID string `json:"item_id"`
	// The maximum amount to charge in a given billing period for the prices this
	// adjustment applies to.
	MaximumAmount string `json:"maximum_amount"`
	// The minimum amount to charge in a given billing period for the prices this
	// adjustment applies to.
	MinimumAmount string `json:"minimum_amount"`
	// The percentage (as a value between 0 and 1) by which to discount the price
	// intervals this adjustment applies to in a given billing period.
	PercentageDiscount float64 `json:"percentage_discount"`
	// The number of usage units by which to discount the price this adjustment applies
	// to in a given billing period.
	UsageDiscount float64                                  `json:"usage_discount"`
	JSON          invoiceLineItemNewResponseAdjustmentJSON `json:"-"`
	// contains filtered or unexported fields
}

func (InvoiceLineItemNewResponseAdjustment) AsUnion added in v0.91.0

AsUnion returns a InvoiceLineItemNewResponseAdjustmentsUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are shared.MonetaryUsageDiscountAdjustment, shared.MonetaryAmountDiscountAdjustment, shared.MonetaryPercentageDiscountAdjustment, shared.MonetaryMinimumAdjustment, shared.MonetaryMaximumAdjustment.

func (*InvoiceLineItemNewResponseAdjustment) UnmarshalJSON added in v0.91.0

func (r *InvoiceLineItemNewResponseAdjustment) UnmarshalJSON(data []byte) (err error)

type InvoiceLineItemNewResponseAdjustmentsAdjustmentType added in v0.91.0

type InvoiceLineItemNewResponseAdjustmentsAdjustmentType string
const (
	InvoiceLineItemNewResponseAdjustmentsAdjustmentTypeUsageDiscount      InvoiceLineItemNewResponseAdjustmentsAdjustmentType = "usage_discount"
	InvoiceLineItemNewResponseAdjustmentsAdjustmentTypeAmountDiscount     InvoiceLineItemNewResponseAdjustmentsAdjustmentType = "amount_discount"
	InvoiceLineItemNewResponseAdjustmentsAdjustmentTypePercentageDiscount InvoiceLineItemNewResponseAdjustmentsAdjustmentType = "percentage_discount"
	InvoiceLineItemNewResponseAdjustmentsAdjustmentTypeMinimum            InvoiceLineItemNewResponseAdjustmentsAdjustmentType = "minimum"
	InvoiceLineItemNewResponseAdjustmentsAdjustmentTypeMaximum            InvoiceLineItemNewResponseAdjustmentsAdjustmentType = "maximum"
)

func (InvoiceLineItemNewResponseAdjustmentsAdjustmentType) IsKnown added in v0.91.0

type InvoiceLineItemNewResponseAdjustmentsUnion added in v0.91.0

type InvoiceLineItemNewResponseAdjustmentsUnion interface {
	ImplementsInvoiceLineItemNewResponseAdjustment()
}

Union satisfied by shared.MonetaryUsageDiscountAdjustment, shared.MonetaryAmountDiscountAdjustment, shared.MonetaryPercentageDiscountAdjustment, shared.MonetaryMinimumAdjustment or shared.MonetaryMaximumAdjustment.

type InvoiceLineItemNewResponseSubLineItem

type InvoiceLineItemNewResponseSubLineItem struct {
	// The total amount for this sub line item.
	Amount       string                                     `json:"amount,required"`
	Grouping     shared.SubLineItemGrouping                 `json:"grouping,required,nullable"`
	Name         string                                     `json:"name,required"`
	Quantity     float64                                    `json:"quantity,required"`
	Type         InvoiceLineItemNewResponseSubLineItemsType `json:"type,required"`
	MatrixConfig shared.SubLineItemMatrixConfig             `json:"matrix_config"`
	TierConfig   shared.TierConfig                          `json:"tier_config"`
	JSON         invoiceLineItemNewResponseSubLineItemJSON  `json:"-"`
	// contains filtered or unexported fields
}

func (InvoiceLineItemNewResponseSubLineItem) AsUnion added in v0.25.0

AsUnion returns a InvoiceLineItemNewResponseSubLineItemsUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are shared.MatrixSubLineItem, shared.TierSubLineItem, shared.OtherSubLineItem.

func (*InvoiceLineItemNewResponseSubLineItem) UnmarshalJSON added in v0.25.0

func (r *InvoiceLineItemNewResponseSubLineItem) UnmarshalJSON(data []byte) (err error)

type InvoiceLineItemNewResponseSubLineItemsType added in v0.25.0

type InvoiceLineItemNewResponseSubLineItemsType string
const (
	InvoiceLineItemNewResponseSubLineItemsTypeMatrix InvoiceLineItemNewResponseSubLineItemsType = "matrix"
	InvoiceLineItemNewResponseSubLineItemsTypeTier   InvoiceLineItemNewResponseSubLineItemsType = "tier"
	InvoiceLineItemNewResponseSubLineItemsTypeNull   InvoiceLineItemNewResponseSubLineItemsType = "'null'"
)

func (InvoiceLineItemNewResponseSubLineItemsType) IsKnown added in v0.25.0

type InvoiceLineItemNewResponseSubLineItemsUnion added in v0.25.0

type InvoiceLineItemNewResponseSubLineItemsUnion interface {
	ImplementsInvoiceLineItemNewResponseSubLineItem()
}

Union satisfied by shared.MatrixSubLineItem, shared.TierSubLineItem or shared.OtherSubLineItem.

type InvoiceLineItemService

type InvoiceLineItemService struct {
	Options []option.RequestOption
}

InvoiceLineItemService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInvoiceLineItemService method instead.

func NewInvoiceLineItemService

func NewInvoiceLineItemService(opts ...option.RequestOption) (r *InvoiceLineItemService)

NewInvoiceLineItemService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*InvoiceLineItemService) New

This creates a one-off fixed fee invoice line item on an Invoice. This can only be done for invoices that are in a `draft` status.

type InvoiceLineItemsAdjustment added in v0.91.0

type InvoiceLineItemsAdjustment = shared.InvoiceLineItemsAdjustment

This is an alias to an internal type.

type InvoiceLineItemsAdjustmentsAdjustmentType added in v0.91.0

type InvoiceLineItemsAdjustmentsAdjustmentType = shared.InvoiceLineItemsAdjustmentsAdjustmentType

This is an alias to an internal type.

type InvoiceLineItemsSubLineItem

type InvoiceLineItemsSubLineItem = shared.InvoiceLineItemsSubLineItem

This is an alias to an internal type.

type InvoiceLineItemsSubLineItemsType added in v0.25.0

type InvoiceLineItemsSubLineItemsType = shared.InvoiceLineItemsSubLineItemsType

This is an alias to an internal type.

type InvoiceListParams

type InvoiceListParams struct {
	Amount   param.Field[string] `query:"amount"`
	AmountGt param.Field[string] `query:"amount[gt]"`
	AmountLt param.Field[string] `query:"amount[lt]"`
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor     param.Field[string]                    `query:"cursor"`
	CustomerID param.Field[string]                    `query:"customer_id"`
	DateType   param.Field[InvoiceListParamsDateType] `query:"date_type"`
	DueDate    param.Field[time.Time]                 `query:"due_date" format:"date"`
	// Filters invoices by their due dates within a specific time range in the past.
	// Specify the range as a number followed by 'd' (days) or 'm' (months). For
	// example, '7d' filters invoices due in the last 7 days, and '2m' filters those
	// due in the last 2 months.
	DueDateWindow      param.Field[string]    `query:"due_date_window"`
	DueDateGt          param.Field[time.Time] `query:"due_date[gt]" format:"date"`
	DueDateLt          param.Field[time.Time] `query:"due_date[lt]" format:"date"`
	ExternalCustomerID param.Field[string]    `query:"external_customer_id"`
	InvoiceDateGt      param.Field[time.Time] `query:"invoice_date[gt]" format:"date-time"`
	InvoiceDateGte     param.Field[time.Time] `query:"invoice_date[gte]" format:"date-time"`
	InvoiceDateLt      param.Field[time.Time] `query:"invoice_date[lt]" format:"date-time"`
	InvoiceDateLte     param.Field[time.Time] `query:"invoice_date[lte]" format:"date-time"`
	IsRecurring        param.Field[bool]      `query:"is_recurring"`
	// The number of items to fetch. Defaults to 20.
	Limit          param.Field[int64]                     `query:"limit"`
	Status         param.Field[[]InvoiceListParamsStatus] `query:"status"`
	SubscriptionID param.Field[string]                    `query:"subscription_id"`
}

func (InvoiceListParams) URLQuery

func (r InvoiceListParams) URLQuery() (v url.Values)

URLQuery serializes InvoiceListParams's query parameters as `url.Values`.

type InvoiceListParamsDateType

type InvoiceListParamsDateType string
const (
	InvoiceListParamsDateTypeDueDate     InvoiceListParamsDateType = "due_date"
	InvoiceListParamsDateTypeInvoiceDate InvoiceListParamsDateType = "invoice_date"
)

func (InvoiceListParamsDateType) IsKnown added in v0.24.0

func (r InvoiceListParamsDateType) IsKnown() bool

type InvoiceListParamsStatus

type InvoiceListParamsStatus string
const (
	InvoiceListParamsStatusDraft  InvoiceListParamsStatus = "draft"
	InvoiceListParamsStatusIssued InvoiceListParamsStatus = "issued"
	InvoiceListParamsStatusPaid   InvoiceListParamsStatus = "paid"
	InvoiceListParamsStatusSynced InvoiceListParamsStatus = "synced"
	InvoiceListParamsStatusVoid   InvoiceListParamsStatus = "void"
)

func (InvoiceListParamsStatus) IsKnown added in v0.24.0

func (r InvoiceListParamsStatus) IsKnown() bool

type InvoiceMarkPaidParams

type InvoiceMarkPaidParams struct {
	// A date string to specify the date of the payment.
	PaymentReceivedDate param.Field[time.Time] `json:"payment_received_date,required" format:"date"`
	// An optional external ID to associate with the payment.
	ExternalID param.Field[string] `json:"external_id"`
	// An optional note to associate with the payment.
	Notes param.Field[string] `json:"notes"`
}

func (InvoiceMarkPaidParams) MarshalJSON

func (r InvoiceMarkPaidParams) MarshalJSON() (data []byte, err error)

type InvoiceNewParams

type InvoiceNewParams struct {
	// An ISO 4217 currency string. Must be the same as the customer's currency if it
	// is set.
	Currency param.Field[string] `json:"currency,required"`
	// Optional invoice date to set. Must be in the past, if not set, `invoice_date` is
	// set to the current time in the customer's timezone.
	InvoiceDate param.Field[time.Time]                  `json:"invoice_date,required" format:"date-time"`
	LineItems   param.Field[[]InvoiceNewParamsLineItem] `json:"line_items,required"`
	// Determines the difference between the invoice issue date for subscription
	// invoices as the date that they are due. A value of '0' here represents that the
	// invoice is due on issue, whereas a value of 30 represents that the customer has
	// 30 days to pay the invoice.
	NetTerms param.Field[int64] `json:"net_terms,required"`
	// The id of the `Customer` to create this invoice for. One of `customer_id` and
	// `external_customer_id` are required.
	CustomerID param.Field[string] `json:"customer_id"`
	// An optional discount to attach to the invoice.
	Discount param.Field[shared.DiscountUnionParam] `json:"discount"`
	// The `external_customer_id` of the `Customer` to create this invoice for. One of
	// `customer_id` and `external_customer_id` are required.
	ExternalCustomerID param.Field[string] `json:"external_customer_id"`
	// An optional memo to attach to the invoice.
	Memo param.Field[string] `json:"memo"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// When true, this invoice will be submitted for issuance upon creation. When
	// false, the resulting invoice will require manual review to issue. Defaulted to
	// false.
	WillAutoIssue param.Field[bool] `json:"will_auto_issue"`
}

func (InvoiceNewParams) MarshalJSON

func (r InvoiceNewParams) MarshalJSON() (data []byte, err error)

type InvoiceNewParamsLineItem

type InvoiceNewParamsLineItem struct {
	// A date string to specify the line item's end date in the customer's timezone.
	EndDate   param.Field[time.Time]                          `json:"end_date,required" format:"date"`
	ItemID    param.Field[string]                             `json:"item_id,required"`
	ModelType param.Field[InvoiceNewParamsLineItemsModelType] `json:"model_type,required"`
	// The name of the line item.
	Name param.Field[string] `json:"name,required"`
	// The number of units on the line item
	Quantity param.Field[float64] `json:"quantity,required"`
	// A date string to specify the line item's start date in the customer's timezone.
	StartDate  param.Field[time.Time]              `json:"start_date,required" format:"date"`
	UnitConfig param.Field[shared.UnitConfigParam] `json:"unit_config,required"`
}

func (InvoiceNewParamsLineItem) MarshalJSON

func (r InvoiceNewParamsLineItem) MarshalJSON() (data []byte, err error)

type InvoiceNewParamsLineItemsModelType

type InvoiceNewParamsLineItemsModelType string
const (
	InvoiceNewParamsLineItemsModelTypeUnit InvoiceNewParamsLineItemsModelType = "unit"
)

func (InvoiceNewParamsLineItemsModelType) IsKnown added in v0.24.0

type InvoicePaymentAttempt added in v0.82.0

type InvoicePaymentAttempt = shared.InvoicePaymentAttempt

This is an alias to an internal type.

type InvoicePaymentAttemptsPaymentProvider added in v0.82.0

type InvoicePaymentAttemptsPaymentProvider = shared.InvoicePaymentAttemptsPaymentProvider

The payment provider that attempted to collect the payment.

This is an alias to an internal type.

type InvoiceService

type InvoiceService struct {
	Options []option.RequestOption
}

InvoiceService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInvoiceService method instead.

func NewInvoiceService

func NewInvoiceService(opts ...option.RequestOption) (r *InvoiceService)

NewInvoiceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*InvoiceService) Fetch

func (r *InvoiceService) Fetch(ctx context.Context, invoiceID string, opts ...option.RequestOption) (res *shared.Invoice, err error)

This endpoint is used to fetch an [`Invoice`](/core-concepts#invoice) given an identifier.

func (*InvoiceService) FetchUpcoming

This endpoint can be used to fetch the upcoming [invoice](/core-concepts#invoice) for the current billing period given a subscription.

func (*InvoiceService) Issue

func (r *InvoiceService) Issue(ctx context.Context, invoiceID string, body InvoiceIssueParams, opts ...option.RequestOption) (res *shared.Invoice, err error)

This endpoint allows an eligible invoice to be issued manually. This is only possible with invoices where status is `draft`, `will_auto_issue` is false, and an `eligible_to_issue_at` is a time in the past. Issuing an invoice could possibly trigger side effects, some of which could be customer-visible (e.g. sending emails, auto-collecting payment, syncing the invoice to external providers, etc).

func (*InvoiceService) List

This endpoint returns a list of all [`Invoice`](/core-concepts#invoice)s for an account in a list format.

The list of invoices is ordered starting from the most recently issued invoice date. The response also includes [`pagination_metadata`](/api-reference/pagination), which lets the caller retrieve the next page of results if they exist.

By default, this only returns invoices that are `issued`, `paid`, or `synced`.

When fetching any `draft` invoices, this returns the last-computed invoice values for each draft invoice, which may not always be up-to-date since Orb regularly refreshes invoices asynchronously.

func (*InvoiceService) ListAutoPaging

This endpoint returns a list of all [`Invoice`](/core-concepts#invoice)s for an account in a list format.

The list of invoices is ordered starting from the most recently issued invoice date. The response also includes [`pagination_metadata`](/api-reference/pagination), which lets the caller retrieve the next page of results if they exist.

By default, this only returns invoices that are `issued`, `paid`, or `synced`.

When fetching any `draft` invoices, this returns the last-computed invoice values for each draft invoice, which may not always be up-to-date since Orb regularly refreshes invoices asynchronously.

func (*InvoiceService) MarkPaid

func (r *InvoiceService) MarkPaid(ctx context.Context, invoiceID string, body InvoiceMarkPaidParams, opts ...option.RequestOption) (res *shared.Invoice, err error)

This endpoint allows an invoice's status to be set the `paid` status. This can only be done to invoices that are in the `issued` status.

func (*InvoiceService) New

func (r *InvoiceService) New(ctx context.Context, body InvoiceNewParams, opts ...option.RequestOption) (res *shared.Invoice, err error)

This endpoint is used to create a one-off invoice for a customer.

func (*InvoiceService) Pay added in v0.82.0

func (r *InvoiceService) Pay(ctx context.Context, invoiceID string, opts ...option.RequestOption) (res *shared.Invoice, err error)

This endpoint collects payment for an invoice using the customer's default payment method. This action can only be taken on invoices with status "issued".

func (*InvoiceService) Update added in v0.42.0

func (r *InvoiceService) Update(ctx context.Context, invoiceID string, body InvoiceUpdateParams, opts ...option.RequestOption) (res *shared.Invoice, err error)

This endpoint allows you to update the `metadata` property on an invoice. If you pass null for the metadata value, it will clear any existing metadata for that invoice.

`metadata` can be modified regardless of invoice state.

func (*InvoiceService) Void

func (r *InvoiceService) Void(ctx context.Context, invoiceID string, opts ...option.RequestOption) (res *shared.Invoice, err error)

This endpoint allows an invoice's status to be set the `void` status. This can only be done to invoices that are in the `issued` status.

If the associated invoice has used the customer balance to change the amount due, the customer balance operation will be reverted. For example, if the invoice used $10 of customer balance, that amount will be added back to the customer balance upon voiding.

If the invoice was used to purchase a credit block, but the invoice is not yet paid, the credit block will be voided. If the invoice was created due to a top-up, the top-up will be disabled.

type InvoiceStatus

type InvoiceStatus = shared.InvoiceStatus

This is an alias to an internal type.

type InvoiceTiny added in v0.121.0

type InvoiceTiny = shared.InvoiceTiny

This is an alias to an internal type.

type InvoiceUpdateParams added in v0.42.0

type InvoiceUpdateParams struct {
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (InvoiceUpdateParams) MarshalJSON added in v0.42.0

func (r InvoiceUpdateParams) MarshalJSON() (data []byte, err error)

type Item added in v0.3.0

type Item struct {
	ID                  string                   `json:"id,required"`
	CreatedAt           time.Time                `json:"created_at,required" format:"date-time"`
	ExternalConnections []ItemExternalConnection `json:"external_connections,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata map[string]string `json:"metadata,required"`
	Name     string            `json:"name,required"`
	JSON     itemJSON          `json:"-"`
}

The Item resource represents a sellable product or good. Items are associated with all line items, billable metrics, and prices and are used for defining external sync behavior for invoices and tax calculation purposes.

func (*Item) UnmarshalJSON added in v0.3.0

func (r *Item) UnmarshalJSON(data []byte) (err error)

type ItemExternalConnection added in v0.3.0

type ItemExternalConnection struct {
	ExternalConnectionName ItemExternalConnectionsExternalConnectionName `json:"external_connection_name,required"`
	ExternalEntityID       string                                        `json:"external_entity_id,required"`
	JSON                   itemExternalConnectionJSON                    `json:"-"`
}

func (*ItemExternalConnection) UnmarshalJSON added in v0.3.0

func (r *ItemExternalConnection) UnmarshalJSON(data []byte) (err error)

type ItemExternalConnectionsExternalConnectionName added in v0.3.0

type ItemExternalConnectionsExternalConnectionName string
const (
	ItemExternalConnectionsExternalConnectionNameStripe     ItemExternalConnectionsExternalConnectionName = "stripe"
	ItemExternalConnectionsExternalConnectionNameQuickbooks ItemExternalConnectionsExternalConnectionName = "quickbooks"
	ItemExternalConnectionsExternalConnectionNameBillCom    ItemExternalConnectionsExternalConnectionName = "bill.com"
	ItemExternalConnectionsExternalConnectionNameNetsuite   ItemExternalConnectionsExternalConnectionName = "netsuite"
	ItemExternalConnectionsExternalConnectionNameTaxjar     ItemExternalConnectionsExternalConnectionName = "taxjar"
	ItemExternalConnectionsExternalConnectionNameAvalara    ItemExternalConnectionsExternalConnectionName = "avalara"
	ItemExternalConnectionsExternalConnectionNameAnrok      ItemExternalConnectionsExternalConnectionName = "anrok"
)

func (ItemExternalConnectionsExternalConnectionName) IsKnown added in v0.24.0

type ItemListParams

type ItemListParams struct {
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor param.Field[string] `query:"cursor"`
	// The number of items to fetch. Defaults to 20.
	Limit param.Field[int64] `query:"limit"`
}

func (ItemListParams) URLQuery

func (r ItemListParams) URLQuery() (v url.Values)

URLQuery serializes ItemListParams's query parameters as `url.Values`.

type ItemNewParams added in v0.3.0

type ItemNewParams struct {
	// The name of the item.
	Name param.Field[string] `json:"name,required"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (ItemNewParams) MarshalJSON added in v0.3.0

func (r ItemNewParams) MarshalJSON() (data []byte, err error)

type ItemService

type ItemService struct {
	Options []option.RequestOption
}

ItemService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewItemService method instead.

func NewItemService

func NewItemService(opts ...option.RequestOption) (r *ItemService)

NewItemService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ItemService) Archive added in v0.116.0

func (r *ItemService) Archive(ctx context.Context, itemID string, opts ...option.RequestOption) (res *Item, err error)

Archive item

func (*ItemService) Fetch

func (r *ItemService) Fetch(ctx context.Context, itemID string, opts ...option.RequestOption) (res *Item, err error)

This endpoint returns an item identified by its item_id.

func (*ItemService) List

func (r *ItemService) List(ctx context.Context, query ItemListParams, opts ...option.RequestOption) (res *pagination.Page[Item], err error)

This endpoint returns a list of all Items, ordered in descending order by creation time.

func (*ItemService) ListAutoPaging

func (r *ItemService) ListAutoPaging(ctx context.Context, query ItemListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Item]

This endpoint returns a list of all Items, ordered in descending order by creation time.

func (*ItemService) New added in v0.3.0

func (r *ItemService) New(ctx context.Context, body ItemNewParams, opts ...option.RequestOption) (res *Item, err error)

This endpoint is used to create an Item(/core-concepts#item).

func (*ItemService) Update added in v0.34.0

func (r *ItemService) Update(ctx context.Context, itemID string, body ItemUpdateParams, opts ...option.RequestOption) (res *Item, err error)

This endpoint can be used to update properties on the Item.

type ItemSlim added in v0.121.0

type ItemSlim = shared.ItemSlim

This is an alias to an internal type.

type ItemUpdateParams added in v0.34.0

type ItemUpdateParams struct {
	ExternalConnections param.Field[[]ItemUpdateParamsExternalConnection] `json:"external_connections"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	Name     param.Field[string]            `json:"name"`
}

func (ItemUpdateParams) MarshalJSON added in v0.34.0

func (r ItemUpdateParams) MarshalJSON() (data []byte, err error)

type ItemUpdateParamsExternalConnection added in v0.34.0

type ItemUpdateParamsExternalConnection struct {
	ExternalConnectionName param.Field[ItemUpdateParamsExternalConnectionsExternalConnectionName] `json:"external_connection_name,required"`
	ExternalEntityID       param.Field[string]                                                    `json:"external_entity_id,required"`
}

func (ItemUpdateParamsExternalConnection) MarshalJSON added in v0.34.0

func (r ItemUpdateParamsExternalConnection) MarshalJSON() (data []byte, err error)

type ItemUpdateParamsExternalConnectionsExternalConnectionName added in v0.34.0

type ItemUpdateParamsExternalConnectionsExternalConnectionName string
const (
	ItemUpdateParamsExternalConnectionsExternalConnectionNameStripe     ItemUpdateParamsExternalConnectionsExternalConnectionName = "stripe"
	ItemUpdateParamsExternalConnectionsExternalConnectionNameQuickbooks ItemUpdateParamsExternalConnectionsExternalConnectionName = "quickbooks"
	ItemUpdateParamsExternalConnectionsExternalConnectionNameBillCom    ItemUpdateParamsExternalConnectionsExternalConnectionName = "bill.com"
	ItemUpdateParamsExternalConnectionsExternalConnectionNameNetsuite   ItemUpdateParamsExternalConnectionsExternalConnectionName = "netsuite"
	ItemUpdateParamsExternalConnectionsExternalConnectionNameTaxjar     ItemUpdateParamsExternalConnectionsExternalConnectionName = "taxjar"
	ItemUpdateParamsExternalConnectionsExternalConnectionNameAvalara    ItemUpdateParamsExternalConnectionsExternalConnectionName = "avalara"
	ItemUpdateParamsExternalConnectionsExternalConnectionNameAnrok      ItemUpdateParamsExternalConnectionsExternalConnectionName = "anrok"
)

func (ItemUpdateParamsExternalConnectionsExternalConnectionName) IsKnown added in v0.34.0

type MatrixConfig added in v0.121.0

type MatrixConfig = shared.MatrixConfig

This is an alias to an internal type.

type MatrixConfigParam added in v0.121.0

type MatrixConfigParam = shared.MatrixConfigParam

This is an alias to an internal type.

type MatrixSubLineItem added in v0.121.0

type MatrixSubLineItem = shared.MatrixSubLineItem

This is an alias to an internal type.

type MatrixSubLineItemType added in v0.121.0

type MatrixSubLineItemType = shared.MatrixSubLineItemType

This is an alias to an internal type.

type MatrixValue added in v0.121.0

type MatrixValue = shared.MatrixValue

This is an alias to an internal type.

type MatrixValueParam added in v0.121.0

type MatrixValueParam = shared.MatrixValueParam

This is an alias to an internal type.

type MatrixWithAllocationConfig added in v0.121.0

type MatrixWithAllocationConfig = shared.MatrixWithAllocationConfig

This is an alias to an internal type.

type MatrixWithAllocationConfigParam added in v0.121.0

type MatrixWithAllocationConfigParam = shared.MatrixWithAllocationConfigParam

This is an alias to an internal type.

type Maximum added in v0.121.0

type Maximum = shared.Maximum

This is an alias to an internal type.

type MaximumInterval added in v0.121.0

type MaximumInterval = shared.MaximumInterval

This is an alias to an internal type.

type MetricListParams

type MetricListParams struct {
	CreatedAtGt  param.Field[time.Time] `query:"created_at[gt]" format:"date-time"`
	CreatedAtGte param.Field[time.Time] `query:"created_at[gte]" format:"date-time"`
	CreatedAtLt  param.Field[time.Time] `query:"created_at[lt]" format:"date-time"`
	CreatedAtLte param.Field[time.Time] `query:"created_at[lte]" format:"date-time"`
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor param.Field[string] `query:"cursor"`
	// The number of items to fetch. Defaults to 20.
	Limit param.Field[int64] `query:"limit"`
}

func (MetricListParams) URLQuery

func (r MetricListParams) URLQuery() (v url.Values)

URLQuery serializes MetricListParams's query parameters as `url.Values`.

type MetricNewParams

type MetricNewParams struct {
	// A description of the metric.
	Description param.Field[string] `json:"description,required"`
	// The id of the item
	ItemID param.Field[string] `json:"item_id,required"`
	// The name of the metric.
	Name param.Field[string] `json:"name,required"`
	// A sql string defining the metric.
	Sql param.Field[string] `json:"sql,required"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (MetricNewParams) MarshalJSON

func (r MetricNewParams) MarshalJSON() (data []byte, err error)

type MetricService

type MetricService struct {
	Options []option.RequestOption
}

MetricService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMetricService method instead.

func NewMetricService

func NewMetricService(opts ...option.RequestOption) (r *MetricService)

NewMetricService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MetricService) Fetch

func (r *MetricService) Fetch(ctx context.Context, metricID string, opts ...option.RequestOption) (res *BillableMetric, err error)

This endpoint is used to list [metrics](/core-concepts#metric). It returns information about the metrics including its name, description, and item.

func (*MetricService) List

This endpoint is used to fetch [metric](/core-concepts##metric) details given a metric identifier. It returns information about the metrics including its name, description, and item.

func (*MetricService) ListAutoPaging

This endpoint is used to fetch [metric](/core-concepts##metric) details given a metric identifier. It returns information about the metrics including its name, description, and item.

func (*MetricService) New

func (r *MetricService) New(ctx context.Context, body MetricNewParams, opts ...option.RequestOption) (res *BillableMetric, err error)

This endpoint is used to create a [metric](/core-concepts###metric) using a SQL string. See [SQL support](/extensibility/advanced-metrics#sql-support) for a description of constructing SQL queries with examples.

func (*MetricService) Update added in v0.50.0

func (r *MetricService) Update(ctx context.Context, metricID string, body MetricUpdateParams, opts ...option.RequestOption) (res *BillableMetric, err error)

This endpoint allows you to update the `metadata` property on a metric. If you pass `null` for the metadata value, it will clear any existing metadata for that invoice.

type MetricUpdateParams added in v0.50.0

type MetricUpdateParams struct {
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (MetricUpdateParams) MarshalJSON added in v0.50.0

func (r MetricUpdateParams) MarshalJSON() (data []byte, err error)

type Minimum added in v0.121.0

type Minimum = shared.Minimum

This is an alias to an internal type.

type MinimumInterval added in v0.121.0

type MinimumInterval = shared.MinimumInterval

This is an alias to an internal type.

type MonetaryAmountDiscountAdjustment added in v0.121.0

type MonetaryAmountDiscountAdjustment = shared.MonetaryAmountDiscountAdjustment

This is an alias to an internal type.

type MonetaryAmountDiscountAdjustmentAdjustmentType added in v0.121.0

type MonetaryAmountDiscountAdjustmentAdjustmentType = shared.MonetaryAmountDiscountAdjustmentAdjustmentType

This is an alias to an internal type.

type MonetaryMaximumAdjustment added in v0.121.0

type MonetaryMaximumAdjustment = shared.MonetaryMaximumAdjustment

This is an alias to an internal type.

type MonetaryMaximumAdjustmentAdjustmentType added in v0.121.0

type MonetaryMaximumAdjustmentAdjustmentType = shared.MonetaryMaximumAdjustmentAdjustmentType

This is an alias to an internal type.

type MonetaryMinimumAdjustment added in v0.121.0

type MonetaryMinimumAdjustment = shared.MonetaryMinimumAdjustment

This is an alias to an internal type.

type MonetaryMinimumAdjustmentAdjustmentType added in v0.121.0

type MonetaryMinimumAdjustmentAdjustmentType = shared.MonetaryMinimumAdjustmentAdjustmentType

This is an alias to an internal type.

type MonetaryPercentageDiscountAdjustment added in v0.121.0

type MonetaryPercentageDiscountAdjustment = shared.MonetaryPercentageDiscountAdjustment

This is an alias to an internal type.

type MonetaryPercentageDiscountAdjustmentAdjustmentType added in v0.121.0

type MonetaryPercentageDiscountAdjustmentAdjustmentType = shared.MonetaryPercentageDiscountAdjustmentAdjustmentType

This is an alias to an internal type.

type MonetaryUsageDiscountAdjustment added in v0.121.0

type MonetaryUsageDiscountAdjustment = shared.MonetaryUsageDiscountAdjustment

This is an alias to an internal type.

type MonetaryUsageDiscountAdjustmentAdjustmentType added in v0.121.0

type MonetaryUsageDiscountAdjustmentAdjustmentType = shared.MonetaryUsageDiscountAdjustmentAdjustmentType

This is an alias to an internal type.

type MutatedSubscription added in v0.121.0

type MutatedSubscription struct {
	ID string `json:"id,required"`
	// The current plan phase that is active, only if the subscription's plan has
	// phases.
	ActivePlanPhaseOrder int64 `json:"active_plan_phase_order,required,nullable"`
	// The adjustment intervals for this subscription sorted by the start_date of the
	// adjustment interval.
	AdjustmentIntervals []shared.AdjustmentInterval `json:"adjustment_intervals,required"`
	// Determines whether issued invoices for this subscription will automatically be
	// charged with the saved payment method on the due date. This property defaults to
	// the plan's behavior. If null, defaults to the customer's setting.
	AutoCollection                  bool                                   `json:"auto_collection,required,nullable"`
	BillingCycleAnchorConfiguration shared.BillingCycleAnchorConfiguration `json:"billing_cycle_anchor_configuration,required"`
	// The day of the month on which the billing cycle is anchored. If the maximum
	// number of days in a month is greater than this value, the last day of the month
	// is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
	// period begins on the 30th.
	BillingCycleDay int64     `json:"billing_cycle_day,required"`
	CreatedAt       time.Time `json:"created_at,required" format:"date-time"`
	// The end of the current billing period. This is an exclusive timestamp, such that
	// the instant returned is not part of the billing period. Set to null for
	// subscriptions that are not currently active.
	CurrentBillingPeriodEndDate time.Time `json:"current_billing_period_end_date,required,nullable" format:"date-time"`
	// The start date of the current billing period. This is an inclusive timestamp;
	// the instant returned is exactly the beginning of the billing period. Set to null
	// if the subscription is not currently active.
	CurrentBillingPeriodStartDate time.Time `json:"current_billing_period_start_date,required,nullable" format:"date-time"`
	// A customer is a buyer of your products, and the other party to the billing
	// relationship.
	//
	// In Orb, customers are assigned system generated identifiers automatically, but
	// it's often desirable to have these match existing identifiers in your system. To
	// avoid having to denormalize Orb ID information, you can pass in an
	// `external_customer_id` with your own identifier. See
	// [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
	// information about how these aliases work in Orb.
	//
	// In addition to having an identifier in your system, a customer may exist in a
	// payment provider solution like Stripe. Use the `payment_provider_id` and the
	// `payment_provider` enum field to express this mapping.
	//
	// A customer also has a timezone (from the standard
	// [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
	// your account's timezone. See [Timezone localization](/essentials/timezones) for
	// information on what this timezone parameter influences within Orb.
	Customer Customer `json:"customer,required"`
	// Determines the default memo on this subscriptions' invoices. Note that if this
	// is not provided, it is determined by the plan configuration.
	DefaultInvoiceMemo string `json:"default_invoice_memo,required,nullable"`
	// The discount intervals for this subscription sorted by the start_date.
	//
	// Deprecated: deprecated
	DiscountIntervals []MutatedSubscriptionDiscountInterval `json:"discount_intervals,required"`
	// The date Orb stops billing for this subscription.
	EndDate                  time.Time                              `json:"end_date,required,nullable" format:"date-time"`
	FixedFeeQuantitySchedule []shared.FixedFeeQuantityScheduleEntry `json:"fixed_fee_quantity_schedule,required"`
	InvoicingThreshold       string                                 `json:"invoicing_threshold,required,nullable"`
	// The maximum intervals for this subscription sorted by the start_date.
	//
	// Deprecated: deprecated
	MaximumIntervals []shared.MaximumInterval `json:"maximum_intervals,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata map[string]string `json:"metadata,required"`
	// The minimum intervals for this subscription sorted by the start_date.
	//
	// Deprecated: deprecated
	MinimumIntervals []shared.MinimumInterval `json:"minimum_intervals,required"`
	// The name of the subscription.
	Name string `json:"name,required"`
	// Determines the difference between the invoice issue date for subscription
	// invoices as the date that they are due. A value of `0` here represents that the
	// invoice is due on issue, whereas a value of `30` represents that the customer
	// has a month to pay the invoice.
	NetTerms int64 `json:"net_terms,required"`
	// A pending subscription change if one exists on this subscription.
	PendingSubscriptionChange shared.SubscriptionChangeMinified `json:"pending_subscription_change,required,nullable"`
	// The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
	// subscribed to by a customer. Plans define the billing behavior of the
	// subscription. You can see more about how to configure prices in the
	// [Price resource](/reference/price).
	Plan Plan `json:"plan,required,nullable"`
	// The price intervals for this subscription.
	PriceIntervals []shared.PriceInterval  `json:"price_intervals,required"`
	RedeemedCoupon shared.CouponRedemption `json:"redeemed_coupon,required,nullable"`
	// The date Orb starts billing for this subscription.
	StartDate time.Time                    `json:"start_date,required" format:"date-time"`
	Status    MutatedSubscriptionStatus    `json:"status,required"`
	TrialInfo shared.SubscriptionTrialInfo `json:"trial_info,required"`
	// The resources that were changed as part of this operation. Only present when
	// fetched through the subscription changes API or if the
	// `include_changed_resources` parameter was passed in the request.
	ChangedResources shared.ChangedSubscriptionResources `json:"changed_resources,nullable"`
	JSON             mutatedSubscriptionJSON             `json:"-"`
}

func (*MutatedSubscription) UnmarshalJSON added in v0.121.0

func (r *MutatedSubscription) UnmarshalJSON(data []byte) (err error)

type MutatedSubscriptionDiscountInterval added in v0.121.0

type MutatedSubscriptionDiscountInterval struct {
	// This field can have the runtime type of [[]string].
	AppliesToPriceIntervalIDs interface{}                                      `json:"applies_to_price_interval_ids,required"`
	DiscountType              MutatedSubscriptionDiscountIntervalsDiscountType `json:"discount_type,required"`
	// The end date of the discount interval.
	EndDate time.Time `json:"end_date,required,nullable" format:"date-time"`
	// This field can have the runtime type of [[]shared.TransformPriceFilter].
	Filters interface{} `json:"filters,required"`
	// The start date of the discount interval.
	StartDate time.Time `json:"start_date,required" format:"date-time"`
	// Only available if discount_type is `amount`.
	AmountDiscount string `json:"amount_discount"`
	// Only available if discount_type is `percentage`.This is a number between 0
	// and 1.
	PercentageDiscount float64 `json:"percentage_discount"`
	// Only available if discount_type is `usage`. Number of usage units that this
	// discount is for
	UsageDiscount float64                                 `json:"usage_discount"`
	JSON          mutatedSubscriptionDiscountIntervalJSON `json:"-"`
	// contains filtered or unexported fields
}

func (MutatedSubscriptionDiscountInterval) AsUnion added in v0.121.0

AsUnion returns a MutatedSubscriptionDiscountIntervalsUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are shared.AmountDiscountInterval, shared.PercentageDiscountInterval, shared.UsageDiscountInterval.

func (*MutatedSubscriptionDiscountInterval) UnmarshalJSON added in v0.121.0

func (r *MutatedSubscriptionDiscountInterval) UnmarshalJSON(data []byte) (err error)

type MutatedSubscriptionDiscountIntervalsDiscountType added in v0.121.0

type MutatedSubscriptionDiscountIntervalsDiscountType string
const (
	MutatedSubscriptionDiscountIntervalsDiscountTypeAmount     MutatedSubscriptionDiscountIntervalsDiscountType = "amount"
	MutatedSubscriptionDiscountIntervalsDiscountTypePercentage MutatedSubscriptionDiscountIntervalsDiscountType = "percentage"
	MutatedSubscriptionDiscountIntervalsDiscountTypeUsage      MutatedSubscriptionDiscountIntervalsDiscountType = "usage"
)

func (MutatedSubscriptionDiscountIntervalsDiscountType) IsKnown added in v0.121.0

type MutatedSubscriptionDiscountIntervalsUnion added in v0.121.0

type MutatedSubscriptionDiscountIntervalsUnion interface {
	ImplementsMutatedSubscriptionDiscountInterval()
}

Union satisfied by shared.AmountDiscountInterval, shared.PercentageDiscountInterval or shared.UsageDiscountInterval.

type MutatedSubscriptionStatus added in v0.121.0

type MutatedSubscriptionStatus string
const (
	MutatedSubscriptionStatusActive   MutatedSubscriptionStatus = "active"
	MutatedSubscriptionStatusEnded    MutatedSubscriptionStatus = "ended"
	MutatedSubscriptionStatusUpcoming MutatedSubscriptionStatus = "upcoming"
)

func (MutatedSubscriptionStatus) IsKnown added in v0.121.0

func (r MutatedSubscriptionStatus) IsKnown() bool

type NewAccountingSyncConfigurationParam added in v0.121.0

type NewAccountingSyncConfigurationParam struct {
	AccountingProviders param.Field[[]AccountingProviderConfigParam] `json:"accounting_providers"`
	Excluded            param.Field[bool]                            `json:"excluded"`
}

func (NewAccountingSyncConfigurationParam) MarshalJSON added in v0.121.0

func (r NewAccountingSyncConfigurationParam) MarshalJSON() (data []byte, err error)

type NewAllocationPriceCadence added in v0.121.0

type NewAllocationPriceCadence = shared.NewAllocationPriceCadence

The cadence at which to allocate the amount to the customer.

This is an alias to an internal type.

type NewAllocationPriceParam added in v0.121.0

type NewAllocationPriceParam = shared.NewAllocationPriceParam

This is an alias to an internal type.

type NewAmountDiscountAdjustmentType added in v0.121.0

type NewAmountDiscountAdjustmentType = shared.NewAmountDiscountAdjustmentType

This is an alias to an internal type.

type NewAmountDiscountAppliesToAll added in v0.121.0

type NewAmountDiscountAppliesToAll = shared.NewAmountDiscountAppliesToAll

If set, the adjustment will apply to every price on the subscription.

This is an alias to an internal type.

type NewAmountDiscountParam added in v0.121.0

type NewAmountDiscountParam = shared.NewAmountDiscountParam

This is an alias to an internal type.

type NewAmountDiscountPriceType added in v0.121.0

type NewAmountDiscountPriceType = shared.NewAmountDiscountPriceType

If set, only prices of the specified type will have the adjustment applied.

This is an alias to an internal type.

type NewAvalaraTaxConfigurationParam added in v0.121.0

type NewAvalaraTaxConfigurationParam struct {
	TaxExempt        param.Field[bool]                                  `json:"tax_exempt,required"`
	TaxProvider      param.Field[NewAvalaraTaxConfigurationTaxProvider] `json:"tax_provider,required"`
	TaxExemptionCode param.Field[string]                                `json:"tax_exemption_code"`
}

func (NewAvalaraTaxConfigurationParam) MarshalJSON added in v0.121.0

func (r NewAvalaraTaxConfigurationParam) MarshalJSON() (data []byte, err error)

type NewAvalaraTaxConfigurationTaxProvider added in v0.121.0

type NewAvalaraTaxConfigurationTaxProvider string
const (
	NewAvalaraTaxConfigurationTaxProviderAvalara NewAvalaraTaxConfigurationTaxProvider = "avalara"
)

func (NewAvalaraTaxConfigurationTaxProvider) IsKnown added in v0.121.0

type NewBillingCycleConfigurationDurationUnit added in v0.121.0

type NewBillingCycleConfigurationDurationUnit = shared.NewBillingCycleConfigurationDurationUnit

The unit of billing period duration.

This is an alias to an internal type.

type NewBillingCycleConfigurationParam added in v0.121.0

type NewBillingCycleConfigurationParam = shared.NewBillingCycleConfigurationParam

This is an alias to an internal type.

type NewDimensionalPriceConfigurationParam added in v0.121.0

type NewDimensionalPriceConfigurationParam = shared.NewDimensionalPriceConfigurationParam

This is an alias to an internal type.

type NewFloatingBPSPriceCadence added in v0.121.0

type NewFloatingBPSPriceCadence = shared.NewFloatingBPSPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingBPSPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingBPSPriceConversionRateConfigConversionRateType = shared.NewFloatingBPSPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingBPSPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingBPSPriceConversionRateConfigUnionParam = shared.NewFloatingBPSPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingBPSPriceModelType added in v0.121.0

type NewFloatingBPSPriceModelType = shared.NewFloatingBPSPriceModelType

This is an alias to an internal type.

type NewFloatingBPSPriceParam added in v0.121.0

type NewFloatingBPSPriceParam = shared.NewFloatingBPSPriceParam

This is an alias to an internal type.

type NewFloatingBulkBPSPriceCadence added in v0.121.0

type NewFloatingBulkBPSPriceCadence = shared.NewFloatingBulkBPSPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingBulkBPSPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingBulkBPSPriceConversionRateConfigConversionRateType = shared.NewFloatingBulkBPSPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingBulkBPSPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingBulkBPSPriceConversionRateConfigUnionParam = shared.NewFloatingBulkBPSPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingBulkBPSPriceModelType added in v0.121.0

type NewFloatingBulkBPSPriceModelType = shared.NewFloatingBulkBPSPriceModelType

This is an alias to an internal type.

type NewFloatingBulkBPSPriceParam added in v0.121.0

type NewFloatingBulkBPSPriceParam = shared.NewFloatingBulkBPSPriceParam

This is an alias to an internal type.

type NewFloatingBulkPriceCadence added in v0.121.0

type NewFloatingBulkPriceCadence = shared.NewFloatingBulkPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingBulkPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingBulkPriceConversionRateConfigConversionRateType = shared.NewFloatingBulkPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingBulkPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingBulkPriceConversionRateConfigUnionParam = shared.NewFloatingBulkPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingBulkPriceModelType added in v0.121.0

type NewFloatingBulkPriceModelType = shared.NewFloatingBulkPriceModelType

This is an alias to an internal type.

type NewFloatingBulkPriceParam added in v0.121.0

type NewFloatingBulkPriceParam = shared.NewFloatingBulkPriceParam

This is an alias to an internal type.

type NewFloatingBulkWithProrationPriceCadence added in v0.121.0

type NewFloatingBulkWithProrationPriceCadence = shared.NewFloatingBulkWithProrationPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingBulkWithProrationPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingBulkWithProrationPriceConversionRateConfigConversionRateType = shared.NewFloatingBulkWithProrationPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingBulkWithProrationPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingBulkWithProrationPriceConversionRateConfigUnionParam = shared.NewFloatingBulkWithProrationPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingBulkWithProrationPriceModelType added in v0.121.0

type NewFloatingBulkWithProrationPriceModelType = shared.NewFloatingBulkWithProrationPriceModelType

This is an alias to an internal type.

type NewFloatingBulkWithProrationPriceParam added in v0.121.0

type NewFloatingBulkWithProrationPriceParam = shared.NewFloatingBulkWithProrationPriceParam

This is an alias to an internal type.

type NewFloatingCumulativeGroupedBulkPriceCadence added in v0.121.0

type NewFloatingCumulativeGroupedBulkPriceCadence = shared.NewFloatingCumulativeGroupedBulkPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingCumulativeGroupedBulkPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingCumulativeGroupedBulkPriceConversionRateConfigConversionRateType = shared.NewFloatingCumulativeGroupedBulkPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingCumulativeGroupedBulkPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingCumulativeGroupedBulkPriceConversionRateConfigUnionParam = shared.NewFloatingCumulativeGroupedBulkPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingCumulativeGroupedBulkPriceModelType added in v0.121.0

type NewFloatingCumulativeGroupedBulkPriceModelType = shared.NewFloatingCumulativeGroupedBulkPriceModelType

This is an alias to an internal type.

type NewFloatingCumulativeGroupedBulkPriceParam added in v0.121.0

type NewFloatingCumulativeGroupedBulkPriceParam = shared.NewFloatingCumulativeGroupedBulkPriceParam

This is an alias to an internal type.

type NewFloatingGroupedAllocationPriceCadence added in v0.121.0

type NewFloatingGroupedAllocationPriceCadence = shared.NewFloatingGroupedAllocationPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingGroupedAllocationPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingGroupedAllocationPriceConversionRateConfigConversionRateType = shared.NewFloatingGroupedAllocationPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingGroupedAllocationPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingGroupedAllocationPriceConversionRateConfigUnionParam = shared.NewFloatingGroupedAllocationPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingGroupedAllocationPriceModelType added in v0.121.0

type NewFloatingGroupedAllocationPriceModelType = shared.NewFloatingGroupedAllocationPriceModelType

This is an alias to an internal type.

type NewFloatingGroupedAllocationPriceParam added in v0.121.0

type NewFloatingGroupedAllocationPriceParam = shared.NewFloatingGroupedAllocationPriceParam

This is an alias to an internal type.

type NewFloatingGroupedTieredPackagePriceCadence added in v0.121.0

type NewFloatingGroupedTieredPackagePriceCadence = shared.NewFloatingGroupedTieredPackagePriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingGroupedTieredPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingGroupedTieredPackagePriceConversionRateConfigConversionRateType = shared.NewFloatingGroupedTieredPackagePriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingGroupedTieredPackagePriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingGroupedTieredPackagePriceConversionRateConfigUnionParam = shared.NewFloatingGroupedTieredPackagePriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingGroupedTieredPackagePriceModelType added in v0.121.0

type NewFloatingGroupedTieredPackagePriceModelType = shared.NewFloatingGroupedTieredPackagePriceModelType

This is an alias to an internal type.

type NewFloatingGroupedTieredPackagePriceParam added in v0.121.0

type NewFloatingGroupedTieredPackagePriceParam = shared.NewFloatingGroupedTieredPackagePriceParam

This is an alias to an internal type.

type NewFloatingGroupedTieredPriceCadence added in v0.121.0

type NewFloatingGroupedTieredPriceCadence = shared.NewFloatingGroupedTieredPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingGroupedTieredPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingGroupedTieredPriceConversionRateConfigConversionRateType = shared.NewFloatingGroupedTieredPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingGroupedTieredPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingGroupedTieredPriceConversionRateConfigUnionParam = shared.NewFloatingGroupedTieredPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingGroupedTieredPriceModelType added in v0.121.0

type NewFloatingGroupedTieredPriceModelType = shared.NewFloatingGroupedTieredPriceModelType

This is an alias to an internal type.

type NewFloatingGroupedTieredPriceParam added in v0.121.0

type NewFloatingGroupedTieredPriceParam = shared.NewFloatingGroupedTieredPriceParam

This is an alias to an internal type.

type NewFloatingGroupedWithMeteredMinimumPriceCadence added in v0.121.0

type NewFloatingGroupedWithMeteredMinimumPriceCadence = shared.NewFloatingGroupedWithMeteredMinimumPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType = shared.NewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigUnionParam = shared.NewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingGroupedWithMeteredMinimumPriceModelType added in v0.121.0

type NewFloatingGroupedWithMeteredMinimumPriceModelType = shared.NewFloatingGroupedWithMeteredMinimumPriceModelType

This is an alias to an internal type.

type NewFloatingGroupedWithMeteredMinimumPriceParam added in v0.121.0

type NewFloatingGroupedWithMeteredMinimumPriceParam = shared.NewFloatingGroupedWithMeteredMinimumPriceParam

This is an alias to an internal type.

type NewFloatingGroupedWithProratedMinimumPriceCadence added in v0.121.0

type NewFloatingGroupedWithProratedMinimumPriceCadence = shared.NewFloatingGroupedWithProratedMinimumPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType = shared.NewFloatingGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingGroupedWithProratedMinimumPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingGroupedWithProratedMinimumPriceConversionRateConfigUnionParam = shared.NewFloatingGroupedWithProratedMinimumPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingGroupedWithProratedMinimumPriceModelType added in v0.121.0

type NewFloatingGroupedWithProratedMinimumPriceModelType = shared.NewFloatingGroupedWithProratedMinimumPriceModelType

This is an alias to an internal type.

type NewFloatingGroupedWithProratedMinimumPriceParam added in v0.121.0

type NewFloatingGroupedWithProratedMinimumPriceParam = shared.NewFloatingGroupedWithProratedMinimumPriceParam

This is an alias to an internal type.

type NewFloatingMatrixPriceCadence added in v0.121.0

type NewFloatingMatrixPriceCadence = shared.NewFloatingMatrixPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingMatrixPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingMatrixPriceConversionRateConfigConversionRateType = shared.NewFloatingMatrixPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingMatrixPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingMatrixPriceConversionRateConfigUnionParam = shared.NewFloatingMatrixPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingMatrixPriceModelType added in v0.121.0

type NewFloatingMatrixPriceModelType = shared.NewFloatingMatrixPriceModelType

This is an alias to an internal type.

type NewFloatingMatrixPriceParam added in v0.121.0

type NewFloatingMatrixPriceParam = shared.NewFloatingMatrixPriceParam

This is an alias to an internal type.

type NewFloatingMatrixWithAllocationPriceCadence added in v0.121.0

type NewFloatingMatrixWithAllocationPriceCadence = shared.NewFloatingMatrixWithAllocationPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingMatrixWithAllocationPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingMatrixWithAllocationPriceConversionRateConfigConversionRateType = shared.NewFloatingMatrixWithAllocationPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingMatrixWithAllocationPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingMatrixWithAllocationPriceConversionRateConfigUnionParam = shared.NewFloatingMatrixWithAllocationPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingMatrixWithAllocationPriceModelType added in v0.121.0

type NewFloatingMatrixWithAllocationPriceModelType = shared.NewFloatingMatrixWithAllocationPriceModelType

This is an alias to an internal type.

type NewFloatingMatrixWithAllocationPriceParam added in v0.121.0

type NewFloatingMatrixWithAllocationPriceParam = shared.NewFloatingMatrixWithAllocationPriceParam

This is an alias to an internal type.

type NewFloatingMatrixWithDisplayNamePriceCadence added in v0.121.0

type NewFloatingMatrixWithDisplayNamePriceCadence = shared.NewFloatingMatrixWithDisplayNamePriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingMatrixWithDisplayNamePriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingMatrixWithDisplayNamePriceConversionRateConfigConversionRateType = shared.NewFloatingMatrixWithDisplayNamePriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingMatrixWithDisplayNamePriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingMatrixWithDisplayNamePriceConversionRateConfigUnionParam = shared.NewFloatingMatrixWithDisplayNamePriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingMatrixWithDisplayNamePriceModelType added in v0.121.0

type NewFloatingMatrixWithDisplayNamePriceModelType = shared.NewFloatingMatrixWithDisplayNamePriceModelType

This is an alias to an internal type.

type NewFloatingMatrixWithDisplayNamePriceParam added in v0.121.0

type NewFloatingMatrixWithDisplayNamePriceParam = shared.NewFloatingMatrixWithDisplayNamePriceParam

This is an alias to an internal type.

type NewFloatingMaxGroupTieredPackagePriceCadence added in v0.121.0

type NewFloatingMaxGroupTieredPackagePriceCadence = shared.NewFloatingMaxGroupTieredPackagePriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingMaxGroupTieredPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingMaxGroupTieredPackagePriceConversionRateConfigConversionRateType = shared.NewFloatingMaxGroupTieredPackagePriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingMaxGroupTieredPackagePriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingMaxGroupTieredPackagePriceConversionRateConfigUnionParam = shared.NewFloatingMaxGroupTieredPackagePriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingMaxGroupTieredPackagePriceModelType added in v0.121.0

type NewFloatingMaxGroupTieredPackagePriceModelType = shared.NewFloatingMaxGroupTieredPackagePriceModelType

This is an alias to an internal type.

type NewFloatingMaxGroupTieredPackagePriceParam added in v0.121.0

type NewFloatingMaxGroupTieredPackagePriceParam = shared.NewFloatingMaxGroupTieredPackagePriceParam

This is an alias to an internal type.

type NewFloatingPackagePriceCadence added in v0.121.0

type NewFloatingPackagePriceCadence = shared.NewFloatingPackagePriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingPackagePriceConversionRateConfigConversionRateType = shared.NewFloatingPackagePriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingPackagePriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingPackagePriceConversionRateConfigUnionParam = shared.NewFloatingPackagePriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingPackagePriceModelType added in v0.121.0

type NewFloatingPackagePriceModelType = shared.NewFloatingPackagePriceModelType

This is an alias to an internal type.

type NewFloatingPackagePriceParam added in v0.121.0

type NewFloatingPackagePriceParam = shared.NewFloatingPackagePriceParam

This is an alias to an internal type.

type NewFloatingPackageWithAllocationPriceCadence added in v0.121.0

type NewFloatingPackageWithAllocationPriceCadence = shared.NewFloatingPackageWithAllocationPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingPackageWithAllocationPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingPackageWithAllocationPriceConversionRateConfigConversionRateType = shared.NewFloatingPackageWithAllocationPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingPackageWithAllocationPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingPackageWithAllocationPriceConversionRateConfigUnionParam = shared.NewFloatingPackageWithAllocationPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingPackageWithAllocationPriceModelType added in v0.121.0

type NewFloatingPackageWithAllocationPriceModelType = shared.NewFloatingPackageWithAllocationPriceModelType

This is an alias to an internal type.

type NewFloatingPackageWithAllocationPriceParam added in v0.121.0

type NewFloatingPackageWithAllocationPriceParam = shared.NewFloatingPackageWithAllocationPriceParam

This is an alias to an internal type.

type NewFloatingScalableMatrixWithTieredPricingPriceCadence added in v0.121.0

type NewFloatingScalableMatrixWithTieredPricingPriceCadence = shared.NewFloatingScalableMatrixWithTieredPricingPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType = shared.NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigUnionParam = shared.NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingScalableMatrixWithTieredPricingPriceModelType added in v0.121.0

type NewFloatingScalableMatrixWithTieredPricingPriceModelType = shared.NewFloatingScalableMatrixWithTieredPricingPriceModelType

This is an alias to an internal type.

type NewFloatingScalableMatrixWithTieredPricingPriceParam added in v0.121.0

type NewFloatingScalableMatrixWithTieredPricingPriceParam = shared.NewFloatingScalableMatrixWithTieredPricingPriceParam

This is an alias to an internal type.

type NewFloatingScalableMatrixWithUnitPricingPriceCadence added in v0.121.0

type NewFloatingScalableMatrixWithUnitPricingPriceCadence = shared.NewFloatingScalableMatrixWithUnitPricingPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType = shared.NewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigUnionParam = shared.NewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingScalableMatrixWithUnitPricingPriceModelType added in v0.121.0

type NewFloatingScalableMatrixWithUnitPricingPriceModelType = shared.NewFloatingScalableMatrixWithUnitPricingPriceModelType

This is an alias to an internal type.

type NewFloatingScalableMatrixWithUnitPricingPriceParam added in v0.121.0

type NewFloatingScalableMatrixWithUnitPricingPriceParam = shared.NewFloatingScalableMatrixWithUnitPricingPriceParam

This is an alias to an internal type.

type NewFloatingThresholdTotalAmountPriceCadence added in v0.121.0

type NewFloatingThresholdTotalAmountPriceCadence = shared.NewFloatingThresholdTotalAmountPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingThresholdTotalAmountPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingThresholdTotalAmountPriceConversionRateConfigConversionRateType = shared.NewFloatingThresholdTotalAmountPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingThresholdTotalAmountPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingThresholdTotalAmountPriceConversionRateConfigUnionParam = shared.NewFloatingThresholdTotalAmountPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingThresholdTotalAmountPriceModelType added in v0.121.0

type NewFloatingThresholdTotalAmountPriceModelType = shared.NewFloatingThresholdTotalAmountPriceModelType

This is an alias to an internal type.

type NewFloatingThresholdTotalAmountPriceParam added in v0.121.0

type NewFloatingThresholdTotalAmountPriceParam = shared.NewFloatingThresholdTotalAmountPriceParam

This is an alias to an internal type.

type NewFloatingTieredBPSPriceCadence added in v0.121.0

type NewFloatingTieredBPSPriceCadence = shared.NewFloatingTieredBPSPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingTieredBPSPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingTieredBPSPriceConversionRateConfigConversionRateType = shared.NewFloatingTieredBPSPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingTieredBPSPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingTieredBPSPriceConversionRateConfigUnionParam = shared.NewFloatingTieredBPSPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingTieredBPSPriceModelType added in v0.121.0

type NewFloatingTieredBPSPriceModelType = shared.NewFloatingTieredBPSPriceModelType

This is an alias to an internal type.

type NewFloatingTieredBPSPriceParam added in v0.121.0

type NewFloatingTieredBPSPriceParam = shared.NewFloatingTieredBPSPriceParam

This is an alias to an internal type.

type NewFloatingTieredPackagePriceCadence added in v0.121.0

type NewFloatingTieredPackagePriceCadence = shared.NewFloatingTieredPackagePriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingTieredPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingTieredPackagePriceConversionRateConfigConversionRateType = shared.NewFloatingTieredPackagePriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingTieredPackagePriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingTieredPackagePriceConversionRateConfigUnionParam = shared.NewFloatingTieredPackagePriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingTieredPackagePriceModelType added in v0.121.0

type NewFloatingTieredPackagePriceModelType = shared.NewFloatingTieredPackagePriceModelType

This is an alias to an internal type.

type NewFloatingTieredPackagePriceParam added in v0.121.0

type NewFloatingTieredPackagePriceParam = shared.NewFloatingTieredPackagePriceParam

This is an alias to an internal type.

type NewFloatingTieredPackageWithMinimumPriceCadence added in v0.121.0

type NewFloatingTieredPackageWithMinimumPriceCadence = shared.NewFloatingTieredPackageWithMinimumPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingTieredPackageWithMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingTieredPackageWithMinimumPriceConversionRateConfigConversionRateType = shared.NewFloatingTieredPackageWithMinimumPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingTieredPackageWithMinimumPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingTieredPackageWithMinimumPriceConversionRateConfigUnionParam = shared.NewFloatingTieredPackageWithMinimumPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingTieredPackageWithMinimumPriceModelType added in v0.121.0

type NewFloatingTieredPackageWithMinimumPriceModelType = shared.NewFloatingTieredPackageWithMinimumPriceModelType

This is an alias to an internal type.

type NewFloatingTieredPackageWithMinimumPriceParam added in v0.121.0

type NewFloatingTieredPackageWithMinimumPriceParam = shared.NewFloatingTieredPackageWithMinimumPriceParam

This is an alias to an internal type.

type NewFloatingTieredPriceCadence added in v0.121.0

type NewFloatingTieredPriceCadence = shared.NewFloatingTieredPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingTieredPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingTieredPriceConversionRateConfigConversionRateType = shared.NewFloatingTieredPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingTieredPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingTieredPriceConversionRateConfigUnionParam = shared.NewFloatingTieredPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingTieredPriceModelType added in v0.121.0

type NewFloatingTieredPriceModelType = shared.NewFloatingTieredPriceModelType

This is an alias to an internal type.

type NewFloatingTieredPriceParam added in v0.121.0

type NewFloatingTieredPriceParam = shared.NewFloatingTieredPriceParam

This is an alias to an internal type.

type NewFloatingTieredWithMinimumPriceCadence added in v0.121.0

type NewFloatingTieredWithMinimumPriceCadence = shared.NewFloatingTieredWithMinimumPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingTieredWithMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingTieredWithMinimumPriceConversionRateConfigConversionRateType = shared.NewFloatingTieredWithMinimumPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingTieredWithMinimumPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingTieredWithMinimumPriceConversionRateConfigUnionParam = shared.NewFloatingTieredWithMinimumPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingTieredWithMinimumPriceModelType added in v0.121.0

type NewFloatingTieredWithMinimumPriceModelType = shared.NewFloatingTieredWithMinimumPriceModelType

This is an alias to an internal type.

type NewFloatingTieredWithMinimumPriceParam added in v0.121.0

type NewFloatingTieredWithMinimumPriceParam = shared.NewFloatingTieredWithMinimumPriceParam

This is an alias to an internal type.

type NewFloatingTieredWithProrationPriceCadence added in v0.121.0

type NewFloatingTieredWithProrationPriceCadence = shared.NewFloatingTieredWithProrationPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingTieredWithProrationPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingTieredWithProrationPriceConversionRateConfigConversionRateType = shared.NewFloatingTieredWithProrationPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingTieredWithProrationPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingTieredWithProrationPriceConversionRateConfigUnionParam = shared.NewFloatingTieredWithProrationPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingTieredWithProrationPriceModelType added in v0.121.0

type NewFloatingTieredWithProrationPriceModelType = shared.NewFloatingTieredWithProrationPriceModelType

This is an alias to an internal type.

type NewFloatingTieredWithProrationPriceParam added in v0.121.0

type NewFloatingTieredWithProrationPriceParam = shared.NewFloatingTieredWithProrationPriceParam

This is an alias to an internal type.

type NewFloatingUnitPriceCadence added in v0.121.0

type NewFloatingUnitPriceCadence = shared.NewFloatingUnitPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingUnitPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingUnitPriceConversionRateConfigConversionRateType = shared.NewFloatingUnitPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingUnitPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingUnitPriceConversionRateConfigUnionParam = shared.NewFloatingUnitPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingUnitPriceModelType added in v0.121.0

type NewFloatingUnitPriceModelType = shared.NewFloatingUnitPriceModelType

This is an alias to an internal type.

type NewFloatingUnitPriceParam added in v0.121.0

type NewFloatingUnitPriceParam = shared.NewFloatingUnitPriceParam

This is an alias to an internal type.

type NewFloatingUnitWithPercentPriceCadence added in v0.121.0

type NewFloatingUnitWithPercentPriceCadence = shared.NewFloatingUnitWithPercentPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingUnitWithPercentPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingUnitWithPercentPriceConversionRateConfigConversionRateType = shared.NewFloatingUnitWithPercentPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingUnitWithPercentPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingUnitWithPercentPriceConversionRateConfigUnionParam = shared.NewFloatingUnitWithPercentPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingUnitWithPercentPriceModelType added in v0.121.0

type NewFloatingUnitWithPercentPriceModelType = shared.NewFloatingUnitWithPercentPriceModelType

This is an alias to an internal type.

type NewFloatingUnitWithPercentPriceParam added in v0.121.0

type NewFloatingUnitWithPercentPriceParam = shared.NewFloatingUnitWithPercentPriceParam

This is an alias to an internal type.

type NewFloatingUnitWithProrationPriceCadence added in v0.121.0

type NewFloatingUnitWithProrationPriceCadence = shared.NewFloatingUnitWithProrationPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingUnitWithProrationPriceConversionRateConfigConversionRateType added in v0.121.0

type NewFloatingUnitWithProrationPriceConversionRateConfigConversionRateType = shared.NewFloatingUnitWithProrationPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingUnitWithProrationPriceConversionRateConfigUnionParam added in v0.121.0

type NewFloatingUnitWithProrationPriceConversionRateConfigUnionParam = shared.NewFloatingUnitWithProrationPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewFloatingUnitWithProrationPriceModelType added in v0.121.0

type NewFloatingUnitWithProrationPriceModelType = shared.NewFloatingUnitWithProrationPriceModelType

This is an alias to an internal type.

type NewFloatingUnitWithProrationPriceParam added in v0.121.0

type NewFloatingUnitWithProrationPriceParam = shared.NewFloatingUnitWithProrationPriceParam

This is an alias to an internal type.

type NewMaximumAdjustmentType added in v0.121.0

type NewMaximumAdjustmentType = shared.NewMaximumAdjustmentType

This is an alias to an internal type.

type NewMaximumAppliesToAll added in v0.121.0

type NewMaximumAppliesToAll = shared.NewMaximumAppliesToAll

If set, the adjustment will apply to every price on the subscription.

This is an alias to an internal type.

type NewMaximumParam added in v0.121.0

type NewMaximumParam = shared.NewMaximumParam

This is an alias to an internal type.

type NewMaximumPriceType added in v0.121.0

type NewMaximumPriceType = shared.NewMaximumPriceType

If set, only prices of the specified type will have the adjustment applied.

This is an alias to an internal type.

type NewMinimumAdjustmentType added in v0.121.0

type NewMinimumAdjustmentType = shared.NewMinimumAdjustmentType

This is an alias to an internal type.

type NewMinimumAppliesToAll added in v0.121.0

type NewMinimumAppliesToAll = shared.NewMinimumAppliesToAll

If set, the adjustment will apply to every price on the subscription.

This is an alias to an internal type.

type NewMinimumParam added in v0.121.0

type NewMinimumParam = shared.NewMinimumParam

This is an alias to an internal type.

type NewMinimumPriceType added in v0.121.0

type NewMinimumPriceType = shared.NewMinimumPriceType

If set, only prices of the specified type will have the adjustment applied.

This is an alias to an internal type.

type NewPercentageDiscountAdjustmentType added in v0.121.0

type NewPercentageDiscountAdjustmentType = shared.NewPercentageDiscountAdjustmentType

This is an alias to an internal type.

type NewPercentageDiscountAppliesToAll added in v0.121.0

type NewPercentageDiscountAppliesToAll = shared.NewPercentageDiscountAppliesToAll

If set, the adjustment will apply to every price on the subscription.

This is an alias to an internal type.

type NewPercentageDiscountParam added in v0.121.0

type NewPercentageDiscountParam = shared.NewPercentageDiscountParam

This is an alias to an internal type.

type NewPercentageDiscountPriceType added in v0.121.0

type NewPercentageDiscountPriceType = shared.NewPercentageDiscountPriceType

If set, only prices of the specified type will have the adjustment applied.

This is an alias to an internal type.

type NewPlanBPSPriceCadence added in v0.121.0

type NewPlanBPSPriceCadence = shared.NewPlanBPSPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanBPSPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanBPSPriceConversionRateConfigConversionRateType = shared.NewPlanBPSPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanBPSPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanBPSPriceConversionRateConfigUnionParam = shared.NewPlanBPSPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanBPSPriceModelType added in v0.121.0

type NewPlanBPSPriceModelType = shared.NewPlanBPSPriceModelType

This is an alias to an internal type.

type NewPlanBPSPriceParam added in v0.121.0

type NewPlanBPSPriceParam = shared.NewPlanBPSPriceParam

This is an alias to an internal type.

type NewPlanBulkBPSPriceCadence added in v0.121.0

type NewPlanBulkBPSPriceCadence = shared.NewPlanBulkBPSPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanBulkBPSPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanBulkBPSPriceConversionRateConfigConversionRateType = shared.NewPlanBulkBPSPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanBulkBPSPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanBulkBPSPriceConversionRateConfigUnionParam = shared.NewPlanBulkBPSPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanBulkBPSPriceModelType added in v0.121.0

type NewPlanBulkBPSPriceModelType = shared.NewPlanBulkBPSPriceModelType

This is an alias to an internal type.

type NewPlanBulkBPSPriceParam added in v0.121.0

type NewPlanBulkBPSPriceParam = shared.NewPlanBulkBPSPriceParam

This is an alias to an internal type.

type NewPlanBulkPriceCadence added in v0.121.0

type NewPlanBulkPriceCadence = shared.NewPlanBulkPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanBulkPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanBulkPriceConversionRateConfigConversionRateType = shared.NewPlanBulkPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanBulkPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanBulkPriceConversionRateConfigUnionParam = shared.NewPlanBulkPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanBulkPriceModelType added in v0.121.0

type NewPlanBulkPriceModelType = shared.NewPlanBulkPriceModelType

This is an alias to an internal type.

type NewPlanBulkPriceParam added in v0.121.0

type NewPlanBulkPriceParam = shared.NewPlanBulkPriceParam

This is an alias to an internal type.

type NewPlanBulkWithProrationPriceCadence added in v0.121.0

type NewPlanBulkWithProrationPriceCadence = shared.NewPlanBulkWithProrationPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanBulkWithProrationPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanBulkWithProrationPriceConversionRateConfigConversionRateType = shared.NewPlanBulkWithProrationPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanBulkWithProrationPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanBulkWithProrationPriceConversionRateConfigUnionParam = shared.NewPlanBulkWithProrationPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanBulkWithProrationPriceModelType added in v0.121.0

type NewPlanBulkWithProrationPriceModelType = shared.NewPlanBulkWithProrationPriceModelType

This is an alias to an internal type.

type NewPlanBulkWithProrationPriceParam added in v0.121.0

type NewPlanBulkWithProrationPriceParam = shared.NewPlanBulkWithProrationPriceParam

This is an alias to an internal type.

type NewPlanCumulativeGroupedBulkPriceCadence added in v0.121.0

type NewPlanCumulativeGroupedBulkPriceCadence = shared.NewPlanCumulativeGroupedBulkPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanCumulativeGroupedBulkPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanCumulativeGroupedBulkPriceConversionRateConfigConversionRateType = shared.NewPlanCumulativeGroupedBulkPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanCumulativeGroupedBulkPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanCumulativeGroupedBulkPriceConversionRateConfigUnionParam = shared.NewPlanCumulativeGroupedBulkPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanCumulativeGroupedBulkPriceModelType added in v0.121.0

type NewPlanCumulativeGroupedBulkPriceModelType = shared.NewPlanCumulativeGroupedBulkPriceModelType

This is an alias to an internal type.

type NewPlanCumulativeGroupedBulkPriceParam added in v0.121.0

type NewPlanCumulativeGroupedBulkPriceParam = shared.NewPlanCumulativeGroupedBulkPriceParam

This is an alias to an internal type.

type NewPlanGroupedAllocationPriceCadence added in v0.121.0

type NewPlanGroupedAllocationPriceCadence = shared.NewPlanGroupedAllocationPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanGroupedAllocationPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanGroupedAllocationPriceConversionRateConfigConversionRateType = shared.NewPlanGroupedAllocationPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanGroupedAllocationPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanGroupedAllocationPriceConversionRateConfigUnionParam = shared.NewPlanGroupedAllocationPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanGroupedAllocationPriceModelType added in v0.121.0

type NewPlanGroupedAllocationPriceModelType = shared.NewPlanGroupedAllocationPriceModelType

This is an alias to an internal type.

type NewPlanGroupedAllocationPriceParam added in v0.121.0

type NewPlanGroupedAllocationPriceParam = shared.NewPlanGroupedAllocationPriceParam

This is an alias to an internal type.

type NewPlanGroupedTieredPackagePriceCadence added in v0.121.0

type NewPlanGroupedTieredPackagePriceCadence = shared.NewPlanGroupedTieredPackagePriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanGroupedTieredPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanGroupedTieredPackagePriceConversionRateConfigConversionRateType = shared.NewPlanGroupedTieredPackagePriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanGroupedTieredPackagePriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanGroupedTieredPackagePriceConversionRateConfigUnionParam = shared.NewPlanGroupedTieredPackagePriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanGroupedTieredPackagePriceModelType added in v0.121.0

type NewPlanGroupedTieredPackagePriceModelType = shared.NewPlanGroupedTieredPackagePriceModelType

This is an alias to an internal type.

type NewPlanGroupedTieredPackagePriceParam added in v0.121.0

type NewPlanGroupedTieredPackagePriceParam = shared.NewPlanGroupedTieredPackagePriceParam

This is an alias to an internal type.

type NewPlanGroupedTieredPriceCadence added in v0.121.0

type NewPlanGroupedTieredPriceCadence = shared.NewPlanGroupedTieredPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanGroupedTieredPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanGroupedTieredPriceConversionRateConfigConversionRateType = shared.NewPlanGroupedTieredPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanGroupedTieredPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanGroupedTieredPriceConversionRateConfigUnionParam = shared.NewPlanGroupedTieredPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanGroupedTieredPriceModelType added in v0.121.0

type NewPlanGroupedTieredPriceModelType = shared.NewPlanGroupedTieredPriceModelType

This is an alias to an internal type.

type NewPlanGroupedTieredPriceParam added in v0.121.0

type NewPlanGroupedTieredPriceParam = shared.NewPlanGroupedTieredPriceParam

This is an alias to an internal type.

type NewPlanGroupedWithMeteredMinimumPriceCadence added in v0.121.0

type NewPlanGroupedWithMeteredMinimumPriceCadence = shared.NewPlanGroupedWithMeteredMinimumPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType = shared.NewPlanGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanGroupedWithMeteredMinimumPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanGroupedWithMeteredMinimumPriceConversionRateConfigUnionParam = shared.NewPlanGroupedWithMeteredMinimumPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanGroupedWithMeteredMinimumPriceModelType added in v0.121.0

type NewPlanGroupedWithMeteredMinimumPriceModelType = shared.NewPlanGroupedWithMeteredMinimumPriceModelType

This is an alias to an internal type.

type NewPlanGroupedWithMeteredMinimumPriceParam added in v0.121.0

type NewPlanGroupedWithMeteredMinimumPriceParam = shared.NewPlanGroupedWithMeteredMinimumPriceParam

This is an alias to an internal type.

type NewPlanGroupedWithProratedMinimumPriceCadence added in v0.121.0

type NewPlanGroupedWithProratedMinimumPriceCadence = shared.NewPlanGroupedWithProratedMinimumPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType = shared.NewPlanGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanGroupedWithProratedMinimumPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanGroupedWithProratedMinimumPriceConversionRateConfigUnionParam = shared.NewPlanGroupedWithProratedMinimumPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanGroupedWithProratedMinimumPriceModelType added in v0.121.0

type NewPlanGroupedWithProratedMinimumPriceModelType = shared.NewPlanGroupedWithProratedMinimumPriceModelType

This is an alias to an internal type.

type NewPlanGroupedWithProratedMinimumPriceParam added in v0.121.0

type NewPlanGroupedWithProratedMinimumPriceParam = shared.NewPlanGroupedWithProratedMinimumPriceParam

This is an alias to an internal type.

type NewPlanMatrixPriceCadence added in v0.121.0

type NewPlanMatrixPriceCadence = shared.NewPlanMatrixPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanMatrixPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanMatrixPriceConversionRateConfigConversionRateType = shared.NewPlanMatrixPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanMatrixPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanMatrixPriceConversionRateConfigUnionParam = shared.NewPlanMatrixPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanMatrixPriceModelType added in v0.121.0

type NewPlanMatrixPriceModelType = shared.NewPlanMatrixPriceModelType

This is an alias to an internal type.

type NewPlanMatrixPriceParam added in v0.121.0

type NewPlanMatrixPriceParam = shared.NewPlanMatrixPriceParam

This is an alias to an internal type.

type NewPlanMatrixWithAllocationPriceCadence added in v0.121.0

type NewPlanMatrixWithAllocationPriceCadence = shared.NewPlanMatrixWithAllocationPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanMatrixWithAllocationPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanMatrixWithAllocationPriceConversionRateConfigConversionRateType = shared.NewPlanMatrixWithAllocationPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanMatrixWithAllocationPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanMatrixWithAllocationPriceConversionRateConfigUnionParam = shared.NewPlanMatrixWithAllocationPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanMatrixWithAllocationPriceModelType added in v0.121.0

type NewPlanMatrixWithAllocationPriceModelType = shared.NewPlanMatrixWithAllocationPriceModelType

This is an alias to an internal type.

type NewPlanMatrixWithAllocationPriceParam added in v0.121.0

type NewPlanMatrixWithAllocationPriceParam = shared.NewPlanMatrixWithAllocationPriceParam

This is an alias to an internal type.

type NewPlanMatrixWithDisplayNamePriceCadence added in v0.121.0

type NewPlanMatrixWithDisplayNamePriceCadence = shared.NewPlanMatrixWithDisplayNamePriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanMatrixWithDisplayNamePriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanMatrixWithDisplayNamePriceConversionRateConfigConversionRateType = shared.NewPlanMatrixWithDisplayNamePriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanMatrixWithDisplayNamePriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanMatrixWithDisplayNamePriceConversionRateConfigUnionParam = shared.NewPlanMatrixWithDisplayNamePriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanMatrixWithDisplayNamePriceModelType added in v0.121.0

type NewPlanMatrixWithDisplayNamePriceModelType = shared.NewPlanMatrixWithDisplayNamePriceModelType

This is an alias to an internal type.

type NewPlanMatrixWithDisplayNamePriceParam added in v0.121.0

type NewPlanMatrixWithDisplayNamePriceParam = shared.NewPlanMatrixWithDisplayNamePriceParam

This is an alias to an internal type.

type NewPlanMaxGroupTieredPackagePriceCadence added in v0.121.0

type NewPlanMaxGroupTieredPackagePriceCadence = shared.NewPlanMaxGroupTieredPackagePriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanMaxGroupTieredPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanMaxGroupTieredPackagePriceConversionRateConfigConversionRateType = shared.NewPlanMaxGroupTieredPackagePriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanMaxGroupTieredPackagePriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanMaxGroupTieredPackagePriceConversionRateConfigUnionParam = shared.NewPlanMaxGroupTieredPackagePriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanMaxGroupTieredPackagePriceModelType added in v0.121.0

type NewPlanMaxGroupTieredPackagePriceModelType = shared.NewPlanMaxGroupTieredPackagePriceModelType

This is an alias to an internal type.

type NewPlanMaxGroupTieredPackagePriceParam added in v0.121.0

type NewPlanMaxGroupTieredPackagePriceParam = shared.NewPlanMaxGroupTieredPackagePriceParam

This is an alias to an internal type.

type NewPlanPackagePriceCadence added in v0.121.0

type NewPlanPackagePriceCadence = shared.NewPlanPackagePriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanPackagePriceConversionRateConfigConversionRateType = shared.NewPlanPackagePriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanPackagePriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanPackagePriceConversionRateConfigUnionParam = shared.NewPlanPackagePriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanPackagePriceModelType added in v0.121.0

type NewPlanPackagePriceModelType = shared.NewPlanPackagePriceModelType

This is an alias to an internal type.

type NewPlanPackagePriceParam added in v0.121.0

type NewPlanPackagePriceParam = shared.NewPlanPackagePriceParam

This is an alias to an internal type.

type NewPlanPackageWithAllocationPriceCadence added in v0.121.0

type NewPlanPackageWithAllocationPriceCadence = shared.NewPlanPackageWithAllocationPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanPackageWithAllocationPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanPackageWithAllocationPriceConversionRateConfigConversionRateType = shared.NewPlanPackageWithAllocationPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanPackageWithAllocationPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanPackageWithAllocationPriceConversionRateConfigUnionParam = shared.NewPlanPackageWithAllocationPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanPackageWithAllocationPriceModelType added in v0.121.0

type NewPlanPackageWithAllocationPriceModelType = shared.NewPlanPackageWithAllocationPriceModelType

This is an alias to an internal type.

type NewPlanPackageWithAllocationPriceParam added in v0.121.0

type NewPlanPackageWithAllocationPriceParam = shared.NewPlanPackageWithAllocationPriceParam

This is an alias to an internal type.

type NewPlanScalableMatrixWithTieredPricingPriceCadence added in v0.121.0

type NewPlanScalableMatrixWithTieredPricingPriceCadence = shared.NewPlanScalableMatrixWithTieredPricingPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType = shared.NewPlanScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanScalableMatrixWithTieredPricingPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanScalableMatrixWithTieredPricingPriceConversionRateConfigUnionParam = shared.NewPlanScalableMatrixWithTieredPricingPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanScalableMatrixWithTieredPricingPriceModelType added in v0.121.0

type NewPlanScalableMatrixWithTieredPricingPriceModelType = shared.NewPlanScalableMatrixWithTieredPricingPriceModelType

This is an alias to an internal type.

type NewPlanScalableMatrixWithTieredPricingPriceParam added in v0.121.0

type NewPlanScalableMatrixWithTieredPricingPriceParam = shared.NewPlanScalableMatrixWithTieredPricingPriceParam

This is an alias to an internal type.

type NewPlanScalableMatrixWithUnitPricingPriceCadence added in v0.121.0

type NewPlanScalableMatrixWithUnitPricingPriceCadence = shared.NewPlanScalableMatrixWithUnitPricingPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType = shared.NewPlanScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanScalableMatrixWithUnitPricingPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanScalableMatrixWithUnitPricingPriceConversionRateConfigUnionParam = shared.NewPlanScalableMatrixWithUnitPricingPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanScalableMatrixWithUnitPricingPriceModelType added in v0.121.0

type NewPlanScalableMatrixWithUnitPricingPriceModelType = shared.NewPlanScalableMatrixWithUnitPricingPriceModelType

This is an alias to an internal type.

type NewPlanScalableMatrixWithUnitPricingPriceParam added in v0.121.0

type NewPlanScalableMatrixWithUnitPricingPriceParam = shared.NewPlanScalableMatrixWithUnitPricingPriceParam

This is an alias to an internal type.

type NewPlanThresholdTotalAmountPriceCadence added in v0.121.0

type NewPlanThresholdTotalAmountPriceCadence = shared.NewPlanThresholdTotalAmountPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanThresholdTotalAmountPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanThresholdTotalAmountPriceConversionRateConfigConversionRateType = shared.NewPlanThresholdTotalAmountPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanThresholdTotalAmountPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanThresholdTotalAmountPriceConversionRateConfigUnionParam = shared.NewPlanThresholdTotalAmountPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanThresholdTotalAmountPriceModelType added in v0.121.0

type NewPlanThresholdTotalAmountPriceModelType = shared.NewPlanThresholdTotalAmountPriceModelType

This is an alias to an internal type.

type NewPlanThresholdTotalAmountPriceParam added in v0.121.0

type NewPlanThresholdTotalAmountPriceParam = shared.NewPlanThresholdTotalAmountPriceParam

This is an alias to an internal type.

type NewPlanTierWithProrationPriceCadence added in v0.121.0

type NewPlanTierWithProrationPriceCadence = shared.NewPlanTierWithProrationPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanTierWithProrationPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanTierWithProrationPriceConversionRateConfigConversionRateType = shared.NewPlanTierWithProrationPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanTierWithProrationPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanTierWithProrationPriceConversionRateConfigUnionParam = shared.NewPlanTierWithProrationPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanTierWithProrationPriceModelType added in v0.121.0

type NewPlanTierWithProrationPriceModelType = shared.NewPlanTierWithProrationPriceModelType

This is an alias to an internal type.

type NewPlanTierWithProrationPriceParam added in v0.121.0

type NewPlanTierWithProrationPriceParam = shared.NewPlanTierWithProrationPriceParam

This is an alias to an internal type.

type NewPlanTieredBPSPriceCadence added in v0.121.0

type NewPlanTieredBPSPriceCadence = shared.NewPlanTieredBPSPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanTieredBPSPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanTieredBPSPriceConversionRateConfigConversionRateType = shared.NewPlanTieredBPSPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanTieredBPSPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanTieredBPSPriceConversionRateConfigUnionParam = shared.NewPlanTieredBPSPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanTieredBPSPriceModelType added in v0.121.0

type NewPlanTieredBPSPriceModelType = shared.NewPlanTieredBPSPriceModelType

This is an alias to an internal type.

type NewPlanTieredBPSPriceParam added in v0.121.0

type NewPlanTieredBPSPriceParam = shared.NewPlanTieredBPSPriceParam

This is an alias to an internal type.

type NewPlanTieredPackagePriceCadence added in v0.121.0

type NewPlanTieredPackagePriceCadence = shared.NewPlanTieredPackagePriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanTieredPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanTieredPackagePriceConversionRateConfigConversionRateType = shared.NewPlanTieredPackagePriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanTieredPackagePriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanTieredPackagePriceConversionRateConfigUnionParam = shared.NewPlanTieredPackagePriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanTieredPackagePriceModelType added in v0.121.0

type NewPlanTieredPackagePriceModelType = shared.NewPlanTieredPackagePriceModelType

This is an alias to an internal type.

type NewPlanTieredPackagePriceParam added in v0.121.0

type NewPlanTieredPackagePriceParam = shared.NewPlanTieredPackagePriceParam

This is an alias to an internal type.

type NewPlanTieredPackageWithMinimumPriceCadence added in v0.121.0

type NewPlanTieredPackageWithMinimumPriceCadence = shared.NewPlanTieredPackageWithMinimumPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanTieredPackageWithMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanTieredPackageWithMinimumPriceConversionRateConfigConversionRateType = shared.NewPlanTieredPackageWithMinimumPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanTieredPackageWithMinimumPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanTieredPackageWithMinimumPriceConversionRateConfigUnionParam = shared.NewPlanTieredPackageWithMinimumPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanTieredPackageWithMinimumPriceModelType added in v0.121.0

type NewPlanTieredPackageWithMinimumPriceModelType = shared.NewPlanTieredPackageWithMinimumPriceModelType

This is an alias to an internal type.

type NewPlanTieredPackageWithMinimumPriceParam added in v0.121.0

type NewPlanTieredPackageWithMinimumPriceParam = shared.NewPlanTieredPackageWithMinimumPriceParam

This is an alias to an internal type.

type NewPlanTieredPriceCadence added in v0.121.0

type NewPlanTieredPriceCadence = shared.NewPlanTieredPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanTieredPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanTieredPriceConversionRateConfigConversionRateType = shared.NewPlanTieredPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanTieredPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanTieredPriceConversionRateConfigUnionParam = shared.NewPlanTieredPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanTieredPriceModelType added in v0.121.0

type NewPlanTieredPriceModelType = shared.NewPlanTieredPriceModelType

This is an alias to an internal type.

type NewPlanTieredPriceParam added in v0.121.0

type NewPlanTieredPriceParam = shared.NewPlanTieredPriceParam

This is an alias to an internal type.

type NewPlanTieredWithMinimumPriceCadence added in v0.121.0

type NewPlanTieredWithMinimumPriceCadence = shared.NewPlanTieredWithMinimumPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanTieredWithMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanTieredWithMinimumPriceConversionRateConfigConversionRateType = shared.NewPlanTieredWithMinimumPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanTieredWithMinimumPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanTieredWithMinimumPriceConversionRateConfigUnionParam = shared.NewPlanTieredWithMinimumPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanTieredWithMinimumPriceModelType added in v0.121.0

type NewPlanTieredWithMinimumPriceModelType = shared.NewPlanTieredWithMinimumPriceModelType

This is an alias to an internal type.

type NewPlanTieredWithMinimumPriceParam added in v0.121.0

type NewPlanTieredWithMinimumPriceParam = shared.NewPlanTieredWithMinimumPriceParam

This is an alias to an internal type.

type NewPlanUnitPriceCadence added in v0.121.0

type NewPlanUnitPriceCadence = shared.NewPlanUnitPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanUnitPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanUnitPriceConversionRateConfigConversionRateType = shared.NewPlanUnitPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanUnitPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanUnitPriceConversionRateConfigUnionParam = shared.NewPlanUnitPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanUnitPriceModelType added in v0.121.0

type NewPlanUnitPriceModelType = shared.NewPlanUnitPriceModelType

This is an alias to an internal type.

type NewPlanUnitPriceParam added in v0.121.0

type NewPlanUnitPriceParam = shared.NewPlanUnitPriceParam

This is an alias to an internal type.

type NewPlanUnitWithPercentPriceCadence added in v0.121.0

type NewPlanUnitWithPercentPriceCadence = shared.NewPlanUnitWithPercentPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanUnitWithPercentPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanUnitWithPercentPriceConversionRateConfigConversionRateType = shared.NewPlanUnitWithPercentPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanUnitWithPercentPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanUnitWithPercentPriceConversionRateConfigUnionParam = shared.NewPlanUnitWithPercentPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanUnitWithPercentPriceModelType added in v0.121.0

type NewPlanUnitWithPercentPriceModelType = shared.NewPlanUnitWithPercentPriceModelType

This is an alias to an internal type.

type NewPlanUnitWithPercentPriceParam added in v0.121.0

type NewPlanUnitWithPercentPriceParam = shared.NewPlanUnitWithPercentPriceParam

This is an alias to an internal type.

type NewPlanUnitWithProrationPriceCadence added in v0.121.0

type NewPlanUnitWithProrationPriceCadence = shared.NewPlanUnitWithProrationPriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanUnitWithProrationPriceConversionRateConfigConversionRateType added in v0.121.0

type NewPlanUnitWithProrationPriceConversionRateConfigConversionRateType = shared.NewPlanUnitWithProrationPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanUnitWithProrationPriceConversionRateConfigUnionParam added in v0.121.0

type NewPlanUnitWithProrationPriceConversionRateConfigUnionParam = shared.NewPlanUnitWithProrationPriceConversionRateConfigUnionParam

The configuration for the rate of the price currency to the invoicing currency.

This is an alias to an internal type.

type NewPlanUnitWithProrationPriceModelType added in v0.121.0

type NewPlanUnitWithProrationPriceModelType = shared.NewPlanUnitWithProrationPriceModelType

This is an alias to an internal type.

type NewPlanUnitWithProrationPriceParam added in v0.121.0

type NewPlanUnitWithProrationPriceParam = shared.NewPlanUnitWithProrationPriceParam

This is an alias to an internal type.

type NewReportingConfigurationParam added in v0.121.0

type NewReportingConfigurationParam struct {
	Exempt param.Field[bool] `json:"exempt,required"`
}

func (NewReportingConfigurationParam) MarshalJSON added in v0.121.0

func (r NewReportingConfigurationParam) MarshalJSON() (data []byte, err error)

type NewSphereConfigurationParam added in v0.121.0

type NewSphereConfigurationParam struct {
	TaxExempt   param.Field[bool]                              `json:"tax_exempt,required"`
	TaxProvider param.Field[NewSphereConfigurationTaxProvider] `json:"tax_provider,required"`
}

func (NewSphereConfigurationParam) MarshalJSON added in v0.121.0

func (r NewSphereConfigurationParam) MarshalJSON() (data []byte, err error)

type NewSphereConfigurationTaxProvider added in v0.121.0

type NewSphereConfigurationTaxProvider string
const (
	NewSphereConfigurationTaxProviderSphere NewSphereConfigurationTaxProvider = "sphere"
)

func (NewSphereConfigurationTaxProvider) IsKnown added in v0.121.0

type NewSubscriptionBPSPriceCadence added in v0.121.0

type NewSubscriptionBPSPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionBPSPriceCadenceAnnual     NewSubscriptionBPSPriceCadence = "annual"
	NewSubscriptionBPSPriceCadenceSemiAnnual NewSubscriptionBPSPriceCadence = "semi_annual"
	NewSubscriptionBPSPriceCadenceMonthly    NewSubscriptionBPSPriceCadence = "monthly"
	NewSubscriptionBPSPriceCadenceQuarterly  NewSubscriptionBPSPriceCadence = "quarterly"
	NewSubscriptionBPSPriceCadenceOneTime    NewSubscriptionBPSPriceCadence = "one_time"
	NewSubscriptionBPSPriceCadenceCustom     NewSubscriptionBPSPriceCadence = "custom"
)

func (NewSubscriptionBPSPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionBPSPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionBPSPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionBPSPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionBPSPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionBPSPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionBPSPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionBPSPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionBPSPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionBPSPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionBPSPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                        `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                          `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionBPSPriceConversionRateConfigParam) ImplementsNewSubscriptionBPSPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionBPSPriceConversionRateConfigParam) ImplementsNewSubscriptionBPSPriceConversionRateConfigUnionParam()

func (NewSubscriptionBPSPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionBPSPriceConversionRateConfigParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionBPSPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionBPSPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionBPSPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionBPSPriceConversionRateConfigParam.

type NewSubscriptionBPSPriceModelType added in v0.121.0

type NewSubscriptionBPSPriceModelType string
const (
	NewSubscriptionBPSPriceModelTypeBPS NewSubscriptionBPSPriceModelType = "bps"
)

func (NewSubscriptionBPSPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionBPSPriceParam added in v0.121.0

type NewSubscriptionBPSPriceParam struct {
	BPSConfig param.Field[shared.BPSConfigParam] `json:"bps_config,required"`
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionBPSPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                           `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionBPSPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionBPSPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionBPSPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionBPSPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionBulkBPSPriceCadence added in v0.121.0

type NewSubscriptionBulkBPSPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionBulkBPSPriceCadenceAnnual     NewSubscriptionBulkBPSPriceCadence = "annual"
	NewSubscriptionBulkBPSPriceCadenceSemiAnnual NewSubscriptionBulkBPSPriceCadence = "semi_annual"
	NewSubscriptionBulkBPSPriceCadenceMonthly    NewSubscriptionBulkBPSPriceCadence = "monthly"
	NewSubscriptionBulkBPSPriceCadenceQuarterly  NewSubscriptionBulkBPSPriceCadence = "quarterly"
	NewSubscriptionBulkBPSPriceCadenceOneTime    NewSubscriptionBulkBPSPriceCadence = "one_time"
	NewSubscriptionBulkBPSPriceCadenceCustom     NewSubscriptionBulkBPSPriceCadence = "custom"
)

func (NewSubscriptionBulkBPSPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionBulkBPSPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionBulkBPSPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionBulkBPSPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionBulkBPSPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionBulkBPSPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionBulkBPSPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionBulkBPSPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionBulkBPSPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionBulkBPSPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionBulkBPSPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                            `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                              `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionBulkBPSPriceConversionRateConfigParam) ImplementsNewSubscriptionBulkBPSPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionBulkBPSPriceConversionRateConfigParam) ImplementsNewSubscriptionBulkBPSPriceConversionRateConfigUnionParam()

func (NewSubscriptionBulkBPSPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionBulkBPSPriceConversionRateConfigParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionBulkBPSPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionBulkBPSPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionBulkBPSPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionBulkBPSPriceConversionRateConfigParam.

type NewSubscriptionBulkBPSPriceModelType added in v0.121.0

type NewSubscriptionBulkBPSPriceModelType string
const (
	NewSubscriptionBulkBPSPriceModelTypeBulkBPS NewSubscriptionBulkBPSPriceModelType = "bulk_bps"
)

func (NewSubscriptionBulkBPSPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionBulkBPSPriceParam added in v0.121.0

type NewSubscriptionBulkBPSPriceParam struct {
	BulkBPSConfig param.Field[shared.BulkBPSConfigParam] `json:"bulk_bps_config,required"`
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionBulkBPSPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                               `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionBulkBPSPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionBulkBPSPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionBulkBPSPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionBulkBPSPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionBulkPriceCadence added in v0.121.0

type NewSubscriptionBulkPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionBulkPriceCadenceAnnual     NewSubscriptionBulkPriceCadence = "annual"
	NewSubscriptionBulkPriceCadenceSemiAnnual NewSubscriptionBulkPriceCadence = "semi_annual"
	NewSubscriptionBulkPriceCadenceMonthly    NewSubscriptionBulkPriceCadence = "monthly"
	NewSubscriptionBulkPriceCadenceQuarterly  NewSubscriptionBulkPriceCadence = "quarterly"
	NewSubscriptionBulkPriceCadenceOneTime    NewSubscriptionBulkPriceCadence = "one_time"
	NewSubscriptionBulkPriceCadenceCustom     NewSubscriptionBulkPriceCadence = "custom"
)

func (NewSubscriptionBulkPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionBulkPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionBulkPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionBulkPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionBulkPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionBulkPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionBulkPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionBulkPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionBulkPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionBulkPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionBulkPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                         `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                           `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionBulkPriceConversionRateConfigParam) ImplementsNewSubscriptionBulkPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionBulkPriceConversionRateConfigParam) ImplementsNewSubscriptionBulkPriceConversionRateConfigUnionParam()

func (NewSubscriptionBulkPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionBulkPriceConversionRateConfigParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionBulkPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionBulkPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionBulkPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionBulkPriceConversionRateConfigParam.

type NewSubscriptionBulkPriceModelType added in v0.121.0

type NewSubscriptionBulkPriceModelType string
const (
	NewSubscriptionBulkPriceModelTypeBulk NewSubscriptionBulkPriceModelType = "bulk"
)

func (NewSubscriptionBulkPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionBulkPriceParam added in v0.121.0

type NewSubscriptionBulkPriceParam struct {
	BulkConfig param.Field[shared.BulkConfigParam] `json:"bulk_config,required"`
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionBulkPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                            `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionBulkPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionBulkPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionBulkPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionBulkPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionBulkWithProrationPriceCadence added in v0.121.0

type NewSubscriptionBulkWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionBulkWithProrationPriceCadenceAnnual     NewSubscriptionBulkWithProrationPriceCadence = "annual"
	NewSubscriptionBulkWithProrationPriceCadenceSemiAnnual NewSubscriptionBulkWithProrationPriceCadence = "semi_annual"
	NewSubscriptionBulkWithProrationPriceCadenceMonthly    NewSubscriptionBulkWithProrationPriceCadence = "monthly"
	NewSubscriptionBulkWithProrationPriceCadenceQuarterly  NewSubscriptionBulkWithProrationPriceCadence = "quarterly"
	NewSubscriptionBulkWithProrationPriceCadenceOneTime    NewSubscriptionBulkWithProrationPriceCadence = "one_time"
	NewSubscriptionBulkWithProrationPriceCadenceCustom     NewSubscriptionBulkWithProrationPriceCadence = "custom"
)

func (NewSubscriptionBulkWithProrationPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionBulkWithProrationPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionBulkWithProrationPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionBulkWithProrationPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionBulkWithProrationPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionBulkWithProrationPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionBulkWithProrationPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionBulkWithProrationPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionBulkWithProrationPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionBulkWithProrationPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionBulkWithProrationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                      `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                        `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionBulkWithProrationPriceConversionRateConfigParam) ImplementsNewSubscriptionBulkWithProrationPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionBulkWithProrationPriceConversionRateConfigParam) ImplementsNewSubscriptionBulkWithProrationPriceConversionRateConfigUnionParam()

func (NewSubscriptionBulkWithProrationPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionBulkWithProrationPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionBulkWithProrationPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionBulkWithProrationPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionBulkWithProrationPriceConversionRateConfigParam.

type NewSubscriptionBulkWithProrationPriceModelType added in v0.121.0

type NewSubscriptionBulkWithProrationPriceModelType string
const (
	NewSubscriptionBulkWithProrationPriceModelTypeBulkWithProration NewSubscriptionBulkWithProrationPriceModelType = "bulk_with_proration"
)

func (NewSubscriptionBulkWithProrationPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionBulkWithProrationPriceParam added in v0.121.0

type NewSubscriptionBulkWithProrationPriceParam struct {
	BulkWithProrationConfig param.Field[map[string]interface{}] `json:"bulk_with_proration_config,required"`
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionBulkWithProrationPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                         `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionBulkWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionBulkWithProrationPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionBulkWithProrationPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionBulkWithProrationPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionCumulativeGroupedBulkPriceCadence added in v0.121.0

type NewSubscriptionCumulativeGroupedBulkPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionCumulativeGroupedBulkPriceCadenceAnnual     NewSubscriptionCumulativeGroupedBulkPriceCadence = "annual"
	NewSubscriptionCumulativeGroupedBulkPriceCadenceSemiAnnual NewSubscriptionCumulativeGroupedBulkPriceCadence = "semi_annual"
	NewSubscriptionCumulativeGroupedBulkPriceCadenceMonthly    NewSubscriptionCumulativeGroupedBulkPriceCadence = "monthly"
	NewSubscriptionCumulativeGroupedBulkPriceCadenceQuarterly  NewSubscriptionCumulativeGroupedBulkPriceCadence = "quarterly"
	NewSubscriptionCumulativeGroupedBulkPriceCadenceOneTime    NewSubscriptionCumulativeGroupedBulkPriceCadence = "one_time"
	NewSubscriptionCumulativeGroupedBulkPriceCadenceCustom     NewSubscriptionCumulativeGroupedBulkPriceCadence = "custom"
)

func (NewSubscriptionCumulativeGroupedBulkPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                          `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                            `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigParam) ImplementsNewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigParam) ImplementsNewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigUnionParam()

func (NewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigParam.

type NewSubscriptionCumulativeGroupedBulkPriceModelType added in v0.121.0

type NewSubscriptionCumulativeGroupedBulkPriceModelType string
const (
	NewSubscriptionCumulativeGroupedBulkPriceModelTypeCumulativeGroupedBulk NewSubscriptionCumulativeGroupedBulkPriceModelType = "cumulative_grouped_bulk"
)

func (NewSubscriptionCumulativeGroupedBulkPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionCumulativeGroupedBulkPriceParam added in v0.121.0

type NewSubscriptionCumulativeGroupedBulkPriceParam struct {
	// The cadence to bill for this price on.
	Cadence                     param.Field[NewSubscriptionCumulativeGroupedBulkPriceCadence] `json:"cadence,required"`
	CumulativeGroupedBulkConfig param.Field[map[string]interface{}]                           `json:"cumulative_grouped_bulk_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                             `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionCumulativeGroupedBulkPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionCumulativeGroupedBulkPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionCumulativeGroupedBulkPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionGroupedAllocationPriceCadence added in v0.121.0

type NewSubscriptionGroupedAllocationPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionGroupedAllocationPriceCadenceAnnual     NewSubscriptionGroupedAllocationPriceCadence = "annual"
	NewSubscriptionGroupedAllocationPriceCadenceSemiAnnual NewSubscriptionGroupedAllocationPriceCadence = "semi_annual"
	NewSubscriptionGroupedAllocationPriceCadenceMonthly    NewSubscriptionGroupedAllocationPriceCadence = "monthly"
	NewSubscriptionGroupedAllocationPriceCadenceQuarterly  NewSubscriptionGroupedAllocationPriceCadence = "quarterly"
	NewSubscriptionGroupedAllocationPriceCadenceOneTime    NewSubscriptionGroupedAllocationPriceCadence = "one_time"
	NewSubscriptionGroupedAllocationPriceCadenceCustom     NewSubscriptionGroupedAllocationPriceCadence = "custom"
)

func (NewSubscriptionGroupedAllocationPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionGroupedAllocationPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionGroupedAllocationPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionGroupedAllocationPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionGroupedAllocationPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionGroupedAllocationPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionGroupedAllocationPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionGroupedAllocationPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionGroupedAllocationPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionGroupedAllocationPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionGroupedAllocationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                      `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                        `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionGroupedAllocationPriceConversionRateConfigParam) ImplementsNewSubscriptionGroupedAllocationPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionGroupedAllocationPriceConversionRateConfigParam) ImplementsNewSubscriptionGroupedAllocationPriceConversionRateConfigUnionParam()

func (NewSubscriptionGroupedAllocationPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionGroupedAllocationPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionGroupedAllocationPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionGroupedAllocationPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionGroupedAllocationPriceConversionRateConfigParam.

type NewSubscriptionGroupedAllocationPriceModelType added in v0.121.0

type NewSubscriptionGroupedAllocationPriceModelType string
const (
	NewSubscriptionGroupedAllocationPriceModelTypeGroupedAllocation NewSubscriptionGroupedAllocationPriceModelType = "grouped_allocation"
)

func (NewSubscriptionGroupedAllocationPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionGroupedAllocationPriceParam added in v0.121.0

type NewSubscriptionGroupedAllocationPriceParam struct {
	// The cadence to bill for this price on.
	Cadence                 param.Field[NewSubscriptionGroupedAllocationPriceCadence] `json:"cadence,required"`
	GroupedAllocationConfig param.Field[map[string]interface{}]                       `json:"grouped_allocation_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                         `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionGroupedAllocationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionGroupedAllocationPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionGroupedAllocationPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionGroupedAllocationPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionGroupedTieredPackagePriceCadence added in v0.121.0

type NewSubscriptionGroupedTieredPackagePriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionGroupedTieredPackagePriceCadenceAnnual     NewSubscriptionGroupedTieredPackagePriceCadence = "annual"
	NewSubscriptionGroupedTieredPackagePriceCadenceSemiAnnual NewSubscriptionGroupedTieredPackagePriceCadence = "semi_annual"
	NewSubscriptionGroupedTieredPackagePriceCadenceMonthly    NewSubscriptionGroupedTieredPackagePriceCadence = "monthly"
	NewSubscriptionGroupedTieredPackagePriceCadenceQuarterly  NewSubscriptionGroupedTieredPackagePriceCadence = "quarterly"
	NewSubscriptionGroupedTieredPackagePriceCadenceOneTime    NewSubscriptionGroupedTieredPackagePriceCadence = "one_time"
	NewSubscriptionGroupedTieredPackagePriceCadenceCustom     NewSubscriptionGroupedTieredPackagePriceCadence = "custom"
)

func (NewSubscriptionGroupedTieredPackagePriceCadence) IsKnown added in v0.121.0

type NewSubscriptionGroupedTieredPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionGroupedTieredPackagePriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionGroupedTieredPackagePriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionGroupedTieredPackagePriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionGroupedTieredPackagePriceConversionRateConfigConversionRateTypeTiered NewSubscriptionGroupedTieredPackagePriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionGroupedTieredPackagePriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionGroupedTieredPackagePriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionGroupedTieredPackagePriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionGroupedTieredPackagePriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                         `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                           `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionGroupedTieredPackagePriceConversionRateConfigParam) ImplementsNewSubscriptionGroupedTieredPackagePriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionGroupedTieredPackagePriceConversionRateConfigParam) ImplementsNewSubscriptionGroupedTieredPackagePriceConversionRateConfigUnionParam()

func (NewSubscriptionGroupedTieredPackagePriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionGroupedTieredPackagePriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionGroupedTieredPackagePriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionGroupedTieredPackagePriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionGroupedTieredPackagePriceConversionRateConfigParam.

type NewSubscriptionGroupedTieredPackagePriceModelType added in v0.121.0

type NewSubscriptionGroupedTieredPackagePriceModelType string
const (
	NewSubscriptionGroupedTieredPackagePriceModelTypeGroupedTieredPackage NewSubscriptionGroupedTieredPackagePriceModelType = "grouped_tiered_package"
)

func (NewSubscriptionGroupedTieredPackagePriceModelType) IsKnown added in v0.121.0

type NewSubscriptionGroupedTieredPackagePriceParam added in v0.121.0

type NewSubscriptionGroupedTieredPackagePriceParam struct {
	// The cadence to bill for this price on.
	Cadence                    param.Field[NewSubscriptionGroupedTieredPackagePriceCadence] `json:"cadence,required"`
	GroupedTieredPackageConfig param.Field[map[string]interface{}]                          `json:"grouped_tiered_package_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                            `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionGroupedTieredPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionGroupedTieredPackagePriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionGroupedTieredPackagePriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionGroupedTieredPackagePriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionGroupedTieredPriceCadence added in v0.121.0

type NewSubscriptionGroupedTieredPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionGroupedTieredPriceCadenceAnnual     NewSubscriptionGroupedTieredPriceCadence = "annual"
	NewSubscriptionGroupedTieredPriceCadenceSemiAnnual NewSubscriptionGroupedTieredPriceCadence = "semi_annual"
	NewSubscriptionGroupedTieredPriceCadenceMonthly    NewSubscriptionGroupedTieredPriceCadence = "monthly"
	NewSubscriptionGroupedTieredPriceCadenceQuarterly  NewSubscriptionGroupedTieredPriceCadence = "quarterly"
	NewSubscriptionGroupedTieredPriceCadenceOneTime    NewSubscriptionGroupedTieredPriceCadence = "one_time"
	NewSubscriptionGroupedTieredPriceCadenceCustom     NewSubscriptionGroupedTieredPriceCadence = "custom"
)

func (NewSubscriptionGroupedTieredPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionGroupedTieredPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionGroupedTieredPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionGroupedTieredPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionGroupedTieredPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionGroupedTieredPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionGroupedTieredPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionGroupedTieredPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionGroupedTieredPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionGroupedTieredPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionGroupedTieredPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                  `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                    `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionGroupedTieredPriceConversionRateConfigParam) ImplementsNewSubscriptionGroupedTieredPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionGroupedTieredPriceConversionRateConfigParam) ImplementsNewSubscriptionGroupedTieredPriceConversionRateConfigUnionParam()

func (NewSubscriptionGroupedTieredPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionGroupedTieredPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionGroupedTieredPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionGroupedTieredPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionGroupedTieredPriceConversionRateConfigParam.

type NewSubscriptionGroupedTieredPriceModelType added in v0.121.0

type NewSubscriptionGroupedTieredPriceModelType string
const (
	NewSubscriptionGroupedTieredPriceModelTypeGroupedTiered NewSubscriptionGroupedTieredPriceModelType = "grouped_tiered"
)

func (NewSubscriptionGroupedTieredPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionGroupedTieredPriceParam added in v0.121.0

type NewSubscriptionGroupedTieredPriceParam struct {
	// The cadence to bill for this price on.
	Cadence             param.Field[NewSubscriptionGroupedTieredPriceCadence] `json:"cadence,required"`
	GroupedTieredConfig param.Field[map[string]interface{}]                   `json:"grouped_tiered_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                     `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionGroupedTieredPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionGroupedTieredPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionGroupedTieredPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionGroupedTieredPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionGroupedWithMeteredMinimumPriceCadence added in v0.121.0

type NewSubscriptionGroupedWithMeteredMinimumPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionGroupedWithMeteredMinimumPriceCadenceAnnual     NewSubscriptionGroupedWithMeteredMinimumPriceCadence = "annual"
	NewSubscriptionGroupedWithMeteredMinimumPriceCadenceSemiAnnual NewSubscriptionGroupedWithMeteredMinimumPriceCadence = "semi_annual"
	NewSubscriptionGroupedWithMeteredMinimumPriceCadenceMonthly    NewSubscriptionGroupedWithMeteredMinimumPriceCadence = "monthly"
	NewSubscriptionGroupedWithMeteredMinimumPriceCadenceQuarterly  NewSubscriptionGroupedWithMeteredMinimumPriceCadence = "quarterly"
	NewSubscriptionGroupedWithMeteredMinimumPriceCadenceOneTime    NewSubscriptionGroupedWithMeteredMinimumPriceCadence = "one_time"
	NewSubscriptionGroupedWithMeteredMinimumPriceCadenceCustom     NewSubscriptionGroupedWithMeteredMinimumPriceCadence = "custom"
)

func (NewSubscriptionGroupedWithMeteredMinimumPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                              `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigParam) ImplementsNewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigParam) ImplementsNewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigUnionParam()

func (NewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigParam.

type NewSubscriptionGroupedWithMeteredMinimumPriceModelType added in v0.121.0

type NewSubscriptionGroupedWithMeteredMinimumPriceModelType string
const (
	NewSubscriptionGroupedWithMeteredMinimumPriceModelTypeGroupedWithMeteredMinimum NewSubscriptionGroupedWithMeteredMinimumPriceModelType = "grouped_with_metered_minimum"
)

func (NewSubscriptionGroupedWithMeteredMinimumPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionGroupedWithMeteredMinimumPriceParam added in v0.121.0

type NewSubscriptionGroupedWithMeteredMinimumPriceParam struct {
	// The cadence to bill for this price on.
	Cadence                         param.Field[NewSubscriptionGroupedWithMeteredMinimumPriceCadence] `json:"cadence,required"`
	GroupedWithMeteredMinimumConfig param.Field[map[string]interface{}]                               `json:"grouped_with_metered_minimum_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                 `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionGroupedWithMeteredMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionGroupedWithMeteredMinimumPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionGroupedWithMeteredMinimumPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionGroupedWithProratedMinimumPriceCadence added in v0.121.0

type NewSubscriptionGroupedWithProratedMinimumPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionGroupedWithProratedMinimumPriceCadenceAnnual     NewSubscriptionGroupedWithProratedMinimumPriceCadence = "annual"
	NewSubscriptionGroupedWithProratedMinimumPriceCadenceSemiAnnual NewSubscriptionGroupedWithProratedMinimumPriceCadence = "semi_annual"
	NewSubscriptionGroupedWithProratedMinimumPriceCadenceMonthly    NewSubscriptionGroupedWithProratedMinimumPriceCadence = "monthly"
	NewSubscriptionGroupedWithProratedMinimumPriceCadenceQuarterly  NewSubscriptionGroupedWithProratedMinimumPriceCadence = "quarterly"
	NewSubscriptionGroupedWithProratedMinimumPriceCadenceOneTime    NewSubscriptionGroupedWithProratedMinimumPriceCadence = "one_time"
	NewSubscriptionGroupedWithProratedMinimumPriceCadenceCustom     NewSubscriptionGroupedWithProratedMinimumPriceCadence = "custom"
)

func (NewSubscriptionGroupedWithProratedMinimumPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                               `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                 `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigParam) ImplementsNewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigParam) ImplementsNewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigUnionParam()

func (NewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigParam.

type NewSubscriptionGroupedWithProratedMinimumPriceModelType added in v0.121.0

type NewSubscriptionGroupedWithProratedMinimumPriceModelType string
const (
	NewSubscriptionGroupedWithProratedMinimumPriceModelTypeGroupedWithProratedMinimum NewSubscriptionGroupedWithProratedMinimumPriceModelType = "grouped_with_prorated_minimum"
)

func (NewSubscriptionGroupedWithProratedMinimumPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionGroupedWithProratedMinimumPriceParam added in v0.121.0

type NewSubscriptionGroupedWithProratedMinimumPriceParam struct {
	// The cadence to bill for this price on.
	Cadence                          param.Field[NewSubscriptionGroupedWithProratedMinimumPriceCadence] `json:"cadence,required"`
	GroupedWithProratedMinimumConfig param.Field[map[string]interface{}]                                `json:"grouped_with_prorated_minimum_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                  `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionGroupedWithProratedMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionGroupedWithProratedMinimumPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionGroupedWithProratedMinimumPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionMatrixPriceCadence added in v0.121.0

type NewSubscriptionMatrixPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionMatrixPriceCadenceAnnual     NewSubscriptionMatrixPriceCadence = "annual"
	NewSubscriptionMatrixPriceCadenceSemiAnnual NewSubscriptionMatrixPriceCadence = "semi_annual"
	NewSubscriptionMatrixPriceCadenceMonthly    NewSubscriptionMatrixPriceCadence = "monthly"
	NewSubscriptionMatrixPriceCadenceQuarterly  NewSubscriptionMatrixPriceCadence = "quarterly"
	NewSubscriptionMatrixPriceCadenceOneTime    NewSubscriptionMatrixPriceCadence = "one_time"
	NewSubscriptionMatrixPriceCadenceCustom     NewSubscriptionMatrixPriceCadence = "custom"
)

func (NewSubscriptionMatrixPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionMatrixPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionMatrixPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionMatrixPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionMatrixPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionMatrixPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionMatrixPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionMatrixPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionMatrixPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionMatrixPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionMatrixPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                           `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                             `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionMatrixPriceConversionRateConfigParam) ImplementsNewSubscriptionMatrixPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionMatrixPriceConversionRateConfigParam) ImplementsNewSubscriptionMatrixPriceConversionRateConfigUnionParam()

func (NewSubscriptionMatrixPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionMatrixPriceConversionRateConfigParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionMatrixPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionMatrixPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionMatrixPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionMatrixPriceConversionRateConfigParam.

type NewSubscriptionMatrixPriceModelType added in v0.121.0

type NewSubscriptionMatrixPriceModelType string
const (
	NewSubscriptionMatrixPriceModelTypeMatrix NewSubscriptionMatrixPriceModelType = "matrix"
)

func (NewSubscriptionMatrixPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionMatrixPriceParam added in v0.121.0

type NewSubscriptionMatrixPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionMatrixPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID       param.Field[string]                              `json:"item_id,required"`
	MatrixConfig param.Field[shared.MatrixConfigParam]            `json:"matrix_config,required"`
	ModelType    param.Field[NewSubscriptionMatrixPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionMatrixPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionMatrixPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionMatrixPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionMatrixWithAllocationPriceCadence added in v0.121.0

type NewSubscriptionMatrixWithAllocationPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionMatrixWithAllocationPriceCadenceAnnual     NewSubscriptionMatrixWithAllocationPriceCadence = "annual"
	NewSubscriptionMatrixWithAllocationPriceCadenceSemiAnnual NewSubscriptionMatrixWithAllocationPriceCadence = "semi_annual"
	NewSubscriptionMatrixWithAllocationPriceCadenceMonthly    NewSubscriptionMatrixWithAllocationPriceCadence = "monthly"
	NewSubscriptionMatrixWithAllocationPriceCadenceQuarterly  NewSubscriptionMatrixWithAllocationPriceCadence = "quarterly"
	NewSubscriptionMatrixWithAllocationPriceCadenceOneTime    NewSubscriptionMatrixWithAllocationPriceCadence = "one_time"
	NewSubscriptionMatrixWithAllocationPriceCadenceCustom     NewSubscriptionMatrixWithAllocationPriceCadence = "custom"
)

func (NewSubscriptionMatrixWithAllocationPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionMatrixWithAllocationPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionMatrixWithAllocationPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionMatrixWithAllocationPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionMatrixWithAllocationPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionMatrixWithAllocationPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionMatrixWithAllocationPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionMatrixWithAllocationPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionMatrixWithAllocationPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionMatrixWithAllocationPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionMatrixWithAllocationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                         `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                           `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionMatrixWithAllocationPriceConversionRateConfigParam) ImplementsNewSubscriptionMatrixWithAllocationPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionMatrixWithAllocationPriceConversionRateConfigParam) ImplementsNewSubscriptionMatrixWithAllocationPriceConversionRateConfigUnionParam()

func (NewSubscriptionMatrixWithAllocationPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionMatrixWithAllocationPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionMatrixWithAllocationPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionMatrixWithAllocationPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionMatrixWithAllocationPriceConversionRateConfigParam.

type NewSubscriptionMatrixWithAllocationPriceModelType added in v0.121.0

type NewSubscriptionMatrixWithAllocationPriceModelType string
const (
	NewSubscriptionMatrixWithAllocationPriceModelTypeMatrixWithAllocation NewSubscriptionMatrixWithAllocationPriceModelType = "matrix_with_allocation"
)

func (NewSubscriptionMatrixWithAllocationPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionMatrixWithAllocationPriceParam added in v0.121.0

type NewSubscriptionMatrixWithAllocationPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionMatrixWithAllocationPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID                     param.Field[string]                                            `json:"item_id,required"`
	MatrixWithAllocationConfig param.Field[shared.MatrixWithAllocationConfigParam]            `json:"matrix_with_allocation_config,required"`
	ModelType                  param.Field[NewSubscriptionMatrixWithAllocationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionMatrixWithAllocationPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionMatrixWithAllocationPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionMatrixWithAllocationPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionMatrixWithDisplayNamePriceCadence added in v0.121.0

type NewSubscriptionMatrixWithDisplayNamePriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionMatrixWithDisplayNamePriceCadenceAnnual     NewSubscriptionMatrixWithDisplayNamePriceCadence = "annual"
	NewSubscriptionMatrixWithDisplayNamePriceCadenceSemiAnnual NewSubscriptionMatrixWithDisplayNamePriceCadence = "semi_annual"
	NewSubscriptionMatrixWithDisplayNamePriceCadenceMonthly    NewSubscriptionMatrixWithDisplayNamePriceCadence = "monthly"
	NewSubscriptionMatrixWithDisplayNamePriceCadenceQuarterly  NewSubscriptionMatrixWithDisplayNamePriceCadence = "quarterly"
	NewSubscriptionMatrixWithDisplayNamePriceCadenceOneTime    NewSubscriptionMatrixWithDisplayNamePriceCadence = "one_time"
	NewSubscriptionMatrixWithDisplayNamePriceCadenceCustom     NewSubscriptionMatrixWithDisplayNamePriceCadence = "custom"
)

func (NewSubscriptionMatrixWithDisplayNamePriceCadence) IsKnown added in v0.121.0

type NewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigConversionRateTypeTiered NewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                          `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                            `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigParam) ImplementsNewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigParam) ImplementsNewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigUnionParam()

func (NewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigParam.

type NewSubscriptionMatrixWithDisplayNamePriceModelType added in v0.121.0

type NewSubscriptionMatrixWithDisplayNamePriceModelType string
const (
	NewSubscriptionMatrixWithDisplayNamePriceModelTypeMatrixWithDisplayName NewSubscriptionMatrixWithDisplayNamePriceModelType = "matrix_with_display_name"
)

func (NewSubscriptionMatrixWithDisplayNamePriceModelType) IsKnown added in v0.121.0

type NewSubscriptionMatrixWithDisplayNamePriceParam added in v0.121.0

type NewSubscriptionMatrixWithDisplayNamePriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionMatrixWithDisplayNamePriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID                      param.Field[string]                                             `json:"item_id,required"`
	MatrixWithDisplayNameConfig param.Field[map[string]interface{}]                             `json:"matrix_with_display_name_config,required"`
	ModelType                   param.Field[NewSubscriptionMatrixWithDisplayNamePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionMatrixWithDisplayNamePriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionMatrixWithDisplayNamePriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionMaxGroupTieredPackagePriceCadence added in v0.121.0

type NewSubscriptionMaxGroupTieredPackagePriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionMaxGroupTieredPackagePriceCadenceAnnual     NewSubscriptionMaxGroupTieredPackagePriceCadence = "annual"
	NewSubscriptionMaxGroupTieredPackagePriceCadenceSemiAnnual NewSubscriptionMaxGroupTieredPackagePriceCadence = "semi_annual"
	NewSubscriptionMaxGroupTieredPackagePriceCadenceMonthly    NewSubscriptionMaxGroupTieredPackagePriceCadence = "monthly"
	NewSubscriptionMaxGroupTieredPackagePriceCadenceQuarterly  NewSubscriptionMaxGroupTieredPackagePriceCadence = "quarterly"
	NewSubscriptionMaxGroupTieredPackagePriceCadenceOneTime    NewSubscriptionMaxGroupTieredPackagePriceCadence = "one_time"
	NewSubscriptionMaxGroupTieredPackagePriceCadenceCustom     NewSubscriptionMaxGroupTieredPackagePriceCadence = "custom"
)

func (NewSubscriptionMaxGroupTieredPackagePriceCadence) IsKnown added in v0.121.0

type NewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigConversionRateTypeTiered NewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                          `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                            `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigParam) ImplementsNewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigParam) ImplementsNewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigUnionParam()

func (NewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigParam.

type NewSubscriptionMaxGroupTieredPackagePriceModelType added in v0.121.0

type NewSubscriptionMaxGroupTieredPackagePriceModelType string
const (
	NewSubscriptionMaxGroupTieredPackagePriceModelTypeMaxGroupTieredPackage NewSubscriptionMaxGroupTieredPackagePriceModelType = "max_group_tiered_package"
)

func (NewSubscriptionMaxGroupTieredPackagePriceModelType) IsKnown added in v0.121.0

type NewSubscriptionMaxGroupTieredPackagePriceParam added in v0.121.0

type NewSubscriptionMaxGroupTieredPackagePriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionMaxGroupTieredPackagePriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID                      param.Field[string]                                             `json:"item_id,required"`
	MaxGroupTieredPackageConfig param.Field[map[string]interface{}]                             `json:"max_group_tiered_package_config,required"`
	ModelType                   param.Field[NewSubscriptionMaxGroupTieredPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionMaxGroupTieredPackagePriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionMaxGroupTieredPackagePriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionPackagePriceCadence added in v0.121.0

type NewSubscriptionPackagePriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPackagePriceCadenceAnnual     NewSubscriptionPackagePriceCadence = "annual"
	NewSubscriptionPackagePriceCadenceSemiAnnual NewSubscriptionPackagePriceCadence = "semi_annual"
	NewSubscriptionPackagePriceCadenceMonthly    NewSubscriptionPackagePriceCadence = "monthly"
	NewSubscriptionPackagePriceCadenceQuarterly  NewSubscriptionPackagePriceCadence = "quarterly"
	NewSubscriptionPackagePriceCadenceOneTime    NewSubscriptionPackagePriceCadence = "one_time"
	NewSubscriptionPackagePriceCadenceCustom     NewSubscriptionPackagePriceCadence = "custom"
)

func (NewSubscriptionPackagePriceCadence) IsKnown added in v0.121.0

type NewSubscriptionPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionPackagePriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionPackagePriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionPackagePriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionPackagePriceConversionRateConfigConversionRateTypeTiered NewSubscriptionPackagePriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionPackagePriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionPackagePriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionPackagePriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionPackagePriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                            `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                              `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionPackagePriceConversionRateConfigParam) ImplementsNewSubscriptionPackagePriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionPackagePriceConversionRateConfigParam) ImplementsNewSubscriptionPackagePriceConversionRateConfigUnionParam()

func (NewSubscriptionPackagePriceConversionRateConfigParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionPackagePriceConversionRateConfigParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionPackagePriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionPackagePriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionPackagePriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionPackagePriceConversionRateConfigParam.

type NewSubscriptionPackagePriceModelType added in v0.121.0

type NewSubscriptionPackagePriceModelType string
const (
	NewSubscriptionPackagePriceModelTypePackage NewSubscriptionPackagePriceModelType = "package"
)

func (NewSubscriptionPackagePriceModelType) IsKnown added in v0.121.0

type NewSubscriptionPackagePriceParam added in v0.121.0

type NewSubscriptionPackagePriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPackagePriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                               `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name          param.Field[string]                    `json:"name,required"`
	PackageConfig param.Field[shared.PackageConfigParam] `json:"package_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionPackagePriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPackagePriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionPackagePriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionPackageWithAllocationPriceCadence added in v0.121.0

type NewSubscriptionPackageWithAllocationPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPackageWithAllocationPriceCadenceAnnual     NewSubscriptionPackageWithAllocationPriceCadence = "annual"
	NewSubscriptionPackageWithAllocationPriceCadenceSemiAnnual NewSubscriptionPackageWithAllocationPriceCadence = "semi_annual"
	NewSubscriptionPackageWithAllocationPriceCadenceMonthly    NewSubscriptionPackageWithAllocationPriceCadence = "monthly"
	NewSubscriptionPackageWithAllocationPriceCadenceQuarterly  NewSubscriptionPackageWithAllocationPriceCadence = "quarterly"
	NewSubscriptionPackageWithAllocationPriceCadenceOneTime    NewSubscriptionPackageWithAllocationPriceCadence = "one_time"
	NewSubscriptionPackageWithAllocationPriceCadenceCustom     NewSubscriptionPackageWithAllocationPriceCadence = "custom"
)

func (NewSubscriptionPackageWithAllocationPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionPackageWithAllocationPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionPackageWithAllocationPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionPackageWithAllocationPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionPackageWithAllocationPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionPackageWithAllocationPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionPackageWithAllocationPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionPackageWithAllocationPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionPackageWithAllocationPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionPackageWithAllocationPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionPackageWithAllocationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                          `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                            `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionPackageWithAllocationPriceConversionRateConfigParam) ImplementsNewSubscriptionPackageWithAllocationPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionPackageWithAllocationPriceConversionRateConfigParam) ImplementsNewSubscriptionPackageWithAllocationPriceConversionRateConfigUnionParam()

func (NewSubscriptionPackageWithAllocationPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionPackageWithAllocationPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionPackageWithAllocationPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionPackageWithAllocationPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionPackageWithAllocationPriceConversionRateConfigParam.

type NewSubscriptionPackageWithAllocationPriceModelType added in v0.121.0

type NewSubscriptionPackageWithAllocationPriceModelType string
const (
	NewSubscriptionPackageWithAllocationPriceModelTypePackageWithAllocation NewSubscriptionPackageWithAllocationPriceModelType = "package_with_allocation"
)

func (NewSubscriptionPackageWithAllocationPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionPackageWithAllocationPriceParam added in v0.121.0

type NewSubscriptionPackageWithAllocationPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPackageWithAllocationPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                             `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPackageWithAllocationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                        param.Field[string]                 `json:"name,required"`
	PackageWithAllocationConfig param.Field[map[string]interface{}] `json:"package_with_allocation_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionPackageWithAllocationPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPackageWithAllocationPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionPackageWithAllocationPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionScalableMatrixWithTieredPricingPriceCadence added in v0.121.0

type NewSubscriptionScalableMatrixWithTieredPricingPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionScalableMatrixWithTieredPricingPriceCadenceAnnual     NewSubscriptionScalableMatrixWithTieredPricingPriceCadence = "annual"
	NewSubscriptionScalableMatrixWithTieredPricingPriceCadenceSemiAnnual NewSubscriptionScalableMatrixWithTieredPricingPriceCadence = "semi_annual"
	NewSubscriptionScalableMatrixWithTieredPricingPriceCadenceMonthly    NewSubscriptionScalableMatrixWithTieredPricingPriceCadence = "monthly"
	NewSubscriptionScalableMatrixWithTieredPricingPriceCadenceQuarterly  NewSubscriptionScalableMatrixWithTieredPricingPriceCadence = "quarterly"
	NewSubscriptionScalableMatrixWithTieredPricingPriceCadenceOneTime    NewSubscriptionScalableMatrixWithTieredPricingPriceCadence = "one_time"
	NewSubscriptionScalableMatrixWithTieredPricingPriceCadenceCustom     NewSubscriptionScalableMatrixWithTieredPricingPriceCadence = "custom"
)

func (NewSubscriptionScalableMatrixWithTieredPricingPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                    `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                      `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigParam) ImplementsNewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigParam) ImplementsNewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigUnionParam()

func (NewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigParam.

type NewSubscriptionScalableMatrixWithTieredPricingPriceModelType added in v0.121.0

type NewSubscriptionScalableMatrixWithTieredPricingPriceModelType string
const (
	NewSubscriptionScalableMatrixWithTieredPricingPriceModelTypeScalableMatrixWithTieredPricing NewSubscriptionScalableMatrixWithTieredPricingPriceModelType = "scalable_matrix_with_tiered_pricing"
)

func (NewSubscriptionScalableMatrixWithTieredPricingPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionScalableMatrixWithTieredPricingPriceParam added in v0.121.0

type NewSubscriptionScalableMatrixWithTieredPricingPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionScalableMatrixWithTieredPricingPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                       `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionScalableMatrixWithTieredPricingPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                                  param.Field[string]                 `json:"name,required"`
	ScalableMatrixWithTieredPricingConfig param.Field[map[string]interface{}] `json:"scalable_matrix_with_tiered_pricing_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionScalableMatrixWithTieredPricingPriceParam) MarshalJSON added in v0.121.0

type NewSubscriptionScalableMatrixWithUnitPricingPriceCadence added in v0.121.0

type NewSubscriptionScalableMatrixWithUnitPricingPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionScalableMatrixWithUnitPricingPriceCadenceAnnual     NewSubscriptionScalableMatrixWithUnitPricingPriceCadence = "annual"
	NewSubscriptionScalableMatrixWithUnitPricingPriceCadenceSemiAnnual NewSubscriptionScalableMatrixWithUnitPricingPriceCadence = "semi_annual"
	NewSubscriptionScalableMatrixWithUnitPricingPriceCadenceMonthly    NewSubscriptionScalableMatrixWithUnitPricingPriceCadence = "monthly"
	NewSubscriptionScalableMatrixWithUnitPricingPriceCadenceQuarterly  NewSubscriptionScalableMatrixWithUnitPricingPriceCadence = "quarterly"
	NewSubscriptionScalableMatrixWithUnitPricingPriceCadenceOneTime    NewSubscriptionScalableMatrixWithUnitPricingPriceCadence = "one_time"
	NewSubscriptionScalableMatrixWithUnitPricingPriceCadenceCustom     NewSubscriptionScalableMatrixWithUnitPricingPriceCadence = "custom"
)

func (NewSubscriptionScalableMatrixWithUnitPricingPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                  `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                    `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigParam) ImplementsNewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigParam) ImplementsNewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigUnionParam()

func (NewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigParam.

type NewSubscriptionScalableMatrixWithUnitPricingPriceModelType added in v0.121.0

type NewSubscriptionScalableMatrixWithUnitPricingPriceModelType string
const (
	NewSubscriptionScalableMatrixWithUnitPricingPriceModelTypeScalableMatrixWithUnitPricing NewSubscriptionScalableMatrixWithUnitPricingPriceModelType = "scalable_matrix_with_unit_pricing"
)

func (NewSubscriptionScalableMatrixWithUnitPricingPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionScalableMatrixWithUnitPricingPriceParam added in v0.121.0

type NewSubscriptionScalableMatrixWithUnitPricingPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionScalableMatrixWithUnitPricingPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                     `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionScalableMatrixWithUnitPricingPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                                param.Field[string]                 `json:"name,required"`
	ScalableMatrixWithUnitPricingConfig param.Field[map[string]interface{}] `json:"scalable_matrix_with_unit_pricing_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionScalableMatrixWithUnitPricingPriceParam) MarshalJSON added in v0.121.0

type NewSubscriptionThresholdTotalAmountPriceCadence added in v0.121.0

type NewSubscriptionThresholdTotalAmountPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionThresholdTotalAmountPriceCadenceAnnual     NewSubscriptionThresholdTotalAmountPriceCadence = "annual"
	NewSubscriptionThresholdTotalAmountPriceCadenceSemiAnnual NewSubscriptionThresholdTotalAmountPriceCadence = "semi_annual"
	NewSubscriptionThresholdTotalAmountPriceCadenceMonthly    NewSubscriptionThresholdTotalAmountPriceCadence = "monthly"
	NewSubscriptionThresholdTotalAmountPriceCadenceQuarterly  NewSubscriptionThresholdTotalAmountPriceCadence = "quarterly"
	NewSubscriptionThresholdTotalAmountPriceCadenceOneTime    NewSubscriptionThresholdTotalAmountPriceCadence = "one_time"
	NewSubscriptionThresholdTotalAmountPriceCadenceCustom     NewSubscriptionThresholdTotalAmountPriceCadence = "custom"
)

func (NewSubscriptionThresholdTotalAmountPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionThresholdTotalAmountPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionThresholdTotalAmountPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionThresholdTotalAmountPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionThresholdTotalAmountPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionThresholdTotalAmountPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionThresholdTotalAmountPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionThresholdTotalAmountPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionThresholdTotalAmountPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionThresholdTotalAmountPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionThresholdTotalAmountPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                         `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                           `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionThresholdTotalAmountPriceConversionRateConfigParam) ImplementsNewSubscriptionThresholdTotalAmountPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionThresholdTotalAmountPriceConversionRateConfigParam) ImplementsNewSubscriptionThresholdTotalAmountPriceConversionRateConfigUnionParam()

func (NewSubscriptionThresholdTotalAmountPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionThresholdTotalAmountPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionThresholdTotalAmountPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionThresholdTotalAmountPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionThresholdTotalAmountPriceConversionRateConfigParam.

type NewSubscriptionThresholdTotalAmountPriceModelType added in v0.121.0

type NewSubscriptionThresholdTotalAmountPriceModelType string
const (
	NewSubscriptionThresholdTotalAmountPriceModelTypeThresholdTotalAmount NewSubscriptionThresholdTotalAmountPriceModelType = "threshold_total_amount"
)

func (NewSubscriptionThresholdTotalAmountPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionThresholdTotalAmountPriceParam added in v0.121.0

type NewSubscriptionThresholdTotalAmountPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionThresholdTotalAmountPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                            `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionThresholdTotalAmountPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                       param.Field[string]                 `json:"name,required"`
	ThresholdTotalAmountConfig param.Field[map[string]interface{}] `json:"threshold_total_amount_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionThresholdTotalAmountPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionThresholdTotalAmountPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionThresholdTotalAmountPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionTierWithProrationPriceCadence added in v0.121.0

type NewSubscriptionTierWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionTierWithProrationPriceCadenceAnnual     NewSubscriptionTierWithProrationPriceCadence = "annual"
	NewSubscriptionTierWithProrationPriceCadenceSemiAnnual NewSubscriptionTierWithProrationPriceCadence = "semi_annual"
	NewSubscriptionTierWithProrationPriceCadenceMonthly    NewSubscriptionTierWithProrationPriceCadence = "monthly"
	NewSubscriptionTierWithProrationPriceCadenceQuarterly  NewSubscriptionTierWithProrationPriceCadence = "quarterly"
	NewSubscriptionTierWithProrationPriceCadenceOneTime    NewSubscriptionTierWithProrationPriceCadence = "one_time"
	NewSubscriptionTierWithProrationPriceCadenceCustom     NewSubscriptionTierWithProrationPriceCadence = "custom"
)

func (NewSubscriptionTierWithProrationPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionTierWithProrationPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionTierWithProrationPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionTierWithProrationPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionTierWithProrationPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionTierWithProrationPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionTierWithProrationPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionTierWithProrationPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionTierWithProrationPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionTierWithProrationPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionTierWithProrationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                      `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                        `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionTierWithProrationPriceConversionRateConfigParam) ImplementsNewSubscriptionTierWithProrationPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionTierWithProrationPriceConversionRateConfigParam) ImplementsNewSubscriptionTierWithProrationPriceConversionRateConfigUnionParam()

func (NewSubscriptionTierWithProrationPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionTierWithProrationPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionTierWithProrationPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionTierWithProrationPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionTierWithProrationPriceConversionRateConfigParam.

type NewSubscriptionTierWithProrationPriceModelType added in v0.121.0

type NewSubscriptionTierWithProrationPriceModelType string
const (
	NewSubscriptionTierWithProrationPriceModelTypeTieredWithProration NewSubscriptionTierWithProrationPriceModelType = "tiered_with_proration"
)

func (NewSubscriptionTierWithProrationPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionTierWithProrationPriceParam added in v0.121.0

type NewSubscriptionTierWithProrationPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionTierWithProrationPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                         `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionTierWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                      param.Field[string]                 `json:"name,required"`
	TieredWithProrationConfig param.Field[map[string]interface{}] `json:"tiered_with_proration_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionTierWithProrationPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionTierWithProrationPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionTierWithProrationPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionTieredBPSPriceCadence added in v0.121.0

type NewSubscriptionTieredBPSPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionTieredBPSPriceCadenceAnnual     NewSubscriptionTieredBPSPriceCadence = "annual"
	NewSubscriptionTieredBPSPriceCadenceSemiAnnual NewSubscriptionTieredBPSPriceCadence = "semi_annual"
	NewSubscriptionTieredBPSPriceCadenceMonthly    NewSubscriptionTieredBPSPriceCadence = "monthly"
	NewSubscriptionTieredBPSPriceCadenceQuarterly  NewSubscriptionTieredBPSPriceCadence = "quarterly"
	NewSubscriptionTieredBPSPriceCadenceOneTime    NewSubscriptionTieredBPSPriceCadence = "one_time"
	NewSubscriptionTieredBPSPriceCadenceCustom     NewSubscriptionTieredBPSPriceCadence = "custom"
)

func (NewSubscriptionTieredBPSPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionTieredBPSPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionTieredBPSPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionTieredBPSPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionTieredBPSPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionTieredBPSPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionTieredBPSPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionTieredBPSPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionTieredBPSPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionTieredBPSPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionTieredBPSPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                              `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionTieredBPSPriceConversionRateConfigParam) ImplementsNewSubscriptionTieredBPSPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionTieredBPSPriceConversionRateConfigParam) ImplementsNewSubscriptionTieredBPSPriceConversionRateConfigUnionParam()

func (NewSubscriptionTieredBPSPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionTieredBPSPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionTieredBPSPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionTieredBPSPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionTieredBPSPriceConversionRateConfigParam.

type NewSubscriptionTieredBPSPriceModelType added in v0.121.0

type NewSubscriptionTieredBPSPriceModelType string
const (
	NewSubscriptionTieredBPSPriceModelTypeTieredBPS NewSubscriptionTieredBPSPriceModelType = "tiered_bps"
)

func (NewSubscriptionTieredBPSPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionTieredBPSPriceParam added in v0.121.0

type NewSubscriptionTieredBPSPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionTieredBPSPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                 `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionTieredBPSPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name            param.Field[string]                      `json:"name,required"`
	TieredBPSConfig param.Field[shared.TieredBPSConfigParam] `json:"tiered_bps_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionTieredBPSPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionTieredBPSPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionTieredBPSPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionTieredPackagePriceCadence added in v0.121.0

type NewSubscriptionTieredPackagePriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionTieredPackagePriceCadenceAnnual     NewSubscriptionTieredPackagePriceCadence = "annual"
	NewSubscriptionTieredPackagePriceCadenceSemiAnnual NewSubscriptionTieredPackagePriceCadence = "semi_annual"
	NewSubscriptionTieredPackagePriceCadenceMonthly    NewSubscriptionTieredPackagePriceCadence = "monthly"
	NewSubscriptionTieredPackagePriceCadenceQuarterly  NewSubscriptionTieredPackagePriceCadence = "quarterly"
	NewSubscriptionTieredPackagePriceCadenceOneTime    NewSubscriptionTieredPackagePriceCadence = "one_time"
	NewSubscriptionTieredPackagePriceCadenceCustom     NewSubscriptionTieredPackagePriceCadence = "custom"
)

func (NewSubscriptionTieredPackagePriceCadence) IsKnown added in v0.121.0

type NewSubscriptionTieredPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionTieredPackagePriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionTieredPackagePriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionTieredPackagePriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionTieredPackagePriceConversionRateConfigConversionRateTypeTiered NewSubscriptionTieredPackagePriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionTieredPackagePriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionTieredPackagePriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionTieredPackagePriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionTieredPackagePriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                  `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                    `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionTieredPackagePriceConversionRateConfigParam) ImplementsNewSubscriptionTieredPackagePriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionTieredPackagePriceConversionRateConfigParam) ImplementsNewSubscriptionTieredPackagePriceConversionRateConfigUnionParam()

func (NewSubscriptionTieredPackagePriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionTieredPackagePriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionTieredPackagePriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionTieredPackagePriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionTieredPackagePriceConversionRateConfigParam.

type NewSubscriptionTieredPackagePriceModelType added in v0.121.0

type NewSubscriptionTieredPackagePriceModelType string
const (
	NewSubscriptionTieredPackagePriceModelTypeTieredPackage NewSubscriptionTieredPackagePriceModelType = "tiered_package"
)

func (NewSubscriptionTieredPackagePriceModelType) IsKnown added in v0.121.0

type NewSubscriptionTieredPackagePriceParam added in v0.121.0

type NewSubscriptionTieredPackagePriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionTieredPackagePriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                     `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionTieredPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                param.Field[string]                 `json:"name,required"`
	TieredPackageConfig param.Field[map[string]interface{}] `json:"tiered_package_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionTieredPackagePriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionTieredPackagePriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionTieredPackagePriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionTieredPackageWithMinimumPriceCadence added in v0.121.0

type NewSubscriptionTieredPackageWithMinimumPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionTieredPackageWithMinimumPriceCadenceAnnual     NewSubscriptionTieredPackageWithMinimumPriceCadence = "annual"
	NewSubscriptionTieredPackageWithMinimumPriceCadenceSemiAnnual NewSubscriptionTieredPackageWithMinimumPriceCadence = "semi_annual"
	NewSubscriptionTieredPackageWithMinimumPriceCadenceMonthly    NewSubscriptionTieredPackageWithMinimumPriceCadence = "monthly"
	NewSubscriptionTieredPackageWithMinimumPriceCadenceQuarterly  NewSubscriptionTieredPackageWithMinimumPriceCadence = "quarterly"
	NewSubscriptionTieredPackageWithMinimumPriceCadenceOneTime    NewSubscriptionTieredPackageWithMinimumPriceCadence = "one_time"
	NewSubscriptionTieredPackageWithMinimumPriceCadenceCustom     NewSubscriptionTieredPackageWithMinimumPriceCadence = "custom"
)

func (NewSubscriptionTieredPackageWithMinimumPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                             `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                               `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigParam) ImplementsNewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigParam) ImplementsNewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigUnionParam()

func (NewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigParam.

type NewSubscriptionTieredPackageWithMinimumPriceModelType added in v0.121.0

type NewSubscriptionTieredPackageWithMinimumPriceModelType string
const (
	NewSubscriptionTieredPackageWithMinimumPriceModelTypeTieredPackageWithMinimum NewSubscriptionTieredPackageWithMinimumPriceModelType = "tiered_package_with_minimum"
)

func (NewSubscriptionTieredPackageWithMinimumPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionTieredPackageWithMinimumPriceParam added in v0.121.0

type NewSubscriptionTieredPackageWithMinimumPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionTieredPackageWithMinimumPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionTieredPackageWithMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                           param.Field[string]                 `json:"name,required"`
	TieredPackageWithMinimumConfig param.Field[map[string]interface{}] `json:"tiered_package_with_minimum_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionTieredPackageWithMinimumPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionTieredPackageWithMinimumPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionTieredPriceCadence added in v0.121.0

type NewSubscriptionTieredPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionTieredPriceCadenceAnnual     NewSubscriptionTieredPriceCadence = "annual"
	NewSubscriptionTieredPriceCadenceSemiAnnual NewSubscriptionTieredPriceCadence = "semi_annual"
	NewSubscriptionTieredPriceCadenceMonthly    NewSubscriptionTieredPriceCadence = "monthly"
	NewSubscriptionTieredPriceCadenceQuarterly  NewSubscriptionTieredPriceCadence = "quarterly"
	NewSubscriptionTieredPriceCadenceOneTime    NewSubscriptionTieredPriceCadence = "one_time"
	NewSubscriptionTieredPriceCadenceCustom     NewSubscriptionTieredPriceCadence = "custom"
)

func (NewSubscriptionTieredPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionTieredPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionTieredPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionTieredPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionTieredPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionTieredPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionTieredPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionTieredPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionTieredPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionTieredPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionTieredPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                           `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                             `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionTieredPriceConversionRateConfigParam) ImplementsNewSubscriptionTieredPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionTieredPriceConversionRateConfigParam) ImplementsNewSubscriptionTieredPriceConversionRateConfigUnionParam()

func (NewSubscriptionTieredPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionTieredPriceConversionRateConfigParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionTieredPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionTieredPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionTieredPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionTieredPriceConversionRateConfigParam.

type NewSubscriptionTieredPriceModelType added in v0.121.0

type NewSubscriptionTieredPriceModelType string
const (
	NewSubscriptionTieredPriceModelTypeTiered NewSubscriptionTieredPriceModelType = "tiered"
)

func (NewSubscriptionTieredPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionTieredPriceParam added in v0.121.0

type NewSubscriptionTieredPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionTieredPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                              `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionTieredPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name         param.Field[string]                   `json:"name,required"`
	TieredConfig param.Field[shared.TieredConfigParam] `json:"tiered_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionTieredPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionTieredPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionTieredPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionTieredWithMinimumPriceCadence added in v0.121.0

type NewSubscriptionTieredWithMinimumPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionTieredWithMinimumPriceCadenceAnnual     NewSubscriptionTieredWithMinimumPriceCadence = "annual"
	NewSubscriptionTieredWithMinimumPriceCadenceSemiAnnual NewSubscriptionTieredWithMinimumPriceCadence = "semi_annual"
	NewSubscriptionTieredWithMinimumPriceCadenceMonthly    NewSubscriptionTieredWithMinimumPriceCadence = "monthly"
	NewSubscriptionTieredWithMinimumPriceCadenceQuarterly  NewSubscriptionTieredWithMinimumPriceCadence = "quarterly"
	NewSubscriptionTieredWithMinimumPriceCadenceOneTime    NewSubscriptionTieredWithMinimumPriceCadence = "one_time"
	NewSubscriptionTieredWithMinimumPriceCadenceCustom     NewSubscriptionTieredWithMinimumPriceCadence = "custom"
)

func (NewSubscriptionTieredWithMinimumPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionTieredWithMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionTieredWithMinimumPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionTieredWithMinimumPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionTieredWithMinimumPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionTieredWithMinimumPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionTieredWithMinimumPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionTieredWithMinimumPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionTieredWithMinimumPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionTieredWithMinimumPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionTieredWithMinimumPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                      `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                        `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionTieredWithMinimumPriceConversionRateConfigParam) ImplementsNewSubscriptionTieredWithMinimumPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionTieredWithMinimumPriceConversionRateConfigParam) ImplementsNewSubscriptionTieredWithMinimumPriceConversionRateConfigUnionParam()

func (NewSubscriptionTieredWithMinimumPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionTieredWithMinimumPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionTieredWithMinimumPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionTieredWithMinimumPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionTieredWithMinimumPriceConversionRateConfigParam.

type NewSubscriptionTieredWithMinimumPriceModelType added in v0.121.0

type NewSubscriptionTieredWithMinimumPriceModelType string
const (
	NewSubscriptionTieredWithMinimumPriceModelTypeTieredWithMinimum NewSubscriptionTieredWithMinimumPriceModelType = "tiered_with_minimum"
)

func (NewSubscriptionTieredWithMinimumPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionTieredWithMinimumPriceParam added in v0.121.0

type NewSubscriptionTieredWithMinimumPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionTieredWithMinimumPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                         `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionTieredWithMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                    param.Field[string]                 `json:"name,required"`
	TieredWithMinimumConfig param.Field[map[string]interface{}] `json:"tiered_with_minimum_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionTieredWithMinimumPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionTieredWithMinimumPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionTieredWithMinimumPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionUnitPriceCadence added in v0.121.0

type NewSubscriptionUnitPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionUnitPriceCadenceAnnual     NewSubscriptionUnitPriceCadence = "annual"
	NewSubscriptionUnitPriceCadenceSemiAnnual NewSubscriptionUnitPriceCadence = "semi_annual"
	NewSubscriptionUnitPriceCadenceMonthly    NewSubscriptionUnitPriceCadence = "monthly"
	NewSubscriptionUnitPriceCadenceQuarterly  NewSubscriptionUnitPriceCadence = "quarterly"
	NewSubscriptionUnitPriceCadenceOneTime    NewSubscriptionUnitPriceCadence = "one_time"
	NewSubscriptionUnitPriceCadenceCustom     NewSubscriptionUnitPriceCadence = "custom"
)

func (NewSubscriptionUnitPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionUnitPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionUnitPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionUnitPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionUnitPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionUnitPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionUnitPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionUnitPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionUnitPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionUnitPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionUnitPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                         `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                           `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionUnitPriceConversionRateConfigParam) ImplementsNewSubscriptionUnitPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionUnitPriceConversionRateConfigParam) ImplementsNewSubscriptionUnitPriceConversionRateConfigUnionParam()

func (NewSubscriptionUnitPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionUnitPriceConversionRateConfigParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionUnitPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionUnitPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionUnitPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionUnitPriceConversionRateConfigParam.

type NewSubscriptionUnitPriceModelType added in v0.121.0

type NewSubscriptionUnitPriceModelType string
const (
	NewSubscriptionUnitPriceModelTypeUnit NewSubscriptionUnitPriceModelType = "unit"
)

func (NewSubscriptionUnitPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionUnitPriceParam added in v0.121.0

type NewSubscriptionUnitPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionUnitPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                            `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionUnitPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name       param.Field[string]                 `json:"name,required"`
	UnitConfig param.Field[shared.UnitConfigParam] `json:"unit_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionUnitPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionUnitPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionUnitPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionUnitWithPercentPriceCadence added in v0.121.0

type NewSubscriptionUnitWithPercentPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionUnitWithPercentPriceCadenceAnnual     NewSubscriptionUnitWithPercentPriceCadence = "annual"
	NewSubscriptionUnitWithPercentPriceCadenceSemiAnnual NewSubscriptionUnitWithPercentPriceCadence = "semi_annual"
	NewSubscriptionUnitWithPercentPriceCadenceMonthly    NewSubscriptionUnitWithPercentPriceCadence = "monthly"
	NewSubscriptionUnitWithPercentPriceCadenceQuarterly  NewSubscriptionUnitWithPercentPriceCadence = "quarterly"
	NewSubscriptionUnitWithPercentPriceCadenceOneTime    NewSubscriptionUnitWithPercentPriceCadence = "one_time"
	NewSubscriptionUnitWithPercentPriceCadenceCustom     NewSubscriptionUnitWithPercentPriceCadence = "custom"
)

func (NewSubscriptionUnitWithPercentPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionUnitWithPercentPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionUnitWithPercentPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionUnitWithPercentPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionUnitWithPercentPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionUnitWithPercentPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionUnitWithPercentPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionUnitWithPercentPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionUnitWithPercentPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionUnitWithPercentPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionUnitWithPercentPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                    `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                      `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionUnitWithPercentPriceConversionRateConfigParam) ImplementsNewSubscriptionUnitWithPercentPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionUnitWithPercentPriceConversionRateConfigParam) ImplementsNewSubscriptionUnitWithPercentPriceConversionRateConfigUnionParam()

func (NewSubscriptionUnitWithPercentPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionUnitWithPercentPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionUnitWithPercentPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionUnitWithPercentPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionUnitWithPercentPriceConversionRateConfigParam.

type NewSubscriptionUnitWithPercentPriceModelType added in v0.121.0

type NewSubscriptionUnitWithPercentPriceModelType string
const (
	NewSubscriptionUnitWithPercentPriceModelTypeUnitWithPercent NewSubscriptionUnitWithPercentPriceModelType = "unit_with_percent"
)

func (NewSubscriptionUnitWithPercentPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionUnitWithPercentPriceParam added in v0.121.0

type NewSubscriptionUnitWithPercentPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionUnitWithPercentPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                       `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionUnitWithPercentPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                  param.Field[string]                 `json:"name,required"`
	UnitWithPercentConfig param.Field[map[string]interface{}] `json:"unit_with_percent_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionUnitWithPercentPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionUnitWithPercentPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionUnitWithPercentPriceParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionUnitWithProrationPriceCadence added in v0.121.0

type NewSubscriptionUnitWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionUnitWithProrationPriceCadenceAnnual     NewSubscriptionUnitWithProrationPriceCadence = "annual"
	NewSubscriptionUnitWithProrationPriceCadenceSemiAnnual NewSubscriptionUnitWithProrationPriceCadence = "semi_annual"
	NewSubscriptionUnitWithProrationPriceCadenceMonthly    NewSubscriptionUnitWithProrationPriceCadence = "monthly"
	NewSubscriptionUnitWithProrationPriceCadenceQuarterly  NewSubscriptionUnitWithProrationPriceCadence = "quarterly"
	NewSubscriptionUnitWithProrationPriceCadenceOneTime    NewSubscriptionUnitWithProrationPriceCadence = "one_time"
	NewSubscriptionUnitWithProrationPriceCadenceCustom     NewSubscriptionUnitWithProrationPriceCadence = "custom"
)

func (NewSubscriptionUnitWithProrationPriceCadence) IsKnown added in v0.121.0

type NewSubscriptionUnitWithProrationPriceConversionRateConfigConversionRateType added in v0.121.0

type NewSubscriptionUnitWithProrationPriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionUnitWithProrationPriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionUnitWithProrationPriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionUnitWithProrationPriceConversionRateConfigConversionRateTypeTiered NewSubscriptionUnitWithProrationPriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionUnitWithProrationPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type NewSubscriptionUnitWithProrationPriceConversionRateConfigParam added in v0.121.0

type NewSubscriptionUnitWithProrationPriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionUnitWithProrationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                      `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                        `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (NewSubscriptionUnitWithProrationPriceConversionRateConfigParam) ImplementsNewSubscriptionUnitWithProrationPriceConversionRateConfigUnionParam added in v0.123.0

func (r NewSubscriptionUnitWithProrationPriceConversionRateConfigParam) ImplementsNewSubscriptionUnitWithProrationPriceConversionRateConfigUnionParam()

func (NewSubscriptionUnitWithProrationPriceConversionRateConfigParam) MarshalJSON added in v0.121.0

type NewSubscriptionUnitWithProrationPriceConversionRateConfigUnionParam added in v0.121.0

type NewSubscriptionUnitWithProrationPriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionUnitWithProrationPriceConversionRateConfigUnionParam()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionUnitWithProrationPriceConversionRateConfigParam.

type NewSubscriptionUnitWithProrationPriceModelType added in v0.121.0

type NewSubscriptionUnitWithProrationPriceModelType string
const (
	NewSubscriptionUnitWithProrationPriceModelTypeUnitWithProration NewSubscriptionUnitWithProrationPriceModelType = "unit_with_proration"
)

func (NewSubscriptionUnitWithProrationPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionUnitWithProrationPriceParam added in v0.121.0

type NewSubscriptionUnitWithProrationPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionUnitWithProrationPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                         `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionUnitWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                    param.Field[string]                 `json:"name,required"`
	UnitWithProrationConfig param.Field[map[string]interface{}] `json:"unit_with_proration_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[NewSubscriptionUnitWithProrationPriceConversionRateConfigUnionParam] `json:"conversion_rate_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionUnitWithProrationPriceParam) MarshalJSON added in v0.121.0

func (r NewSubscriptionUnitWithProrationPriceParam) MarshalJSON() (data []byte, err error)

type NewTaxJarConfigurationParam added in v0.121.0

type NewTaxJarConfigurationParam struct {
	TaxExempt   param.Field[bool]                              `json:"tax_exempt,required"`
	TaxProvider param.Field[NewTaxJarConfigurationTaxProvider] `json:"tax_provider,required"`
}

func (NewTaxJarConfigurationParam) MarshalJSON added in v0.121.0

func (r NewTaxJarConfigurationParam) MarshalJSON() (data []byte, err error)

type NewTaxJarConfigurationTaxProvider added in v0.121.0

type NewTaxJarConfigurationTaxProvider string
const (
	NewTaxJarConfigurationTaxProviderTaxjar NewTaxJarConfigurationTaxProvider = "taxjar"
)

func (NewTaxJarConfigurationTaxProvider) IsKnown added in v0.121.0

type NewUsageDiscountAdjustmentType added in v0.121.0

type NewUsageDiscountAdjustmentType = shared.NewUsageDiscountAdjustmentType

This is an alias to an internal type.

type NewUsageDiscountAppliesToAll added in v0.121.0

type NewUsageDiscountAppliesToAll = shared.NewUsageDiscountAppliesToAll

If set, the adjustment will apply to every price on the subscription.

This is an alias to an internal type.

type NewUsageDiscountParam added in v0.121.0

type NewUsageDiscountParam = shared.NewUsageDiscountParam

This is an alias to an internal type.

type NewUsageDiscountPriceType added in v0.121.0

type NewUsageDiscountPriceType = shared.NewUsageDiscountPriceType

If set, only prices of the specified type will have the adjustment applied.

This is an alias to an internal type.

type OtherSubLineItem added in v0.121.0

type OtherSubLineItem = shared.OtherSubLineItem

This is an alias to an internal type.

type OtherSubLineItemType added in v0.121.0

type OtherSubLineItemType = shared.OtherSubLineItemType

This is an alias to an internal type.

type PackageConfig added in v0.121.0

type PackageConfig = shared.PackageConfig

This is an alias to an internal type.

type PackageConfigParam added in v0.121.0

type PackageConfigParam = shared.PackageConfigParam

This is an alias to an internal type.

type PaginationMetadata added in v0.25.0

type PaginationMetadata = shared.PaginationMetadata

This is an alias to an internal type.

type PerPriceCost added in v0.121.0

type PerPriceCost = shared.PerPriceCost

This is an alias to an internal type.

type PercentageDiscount added in v0.67.0

type PercentageDiscount = shared.PercentageDiscount

This is an alias to an internal type.

type PercentageDiscountDiscountType added in v0.67.0

type PercentageDiscountDiscountType = shared.PercentageDiscountDiscountType

This is an alias to an internal type.

type PercentageDiscountInterval added in v0.121.0

type PercentageDiscountInterval = shared.PercentageDiscountInterval

This is an alias to an internal type.

type PercentageDiscountIntervalDiscountType added in v0.121.0

type PercentageDiscountIntervalDiscountType = shared.PercentageDiscountIntervalDiscountType

This is an alias to an internal type.

type PercentageDiscountParam added in v0.67.0

type PercentageDiscountParam = shared.PercentageDiscountParam

This is an alias to an internal type.

type Plan

type Plan struct {
	ID string `json:"id,required"`
	// Adjustments for this plan. If the plan has phases, this includes adjustments
	// across all phases of the plan.
	Adjustments []PlanAdjustment `json:"adjustments,required"`
	BasePlan    PlanBasePlan     `json:"base_plan,required,nullable"`
	// The parent plan id if the given plan was created by overriding one or more of
	// the parent's prices
	BasePlanID string    `json:"base_plan_id,required,nullable"`
	CreatedAt  time.Time `json:"created_at,required" format:"date-time"`
	// An ISO 4217 currency string or custom pricing unit (`credits`) for this plan's
	// prices.
	//
	// Deprecated: deprecated
	Currency string `json:"currency,required"`
	// The default memo text on the invoices corresponding to subscriptions on this
	// plan. Note that each subscription may configure its own memo.
	DefaultInvoiceMemo string `json:"default_invoice_memo,required,nullable"`
	Description        string `json:"description,required"`
	// Deprecated: deprecated
	Discount shared.Discount `json:"discount,required,nullable"`
	// An optional user-defined ID for this plan resource, used throughout the system
	// as an alias for this Plan. Use this field to identify a plan by an existing
	// identifier in your system.
	ExternalPlanID string `json:"external_plan_id,required,nullable"`
	// An ISO 4217 currency string for which this plan is billed in. Matches `currency`
	// unless `currency` is a custom pricing unit.
	InvoicingCurrency string `json:"invoicing_currency,required"`
	// Deprecated: deprecated
	Maximum shared.Maximum `json:"maximum,required,nullable"`
	// Deprecated: deprecated
	MaximumAmount string `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata map[string]string `json:"metadata,required"`
	// Deprecated: deprecated
	Minimum shared.Minimum `json:"minimum,required,nullable"`
	// Deprecated: deprecated
	MinimumAmount string `json:"minimum_amount,required,nullable"`
	Name          string `json:"name,required"`
	// Determines the difference between the invoice issue date and the due date. A
	// value of "0" here signifies that invoices are due on issue, whereas a value of
	// "30" means that the customer has a month to pay the invoice before its overdue.
	// Note that individual subscriptions or invoices may set a different net terms
	// configuration.
	NetTerms   int64           `json:"net_terms,required,nullable"`
	PlanPhases []PlanPlanPhase `json:"plan_phases,required,nullable"`
	// Prices for this plan. If the plan has phases, this includes prices across all
	// phases of the plan.
	Prices      []shared.Price  `json:"prices,required"`
	Product     PlanProduct     `json:"product,required"`
	Status      PlanStatus      `json:"status,required"`
	TrialConfig PlanTrialConfig `json:"trial_config,required"`
	Version     int64           `json:"version,required"`
	JSON        planJSON        `json:"-"`
}

The Plan(/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices in the [Price resource](/reference/price).

func (*Plan) UnmarshalJSON

func (r *Plan) UnmarshalJSON(data []byte) (err error)

type PlanAdjustment added in v0.84.0

type PlanAdjustment struct {
	ID             string                        `json:"id,required"`
	AdjustmentType PlanAdjustmentsAdjustmentType `json:"adjustment_type,required"`
	// This field can have the runtime type of [[]string].
	AppliesToPriceIDs interface{} `json:"applies_to_price_ids,required"`
	// This field can have the runtime type of [[]shared.TransformPriceFilter].
	Filters interface{} `json:"filters,required"`
	// True for adjustments that apply to an entire invocice, false for adjustments
	// that apply to only one price.
	IsInvoiceLevel bool `json:"is_invoice_level,required"`
	// The plan phase in which this adjustment is active.
	PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"`
	// The reason for the adjustment.
	Reason string `json:"reason,required,nullable"`
	// The amount by which to discount the prices this adjustment applies to in a given
	// billing period.
	AmountDiscount string `json:"amount_discount"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID string `json:"item_id"`
	// The maximum amount to charge in a given billing period for the prices this
	// adjustment applies to.
	MaximumAmount string `json:"maximum_amount"`
	// The minimum amount to charge in a given billing period for the prices this
	// adjustment applies to.
	MinimumAmount string `json:"minimum_amount"`
	// The percentage (as a value between 0 and 1) by which to discount the price
	// intervals this adjustment applies to in a given billing period.
	PercentageDiscount float64 `json:"percentage_discount"`
	// The number of usage units by which to discount the price this adjustment applies
	// to in a given billing period.
	UsageDiscount float64            `json:"usage_discount"`
	JSON          planAdjustmentJSON `json:"-"`
	// contains filtered or unexported fields
}

func (PlanAdjustment) AsUnion added in v0.84.0

AsUnion returns a PlanAdjustmentsUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are shared.PlanPhaseUsageDiscountAdjustment, shared.PlanPhaseAmountDiscountAdjustment, shared.PlanPhasePercentageDiscountAdjustment, shared.PlanPhaseMinimumAdjustment, shared.PlanPhaseMaximumAdjustment.

func (*PlanAdjustment) UnmarshalJSON added in v0.84.0

func (r *PlanAdjustment) UnmarshalJSON(data []byte) (err error)

type PlanAdjustmentsAdjustmentType added in v0.84.0

type PlanAdjustmentsAdjustmentType string
const (
	PlanAdjustmentsAdjustmentTypeUsageDiscount      PlanAdjustmentsAdjustmentType = "usage_discount"
	PlanAdjustmentsAdjustmentTypeAmountDiscount     PlanAdjustmentsAdjustmentType = "amount_discount"
	PlanAdjustmentsAdjustmentTypePercentageDiscount PlanAdjustmentsAdjustmentType = "percentage_discount"
	PlanAdjustmentsAdjustmentTypeMinimum            PlanAdjustmentsAdjustmentType = "minimum"
	PlanAdjustmentsAdjustmentTypeMaximum            PlanAdjustmentsAdjustmentType = "maximum"
)

func (PlanAdjustmentsAdjustmentType) IsKnown added in v0.84.0

func (r PlanAdjustmentsAdjustmentType) IsKnown() bool

type PlanBasePlan

type PlanBasePlan struct {
	ID string `json:"id,required,nullable"`
	// An optional user-defined ID for this plan resource, used throughout the system
	// as an alias for this Plan. Use this field to identify a plan by an existing
	// identifier in your system.
	ExternalPlanID string           `json:"external_plan_id,required,nullable"`
	Name           string           `json:"name,required,nullable"`
	JSON           planBasePlanJSON `json:"-"`
}

func (*PlanBasePlan) UnmarshalJSON

func (r *PlanBasePlan) UnmarshalJSON(data []byte) (err error)

type PlanExternalPlanIDService

type PlanExternalPlanIDService struct {
	Options []option.RequestOption
}

PlanExternalPlanIDService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPlanExternalPlanIDService method instead.

func NewPlanExternalPlanIDService

func NewPlanExternalPlanIDService(opts ...option.RequestOption) (r *PlanExternalPlanIDService)

NewPlanExternalPlanIDService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*PlanExternalPlanIDService) Fetch

func (r *PlanExternalPlanIDService) Fetch(ctx context.Context, externalPlanID string, opts ...option.RequestOption) (res *Plan, err error)

This endpoint is used to fetch [plan](/core-concepts##plan-and-price) details given an external_plan_id identifier. It returns information about the prices included in the plan and their configuration, as well as the product that the plan is attached to.

If multiple plans are found to contain the specified external_plan_id, the active plans will take priority over archived ones, and among those, the endpoint will return the most recently created plan.

## Serialized prices

Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a given Price(/core-concepts#plan-and-price) object. The `model_type` field determines the key for the configuration object that is present. A detailed explanation of price types can be found in the [Price schema](/core-concepts#plan-and-price). "

func (*PlanExternalPlanIDService) Update

func (r *PlanExternalPlanIDService) Update(ctx context.Context, otherExternalPlanID string, body PlanExternalPlanIDUpdateParams, opts ...option.RequestOption) (res *Plan, err error)

This endpoint can be used to update the `external_plan_id`, and `metadata` of an existing plan.

Other fields on a plan are currently immutable.

type PlanExternalPlanIDUpdateParams

type PlanExternalPlanIDUpdateParams struct {
	// An optional user-defined ID for this plan resource, used throughout the system
	// as an alias for this Plan. Use this field to identify a plan by an existing
	// identifier in your system.
	ExternalPlanID param.Field[string] `json:"external_plan_id"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PlanExternalPlanIDUpdateParams) MarshalJSON

func (r PlanExternalPlanIDUpdateParams) MarshalJSON() (data []byte, err error)

type PlanListParams

type PlanListParams struct {
	CreatedAtGt  param.Field[time.Time] `query:"created_at[gt]" format:"date-time"`
	CreatedAtGte param.Field[time.Time] `query:"created_at[gte]" format:"date-time"`
	CreatedAtLt  param.Field[time.Time] `query:"created_at[lt]" format:"date-time"`
	CreatedAtLte param.Field[time.Time] `query:"created_at[lte]" format:"date-time"`
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor param.Field[string] `query:"cursor"`
	// The number of items to fetch. Defaults to 20.
	Limit param.Field[int64] `query:"limit"`
	// The plan status to filter to ('active', 'archived', or 'draft').
	Status param.Field[PlanListParamsStatus] `query:"status"`
}

func (PlanListParams) URLQuery

func (r PlanListParams) URLQuery() (v url.Values)

URLQuery serializes PlanListParams's query parameters as `url.Values`.

type PlanListParamsStatus

type PlanListParamsStatus string

The plan status to filter to ('active', 'archived', or 'draft').

const (
	PlanListParamsStatusActive   PlanListParamsStatus = "active"
	PlanListParamsStatusArchived PlanListParamsStatus = "archived"
	PlanListParamsStatusDraft    PlanListParamsStatus = "draft"
)

func (PlanListParamsStatus) IsKnown added in v0.24.0

func (r PlanListParamsStatus) IsKnown() bool

type PlanNewParams

type PlanNewParams struct {
	// An ISO 4217 currency string for invoices generated by subscriptions on this
	// plan.
	Currency param.Field[string] `json:"currency,required"`
	Name     param.Field[string] `json:"name,required"`
	// Prices for this plan. If the plan has phases, this includes prices across all
	// phases of the plan.
	Prices param.Field[[]PlanNewParamsPriceUnion] `json:"prices,required"`
	// Free-form text which is available on the invoice PDF and the Orb invoice portal.
	DefaultInvoiceMemo param.Field[string] `json:"default_invoice_memo"`
	ExternalPlanID     param.Field[string] `json:"external_plan_id"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// The net terms determines the difference between the invoice date and the issue
	// date for the invoice. If you intend the invoice to be due on issue, set this
	// to 0.
	NetTerms param.Field[int64] `json:"net_terms"`
	// The status of the plan to create (either active or draft). If not specified,
	// this defaults to active.
	Status param.Field[PlanNewParamsStatus] `json:"status"`
}

func (PlanNewParams) MarshalJSON

func (r PlanNewParams) MarshalJSON() (data []byte, err error)

type PlanNewParamsPrice added in v0.2.0

type PlanNewParamsPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PlanNewParamsPricesCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                       `json:"item_id,required"`
	ModelType param.Field[PlanNewParamsPricesModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	BPSConfig                 param.Field[shared.BPSConfigParam]                    `json:"bps_config"`
	BulkBPSConfig             param.Field[shared.BulkBPSConfigParam]                `json:"bulk_bps_config"`
	BulkConfig                param.Field[shared.BulkConfigParam]                   `json:"bulk_config"`
	BulkWithProrationConfig   param.Field[interface{}]                              `json:"bulk_with_proration_config"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate              param.Field[float64]     `json:"conversion_rate"`
	ConversionRateConfig        param.Field[interface{}] `json:"conversion_rate_config"`
	CumulativeGroupedBulkConfig param.Field[interface{}] `json:"cumulative_grouped_bulk_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity               param.Field[float64]     `json:"fixed_price_quantity"`
	GroupedAllocationConfig          param.Field[interface{}] `json:"grouped_allocation_config"`
	GroupedTieredConfig              param.Field[interface{}] `json:"grouped_tiered_config"`
	GroupedTieredPackageConfig       param.Field[interface{}] `json:"grouped_tiered_package_config"`
	GroupedWithMeteredMinimumConfig  param.Field[interface{}] `json:"grouped_with_metered_minimum_config"`
	GroupedWithProratedMinimumConfig param.Field[interface{}] `json:"grouped_with_prorated_minimum_config"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration           param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	MatrixConfig                          param.Field[shared.MatrixConfigParam]                 `json:"matrix_config"`
	MatrixWithAllocationConfig            param.Field[shared.MatrixWithAllocationConfigParam]   `json:"matrix_with_allocation_config"`
	MatrixWithDisplayNameConfig           param.Field[interface{}]                              `json:"matrix_with_display_name_config"`
	MaxGroupTieredPackageConfig           param.Field[interface{}]                              `json:"max_group_tiered_package_config"`
	Metadata                              param.Field[interface{}]                              `json:"metadata"`
	PackageConfig                         param.Field[shared.PackageConfigParam]                `json:"package_config"`
	PackageWithAllocationConfig           param.Field[interface{}]                              `json:"package_with_allocation_config"`
	ScalableMatrixWithTieredPricingConfig param.Field[interface{}]                              `json:"scalable_matrix_with_tiered_pricing_config"`
	ScalableMatrixWithUnitPricingConfig   param.Field[interface{}]                              `json:"scalable_matrix_with_unit_pricing_config"`
	ThresholdTotalAmountConfig            param.Field[interface{}]                              `json:"threshold_total_amount_config"`
	TieredBPSConfig                       param.Field[shared.TieredBPSConfigParam]              `json:"tiered_bps_config"`
	TieredConfig                          param.Field[shared.TieredConfigParam]                 `json:"tiered_config"`
	TieredPackageConfig                   param.Field[interface{}]                              `json:"tiered_package_config"`
	TieredPackageWithMinimumConfig        param.Field[interface{}]                              `json:"tiered_package_with_minimum_config"`
	TieredWithMinimumConfig               param.Field[interface{}]                              `json:"tiered_with_minimum_config"`
	TieredWithProrationConfig             param.Field[interface{}]                              `json:"tiered_with_proration_config"`
	UnitConfig                            param.Field[shared.UnitConfigParam]                   `json:"unit_config"`
	UnitWithPercentConfig                 param.Field[interface{}]                              `json:"unit_with_percent_config"`
	UnitWithProrationConfig               param.Field[interface{}]                              `json:"unit_with_proration_config"`
}

func (PlanNewParamsPrice) ImplementsPlanNewParamsPriceUnion added in v0.121.0

func (r PlanNewParamsPrice) ImplementsPlanNewParamsPriceUnion()

func (PlanNewParamsPrice) MarshalJSON added in v0.25.0

func (r PlanNewParamsPrice) MarshalJSON() (data []byte, err error)

type PlanNewParamsPricesCadence added in v0.25.0

type PlanNewParamsPricesCadence string

The cadence to bill for this price on.

const (
	PlanNewParamsPricesCadenceAnnual     PlanNewParamsPricesCadence = "annual"
	PlanNewParamsPricesCadenceSemiAnnual PlanNewParamsPricesCadence = "semi_annual"
	PlanNewParamsPricesCadenceMonthly    PlanNewParamsPricesCadence = "monthly"
	PlanNewParamsPricesCadenceQuarterly  PlanNewParamsPricesCadence = "quarterly"
	PlanNewParamsPricesCadenceOneTime    PlanNewParamsPricesCadence = "one_time"
	PlanNewParamsPricesCadenceCustom     PlanNewParamsPricesCadence = "custom"
)

func (PlanNewParamsPricesCadence) IsKnown added in v0.25.0

func (r PlanNewParamsPricesCadence) IsKnown() bool

type PlanNewParamsPricesModelType added in v0.25.0

type PlanNewParamsPricesModelType string
const (
	PlanNewParamsPricesModelTypeUnit                            PlanNewParamsPricesModelType = "unit"
	PlanNewParamsPricesModelTypePackage                         PlanNewParamsPricesModelType = "package"
	PlanNewParamsPricesModelTypeMatrix                          PlanNewParamsPricesModelType = "matrix"
	PlanNewParamsPricesModelTypeTiered                          PlanNewParamsPricesModelType = "tiered"
	PlanNewParamsPricesModelTypeTieredBPS                       PlanNewParamsPricesModelType = "tiered_bps"
	PlanNewParamsPricesModelTypeBPS                             PlanNewParamsPricesModelType = "bps"
	PlanNewParamsPricesModelTypeBulkBPS                         PlanNewParamsPricesModelType = "bulk_bps"
	PlanNewParamsPricesModelTypeBulk                            PlanNewParamsPricesModelType = "bulk"
	PlanNewParamsPricesModelTypeThresholdTotalAmount            PlanNewParamsPricesModelType = "threshold_total_amount"
	PlanNewParamsPricesModelTypeTieredPackage                   PlanNewParamsPricesModelType = "tiered_package"
	PlanNewParamsPricesModelTypeTieredWithMinimum               PlanNewParamsPricesModelType = "tiered_with_minimum"
	PlanNewParamsPricesModelTypeUnitWithPercent                 PlanNewParamsPricesModelType = "unit_with_percent"
	PlanNewParamsPricesModelTypePackageWithAllocation           PlanNewParamsPricesModelType = "package_with_allocation"
	PlanNewParamsPricesModelTypeTieredWithProration             PlanNewParamsPricesModelType = "tiered_with_proration"
	PlanNewParamsPricesModelTypeUnitWithProration               PlanNewParamsPricesModelType = "unit_with_proration"
	PlanNewParamsPricesModelTypeGroupedAllocation               PlanNewParamsPricesModelType = "grouped_allocation"
	PlanNewParamsPricesModelTypeGroupedWithProratedMinimum      PlanNewParamsPricesModelType = "grouped_with_prorated_minimum"
	PlanNewParamsPricesModelTypeGroupedWithMeteredMinimum       PlanNewParamsPricesModelType = "grouped_with_metered_minimum"
	PlanNewParamsPricesModelTypeMatrixWithDisplayName           PlanNewParamsPricesModelType = "matrix_with_display_name"
	PlanNewParamsPricesModelTypeBulkWithProration               PlanNewParamsPricesModelType = "bulk_with_proration"
	PlanNewParamsPricesModelTypeGroupedTieredPackage            PlanNewParamsPricesModelType = "grouped_tiered_package"
	PlanNewParamsPricesModelTypeMaxGroupTieredPackage           PlanNewParamsPricesModelType = "max_group_tiered_package"
	PlanNewParamsPricesModelTypeScalableMatrixWithUnitPricing   PlanNewParamsPricesModelType = "scalable_matrix_with_unit_pricing"
	PlanNewParamsPricesModelTypeScalableMatrixWithTieredPricing PlanNewParamsPricesModelType = "scalable_matrix_with_tiered_pricing"
	PlanNewParamsPricesModelTypeCumulativeGroupedBulk           PlanNewParamsPricesModelType = "cumulative_grouped_bulk"
	PlanNewParamsPricesModelTypeTieredPackageWithMinimum        PlanNewParamsPricesModelType = "tiered_package_with_minimum"
	PlanNewParamsPricesModelTypeMatrixWithAllocation            PlanNewParamsPricesModelType = "matrix_with_allocation"
	PlanNewParamsPricesModelTypeGroupedTiered                   PlanNewParamsPricesModelType = "grouped_tiered"
)

func (PlanNewParamsPricesModelType) IsKnown added in v0.25.0

func (r PlanNewParamsPricesModelType) IsKnown() bool

type PlanNewParamsStatus added in v0.41.0

type PlanNewParamsStatus string

The status of the plan to create (either active or draft). If not specified, this defaults to active.

const (
	PlanNewParamsStatusActive PlanNewParamsStatus = "active"
	PlanNewParamsStatusDraft  PlanNewParamsStatus = "draft"
)

func (PlanNewParamsStatus) IsKnown added in v0.41.0

func (r PlanNewParamsStatus) IsKnown() bool

type PlanPhaseAmountDiscountAdjustment added in v0.121.0

type PlanPhaseAmountDiscountAdjustment = shared.PlanPhaseAmountDiscountAdjustment

This is an alias to an internal type.

type PlanPhaseAmountDiscountAdjustmentAdjustmentType added in v0.121.0

type PlanPhaseAmountDiscountAdjustmentAdjustmentType = shared.PlanPhaseAmountDiscountAdjustmentAdjustmentType

This is an alias to an internal type.

type PlanPhaseMaximumAdjustment added in v0.121.0

type PlanPhaseMaximumAdjustment = shared.PlanPhaseMaximumAdjustment

This is an alias to an internal type.

type PlanPhaseMaximumAdjustmentAdjustmentType added in v0.121.0

type PlanPhaseMaximumAdjustmentAdjustmentType = shared.PlanPhaseMaximumAdjustmentAdjustmentType

This is an alias to an internal type.

type PlanPhaseMinimumAdjustment added in v0.121.0

type PlanPhaseMinimumAdjustment = shared.PlanPhaseMinimumAdjustment

This is an alias to an internal type.

type PlanPhaseMinimumAdjustmentAdjustmentType added in v0.121.0

type PlanPhaseMinimumAdjustmentAdjustmentType = shared.PlanPhaseMinimumAdjustmentAdjustmentType

This is an alias to an internal type.

type PlanPhasePercentageDiscountAdjustment added in v0.121.0

type PlanPhasePercentageDiscountAdjustment = shared.PlanPhasePercentageDiscountAdjustment

This is an alias to an internal type.

type PlanPhasePercentageDiscountAdjustmentAdjustmentType added in v0.121.0

type PlanPhasePercentageDiscountAdjustmentAdjustmentType = shared.PlanPhasePercentageDiscountAdjustmentAdjustmentType

This is an alias to an internal type.

type PlanPhaseUsageDiscountAdjustment added in v0.121.0

type PlanPhaseUsageDiscountAdjustment = shared.PlanPhaseUsageDiscountAdjustment

This is an alias to an internal type.

type PlanPhaseUsageDiscountAdjustmentAdjustmentType added in v0.121.0

type PlanPhaseUsageDiscountAdjustmentAdjustmentType = shared.PlanPhaseUsageDiscountAdjustmentAdjustmentType

This is an alias to an internal type.

type PlanPlanPhase

type PlanPlanPhase struct {
	ID          string          `json:"id,required"`
	Description string          `json:"description,required,nullable"`
	Discount    shared.Discount `json:"discount,required,nullable"`
	// How many terms of length `duration_unit` this phase is active for. If null, this
	// phase is evergreen and active indefinitely
	Duration      int64                      `json:"duration,required,nullable"`
	DurationUnit  PlanPlanPhasesDurationUnit `json:"duration_unit,required,nullable"`
	Maximum       shared.Maximum             `json:"maximum,required,nullable"`
	MaximumAmount string                     `json:"maximum_amount,required,nullable"`
	Minimum       shared.Minimum             `json:"minimum,required,nullable"`
	MinimumAmount string                     `json:"minimum_amount,required,nullable"`
	Name          string                     `json:"name,required"`
	// Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
	Order int64             `json:"order,required"`
	JSON  planPlanPhaseJSON `json:"-"`
}

func (*PlanPlanPhase) UnmarshalJSON

func (r *PlanPlanPhase) UnmarshalJSON(data []byte) (err error)

type PlanPlanPhasesDurationUnit

type PlanPlanPhasesDurationUnit string
const (
	PlanPlanPhasesDurationUnitDaily      PlanPlanPhasesDurationUnit = "daily"
	PlanPlanPhasesDurationUnitMonthly    PlanPlanPhasesDurationUnit = "monthly"
	PlanPlanPhasesDurationUnitQuarterly  PlanPlanPhasesDurationUnit = "quarterly"
	PlanPlanPhasesDurationUnitSemiAnnual PlanPlanPhasesDurationUnit = "semi_annual"
	PlanPlanPhasesDurationUnitAnnual     PlanPlanPhasesDurationUnit = "annual"
)

func (PlanPlanPhasesDurationUnit) IsKnown added in v0.24.0

func (r PlanPlanPhasesDurationUnit) IsKnown() bool

type PlanProduct

type PlanProduct struct {
	ID        string          `json:"id,required"`
	CreatedAt time.Time       `json:"created_at,required" format:"date-time"`
	Name      string          `json:"name,required"`
	JSON      planProductJSON `json:"-"`
}

func (*PlanProduct) UnmarshalJSON

func (r *PlanProduct) UnmarshalJSON(data []byte) (err error)

type PlanService

type PlanService struct {
	Options        []option.RequestOption
	ExternalPlanID *PlanExternalPlanIDService
}

PlanService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPlanService method instead.

func NewPlanService

func NewPlanService(opts ...option.RequestOption) (r *PlanService)

NewPlanService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*PlanService) Fetch

func (r *PlanService) Fetch(ctx context.Context, planID string, opts ...option.RequestOption) (res *Plan, err error)

This endpoint is used to fetch [plan](/core-concepts#plan-and-price) details given a plan identifier. It returns information about the prices included in the plan and their configuration, as well as the product that the plan is attached to.

## Serialized prices

Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a given Price(/core-concepts#plan-and-price) object. The `model_type` field determines the key for the configuration object that is present. A detailed explanation of price types can be found in the [Price schema](/core-concepts#plan-and-price).

## Phases

Orb supports plan phases, also known as contract ramps. For plans with phases, the serialized prices refer to all prices across all phases.

func (*PlanService) List

func (r *PlanService) List(ctx context.Context, query PlanListParams, opts ...option.RequestOption) (res *pagination.Page[Plan], err error)

This endpoint returns a list of all [plans](/core-concepts#plan-and-price) for an account in a list format. The list of plans is ordered starting from the most recently created plan. The response also includes [`pagination_metadata`](/api-reference/pagination), which lets the caller retrieve the next page of results if they exist.

func (*PlanService) ListAutoPaging

func (r *PlanService) ListAutoPaging(ctx context.Context, query PlanListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Plan]

This endpoint returns a list of all [plans](/core-concepts#plan-and-price) for an account in a list format. The list of plans is ordered starting from the most recently created plan. The response also includes [`pagination_metadata`](/api-reference/pagination), which lets the caller retrieve the next page of results if they exist.

func (*PlanService) New

func (r *PlanService) New(ctx context.Context, body PlanNewParams, opts ...option.RequestOption) (res *Plan, err error)

This endpoint allows creation of plans including their prices.

func (*PlanService) Update

func (r *PlanService) Update(ctx context.Context, planID string, body PlanUpdateParams, opts ...option.RequestOption) (res *Plan, err error)

This endpoint can be used to update the `external_plan_id`, and `metadata` of an existing plan.

Other fields on a plan are currently immutable.

type PlanStatus

type PlanStatus string
const (
	PlanStatusActive   PlanStatus = "active"
	PlanStatusArchived PlanStatus = "archived"
	PlanStatusDraft    PlanStatus = "draft"
)

func (PlanStatus) IsKnown added in v0.24.0

func (r PlanStatus) IsKnown() bool

type PlanTrialConfig

type PlanTrialConfig struct {
	TrialPeriod     int64                          `json:"trial_period,required,nullable"`
	TrialPeriodUnit PlanTrialConfigTrialPeriodUnit `json:"trial_period_unit,required"`
	JSON            planTrialConfigJSON            `json:"-"`
}

func (*PlanTrialConfig) UnmarshalJSON

func (r *PlanTrialConfig) UnmarshalJSON(data []byte) (err error)

type PlanTrialConfigTrialPeriodUnit

type PlanTrialConfigTrialPeriodUnit string
const (
	PlanTrialConfigTrialPeriodUnitDays PlanTrialConfigTrialPeriodUnit = "days"
)

func (PlanTrialConfigTrialPeriodUnit) IsKnown added in v0.24.0

type PlanUpdateParams

type PlanUpdateParams struct {
	// An optional user-defined ID for this plan resource, used throughout the system
	// as an alias for this Plan. Use this field to identify a plan by an existing
	// identifier in your system.
	ExternalPlanID param.Field[string] `json:"external_plan_id"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PlanUpdateParams) MarshalJSON

func (r PlanUpdateParams) MarshalJSON() (data []byte, err error)

type PlanVersion added in v0.116.0

type PlanVersion struct {
	// Adjustments for this plan. If the plan has phases, this includes adjustments
	// across all phases of the plan.
	Adjustments []PlanVersionAdjustment `json:"adjustments,required"`
	CreatedAt   time.Time               `json:"created_at,required" format:"date-time"`
	PlanPhases  []PlanVersionPhase      `json:"plan_phases,required,nullable"`
	// Prices for this plan. If the plan has phases, this includes prices across all
	// phases of the plan.
	Prices  []shared.Price  `json:"prices,required"`
	Version int64           `json:"version,required"`
	JSON    planVersionJSON `json:"-"`
}

The PlanVersion resource represents the prices and adjustments present on a specific version of a plan.

func (*PlanVersion) UnmarshalJSON added in v0.116.0

func (r *PlanVersion) UnmarshalJSON(data []byte) (err error)

type PlanVersionAdjustment added in v0.116.0

type PlanVersionAdjustment struct {
	ID             string                               `json:"id,required"`
	AdjustmentType PlanVersionAdjustmentsAdjustmentType `json:"adjustment_type,required"`
	// This field can have the runtime type of [[]string].
	AppliesToPriceIDs interface{} `json:"applies_to_price_ids,required"`
	// This field can have the runtime type of [[]shared.TransformPriceFilter].
	Filters interface{} `json:"filters,required"`
	// True for adjustments that apply to an entire invocice, false for adjustments
	// that apply to only one price.
	IsInvoiceLevel bool `json:"is_invoice_level,required"`
	// The plan phase in which this adjustment is active.
	PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"`
	// The reason for the adjustment.
	Reason string `json:"reason,required,nullable"`
	// The amount by which to discount the prices this adjustment applies to in a given
	// billing period.
	AmountDiscount string `json:"amount_discount"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID string `json:"item_id"`
	// The maximum amount to charge in a given billing period for the prices this
	// adjustment applies to.
	MaximumAmount string `json:"maximum_amount"`
	// The minimum amount to charge in a given billing period for the prices this
	// adjustment applies to.
	MinimumAmount string `json:"minimum_amount"`
	// The percentage (as a value between 0 and 1) by which to discount the price
	// intervals this adjustment applies to in a given billing period.
	PercentageDiscount float64 `json:"percentage_discount"`
	// The number of usage units by which to discount the price this adjustment applies
	// to in a given billing period.
	UsageDiscount float64                   `json:"usage_discount"`
	JSON          planVersionAdjustmentJSON `json:"-"`
	// contains filtered or unexported fields
}

func (PlanVersionAdjustment) AsUnion added in v0.116.0

AsUnion returns a PlanVersionAdjustmentsUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are shared.PlanPhaseUsageDiscountAdjustment, shared.PlanPhaseAmountDiscountAdjustment, shared.PlanPhasePercentageDiscountAdjustment, shared.PlanPhaseMinimumAdjustment, shared.PlanPhaseMaximumAdjustment.

func (*PlanVersionAdjustment) UnmarshalJSON added in v0.116.0

func (r *PlanVersionAdjustment) UnmarshalJSON(data []byte) (err error)

type PlanVersionAdjustmentsAdjustmentType added in v0.116.0

type PlanVersionAdjustmentsAdjustmentType string
const (
	PlanVersionAdjustmentsAdjustmentTypeUsageDiscount      PlanVersionAdjustmentsAdjustmentType = "usage_discount"
	PlanVersionAdjustmentsAdjustmentTypeAmountDiscount     PlanVersionAdjustmentsAdjustmentType = "amount_discount"
	PlanVersionAdjustmentsAdjustmentTypePercentageDiscount PlanVersionAdjustmentsAdjustmentType = "percentage_discount"
	PlanVersionAdjustmentsAdjustmentTypeMinimum            PlanVersionAdjustmentsAdjustmentType = "minimum"
	PlanVersionAdjustmentsAdjustmentTypeMaximum            PlanVersionAdjustmentsAdjustmentType = "maximum"
)

func (PlanVersionAdjustmentsAdjustmentType) IsKnown added in v0.116.0

type PlanVersionPhase added in v0.116.0

type PlanVersionPhase struct {
	ID          string `json:"id,required"`
	Description string `json:"description,required,nullable"`
	// How many terms of length `duration_unit` this phase is active for. If null, this
	// phase is evergreen and active indefinitely
	Duration     int64                        `json:"duration,required,nullable"`
	DurationUnit PlanVersionPhaseDurationUnit `json:"duration_unit,required,nullable"`
	Name         string                       `json:"name,required"`
	// Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
	Order int64                `json:"order,required"`
	JSON  planVersionPhaseJSON `json:"-"`
}

func (*PlanVersionPhase) UnmarshalJSON added in v0.116.0

func (r *PlanVersionPhase) UnmarshalJSON(data []byte) (err error)

type PlanVersionPhaseDurationUnit added in v0.116.0

type PlanVersionPhaseDurationUnit string
const (
	PlanVersionPhaseDurationUnitDaily      PlanVersionPhaseDurationUnit = "daily"
	PlanVersionPhaseDurationUnitMonthly    PlanVersionPhaseDurationUnit = "monthly"
	PlanVersionPhaseDurationUnitQuarterly  PlanVersionPhaseDurationUnit = "quarterly"
	PlanVersionPhaseDurationUnitSemiAnnual PlanVersionPhaseDurationUnit = "semi_annual"
	PlanVersionPhaseDurationUnitAnnual     PlanVersionPhaseDurationUnit = "annual"
)

func (PlanVersionPhaseDurationUnit) IsKnown added in v0.116.0

func (r PlanVersionPhaseDurationUnit) IsKnown() bool

type Price

type Price = shared.Price

The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in the form of an invoice line item. Prices take a quantity and determine an amount to bill.

Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a given Price object. The model_type field determines the key for the configuration object that is present.

For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price)

This is an alias to an internal type.

type PriceBPSPrice added in v0.121.0

type PriceBPSPrice = shared.PriceBPSPrice

This is an alias to an internal type.

type PriceBPSPriceCadence added in v0.121.0

type PriceBPSPriceCadence = shared.PriceBPSPriceCadence

This is an alias to an internal type.

type PriceBPSPriceConversionRateConfig added in v0.121.0

type PriceBPSPriceConversionRateConfig = shared.PriceBPSPriceConversionRateConfig

This is an alias to an internal type.

type PriceBPSPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceBPSPriceConversionRateConfigConversionRateType = shared.PriceBPSPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceBPSPriceModelType added in v0.121.0

type PriceBPSPriceModelType = shared.PriceBPSPriceModelType

This is an alias to an internal type.

type PriceBPSPricePriceType added in v0.121.0

type PriceBPSPricePriceType = shared.PriceBPSPricePriceType

This is an alias to an internal type.

type PriceBulkBPSPrice added in v0.121.0

type PriceBulkBPSPrice = shared.PriceBulkBPSPrice

This is an alias to an internal type.

type PriceBulkBPSPriceCadence added in v0.121.0

type PriceBulkBPSPriceCadence = shared.PriceBulkBPSPriceCadence

This is an alias to an internal type.

type PriceBulkBPSPriceConversionRateConfig added in v0.121.0

type PriceBulkBPSPriceConversionRateConfig = shared.PriceBulkBPSPriceConversionRateConfig

This is an alias to an internal type.

type PriceBulkBPSPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceBulkBPSPriceConversionRateConfigConversionRateType = shared.PriceBulkBPSPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceBulkBPSPriceModelType added in v0.121.0

type PriceBulkBPSPriceModelType = shared.PriceBulkBPSPriceModelType

This is an alias to an internal type.

type PriceBulkBPSPricePriceType added in v0.121.0

type PriceBulkBPSPricePriceType = shared.PriceBulkBPSPricePriceType

This is an alias to an internal type.

type PriceBulkPrice

type PriceBulkPrice = shared.PriceBulkPrice

This is an alias to an internal type.

type PriceBulkPriceCadence

type PriceBulkPriceCadence = shared.PriceBulkPriceCadence

This is an alias to an internal type.

type PriceBulkPriceConversionRateConfig added in v0.121.0

type PriceBulkPriceConversionRateConfig = shared.PriceBulkPriceConversionRateConfig

This is an alias to an internal type.

type PriceBulkPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceBulkPriceConversionRateConfigConversionRateType = shared.PriceBulkPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceBulkPriceModelType

type PriceBulkPriceModelType = shared.PriceBulkPriceModelType

This is an alias to an internal type.

type PriceBulkPricePriceType

type PriceBulkPricePriceType = shared.PriceBulkPricePriceType

This is an alias to an internal type.

type PriceBulkWithProrationPrice added in v0.49.0

type PriceBulkWithProrationPrice = shared.PriceBulkWithProrationPrice

This is an alias to an internal type.

type PriceBulkWithProrationPriceCadence added in v0.49.0

type PriceBulkWithProrationPriceCadence = shared.PriceBulkWithProrationPriceCadence

This is an alias to an internal type.

type PriceBulkWithProrationPriceConversionRateConfig added in v0.121.0

type PriceBulkWithProrationPriceConversionRateConfig = shared.PriceBulkWithProrationPriceConversionRateConfig

This is an alias to an internal type.

type PriceBulkWithProrationPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceBulkWithProrationPriceConversionRateConfigConversionRateType = shared.PriceBulkWithProrationPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceBulkWithProrationPriceModelType added in v0.49.0

type PriceBulkWithProrationPriceModelType = shared.PriceBulkWithProrationPriceModelType

This is an alias to an internal type.

type PriceBulkWithProrationPricePriceType added in v0.49.0

type PriceBulkWithProrationPricePriceType = shared.PriceBulkWithProrationPricePriceType

This is an alias to an internal type.

type PriceCadence added in v0.25.0

type PriceCadence = shared.PriceCadence

This is an alias to an internal type.

type PriceCumulativeGroupedBulkPrice added in v0.94.0

type PriceCumulativeGroupedBulkPrice = shared.PriceCumulativeGroupedBulkPrice

This is an alias to an internal type.

type PriceCumulativeGroupedBulkPriceCadence added in v0.94.0

type PriceCumulativeGroupedBulkPriceCadence = shared.PriceCumulativeGroupedBulkPriceCadence

This is an alias to an internal type.

type PriceCumulativeGroupedBulkPriceConversionRateConfig added in v0.121.0

type PriceCumulativeGroupedBulkPriceConversionRateConfig = shared.PriceCumulativeGroupedBulkPriceConversionRateConfig

This is an alias to an internal type.

type PriceCumulativeGroupedBulkPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceCumulativeGroupedBulkPriceConversionRateConfigConversionRateType = shared.PriceCumulativeGroupedBulkPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceCumulativeGroupedBulkPriceModelType added in v0.94.0

type PriceCumulativeGroupedBulkPriceModelType = shared.PriceCumulativeGroupedBulkPriceModelType

This is an alias to an internal type.

type PriceCumulativeGroupedBulkPricePriceType added in v0.94.0

type PriceCumulativeGroupedBulkPricePriceType = shared.PriceCumulativeGroupedBulkPricePriceType

This is an alias to an internal type.

type PriceEvaluateMultipleParams added in v0.116.0

type PriceEvaluateMultipleParams struct {
	// The exclusive upper bound for event timestamps
	TimeframeEnd param.Field[time.Time] `json:"timeframe_end,required" format:"date-time"`
	// The inclusive lower bound for event timestamps
	TimeframeStart param.Field[time.Time] `json:"timeframe_start,required" format:"date-time"`
	// The ID of the customer to which this evaluation is scoped.
	CustomerID param.Field[string] `json:"customer_id"`
	// The external customer ID of the customer to which this evaluation is scoped.
	ExternalCustomerID param.Field[string] `json:"external_customer_id"`
	// List of prices to evaluate (max 100)
	PriceEvaluations param.Field[[]PriceEvaluateMultipleParamsPriceEvaluation] `json:"price_evaluations"`
}

func (PriceEvaluateMultipleParams) MarshalJSON added in v0.116.0

func (r PriceEvaluateMultipleParams) MarshalJSON() (data []byte, err error)

type PriceEvaluateMultipleParamsPriceEvaluation added in v0.116.0

type PriceEvaluateMultipleParamsPriceEvaluation struct {
	// A boolean
	// [computed property](/extensibility/advanced-metrics#computed-properties) used to
	// filter the underlying billable metric
	Filter param.Field[string] `json:"filter"`
	// Properties (or
	// [computed properties](/extensibility/advanced-metrics#computed-properties)) used
	// to group the underlying billable metric
	GroupingKeys param.Field[[]string] `json:"grouping_keys"`
	// An inline price definition to evaluate, allowing you to test price
	// configurations before adding them to Orb.
	Price param.Field[PriceEvaluateMultipleParamsPriceEvaluationsPriceUnion] `json:"price"`
	// The ID of a price to evaluate that exists in your Orb account.
	PriceID param.Field[string] `json:"price_id"`
}

func (PriceEvaluateMultipleParamsPriceEvaluation) MarshalJSON added in v0.116.0

func (r PriceEvaluateMultipleParamsPriceEvaluation) MarshalJSON() (data []byte, err error)

type PriceEvaluateMultipleParamsPriceEvaluationsPrice added in v0.116.0

type PriceEvaluateMultipleParamsPriceEvaluationsPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceEvaluateMultipleParamsPriceEvaluationsPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                    `json:"item_id,required"`
	ModelType param.Field[PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	BPSConfig                 param.Field[shared.BPSConfigParam]                    `json:"bps_config"`
	BulkBPSConfig             param.Field[shared.BulkBPSConfigParam]                `json:"bulk_bps_config"`
	BulkConfig                param.Field[shared.BulkConfigParam]                   `json:"bulk_config"`
	BulkWithProrationConfig   param.Field[interface{}]                              `json:"bulk_with_proration_config"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate              param.Field[float64]     `json:"conversion_rate"`
	ConversionRateConfig        param.Field[interface{}] `json:"conversion_rate_config"`
	CumulativeGroupedBulkConfig param.Field[interface{}] `json:"cumulative_grouped_bulk_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity               param.Field[float64]     `json:"fixed_price_quantity"`
	GroupedAllocationConfig          param.Field[interface{}] `json:"grouped_allocation_config"`
	GroupedTieredConfig              param.Field[interface{}] `json:"grouped_tiered_config"`
	GroupedTieredPackageConfig       param.Field[interface{}] `json:"grouped_tiered_package_config"`
	GroupedWithMeteredMinimumConfig  param.Field[interface{}] `json:"grouped_with_metered_minimum_config"`
	GroupedWithProratedMinimumConfig param.Field[interface{}] `json:"grouped_with_prorated_minimum_config"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration           param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	MatrixConfig                          param.Field[shared.MatrixConfigParam]                 `json:"matrix_config"`
	MatrixWithAllocationConfig            param.Field[shared.MatrixWithAllocationConfigParam]   `json:"matrix_with_allocation_config"`
	MatrixWithDisplayNameConfig           param.Field[interface{}]                              `json:"matrix_with_display_name_config"`
	MaxGroupTieredPackageConfig           param.Field[interface{}]                              `json:"max_group_tiered_package_config"`
	Metadata                              param.Field[interface{}]                              `json:"metadata"`
	PackageConfig                         param.Field[shared.PackageConfigParam]                `json:"package_config"`
	PackageWithAllocationConfig           param.Field[interface{}]                              `json:"package_with_allocation_config"`
	ScalableMatrixWithTieredPricingConfig param.Field[interface{}]                              `json:"scalable_matrix_with_tiered_pricing_config"`
	ScalableMatrixWithUnitPricingConfig   param.Field[interface{}]                              `json:"scalable_matrix_with_unit_pricing_config"`
	ThresholdTotalAmountConfig            param.Field[interface{}]                              `json:"threshold_total_amount_config"`
	TieredBPSConfig                       param.Field[shared.TieredBPSConfigParam]              `json:"tiered_bps_config"`
	TieredConfig                          param.Field[shared.TieredConfigParam]                 `json:"tiered_config"`
	TieredPackageConfig                   param.Field[interface{}]                              `json:"tiered_package_config"`
	TieredPackageWithMinimumConfig        param.Field[interface{}]                              `json:"tiered_package_with_minimum_config"`
	TieredWithMinimumConfig               param.Field[interface{}]                              `json:"tiered_with_minimum_config"`
	TieredWithProrationConfig             param.Field[interface{}]                              `json:"tiered_with_proration_config"`
	UnitConfig                            param.Field[shared.UnitConfigParam]                   `json:"unit_config"`
	UnitWithPercentConfig                 param.Field[interface{}]                              `json:"unit_with_percent_config"`
	UnitWithProrationConfig               param.Field[interface{}]                              `json:"unit_with_proration_config"`
}

An inline price definition to evaluate, allowing you to test price configurations before adding them to Orb.

func (PriceEvaluateMultipleParamsPriceEvaluationsPrice) ImplementsPriceEvaluateMultipleParamsPriceEvaluationsPriceUnion added in v0.121.0

func (r PriceEvaluateMultipleParamsPriceEvaluationsPrice) ImplementsPriceEvaluateMultipleParamsPriceEvaluationsPriceUnion()

func (PriceEvaluateMultipleParamsPriceEvaluationsPrice) MarshalJSON added in v0.116.0

func (r PriceEvaluateMultipleParamsPriceEvaluationsPrice) MarshalJSON() (data []byte, err error)

type PriceEvaluateMultipleParamsPriceEvaluationsPriceCadence added in v0.116.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceCadence string

The cadence to bill for this price on.

const (
	PriceEvaluateMultipleParamsPriceEvaluationsPriceCadenceAnnual     PriceEvaluateMultipleParamsPriceEvaluationsPriceCadence = "annual"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceCadenceSemiAnnual PriceEvaluateMultipleParamsPriceEvaluationsPriceCadence = "semi_annual"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceCadenceMonthly    PriceEvaluateMultipleParamsPriceEvaluationsPriceCadence = "monthly"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceCadenceQuarterly  PriceEvaluateMultipleParamsPriceEvaluationsPriceCadence = "quarterly"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceCadenceOneTime    PriceEvaluateMultipleParamsPriceEvaluationsPriceCadence = "one_time"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceCadenceCustom     PriceEvaluateMultipleParamsPriceEvaluationsPriceCadence = "custom"
)

func (PriceEvaluateMultipleParamsPriceEvaluationsPriceCadence) IsKnown added in v0.116.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType added in v0.116.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType string
const (
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeUnit                            PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "unit"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypePackage                         PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "package"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeMatrix                          PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "matrix"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeMatrixWithAllocation            PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "matrix_with_allocation"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeTiered                          PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "tiered"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeTieredBPS                       PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "tiered_bps"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeBPS                             PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "bps"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeBulkBPS                         PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "bulk_bps"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeBulk                            PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "bulk"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeThresholdTotalAmount            PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "threshold_total_amount"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeTieredPackage                   PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "tiered_package"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeGroupedTiered                   PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "grouped_tiered"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeMaxGroupTieredPackage           PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "max_group_tiered_package"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeTieredWithMinimum               PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "tiered_with_minimum"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypePackageWithAllocation           PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "package_with_allocation"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeTieredPackageWithMinimum        PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "tiered_package_with_minimum"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeUnitWithPercent                 PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "unit_with_percent"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeTieredWithProration             PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "tiered_with_proration"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeUnitWithProration               PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "unit_with_proration"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeGroupedAllocation               PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "grouped_allocation"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeGroupedWithProratedMinimum      PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "grouped_with_prorated_minimum"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeGroupedWithMeteredMinimum       PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "grouped_with_metered_minimum"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeMatrixWithDisplayName           PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "matrix_with_display_name"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeBulkWithProration               PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "bulk_with_proration"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeGroupedTieredPackage            PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "grouped_tiered_package"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeScalableMatrixWithUnitPricing   PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "scalable_matrix_with_unit_pricing"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeScalableMatrixWithTieredPricing PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "scalable_matrix_with_tiered_pricing"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeCumulativeGroupedBulk           PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "cumulative_grouped_bulk"
)

func (PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType) IsKnown added in v0.116.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceUnion added in v0.116.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceUnion interface {
	ImplementsPriceEvaluateMultipleParamsPriceEvaluationsPriceUnion()
}

An inline price definition to evaluate, allowing you to test price configurations before adding them to Orb.

Satisfied by shared.NewFloatingUnitPriceParam, shared.NewFloatingPackagePriceParam, shared.NewFloatingMatrixPriceParam, shared.NewFloatingMatrixWithAllocationPriceParam, shared.NewFloatingTieredPriceParam, shared.NewFloatingTieredBPSPriceParam, shared.NewFloatingBPSPriceParam, shared.NewFloatingBulkBPSPriceParam, shared.NewFloatingBulkPriceParam, shared.NewFloatingThresholdTotalAmountPriceParam, shared.NewFloatingTieredPackagePriceParam, shared.NewFloatingGroupedTieredPriceParam, shared.NewFloatingMaxGroupTieredPackagePriceParam, shared.NewFloatingTieredWithMinimumPriceParam, shared.NewFloatingPackageWithAllocationPriceParam, shared.NewFloatingTieredPackageWithMinimumPriceParam, shared.NewFloatingUnitWithPercentPriceParam, shared.NewFloatingTieredWithProrationPriceParam, shared.NewFloatingUnitWithProrationPriceParam, shared.NewFloatingGroupedAllocationPriceParam, shared.NewFloatingGroupedWithProratedMinimumPriceParam, shared.NewFloatingGroupedWithMeteredMinimumPriceParam, shared.NewFloatingMatrixWithDisplayNamePriceParam, shared.NewFloatingBulkWithProrationPriceParam, shared.NewFloatingGroupedTieredPackagePriceParam, shared.NewFloatingScalableMatrixWithUnitPricingPriceParam, shared.NewFloatingScalableMatrixWithTieredPricingPriceParam, shared.NewFloatingCumulativeGroupedBulkPriceParam, PriceEvaluateMultipleParamsPriceEvaluationsPrice.

type PriceEvaluateMultipleResponse added in v0.116.0

type PriceEvaluateMultipleResponse struct {
	Data []PriceEvaluateMultipleResponseData `json:"data,required"`
	JSON priceEvaluateMultipleResponseJSON   `json:"-"`
}

func (*PriceEvaluateMultipleResponse) UnmarshalJSON added in v0.116.0

func (r *PriceEvaluateMultipleResponse) UnmarshalJSON(data []byte) (err error)

type PriceEvaluateMultipleResponseData added in v0.116.0

type PriceEvaluateMultipleResponseData struct {
	// The currency of the price
	Currency string `json:"currency,required"`
	// The computed price groups associated with input price.
	PriceGroups []EvaluatePriceGroup `json:"price_groups,required"`
	// The index of the inline price
	InlinePriceIndex int64 `json:"inline_price_index,nullable"`
	// The ID of the price
	PriceID string                                `json:"price_id,nullable"`
	JSON    priceEvaluateMultipleResponseDataJSON `json:"-"`
}

func (*PriceEvaluateMultipleResponseData) UnmarshalJSON added in v0.116.0

func (r *PriceEvaluateMultipleResponseData) UnmarshalJSON(data []byte) (err error)

type PriceEvaluateParams added in v0.25.0

type PriceEvaluateParams struct {
	// The exclusive upper bound for event timestamps
	TimeframeEnd param.Field[time.Time] `json:"timeframe_end,required" format:"date-time"`
	// The inclusive lower bound for event timestamps
	TimeframeStart param.Field[time.Time] `json:"timeframe_start,required" format:"date-time"`
	// The ID of the customer to which this evaluation is scoped.
	CustomerID param.Field[string] `json:"customer_id"`
	// The external customer ID of the customer to which this evaluation is scoped.
	ExternalCustomerID param.Field[string] `json:"external_customer_id"`
	// A boolean
	// [computed property](/extensibility/advanced-metrics#computed-properties) used to
	// filter the underlying billable metric
	Filter param.Field[string] `json:"filter"`
	// Properties (or
	// [computed properties](/extensibility/advanced-metrics#computed-properties)) used
	// to group the underlying billable metric
	GroupingKeys param.Field[[]string] `json:"grouping_keys"`
}

func (PriceEvaluateParams) MarshalJSON added in v0.25.0

func (r PriceEvaluateParams) MarshalJSON() (data []byte, err error)

type PriceEvaluatePreviewEventsParams added in v0.121.0

type PriceEvaluatePreviewEventsParams struct {
	// The exclusive upper bound for event timestamps
	TimeframeEnd param.Field[time.Time] `json:"timeframe_end,required" format:"date-time"`
	// The inclusive lower bound for event timestamps
	TimeframeStart param.Field[time.Time] `json:"timeframe_start,required" format:"date-time"`
	// The ID of the customer to which this evaluation is scoped.
	CustomerID param.Field[string] `json:"customer_id"`
	// List of preview events to use instead of actual usage data
	Events param.Field[[]PriceEvaluatePreviewEventsParamsEvent] `json:"events"`
	// The external customer ID of the customer to which this evaluation is scoped.
	ExternalCustomerID param.Field[string] `json:"external_customer_id"`
	// List of prices to evaluate (max 100)
	PriceEvaluations param.Field[[]PriceEvaluatePreviewEventsParamsPriceEvaluation] `json:"price_evaluations"`
}

func (PriceEvaluatePreviewEventsParams) MarshalJSON added in v0.121.0

func (r PriceEvaluatePreviewEventsParams) MarshalJSON() (data []byte, err error)

type PriceEvaluatePreviewEventsParamsEvent added in v0.121.0

type PriceEvaluatePreviewEventsParamsEvent struct {
	// A name to meaningfully identify the action or event type.
	EventName param.Field[string] `json:"event_name,required"`
	// A dictionary of custom properties. Values in this dictionary must be numeric,
	// boolean, or strings. Nested dictionaries are disallowed.
	Properties param.Field[map[string]interface{}] `json:"properties,required"`
	// An ISO 8601 format date with no timezone offset (i.e. UTC). This should
	// represent the time that usage was recorded, and is particularly important to
	// attribute usage to a given billing period.
	Timestamp param.Field[time.Time] `json:"timestamp,required" format:"date-time"`
	// The Orb Customer identifier
	CustomerID param.Field[string] `json:"customer_id"`
	// An alias for the Orb customer, whose mapping is specified when creating the
	// customer
	ExternalCustomerID param.Field[string] `json:"external_customer_id"`
}

func (PriceEvaluatePreviewEventsParamsEvent) MarshalJSON added in v0.121.0

func (r PriceEvaluatePreviewEventsParamsEvent) MarshalJSON() (data []byte, err error)

type PriceEvaluatePreviewEventsParamsPriceEvaluation added in v0.121.0

type PriceEvaluatePreviewEventsParamsPriceEvaluation struct {
	// A boolean
	// [computed property](/extensibility/advanced-metrics#computed-properties) used to
	// filter the underlying billable metric
	Filter param.Field[string] `json:"filter"`
	// Properties (or
	// [computed properties](/extensibility/advanced-metrics#computed-properties)) used
	// to group the underlying billable metric
	GroupingKeys param.Field[[]string] `json:"grouping_keys"`
	// An inline price definition to evaluate, allowing you to test price
	// configurations before adding them to Orb.
	Price param.Field[PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceUnion] `json:"price"`
	// The ID of a price to evaluate that exists in your Orb account.
	PriceID param.Field[string] `json:"price_id"`
}

func (PriceEvaluatePreviewEventsParamsPriceEvaluation) MarshalJSON added in v0.121.0

func (r PriceEvaluatePreviewEventsParamsPriceEvaluation) MarshalJSON() (data []byte, err error)

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPrice added in v0.121.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                         `json:"item_id,required"`
	ModelType param.Field[PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	BPSConfig                 param.Field[shared.BPSConfigParam]                    `json:"bps_config"`
	BulkBPSConfig             param.Field[shared.BulkBPSConfigParam]                `json:"bulk_bps_config"`
	BulkConfig                param.Field[shared.BulkConfigParam]                   `json:"bulk_config"`
	BulkWithProrationConfig   param.Field[interface{}]                              `json:"bulk_with_proration_config"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate              param.Field[float64]     `json:"conversion_rate"`
	ConversionRateConfig        param.Field[interface{}] `json:"conversion_rate_config"`
	CumulativeGroupedBulkConfig param.Field[interface{}] `json:"cumulative_grouped_bulk_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity               param.Field[float64]     `json:"fixed_price_quantity"`
	GroupedAllocationConfig          param.Field[interface{}] `json:"grouped_allocation_config"`
	GroupedTieredConfig              param.Field[interface{}] `json:"grouped_tiered_config"`
	GroupedTieredPackageConfig       param.Field[interface{}] `json:"grouped_tiered_package_config"`
	GroupedWithMeteredMinimumConfig  param.Field[interface{}] `json:"grouped_with_metered_minimum_config"`
	GroupedWithProratedMinimumConfig param.Field[interface{}] `json:"grouped_with_prorated_minimum_config"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration           param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	MatrixConfig                          param.Field[shared.MatrixConfigParam]                 `json:"matrix_config"`
	MatrixWithAllocationConfig            param.Field[shared.MatrixWithAllocationConfigParam]   `json:"matrix_with_allocation_config"`
	MatrixWithDisplayNameConfig           param.Field[interface{}]                              `json:"matrix_with_display_name_config"`
	MaxGroupTieredPackageConfig           param.Field[interface{}]                              `json:"max_group_tiered_package_config"`
	Metadata                              param.Field[interface{}]                              `json:"metadata"`
	PackageConfig                         param.Field[shared.PackageConfigParam]                `json:"package_config"`
	PackageWithAllocationConfig           param.Field[interface{}]                              `json:"package_with_allocation_config"`
	ScalableMatrixWithTieredPricingConfig param.Field[interface{}]                              `json:"scalable_matrix_with_tiered_pricing_config"`
	ScalableMatrixWithUnitPricingConfig   param.Field[interface{}]                              `json:"scalable_matrix_with_unit_pricing_config"`
	ThresholdTotalAmountConfig            param.Field[interface{}]                              `json:"threshold_total_amount_config"`
	TieredBPSConfig                       param.Field[shared.TieredBPSConfigParam]              `json:"tiered_bps_config"`
	TieredConfig                          param.Field[shared.TieredConfigParam]                 `json:"tiered_config"`
	TieredPackageConfig                   param.Field[interface{}]                              `json:"tiered_package_config"`
	TieredPackageWithMinimumConfig        param.Field[interface{}]                              `json:"tiered_package_with_minimum_config"`
	TieredWithMinimumConfig               param.Field[interface{}]                              `json:"tiered_with_minimum_config"`
	TieredWithProrationConfig             param.Field[interface{}]                              `json:"tiered_with_proration_config"`
	UnitConfig                            param.Field[shared.UnitConfigParam]                   `json:"unit_config"`
	UnitWithPercentConfig                 param.Field[interface{}]                              `json:"unit_with_percent_config"`
	UnitWithProrationConfig               param.Field[interface{}]                              `json:"unit_with_proration_config"`
}

An inline price definition to evaluate, allowing you to test price configurations before adding them to Orb.

func (PriceEvaluatePreviewEventsParamsPriceEvaluationsPrice) ImplementsPriceEvaluatePreviewEventsParamsPriceEvaluationsPriceUnion added in v0.121.0

func (r PriceEvaluatePreviewEventsParamsPriceEvaluationsPrice) ImplementsPriceEvaluatePreviewEventsParamsPriceEvaluationsPriceUnion()

func (PriceEvaluatePreviewEventsParamsPriceEvaluationsPrice) MarshalJSON added in v0.121.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceCadence added in v0.121.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceCadence string

The cadence to bill for this price on.

const (
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceCadenceAnnual     PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceCadence = "annual"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceCadenceSemiAnnual PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceCadence = "semi_annual"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceCadenceMonthly    PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceCadence = "monthly"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceCadenceQuarterly  PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceCadence = "quarterly"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceCadenceOneTime    PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceCadence = "one_time"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceCadenceCustom     PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceCadence = "custom"
)

func (PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceCadence) IsKnown added in v0.121.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType added in v0.121.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType string
const (
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeUnit                            PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "unit"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypePackage                         PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "package"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeMatrix                          PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "matrix"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeMatrixWithAllocation            PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "matrix_with_allocation"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeTiered                          PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "tiered"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeTieredBPS                       PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "tiered_bps"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeBPS                             PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "bps"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeBulkBPS                         PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "bulk_bps"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeBulk                            PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "bulk"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeThresholdTotalAmount            PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "threshold_total_amount"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeTieredPackage                   PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "tiered_package"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeGroupedTiered                   PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "grouped_tiered"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeMaxGroupTieredPackage           PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "max_group_tiered_package"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeTieredWithMinimum               PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "tiered_with_minimum"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypePackageWithAllocation           PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "package_with_allocation"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeTieredPackageWithMinimum        PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "tiered_package_with_minimum"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeUnitWithPercent                 PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "unit_with_percent"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeTieredWithProration             PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "tiered_with_proration"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeUnitWithProration               PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "unit_with_proration"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeGroupedAllocation               PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "grouped_allocation"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeGroupedWithProratedMinimum      PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "grouped_with_prorated_minimum"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeGroupedWithMeteredMinimum       PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "grouped_with_metered_minimum"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeMatrixWithDisplayName           PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "matrix_with_display_name"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeBulkWithProration               PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "bulk_with_proration"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeGroupedTieredPackage            PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "grouped_tiered_package"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeScalableMatrixWithUnitPricing   PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "scalable_matrix_with_unit_pricing"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeScalableMatrixWithTieredPricing PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "scalable_matrix_with_tiered_pricing"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeCumulativeGroupedBulk           PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "cumulative_grouped_bulk"
)

func (PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType) IsKnown added in v0.121.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceUnion added in v0.121.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceUnion interface {
	ImplementsPriceEvaluatePreviewEventsParamsPriceEvaluationsPriceUnion()
}

An inline price definition to evaluate, allowing you to test price configurations before adding them to Orb.

Satisfied by shared.NewFloatingUnitPriceParam, shared.NewFloatingPackagePriceParam, shared.NewFloatingMatrixPriceParam, shared.NewFloatingMatrixWithAllocationPriceParam, shared.NewFloatingTieredPriceParam, shared.NewFloatingTieredBPSPriceParam, shared.NewFloatingBPSPriceParam, shared.NewFloatingBulkBPSPriceParam, shared.NewFloatingBulkPriceParam, shared.NewFloatingThresholdTotalAmountPriceParam, shared.NewFloatingTieredPackagePriceParam, shared.NewFloatingGroupedTieredPriceParam, shared.NewFloatingMaxGroupTieredPackagePriceParam, shared.NewFloatingTieredWithMinimumPriceParam, shared.NewFloatingPackageWithAllocationPriceParam, shared.NewFloatingTieredPackageWithMinimumPriceParam, shared.NewFloatingUnitWithPercentPriceParam, shared.NewFloatingTieredWithProrationPriceParam, shared.NewFloatingUnitWithProrationPriceParam, shared.NewFloatingGroupedAllocationPriceParam, shared.NewFloatingGroupedWithProratedMinimumPriceParam, shared.NewFloatingGroupedWithMeteredMinimumPriceParam, shared.NewFloatingMatrixWithDisplayNamePriceParam, shared.NewFloatingBulkWithProrationPriceParam, shared.NewFloatingGroupedTieredPackagePriceParam, shared.NewFloatingScalableMatrixWithUnitPricingPriceParam, shared.NewFloatingScalableMatrixWithTieredPricingPriceParam, shared.NewFloatingCumulativeGroupedBulkPriceParam, PriceEvaluatePreviewEventsParamsPriceEvaluationsPrice.

type PriceEvaluatePreviewEventsResponse added in v0.121.0

type PriceEvaluatePreviewEventsResponse struct {
	Data []PriceEvaluatePreviewEventsResponseData `json:"data,required"`
	JSON priceEvaluatePreviewEventsResponseJSON   `json:"-"`
}

func (*PriceEvaluatePreviewEventsResponse) UnmarshalJSON added in v0.121.0

func (r *PriceEvaluatePreviewEventsResponse) UnmarshalJSON(data []byte) (err error)

type PriceEvaluatePreviewEventsResponseData added in v0.121.0

type PriceEvaluatePreviewEventsResponseData struct {
	// The currency of the price
	Currency string `json:"currency,required"`
	// The computed price groups associated with input price.
	PriceGroups []EvaluatePriceGroup `json:"price_groups,required"`
	// The index of the inline price
	InlinePriceIndex int64 `json:"inline_price_index,nullable"`
	// The ID of the price
	PriceID string                                     `json:"price_id,nullable"`
	JSON    priceEvaluatePreviewEventsResponseDataJSON `json:"-"`
}

func (*PriceEvaluatePreviewEventsResponseData) UnmarshalJSON added in v0.121.0

func (r *PriceEvaluatePreviewEventsResponseData) UnmarshalJSON(data []byte) (err error)

type PriceEvaluateResponse added in v0.25.0

type PriceEvaluateResponse struct {
	Data []EvaluatePriceGroup      `json:"data,required"`
	JSON priceEvaluateResponseJSON `json:"-"`
}

func (*PriceEvaluateResponse) UnmarshalJSON added in v0.25.0

func (r *PriceEvaluateResponse) UnmarshalJSON(data []byte) (err error)

type PriceExternalPriceIDService

type PriceExternalPriceIDService struct {
	Options []option.RequestOption
}

PriceExternalPriceIDService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPriceExternalPriceIDService method instead.

func NewPriceExternalPriceIDService

func NewPriceExternalPriceIDService(opts ...option.RequestOption) (r *PriceExternalPriceIDService)

NewPriceExternalPriceIDService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*PriceExternalPriceIDService) Fetch

func (r *PriceExternalPriceIDService) Fetch(ctx context.Context, externalPriceID string, opts ...option.RequestOption) (res *shared.Price, err error)

This endpoint returns a price given an external price id. See the [price creation API](/api-reference/price/create-price) for more information about external price aliases.

func (*PriceExternalPriceIDService) Update added in v0.42.0

func (r *PriceExternalPriceIDService) Update(ctx context.Context, externalPriceID string, body PriceExternalPriceIDUpdateParams, opts ...option.RequestOption) (res *shared.Price, err error)

This endpoint allows you to update the `metadata` property on a price. If you pass null for the metadata value, it will clear any existing metadata for that price.

type PriceExternalPriceIDUpdateParams added in v0.42.0

type PriceExternalPriceIDUpdateParams struct {
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceExternalPriceIDUpdateParams) MarshalJSON added in v0.42.0

func (r PriceExternalPriceIDUpdateParams) MarshalJSON() (data []byte, err error)

type PriceGroupedAllocationPrice added in v0.48.0

type PriceGroupedAllocationPrice = shared.PriceGroupedAllocationPrice

This is an alias to an internal type.

type PriceGroupedAllocationPriceCadence added in v0.48.0

type PriceGroupedAllocationPriceCadence = shared.PriceGroupedAllocationPriceCadence

This is an alias to an internal type.

type PriceGroupedAllocationPriceConversionRateConfig added in v0.121.0

type PriceGroupedAllocationPriceConversionRateConfig = shared.PriceGroupedAllocationPriceConversionRateConfig

This is an alias to an internal type.

type PriceGroupedAllocationPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceGroupedAllocationPriceConversionRateConfigConversionRateType = shared.PriceGroupedAllocationPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceGroupedAllocationPriceModelType added in v0.48.0

type PriceGroupedAllocationPriceModelType = shared.PriceGroupedAllocationPriceModelType

This is an alias to an internal type.

type PriceGroupedAllocationPricePriceType added in v0.48.0

type PriceGroupedAllocationPricePriceType = shared.PriceGroupedAllocationPricePriceType

This is an alias to an internal type.

type PriceGroupedTieredPackagePrice added in v0.81.0

type PriceGroupedTieredPackagePrice = shared.PriceGroupedTieredPackagePrice

This is an alias to an internal type.

type PriceGroupedTieredPackagePriceCadence added in v0.81.0

type PriceGroupedTieredPackagePriceCadence = shared.PriceGroupedTieredPackagePriceCadence

This is an alias to an internal type.

type PriceGroupedTieredPackagePriceConversionRateConfig added in v0.121.0

type PriceGroupedTieredPackagePriceConversionRateConfig = shared.PriceGroupedTieredPackagePriceConversionRateConfig

This is an alias to an internal type.

type PriceGroupedTieredPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type PriceGroupedTieredPackagePriceConversionRateConfigConversionRateType = shared.PriceGroupedTieredPackagePriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceGroupedTieredPackagePriceModelType added in v0.81.0

type PriceGroupedTieredPackagePriceModelType = shared.PriceGroupedTieredPackagePriceModelType

This is an alias to an internal type.

type PriceGroupedTieredPackagePricePriceType added in v0.81.0

type PriceGroupedTieredPackagePricePriceType = shared.PriceGroupedTieredPackagePricePriceType

This is an alias to an internal type.

type PriceGroupedTieredPrice added in v0.25.0

type PriceGroupedTieredPrice = shared.PriceGroupedTieredPrice

This is an alias to an internal type.

type PriceGroupedTieredPriceCadence added in v0.25.0

type PriceGroupedTieredPriceCadence = shared.PriceGroupedTieredPriceCadence

This is an alias to an internal type.

type PriceGroupedTieredPriceConversionRateConfig added in v0.121.0

type PriceGroupedTieredPriceConversionRateConfig = shared.PriceGroupedTieredPriceConversionRateConfig

This is an alias to an internal type.

type PriceGroupedTieredPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceGroupedTieredPriceConversionRateConfigConversionRateType = shared.PriceGroupedTieredPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceGroupedTieredPriceModelType added in v0.25.0

type PriceGroupedTieredPriceModelType = shared.PriceGroupedTieredPriceModelType

This is an alias to an internal type.

type PriceGroupedTieredPricePriceType added in v0.25.0

type PriceGroupedTieredPricePriceType = shared.PriceGroupedTieredPricePriceType

This is an alias to an internal type.

type PriceGroupedWithMeteredMinimumPrice added in v0.66.0

type PriceGroupedWithMeteredMinimumPrice = shared.PriceGroupedWithMeteredMinimumPrice

This is an alias to an internal type.

type PriceGroupedWithMeteredMinimumPriceCadence added in v0.66.0

type PriceGroupedWithMeteredMinimumPriceCadence = shared.PriceGroupedWithMeteredMinimumPriceCadence

This is an alias to an internal type.

type PriceGroupedWithMeteredMinimumPriceConversionRateConfig added in v0.121.0

type PriceGroupedWithMeteredMinimumPriceConversionRateConfig = shared.PriceGroupedWithMeteredMinimumPriceConversionRateConfig

This is an alias to an internal type.

type PriceGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType = shared.PriceGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceGroupedWithMeteredMinimumPriceModelType added in v0.66.0

type PriceGroupedWithMeteredMinimumPriceModelType = shared.PriceGroupedWithMeteredMinimumPriceModelType

This is an alias to an internal type.

type PriceGroupedWithMeteredMinimumPricePriceType added in v0.66.0

type PriceGroupedWithMeteredMinimumPricePriceType = shared.PriceGroupedWithMeteredMinimumPricePriceType

This is an alias to an internal type.

type PriceGroupedWithProratedMinimumPrice added in v0.58.0

type PriceGroupedWithProratedMinimumPrice = shared.PriceGroupedWithProratedMinimumPrice

This is an alias to an internal type.

type PriceGroupedWithProratedMinimumPriceCadence added in v0.58.0

type PriceGroupedWithProratedMinimumPriceCadence = shared.PriceGroupedWithProratedMinimumPriceCadence

This is an alias to an internal type.

type PriceGroupedWithProratedMinimumPriceConversionRateConfig added in v0.121.0

type PriceGroupedWithProratedMinimumPriceConversionRateConfig = shared.PriceGroupedWithProratedMinimumPriceConversionRateConfig

This is an alias to an internal type.

type PriceGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType = shared.PriceGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceGroupedWithProratedMinimumPriceModelType added in v0.58.0

type PriceGroupedWithProratedMinimumPriceModelType = shared.PriceGroupedWithProratedMinimumPriceModelType

This is an alias to an internal type.

type PriceGroupedWithProratedMinimumPricePriceType added in v0.58.0

type PriceGroupedWithProratedMinimumPricePriceType = shared.PriceGroupedWithProratedMinimumPricePriceType

This is an alias to an internal type.

type PriceInterval added in v0.121.0

type PriceInterval = shared.PriceInterval

The Price Interval resource represents a period of time for which a price will bill on a subscription. A subscription’s price intervals define its billing behavior.

This is an alias to an internal type.

type PriceListParams

type PriceListParams struct {
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor param.Field[string] `query:"cursor"`
	// The number of items to fetch. Defaults to 20.
	Limit param.Field[int64] `query:"limit"`
}

func (PriceListParams) URLQuery

func (r PriceListParams) URLQuery() (v url.Values)

URLQuery serializes PriceListParams's query parameters as `url.Values`.

type PriceMatrixPrice

type PriceMatrixPrice = shared.PriceMatrixPrice

This is an alias to an internal type.

type PriceMatrixPriceCadence

type PriceMatrixPriceCadence = shared.PriceMatrixPriceCadence

This is an alias to an internal type.

type PriceMatrixPriceConversionRateConfig added in v0.121.0

type PriceMatrixPriceConversionRateConfig = shared.PriceMatrixPriceConversionRateConfig

This is an alias to an internal type.

type PriceMatrixPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceMatrixPriceConversionRateConfigConversionRateType = shared.PriceMatrixPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceMatrixPriceModelType

type PriceMatrixPriceModelType = shared.PriceMatrixPriceModelType

This is an alias to an internal type.

type PriceMatrixPricePriceType

type PriceMatrixPricePriceType = shared.PriceMatrixPricePriceType

This is an alias to an internal type.

type PriceMatrixWithAllocationPrice added in v0.22.0

type PriceMatrixWithAllocationPrice = shared.PriceMatrixWithAllocationPrice

This is an alias to an internal type.

type PriceMatrixWithAllocationPriceCadence added in v0.22.0

type PriceMatrixWithAllocationPriceCadence = shared.PriceMatrixWithAllocationPriceCadence

This is an alias to an internal type.

type PriceMatrixWithAllocationPriceConversionRateConfig added in v0.121.0

type PriceMatrixWithAllocationPriceConversionRateConfig = shared.PriceMatrixWithAllocationPriceConversionRateConfig

This is an alias to an internal type.

type PriceMatrixWithAllocationPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceMatrixWithAllocationPriceConversionRateConfigConversionRateType = shared.PriceMatrixWithAllocationPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceMatrixWithAllocationPriceModelType added in v0.22.0

type PriceMatrixWithAllocationPriceModelType = shared.PriceMatrixWithAllocationPriceModelType

This is an alias to an internal type.

type PriceMatrixWithAllocationPricePriceType added in v0.22.0

type PriceMatrixWithAllocationPricePriceType = shared.PriceMatrixWithAllocationPricePriceType

This is an alias to an internal type.

type PriceMatrixWithDisplayNamePrice added in v0.78.0

type PriceMatrixWithDisplayNamePrice = shared.PriceMatrixWithDisplayNamePrice

This is an alias to an internal type.

type PriceMatrixWithDisplayNamePriceCadence added in v0.78.0

type PriceMatrixWithDisplayNamePriceCadence = shared.PriceMatrixWithDisplayNamePriceCadence

This is an alias to an internal type.

type PriceMatrixWithDisplayNamePriceConversionRateConfig added in v0.121.0

type PriceMatrixWithDisplayNamePriceConversionRateConfig = shared.PriceMatrixWithDisplayNamePriceConversionRateConfig

This is an alias to an internal type.

type PriceMatrixWithDisplayNamePriceConversionRateConfigConversionRateType added in v0.121.0

type PriceMatrixWithDisplayNamePriceConversionRateConfigConversionRateType = shared.PriceMatrixWithDisplayNamePriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceMatrixWithDisplayNamePriceModelType added in v0.78.0

type PriceMatrixWithDisplayNamePriceModelType = shared.PriceMatrixWithDisplayNamePriceModelType

This is an alias to an internal type.

type PriceMatrixWithDisplayNamePricePriceType added in v0.78.0

type PriceMatrixWithDisplayNamePricePriceType = shared.PriceMatrixWithDisplayNamePricePriceType

This is an alias to an internal type.

type PriceMaxGroupTieredPackagePrice added in v0.90.0

type PriceMaxGroupTieredPackagePrice = shared.PriceMaxGroupTieredPackagePrice

This is an alias to an internal type.

type PriceMaxGroupTieredPackagePriceCadence added in v0.90.0

type PriceMaxGroupTieredPackagePriceCadence = shared.PriceMaxGroupTieredPackagePriceCadence

This is an alias to an internal type.

type PriceMaxGroupTieredPackagePriceConversionRateConfig added in v0.121.0

type PriceMaxGroupTieredPackagePriceConversionRateConfig = shared.PriceMaxGroupTieredPackagePriceConversionRateConfig

This is an alias to an internal type.

type PriceMaxGroupTieredPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type PriceMaxGroupTieredPackagePriceConversionRateConfigConversionRateType = shared.PriceMaxGroupTieredPackagePriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceMaxGroupTieredPackagePriceModelType added in v0.90.0

type PriceMaxGroupTieredPackagePriceModelType = shared.PriceMaxGroupTieredPackagePriceModelType

This is an alias to an internal type.

type PriceMaxGroupTieredPackagePricePriceType added in v0.90.0

type PriceMaxGroupTieredPackagePricePriceType = shared.PriceMaxGroupTieredPackagePricePriceType

This is an alias to an internal type.

type PriceModelType added in v0.25.0

type PriceModelType = shared.PriceModelType

This is an alias to an internal type.

type PriceNewParamsNewFloatingBPSPrice added in v0.121.0

type PriceNewParamsNewFloatingBPSPrice struct {
	BPSConfig param.Field[shared.BPSConfigParam] `json:"bps_config,required"`
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingBPSPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                     `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingBPSPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingBPSPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingBPSPrice) ImplementsPriceNewParams added in v0.121.0

func (PriceNewParamsNewFloatingBPSPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingBPSPrice) MarshalJSON added in v0.121.0

func (r PriceNewParamsNewFloatingBPSPrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingBPSPriceCadence added in v0.121.0

type PriceNewParamsNewFloatingBPSPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingBPSPriceCadenceAnnual     PriceNewParamsNewFloatingBPSPriceCadence = "annual"
	PriceNewParamsNewFloatingBPSPriceCadenceSemiAnnual PriceNewParamsNewFloatingBPSPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingBPSPriceCadenceMonthly    PriceNewParamsNewFloatingBPSPriceCadence = "monthly"
	PriceNewParamsNewFloatingBPSPriceCadenceQuarterly  PriceNewParamsNewFloatingBPSPriceCadence = "quarterly"
	PriceNewParamsNewFloatingBPSPriceCadenceOneTime    PriceNewParamsNewFloatingBPSPriceCadence = "one_time"
	PriceNewParamsNewFloatingBPSPriceCadenceCustom     PriceNewParamsNewFloatingBPSPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingBPSPriceCadence) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingBPSPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingBPSPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingBPSPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                  `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                    `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingBPSPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingBPSPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingBPSPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingBPSPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingBPSPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingBPSPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingBPSPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingBPSPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingBPSPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingBPSPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingBPSPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingBPSPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingBPSPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingBPSPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingBPSPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingBPSPriceConversionRateConfig.

type PriceNewParamsNewFloatingBPSPriceModelType added in v0.121.0

type PriceNewParamsNewFloatingBPSPriceModelType string
const (
	PriceNewParamsNewFloatingBPSPriceModelTypeBPS PriceNewParamsNewFloatingBPSPriceModelType = "bps"
)

func (PriceNewParamsNewFloatingBPSPriceModelType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingBulkBPSPrice added in v0.121.0

type PriceNewParamsNewFloatingBulkBPSPrice struct {
	BulkBPSConfig param.Field[shared.BulkBPSConfigParam] `json:"bulk_bps_config,required"`
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingBulkBPSPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                         `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingBulkBPSPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingBulkBPSPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingBulkBPSPrice) ImplementsPriceNewParams added in v0.121.0

func (PriceNewParamsNewFloatingBulkBPSPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingBulkBPSPrice) MarshalJSON added in v0.121.0

func (r PriceNewParamsNewFloatingBulkBPSPrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingBulkBPSPriceCadence added in v0.121.0

type PriceNewParamsNewFloatingBulkBPSPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingBulkBPSPriceCadenceAnnual     PriceNewParamsNewFloatingBulkBPSPriceCadence = "annual"
	PriceNewParamsNewFloatingBulkBPSPriceCadenceSemiAnnual PriceNewParamsNewFloatingBulkBPSPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingBulkBPSPriceCadenceMonthly    PriceNewParamsNewFloatingBulkBPSPriceCadence = "monthly"
	PriceNewParamsNewFloatingBulkBPSPriceCadenceQuarterly  PriceNewParamsNewFloatingBulkBPSPriceCadence = "quarterly"
	PriceNewParamsNewFloatingBulkBPSPriceCadenceOneTime    PriceNewParamsNewFloatingBulkBPSPriceCadence = "one_time"
	PriceNewParamsNewFloatingBulkBPSPriceCadenceCustom     PriceNewParamsNewFloatingBulkBPSPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingBulkBPSPriceCadence) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingBulkBPSPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingBulkBPSPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingBulkBPSPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                      `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                        `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingBulkBPSPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingBulkBPSPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingBulkBPSPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingBulkBPSPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingBulkBPSPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingBulkBPSPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingBulkBPSPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingBulkBPSPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingBulkBPSPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingBulkBPSPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingBulkBPSPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingBulkBPSPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingBulkBPSPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingBulkBPSPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingBulkBPSPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingBulkBPSPriceConversionRateConfig.

type PriceNewParamsNewFloatingBulkBPSPriceModelType added in v0.121.0

type PriceNewParamsNewFloatingBulkBPSPriceModelType string
const (
	PriceNewParamsNewFloatingBulkBPSPriceModelTypeBulkBPS PriceNewParamsNewFloatingBulkBPSPriceModelType = "bulk_bps"
)

func (PriceNewParamsNewFloatingBulkBPSPriceModelType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingBulkPrice added in v0.2.0

type PriceNewParamsNewFloatingBulkPrice struct {
	BulkConfig param.Field[shared.BulkConfigParam] `json:"bulk_config,required"`
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingBulkPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                      `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingBulkPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingBulkPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingBulkPrice) ImplementsPriceNewParams added in v0.2.0

func (PriceNewParamsNewFloatingBulkPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingBulkPrice) MarshalJSON added in v0.2.0

func (r PriceNewParamsNewFloatingBulkPrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingBulkPriceCadence added in v0.2.0

type PriceNewParamsNewFloatingBulkPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingBulkPriceCadenceAnnual     PriceNewParamsNewFloatingBulkPriceCadence = "annual"
	PriceNewParamsNewFloatingBulkPriceCadenceSemiAnnual PriceNewParamsNewFloatingBulkPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingBulkPriceCadenceMonthly    PriceNewParamsNewFloatingBulkPriceCadence = "monthly"
	PriceNewParamsNewFloatingBulkPriceCadenceQuarterly  PriceNewParamsNewFloatingBulkPriceCadence = "quarterly"
	PriceNewParamsNewFloatingBulkPriceCadenceOneTime    PriceNewParamsNewFloatingBulkPriceCadence = "one_time"
	PriceNewParamsNewFloatingBulkPriceCadenceCustom     PriceNewParamsNewFloatingBulkPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingBulkPriceCadence) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingBulkPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingBulkPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingBulkPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                   `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                     `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingBulkPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingBulkPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingBulkPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingBulkPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingBulkPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingBulkPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingBulkPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingBulkPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingBulkPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingBulkPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingBulkPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingBulkPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingBulkPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingBulkPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingBulkPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingBulkPriceConversionRateConfig.

type PriceNewParamsNewFloatingBulkPriceModelType added in v0.2.0

type PriceNewParamsNewFloatingBulkPriceModelType string
const (
	PriceNewParamsNewFloatingBulkPriceModelTypeBulk PriceNewParamsNewFloatingBulkPriceModelType = "bulk"
)

func (PriceNewParamsNewFloatingBulkPriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingBulkWithProrationPrice added in v0.49.0

type PriceNewParamsNewFloatingBulkWithProrationPrice struct {
	BulkWithProrationConfig param.Field[map[string]interface{}] `json:"bulk_with_proration_config,required"`
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingBulkWithProrationPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                   `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingBulkWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingBulkWithProrationPrice) ImplementsPriceNewParams added in v0.49.0

func (PriceNewParamsNewFloatingBulkWithProrationPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingBulkWithProrationPrice) MarshalJSON added in v0.49.0

func (r PriceNewParamsNewFloatingBulkWithProrationPrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingBulkWithProrationPriceCadence added in v0.49.0

type PriceNewParamsNewFloatingBulkWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingBulkWithProrationPriceCadenceAnnual     PriceNewParamsNewFloatingBulkWithProrationPriceCadence = "annual"
	PriceNewParamsNewFloatingBulkWithProrationPriceCadenceSemiAnnual PriceNewParamsNewFloatingBulkWithProrationPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingBulkWithProrationPriceCadenceMonthly    PriceNewParamsNewFloatingBulkWithProrationPriceCadence = "monthly"
	PriceNewParamsNewFloatingBulkWithProrationPriceCadenceQuarterly  PriceNewParamsNewFloatingBulkWithProrationPriceCadence = "quarterly"
	PriceNewParamsNewFloatingBulkWithProrationPriceCadenceOneTime    PriceNewParamsNewFloatingBulkWithProrationPriceCadence = "one_time"
	PriceNewParamsNewFloatingBulkWithProrationPriceCadenceCustom     PriceNewParamsNewFloatingBulkWithProrationPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingBulkWithProrationPriceCadence) IsKnown added in v0.49.0

type PriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                  `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfig.

type PriceNewParamsNewFloatingBulkWithProrationPriceModelType added in v0.49.0

type PriceNewParamsNewFloatingBulkWithProrationPriceModelType string
const (
	PriceNewParamsNewFloatingBulkWithProrationPriceModelTypeBulkWithProration PriceNewParamsNewFloatingBulkWithProrationPriceModelType = "bulk_with_proration"
)

func (PriceNewParamsNewFloatingBulkWithProrationPriceModelType) IsKnown added in v0.49.0

type PriceNewParamsNewFloatingCumulativeGroupedBulkPrice added in v0.94.0

type PriceNewParamsNewFloatingCumulativeGroupedBulkPrice struct {
	// The cadence to bill for this price on.
	Cadence                     param.Field[PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCadence] `json:"cadence,required"`
	CumulativeGroupedBulkConfig param.Field[map[string]interface{}]                                     `json:"cumulative_grouped_bulk_config,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                       `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingCumulativeGroupedBulkPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingCumulativeGroupedBulkPrice) ImplementsPriceNewParams added in v0.94.0

func (PriceNewParamsNewFloatingCumulativeGroupedBulkPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingCumulativeGroupedBulkPrice) MarshalJSON added in v0.94.0

func (r PriceNewParamsNewFloatingCumulativeGroupedBulkPrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCadence added in v0.94.0

type PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCadenceAnnual     PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCadence = "annual"
	PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCadenceSemiAnnual PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCadenceMonthly    PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCadence = "monthly"
	PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCadenceQuarterly  PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCadence = "quarterly"
	PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCadenceOneTime    PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCadence = "one_time"
	PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCadenceCustom     PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCadence) IsKnown added in v0.94.0

type PriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                    `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                      `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfig.

type PriceNewParamsNewFloatingCumulativeGroupedBulkPriceModelType added in v0.94.0

type PriceNewParamsNewFloatingCumulativeGroupedBulkPriceModelType string
const (
	PriceNewParamsNewFloatingCumulativeGroupedBulkPriceModelTypeCumulativeGroupedBulk PriceNewParamsNewFloatingCumulativeGroupedBulkPriceModelType = "cumulative_grouped_bulk"
)

func (PriceNewParamsNewFloatingCumulativeGroupedBulkPriceModelType) IsKnown added in v0.94.0

type PriceNewParamsNewFloatingGroupedAllocationPrice added in v0.48.0

type PriceNewParamsNewFloatingGroupedAllocationPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingGroupedAllocationPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency                param.Field[string]                 `json:"currency,required"`
	GroupedAllocationConfig param.Field[map[string]interface{}] `json:"grouped_allocation_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                   `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingGroupedAllocationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingGroupedAllocationPrice) ImplementsPriceNewParams added in v0.48.0

func (PriceNewParamsNewFloatingGroupedAllocationPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingGroupedAllocationPrice) MarshalJSON added in v0.48.0

func (r PriceNewParamsNewFloatingGroupedAllocationPrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingGroupedAllocationPriceCadence added in v0.48.0

type PriceNewParamsNewFloatingGroupedAllocationPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingGroupedAllocationPriceCadenceAnnual     PriceNewParamsNewFloatingGroupedAllocationPriceCadence = "annual"
	PriceNewParamsNewFloatingGroupedAllocationPriceCadenceSemiAnnual PriceNewParamsNewFloatingGroupedAllocationPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingGroupedAllocationPriceCadenceMonthly    PriceNewParamsNewFloatingGroupedAllocationPriceCadence = "monthly"
	PriceNewParamsNewFloatingGroupedAllocationPriceCadenceQuarterly  PriceNewParamsNewFloatingGroupedAllocationPriceCadence = "quarterly"
	PriceNewParamsNewFloatingGroupedAllocationPriceCadenceOneTime    PriceNewParamsNewFloatingGroupedAllocationPriceCadence = "one_time"
	PriceNewParamsNewFloatingGroupedAllocationPriceCadenceCustom     PriceNewParamsNewFloatingGroupedAllocationPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingGroupedAllocationPriceCadence) IsKnown added in v0.48.0

type PriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                  `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfig.

type PriceNewParamsNewFloatingGroupedAllocationPriceModelType added in v0.48.0

type PriceNewParamsNewFloatingGroupedAllocationPriceModelType string
const (
	PriceNewParamsNewFloatingGroupedAllocationPriceModelTypeGroupedAllocation PriceNewParamsNewFloatingGroupedAllocationPriceModelType = "grouped_allocation"
)

func (PriceNewParamsNewFloatingGroupedAllocationPriceModelType) IsKnown added in v0.48.0

type PriceNewParamsNewFloatingGroupedTieredPackagePrice added in v0.81.0

type PriceNewParamsNewFloatingGroupedTieredPackagePrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingGroupedTieredPackagePriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency                   param.Field[string]                 `json:"currency,required"`
	GroupedTieredPackageConfig param.Field[map[string]interface{}] `json:"grouped_tiered_package_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                      `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingGroupedTieredPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingGroupedTieredPackagePrice) ImplementsPriceNewParams added in v0.81.0

func (PriceNewParamsNewFloatingGroupedTieredPackagePrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingGroupedTieredPackagePrice) MarshalJSON added in v0.81.0

func (r PriceNewParamsNewFloatingGroupedTieredPackagePrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingGroupedTieredPackagePriceCadence added in v0.81.0

type PriceNewParamsNewFloatingGroupedTieredPackagePriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingGroupedTieredPackagePriceCadenceAnnual     PriceNewParamsNewFloatingGroupedTieredPackagePriceCadence = "annual"
	PriceNewParamsNewFloatingGroupedTieredPackagePriceCadenceSemiAnnual PriceNewParamsNewFloatingGroupedTieredPackagePriceCadence = "semi_annual"
	PriceNewParamsNewFloatingGroupedTieredPackagePriceCadenceMonthly    PriceNewParamsNewFloatingGroupedTieredPackagePriceCadence = "monthly"
	PriceNewParamsNewFloatingGroupedTieredPackagePriceCadenceQuarterly  PriceNewParamsNewFloatingGroupedTieredPackagePriceCadence = "quarterly"
	PriceNewParamsNewFloatingGroupedTieredPackagePriceCadenceOneTime    PriceNewParamsNewFloatingGroupedTieredPackagePriceCadence = "one_time"
	PriceNewParamsNewFloatingGroupedTieredPackagePriceCadenceCustom     PriceNewParamsNewFloatingGroupedTieredPackagePriceCadence = "custom"
)

func (PriceNewParamsNewFloatingGroupedTieredPackagePriceCadence) IsKnown added in v0.81.0

type PriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                   `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                     `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfig.

type PriceNewParamsNewFloatingGroupedTieredPackagePriceModelType added in v0.81.0

type PriceNewParamsNewFloatingGroupedTieredPackagePriceModelType string
const (
	PriceNewParamsNewFloatingGroupedTieredPackagePriceModelTypeGroupedTieredPackage PriceNewParamsNewFloatingGroupedTieredPackagePriceModelType = "grouped_tiered_package"
)

func (PriceNewParamsNewFloatingGroupedTieredPackagePriceModelType) IsKnown added in v0.81.0

type PriceNewParamsNewFloatingGroupedTieredPrice added in v0.25.0

type PriceNewParamsNewFloatingGroupedTieredPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingGroupedTieredPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency            param.Field[string]                 `json:"currency,required"`
	GroupedTieredConfig param.Field[map[string]interface{}] `json:"grouped_tiered_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                               `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingGroupedTieredPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingGroupedTieredPrice) ImplementsPriceNewParams added in v0.25.0

func (PriceNewParamsNewFloatingGroupedTieredPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingGroupedTieredPrice) MarshalJSON added in v0.25.0

func (r PriceNewParamsNewFloatingGroupedTieredPrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingGroupedTieredPriceCadence added in v0.25.0

type PriceNewParamsNewFloatingGroupedTieredPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingGroupedTieredPriceCadenceAnnual     PriceNewParamsNewFloatingGroupedTieredPriceCadence = "annual"
	PriceNewParamsNewFloatingGroupedTieredPriceCadenceSemiAnnual PriceNewParamsNewFloatingGroupedTieredPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingGroupedTieredPriceCadenceMonthly    PriceNewParamsNewFloatingGroupedTieredPriceCadence = "monthly"
	PriceNewParamsNewFloatingGroupedTieredPriceCadenceQuarterly  PriceNewParamsNewFloatingGroupedTieredPriceCadence = "quarterly"
	PriceNewParamsNewFloatingGroupedTieredPriceCadenceOneTime    PriceNewParamsNewFloatingGroupedTieredPriceCadence = "one_time"
	PriceNewParamsNewFloatingGroupedTieredPriceCadenceCustom     PriceNewParamsNewFloatingGroupedTieredPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingGroupedTieredPriceCadence) IsKnown added in v0.25.0

type PriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                            `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                              `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfig.

type PriceNewParamsNewFloatingGroupedTieredPriceModelType added in v0.25.0

type PriceNewParamsNewFloatingGroupedTieredPriceModelType string
const (
	PriceNewParamsNewFloatingGroupedTieredPriceModelTypeGroupedTiered PriceNewParamsNewFloatingGroupedTieredPriceModelType = "grouped_tiered"
)

func (PriceNewParamsNewFloatingGroupedTieredPriceModelType) IsKnown added in v0.25.0

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPrice added in v0.66.0

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency                        param.Field[string]                 `json:"currency,required"`
	GroupedWithMeteredMinimumConfig param.Field[map[string]interface{}] `json:"grouped_with_metered_minimum_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                           `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingGroupedWithMeteredMinimumPrice) ImplementsPriceNewParams added in v0.66.0

func (PriceNewParamsNewFloatingGroupedWithMeteredMinimumPrice) MarshalJSON added in v0.66.0

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceCadence added in v0.66.0

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceCadenceAnnual     PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceCadence = "annual"
	PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceCadenceSemiAnnual PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceCadenceMonthly    PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceCadence = "monthly"
	PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceCadenceQuarterly  PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceCadence = "quarterly"
	PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceCadenceOneTime    PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceCadence = "one_time"
	PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceCadenceCustom     PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceCadence) IsKnown added in v0.66.0

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                        `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                          `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfig.

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceModelType added in v0.66.0

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceModelType string
const (
	PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceModelTypeGroupedWithMeteredMinimum PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceModelType = "grouped_with_metered_minimum"
)

func (PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceModelType) IsKnown added in v0.66.0

type PriceNewParamsNewFloatingGroupedWithProratedMinimumPrice added in v0.58.0

type PriceNewParamsNewFloatingGroupedWithProratedMinimumPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency                         param.Field[string]                 `json:"currency,required"`
	GroupedWithProratedMinimumConfig param.Field[map[string]interface{}] `json:"grouped_with_prorated_minimum_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                            `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingGroupedWithProratedMinimumPrice) ImplementsPriceNewParams added in v0.58.0

func (PriceNewParamsNewFloatingGroupedWithProratedMinimumPrice) MarshalJSON added in v0.58.0

type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence added in v0.58.0

type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadenceAnnual     PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence = "annual"
	PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadenceSemiAnnual PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadenceMonthly    PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence = "monthly"
	PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadenceQuarterly  PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence = "quarterly"
	PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadenceOneTime    PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence = "one_time"
	PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadenceCustom     PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence) IsKnown added in v0.58.0

type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                         `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                           `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfig.

type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceModelType added in v0.58.0

type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceModelType string
const (
	PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceModelTypeGroupedWithProratedMinimum PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceModelType = "grouped_with_prorated_minimum"
)

func (PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceModelType) IsKnown added in v0.58.0

type PriceNewParamsNewFloatingMatrixPrice added in v0.2.0

type PriceNewParamsNewFloatingMatrixPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingMatrixPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID       param.Field[string]                                        `json:"item_id,required"`
	MatrixConfig param.Field[shared.MatrixConfigParam]                      `json:"matrix_config,required"`
	ModelType    param.Field[PriceNewParamsNewFloatingMatrixPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingMatrixPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingMatrixPrice) ImplementsPriceNewParams added in v0.2.0

func (PriceNewParamsNewFloatingMatrixPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingMatrixPrice) MarshalJSON added in v0.2.0

func (r PriceNewParamsNewFloatingMatrixPrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingMatrixPriceCadence added in v0.2.0

type PriceNewParamsNewFloatingMatrixPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingMatrixPriceCadenceAnnual     PriceNewParamsNewFloatingMatrixPriceCadence = "annual"
	PriceNewParamsNewFloatingMatrixPriceCadenceSemiAnnual PriceNewParamsNewFloatingMatrixPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingMatrixPriceCadenceMonthly    PriceNewParamsNewFloatingMatrixPriceCadence = "monthly"
	PriceNewParamsNewFloatingMatrixPriceCadenceQuarterly  PriceNewParamsNewFloatingMatrixPriceCadence = "quarterly"
	PriceNewParamsNewFloatingMatrixPriceCadenceOneTime    PriceNewParamsNewFloatingMatrixPriceCadence = "one_time"
	PriceNewParamsNewFloatingMatrixPriceCadenceCustom     PriceNewParamsNewFloatingMatrixPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingMatrixPriceCadence) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingMatrixPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingMatrixPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingMatrixPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                     `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                       `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingMatrixPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingMatrixPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingMatrixPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingMatrixPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingMatrixPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingMatrixPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingMatrixPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingMatrixPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingMatrixPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingMatrixPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingMatrixPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingMatrixPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingMatrixPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingMatrixPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingMatrixPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingMatrixPriceConversionRateConfig.

type PriceNewParamsNewFloatingMatrixPriceModelType added in v0.2.0

type PriceNewParamsNewFloatingMatrixPriceModelType string
const (
	PriceNewParamsNewFloatingMatrixPriceModelTypeMatrix PriceNewParamsNewFloatingMatrixPriceModelType = "matrix"
)

func (PriceNewParamsNewFloatingMatrixPriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingMatrixWithAllocationPrice added in v0.22.0

type PriceNewParamsNewFloatingMatrixWithAllocationPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID                     param.Field[string]                                                      `json:"item_id,required"`
	MatrixWithAllocationConfig param.Field[shared.MatrixWithAllocationConfigParam]                      `json:"matrix_with_allocation_config,required"`
	ModelType                  param.Field[PriceNewParamsNewFloatingMatrixWithAllocationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingMatrixWithAllocationPrice) ImplementsPriceNewParams added in v0.22.0

func (PriceNewParamsNewFloatingMatrixWithAllocationPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingMatrixWithAllocationPrice) MarshalJSON added in v0.22.0

func (r PriceNewParamsNewFloatingMatrixWithAllocationPrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence added in v0.22.0

type PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingMatrixWithAllocationPriceCadenceAnnual     PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence = "annual"
	PriceNewParamsNewFloatingMatrixWithAllocationPriceCadenceSemiAnnual PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingMatrixWithAllocationPriceCadenceMonthly    PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence = "monthly"
	PriceNewParamsNewFloatingMatrixWithAllocationPriceCadenceQuarterly  PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence = "quarterly"
	PriceNewParamsNewFloatingMatrixWithAllocationPriceCadenceOneTime    PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence = "one_time"
	PriceNewParamsNewFloatingMatrixWithAllocationPriceCadenceCustom     PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                   `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                     `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfig.

type PriceNewParamsNewFloatingMatrixWithAllocationPriceModelType added in v0.22.0

type PriceNewParamsNewFloatingMatrixWithAllocationPriceModelType string
const (
	PriceNewParamsNewFloatingMatrixWithAllocationPriceModelTypeMatrixWithAllocation PriceNewParamsNewFloatingMatrixWithAllocationPriceModelType = "matrix_with_allocation"
)

func (PriceNewParamsNewFloatingMatrixWithAllocationPriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingMatrixWithDisplayNamePrice added in v0.78.0

type PriceNewParamsNewFloatingMatrixWithDisplayNamePrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingMatrixWithDisplayNamePriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID                      param.Field[string]                                                       `json:"item_id,required"`
	MatrixWithDisplayNameConfig param.Field[map[string]interface{}]                                       `json:"matrix_with_display_name_config,required"`
	ModelType                   param.Field[PriceNewParamsNewFloatingMatrixWithDisplayNamePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingMatrixWithDisplayNamePrice) ImplementsPriceNewParams added in v0.78.0

func (PriceNewParamsNewFloatingMatrixWithDisplayNamePrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingMatrixWithDisplayNamePrice) MarshalJSON added in v0.78.0

func (r PriceNewParamsNewFloatingMatrixWithDisplayNamePrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingMatrixWithDisplayNamePriceCadence added in v0.78.0

type PriceNewParamsNewFloatingMatrixWithDisplayNamePriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingMatrixWithDisplayNamePriceCadenceAnnual     PriceNewParamsNewFloatingMatrixWithDisplayNamePriceCadence = "annual"
	PriceNewParamsNewFloatingMatrixWithDisplayNamePriceCadenceSemiAnnual PriceNewParamsNewFloatingMatrixWithDisplayNamePriceCadence = "semi_annual"
	PriceNewParamsNewFloatingMatrixWithDisplayNamePriceCadenceMonthly    PriceNewParamsNewFloatingMatrixWithDisplayNamePriceCadence = "monthly"
	PriceNewParamsNewFloatingMatrixWithDisplayNamePriceCadenceQuarterly  PriceNewParamsNewFloatingMatrixWithDisplayNamePriceCadence = "quarterly"
	PriceNewParamsNewFloatingMatrixWithDisplayNamePriceCadenceOneTime    PriceNewParamsNewFloatingMatrixWithDisplayNamePriceCadence = "one_time"
	PriceNewParamsNewFloatingMatrixWithDisplayNamePriceCadenceCustom     PriceNewParamsNewFloatingMatrixWithDisplayNamePriceCadence = "custom"
)

func (PriceNewParamsNewFloatingMatrixWithDisplayNamePriceCadence) IsKnown added in v0.78.0

type PriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                    `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                      `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfig.

type PriceNewParamsNewFloatingMatrixWithDisplayNamePriceModelType added in v0.78.0

type PriceNewParamsNewFloatingMatrixWithDisplayNamePriceModelType string
const (
	PriceNewParamsNewFloatingMatrixWithDisplayNamePriceModelTypeMatrixWithDisplayName PriceNewParamsNewFloatingMatrixWithDisplayNamePriceModelType = "matrix_with_display_name"
)

func (PriceNewParamsNewFloatingMatrixWithDisplayNamePriceModelType) IsKnown added in v0.78.0

type PriceNewParamsNewFloatingMaxGroupTieredPackagePrice added in v0.90.0

type PriceNewParamsNewFloatingMaxGroupTieredPackagePrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingMaxGroupTieredPackagePriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID                      param.Field[string]                                                       `json:"item_id,required"`
	MaxGroupTieredPackageConfig param.Field[map[string]interface{}]                                       `json:"max_group_tiered_package_config,required"`
	ModelType                   param.Field[PriceNewParamsNewFloatingMaxGroupTieredPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingMaxGroupTieredPackagePrice) ImplementsPriceNewParams added in v0.90.0

func (PriceNewParamsNewFloatingMaxGroupTieredPackagePrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingMaxGroupTieredPackagePrice) MarshalJSON added in v0.90.0

func (r PriceNewParamsNewFloatingMaxGroupTieredPackagePrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingMaxGroupTieredPackagePriceCadence added in v0.90.0

type PriceNewParamsNewFloatingMaxGroupTieredPackagePriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingMaxGroupTieredPackagePriceCadenceAnnual     PriceNewParamsNewFloatingMaxGroupTieredPackagePriceCadence = "annual"
	PriceNewParamsNewFloatingMaxGroupTieredPackagePriceCadenceSemiAnnual PriceNewParamsNewFloatingMaxGroupTieredPackagePriceCadence = "semi_annual"
	PriceNewParamsNewFloatingMaxGroupTieredPackagePriceCadenceMonthly    PriceNewParamsNewFloatingMaxGroupTieredPackagePriceCadence = "monthly"
	PriceNewParamsNewFloatingMaxGroupTieredPackagePriceCadenceQuarterly  PriceNewParamsNewFloatingMaxGroupTieredPackagePriceCadence = "quarterly"
	PriceNewParamsNewFloatingMaxGroupTieredPackagePriceCadenceOneTime    PriceNewParamsNewFloatingMaxGroupTieredPackagePriceCadence = "one_time"
	PriceNewParamsNewFloatingMaxGroupTieredPackagePriceCadenceCustom     PriceNewParamsNewFloatingMaxGroupTieredPackagePriceCadence = "custom"
)

func (PriceNewParamsNewFloatingMaxGroupTieredPackagePriceCadence) IsKnown added in v0.90.0

type PriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                    `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                      `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfig.

type PriceNewParamsNewFloatingMaxGroupTieredPackagePriceModelType added in v0.90.0

type PriceNewParamsNewFloatingMaxGroupTieredPackagePriceModelType string
const (
	PriceNewParamsNewFloatingMaxGroupTieredPackagePriceModelTypeMaxGroupTieredPackage PriceNewParamsNewFloatingMaxGroupTieredPackagePriceModelType = "max_group_tiered_package"
)

func (PriceNewParamsNewFloatingMaxGroupTieredPackagePriceModelType) IsKnown added in v0.90.0

type PriceNewParamsNewFloatingPackagePrice added in v0.2.0

type PriceNewParamsNewFloatingPackagePrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingPackagePriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                         `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name          param.Field[string]                    `json:"name,required"`
	PackageConfig param.Field[shared.PackageConfigParam] `json:"package_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingPackagePriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingPackagePrice) ImplementsPriceNewParams added in v0.2.0

func (PriceNewParamsNewFloatingPackagePrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingPackagePrice) MarshalJSON added in v0.2.0

func (r PriceNewParamsNewFloatingPackagePrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingPackagePriceCadence added in v0.2.0

type PriceNewParamsNewFloatingPackagePriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingPackagePriceCadenceAnnual     PriceNewParamsNewFloatingPackagePriceCadence = "annual"
	PriceNewParamsNewFloatingPackagePriceCadenceSemiAnnual PriceNewParamsNewFloatingPackagePriceCadence = "semi_annual"
	PriceNewParamsNewFloatingPackagePriceCadenceMonthly    PriceNewParamsNewFloatingPackagePriceCadence = "monthly"
	PriceNewParamsNewFloatingPackagePriceCadenceQuarterly  PriceNewParamsNewFloatingPackagePriceCadence = "quarterly"
	PriceNewParamsNewFloatingPackagePriceCadenceOneTime    PriceNewParamsNewFloatingPackagePriceCadence = "one_time"
	PriceNewParamsNewFloatingPackagePriceCadenceCustom     PriceNewParamsNewFloatingPackagePriceCadence = "custom"
)

func (PriceNewParamsNewFloatingPackagePriceCadence) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingPackagePriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingPackagePriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingPackagePriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                      `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                        `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingPackagePriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingPackagePriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingPackagePriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingPackagePriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingPackagePriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingPackagePriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingPackagePriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingPackagePriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingPackagePriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingPackagePriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingPackagePriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingPackagePriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingPackagePriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingPackagePriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingPackagePriceConversionRateConfig.

type PriceNewParamsNewFloatingPackagePriceModelType added in v0.2.0

type PriceNewParamsNewFloatingPackagePriceModelType string
const (
	PriceNewParamsNewFloatingPackagePriceModelTypePackage PriceNewParamsNewFloatingPackagePriceModelType = "package"
)

func (PriceNewParamsNewFloatingPackagePriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingPackageWithAllocationPrice added in v0.2.0

type PriceNewParamsNewFloatingPackageWithAllocationPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingPackageWithAllocationPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                       `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingPackageWithAllocationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                        param.Field[string]                 `json:"name,required"`
	PackageWithAllocationConfig param.Field[map[string]interface{}] `json:"package_with_allocation_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingPackageWithAllocationPrice) ImplementsPriceNewParams added in v0.2.0

func (PriceNewParamsNewFloatingPackageWithAllocationPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingPackageWithAllocationPrice) MarshalJSON added in v0.2.0

func (r PriceNewParamsNewFloatingPackageWithAllocationPrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingPackageWithAllocationPriceCadence added in v0.2.0

type PriceNewParamsNewFloatingPackageWithAllocationPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingPackageWithAllocationPriceCadenceAnnual     PriceNewParamsNewFloatingPackageWithAllocationPriceCadence = "annual"
	PriceNewParamsNewFloatingPackageWithAllocationPriceCadenceSemiAnnual PriceNewParamsNewFloatingPackageWithAllocationPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingPackageWithAllocationPriceCadenceMonthly    PriceNewParamsNewFloatingPackageWithAllocationPriceCadence = "monthly"
	PriceNewParamsNewFloatingPackageWithAllocationPriceCadenceQuarterly  PriceNewParamsNewFloatingPackageWithAllocationPriceCadence = "quarterly"
	PriceNewParamsNewFloatingPackageWithAllocationPriceCadenceOneTime    PriceNewParamsNewFloatingPackageWithAllocationPriceCadence = "one_time"
	PriceNewParamsNewFloatingPackageWithAllocationPriceCadenceCustom     PriceNewParamsNewFloatingPackageWithAllocationPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingPackageWithAllocationPriceCadence) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                    `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                      `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfig.

type PriceNewParamsNewFloatingPackageWithAllocationPriceModelType added in v0.2.0

type PriceNewParamsNewFloatingPackageWithAllocationPriceModelType string
const (
	PriceNewParamsNewFloatingPackageWithAllocationPriceModelTypePackageWithAllocation PriceNewParamsNewFloatingPackageWithAllocationPriceModelType = "package_with_allocation"
)

func (PriceNewParamsNewFloatingPackageWithAllocationPriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPrice added in v0.91.0

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                 `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                                  param.Field[string]                 `json:"name,required"`
	ScalableMatrixWithTieredPricingConfig param.Field[map[string]interface{}] `json:"scalable_matrix_with_tiered_pricing_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPrice) ImplementsPriceNewParams added in v0.91.0

func (PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPrice) MarshalJSON added in v0.91.0

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceCadence added in v0.91.0

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceCadenceAnnual     PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceCadence = "annual"
	PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceCadenceSemiAnnual PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceCadenceMonthly    PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceCadence = "monthly"
	PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceCadenceQuarterly  PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceCadence = "quarterly"
	PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceCadenceOneTime    PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceCadence = "one_time"
	PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceCadenceCustom     PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceCadence) IsKnown added in v0.91.0

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                              `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfig.

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceModelType added in v0.91.0

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceModelType string
const (
	PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceModelTypeScalableMatrixWithTieredPricing PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceModelType = "scalable_matrix_with_tiered_pricing"
)

func (PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceModelType) IsKnown added in v0.91.0

type PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPrice added in v0.91.0

type PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                               `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                                param.Field[string]                 `json:"name,required"`
	ScalableMatrixWithUnitPricingConfig param.Field[map[string]interface{}] `json:"scalable_matrix_with_unit_pricing_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPrice) ImplementsPriceNewParams added in v0.91.0

func (PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPrice) MarshalJSON added in v0.91.0

type PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceCadence added in v0.91.0

type PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceCadenceAnnual     PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceCadence = "annual"
	PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceCadenceSemiAnnual PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceCadenceMonthly    PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceCadence = "monthly"
	PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceCadenceQuarterly  PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceCadence = "quarterly"
	PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceCadenceOneTime    PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceCadence = "one_time"
	PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceCadenceCustom     PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceCadence) IsKnown added in v0.91.0

type PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                            `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                              `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfig.

type PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceModelType added in v0.91.0

type PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceModelType string
const (
	PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceModelTypeScalableMatrixWithUnitPricing PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceModelType = "scalable_matrix_with_unit_pricing"
)

func (PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceModelType) IsKnown added in v0.91.0

type PriceNewParamsNewFloatingThresholdTotalAmountPrice added in v0.2.0

type PriceNewParamsNewFloatingThresholdTotalAmountPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                      `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingThresholdTotalAmountPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                       param.Field[string]                 `json:"name,required"`
	ThresholdTotalAmountConfig param.Field[map[string]interface{}] `json:"threshold_total_amount_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingThresholdTotalAmountPrice) ImplementsPriceNewParams added in v0.2.0

func (PriceNewParamsNewFloatingThresholdTotalAmountPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingThresholdTotalAmountPrice) MarshalJSON added in v0.2.0

func (r PriceNewParamsNewFloatingThresholdTotalAmountPrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence added in v0.2.0

type PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingThresholdTotalAmountPriceCadenceAnnual     PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence = "annual"
	PriceNewParamsNewFloatingThresholdTotalAmountPriceCadenceSemiAnnual PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingThresholdTotalAmountPriceCadenceMonthly    PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence = "monthly"
	PriceNewParamsNewFloatingThresholdTotalAmountPriceCadenceQuarterly  PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence = "quarterly"
	PriceNewParamsNewFloatingThresholdTotalAmountPriceCadenceOneTime    PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence = "one_time"
	PriceNewParamsNewFloatingThresholdTotalAmountPriceCadenceCustom     PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                   `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                     `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfig.

type PriceNewParamsNewFloatingThresholdTotalAmountPriceModelType added in v0.2.0

type PriceNewParamsNewFloatingThresholdTotalAmountPriceModelType string
const (
	PriceNewParamsNewFloatingThresholdTotalAmountPriceModelTypeThresholdTotalAmount PriceNewParamsNewFloatingThresholdTotalAmountPriceModelType = "threshold_total_amount"
)

func (PriceNewParamsNewFloatingThresholdTotalAmountPriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingTieredBPSPrice added in v0.121.0

type PriceNewParamsNewFloatingTieredBPSPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingTieredBPSPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                           `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingTieredBPSPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name            param.Field[string]                      `json:"name,required"`
	TieredBPSConfig param.Field[shared.TieredBPSConfigParam] `json:"tiered_bps_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingTieredBPSPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingTieredBPSPrice) ImplementsPriceNewParams added in v0.121.0

func (PriceNewParamsNewFloatingTieredBPSPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingTieredBPSPrice) MarshalJSON added in v0.121.0

func (r PriceNewParamsNewFloatingTieredBPSPrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingTieredBPSPriceCadence added in v0.121.0

type PriceNewParamsNewFloatingTieredBPSPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingTieredBPSPriceCadenceAnnual     PriceNewParamsNewFloatingTieredBPSPriceCadence = "annual"
	PriceNewParamsNewFloatingTieredBPSPriceCadenceSemiAnnual PriceNewParamsNewFloatingTieredBPSPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingTieredBPSPriceCadenceMonthly    PriceNewParamsNewFloatingTieredBPSPriceCadence = "monthly"
	PriceNewParamsNewFloatingTieredBPSPriceCadenceQuarterly  PriceNewParamsNewFloatingTieredBPSPriceCadence = "quarterly"
	PriceNewParamsNewFloatingTieredBPSPriceCadenceOneTime    PriceNewParamsNewFloatingTieredBPSPriceCadence = "one_time"
	PriceNewParamsNewFloatingTieredBPSPriceCadenceCustom     PriceNewParamsNewFloatingTieredBPSPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingTieredBPSPriceCadence) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingTieredBPSPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingTieredBPSPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingTieredBPSPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                        `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                          `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingTieredBPSPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingTieredBPSPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingTieredBPSPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingTieredBPSPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingTieredBPSPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingTieredBPSPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingTieredBPSPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingTieredBPSPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingTieredBPSPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingTieredBPSPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingTieredBPSPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingTieredBPSPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingTieredBPSPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingTieredBPSPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingTieredBPSPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingTieredBPSPriceConversionRateConfig.

type PriceNewParamsNewFloatingTieredBPSPriceModelType added in v0.121.0

type PriceNewParamsNewFloatingTieredBPSPriceModelType string
const (
	PriceNewParamsNewFloatingTieredBPSPriceModelTypeTieredBPS PriceNewParamsNewFloatingTieredBPSPriceModelType = "tiered_bps"
)

func (PriceNewParamsNewFloatingTieredBPSPriceModelType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingTieredPackagePrice added in v0.2.0

type PriceNewParamsNewFloatingTieredPackagePrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingTieredPackagePriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                               `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingTieredPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                param.Field[string]                 `json:"name,required"`
	TieredPackageConfig param.Field[map[string]interface{}] `json:"tiered_package_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingTieredPackagePriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingTieredPackagePrice) ImplementsPriceNewParams added in v0.2.0

func (PriceNewParamsNewFloatingTieredPackagePrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingTieredPackagePrice) MarshalJSON added in v0.2.0

func (r PriceNewParamsNewFloatingTieredPackagePrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingTieredPackagePriceCadence added in v0.2.0

type PriceNewParamsNewFloatingTieredPackagePriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingTieredPackagePriceCadenceAnnual     PriceNewParamsNewFloatingTieredPackagePriceCadence = "annual"
	PriceNewParamsNewFloatingTieredPackagePriceCadenceSemiAnnual PriceNewParamsNewFloatingTieredPackagePriceCadence = "semi_annual"
	PriceNewParamsNewFloatingTieredPackagePriceCadenceMonthly    PriceNewParamsNewFloatingTieredPackagePriceCadence = "monthly"
	PriceNewParamsNewFloatingTieredPackagePriceCadenceQuarterly  PriceNewParamsNewFloatingTieredPackagePriceCadence = "quarterly"
	PriceNewParamsNewFloatingTieredPackagePriceCadenceOneTime    PriceNewParamsNewFloatingTieredPackagePriceCadence = "one_time"
	PriceNewParamsNewFloatingTieredPackagePriceCadenceCustom     PriceNewParamsNewFloatingTieredPackagePriceCadence = "custom"
)

func (PriceNewParamsNewFloatingTieredPackagePriceCadence) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingTieredPackagePriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingTieredPackagePriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingTieredPackagePriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                            `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                              `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingTieredPackagePriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingTieredPackagePriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingTieredPackagePriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingTieredPackagePriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingTieredPackagePriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingTieredPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingTieredPackagePriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingTieredPackagePriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingTieredPackagePriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingTieredPackagePriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingTieredPackagePriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingTieredPackagePriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingTieredPackagePriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingTieredPackagePriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingTieredPackagePriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingTieredPackagePriceConversionRateConfig.

type PriceNewParamsNewFloatingTieredPackagePriceModelType added in v0.2.0

type PriceNewParamsNewFloatingTieredPackagePriceModelType string
const (
	PriceNewParamsNewFloatingTieredPackagePriceModelTypeTieredPackage PriceNewParamsNewFloatingTieredPackagePriceModelType = "tiered_package"
)

func (PriceNewParamsNewFloatingTieredPackagePriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingTieredPackageWithMinimumPrice added in v0.20.0

type PriceNewParamsNewFloatingTieredPackageWithMinimumPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                          `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                           param.Field[string]                 `json:"name,required"`
	TieredPackageWithMinimumConfig param.Field[map[string]interface{}] `json:"tiered_package_with_minimum_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingTieredPackageWithMinimumPrice) ImplementsPriceNewParams added in v0.20.0

func (PriceNewParamsNewFloatingTieredPackageWithMinimumPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingTieredPackageWithMinimumPrice) MarshalJSON added in v0.20.0

type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence added in v0.20.0

type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadenceAnnual     PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence = "annual"
	PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadenceSemiAnnual PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadenceMonthly    PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence = "monthly"
	PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadenceQuarterly  PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence = "quarterly"
	PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadenceOneTime    PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence = "one_time"
	PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadenceCustom     PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                       `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                         `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfig.

type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelType added in v0.20.0

type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelType string
const (
	PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelTypeTieredPackageWithMinimum PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelType = "tiered_package_with_minimum"
)

func (PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingTieredPrice added in v0.2.0

type PriceNewParamsNewFloatingTieredPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingTieredPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                        `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingTieredPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name         param.Field[string]                   `json:"name,required"`
	TieredConfig param.Field[shared.TieredConfigParam] `json:"tiered_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingTieredPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingTieredPrice) ImplementsPriceNewParams added in v0.2.0

func (PriceNewParamsNewFloatingTieredPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingTieredPrice) MarshalJSON added in v0.2.0

func (r PriceNewParamsNewFloatingTieredPrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingTieredPriceCadence added in v0.2.0

type PriceNewParamsNewFloatingTieredPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingTieredPriceCadenceAnnual     PriceNewParamsNewFloatingTieredPriceCadence = "annual"
	PriceNewParamsNewFloatingTieredPriceCadenceSemiAnnual PriceNewParamsNewFloatingTieredPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingTieredPriceCadenceMonthly    PriceNewParamsNewFloatingTieredPriceCadence = "monthly"
	PriceNewParamsNewFloatingTieredPriceCadenceQuarterly  PriceNewParamsNewFloatingTieredPriceCadence = "quarterly"
	PriceNewParamsNewFloatingTieredPriceCadenceOneTime    PriceNewParamsNewFloatingTieredPriceCadence = "one_time"
	PriceNewParamsNewFloatingTieredPriceCadenceCustom     PriceNewParamsNewFloatingTieredPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingTieredPriceCadence) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingTieredPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingTieredPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingTieredPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                     `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                       `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingTieredPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingTieredPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingTieredPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingTieredPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingTieredPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingTieredPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingTieredPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingTieredPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingTieredPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingTieredPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingTieredPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingTieredPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingTieredPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingTieredPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingTieredPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingTieredPriceConversionRateConfig.

type PriceNewParamsNewFloatingTieredPriceModelType added in v0.2.0

type PriceNewParamsNewFloatingTieredPriceModelType string
const (
	PriceNewParamsNewFloatingTieredPriceModelTypeTiered PriceNewParamsNewFloatingTieredPriceModelType = "tiered"
)

func (PriceNewParamsNewFloatingTieredPriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingTieredWithMinimumPrice added in v0.2.0

type PriceNewParamsNewFloatingTieredWithMinimumPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingTieredWithMinimumPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                   `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingTieredWithMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                    param.Field[string]                 `json:"name,required"`
	TieredWithMinimumConfig param.Field[map[string]interface{}] `json:"tiered_with_minimum_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingTieredWithMinimumPrice) ImplementsPriceNewParams added in v0.2.0

func (PriceNewParamsNewFloatingTieredWithMinimumPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingTieredWithMinimumPrice) MarshalJSON added in v0.2.0

func (r PriceNewParamsNewFloatingTieredWithMinimumPrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingTieredWithMinimumPriceCadence added in v0.2.0

type PriceNewParamsNewFloatingTieredWithMinimumPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingTieredWithMinimumPriceCadenceAnnual     PriceNewParamsNewFloatingTieredWithMinimumPriceCadence = "annual"
	PriceNewParamsNewFloatingTieredWithMinimumPriceCadenceSemiAnnual PriceNewParamsNewFloatingTieredWithMinimumPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingTieredWithMinimumPriceCadenceMonthly    PriceNewParamsNewFloatingTieredWithMinimumPriceCadence = "monthly"
	PriceNewParamsNewFloatingTieredWithMinimumPriceCadenceQuarterly  PriceNewParamsNewFloatingTieredWithMinimumPriceCadence = "quarterly"
	PriceNewParamsNewFloatingTieredWithMinimumPriceCadenceOneTime    PriceNewParamsNewFloatingTieredWithMinimumPriceCadence = "one_time"
	PriceNewParamsNewFloatingTieredWithMinimumPriceCadenceCustom     PriceNewParamsNewFloatingTieredWithMinimumPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingTieredWithMinimumPriceCadence) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                  `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfig.

type PriceNewParamsNewFloatingTieredWithMinimumPriceModelType added in v0.2.0

type PriceNewParamsNewFloatingTieredWithMinimumPriceModelType string
const (
	PriceNewParamsNewFloatingTieredWithMinimumPriceModelTypeTieredWithMinimum PriceNewParamsNewFloatingTieredWithMinimumPriceModelType = "tiered_with_minimum"
)

func (PriceNewParamsNewFloatingTieredWithMinimumPriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingTieredWithProrationPrice added in v0.34.0

type PriceNewParamsNewFloatingTieredWithProrationPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingTieredWithProrationPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                     `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingTieredWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                      param.Field[string]                 `json:"name,required"`
	TieredWithProrationConfig param.Field[map[string]interface{}] `json:"tiered_with_proration_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingTieredWithProrationPrice) ImplementsPriceNewParams added in v0.34.0

func (PriceNewParamsNewFloatingTieredWithProrationPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingTieredWithProrationPrice) MarshalJSON added in v0.34.0

func (r PriceNewParamsNewFloatingTieredWithProrationPrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingTieredWithProrationPriceCadence added in v0.34.0

type PriceNewParamsNewFloatingTieredWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingTieredWithProrationPriceCadenceAnnual     PriceNewParamsNewFloatingTieredWithProrationPriceCadence = "annual"
	PriceNewParamsNewFloatingTieredWithProrationPriceCadenceSemiAnnual PriceNewParamsNewFloatingTieredWithProrationPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingTieredWithProrationPriceCadenceMonthly    PriceNewParamsNewFloatingTieredWithProrationPriceCadence = "monthly"
	PriceNewParamsNewFloatingTieredWithProrationPriceCadenceQuarterly  PriceNewParamsNewFloatingTieredWithProrationPriceCadence = "quarterly"
	PriceNewParamsNewFloatingTieredWithProrationPriceCadenceOneTime    PriceNewParamsNewFloatingTieredWithProrationPriceCadence = "one_time"
	PriceNewParamsNewFloatingTieredWithProrationPriceCadenceCustom     PriceNewParamsNewFloatingTieredWithProrationPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingTieredWithProrationPriceCadence) IsKnown added in v0.34.0

type PriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                  `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                    `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfig.

type PriceNewParamsNewFloatingTieredWithProrationPriceModelType added in v0.34.0

type PriceNewParamsNewFloatingTieredWithProrationPriceModelType string
const (
	PriceNewParamsNewFloatingTieredWithProrationPriceModelTypeTieredWithProration PriceNewParamsNewFloatingTieredWithProrationPriceModelType = "tiered_with_proration"
)

func (PriceNewParamsNewFloatingTieredWithProrationPriceModelType) IsKnown added in v0.34.0

type PriceNewParamsNewFloatingUnitPrice added in v0.2.0

type PriceNewParamsNewFloatingUnitPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingUnitPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                      `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingUnitPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name       param.Field[string]                 `json:"name,required"`
	UnitConfig param.Field[shared.UnitConfigParam] `json:"unit_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingUnitPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingUnitPrice) ImplementsPriceNewParams added in v0.2.0

func (PriceNewParamsNewFloatingUnitPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingUnitPrice) MarshalJSON added in v0.2.0

func (r PriceNewParamsNewFloatingUnitPrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingUnitPriceCadence added in v0.2.0

type PriceNewParamsNewFloatingUnitPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingUnitPriceCadenceAnnual     PriceNewParamsNewFloatingUnitPriceCadence = "annual"
	PriceNewParamsNewFloatingUnitPriceCadenceSemiAnnual PriceNewParamsNewFloatingUnitPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingUnitPriceCadenceMonthly    PriceNewParamsNewFloatingUnitPriceCadence = "monthly"
	PriceNewParamsNewFloatingUnitPriceCadenceQuarterly  PriceNewParamsNewFloatingUnitPriceCadence = "quarterly"
	PriceNewParamsNewFloatingUnitPriceCadenceOneTime    PriceNewParamsNewFloatingUnitPriceCadence = "one_time"
	PriceNewParamsNewFloatingUnitPriceCadenceCustom     PriceNewParamsNewFloatingUnitPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingUnitPriceCadence) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingUnitPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingUnitPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingUnitPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                   `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                     `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingUnitPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingUnitPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingUnitPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingUnitPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingUnitPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingUnitPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingUnitPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingUnitPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingUnitPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingUnitPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingUnitPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingUnitPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingUnitPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingUnitPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingUnitPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingUnitPriceConversionRateConfig.

type PriceNewParamsNewFloatingUnitPriceModelType added in v0.2.0

type PriceNewParamsNewFloatingUnitPriceModelType string
const (
	PriceNewParamsNewFloatingUnitPriceModelTypeUnit PriceNewParamsNewFloatingUnitPriceModelType = "unit"
)

func (PriceNewParamsNewFloatingUnitPriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingUnitWithPercentPrice added in v0.20.0

type PriceNewParamsNewFloatingUnitWithPercentPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingUnitWithPercentPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                 `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingUnitWithPercentPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                  param.Field[string]                 `json:"name,required"`
	UnitWithPercentConfig param.Field[map[string]interface{}] `json:"unit_with_percent_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingUnitWithPercentPrice) ImplementsPriceNewParams added in v0.20.0

func (PriceNewParamsNewFloatingUnitWithPercentPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingUnitWithPercentPrice) MarshalJSON added in v0.20.0

func (r PriceNewParamsNewFloatingUnitWithPercentPrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingUnitWithPercentPriceCadence added in v0.20.0

type PriceNewParamsNewFloatingUnitWithPercentPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingUnitWithPercentPriceCadenceAnnual     PriceNewParamsNewFloatingUnitWithPercentPriceCadence = "annual"
	PriceNewParamsNewFloatingUnitWithPercentPriceCadenceSemiAnnual PriceNewParamsNewFloatingUnitWithPercentPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingUnitWithPercentPriceCadenceMonthly    PriceNewParamsNewFloatingUnitWithPercentPriceCadence = "monthly"
	PriceNewParamsNewFloatingUnitWithPercentPriceCadenceQuarterly  PriceNewParamsNewFloatingUnitWithPercentPriceCadence = "quarterly"
	PriceNewParamsNewFloatingUnitWithPercentPriceCadenceOneTime    PriceNewParamsNewFloatingUnitWithPercentPriceCadence = "one_time"
	PriceNewParamsNewFloatingUnitWithPercentPriceCadenceCustom     PriceNewParamsNewFloatingUnitWithPercentPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingUnitWithPercentPriceCadence) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                              `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfig.

type PriceNewParamsNewFloatingUnitWithPercentPriceModelType added in v0.20.0

type PriceNewParamsNewFloatingUnitWithPercentPriceModelType string
const (
	PriceNewParamsNewFloatingUnitWithPercentPriceModelTypeUnitWithPercent PriceNewParamsNewFloatingUnitWithPercentPriceModelType = "unit_with_percent"
)

func (PriceNewParamsNewFloatingUnitWithPercentPriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingUnitWithProrationPrice added in v0.34.0

type PriceNewParamsNewFloatingUnitWithProrationPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingUnitWithProrationPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                   `json:"item_id,required"`
	ModelType param.Field[PriceNewParamsNewFloatingUnitWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                    param.Field[string]                 `json:"name,required"`
	UnitWithProrationConfig param.Field[map[string]interface{}] `json:"unit_with_proration_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// The configuration for the rate of the price currency to the invoicing currency.
	ConversionRateConfig param.Field[PriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfigUnion] `json:"conversion_rate_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceNewParamsNewFloatingUnitWithProrationPrice) ImplementsPriceNewParams added in v0.34.0

func (PriceNewParamsNewFloatingUnitWithProrationPrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingUnitWithProrationPrice) MarshalJSON added in v0.34.0

func (r PriceNewParamsNewFloatingUnitWithProrationPrice) MarshalJSON() (data []byte, err error)

type PriceNewParamsNewFloatingUnitWithProrationPriceCadence added in v0.34.0

type PriceNewParamsNewFloatingUnitWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingUnitWithProrationPriceCadenceAnnual     PriceNewParamsNewFloatingUnitWithProrationPriceCadence = "annual"
	PriceNewParamsNewFloatingUnitWithProrationPriceCadenceSemiAnnual PriceNewParamsNewFloatingUnitWithProrationPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingUnitWithProrationPriceCadenceMonthly    PriceNewParamsNewFloatingUnitWithProrationPriceCadence = "monthly"
	PriceNewParamsNewFloatingUnitWithProrationPriceCadenceQuarterly  PriceNewParamsNewFloatingUnitWithProrationPriceCadence = "quarterly"
	PriceNewParamsNewFloatingUnitWithProrationPriceCadenceOneTime    PriceNewParamsNewFloatingUnitWithProrationPriceCadence = "one_time"
	PriceNewParamsNewFloatingUnitWithProrationPriceCadenceCustom     PriceNewParamsNewFloatingUnitWithProrationPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingUnitWithProrationPriceCadence) IsKnown added in v0.34.0

type PriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfig added in v0.121.0

type PriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                  `json:"unit_config"`
}

The configuration for the rate of the price currency to the invoicing currency.

func (PriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfigUnion added in v0.123.0

func (r PriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfig) MarshalJSON added in v0.121.0

type PriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfigConversionRateType) IsKnown added in v0.121.0

type PriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfigUnion added in v0.121.0

type PriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfigUnion()
}

The configuration for the rate of the price currency to the invoicing currency.

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfig.

type PriceNewParamsNewFloatingUnitWithProrationPriceModelType added in v0.34.0

type PriceNewParamsNewFloatingUnitWithProrationPriceModelType string
const (
	PriceNewParamsNewFloatingUnitWithProrationPriceModelTypeUnitWithProration PriceNewParamsNewFloatingUnitWithProrationPriceModelType = "unit_with_proration"
)

func (PriceNewParamsNewFloatingUnitWithProrationPriceModelType) IsKnown added in v0.34.0

type PricePackagePrice

type PricePackagePrice = shared.PricePackagePrice

This is an alias to an internal type.

type PricePackagePriceCadence

type PricePackagePriceCadence = shared.PricePackagePriceCadence

This is an alias to an internal type.

type PricePackagePriceConversionRateConfig added in v0.121.0

type PricePackagePriceConversionRateConfig = shared.PricePackagePriceConversionRateConfig

This is an alias to an internal type.

type PricePackagePriceConversionRateConfigConversionRateType added in v0.121.0

type PricePackagePriceConversionRateConfigConversionRateType = shared.PricePackagePriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PricePackagePriceModelType

type PricePackagePriceModelType = shared.PricePackagePriceModelType

This is an alias to an internal type.

type PricePackagePricePriceType

type PricePackagePricePriceType = shared.PricePackagePricePriceType

This is an alias to an internal type.

type PricePackageWithAllocationPrice

type PricePackageWithAllocationPrice = shared.PricePackageWithAllocationPrice

This is an alias to an internal type.

type PricePackageWithAllocationPriceCadence

type PricePackageWithAllocationPriceCadence = shared.PricePackageWithAllocationPriceCadence

This is an alias to an internal type.

type PricePackageWithAllocationPriceConversionRateConfig added in v0.121.0

type PricePackageWithAllocationPriceConversionRateConfig = shared.PricePackageWithAllocationPriceConversionRateConfig

This is an alias to an internal type.

type PricePackageWithAllocationPriceConversionRateConfigConversionRateType added in v0.121.0

type PricePackageWithAllocationPriceConversionRateConfigConversionRateType = shared.PricePackageWithAllocationPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PricePackageWithAllocationPriceModelType

type PricePackageWithAllocationPriceModelType = shared.PricePackageWithAllocationPriceModelType

This is an alias to an internal type.

type PricePackageWithAllocationPricePriceType

type PricePackageWithAllocationPricePriceType = shared.PricePackageWithAllocationPricePriceType

This is an alias to an internal type.

type PricePriceType added in v0.25.0

type PricePriceType = shared.PricePriceType

This is an alias to an internal type.

type PriceScalableMatrixWithTieredPricingPrice added in v0.91.0

type PriceScalableMatrixWithTieredPricingPrice = shared.PriceScalableMatrixWithTieredPricingPrice

This is an alias to an internal type.

type PriceScalableMatrixWithTieredPricingPriceCadence added in v0.91.0

type PriceScalableMatrixWithTieredPricingPriceCadence = shared.PriceScalableMatrixWithTieredPricingPriceCadence

This is an alias to an internal type.

type PriceScalableMatrixWithTieredPricingPriceConversionRateConfig added in v0.121.0

type PriceScalableMatrixWithTieredPricingPriceConversionRateConfig = shared.PriceScalableMatrixWithTieredPricingPriceConversionRateConfig

This is an alias to an internal type.

type PriceScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType = shared.PriceScalableMatrixWithTieredPricingPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceScalableMatrixWithTieredPricingPriceModelType added in v0.91.0

type PriceScalableMatrixWithTieredPricingPriceModelType = shared.PriceScalableMatrixWithTieredPricingPriceModelType

This is an alias to an internal type.

type PriceScalableMatrixWithTieredPricingPricePriceType added in v0.91.0

type PriceScalableMatrixWithTieredPricingPricePriceType = shared.PriceScalableMatrixWithTieredPricingPricePriceType

This is an alias to an internal type.

type PriceScalableMatrixWithUnitPricingPrice added in v0.91.0

type PriceScalableMatrixWithUnitPricingPrice = shared.PriceScalableMatrixWithUnitPricingPrice

This is an alias to an internal type.

type PriceScalableMatrixWithUnitPricingPriceCadence added in v0.91.0

type PriceScalableMatrixWithUnitPricingPriceCadence = shared.PriceScalableMatrixWithUnitPricingPriceCadence

This is an alias to an internal type.

type PriceScalableMatrixWithUnitPricingPriceConversionRateConfig added in v0.121.0

type PriceScalableMatrixWithUnitPricingPriceConversionRateConfig = shared.PriceScalableMatrixWithUnitPricingPriceConversionRateConfig

This is an alias to an internal type.

type PriceScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType = shared.PriceScalableMatrixWithUnitPricingPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceScalableMatrixWithUnitPricingPriceModelType added in v0.91.0

type PriceScalableMatrixWithUnitPricingPriceModelType = shared.PriceScalableMatrixWithUnitPricingPriceModelType

This is an alias to an internal type.

type PriceScalableMatrixWithUnitPricingPricePriceType added in v0.91.0

type PriceScalableMatrixWithUnitPricingPricePriceType = shared.PriceScalableMatrixWithUnitPricingPricePriceType

This is an alias to an internal type.

type PriceService

type PriceService struct {
	Options         []option.RequestOption
	ExternalPriceID *PriceExternalPriceIDService
}

PriceService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPriceService method instead.

func NewPriceService

func NewPriceService(opts ...option.RequestOption) (r *PriceService)

NewPriceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*PriceService) Evaluate added in v0.25.0

func (r *PriceService) Evaluate(ctx context.Context, priceID string, body PriceEvaluateParams, opts ...option.RequestOption) (res *PriceEvaluateResponse, err error)

[NOTE] It is recommended to use the `/v1/prices/evaluate` which offers further functionality, such as multiple prices, inline price definitions, and querying over preview events.

This endpoint is used to evaluate the output of a price for a given customer and time range. It enables filtering and grouping the output using [computed properties](/extensibility/advanced-metrics#computed-properties), supporting the following workflows:

1. Showing detailed usage and costs to the end customer. 2. Auditing subtotals on invoice line items.

For these workflows, the expressiveness of computed properties in both the filters and grouping is critical. For example, if you'd like to show your customer their usage grouped by hour and another property, you can do so with the following `grouping_keys`: `["hour_floor_timestamp_millis(timestamp_millis)", "my_property"]`. If you'd like to examine a customer's usage for a specific property value, you can do so with the following `filter`: `my_property = 'foo' AND my_other_property = 'bar'`.

By default, the start of the time range must be no more than 100 days ago and the length of the results must be no greater than 1000. Note that this is a POST endpoint rather than a GET endpoint because it employs a JSON body rather than query parameters.

func (*PriceService) EvaluateMultiple added in v0.116.0

This endpoint is used to evaluate the output of price(s) for a given customer and time range over ingested events. It enables filtering and grouping the output using [computed properties](/extensibility/advanced-metrics#computed-properties), supporting the following workflows:

1. Showing detailed usage and costs to the end customer. 2. Auditing subtotals on invoice line items.

For these workflows, the expressiveness of computed properties in both the filters and grouping is critical. For example, if you'd like to show your customer their usage grouped by hour and another property, you can do so with the following `grouping_keys`: `["hour_floor_timestamp_millis(timestamp_millis)", "my_property"]`. If you'd like to examine a customer's usage for a specific property value, you can do so with the following `filter`: `my_property = 'foo' AND my_other_property = 'bar'`.

Prices may either reference existing prices in your Orb account or be defined inline in the request body. Up to 100 prices can be evaluated in a single request.

Prices are evaluated on ingested events and the start of the time range must be no more than 100 days ago. To evaluate based off a set of provided events, the [evaluate preview events](/api-reference/price/evaluate-preview-events) endpoint can be used instead.

Note that this is a POST endpoint rather than a GET endpoint because it employs a JSON body rather than query parameters.

func (*PriceService) EvaluatePreviewEvents added in v0.121.0

This endpoint evaluates prices on preview events instead of actual usage, making it ideal for building price calculators and cost estimation tools. You can filter and group results using [computed properties](/extensibility/advanced-metrics#computed-properties) to analyze pricing across different dimensions.

Prices may either reference existing prices in your Orb account or be defined inline in the request body. The endpoint has the following limitations:

1. Up to 100 prices can be evaluated in a single request. 2. Up to 500 preview events can be provided in a single request.

A top-level customer_id is required to evaluate the preview events. Additionally, all events without a customer_id will have the top-level customer_id added.

Note that this is a POST endpoint rather than a GET endpoint because it employs a JSON body rather than query parameters.

func (*PriceService) Fetch

func (r *PriceService) Fetch(ctx context.Context, priceID string, opts ...option.RequestOption) (res *shared.Price, err error)

This endpoint returns a price given an identifier.

func (*PriceService) List

func (r *PriceService) List(ctx context.Context, query PriceListParams, opts ...option.RequestOption) (res *pagination.Page[shared.Price], err error)

This endpoint is used to list all add-on prices created using the [price creation endpoint](/api-reference/price/create-price).

func (*PriceService) ListAutoPaging

This endpoint is used to list all add-on prices created using the [price creation endpoint](/api-reference/price/create-price).

func (*PriceService) New

func (r *PriceService) New(ctx context.Context, body PriceNewParams, opts ...option.RequestOption) (res *shared.Price, err error)

This endpoint is used to create a [price](/product-catalog/price-configuration). A price created using this endpoint is always an add-on, meaning that it's not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans.

An `external_price_id` can be optionally specified as an alias to allow ergonomic interaction with prices in the Orb API.

See the [Price resource](/product-catalog/price-configuration) for the specification of different price model configurations possible in this endpoint.

func (*PriceService) Update added in v0.42.0

func (r *PriceService) Update(ctx context.Context, priceID string, body PriceUpdateParams, opts ...option.RequestOption) (res *shared.Price, err error)

This endpoint allows you to update the `metadata` property on a price. If you pass null for the metadata value, it will clear any existing metadata for that price.

type PriceThresholdTotalAmountPrice

type PriceThresholdTotalAmountPrice = shared.PriceThresholdTotalAmountPrice

This is an alias to an internal type.

type PriceThresholdTotalAmountPriceCadence

type PriceThresholdTotalAmountPriceCadence = shared.PriceThresholdTotalAmountPriceCadence

This is an alias to an internal type.

type PriceThresholdTotalAmountPriceConversionRateConfig added in v0.121.0

type PriceThresholdTotalAmountPriceConversionRateConfig = shared.PriceThresholdTotalAmountPriceConversionRateConfig

This is an alias to an internal type.

type PriceThresholdTotalAmountPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceThresholdTotalAmountPriceConversionRateConfigConversionRateType = shared.PriceThresholdTotalAmountPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceThresholdTotalAmountPriceModelType

type PriceThresholdTotalAmountPriceModelType = shared.PriceThresholdTotalAmountPriceModelType

This is an alias to an internal type.

type PriceThresholdTotalAmountPricePriceType

type PriceThresholdTotalAmountPricePriceType = shared.PriceThresholdTotalAmountPricePriceType

This is an alias to an internal type.

type PriceTieredBPSPrice added in v0.121.0

type PriceTieredBPSPrice = shared.PriceTieredBPSPrice

This is an alias to an internal type.

type PriceTieredBPSPriceCadence added in v0.121.0

type PriceTieredBPSPriceCadence = shared.PriceTieredBPSPriceCadence

This is an alias to an internal type.

type PriceTieredBPSPriceConversionRateConfig added in v0.121.0

type PriceTieredBPSPriceConversionRateConfig = shared.PriceTieredBPSPriceConversionRateConfig

This is an alias to an internal type.

type PriceTieredBPSPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceTieredBPSPriceConversionRateConfigConversionRateType = shared.PriceTieredBPSPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceTieredBPSPriceModelType added in v0.121.0

type PriceTieredBPSPriceModelType = shared.PriceTieredBPSPriceModelType

This is an alias to an internal type.

type PriceTieredBPSPricePriceType added in v0.121.0

type PriceTieredBPSPricePriceType = shared.PriceTieredBPSPricePriceType

This is an alias to an internal type.

type PriceTieredPackagePrice

type PriceTieredPackagePrice = shared.PriceTieredPackagePrice

This is an alias to an internal type.

type PriceTieredPackagePriceCadence

type PriceTieredPackagePriceCadence = shared.PriceTieredPackagePriceCadence

This is an alias to an internal type.

type PriceTieredPackagePriceConversionRateConfig added in v0.121.0

type PriceTieredPackagePriceConversionRateConfig = shared.PriceTieredPackagePriceConversionRateConfig

This is an alias to an internal type.

type PriceTieredPackagePriceConversionRateConfigConversionRateType added in v0.121.0

type PriceTieredPackagePriceConversionRateConfigConversionRateType = shared.PriceTieredPackagePriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceTieredPackagePriceModelType

type PriceTieredPackagePriceModelType = shared.PriceTieredPackagePriceModelType

This is an alias to an internal type.

type PriceTieredPackagePricePriceType

type PriceTieredPackagePricePriceType = shared.PriceTieredPackagePricePriceType

This is an alias to an internal type.

type PriceTieredPackageWithMinimumPrice added in v0.25.0

type PriceTieredPackageWithMinimumPrice = shared.PriceTieredPackageWithMinimumPrice

This is an alias to an internal type.

type PriceTieredPackageWithMinimumPriceCadence added in v0.25.0

type PriceTieredPackageWithMinimumPriceCadence = shared.PriceTieredPackageWithMinimumPriceCadence

This is an alias to an internal type.

type PriceTieredPackageWithMinimumPriceConversionRateConfig added in v0.121.0

type PriceTieredPackageWithMinimumPriceConversionRateConfig = shared.PriceTieredPackageWithMinimumPriceConversionRateConfig

This is an alias to an internal type.

type PriceTieredPackageWithMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceTieredPackageWithMinimumPriceConversionRateConfigConversionRateType = shared.PriceTieredPackageWithMinimumPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceTieredPackageWithMinimumPriceModelType added in v0.25.0

type PriceTieredPackageWithMinimumPriceModelType = shared.PriceTieredPackageWithMinimumPriceModelType

This is an alias to an internal type.

type PriceTieredPackageWithMinimumPricePriceType added in v0.25.0

type PriceTieredPackageWithMinimumPricePriceType = shared.PriceTieredPackageWithMinimumPricePriceType

This is an alias to an internal type.

type PriceTieredPrice

type PriceTieredPrice = shared.PriceTieredPrice

This is an alias to an internal type.

type PriceTieredPriceCadence

type PriceTieredPriceCadence = shared.PriceTieredPriceCadence

This is an alias to an internal type.

type PriceTieredPriceConversionRateConfig added in v0.121.0

type PriceTieredPriceConversionRateConfig = shared.PriceTieredPriceConversionRateConfig

This is an alias to an internal type.

type PriceTieredPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceTieredPriceConversionRateConfigConversionRateType = shared.PriceTieredPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceTieredPriceModelType

type PriceTieredPriceModelType = shared.PriceTieredPriceModelType

This is an alias to an internal type.

type PriceTieredPricePriceType

type PriceTieredPricePriceType = shared.PriceTieredPricePriceType

This is an alias to an internal type.

type PriceTieredWithMinimumPrice

type PriceTieredWithMinimumPrice = shared.PriceTieredWithMinimumPrice

This is an alias to an internal type.

type PriceTieredWithMinimumPriceCadence

type PriceTieredWithMinimumPriceCadence = shared.PriceTieredWithMinimumPriceCadence

This is an alias to an internal type.

type PriceTieredWithMinimumPriceConversionRateConfig added in v0.121.0

type PriceTieredWithMinimumPriceConversionRateConfig = shared.PriceTieredWithMinimumPriceConversionRateConfig

This is an alias to an internal type.

type PriceTieredWithMinimumPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceTieredWithMinimumPriceConversionRateConfigConversionRateType = shared.PriceTieredWithMinimumPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceTieredWithMinimumPriceModelType

type PriceTieredWithMinimumPriceModelType = shared.PriceTieredWithMinimumPriceModelType

This is an alias to an internal type.

type PriceTieredWithMinimumPricePriceType

type PriceTieredWithMinimumPricePriceType = shared.PriceTieredWithMinimumPricePriceType

This is an alias to an internal type.

type PriceTieredWithProrationPrice added in v0.34.0

type PriceTieredWithProrationPrice = shared.PriceTieredWithProrationPrice

This is an alias to an internal type.

type PriceTieredWithProrationPriceCadence added in v0.34.0

type PriceTieredWithProrationPriceCadence = shared.PriceTieredWithProrationPriceCadence

This is an alias to an internal type.

type PriceTieredWithProrationPriceConversionRateConfig added in v0.121.0

type PriceTieredWithProrationPriceConversionRateConfig = shared.PriceTieredWithProrationPriceConversionRateConfig

This is an alias to an internal type.

type PriceTieredWithProrationPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceTieredWithProrationPriceConversionRateConfigConversionRateType = shared.PriceTieredWithProrationPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceTieredWithProrationPriceModelType added in v0.34.0

type PriceTieredWithProrationPriceModelType = shared.PriceTieredWithProrationPriceModelType

This is an alias to an internal type.

type PriceTieredWithProrationPricePriceType added in v0.34.0

type PriceTieredWithProrationPricePriceType = shared.PriceTieredWithProrationPricePriceType

This is an alias to an internal type.

type PriceUnitPrice

type PriceUnitPrice = shared.PriceUnitPrice

This is an alias to an internal type.

type PriceUnitPriceCadence

type PriceUnitPriceCadence = shared.PriceUnitPriceCadence

This is an alias to an internal type.

type PriceUnitPriceConversionRateConfig added in v0.121.0

type PriceUnitPriceConversionRateConfig = shared.PriceUnitPriceConversionRateConfig

This is an alias to an internal type.

type PriceUnitPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceUnitPriceConversionRateConfigConversionRateType = shared.PriceUnitPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceUnitPriceModelType

type PriceUnitPriceModelType = shared.PriceUnitPriceModelType

This is an alias to an internal type.

type PriceUnitPricePriceType

type PriceUnitPricePriceType = shared.PriceUnitPricePriceType

This is an alias to an internal type.

type PriceUnitWithPercentPrice added in v0.20.0

type PriceUnitWithPercentPrice = shared.PriceUnitWithPercentPrice

This is an alias to an internal type.

type PriceUnitWithPercentPriceCadence added in v0.20.0

type PriceUnitWithPercentPriceCadence = shared.PriceUnitWithPercentPriceCadence

This is an alias to an internal type.

type PriceUnitWithPercentPriceConversionRateConfig added in v0.121.0

type PriceUnitWithPercentPriceConversionRateConfig = shared.PriceUnitWithPercentPriceConversionRateConfig

This is an alias to an internal type.

type PriceUnitWithPercentPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceUnitWithPercentPriceConversionRateConfigConversionRateType = shared.PriceUnitWithPercentPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceUnitWithPercentPriceModelType added in v0.20.0

type PriceUnitWithPercentPriceModelType = shared.PriceUnitWithPercentPriceModelType

This is an alias to an internal type.

type PriceUnitWithPercentPricePriceType added in v0.20.0

type PriceUnitWithPercentPricePriceType = shared.PriceUnitWithPercentPricePriceType

This is an alias to an internal type.

type PriceUnitWithProrationPrice added in v0.34.0

type PriceUnitWithProrationPrice = shared.PriceUnitWithProrationPrice

This is an alias to an internal type.

type PriceUnitWithProrationPriceCadence added in v0.34.0

type PriceUnitWithProrationPriceCadence = shared.PriceUnitWithProrationPriceCadence

This is an alias to an internal type.

type PriceUnitWithProrationPriceConversionRateConfig added in v0.121.0

type PriceUnitWithProrationPriceConversionRateConfig = shared.PriceUnitWithProrationPriceConversionRateConfig

This is an alias to an internal type.

type PriceUnitWithProrationPriceConversionRateConfigConversionRateType added in v0.121.0

type PriceUnitWithProrationPriceConversionRateConfigConversionRateType = shared.PriceUnitWithProrationPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceUnitWithProrationPriceModelType added in v0.34.0

type PriceUnitWithProrationPriceModelType = shared.PriceUnitWithProrationPriceModelType

This is an alias to an internal type.

type PriceUnitWithProrationPricePriceType added in v0.34.0

type PriceUnitWithProrationPricePriceType = shared.PriceUnitWithProrationPricePriceType

This is an alias to an internal type.

type PriceUpdateParams added in v0.42.0

type PriceUpdateParams struct {
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (PriceUpdateParams) MarshalJSON added in v0.42.0

func (r PriceUpdateParams) MarshalJSON() (data []byte, err error)

type SubLineItemGrouping added in v0.121.0

type SubLineItemGrouping = shared.SubLineItemGrouping

This is an alias to an internal type.

type SubLineItemMatrixConfig added in v0.121.0

type SubLineItemMatrixConfig = shared.SubLineItemMatrixConfig

This is an alias to an internal type.

type Subscription

type Subscription struct {
	ID string `json:"id,required"`
	// The current plan phase that is active, only if the subscription's plan has
	// phases.
	ActivePlanPhaseOrder int64 `json:"active_plan_phase_order,required,nullable"`
	// The adjustment intervals for this subscription sorted by the start_date of the
	// adjustment interval.
	AdjustmentIntervals []shared.AdjustmentInterval `json:"adjustment_intervals,required"`
	// Determines whether issued invoices for this subscription will automatically be
	// charged with the saved payment method on the due date. This property defaults to
	// the plan's behavior. If null, defaults to the customer's setting.
	AutoCollection                  bool                                   `json:"auto_collection,required,nullable"`
	BillingCycleAnchorConfiguration shared.BillingCycleAnchorConfiguration `json:"billing_cycle_anchor_configuration,required"`
	// The day of the month on which the billing cycle is anchored. If the maximum
	// number of days in a month is greater than this value, the last day of the month
	// is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
	// period begins on the 30th.
	BillingCycleDay int64     `json:"billing_cycle_day,required"`
	CreatedAt       time.Time `json:"created_at,required" format:"date-time"`
	// The end of the current billing period. This is an exclusive timestamp, such that
	// the instant returned is not part of the billing period. Set to null for
	// subscriptions that are not currently active.
	CurrentBillingPeriodEndDate time.Time `json:"current_billing_period_end_date,required,nullable" format:"date-time"`
	// The start date of the current billing period. This is an inclusive timestamp;
	// the instant returned is exactly the beginning of the billing period. Set to null
	// if the subscription is not currently active.
	CurrentBillingPeriodStartDate time.Time `json:"current_billing_period_start_date,required,nullable" format:"date-time"`
	// A customer is a buyer of your products, and the other party to the billing
	// relationship.
	//
	// In Orb, customers are assigned system generated identifiers automatically, but
	// it's often desirable to have these match existing identifiers in your system. To
	// avoid having to denormalize Orb ID information, you can pass in an
	// `external_customer_id` with your own identifier. See
	// [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
	// information about how these aliases work in Orb.
	//
	// In addition to having an identifier in your system, a customer may exist in a
	// payment provider solution like Stripe. Use the `payment_provider_id` and the
	// `payment_provider` enum field to express this mapping.
	//
	// A customer also has a timezone (from the standard
	// [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
	// your account's timezone. See [Timezone localization](/essentials/timezones) for
	// information on what this timezone parameter influences within Orb.
	Customer Customer `json:"customer,required"`
	// Determines the default memo on this subscriptions' invoices. Note that if this
	// is not provided, it is determined by the plan configuration.
	DefaultInvoiceMemo string `json:"default_invoice_memo,required,nullable"`
	// The discount intervals for this subscription sorted by the start_date.
	//
	// Deprecated: deprecated
	DiscountIntervals []SubscriptionDiscountInterval `json:"discount_intervals,required"`
	// The date Orb stops billing for this subscription.
	EndDate                  time.Time                              `json:"end_date,required,nullable" format:"date-time"`
	FixedFeeQuantitySchedule []shared.FixedFeeQuantityScheduleEntry `json:"fixed_fee_quantity_schedule,required"`
	InvoicingThreshold       string                                 `json:"invoicing_threshold,required,nullable"`
	// The maximum intervals for this subscription sorted by the start_date.
	//
	// Deprecated: deprecated
	MaximumIntervals []shared.MaximumInterval `json:"maximum_intervals,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata map[string]string `json:"metadata,required"`
	// The minimum intervals for this subscription sorted by the start_date.
	//
	// Deprecated: deprecated
	MinimumIntervals []shared.MinimumInterval `json:"minimum_intervals,required"`
	// The name of the subscription.
	Name string `json:"name,required"`
	// Determines the difference between the invoice issue date for subscription
	// invoices as the date that they are due. A value of `0` here represents that the
	// invoice is due on issue, whereas a value of `30` represents that the customer
	// has a month to pay the invoice.
	NetTerms int64 `json:"net_terms,required"`
	// A pending subscription change if one exists on this subscription.
	PendingSubscriptionChange shared.SubscriptionChangeMinified `json:"pending_subscription_change,required,nullable"`
	// The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
	// subscribed to by a customer. Plans define the billing behavior of the
	// subscription. You can see more about how to configure prices in the
	// [Price resource](/reference/price).
	Plan Plan `json:"plan,required,nullable"`
	// The price intervals for this subscription.
	PriceIntervals []shared.PriceInterval  `json:"price_intervals,required"`
	RedeemedCoupon shared.CouponRedemption `json:"redeemed_coupon,required,nullable"`
	// The date Orb starts billing for this subscription.
	StartDate time.Time                    `json:"start_date,required" format:"date-time"`
	Status    SubscriptionStatus           `json:"status,required"`
	TrialInfo shared.SubscriptionTrialInfo `json:"trial_info,required"`
	JSON      subscriptionJSON             `json:"-"`
}

A [subscription](/core-concepts#subscription) represents the purchase of a plan by a customer.

By default, subscriptions begin on the day that they're created and renew automatically for each billing cycle at the cadence that's configured in the plan definition.

Subscriptions also default to **beginning of month alignment**, which means the first invoice issued for the subscription will have pro-rated charges between the `start_date` and the first of the following month. Subsequent billing periods will always start and end on a month boundary (e.g. subsequent month starts for monthly billing).

Depending on the plan configuration, any _flat_ recurring fees will be billed either at the beginning (in-advance) or end (in-arrears) of each billing cycle. Plans default to **in-advance billing**. Usage-based fees are billed in arrears as usage is accumulated. In the normal course of events, you can expect an invoice to contain usage-based charges for the previous period, and a recurring fee for the following period.

func (*Subscription) UnmarshalJSON

func (r *Subscription) UnmarshalJSON(data []byte) (err error)

type SubscriptionCancelParams

type SubscriptionCancelParams struct {
	// Determines the timing of subscription cancellation
	CancelOption param.Field[SubscriptionCancelParamsCancelOption] `json:"cancel_option,required"`
	// If false, this request will fail if it would void an issued invoice or create a
	// credit note. Consider using this as a safety mechanism if you do not expect
	// existing invoices to be changed.
	AllowInvoiceCreditOrVoid param.Field[bool] `json:"allow_invoice_credit_or_void"`
	// The date that the cancellation should take effect. This parameter can only be
	// passed if the `cancel_option` is `requested_date`.
	CancellationDate param.Field[time.Time] `json:"cancellation_date" format:"date-time"`
}

func (SubscriptionCancelParams) MarshalJSON

func (r SubscriptionCancelParams) MarshalJSON() (data []byte, err error)

type SubscriptionCancelParamsCancelOption

type SubscriptionCancelParamsCancelOption string

Determines the timing of subscription cancellation

const (
	SubscriptionCancelParamsCancelOptionEndOfSubscriptionTerm SubscriptionCancelParamsCancelOption = "end_of_subscription_term"
	SubscriptionCancelParamsCancelOptionImmediate             SubscriptionCancelParamsCancelOption = "immediate"
	SubscriptionCancelParamsCancelOptionRequestedDate         SubscriptionCancelParamsCancelOption = "requested_date"
)

func (SubscriptionCancelParamsCancelOption) IsKnown added in v0.24.0

type SubscriptionChangeApplyParams added in v0.112.0

type SubscriptionChangeApplyParams struct {
	// Description to apply to the balance transaction representing this credit.
	Description param.Field[string] `json:"description"`
	// Amount already collected to apply to the customer's balance.
	PreviouslyCollectedAmount param.Field[string] `json:"previously_collected_amount"`
}

func (SubscriptionChangeApplyParams) MarshalJSON added in v0.112.0

func (r SubscriptionChangeApplyParams) MarshalJSON() (data []byte, err error)

type SubscriptionChangeApplyResponse added in v0.112.0

type SubscriptionChangeApplyResponse struct {
	ID string `json:"id,required"`
	// Subscription change will be cancelled at this time and can no longer be applied.
	ExpirationTime time.Time                             `json:"expiration_time,required" format:"date-time"`
	Status         SubscriptionChangeApplyResponseStatus `json:"status,required"`
	Subscription   MutatedSubscription                   `json:"subscription,required,nullable"`
	// When this change was applied.
	AppliedAt time.Time `json:"applied_at,nullable" format:"date-time"`
	// When this change was cancelled.
	CancelledAt time.Time                           `json:"cancelled_at,nullable" format:"date-time"`
	JSON        subscriptionChangeApplyResponseJSON `json:"-"`
}

A subscription change represents a desired new subscription / pending change to an existing subscription. It is a way to first preview the effects on the subscription as well as any changes/creation of invoices (see `subscription.changed_resources`).

func (*SubscriptionChangeApplyResponse) UnmarshalJSON added in v0.112.0

func (r *SubscriptionChangeApplyResponse) UnmarshalJSON(data []byte) (err error)

type SubscriptionChangeApplyResponseStatus added in v0.112.0

type SubscriptionChangeApplyResponseStatus string
const (
	SubscriptionChangeApplyResponseStatusPending   SubscriptionChangeApplyResponseStatus = "pending"
	SubscriptionChangeApplyResponseStatusApplied   SubscriptionChangeApplyResponseStatus = "applied"
	SubscriptionChangeApplyResponseStatusCancelled SubscriptionChangeApplyResponseStatus = "cancelled"
)

func (SubscriptionChangeApplyResponseStatus) IsKnown added in v0.112.0

type SubscriptionChangeCancelResponse added in v0.112.0

type SubscriptionChangeCancelResponse struct {
	ID string `json:"id,required"`
	// Subscription change will be cancelled at this time and can no longer be applied.
	ExpirationTime time.Time                              `json:"expiration_time,required" format:"date-time"`
	Status         SubscriptionChangeCancelResponseStatus `json:"status,required"`
	Subscription   MutatedSubscription                    `json:"subscription,required,nullable"`
	// When this change was applied.
	AppliedAt time.Time `json:"applied_at,nullable" format:"date-time"`
	// When this change was cancelled.
	CancelledAt time.Time                            `json:"cancelled_at,nullable" format:"date-time"`
	JSON        subscriptionChangeCancelResponseJSON `json:"-"`
}

A subscription change represents a desired new subscription / pending change to an existing subscription. It is a way to first preview the effects on the subscription as well as any changes/creation of invoices (see `subscription.changed_resources`).

func (*SubscriptionChangeCancelResponse) UnmarshalJSON added in v0.112.0

func (r *SubscriptionChangeCancelResponse) UnmarshalJSON(data []byte) (err error)

type SubscriptionChangeCancelResponseStatus added in v0.112.0

type SubscriptionChangeCancelResponseStatus string
const (
	SubscriptionChangeCancelResponseStatusPending   SubscriptionChangeCancelResponseStatus = "pending"
	SubscriptionChangeCancelResponseStatusApplied   SubscriptionChangeCancelResponseStatus = "applied"
	SubscriptionChangeCancelResponseStatusCancelled SubscriptionChangeCancelResponseStatus = "cancelled"
)

func (SubscriptionChangeCancelResponseStatus) IsKnown added in v0.112.0

type SubscriptionChangeGetResponse added in v0.112.0

type SubscriptionChangeGetResponse struct {
	ID string `json:"id,required"`
	// Subscription change will be cancelled at this time and can no longer be applied.
	ExpirationTime time.Time                           `json:"expiration_time,required" format:"date-time"`
	Status         SubscriptionChangeGetResponseStatus `json:"status,required"`
	Subscription   MutatedSubscription                 `json:"subscription,required,nullable"`
	// When this change was applied.
	AppliedAt time.Time `json:"applied_at,nullable" format:"date-time"`
	// When this change was cancelled.
	CancelledAt time.Time                         `json:"cancelled_at,nullable" format:"date-time"`
	JSON        subscriptionChangeGetResponseJSON `json:"-"`
}

A subscription change represents a desired new subscription / pending change to an existing subscription. It is a way to first preview the effects on the subscription as well as any changes/creation of invoices (see `subscription.changed_resources`).

func (*SubscriptionChangeGetResponse) UnmarshalJSON added in v0.112.0

func (r *SubscriptionChangeGetResponse) UnmarshalJSON(data []byte) (err error)

type SubscriptionChangeGetResponseStatus added in v0.112.0

type SubscriptionChangeGetResponseStatus string
const (
	SubscriptionChangeGetResponseStatusPending   SubscriptionChangeGetResponseStatus = "pending"
	SubscriptionChangeGetResponseStatusApplied   SubscriptionChangeGetResponseStatus = "applied"
	SubscriptionChangeGetResponseStatusCancelled SubscriptionChangeGetResponseStatus = "cancelled"
)

func (SubscriptionChangeGetResponseStatus) IsKnown added in v0.112.0

type SubscriptionChangeMinified added in v0.121.0

type SubscriptionChangeMinified = shared.SubscriptionChangeMinified

This is an alias to an internal type.

type SubscriptionChangeService added in v0.112.0

type SubscriptionChangeService struct {
	Options []option.RequestOption
}

SubscriptionChangeService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSubscriptionChangeService method instead.

func NewSubscriptionChangeService added in v0.112.0

func NewSubscriptionChangeService(opts ...option.RequestOption) (r *SubscriptionChangeService)

NewSubscriptionChangeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SubscriptionChangeService) Apply added in v0.112.0

Apply a subscription change to perform the intended action. If a positive amount is passed with a request to this endpoint, any eligible invoices that were created will be issued immediately if they only contain in-advance fees.

func (*SubscriptionChangeService) Cancel added in v0.112.0

func (r *SubscriptionChangeService) Cancel(ctx context.Context, subscriptionChangeID string, opts ...option.RequestOption) (res *SubscriptionChangeCancelResponse, err error)

Cancel a subscription change. The change can no longer be applied. A subscription can only have one "pending" change at a time - use this endpoint to cancel an existing change before creating a new one.

func (*SubscriptionChangeService) Get added in v0.112.0

func (r *SubscriptionChangeService) Get(ctx context.Context, subscriptionChangeID string, opts ...option.RequestOption) (res *SubscriptionChangeGetResponse, err error)

This endpoint returns a subscription change given an identifier.

A subscription change is created by including `Create-Pending-Subscription-Change: True` in the header of a subscription mutation API call (e.g. [create subscription endpoint](/api-reference/subscription/create-subscription), [schedule plan change endpoint](/api-reference/subscription/schedule-plan-change), ...). The subscription change will be referenced by the `pending_subscription_change` field in the response.

type SubscriptionDiscountInterval

type SubscriptionDiscountInterval struct {
	// This field can have the runtime type of [[]string].
	AppliesToPriceIntervalIDs interface{}                               `json:"applies_to_price_interval_ids,required"`
	DiscountType              SubscriptionDiscountIntervalsDiscountType `json:"discount_type,required"`
	// The end date of the discount interval.
	EndDate time.Time `json:"end_date,required,nullable" format:"date-time"`
	// This field can have the runtime type of [[]shared.TransformPriceFilter].
	Filters interface{} `json:"filters,required"`
	// The start date of the discount interval.
	StartDate time.Time `json:"start_date,required" format:"date-time"`
	// Only available if discount_type is `amount`.
	AmountDiscount string `json:"amount_discount"`
	// Only available if discount_type is `percentage`.This is a number between 0
	// and 1.
	PercentageDiscount float64 `json:"percentage_discount"`
	// Only available if discount_type is `usage`. Number of usage units that this
	// discount is for
	UsageDiscount float64                          `json:"usage_discount"`
	JSON          subscriptionDiscountIntervalJSON `json:"-"`
	// contains filtered or unexported fields
}

func (SubscriptionDiscountInterval) AsUnion added in v0.25.0

AsUnion returns a SubscriptionDiscountIntervalsUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are shared.AmountDiscountInterval, shared.PercentageDiscountInterval, shared.UsageDiscountInterval.

func (*SubscriptionDiscountInterval) UnmarshalJSON added in v0.25.0

func (r *SubscriptionDiscountInterval) UnmarshalJSON(data []byte) (err error)

type SubscriptionDiscountIntervalsDiscountType added in v0.25.0

type SubscriptionDiscountIntervalsDiscountType string
const (
	SubscriptionDiscountIntervalsDiscountTypeAmount     SubscriptionDiscountIntervalsDiscountType = "amount"
	SubscriptionDiscountIntervalsDiscountTypePercentage SubscriptionDiscountIntervalsDiscountType = "percentage"
	SubscriptionDiscountIntervalsDiscountTypeUsage      SubscriptionDiscountIntervalsDiscountType = "usage"
)

func (SubscriptionDiscountIntervalsDiscountType) IsKnown added in v0.25.0

type SubscriptionDiscountIntervalsUnion added in v0.25.0

type SubscriptionDiscountIntervalsUnion interface {
	ImplementsSubscriptionDiscountInterval()
}

Union satisfied by shared.AmountDiscountInterval, shared.PercentageDiscountInterval or shared.UsageDiscountInterval.

type SubscriptionFetchCostsParams

type SubscriptionFetchCostsParams struct {
	// The currency or custom pricing unit to use.
	Currency param.Field[string] `query:"currency"`
	// Costs returned are exclusive of `timeframe_end`.
	TimeframeEnd param.Field[time.Time] `query:"timeframe_end" format:"date-time"`
	// Costs returned are inclusive of `timeframe_start`.
	TimeframeStart param.Field[time.Time] `query:"timeframe_start" format:"date-time"`
	// Controls whether Orb returns cumulative costs since the start of the billing
	// period, or incremental day-by-day costs. If your customer has minimums or
	// discounts, it's strongly recommended that you use the default cumulative
	// behavior.
	ViewMode param.Field[SubscriptionFetchCostsParamsViewMode] `query:"view_mode"`
}

func (SubscriptionFetchCostsParams) URLQuery

func (r SubscriptionFetchCostsParams) URLQuery() (v url.Values)

URLQuery serializes SubscriptionFetchCostsParams's query parameters as `url.Values`.

type SubscriptionFetchCostsParamsViewMode

type SubscriptionFetchCostsParamsViewMode string

Controls whether Orb returns cumulative costs since the start of the billing period, or incremental day-by-day costs. If your customer has minimums or discounts, it's strongly recommended that you use the default cumulative behavior.

const (
	SubscriptionFetchCostsParamsViewModePeriodic   SubscriptionFetchCostsParamsViewMode = "periodic"
	SubscriptionFetchCostsParamsViewModeCumulative SubscriptionFetchCostsParamsViewMode = "cumulative"
)

func (SubscriptionFetchCostsParamsViewMode) IsKnown added in v0.24.0

type SubscriptionFetchCostsResponse

type SubscriptionFetchCostsResponse struct {
	Data []shared.AggregatedCost            `json:"data,required"`
	JSON subscriptionFetchCostsResponseJSON `json:"-"`
}

func (*SubscriptionFetchCostsResponse) UnmarshalJSON

func (r *SubscriptionFetchCostsResponse) UnmarshalJSON(data []byte) (err error)

type SubscriptionFetchScheduleParams

type SubscriptionFetchScheduleParams struct {
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor param.Field[string] `query:"cursor"`
	// The number of items to fetch. Defaults to 20.
	Limit        param.Field[int64]     `query:"limit"`
	StartDateGt  param.Field[time.Time] `query:"start_date[gt]" format:"date-time"`
	StartDateGte param.Field[time.Time] `query:"start_date[gte]" format:"date-time"`
	StartDateLt  param.Field[time.Time] `query:"start_date[lt]" format:"date-time"`
	StartDateLte param.Field[time.Time] `query:"start_date[lte]" format:"date-time"`
}

func (SubscriptionFetchScheduleParams) URLQuery

func (r SubscriptionFetchScheduleParams) URLQuery() (v url.Values)

URLQuery serializes SubscriptionFetchScheduleParams's query parameters as `url.Values`.

type SubscriptionFetchScheduleResponse

type SubscriptionFetchScheduleResponse struct {
	CreatedAt time.Time                             `json:"created_at,required" format:"date-time"`
	EndDate   time.Time                             `json:"end_date,required,nullable" format:"date-time"`
	Plan      SubscriptionFetchScheduleResponsePlan `json:"plan,required,nullable"`
	StartDate time.Time                             `json:"start_date,required" format:"date-time"`
	JSON      subscriptionFetchScheduleResponseJSON `json:"-"`
}

func (*SubscriptionFetchScheduleResponse) UnmarshalJSON

func (r *SubscriptionFetchScheduleResponse) UnmarshalJSON(data []byte) (err error)

type SubscriptionFetchScheduleResponsePlan

type SubscriptionFetchScheduleResponsePlan struct {
	ID string `json:"id,required,nullable"`
	// An optional user-defined ID for this plan resource, used throughout the system
	// as an alias for this Plan. Use this field to identify a plan by an existing
	// identifier in your system.
	ExternalPlanID string                                    `json:"external_plan_id,required,nullable"`
	Name           string                                    `json:"name,required,nullable"`
	JSON           subscriptionFetchScheduleResponsePlanJSON `json:"-"`
}

func (*SubscriptionFetchScheduleResponsePlan) UnmarshalJSON

func (r *SubscriptionFetchScheduleResponsePlan) UnmarshalJSON(data []byte) (err error)

type SubscriptionFetchUsageParams

type SubscriptionFetchUsageParams struct {
	// When specified in conjunction with `group_by`, this parameter filters usage to a
	// single billable metric. Note that both `group_by` and `billable_metric_id` must
	// be specified together.
	BillableMetricID    param.Field[string] `query:"billable_metric_id"`
	FirstDimensionKey   param.Field[string] `query:"first_dimension_key"`
	FirstDimensionValue param.Field[string] `query:"first_dimension_value"`
	// This determines the windowing of usage reporting.
	Granularity param.Field[SubscriptionFetchUsageParamsGranularity] `query:"granularity"`
	// Groups per-price usage by the key provided.
	GroupBy              param.Field[string] `query:"group_by"`
	SecondDimensionKey   param.Field[string] `query:"second_dimension_key"`
	SecondDimensionValue param.Field[string] `query:"second_dimension_value"`
	// Usage returned is exclusive of `timeframe_end`.
	TimeframeEnd param.Field[time.Time] `query:"timeframe_end" format:"date-time"`
	// Usage returned is inclusive of `timeframe_start`.
	TimeframeStart param.Field[time.Time] `query:"timeframe_start" format:"date-time"`
	// Controls whether Orb returns cumulative usage since the start of the billing
	// period, or incremental day-by-day usage. If your customer has minimums or
	// discounts, it's strongly recommended that you use the default cumulative
	// behavior.
	ViewMode param.Field[SubscriptionFetchUsageParamsViewMode] `query:"view_mode"`
}

func (SubscriptionFetchUsageParams) URLQuery

func (r SubscriptionFetchUsageParams) URLQuery() (v url.Values)

URLQuery serializes SubscriptionFetchUsageParams's query parameters as `url.Values`.

type SubscriptionFetchUsageParamsGranularity

type SubscriptionFetchUsageParamsGranularity string

This determines the windowing of usage reporting.

const (
	SubscriptionFetchUsageParamsGranularityDay SubscriptionFetchUsageParamsGranularity = "day"
)

func (SubscriptionFetchUsageParamsGranularity) IsKnown added in v0.24.0

type SubscriptionFetchUsageParamsViewMode

type SubscriptionFetchUsageParamsViewMode string

Controls whether Orb returns cumulative usage since the start of the billing period, or incremental day-by-day usage. If your customer has minimums or discounts, it's strongly recommended that you use the default cumulative behavior.

const (
	SubscriptionFetchUsageParamsViewModePeriodic   SubscriptionFetchUsageParamsViewMode = "periodic"
	SubscriptionFetchUsageParamsViewModeCumulative SubscriptionFetchUsageParamsViewMode = "cumulative"
)

func (SubscriptionFetchUsageParamsViewMode) IsKnown added in v0.24.0

type SubscriptionListParams

type SubscriptionListParams struct {
	CreatedAtGt  param.Field[time.Time] `query:"created_at[gt]" format:"date-time"`
	CreatedAtGte param.Field[time.Time] `query:"created_at[gte]" format:"date-time"`
	CreatedAtLt  param.Field[time.Time] `query:"created_at[lt]" format:"date-time"`
	CreatedAtLte param.Field[time.Time] `query:"created_at[lte]" format:"date-time"`
	// Cursor for pagination. This can be populated by the `next_cursor` value returned
	// from the initial request.
	Cursor             param.Field[string]   `query:"cursor"`
	CustomerID         param.Field[[]string] `query:"customer_id"`
	ExternalCustomerID param.Field[[]string] `query:"external_customer_id"`
	// The number of items to fetch. Defaults to 20.
	Limit  param.Field[int64]                        `query:"limit"`
	Status param.Field[SubscriptionListParamsStatus] `query:"status"`
}

func (SubscriptionListParams) URLQuery

func (r SubscriptionListParams) URLQuery() (v url.Values)

URLQuery serializes SubscriptionListParams's query parameters as `url.Values`.

type SubscriptionListParamsStatus

type SubscriptionListParamsStatus string
const (
	SubscriptionListParamsStatusActive   SubscriptionListParamsStatus = "active"
	SubscriptionListParamsStatusEnded    SubscriptionListParamsStatus = "ended"
	SubscriptionListParamsStatusUpcoming SubscriptionListParamsStatus = "upcoming"
)

func (SubscriptionListParamsStatus) IsKnown added in v0.24.0

func (r SubscriptionListParamsStatus) IsKnown() bool

type SubscriptionMinified added in v0.121.0

type SubscriptionMinified = shared.SubscriptionMinified

This is an alias to an internal type.

type SubscriptionNewParams

type SubscriptionNewParams struct {
	// Additional adjustments to be added to the subscription. (Only available for
	// accounts that have migrated off of legacy subscription overrides)
	AddAdjustments param.Field[[]SubscriptionNewParamsAddAdjustment] `json:"add_adjustments"`
	// Additional prices to be added to the subscription. (Only available for accounts
	// that have migrated off of legacy subscription overrides)
	AddPrices                             param.Field[[]SubscriptionNewParamsAddPrice] `json:"add_prices"`
	AlignBillingWithSubscriptionStartDate param.Field[bool]                            `json:"align_billing_with_subscription_start_date"`
	// Determines whether issued invoices for this subscription will automatically be
	// charged with the saved payment method on the due date. If not specified, this
	// defaults to the behavior configured for this customer.
	AutoCollection                  param.Field[bool]                                        `json:"auto_collection"`
	AwsRegion                       param.Field[string]                                      `json:"aws_region"`
	BillingCycleAnchorConfiguration param.Field[shared.BillingCycleAnchorConfigurationParam] `json:"billing_cycle_anchor_configuration"`
	// Redemption code to be used for this subscription. If the coupon cannot be found
	// by its redemption code, or cannot be redeemed, an error response will be
	// returned and the subscription creation or plan change will not be scheduled.
	CouponRedemptionCode param.Field[string]  `json:"coupon_redemption_code"`
	CreditsOverageRate   param.Field[float64] `json:"credits_overage_rate"`
	// The currency to use for the subscription. If not specified, the invoicing
	// currency for the plan will be used.
	Currency   param.Field[string] `json:"currency"`
	CustomerID param.Field[string] `json:"customer_id"`
	// Determines the default memo on this subscription's invoices. Note that if this
	// is not provided, it is determined by the plan configuration.
	DefaultInvoiceMemo             param.Field[string]                                   `json:"default_invoice_memo"`
	EndDate                        param.Field[time.Time]                                `json:"end_date" format:"date-time"`
	ExternalCustomerID             param.Field[string]                                   `json:"external_customer_id"`
	ExternalMarketplace            param.Field[SubscriptionNewParamsExternalMarketplace] `json:"external_marketplace"`
	ExternalMarketplaceReportingID param.Field[string]                                   `json:"external_marketplace_reporting_id"`
	// The external_plan_id of the plan that the given subscription should be switched
	// to. Note that either this property or `plan_id` must be specified.
	ExternalPlanID param.Field[string] `json:"external_plan_id"`
	// An additional filter to apply to usage queries. This filter must be expressed as
	// a boolean
	// [computed property](/extensibility/advanced-metrics#computed-properties). If
	// null, usage queries will not include any additional filter.
	Filter param.Field[string] `json:"filter"`
	// The phase of the plan to start with
	InitialPhaseOrder param.Field[int64] `json:"initial_phase_order"`
	// When this subscription's accrued usage reaches this threshold, an invoice will
	// be issued for the subscription. If not specified, invoices will only be issued
	// at the end of the billing period.
	InvoicingThreshold param.Field[string] `json:"invoicing_threshold"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// The name to use for the subscription. If not specified, the plan name will be
	// used.
	Name param.Field[string] `json:"name"`
	// The net terms determines the difference between the invoice date and the issue
	// date for the invoice. If you intend the invoice to be due on issue, set this
	// to 0. If not provided, this defaults to the value specified in the plan.
	NetTerms               param.Field[int64]   `json:"net_terms"`
	PerCreditOverageAmount param.Field[float64] `json:"per_credit_overage_amount"`
	// The plan that the given subscription should be switched to. Note that either
	// this property or `external_plan_id` must be specified.
	PlanID param.Field[string] `json:"plan_id"`
	// Specifies which version of the plan to subscribe to. If null, the default
	// version will be used.
	PlanVersionNumber param.Field[int64] `json:"plan_version_number"`
	// Optionally provide a list of overrides for prices on the plan
	PriceOverrides param.Field[[]interface{}] `json:"price_overrides"`
	// Plan adjustments to be removed from the subscription. (Only available for
	// accounts that have migrated off of legacy subscription overrides)
	RemoveAdjustments param.Field[[]SubscriptionNewParamsRemoveAdjustment] `json:"remove_adjustments"`
	// Plan prices to be removed from the subscription. (Only available for accounts
	// that have migrated off of legacy subscription overrides)
	RemovePrices param.Field[[]SubscriptionNewParamsRemovePrice] `json:"remove_prices"`
	// Plan adjustments to be replaced with additional adjustments on the subscription.
	// (Only available for accounts that have migrated off of legacy subscription
	// overrides)
	ReplaceAdjustments param.Field[[]SubscriptionNewParamsReplaceAdjustment] `json:"replace_adjustments"`
	// Plan prices to be replaced with additional prices on the subscription. (Only
	// available for accounts that have migrated off of legacy subscription overrides)
	ReplacePrices param.Field[[]SubscriptionNewParamsReplacePrice] `json:"replace_prices"`
	StartDate     param.Field[time.Time]                           `json:"start_date" format:"date-time"`
	// The duration of the trial period in days. If not provided, this defaults to the
	// value specified in the plan. If `0` is provided, the trial on the plan will be
	// skipped.
	TrialDurationDays param.Field[int64] `json:"trial_duration_days"`
	// A list of customer IDs whose usage events will be aggregated and billed under
	// this subscription. By default, a subscription only considers usage events
	// associated with its attached customer's customer_id. When usage_customer_ids is
	// provided, the subscription includes usage events from the specified customers
	// only. Provided usage_customer_ids must be either the customer for this
	// subscription itself, or any of that customer's children.
	UsageCustomerIDs param.Field[[]string] `json:"usage_customer_ids"`
}

func (SubscriptionNewParams) MarshalJSON

func (r SubscriptionNewParams) MarshalJSON() (data []byte, err error)

type SubscriptionNewParamsAddAdjustment added in v0.66.0

type SubscriptionNewParamsAddAdjustment struct {
	// The definition of a new adjustment to create and add to the subscription.
	Adjustment param.Field[SubscriptionNewParamsAddAdjustmentsAdjustmentUnion] `json:"adjustment,required"`
	// The end date of the adjustment interval. This is the date that the adjustment
	// will stop affecting prices on the subscription.
	EndDate param.Field[time.Time] `json:"end_date" format:"date-time"`
	// The phase to add this adjustment to.
	PlanPhaseOrder param.Field[int64] `json:"plan_phase_order"`
	// The start date of the adjustment interval. This is the date that the adjustment
	// will start affecting prices on the subscription. If null, the adjustment will
	// start when the phase or subscription starts.
	StartDate param.Field[time.Time] `json:"start_date" format:"date-time"`
}

func (SubscriptionNewParamsAddAdjustment) MarshalJSON added in v0.66.0

func (r SubscriptionNewParamsAddAdjustment) MarshalJSON() (data []byte, err error)

type SubscriptionNewParamsAddAdjustmentsAdjustment added in v0.66.0

type SubscriptionNewParamsAddAdjustmentsAdjustment struct {
	AdjustmentType param.Field[SubscriptionNewParamsAddAdjustmentsAdjustmentAdjustmentType] `json:"adjustment_type,required"`
	AmountDiscount param.Field[string]                                                      `json:"amount_discount"`
	// If set, the adjustment will apply to every price on the subscription.
	AppliesToAll      param.Field[SubscriptionNewParamsAddAdjustmentsAdjustmentAppliesToAll] `json:"applies_to_all"`
	AppliesToItemIDs  param.Field[interface{}]                                               `json:"applies_to_item_ids"`
	AppliesToPriceIDs param.Field[interface{}]                                               `json:"applies_to_price_ids"`
	// If set, only prices in the specified currency will have the adjustment applied.
	Currency param.Field[string]      `json:"currency"`
	Filters  param.Field[interface{}] `json:"filters"`
	// When false, this adjustment will be applied to a single price. Otherwise, it
	// will be applied at the invoice level, possibly to multiple prices.
	IsInvoiceLevel param.Field[bool] `json:"is_invoice_level"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID             param.Field[string]  `json:"item_id"`
	MaximumAmount      param.Field[string]  `json:"maximum_amount"`
	MinimumAmount      param.Field[string]  `json:"minimum_amount"`
	PercentageDiscount param.Field[float64] `json:"percentage_discount"`
	// If set, only prices of the specified type will have the adjustment applied.
	PriceType     param.Field[SubscriptionNewParamsAddAdjustmentsAdjustmentPriceType] `json:"price_type"`
	UsageDiscount param.Field[float64]                                                `json:"usage_discount"`
}

The definition of a new adjustment to create and add to the subscription.

func (SubscriptionNewParamsAddAdjustmentsAdjustment) ImplementsSubscriptionNewParamsAddAdjustmentsAdjustmentUnion added in v0.121.0

func (r SubscriptionNewParamsAddAdjustmentsAdjustment) ImplementsSubscriptionNewParamsAddAdjustmentsAdjustmentUnion()

func (SubscriptionNewParamsAddAdjustmentsAdjustment) MarshalJSON added in v0.66.0

func (r SubscriptionNewParamsAddAdjustmentsAdjustment) MarshalJSON() (data []byte, err error)

type SubscriptionNewParamsAddAdjustmentsAdjustmentAdjustmentType added in v0.66.0

type SubscriptionNewParamsAddAdjustmentsAdjustmentAdjustmentType string
const (
	SubscriptionNewParamsAddAdjustmentsAdjustmentAdjustmentTypePercentageDiscount SubscriptionNewParamsAddAdjustmentsAdjustmentAdjustmentType = "percentage_discount"
	SubscriptionNewParamsAddAdjustmentsAdjustmentAdjustmentTypeUsageDiscount      SubscriptionNewParamsAddAdjustmentsAdjustmentAdjustmentType = "usage_discount"
	SubscriptionNewParamsAddAdjustmentsAdjustmentAdjustmentTypeAmountDiscount     SubscriptionNewParamsAddAdjustmentsAdjustmentAdjustmentType = "amount_discount"
	SubscriptionNewParamsAddAdjustmentsAdjustmentAdjustmentTypeMinimum            SubscriptionNewParamsAddAdjustmentsAdjustmentAdjustmentType = "minimum"
	SubscriptionNewParamsAddAdjustmentsAdjustmentAdjustmentTypeMaximum            SubscriptionNewParamsAddAdjustmentsAdjustmentAdjustmentType = "maximum"
)

func (SubscriptionNewParamsAddAdjustmentsAdjustmentAdjustmentType) IsKnown added in v0.66.0

type SubscriptionNewParamsAddAdjustmentsAdjustmentAppliesToAll added in v0.120.0

type SubscriptionNewParamsAddAdjustmentsAdjustmentAppliesToAll bool

If set, the adjustment will apply to every price on the subscription.

const (
	SubscriptionNewParamsAddAdjustmentsAdjustmentAppliesToAllTrue SubscriptionNewParamsAddAdjustmentsAdjustmentAppliesToAll = true
)

func (SubscriptionNewParamsAddAdjustmentsAdjustmentAppliesToAll) IsKnown added in v0.120.0

type SubscriptionNewParamsAddAdjustmentsAdjustmentPriceType added in v0.120.0

type SubscriptionNewParamsAddAdjustmentsAdjustmentPriceType string

If set, only prices of the specified type will have the adjustment applied.

const (
	SubscriptionNewParamsAddAdjustmentsAdjustmentPriceTypeUsage          SubscriptionNewParamsAddAdjustmentsAdjustmentPriceType = "usage"
	SubscriptionNewParamsAddAdjustmentsAdjustmentPriceTypeFixedInAdvance SubscriptionNewParamsAddAdjustmentsAdjustmentPriceType = "fixed_in_advance"
	SubscriptionNewParamsAddAdjustmentsAdjustmentPriceTypeFixedInArrears SubscriptionNewParamsAddAdjustmentsAdjustmentPriceType = "fixed_in_arrears"
	SubscriptionNewParamsAddAdjustmentsAdjustmentPriceTypeFixed          SubscriptionNewParamsAddAdjustmentsAdjustmentPriceType = "fixed"
	SubscriptionNewParamsAddAdjustmentsAdjustmentPriceTypeInArrears      SubscriptionNewParamsAddAdjustmentsAdjustmentPriceType = "in_arrears"
)

func (SubscriptionNewParamsAddAdjustmentsAdjustmentPriceType) IsKnown added in v0.120.0

type SubscriptionNewParamsAddAdjustmentsAdjustmentUnion added in v0.66.0

type SubscriptionNewParamsAddAdjustmentsAdjustmentUnion interface {
	ImplementsSubscriptionNewParamsAddAdjustmentsAdjustmentUnion()
}

The definition of a new adjustment to create and add to the subscription.

Satisfied by shared.NewPercentageDiscountParam, shared.NewUsageDiscountParam, shared.NewAmountDiscountParam, shared.NewMinimumParam, shared.NewMaximumParam, SubscriptionNewParamsAddAdjustmentsAdjustment.

type SubscriptionNewParamsAddPrice added in v0.66.0

type SubscriptionNewParamsAddPrice struct {
	// The definition of a new allocation price to create and add to the subscription.
	AllocationPrice param.Field[shared.NewAllocationPriceParam] `json:"allocation_price"`
	// [DEPRECATED] Use add_adjustments instead. The subscription's discounts for this
	// price.
	//
	// Deprecated: deprecated
	Discounts param.Field[[]DiscountOverrideParam] `json:"discounts"`
	// The end date of the price interval. This is the date that the price will stop
	// billing on the subscription. If null, billing will end when the phase or
	// subscription ends.
	EndDate param.Field[time.Time] `json:"end_date" format:"date-time"`
	// The external price id of the price to add to the subscription.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for
	// this price.
	//
	// Deprecated: deprecated
	MaximumAmount param.Field[string] `json:"maximum_amount"`
	// [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for
	// this price.
	//
	// Deprecated: deprecated
	MinimumAmount param.Field[string] `json:"minimum_amount"`
	// The phase to add this price to.
	PlanPhaseOrder param.Field[int64] `json:"plan_phase_order"`
	// The definition of a new price to create and add to the subscription.
	Price param.Field[SubscriptionNewParamsAddPricesPriceUnion] `json:"price"`
	// The id of the price to add to the subscription.
	PriceID param.Field[string] `json:"price_id"`
	// The start date of the price interval. This is the date that the price will start
	// billing on the subscription. If null, billing will start when the phase or
	// subscription starts.
	StartDate param.Field[time.Time] `json:"start_date" format:"date-time"`
}

func (SubscriptionNewParamsAddPrice) MarshalJSON added in v0.66.0

func (r SubscriptionNewParamsAddPrice) MarshalJSON() (data []byte, err error)

type SubscriptionNewParamsAddPricesPrice added in v0.66.0

type SubscriptionNewParamsAddPricesPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[SubscriptionNewParamsAddPricesPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                       `json:"item_id,required"`
	ModelType param.Field[SubscriptionNewParamsAddPricesPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	BPSConfig                 param.Field[shared.BPSConfigParam]                    `json:"bps_config"`
	BulkBPSConfig             param.Field[shared.BulkBPSConfigParam]                `json:"bulk_bps_config"`
	BulkConfig                param.Field[shared.BulkConfigParam]                   `json:"bulk_config"`
	BulkWithProrationConfig   param.Field[interface{}]                              `json:"bulk_with_proration_config"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate              param.Field[float64]     `json:"conversion_rate"`
	ConversionRateConfig        param.Field[interface{}] `json:"conversion_rate_config"`
	CumulativeGroupedBulkConfig param.Field[interface{}] `json:"cumulative_grouped_bulk_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity               param.Field[float64]     `json:"fixed_price_quantity"`
	GroupedAllocationConfig          param.Field[interface{}] `json:"grouped_allocation_config"`
	GroupedTieredConfig              param.Field[interface{}] `json:"grouped_tiered_config"`
	GroupedTieredPackageConfig       param.Field[interface{}] `json:"grouped_tiered_package_config"`
	GroupedWithMeteredMinimumConfig  param.Field[interface{}] `json:"grouped_with_metered_minimum_config"`
	GroupedWithProratedMinimumConfig param.Field[interface{}] `json:"grouped_with_prorated_minimum_config"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	MatrixConfig                param.Field[shared.MatrixConfigParam]                 `json:"matrix_config"`
	MatrixWithAllocationConfig  param.Field[shared.MatrixWithAllocationConfigParam]   `json:"matrix_with_allocation_config"`
	MatrixWithDisplayNameConfig param.Field[interface{}]                              `json:"matrix_with_display_name_config"`
	MaxGroupTieredPackageConfig param.Field[interface{}]                              `json:"max_group_tiered_package_config"`
	Metadata                    param.Field[interface{}]                              `json:"metadata"`
	PackageConfig               param.Field[shared.PackageConfigParam]                `json:"package_config"`
	PackageWithAllocationConfig param.Field[interface{}]                              `json:"package_with_allocation_config"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID                           param.Field[string]                      `json:"reference_id"`
	ScalableMatrixWithTieredPricingConfig param.Field[interface{}]                 `json:"scalable_matrix_with_tiered_pricing_config"`
	ScalableMatrixWithUnitPricingConfig   param.Field[interface{}]                 `json:"scalable_matrix_with_unit_pricing_config"`
	ThresholdTotalAmountConfig            param.Field[interface{}]                 `json:"threshold_total_amount_config"`
	TieredBPSConfig                       param.Field[shared.TieredBPSConfigParam] `json:"tiered_bps_config"`
	TieredConfig                          param.Field[shared.TieredConfigParam]    `json:"tiered_config"`
	TieredPackageConfig                   param.Field[interface{}]                 `json:"tiered_package_config"`
	TieredPackageWithMinimumConfig        param.Field[interface{}]                 `json:"tiered_package_with_minimum_config"`
	TieredWithMinimumConfig               param.Field[interface{}]                 `json:"tiered_with_minimum_config"`
	TieredWithProrationConfig             param.Field[interface{}]                 `json:"tiered_with_proration_config"`
	UnitConfig                            param.Field[shared.UnitConfigParam]      `json:"unit_config"`
	UnitWithPercentConfig                 param.Field[interface{}]                 `json:"unit_with_percent_config"`
	UnitWithProrationConfig               param.Field[interface{}]                 `json:"unit_with_proration_config"`
}

The definition of a new price to create and add to the subscription.

func (SubscriptionNewParamsAddPricesPrice) MarshalJSON added in v0.66.0

func (r SubscriptionNewParamsAddPricesPrice) MarshalJSON() (data []byte, err error)

type SubscriptionNewParamsAddPricesPriceCadence added in v0.66.0

type SubscriptionNewParamsAddPricesPriceCadence string

The cadence to bill for this price on.

const (
	SubscriptionNewParamsAddPricesPriceCadenceAnnual     SubscriptionNewParamsAddPricesPriceCadence = "annual"
	SubscriptionNewParamsAddPricesPriceCadenceSemiAnnual SubscriptionNewParamsAddPricesPriceCadence = "semi_annual"
	SubscriptionNewParamsAddPricesPriceCadenceMonthly    SubscriptionNewParamsAddPricesPriceCadence = "monthly"
	SubscriptionNewParamsAddPricesPriceCadenceQuarterly  SubscriptionNewParamsAddPricesPriceCadence = "quarterly"
	SubscriptionNewParamsAddPricesPriceCadenceOneTime    SubscriptionNewParamsAddPricesPriceCadence = "one_time"
	SubscriptionNewParamsAddPricesPriceCadenceCustom     SubscriptionNewParamsAddPricesPriceCadence = "custom"
)

func (SubscriptionNewParamsAddPricesPriceCadence) IsKnown added in v0.66.0

type SubscriptionNewParamsAddPricesPriceModelType added in v0.66.0

type SubscriptionNewParamsAddPricesPriceModelType string
const (
	SubscriptionNewParamsAddPricesPriceModelTypeUnit                            SubscriptionNewParamsAddPricesPriceModelType = "unit"
	SubscriptionNewParamsAddPricesPriceModelTypePackage                         SubscriptionNewParamsAddPricesPriceModelType = "package"
	SubscriptionNewParamsAddPricesPriceModelTypeMatrix                          SubscriptionNewParamsAddPricesPriceModelType = "matrix"
	SubscriptionNewParamsAddPricesPriceModelTypeTiered                          SubscriptionNewParamsAddPricesPriceModelType = "tiered"
	SubscriptionNewParamsAddPricesPriceModelTypeTieredBPS                       SubscriptionNewParamsAddPricesPriceModelType = "tiered_bps"
	SubscriptionNewParamsAddPricesPriceModelTypeBPS                             SubscriptionNewParamsAddPricesPriceModelType = "bps"
	SubscriptionNewParamsAddPricesPriceModelTypeBulkBPS                         SubscriptionNewParamsAddPricesPriceModelType = "bulk_bps"
	SubscriptionNewParamsAddPricesPriceModelTypeBulk                            SubscriptionNewParamsAddPricesPriceModelType = "bulk"
	SubscriptionNewParamsAddPricesPriceModelTypeThresholdTotalAmount            SubscriptionNewParamsAddPricesPriceModelType = "threshold_total_amount"
	SubscriptionNewParamsAddPricesPriceModelTypeTieredPackage                   SubscriptionNewParamsAddPricesPriceModelType = "tiered_package"
	SubscriptionNewParamsAddPricesPriceModelTypeTieredWithMinimum               SubscriptionNewParamsAddPricesPriceModelType = "tiered_with_minimum"
	SubscriptionNewParamsAddPricesPriceModelTypeUnitWithPercent                 SubscriptionNewParamsAddPricesPriceModelType = "unit_with_percent"
	SubscriptionNewParamsAddPricesPriceModelTypePackageWithAllocation           SubscriptionNewParamsAddPricesPriceModelType = "package_with_allocation"
	SubscriptionNewParamsAddPricesPriceModelTypeTieredWithProration             SubscriptionNewParamsAddPricesPriceModelType = "tiered_with_proration"
	SubscriptionNewParamsAddPricesPriceModelTypeUnitWithProration               SubscriptionNewParamsAddPricesPriceModelType = "unit_with_proration"
	SubscriptionNewParamsAddPricesPriceModelTypeGroupedAllocation               SubscriptionNewParamsAddPricesPriceModelType = "grouped_allocation"
	SubscriptionNewParamsAddPricesPriceModelTypeGroupedWithProratedMinimum      SubscriptionNewParamsAddPricesPriceModelType = "grouped_with_prorated_minimum"
	SubscriptionNewParamsAddPricesPriceModelTypeBulkWithProration               SubscriptionNewParamsAddPricesPriceModelType = "bulk_with_proration"
	SubscriptionNewParamsAddPricesPriceModelTypeScalableMatrixWithUnitPricing   SubscriptionNewParamsAddPricesPriceModelType = "scalable_matrix_with_unit_pricing"
	SubscriptionNewParamsAddPricesPriceModelTypeScalableMatrixWithTieredPricing SubscriptionNewParamsAddPricesPriceModelType = "scalable_matrix_with_tiered_pricing"
	SubscriptionNewParamsAddPricesPriceModelTypeCumulativeGroupedBulk           SubscriptionNewParamsAddPricesPriceModelType = "cumulative_grouped_bulk"
	SubscriptionNewParamsAddPricesPriceModelTypeMaxGroupTieredPackage           SubscriptionNewParamsAddPricesPriceModelType = "max_group_tiered_package"
	SubscriptionNewParamsAddPricesPriceModelTypeGroupedWithMeteredMinimum       SubscriptionNewParamsAddPricesPriceModelType = "grouped_with_metered_minimum"
	SubscriptionNewParamsAddPricesPriceModelTypeMatrixWithDisplayName           SubscriptionNewParamsAddPricesPriceModelType = "matrix_with_display_name"
	SubscriptionNewParamsAddPricesPriceModelTypeGroupedTieredPackage            SubscriptionNewParamsAddPricesPriceModelType = "grouped_tiered_package"
	SubscriptionNewParamsAddPricesPriceModelTypeMatrixWithAllocation            SubscriptionNewParamsAddPricesPriceModelType = "matrix_with_allocation"
	SubscriptionNewParamsAddPricesPriceModelTypeTieredPackageWithMinimum        SubscriptionNewParamsAddPricesPriceModelType = "tiered_package_with_minimum"
	SubscriptionNewParamsAddPricesPriceModelTypeGroupedTiered                   SubscriptionNewParamsAddPricesPriceModelType = "grouped_tiered"
)

func (SubscriptionNewParamsAddPricesPriceModelType) IsKnown added in v0.66.0

type SubscriptionNewParamsExternalMarketplace

type SubscriptionNewParamsExternalMarketplace string
const (
	SubscriptionNewParamsExternalMarketplaceGoogle SubscriptionNewParamsExternalMarketplace = "google"
	SubscriptionNewParamsExternalMarketplaceAws    SubscriptionNewParamsExternalMarketplace = "aws"
	SubscriptionNewParamsExternalMarketplaceAzure  SubscriptionNewParamsExternalMarketplace = "azure"
)

func (SubscriptionNewParamsExternalMarketplace) IsKnown added in v0.24.0

type SubscriptionNewParamsRemoveAdjustment added in v0.66.0

type SubscriptionNewParamsRemoveAdjustment struct {
	// The id of the adjustment to remove on the subscription.
	AdjustmentID param.Field[string] `json:"adjustment_id,required"`
}

func (SubscriptionNewParamsRemoveAdjustment) MarshalJSON added in v0.66.0

func (r SubscriptionNewParamsRemoveAdjustment) MarshalJSON() (data []byte, err error)

type SubscriptionNewParamsRemovePrice added in v0.66.0

type SubscriptionNewParamsRemovePrice struct {
	// The external price id of the price to remove on the subscription.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// The id of the price to remove on the subscription.
	PriceID param.Field[string] `json:"price_id"`
}

func (SubscriptionNewParamsRemovePrice) MarshalJSON added in v0.66.0

func (r SubscriptionNewParamsRemovePrice) MarshalJSON() (data []byte, err error)

type SubscriptionNewParamsReplaceAdjustment added in v0.66.0

type SubscriptionNewParamsReplaceAdjustment struct {
	// The definition of a new adjustment to create and add to the subscription.
	Adjustment param.Field[SubscriptionNewParamsReplaceAdjustmentsAdjustmentUnion] `json:"adjustment,required"`
	// The id of the adjustment on the plan to replace in the subscription.
	ReplacesAdjustmentID param.Field[string] `json:"replaces_adjustment_id,required"`
}

func (SubscriptionNewParamsReplaceAdjustment) MarshalJSON added in v0.66.0

func (r SubscriptionNewParamsReplaceAdjustment) MarshalJSON() (data []byte, err error)

type SubscriptionNewParamsReplaceAdjustmentsAdjustment added in v0.66.0

type SubscriptionNewParamsReplaceAdjustmentsAdjustment struct {
	AdjustmentType param.Field[SubscriptionNewParamsReplaceAdjustmentsAdjustmentAdjustmentType] `json:"adjustment_type,required"`
	AmountDiscount param.Field[string]                                                          `json:"amount_discount"`
	// If set, the adjustment will apply to every price on the subscription.
	AppliesToAll      param.Field[SubscriptionNewParamsReplaceAdjustmentsAdjustmentAppliesToAll] `json:"applies_to_all"`
	AppliesToItemIDs  param.Field[interface{}]                                                   `json:"applies_to_item_ids"`
	AppliesToPriceIDs param.Field[interface{}]                                                   `json:"applies_to_price_ids"`
	// If set, only prices in the specified currency will have the adjustment applied.
	Currency param.Field[string]      `json:"currency"`
	Filters  param.Field[interface{}] `json:"filters"`
	// When false, this adjustment will be applied to a single price. Otherwise, it
	// will be applied at the invoice level, possibly to multiple prices.
	IsInvoiceLevel param.Field[bool] `json:"is_invoice_level"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID             param.Field[string]  `json:"item_id"`
	MaximumAmount      param.Field[string]  `json:"maximum_amount"`
	MinimumAmount      param.Field[string]  `json:"minimum_amount"`
	PercentageDiscount param.Field[float64] `json:"percentage_discount"`
	// If set, only prices of the specified type will have the adjustment applied.
	PriceType     param.Field[SubscriptionNewParamsReplaceAdjustmentsAdjustmentPriceType] `json:"price_type"`
	UsageDiscount param.Field[float64]                                                    `json:"usage_discount"`
}

The definition of a new adjustment to create and add to the subscription.

func (SubscriptionNewParamsReplaceAdjustmentsAdjustment) ImplementsSubscriptionNewParamsReplaceAdjustmentsAdjustmentUnion added in v0.121.0

func (r SubscriptionNewParamsReplaceAdjustmentsAdjustment) ImplementsSubscriptionNewParamsReplaceAdjustmentsAdjustmentUnion()

func (SubscriptionNewParamsReplaceAdjustmentsAdjustment) MarshalJSON added in v0.66.0

func (r SubscriptionNewParamsReplaceAdjustmentsAdjustment) MarshalJSON() (data []byte, err error)

type SubscriptionNewParamsReplaceAdjustmentsAdjustmentAdjustmentType added in v0.66.0

type SubscriptionNewParamsReplaceAdjustmentsAdjustmentAdjustmentType string
const (
	SubscriptionNewParamsReplaceAdjustmentsAdjustmentAdjustmentTypePercentageDiscount SubscriptionNewParamsReplaceAdjustmentsAdjustmentAdjustmentType = "percentage_discount"
	SubscriptionNewParamsReplaceAdjustmentsAdjustmentAdjustmentTypeUsageDiscount      SubscriptionNewParamsReplaceAdjustmentsAdjustmentAdjustmentType = "usage_discount"
	SubscriptionNewParamsReplaceAdjustmentsAdjustmentAdjustmentTypeAmountDiscount     SubscriptionNewParamsReplaceAdjustmentsAdjustmentAdjustmentType = "amount_discount"
	SubscriptionNewParamsReplaceAdjustmentsAdjustmentAdjustmentTypeMinimum            SubscriptionNewParamsReplaceAdjustmentsAdjustmentAdjustmentType = "minimum"
	SubscriptionNewParamsReplaceAdjustmentsAdjustmentAdjustmentTypeMaximum            SubscriptionNewParamsReplaceAdjustmentsAdjustmentAdjustmentType = "maximum"
)

func (SubscriptionNewParamsReplaceAdjustmentsAdjustmentAdjustmentType) IsKnown added in v0.66.0

type SubscriptionNewParamsReplaceAdjustmentsAdjustmentAppliesToAll added in v0.120.0

type SubscriptionNewParamsReplaceAdjustmentsAdjustmentAppliesToAll bool

If set, the adjustment will apply to every price on the subscription.

const (
	SubscriptionNewParamsReplaceAdjustmentsAdjustmentAppliesToAllTrue SubscriptionNewParamsReplaceAdjustmentsAdjustmentAppliesToAll = true
)

func (SubscriptionNewParamsReplaceAdjustmentsAdjustmentAppliesToAll) IsKnown added in v0.120.0

type SubscriptionNewParamsReplaceAdjustmentsAdjustmentPriceType added in v0.120.0

type SubscriptionNewParamsReplaceAdjustmentsAdjustmentPriceType string

If set, only prices of the specified type will have the adjustment applied.

const (
	SubscriptionNewParamsReplaceAdjustmentsAdjustmentPriceTypeUsage          SubscriptionNewParamsReplaceAdjustmentsAdjustmentPriceType = "usage"
	SubscriptionNewParamsReplaceAdjustmentsAdjustmentPriceTypeFixedInAdvance SubscriptionNewParamsReplaceAdjustmentsAdjustmentPriceType = "fixed_in_advance"
	SubscriptionNewParamsReplaceAdjustmentsAdjustmentPriceTypeFixedInArrears SubscriptionNewParamsReplaceAdjustmentsAdjustmentPriceType = "fixed_in_arrears"
	SubscriptionNewParamsReplaceAdjustmentsAdjustmentPriceTypeFixed          SubscriptionNewParamsReplaceAdjustmentsAdjustmentPriceType = "fixed"
	SubscriptionNewParamsReplaceAdjustmentsAdjustmentPriceTypeInArrears      SubscriptionNewParamsReplaceAdjustmentsAdjustmentPriceType = "in_arrears"
)

func (SubscriptionNewParamsReplaceAdjustmentsAdjustmentPriceType) IsKnown added in v0.120.0

type SubscriptionNewParamsReplaceAdjustmentsAdjustmentUnion added in v0.66.0

type SubscriptionNewParamsReplaceAdjustmentsAdjustmentUnion interface {
	ImplementsSubscriptionNewParamsReplaceAdjustmentsAdjustmentUnion()
}

The definition of a new adjustment to create and add to the subscription.

Satisfied by shared.NewPercentageDiscountParam, shared.NewUsageDiscountParam, shared.NewAmountDiscountParam, shared.NewMinimumParam, shared.NewMaximumParam, SubscriptionNewParamsReplaceAdjustmentsAdjustment.

type SubscriptionNewParamsReplacePrice added in v0.66.0

type SubscriptionNewParamsReplacePrice struct {
	// The id of the price on the plan to replace in the subscription.
	ReplacesPriceID param.Field[string] `json:"replaces_price_id,required"`
	// The definition of a new allocation price to create and add to the subscription.
	AllocationPrice param.Field[shared.NewAllocationPriceParam] `json:"allocation_price"`
	// [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the
	// replacement price.
	//
	// Deprecated: deprecated
	Discounts param.Field[[]DiscountOverrideParam] `json:"discounts"`
	// The external price id of the price to add to the subscription.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// The new quantity of the price, if the price is a fixed price.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for
	// the replacement price.
	//
	// Deprecated: deprecated
	MaximumAmount param.Field[string] `json:"maximum_amount"`
	// [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for
	// the replacement price.
	//
	// Deprecated: deprecated
	MinimumAmount param.Field[string] `json:"minimum_amount"`
	// The definition of a new price to create and add to the subscription.
	Price param.Field[SubscriptionNewParamsReplacePricesPriceUnion] `json:"price"`
	// The id of the price to add to the subscription.
	PriceID param.Field[string] `json:"price_id"`
}

func (SubscriptionNewParamsReplacePrice) MarshalJSON added in v0.66.0

func (r SubscriptionNewParamsReplacePrice) MarshalJSON() (data []byte, err error)

type SubscriptionNewParamsReplacePricesPrice added in v0.66.0

type SubscriptionNewParamsReplacePricesPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[SubscriptionNewParamsReplacePricesPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                           `json:"item_id,required"`
	ModelType param.Field[SubscriptionNewParamsReplacePricesPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	BPSConfig                 param.Field[shared.BPSConfigParam]                    `json:"bps_config"`
	BulkBPSConfig             param.Field[shared.BulkBPSConfigParam]                `json:"bulk_bps_config"`
	BulkConfig                param.Field[shared.BulkConfigParam]                   `json:"bulk_config"`
	BulkWithProrationConfig   param.Field[interface{}]                              `json:"bulk_with_proration_config"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate              param.Field[float64]     `json:"conversion_rate"`
	ConversionRateConfig        param.Field[interface{}] `json:"conversion_rate_config"`
	CumulativeGroupedBulkConfig param.Field[interface{}] `json:"cumulative_grouped_bulk_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity               param.Field[float64]     `json:"fixed_price_quantity"`
	GroupedAllocationConfig          param.Field[interface{}] `json:"grouped_allocation_config"`
	GroupedTieredConfig              param.Field[interface{}] `json:"grouped_tiered_config"`
	GroupedTieredPackageConfig       param.Field[interface{}] `json:"grouped_tiered_package_config"`
	GroupedWithMeteredMinimumConfig  param.Field[interface{}] `json:"grouped_with_metered_minimum_config"`
	GroupedWithProratedMinimumConfig param.Field[interface{}] `json:"grouped_with_prorated_minimum_config"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	MatrixConfig                param.Field[shared.MatrixConfigParam]                 `json:"matrix_config"`
	MatrixWithAllocationConfig  param.Field[shared.MatrixWithAllocationConfigParam]   `json:"matrix_with_allocation_config"`
	MatrixWithDisplayNameConfig param.Field[interface{}]                              `json:"matrix_with_display_name_config"`
	MaxGroupTieredPackageConfig param.Field[interface{}]                              `json:"max_group_tiered_package_config"`
	Metadata                    param.Field[interface{}]                              `json:"metadata"`
	PackageConfig               param.Field[shared.PackageConfigParam]                `json:"package_config"`
	PackageWithAllocationConfig param.Field[interface{}]                              `json:"package_with_allocation_config"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID                           param.Field[string]                      `json:"reference_id"`
	ScalableMatrixWithTieredPricingConfig param.Field[interface{}]                 `json:"scalable_matrix_with_tiered_pricing_config"`
	ScalableMatrixWithUnitPricingConfig   param.Field[interface{}]                 `json:"scalable_matrix_with_unit_pricing_config"`
	ThresholdTotalAmountConfig            param.Field[interface{}]                 `json:"threshold_total_amount_config"`
	TieredBPSConfig                       param.Field[shared.TieredBPSConfigParam] `json:"tiered_bps_config"`
	TieredConfig                          param.Field[shared.TieredConfigParam]    `json:"tiered_config"`
	TieredPackageConfig                   param.Field[interface{}]                 `json:"tiered_package_config"`
	TieredPackageWithMinimumConfig        param.Field[interface{}]                 `json:"tiered_package_with_minimum_config"`
	TieredWithMinimumConfig               param.Field[interface{}]                 `json:"tiered_with_minimum_config"`
	TieredWithProrationConfig             param.Field[interface{}]                 `json:"tiered_with_proration_config"`
	UnitConfig                            param.Field[shared.UnitConfigParam]      `json:"unit_config"`
	UnitWithPercentConfig                 param.Field[interface{}]                 `json:"unit_with_percent_config"`
	UnitWithProrationConfig               param.Field[interface{}]                 `json:"unit_with_proration_config"`
}

The definition of a new price to create and add to the subscription.

func (SubscriptionNewParamsReplacePricesPrice) MarshalJSON added in v0.66.0

func (r SubscriptionNewParamsReplacePricesPrice) MarshalJSON() (data []byte, err error)

type SubscriptionNewParamsReplacePricesPriceCadence added in v0.66.0

type SubscriptionNewParamsReplacePricesPriceCadence string

The cadence to bill for this price on.

const (
	SubscriptionNewParamsReplacePricesPriceCadenceAnnual     SubscriptionNewParamsReplacePricesPriceCadence = "annual"
	SubscriptionNewParamsReplacePricesPriceCadenceSemiAnnual SubscriptionNewParamsReplacePricesPriceCadence = "semi_annual"
	SubscriptionNewParamsReplacePricesPriceCadenceMonthly    SubscriptionNewParamsReplacePricesPriceCadence = "monthly"
	SubscriptionNewParamsReplacePricesPriceCadenceQuarterly  SubscriptionNewParamsReplacePricesPriceCadence = "quarterly"
	SubscriptionNewParamsReplacePricesPriceCadenceOneTime    SubscriptionNewParamsReplacePricesPriceCadence = "one_time"
	SubscriptionNewParamsReplacePricesPriceCadenceCustom     SubscriptionNewParamsReplacePricesPriceCadence = "custom"
)

func (SubscriptionNewParamsReplacePricesPriceCadence) IsKnown added in v0.66.0

type SubscriptionNewParamsReplacePricesPriceModelType added in v0.66.0

type SubscriptionNewParamsReplacePricesPriceModelType string
const (
	SubscriptionNewParamsReplacePricesPriceModelTypeUnit                            SubscriptionNewParamsReplacePricesPriceModelType = "unit"
	SubscriptionNewParamsReplacePricesPriceModelTypePackage                         SubscriptionNewParamsReplacePricesPriceModelType = "package"
	SubscriptionNewParamsReplacePricesPriceModelTypeMatrix                          SubscriptionNewParamsReplacePricesPriceModelType = "matrix"
	SubscriptionNewParamsReplacePricesPriceModelTypeTiered                          SubscriptionNewParamsReplacePricesPriceModelType = "tiered"
	SubscriptionNewParamsReplacePricesPriceModelTypeTieredBPS                       SubscriptionNewParamsReplacePricesPriceModelType = "tiered_bps"
	SubscriptionNewParamsReplacePricesPriceModelTypeBPS                             SubscriptionNewParamsReplacePricesPriceModelType = "bps"
	SubscriptionNewParamsReplacePricesPriceModelTypeBulkBPS                         SubscriptionNewParamsReplacePricesPriceModelType = "bulk_bps"
	SubscriptionNewParamsReplacePricesPriceModelTypeBulk                            SubscriptionNewParamsReplacePricesPriceModelType = "bulk"
	SubscriptionNewParamsReplacePricesPriceModelTypeThresholdTotalAmount            SubscriptionNewParamsReplacePricesPriceModelType = "threshold_total_amount"
	SubscriptionNewParamsReplacePricesPriceModelTypeTieredPackage                   SubscriptionNewParamsReplacePricesPriceModelType = "tiered_package"
	SubscriptionNewParamsReplacePricesPriceModelTypeTieredWithMinimum               SubscriptionNewParamsReplacePricesPriceModelType = "tiered_with_minimum"
	SubscriptionNewParamsReplacePricesPriceModelTypeUnitWithPercent                 SubscriptionNewParamsReplacePricesPriceModelType = "unit_with_percent"
	SubscriptionNewParamsReplacePricesPriceModelTypePackageWithAllocation           SubscriptionNewParamsReplacePricesPriceModelType = "package_with_allocation"
	SubscriptionNewParamsReplacePricesPriceModelTypeTieredWithProration             SubscriptionNewParamsReplacePricesPriceModelType = "tiered_with_proration"
	SubscriptionNewParamsReplacePricesPriceModelTypeUnitWithProration               SubscriptionNewParamsReplacePricesPriceModelType = "unit_with_proration"
	SubscriptionNewParamsReplacePricesPriceModelTypeGroupedAllocation               SubscriptionNewParamsReplacePricesPriceModelType = "grouped_allocation"
	SubscriptionNewParamsReplacePricesPriceModelTypeGroupedWithProratedMinimum      SubscriptionNewParamsReplacePricesPriceModelType = "grouped_with_prorated_minimum"
	SubscriptionNewParamsReplacePricesPriceModelTypeBulkWithProration               SubscriptionNewParamsReplacePricesPriceModelType = "bulk_with_proration"
	SubscriptionNewParamsReplacePricesPriceModelTypeScalableMatrixWithUnitPricing   SubscriptionNewParamsReplacePricesPriceModelType = "scalable_matrix_with_unit_pricing"
	SubscriptionNewParamsReplacePricesPriceModelTypeScalableMatrixWithTieredPricing SubscriptionNewParamsReplacePricesPriceModelType = "scalable_matrix_with_tiered_pricing"
	SubscriptionNewParamsReplacePricesPriceModelTypeCumulativeGroupedBulk           SubscriptionNewParamsReplacePricesPriceModelType = "cumulative_grouped_bulk"
	SubscriptionNewParamsReplacePricesPriceModelTypeMaxGroupTieredPackage           SubscriptionNewParamsReplacePricesPriceModelType = "max_group_tiered_package"
	SubscriptionNewParamsReplacePricesPriceModelTypeGroupedWithMeteredMinimum       SubscriptionNewParamsReplacePricesPriceModelType = "grouped_with_metered_minimum"
	SubscriptionNewParamsReplacePricesPriceModelTypeMatrixWithDisplayName           SubscriptionNewParamsReplacePricesPriceModelType = "matrix_with_display_name"
	SubscriptionNewParamsReplacePricesPriceModelTypeGroupedTieredPackage            SubscriptionNewParamsReplacePricesPriceModelType = "grouped_tiered_package"
	SubscriptionNewParamsReplacePricesPriceModelTypeMatrixWithAllocation            SubscriptionNewParamsReplacePricesPriceModelType = "matrix_with_allocation"
	SubscriptionNewParamsReplacePricesPriceModelTypeTieredPackageWithMinimum        SubscriptionNewParamsReplacePricesPriceModelType = "tiered_package_with_minimum"
	SubscriptionNewParamsReplacePricesPriceModelTypeGroupedTiered                   SubscriptionNewParamsReplacePricesPriceModelType = "grouped_tiered"
)

func (SubscriptionNewParamsReplacePricesPriceModelType) IsKnown added in v0.66.0

type SubscriptionNewParamsReplacePricesPriceUnion added in v0.66.0

type SubscriptionNewParamsReplacePricesPriceUnion interface {
	// contains filtered or unexported methods
}

The definition of a new price to create and add to the subscription.

Satisfied by NewSubscriptionUnitPriceParam, NewSubscriptionPackagePriceParam, NewSubscriptionMatrixPriceParam, NewSubscriptionTieredPriceParam, NewSubscriptionTieredBPSPriceParam, NewSubscriptionBPSPriceParam, NewSubscriptionBulkBPSPriceParam, NewSubscriptionBulkPriceParam, NewSubscriptionThresholdTotalAmountPriceParam, NewSubscriptionTieredPackagePriceParam, NewSubscriptionTieredWithMinimumPriceParam, NewSubscriptionUnitWithPercentPriceParam, NewSubscriptionPackageWithAllocationPriceParam, NewSubscriptionTierWithProrationPriceParam, NewSubscriptionUnitWithProrationPriceParam, NewSubscriptionGroupedAllocationPriceParam, NewSubscriptionGroupedWithProratedMinimumPriceParam, NewSubscriptionBulkWithProrationPriceParam, NewSubscriptionScalableMatrixWithUnitPricingPriceParam, NewSubscriptionScalableMatrixWithTieredPricingPriceParam, NewSubscriptionCumulativeGroupedBulkPriceParam, NewSubscriptionMaxGroupTieredPackagePriceParam, NewSubscriptionGroupedWithMeteredMinimumPriceParam, NewSubscriptionMatrixWithDisplayNamePriceParam, NewSubscriptionGroupedTieredPackagePriceParam, NewSubscriptionMatrixWithAllocationPriceParam, NewSubscriptionTieredPackageWithMinimumPriceParam, NewSubscriptionGroupedTieredPriceParam, SubscriptionNewParamsReplacePricesPrice.

type SubscriptionPriceIntervalsParams

type SubscriptionPriceIntervalsParams struct {
	// A list of price intervals to add to the subscription.
	Add param.Field[[]SubscriptionPriceIntervalsParamsAdd] `json:"add"`
	// A list of adjustments to add to the subscription.
	AddAdjustments param.Field[[]SubscriptionPriceIntervalsParamsAddAdjustment] `json:"add_adjustments"`
	// If false, this request will fail if it would void an issued invoice or create a
	// credit note. Consider using this as a safety mechanism if you do not expect
	// existing invoices to be changed.
	AllowInvoiceCreditOrVoid param.Field[bool] `json:"allow_invoice_credit_or_void"`
	// A list of price intervals to edit on the subscription.
	Edit param.Field[[]SubscriptionPriceIntervalsParamsEdit] `json:"edit"`
	// A list of adjustments to edit on the subscription.
	EditAdjustments param.Field[[]SubscriptionPriceIntervalsParamsEditAdjustment] `json:"edit_adjustments"`
}

func (SubscriptionPriceIntervalsParams) MarshalJSON

func (r SubscriptionPriceIntervalsParams) MarshalJSON() (data []byte, err error)

type SubscriptionPriceIntervalsParamsAdd

type SubscriptionPriceIntervalsParamsAdd struct {
	// The start date of the price interval. This is the date that the price will start
	// billing on the subscription.
	StartDate param.Field[SubscriptionPriceIntervalsParamsAddStartDateUnion] `json:"start_date,required" format:"date-time"`
	// The definition of a new allocation price to create and add to the subscription.
	AllocationPrice param.Field[shared.NewAllocationPriceParam] `json:"allocation_price"`
	// A list of discounts to initialize on the price interval.
	Discounts param.Field[[]SubscriptionPriceIntervalsParamsAddDiscountUnion] `json:"discounts"`
	// The end date of the price interval. This is the date that the price will stop
	// billing on the subscription.
	EndDate param.Field[SubscriptionPriceIntervalsParamsAddEndDateUnion] `json:"end_date" format:"date-time"`
	// The external price id of the price to add to the subscription.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// An additional filter to apply to usage queries. This filter must be expressed as
	// a boolean
	// [computed property](/extensibility/advanced-metrics#computed-properties). If
	// null, usage queries will not include any additional filter.
	Filter param.Field[string] `json:"filter"`
	// A list of fixed fee quantity transitions to initialize on the price interval.
	FixedFeeQuantityTransitions param.Field[[]SubscriptionPriceIntervalsParamsAddFixedFeeQuantityTransition] `json:"fixed_fee_quantity_transitions"`
	// The maximum amount that will be billed for this price interval for a given
	// billing period.
	MaximumAmount param.Field[float64] `json:"maximum_amount"`
	// The minimum amount that will be billed for this price interval for a given
	// billing period.
	MinimumAmount param.Field[float64] `json:"minimum_amount"`
	// The definition of a new price to create and add to the subscription.
	Price param.Field[SubscriptionPriceIntervalsParamsAddPriceUnion] `json:"price"`
	// The id of the price to add to the subscription.
	PriceID param.Field[string] `json:"price_id"`
	// A list of customer IDs whose usage events will be aggregated and billed under
	// this subscription. By default, a subscription only considers usage events
	// associated with its attached customer's customer_id. When usage_customer_ids is
	// provided, the subscription includes usage events from the specified customers
	// only. Provided usage_customer_ids must be either the customer for this
	// subscription itself, or any of that customer's children.
	UsageCustomerIDs param.Field[[]string] `json:"usage_customer_ids"`
}

func (SubscriptionPriceIntervalsParamsAdd) MarshalJSON

func (r SubscriptionPriceIntervalsParamsAdd) MarshalJSON() (data []byte, err error)

type SubscriptionPriceIntervalsParamsAddAdjustment added in v0.35.0

type SubscriptionPriceIntervalsParamsAddAdjustment struct {
	// The definition of a new adjustment to create and add to the subscription.
	Adjustment param.Field[SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentUnion] `json:"adjustment,required"`
	// The start date of the adjustment interval. This is the date that the adjustment
	// will start affecting prices on the subscription. The adjustment will apply to
	// invoice dates that overlap with this `start_date`. This `start_date` is treated
	// as inclusive for in-advance prices, and exclusive for in-arrears prices.
	StartDate param.Field[SubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion] `json:"start_date,required" format:"date-time"`
	// The end date of the adjustment interval. This is the date that the adjustment
	// will stop affecting prices on the subscription. The adjustment will apply to
	// invoice dates that overlap with this `end_date`.This `end_date` is treated as
	// exclusive for in-advance prices, and inclusive for in-arrears prices.
	EndDate param.Field[SubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion] `json:"end_date" format:"date-time"`
}

func (SubscriptionPriceIntervalsParamsAddAdjustment) MarshalJSON added in v0.35.0

func (r SubscriptionPriceIntervalsParamsAddAdjustment) MarshalJSON() (data []byte, err error)

type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustment added in v0.35.0

type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustment struct {
	AdjustmentType param.Field[SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType] `json:"adjustment_type,required"`
	AmountDiscount param.Field[string]                                                                 `json:"amount_discount"`
	// If set, the adjustment will apply to every price on the subscription.
	AppliesToAll      param.Field[SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAppliesToAll] `json:"applies_to_all"`
	AppliesToItemIDs  param.Field[interface{}]                                                          `json:"applies_to_item_ids"`
	AppliesToPriceIDs param.Field[interface{}]                                                          `json:"applies_to_price_ids"`
	// If set, only prices in the specified currency will have the adjustment applied.
	Currency param.Field[string]      `json:"currency"`
	Filters  param.Field[interface{}] `json:"filters"`
	// When false, this adjustment will be applied to a single price. Otherwise, it
	// will be applied at the invoice level, possibly to multiple prices.
	IsInvoiceLevel param.Field[bool] `json:"is_invoice_level"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID             param.Field[string]  `json:"item_id"`
	MaximumAmount      param.Field[string]  `json:"maximum_amount"`
	MinimumAmount      param.Field[string]  `json:"minimum_amount"`
	PercentageDiscount param.Field[float64] `json:"percentage_discount"`
	// If set, only prices of the specified type will have the adjustment applied.
	PriceType     param.Field[SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentPriceType] `json:"price_type"`
	UsageDiscount param.Field[float64]                                                           `json:"usage_discount"`
}

The definition of a new adjustment to create and add to the subscription.

func (SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustment) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentUnion added in v0.121.0

func (r SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustment) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentUnion()

func (SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustment) MarshalJSON added in v0.35.0

type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType added in v0.35.0

type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType string
const (
	SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentTypePercentageDiscount SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType = "percentage_discount"
	SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentTypeUsageDiscount      SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType = "usage_discount"
	SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentTypeAmountDiscount     SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType = "amount_discount"
	SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentTypeMinimum            SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType = "minimum"
	SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentTypeMaximum            SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType = "maximum"
)

func (SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType) IsKnown added in v0.35.0

type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAppliesToAll added in v0.120.0

type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAppliesToAll bool

If set, the adjustment will apply to every price on the subscription.

const (
	SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAppliesToAllTrue SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAppliesToAll = true
)

func (SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAppliesToAll) IsKnown added in v0.120.0

type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentPriceType added in v0.120.0

type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentPriceType string

If set, only prices of the specified type will have the adjustment applied.

const (
	SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentPriceTypeUsage          SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentPriceType = "usage"
	SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentPriceTypeFixedInAdvance SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentPriceType = "fixed_in_advance"
	SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentPriceTypeFixedInArrears SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentPriceType = "fixed_in_arrears"
	SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentPriceTypeFixed          SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentPriceType = "fixed"
	SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentPriceTypeInArrears      SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentPriceType = "in_arrears"
)

func (SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentPriceType) IsKnown added in v0.120.0

type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentUnion added in v0.35.0

type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentUnion interface {
	ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentUnion()
}

The definition of a new adjustment to create and add to the subscription.

Satisfied by shared.NewPercentageDiscountParam, shared.NewUsageDiscountParam, shared.NewAmountDiscountParam, shared.NewMinimumParam, shared.NewMaximumParam, SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustment.

type SubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion added in v0.35.0

type SubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion interface {
	ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion()
}

The end date of the adjustment interval. This is the date that the adjustment will stop affecting prices on the subscription. The adjustment will apply to invoice dates that overlap with this `end_date`.This `end_date` is treated as exclusive for in-advance prices, and inclusive for in-arrears prices.

Satisfied by shared.UnionTime, shared.BillingCycleRelativeDate.

type SubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion added in v0.35.0

type SubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion interface {
	ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion()
}

The start date of the adjustment interval. This is the date that the adjustment will start affecting prices on the subscription. The adjustment will apply to invoice dates that overlap with this `start_date`. This `start_date` is treated as inclusive for in-advance prices, and exclusive for in-arrears prices.

Satisfied by shared.UnionTime, shared.BillingCycleRelativeDate.

type SubscriptionPriceIntervalsParamsAddDiscount

type SubscriptionPriceIntervalsParamsAddDiscount struct {
	DiscountType param.Field[SubscriptionPriceIntervalsParamsAddDiscountsDiscountType] `json:"discount_type,required"`
	// Only available if discount_type is `amount`.
	AmountDiscount param.Field[float64] `json:"amount_discount"`
	// Only available if discount_type is `percentage`. This is a number between 0
	// and 1.
	PercentageDiscount param.Field[float64] `json:"percentage_discount"`
	// Only available if discount_type is `usage`. Number of usage units that this
	// discount is for.
	UsageDiscount param.Field[float64] `json:"usage_discount"`
}

func (SubscriptionPriceIntervalsParamsAddDiscount) MarshalJSON added in v0.25.0

func (r SubscriptionPriceIntervalsParamsAddDiscount) MarshalJSON() (data []byte, err error)

type SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParams

type SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParams struct {
	// Only available if discount_type is `amount`.
	AmountDiscount param.Field[float64]                                                                              `json:"amount_discount,required"`
	DiscountType   param.Field[SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParamsDiscountType] `json:"discount_type,required"`
}

func (SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParams) MarshalJSON

type SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParamsDiscountType

type SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParamsDiscountType string
const (
	SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParamsDiscountTypeAmount SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParamsDiscountType = "amount"
)

func (SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParamsDiscountType) IsKnown added in v0.24.0

type SubscriptionPriceIntervalsParamsAddDiscountsDiscountType added in v0.25.0

type SubscriptionPriceIntervalsParamsAddDiscountsDiscountType string
const (
	SubscriptionPriceIntervalsParamsAddDiscountsDiscountTypeAmount     SubscriptionPriceIntervalsParamsAddDiscountsDiscountType = "amount"
	SubscriptionPriceIntervalsParamsAddDiscountsDiscountTypePercentage SubscriptionPriceIntervalsParamsAddDiscountsDiscountType = "percentage"
	SubscriptionPriceIntervalsParamsAddDiscountsDiscountTypeUsage      SubscriptionPriceIntervalsParamsAddDiscountsDiscountType = "usage"
)

func (SubscriptionPriceIntervalsParamsAddDiscountsDiscountType) IsKnown added in v0.25.0

type SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParams

type SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParams struct {
	DiscountType param.Field[SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParamsDiscountType] `json:"discount_type,required"`
	// Only available if discount_type is `percentage`. This is a number between 0
	// and 1.
	PercentageDiscount param.Field[float64] `json:"percentage_discount,required"`
}

func (SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParams) MarshalJSON

type SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParamsDiscountType

type SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParamsDiscountType string
const (
	SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParamsDiscountTypePercentage SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParamsDiscountType = "percentage"
)

func (SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParamsDiscountType) IsKnown added in v0.24.0

type SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParams

type SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParams struct {
	DiscountType param.Field[SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParamsDiscountType] `json:"discount_type,required"`
	// Only available if discount_type is `usage`. Number of usage units that this
	// discount is for.
	UsageDiscount param.Field[float64] `json:"usage_discount,required"`
}

func (SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParams) MarshalJSON

type SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParamsDiscountType

type SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParamsDiscountType string
const (
	SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParamsDiscountTypeUsage SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParamsDiscountType = "usage"
)

func (SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParamsDiscountType) IsKnown added in v0.24.0

type SubscriptionPriceIntervalsParamsAddEndDateUnion added in v0.25.0

type SubscriptionPriceIntervalsParamsAddEndDateUnion interface {
	ImplementsSubscriptionPriceIntervalsParamsAddEndDateUnion()
}

The end date of the price interval. This is the date that the price will stop billing on the subscription.

Satisfied by shared.UnionTime, shared.BillingCycleRelativeDate.

type SubscriptionPriceIntervalsParamsAddFixedFeeQuantityTransition

type SubscriptionPriceIntervalsParamsAddFixedFeeQuantityTransition struct {
	// The date that the fixed fee quantity transition should take effect.
	EffectiveDate param.Field[time.Time] `json:"effective_date,required" format:"date-time"`
	// The quantity of the fixed fee quantity transition.
	Quantity param.Field[int64] `json:"quantity,required"`
}

func (SubscriptionPriceIntervalsParamsAddFixedFeeQuantityTransition) MarshalJSON

type SubscriptionPriceIntervalsParamsAddPrice

type SubscriptionPriceIntervalsParamsAddPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                            `json:"item_id,required"`
	ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	BPSConfig                 param.Field[shared.BPSConfigParam]                    `json:"bps_config"`
	BulkBPSConfig             param.Field[shared.BulkBPSConfigParam]                `json:"bulk_bps_config"`
	BulkConfig                param.Field[shared.BulkConfigParam]                   `json:"bulk_config"`
	BulkWithProrationConfig   param.Field[interface{}]                              `json:"bulk_with_proration_config"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate              param.Field[float64]     `json:"conversion_rate"`
	ConversionRateConfig        param.Field[interface{}] `json:"conversion_rate_config"`
	CumulativeGroupedBulkConfig param.Field[interface{}] `json:"cumulative_grouped_bulk_config"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity               param.Field[float64]     `json:"fixed_price_quantity"`
	GroupedAllocationConfig          param.Field[interface{}] `json:"grouped_allocation_config"`
	GroupedTieredConfig              param.Field[interface{}] `json:"grouped_tiered_config"`
	GroupedTieredPackageConfig       param.Field[interface{}] `json:"grouped_tiered_package_config"`
	GroupedWithMeteredMinimumConfig  param.Field[interface{}] `json:"grouped_with_metered_minimum_config"`
	GroupedWithProratedMinimumConfig param.Field[interface{}] `json:"grouped_with_prorated_minimum_config"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration           param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	MatrixConfig                          param.Field[shared.MatrixConfigParam]                 `json:"matrix_config"`
	MatrixWithAllocationConfig            param.Field[shared.MatrixWithAllocationConfigParam]   `json:"matrix_with_allocation_config"`
	MatrixWithDisplayNameConfig           param.Field[interface{}]                              `json:"matrix_with_display_name_config"`
	MaxGroupTieredPackageConfig           param.Field[interface{}]                              `json:"max_group_tiered_package_config"`
	Metadata                              param.Field[interface{}]                              `json:"metadata"`
	PackageConfig                         param.Field[shared.PackageConfigParam]                `json:"package_config"`
	PackageWithAllocationConfig           param.Field[interface{}]                              `json:"package_with_allocation_config"`
	ScalableMatrixWithTieredPricingConfig param.Field[interface{}]                              `json:"scalable_matrix_with_tiered_pricing_config"`
	ScalableMatrixWithUnitPricingConfig   param.Field[interface{}]                              `json:"scalable_matrix_with_unit_pricing_config"`
	ThresholdTotalAmountConfig            param.Field[interface{}]                              `json:"threshold_total_amount_config"`
	TieredBPSConfig                       param.Field[shared.TieredBPSConfigParam]              `json:"tiered_bps_config"`
	TieredConfig                          param.Field[shared.TieredConfigParam]                 `json:"tiered_config"`
	TieredPackageConfig                   param.Field[interface{}]                              `json:"tiered_package_config"`
	TieredPackageWithMinimumConfig        param.Field[interface{}]                              `json:"tiered_package_with_minimum_config"`
	TieredWithMinimumConfig               param.Field[interface{}]                              `json:"tiered_with_minimum_config"`
	TieredWithProrationConfig             param.Field[interface{}]                              `json:"tiered_with_proration_config"`
	UnitConfig                            param.Field[shared.UnitConfigParam]                   `json:"unit_config"`
	UnitWithPercentConfig                 param.Field[interface{}]                              `json:"unit_with_percent_config"`
	UnitWithProrationConfig               param.Field[interface{}]                              `json:"unit_with_proration_config"`
}

The definition of a new price to create and add to the subscription.

func (SubscriptionPriceIntervalsParamsAddPrice) ImplementsSubscriptionPriceIntervalsParamsAddPriceUnion added in v0.121.0

func (r SubscriptionPriceIntervalsParamsAddPrice) ImplementsSubscriptionPriceIntervalsParamsAddPriceUnion()

func (SubscriptionPriceIntervalsParamsAddPrice) MarshalJSON added in v0.25.0

func (r SubscriptionPriceIntervalsParamsAddPrice) MarshalJSON() (data []byte, err error)

type SubscriptionPriceIntervalsParamsAddPriceCadence added in v0.25.0

type SubscriptionPriceIntervalsParamsAddPriceCadence string

The cadence to bill for this price on.

const (
	SubscriptionPriceIntervalsParamsAddPriceCadenceAnnual     SubscriptionPriceIntervalsParamsAddPriceCadence = "annual"
	SubscriptionPriceIntervalsParamsAddPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceCadence = "semi_annual"
	SubscriptionPriceIntervalsParamsAddPriceCadenceMonthly    SubscriptionPriceIntervalsParamsAddPriceCadence = "monthly"
	SubscriptionPriceIntervalsParamsAddPriceCadenceQuarterly  SubscriptionPriceIntervalsParamsAddPriceCadence = "quarterly"
	SubscriptionPriceIntervalsParamsAddPriceCadenceOneTime    SubscriptionPriceIntervalsParamsAddPriceCadence = "one_time"
	SubscriptionPriceIntervalsParamsAddPriceCadenceCustom     SubscriptionPriceIntervalsParamsAddPriceCadence = "custom"
)

func (SubscriptionPriceIntervalsParamsAddPriceCadence) IsKnown added in v0.25.0

type SubscriptionPriceIntervalsParamsAddPriceModelType added in v0.25.0

type SubscriptionPriceIntervalsParamsAddPriceModelType string
const (
	SubscriptionPriceIntervalsParamsAddPriceModelTypeUnit                            SubscriptionPriceIntervalsParamsAddPriceModelType = "unit"
	SubscriptionPriceIntervalsParamsAddPriceModelTypePackage                         SubscriptionPriceIntervalsParamsAddPriceModelType = "package"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeMatrix                          SubscriptionPriceIntervalsParamsAddPriceModelType = "matrix"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeMatrixWithAllocation            SubscriptionPriceIntervalsParamsAddPriceModelType = "matrix_with_allocation"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeTiered                          SubscriptionPriceIntervalsParamsAddPriceModelType = "tiered"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeTieredBPS                       SubscriptionPriceIntervalsParamsAddPriceModelType = "tiered_bps"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeBPS                             SubscriptionPriceIntervalsParamsAddPriceModelType = "bps"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeBulkBPS                         SubscriptionPriceIntervalsParamsAddPriceModelType = "bulk_bps"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeBulk                            SubscriptionPriceIntervalsParamsAddPriceModelType = "bulk"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeThresholdTotalAmount            SubscriptionPriceIntervalsParamsAddPriceModelType = "threshold_total_amount"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeTieredPackage                   SubscriptionPriceIntervalsParamsAddPriceModelType = "tiered_package"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeGroupedTiered                   SubscriptionPriceIntervalsParamsAddPriceModelType = "grouped_tiered"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeMaxGroupTieredPackage           SubscriptionPriceIntervalsParamsAddPriceModelType = "max_group_tiered_package"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeTieredWithMinimum               SubscriptionPriceIntervalsParamsAddPriceModelType = "tiered_with_minimum"
	SubscriptionPriceIntervalsParamsAddPriceModelTypePackageWithAllocation           SubscriptionPriceIntervalsParamsAddPriceModelType = "package_with_allocation"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeTieredPackageWithMinimum        SubscriptionPriceIntervalsParamsAddPriceModelType = "tiered_package_with_minimum"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeUnitWithPercent                 SubscriptionPriceIntervalsParamsAddPriceModelType = "unit_with_percent"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeTieredWithProration             SubscriptionPriceIntervalsParamsAddPriceModelType = "tiered_with_proration"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeUnitWithProration               SubscriptionPriceIntervalsParamsAddPriceModelType = "unit_with_proration"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeGroupedAllocation               SubscriptionPriceIntervalsParamsAddPriceModelType = "grouped_allocation"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeGroupedWithProratedMinimum      SubscriptionPriceIntervalsParamsAddPriceModelType = "grouped_with_prorated_minimum"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeGroupedWithMeteredMinimum       SubscriptionPriceIntervalsParamsAddPriceModelType = "grouped_with_metered_minimum"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeMatrixWithDisplayName           SubscriptionPriceIntervalsParamsAddPriceModelType = "matrix_with_display_name"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeBulkWithProration               SubscriptionPriceIntervalsParamsAddPriceModelType = "bulk_with_proration"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeGroupedTieredPackage            SubscriptionPriceIntervalsParamsAddPriceModelType = "grouped_tiered_package"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeScalableMatrixWithUnitPricing   SubscriptionPriceIntervalsParamsAddPriceModelType = "scalable_matrix_with_unit_pricing"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeScalableMatrixWithTieredPricing SubscriptionPriceIntervalsParamsAddPriceModelType = "scalable_matrix_with_tiered_pricing"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeCumulativeGroupedBulk           SubscriptionPriceIntervalsParamsAddPriceModelType = "cumulative_grouped_bulk"
)

func (SubscriptionPriceIntervalsParamsAddPriceModelType) IsKnown added in v0.25.0

type SubscriptionPriceIntervalsParamsAddPriceUnion added in v0.25.0

type SubscriptionPriceIntervalsParamsAddPriceUnion interface {
	ImplementsSubscriptionPriceIntervalsParamsAddPriceUnion()
}

The definition of a new price to create and add to the subscription.

Satisfied by shared.NewFloatingUnitPriceParam, shared.NewFloatingPackagePriceParam, shared.NewFloatingMatrixPriceParam, shared.NewFloatingMatrixWithAllocationPriceParam, shared.NewFloatingTieredPriceParam, shared.NewFloatingTieredBPSPriceParam, shared.NewFloatingBPSPriceParam, shared.NewFloatingBulkBPSPriceParam, shared.NewFloatingBulkPriceParam, shared.NewFloatingThresholdTotalAmountPriceParam, shared.NewFloatingTieredPackagePriceParam, shared.NewFloatingGroupedTieredPriceParam, shared.NewFloatingMaxGroupTieredPackagePriceParam, shared.NewFloatingTieredWithMinimumPriceParam, shared.NewFloatingPackageWithAllocationPriceParam, shared.NewFloatingTieredPackageWithMinimumPriceParam, shared.NewFloatingUnitWithPercentPriceParam, shared.NewFloatingTieredWithProrationPriceParam, shared.NewFloatingUnitWithProrationPriceParam, shared.NewFloatingGroupedAllocationPriceParam, shared.NewFloatingGroupedWithProratedMinimumPriceParam, shared.NewFloatingGroupedWithMeteredMinimumPriceParam, shared.NewFloatingMatrixWithDisplayNamePriceParam, shared.NewFloatingBulkWithProrationPriceParam, shared.NewFloatingGroupedTieredPackagePriceParam, shared.NewFloatingScalableMatrixWithUnitPricingPriceParam, shared.NewFloatingScalableMatrixWithTieredPricingPriceParam, shared.NewFloatingCumulativeGroupedBulkPriceParam, SubscriptionPriceIntervalsParamsAddPrice.

type SubscriptionPriceIntervalsParamsAddStartDateUnion added in v0.25.0

type SubscriptionPriceIntervalsParamsAddStartDateUnion interface {
	ImplementsSubscriptionPriceIntervalsParamsAddStartDateUnion()
}

The start date of the price interval. This is the date that the price will start billing on the subscription.

Satisfied by shared.UnionTime, shared.BillingCycleRelativeDate.

type SubscriptionPriceIntervalsParamsEdit

type SubscriptionPriceIntervalsParamsEdit struct {
	// The id of the price interval to edit.
	PriceIntervalID param.Field[string] `json:"price_interval_id,required"`
	// The updated billing cycle day for this price interval. If not specified, the
	// billing cycle day will not be updated. Note that overlapping price intervals
	// must have the same billing cycle day.
	BillingCycleDay param.Field[int64] `json:"billing_cycle_day"`
	// The updated end date of this price interval. If not specified, the start date
	// will not be updated.
	EndDate param.Field[SubscriptionPriceIntervalsParamsEditEndDateUnion] `json:"end_date" format:"date-time"`
	// An additional filter to apply to usage queries. This filter must be expressed as
	// a boolean
	// [computed property](/extensibility/advanced-metrics#computed-properties). If
	// null, usage queries will not include any additional filter.
	Filter param.Field[string] `json:"filter"`
	// A list of fixed fee quantity transitions to use for this price interval. Note
	// that this list will overwrite all existing fixed fee quantity transitions on the
	// price interval.
	FixedFeeQuantityTransitions param.Field[[]SubscriptionPriceIntervalsParamsEditFixedFeeQuantityTransition] `json:"fixed_fee_quantity_transitions"`
	// The updated start date of this price interval. If not specified, the start date
	// will not be updated.
	StartDate param.Field[SubscriptionPriceIntervalsParamsEditStartDateUnion] `json:"start_date" format:"date-time"`
	// A list of customer IDs whose usage events will be aggregated and billed under
	// this subscription. By default, a subscription only considers usage events
	// associated with its attached customer's customer_id. When usage_customer_ids is
	// provided, the subscription includes usage events from the specified customers
	// only. Provided usage_customer_ids must be either the customer for this
	// subscription itself, or any of that customer's children.
	UsageCustomerIDs param.Field[[]string] `json:"usage_customer_ids"`
}

func (SubscriptionPriceIntervalsParamsEdit) MarshalJSON

func (r SubscriptionPriceIntervalsParamsEdit) MarshalJSON() (data []byte, err error)

type SubscriptionPriceIntervalsParamsEditAdjustment added in v0.35.0

type SubscriptionPriceIntervalsParamsEditAdjustment struct {
	// The id of the adjustment interval to edit.
	AdjustmentIntervalID param.Field[string] `json:"adjustment_interval_id,required"`
	// The updated end date of this adjustment interval. If not specified, the start
	// date will not be updated.
	EndDate param.Field[SubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion] `json:"end_date" format:"date-time"`
	// The updated start date of this adjustment interval. If not specified, the start
	// date will not be updated.
	StartDate param.Field[SubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion] `json:"start_date" format:"date-time"`
}

func (SubscriptionPriceIntervalsParamsEditAdjustment) MarshalJSON added in v0.35.0

func (r SubscriptionPriceIntervalsParamsEditAdjustment) MarshalJSON() (data []byte, err error)

type SubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion added in v0.35.0

type SubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion interface {
	ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion()
}

The updated end date of this adjustment interval. If not specified, the start date will not be updated.

Satisfied by shared.UnionTime, shared.BillingCycleRelativeDate.

type SubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion added in v0.35.0

type SubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion interface {
	ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion()
}

The updated start date of this adjustment interval. If not specified, the start date will not be updated.

Satisfied by shared.UnionTime, shared.BillingCycleRelativeDate.

type SubscriptionPriceIntervalsParamsEditEndDateUnion added in v0.25.0

type SubscriptionPriceIntervalsParamsEditEndDateUnion interface {
	ImplementsSubscriptionPriceIntervalsParamsEditEndDateUnion()
}

The updated end date of this price interval. If not specified, the start date will not be updated.

Satisfied by shared.UnionTime, shared.BillingCycleRelativeDate.

type SubscriptionPriceIntervalsParamsEditFixedFeeQuantityTransition

type SubscriptionPriceIntervalsParamsEditFixedFeeQuantityTransition struct {
	// The date that the fixed fee quantity transition should take effect.
	EffectiveDate param.Field[time.Time] `json:"effective_date,required" format:"date-time"`
	// The quantity of the fixed fee quantity transition.
	Quantity param.Field[int64] `json:"quantity,required"`
}

func (SubscriptionPriceIntervalsParamsEditFixedFeeQuantityTransition) MarshalJSON

type SubscriptionPriceIntervalsParamsEditStartDateUnion added in v0.25.0

type SubscriptionPriceIntervalsParamsEditStartDateUnion interface {
	ImplementsSubscriptionPriceIntervalsParamsEditStartDateUnion()
}

The updated start date of this price interval. If not specified, the start date will not be updated.

Satisfied by shared.UnionTime, shared.BillingCycleRelativeDate.

type SubscriptionRedeemCouponParams added in v0.118.0

type SubscriptionRedeemCouponParams struct {
	ChangeOption param.Field[SubscriptionRedeemCouponParamsChangeOption] `json:"change_option,required"`
	// If false, this request will fail if it would void an issued invoice or create a
	// credit note. Consider using this as a safety mechanism if you do not expect
	// existing invoices to be changed.
	AllowInvoiceCreditOrVoid param.Field[bool] `json:"allow_invoice_credit_or_void"`
	// The date that the coupon discount should take effect. This parameter can only be
	// passed if the `change_option` is `requested_date`.
	ChangeDate param.Field[time.Time] `json:"change_date" format:"date-time"`
	// Coupon ID to be redeemed for this subscription.
	CouponID param.Field[string] `json:"coupon_id"`
	// Redemption code of the coupon to be redeemed for this subscription.
	CouponRedemptionCode param.Field[string] `json:"coupon_redemption_code"`
}

func (SubscriptionRedeemCouponParams) MarshalJSON added in v0.118.0

func (r SubscriptionRedeemCouponParams) MarshalJSON() (data []byte, err error)

type SubscriptionRedeemCouponParamsChangeOption added in v0.118.0

type SubscriptionRedeemCouponParamsChangeOption string
const (
	SubscriptionRedeemCouponParamsChangeOptionRequestedDate         SubscriptionRedeemCouponParamsChangeOption = "requested_date"
	SubscriptionRedeemCouponParamsChangeOptionEndOfSubscriptionTerm SubscriptionRedeemCouponParamsChangeOption = "end_of_subscription_term"
	SubscriptionRedeemCouponParamsChangeOptionImmediate             SubscriptionRedeemCouponParamsChangeOption = "immediate"
)

func (SubscriptionRedeemCouponParamsChangeOption) IsKnown added in v0.118.0

type SubscriptionSchedulePlanChangeParams

type SubscriptionSchedulePlanChangeParams struct {
	ChangeOption param.Field[SubscriptionSchedulePlanChangeParamsChangeOption] `json:"change_option,required"`
	// Additional adjustments to be added to the subscription. (Only available for
	// accounts that have migrated off of legacy subscription overrides)
	AddAdjustments param.Field[[]SubscriptionSchedulePlanChangeParamsAddAdjustment] `json:"add_adjustments"`
	// Additional prices to be added to the subscription. (Only available for accounts
	// that have migrated off of legacy subscription overrides)
	AddPrices param.Field[[]SubscriptionSchedulePlanChangeParamsAddPrice] `json:"add_prices"`
	// [DEPRECATED] Use billing_cycle_alignment instead. Reset billing periods to be
	// aligned with the plan change's effective date.
	AlignBillingWithPlanChangeDate param.Field[bool] `json:"align_billing_with_plan_change_date"`
	// Determines whether issued invoices for this subscription will automatically be
	// charged with the saved payment method on the due date. If not specified, this
	// defaults to the behavior configured for this customer.
	AutoCollection param.Field[bool] `json:"auto_collection"`
	// Reset billing periods to be aligned with the plan change's effective date or
	// start of the month. Defaults to `unchanged` which keeps subscription's existing
	// billing cycle alignment.
	BillingCycleAlignment           param.Field[SubscriptionSchedulePlanChangeParamsBillingCycleAlignment] `json:"billing_cycle_alignment"`
	BillingCycleAnchorConfiguration param.Field[shared.BillingCycleAnchorConfigurationParam]               `json:"billing_cycle_anchor_configuration"`
	// The date that the plan change should take effect. This parameter can only be
	// passed if the `change_option` is `requested_date`. If a date with no time is
	// passed, the plan change will happen at midnight in the customer's timezone.
	ChangeDate param.Field[time.Time] `json:"change_date" format:"date-time"`
	// Redemption code to be used for this subscription. If the coupon cannot be found
	// by its redemption code, or cannot be redeemed, an error response will be
	// returned and the subscription creation or plan change will not be scheduled.
	CouponRedemptionCode param.Field[string]  `json:"coupon_redemption_code"`
	CreditsOverageRate   param.Field[float64] `json:"credits_overage_rate"`
	// Determines the default memo on this subscription's invoices. Note that if this
	// is not provided, it is determined by the plan configuration.
	DefaultInvoiceMemo param.Field[string] `json:"default_invoice_memo"`
	// The external_plan_id of the plan that the given subscription should be switched
	// to. Note that either this property or `plan_id` must be specified.
	ExternalPlanID param.Field[string] `json:"external_plan_id"`
	// An additional filter to apply to usage queries. This filter must be expressed as
	// a boolean
	// [computed property](/extensibility/advanced-metrics#computed-properties). If
	// null, usage queries will not include any additional filter.
	Filter param.Field[string] `json:"filter"`
	// The phase of the plan to start with
	InitialPhaseOrder param.Field[int64] `json:"initial_phase_order"`
	// When this subscription's accrued usage reaches this threshold, an invoice will
	// be issued for the subscription. If not specified, invoices will only be issued
	// at the end of the billing period.
	InvoicingThreshold param.Field[string] `json:"invoicing_threshold"`
	// The net terms determines the difference between the invoice date and the issue
	// date for the invoice. If you intend the invoice to be due on issue, set this
	// to 0. If not provided, this defaults to the value specified in the plan.
	NetTerms               param.Field[int64]   `json:"net_terms"`
	PerCreditOverageAmount param.Field[float64] `json:"per_credit_overage_amount"`
	// The plan that the given subscription should be switched to. Note that either
	// this property or `external_plan_id` must be specified.
	PlanID param.Field[string] `json:"plan_id"`
	// Specifies which version of the plan to change to. If null, the default version
	// will be used.
	PlanVersionNumber param.Field[int64] `json:"plan_version_number"`
	// Optionally provide a list of overrides for prices on the plan
	PriceOverrides param.Field[[]interface{}] `json:"price_overrides"`
	// Plan adjustments to be removed from the subscription. (Only available for
	// accounts that have migrated off of legacy subscription overrides)
	RemoveAdjustments param.Field[[]SubscriptionSchedulePlanChangeParamsRemoveAdjustment] `json:"remove_adjustments"`
	// Plan prices to be removed from the subscription. (Only available for accounts
	// that have migrated off of legacy subscription overrides)
	RemovePrices param.Field[[]SubscriptionSchedulePlanChangeParamsRemovePrice] `json:"remove_prices"`
	// Plan adjustments to be replaced with additional adjustments on the subscription.
	// (Only available for accounts that have migrated off of legacy subscription
	// overrides)
	ReplaceAdjustments param.Field[[]SubscriptionSchedulePlanChangeParamsReplaceAdjustment] `json:"replace_adjustments"`
	// Plan prices to be replaced with additional prices on the subscription. (Only
	// available for accounts that have migrated off of legacy subscription overrides)
	ReplacePrices param.Field[[]SubscriptionSchedulePlanChangeParamsReplacePrice] `json:"replace_prices"`
	// The duration of the trial period in days. If not provided, this defaults to the
	// value specified in the plan. If `0` is provided, the trial on the plan will be
	// skipped.
	TrialDurationDays param.Field[int64] `json:"trial_duration_days"`
	// A list of customer IDs whose usage events will be aggregated and billed under
	// this subscription. By default, a subscription only considers usage events
	// associated with its attached customer's customer_id. When usage_customer_ids is
	// provided, the subscription includes usage events from the specified customers
	// only. Provided usage_customer_ids must be either the customer for this
	// subscription itself, or any of that customer's children.
	UsageCustomerIDs param.Field[[]string] `json:"usage_customer_ids"`
}

func (SubscriptionSchedulePlanChangeParams) MarshalJSON

func (r SubscriptionSchedulePlanChangeParams) MarshalJSON() (data []byte, err error)

type SubscriptionSchedulePlanChangeParamsAddAdjustment added in v0.68.0

type SubscriptionSchedulePlanChangeParamsAddAdjustment struct {
	// The definition of a new adjustment to create and add to the subscription.
	Adjustment param.Field[SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentUnion] `json:"adjustment,required"`
	// The end date of the adjustment interval. This is the date that the adjustment
	// will stop affecting prices on the subscription.
	EndDate param.Field[time.Time] `json:"end_date" format:"date-time"`
	// The phase to add this adjustment to.
	PlanPhaseOrder param.Field[int64] `json:"plan_phase_order"`
	// The start date of the adjustment interval. This is the date that the adjustment
	// will start affecting prices on the subscription. If null, the adjustment will
	// start when the phase or subscription starts.
	StartDate param.Field[time.Time] `json:"start_date" format:"date-time"`
}

func (SubscriptionSchedulePlanChangeParamsAddAdjustment) MarshalJSON added in v0.68.0

func (r SubscriptionSchedulePlanChangeParamsAddAdjustment) MarshalJSON() (data []byte, err error)

type SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustment added in v0.68.0

type SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustment struct {
	AdjustmentType param.Field[SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAdjustmentType] `json:"adjustment_type,required"`
	AmountDiscount param.Field[string]                                                                     `json:"amount_discount"`
	// If set, the adjustment will apply to every price on the subscription.
	AppliesToAll      param.Field[SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAppliesToAll] `json:"applies_to_all"`
	AppliesToItemIDs  param.Field[interface{}]                                                              `json:"applies_to_item_ids"`
	AppliesToPriceIDs param.Field[interface{}]                                                              `json:"applies_to_price_ids"`
	// If set, only prices in the specified currency will have the adjustment applied.
	Currency param.Field[string]      `json:"currency"`
	Filters  param.Field[interface{}] `json:"filters"`
	// When false, this adjustment will be applied to a single price. Otherwise, it
	// will be applied at the invoice level, possibly to multiple prices.
	IsInvoiceLevel param.Field[bool] `json:"is_invoice_level"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID             param.Field[string]  `json:"item_id"`
	MaximumAmount      param.Field[string]  `json:"maximum_amount"`
	MinimumAmount      param.Field[string]  `json:"minimum_amount"`
	PercentageDiscount param.Field[float64] `json:"percentage_discount"`
	// If set, only prices of the specified type will have the adjustment applied.
	PriceType     param.Field[SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentPriceType] `json:"price_type"`
	UsageDiscount param.Field[float64]                                                               `json:"usage_discount"`
}

The definition of a new adjustment to create and add to the subscription.

func (SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustment) ImplementsSubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentUnion added in v0.121.0

func (r SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustment) ImplementsSubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentUnion()

func (SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustment) MarshalJSON added in v0.68.0

type SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAdjustmentType added in v0.68.0

type SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAdjustmentType string
const (
	SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAdjustmentTypePercentageDiscount SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAdjustmentType = "percentage_discount"
	SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAdjustmentTypeUsageDiscount      SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAdjustmentType = "usage_discount"
	SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAdjustmentTypeAmountDiscount     SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAdjustmentType = "amount_discount"
	SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAdjustmentTypeMinimum            SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAdjustmentType = "minimum"
	SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAdjustmentTypeMaximum            SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAdjustmentType = "maximum"
)

func (SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAdjustmentType) IsKnown added in v0.68.0

type SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAppliesToAll added in v0.120.0

type SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAppliesToAll bool

If set, the adjustment will apply to every price on the subscription.

const (
	SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAppliesToAllTrue SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAppliesToAll = true
)

func (SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentAppliesToAll) IsKnown added in v0.120.0

type SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentPriceType added in v0.120.0

type SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentPriceType string

If set, only prices of the specified type will have the adjustment applied.

const (
	SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentPriceTypeUsage          SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentPriceType = "usage"
	SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentPriceTypeFixedInAdvance SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentPriceType = "fixed_in_advance"
	SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentPriceTypeFixedInArrears SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentPriceType = "fixed_in_arrears"
	SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentPriceTypeFixed          SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentPriceType = "fixed"
	SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentPriceTypeInArrears      SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentPriceType = "in_arrears"
)

func (SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentPriceType) IsKnown added in v0.120.0

type SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentUnion added in v0.68.0

type SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentUnion interface {
	ImplementsSubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustmentUnion()
}

The definition of a new adjustment to create and add to the subscription.

Satisfied by shared.NewPercentageDiscountParam, shared.NewUsageDiscountParam, shared.NewAmountDiscountParam, shared.NewMinimumParam, shared.NewMaximumParam, SubscriptionSchedulePlanChangeParamsAddAdjustmentsAdjustment.

type SubscriptionSchedulePlanChangeParamsAddPrice added in v0.68.0

type SubscriptionSchedulePlanChangeParamsAddPrice struct {
	// The definition of a new allocation price to create and add to the subscription.
	AllocationPrice param.Field[shared.NewAllocationPriceParam] `json:"allocation_price"`
	// [DEPRECATED] Use add_adjustments instead. The subscription's discounts for this
	// price.
	//
	// Deprecated: deprecated
	Discounts param.Field[[]DiscountOverrideParam] `json:"discounts"`
	// The end date of the price interval. This is the date that the price will stop
	// billing on the subscription. If null, billing will end when the phase or
	// subscription ends.
	EndDate param.Field[time.Time] `json:"end_date" format:"date-time"`
	// The external price id of the price to add to the subscription.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for
	// this price.
	//
	// Deprecated: deprecated
	MaximumAmount param.Field[string] `json:"maximum_amount"`
	// [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for
	// this price.
	//
	// Deprecated: deprecated
	MinimumAmount param.Field[string] `json:"minimum_amount"`
	// The phase to add this price to.
	PlanPhaseOrder param.Field[int64] `json:"plan_phase_order"`
	// The definition of a new price to create and add to the subscription.
	Price param.Field[SubscriptionSchedulePlanChangeParamsAddPricesPriceUnion] `json:"price"`
	// The id of the price to add to the subscription.
	PriceID param.Field[string] `json:"price_id"`
	// The start date of the price interval. This is the date that the price will start
	// billing on the subscription. If null, billing will start when the phase or
	// subscription starts.
	StartDate param.Field[time.Time] `json:"start_date" format:"date-time"`
}

func (SubscriptionSchedulePlanChangeParamsAddPrice) MarshalJSON added in v0.68.0

func (r SubscriptionSchedulePlanChangeParamsAddPrice) MarshalJSON() (data []byte, err error)

type SubscriptionSchedulePlanChangeParamsAddPricesPrice added in v0.68.0

type SubscriptionSchedulePlanChangeParamsAddPricesPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[SubscriptionSchedulePlanChangeParamsAddPricesPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                      `json:"item_id,required"`
	ModelType param.Field[SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	BPSConfig                 param.Field[shared.BPSConfigParam]                    `json:"bps_config"`
	BulkBPSConfig             param.Field[shared.BulkBPSConfigParam]                `json:"bulk_bps_config"`
	BulkConfig                param.Field[shared.BulkConfigParam]                   `json:"bulk_config"`
	BulkWithProrationConfig   param.Field[interface{}]                              `json:"bulk_with_proration_config"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate              param.Field[float64]     `json:"conversion_rate"`
	ConversionRateConfig        param.Field[interface{}] `json:"conversion_rate_config"`
	CumulativeGroupedBulkConfig param.Field[interface{}] `json:"cumulative_grouped_bulk_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity               param.Field[float64]     `json:"fixed_price_quantity"`
	GroupedAllocationConfig          param.Field[interface{}] `json:"grouped_allocation_config"`
	GroupedTieredConfig              param.Field[interface{}] `json:"grouped_tiered_config"`
	GroupedTieredPackageConfig       param.Field[interface{}] `json:"grouped_tiered_package_config"`
	GroupedWithMeteredMinimumConfig  param.Field[interface{}] `json:"grouped_with_metered_minimum_config"`
	GroupedWithProratedMinimumConfig param.Field[interface{}] `json:"grouped_with_prorated_minimum_config"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	MatrixConfig                param.Field[shared.MatrixConfigParam]                 `json:"matrix_config"`
	MatrixWithAllocationConfig  param.Field[shared.MatrixWithAllocationConfigParam]   `json:"matrix_with_allocation_config"`
	MatrixWithDisplayNameConfig param.Field[interface{}]                              `json:"matrix_with_display_name_config"`
	MaxGroupTieredPackageConfig param.Field[interface{}]                              `json:"max_group_tiered_package_config"`
	Metadata                    param.Field[interface{}]                              `json:"metadata"`
	PackageConfig               param.Field[shared.PackageConfigParam]                `json:"package_config"`
	PackageWithAllocationConfig param.Field[interface{}]                              `json:"package_with_allocation_config"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID                           param.Field[string]                      `json:"reference_id"`
	ScalableMatrixWithTieredPricingConfig param.Field[interface{}]                 `json:"scalable_matrix_with_tiered_pricing_config"`
	ScalableMatrixWithUnitPricingConfig   param.Field[interface{}]                 `json:"scalable_matrix_with_unit_pricing_config"`
	ThresholdTotalAmountConfig            param.Field[interface{}]                 `json:"threshold_total_amount_config"`
	TieredBPSConfig                       param.Field[shared.TieredBPSConfigParam] `json:"tiered_bps_config"`
	TieredConfig                          param.Field[shared.TieredConfigParam]    `json:"tiered_config"`
	TieredPackageConfig                   param.Field[interface{}]                 `json:"tiered_package_config"`
	TieredPackageWithMinimumConfig        param.Field[interface{}]                 `json:"tiered_package_with_minimum_config"`
	TieredWithMinimumConfig               param.Field[interface{}]                 `json:"tiered_with_minimum_config"`
	TieredWithProrationConfig             param.Field[interface{}]                 `json:"tiered_with_proration_config"`
	UnitConfig                            param.Field[shared.UnitConfigParam]      `json:"unit_config"`
	UnitWithPercentConfig                 param.Field[interface{}]                 `json:"unit_with_percent_config"`
	UnitWithProrationConfig               param.Field[interface{}]                 `json:"unit_with_proration_config"`
}

The definition of a new price to create and add to the subscription.

func (SubscriptionSchedulePlanChangeParamsAddPricesPrice) MarshalJSON added in v0.68.0

func (r SubscriptionSchedulePlanChangeParamsAddPricesPrice) MarshalJSON() (data []byte, err error)

type SubscriptionSchedulePlanChangeParamsAddPricesPriceCadence added in v0.68.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceCadence string

The cadence to bill for this price on.

const (
	SubscriptionSchedulePlanChangeParamsAddPricesPriceCadenceAnnual     SubscriptionSchedulePlanChangeParamsAddPricesPriceCadence = "annual"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceCadenceSemiAnnual SubscriptionSchedulePlanChangeParamsAddPricesPriceCadence = "semi_annual"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceCadenceMonthly    SubscriptionSchedulePlanChangeParamsAddPricesPriceCadence = "monthly"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceCadenceQuarterly  SubscriptionSchedulePlanChangeParamsAddPricesPriceCadence = "quarterly"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceCadenceOneTime    SubscriptionSchedulePlanChangeParamsAddPricesPriceCadence = "one_time"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceCadenceCustom     SubscriptionSchedulePlanChangeParamsAddPricesPriceCadence = "custom"
)

func (SubscriptionSchedulePlanChangeParamsAddPricesPriceCadence) IsKnown added in v0.68.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType added in v0.68.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType string
const (
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeUnit                            SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "unit"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypePackage                         SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "package"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeMatrix                          SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "matrix"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeTiered                          SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "tiered"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeTieredBPS                       SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "tiered_bps"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeBPS                             SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "bps"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeBulkBPS                         SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "bulk_bps"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeBulk                            SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "bulk"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeThresholdTotalAmount            SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "threshold_total_amount"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeTieredPackage                   SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "tiered_package"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeTieredWithMinimum               SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "tiered_with_minimum"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeUnitWithPercent                 SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "unit_with_percent"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypePackageWithAllocation           SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "package_with_allocation"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeTieredWithProration             SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "tiered_with_proration"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeUnitWithProration               SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "unit_with_proration"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeGroupedAllocation               SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "grouped_allocation"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeGroupedWithProratedMinimum      SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "grouped_with_prorated_minimum"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeBulkWithProration               SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "bulk_with_proration"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeScalableMatrixWithUnitPricing   SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "scalable_matrix_with_unit_pricing"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeScalableMatrixWithTieredPricing SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "scalable_matrix_with_tiered_pricing"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeCumulativeGroupedBulk           SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "cumulative_grouped_bulk"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeMaxGroupTieredPackage           SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "max_group_tiered_package"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeGroupedWithMeteredMinimum       SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "grouped_with_metered_minimum"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeMatrixWithDisplayName           SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "matrix_with_display_name"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeGroupedTieredPackage            SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "grouped_tiered_package"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeMatrixWithAllocation            SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "matrix_with_allocation"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeTieredPackageWithMinimum        SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "tiered_package_with_minimum"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeGroupedTiered                   SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "grouped_tiered"
)

func (SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType) IsKnown added in v0.68.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceUnion added in v0.68.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceUnion interface {
	// contains filtered or unexported methods
}

The definition of a new price to create and add to the subscription.

Satisfied by NewSubscriptionUnitPriceParam, NewSubscriptionPackagePriceParam, NewSubscriptionMatrixPriceParam, NewSubscriptionTieredPriceParam, NewSubscriptionTieredBPSPriceParam, NewSubscriptionBPSPriceParam, NewSubscriptionBulkBPSPriceParam, NewSubscriptionBulkPriceParam, NewSubscriptionThresholdTotalAmountPriceParam, NewSubscriptionTieredPackagePriceParam, NewSubscriptionTieredWithMinimumPriceParam, NewSubscriptionUnitWithPercentPriceParam, NewSubscriptionPackageWithAllocationPriceParam, NewSubscriptionTierWithProrationPriceParam, NewSubscriptionUnitWithProrationPriceParam, NewSubscriptionGroupedAllocationPriceParam, NewSubscriptionGroupedWithProratedMinimumPriceParam, NewSubscriptionBulkWithProrationPriceParam, NewSubscriptionScalableMatrixWithUnitPricingPriceParam, NewSubscriptionScalableMatrixWithTieredPricingPriceParam, NewSubscriptionCumulativeGroupedBulkPriceParam, NewSubscriptionMaxGroupTieredPackagePriceParam, NewSubscriptionGroupedWithMeteredMinimumPriceParam, NewSubscriptionMatrixWithDisplayNamePriceParam, NewSubscriptionGroupedTieredPackagePriceParam, NewSubscriptionMatrixWithAllocationPriceParam, NewSubscriptionTieredPackageWithMinimumPriceParam, NewSubscriptionGroupedTieredPriceParam, SubscriptionSchedulePlanChangeParamsAddPricesPrice.

type SubscriptionSchedulePlanChangeParamsBillingCycleAlignment

type SubscriptionSchedulePlanChangeParamsBillingCycleAlignment string

Reset billing periods to be aligned with the plan change's effective date or start of the month. Defaults to `unchanged` which keeps subscription's existing billing cycle alignment.

const (
	SubscriptionSchedulePlanChangeParamsBillingCycleAlignmentUnchanged      SubscriptionSchedulePlanChangeParamsBillingCycleAlignment = "unchanged"
	SubscriptionSchedulePlanChangeParamsBillingCycleAlignmentPlanChangeDate SubscriptionSchedulePlanChangeParamsBillingCycleAlignment = "plan_change_date"
	SubscriptionSchedulePlanChangeParamsBillingCycleAlignmentStartOfMonth   SubscriptionSchedulePlanChangeParamsBillingCycleAlignment = "start_of_month"
)

func (SubscriptionSchedulePlanChangeParamsBillingCycleAlignment) IsKnown added in v0.24.0

type SubscriptionSchedulePlanChangeParamsChangeOption

type SubscriptionSchedulePlanChangeParamsChangeOption string
const (
	SubscriptionSchedulePlanChangeParamsChangeOptionRequestedDate         SubscriptionSchedulePlanChangeParamsChangeOption = "requested_date"
	SubscriptionSchedulePlanChangeParamsChangeOptionEndOfSubscriptionTerm SubscriptionSchedulePlanChangeParamsChangeOption = "end_of_subscription_term"
	SubscriptionSchedulePlanChangeParamsChangeOptionImmediate             SubscriptionSchedulePlanChangeParamsChangeOption = "immediate"
)

func (SubscriptionSchedulePlanChangeParamsChangeOption) IsKnown added in v0.24.0

type SubscriptionSchedulePlanChangeParamsRemoveAdjustment added in v0.68.0

type SubscriptionSchedulePlanChangeParamsRemoveAdjustment struct {
	// The id of the adjustment to remove on the subscription.
	AdjustmentID param.Field[string] `json:"adjustment_id,required"`
}

func (SubscriptionSchedulePlanChangeParamsRemoveAdjustment) MarshalJSON added in v0.68.0

func (r SubscriptionSchedulePlanChangeParamsRemoveAdjustment) MarshalJSON() (data []byte, err error)

type SubscriptionSchedulePlanChangeParamsRemovePrice added in v0.68.0

type SubscriptionSchedulePlanChangeParamsRemovePrice struct {
	// The external price id of the price to remove on the subscription.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// The id of the price to remove on the subscription.
	PriceID param.Field[string] `json:"price_id"`
}

func (SubscriptionSchedulePlanChangeParamsRemovePrice) MarshalJSON added in v0.68.0

func (r SubscriptionSchedulePlanChangeParamsRemovePrice) MarshalJSON() (data []byte, err error)

type SubscriptionSchedulePlanChangeParamsReplaceAdjustment added in v0.68.0

type SubscriptionSchedulePlanChangeParamsReplaceAdjustment struct {
	// The definition of a new adjustment to create and add to the subscription.
	Adjustment param.Field[SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentUnion] `json:"adjustment,required"`
	// The id of the adjustment on the plan to replace in the subscription.
	ReplacesAdjustmentID param.Field[string] `json:"replaces_adjustment_id,required"`
}

func (SubscriptionSchedulePlanChangeParamsReplaceAdjustment) MarshalJSON added in v0.68.0

type SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustment added in v0.68.0

type SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustment struct {
	AdjustmentType param.Field[SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAdjustmentType] `json:"adjustment_type,required"`
	AmountDiscount param.Field[string]                                                                         `json:"amount_discount"`
	// If set, the adjustment will apply to every price on the subscription.
	AppliesToAll      param.Field[SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAppliesToAll] `json:"applies_to_all"`
	AppliesToItemIDs  param.Field[interface{}]                                                                  `json:"applies_to_item_ids"`
	AppliesToPriceIDs param.Field[interface{}]                                                                  `json:"applies_to_price_ids"`
	// If set, only prices in the specified currency will have the adjustment applied.
	Currency param.Field[string]      `json:"currency"`
	Filters  param.Field[interface{}] `json:"filters"`
	// When false, this adjustment will be applied to a single price. Otherwise, it
	// will be applied at the invoice level, possibly to multiple prices.
	IsInvoiceLevel param.Field[bool] `json:"is_invoice_level"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID             param.Field[string]  `json:"item_id"`
	MaximumAmount      param.Field[string]  `json:"maximum_amount"`
	MinimumAmount      param.Field[string]  `json:"minimum_amount"`
	PercentageDiscount param.Field[float64] `json:"percentage_discount"`
	// If set, only prices of the specified type will have the adjustment applied.
	PriceType     param.Field[SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentPriceType] `json:"price_type"`
	UsageDiscount param.Field[float64]                                                                   `json:"usage_discount"`
}

The definition of a new adjustment to create and add to the subscription.

func (SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustment) ImplementsSubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentUnion added in v0.121.0

func (r SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustment) ImplementsSubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentUnion()

func (SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustment) MarshalJSON added in v0.68.0

type SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAdjustmentType added in v0.68.0

type SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAdjustmentType string
const (
	SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAdjustmentTypePercentageDiscount SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAdjustmentType = "percentage_discount"
	SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAdjustmentTypeUsageDiscount      SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAdjustmentType = "usage_discount"
	SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAdjustmentTypeAmountDiscount     SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAdjustmentType = "amount_discount"
	SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAdjustmentTypeMinimum            SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAdjustmentType = "minimum"
	SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAdjustmentTypeMaximum            SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAdjustmentType = "maximum"
)

func (SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAdjustmentType) IsKnown added in v0.68.0

type SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAppliesToAll added in v0.120.0

type SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAppliesToAll bool

If set, the adjustment will apply to every price on the subscription.

const (
	SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAppliesToAllTrue SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAppliesToAll = true
)

func (SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentAppliesToAll) IsKnown added in v0.120.0

type SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentPriceType added in v0.120.0

type SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentPriceType string

If set, only prices of the specified type will have the adjustment applied.

const (
	SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentPriceTypeUsage          SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentPriceType = "usage"
	SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentPriceTypeFixedInAdvance SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentPriceType = "fixed_in_advance"
	SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentPriceTypeFixedInArrears SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentPriceType = "fixed_in_arrears"
	SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentPriceTypeFixed          SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentPriceType = "fixed"
	SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentPriceTypeInArrears      SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentPriceType = "in_arrears"
)

func (SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentPriceType) IsKnown added in v0.120.0

type SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentUnion added in v0.68.0

type SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentUnion interface {
	ImplementsSubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustmentUnion()
}

The definition of a new adjustment to create and add to the subscription.

Satisfied by shared.NewPercentageDiscountParam, shared.NewUsageDiscountParam, shared.NewAmountDiscountParam, shared.NewMinimumParam, shared.NewMaximumParam, SubscriptionSchedulePlanChangeParamsReplaceAdjustmentsAdjustment.

type SubscriptionSchedulePlanChangeParamsReplacePrice added in v0.68.0

type SubscriptionSchedulePlanChangeParamsReplacePrice struct {
	// The id of the price on the plan to replace in the subscription.
	ReplacesPriceID param.Field[string] `json:"replaces_price_id,required"`
	// The definition of a new allocation price to create and add to the subscription.
	AllocationPrice param.Field[shared.NewAllocationPriceParam] `json:"allocation_price"`
	// [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the
	// replacement price.
	//
	// Deprecated: deprecated
	Discounts param.Field[[]DiscountOverrideParam] `json:"discounts"`
	// The external price id of the price to add to the subscription.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// The new quantity of the price, if the price is a fixed price.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for
	// the replacement price.
	//
	// Deprecated: deprecated
	MaximumAmount param.Field[string] `json:"maximum_amount"`
	// [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for
	// the replacement price.
	//
	// Deprecated: deprecated
	MinimumAmount param.Field[string] `json:"minimum_amount"`
	// The definition of a new price to create and add to the subscription.
	Price param.Field[SubscriptionSchedulePlanChangeParamsReplacePricesPriceUnion] `json:"price"`
	// The id of the price to add to the subscription.
	PriceID param.Field[string] `json:"price_id"`
}

func (SubscriptionSchedulePlanChangeParamsReplacePrice) MarshalJSON added in v0.68.0

func (r SubscriptionSchedulePlanChangeParamsReplacePrice) MarshalJSON() (data []byte, err error)

type SubscriptionSchedulePlanChangeParamsReplacePricesPrice added in v0.68.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[SubscriptionSchedulePlanChangeParamsReplacePricesPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                          `json:"item_id,required"`
	ModelType param.Field[SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"billing_cycle_configuration"`
	BPSConfig                 param.Field[shared.BPSConfigParam]                    `json:"bps_config"`
	BulkBPSConfig             param.Field[shared.BulkBPSConfigParam]                `json:"bulk_bps_config"`
	BulkConfig                param.Field[shared.BulkConfigParam]                   `json:"bulk_config"`
	BulkWithProrationConfig   param.Field[interface{}]                              `json:"bulk_with_proration_config"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate              param.Field[float64]     `json:"conversion_rate"`
	ConversionRateConfig        param.Field[interface{}] `json:"conversion_rate_config"`
	CumulativeGroupedBulkConfig param.Field[interface{}] `json:"cumulative_grouped_bulk_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// For dimensional price: specifies a price group and dimension values
	DimensionalPriceConfiguration param.Field[shared.NewDimensionalPriceConfigurationParam] `json:"dimensional_price_configuration"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity               param.Field[float64]     `json:"fixed_price_quantity"`
	GroupedAllocationConfig          param.Field[interface{}] `json:"grouped_allocation_config"`
	GroupedTieredConfig              param.Field[interface{}] `json:"grouped_tiered_config"`
	GroupedTieredPackageConfig       param.Field[interface{}] `json:"grouped_tiered_package_config"`
	GroupedWithMeteredMinimumConfig  param.Field[interface{}] `json:"grouped_with_metered_minimum_config"`
	GroupedWithProratedMinimumConfig param.Field[interface{}] `json:"grouped_with_prorated_minimum_config"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[shared.NewBillingCycleConfigurationParam] `json:"invoicing_cycle_configuration"`
	MatrixConfig                param.Field[shared.MatrixConfigParam]                 `json:"matrix_config"`
	MatrixWithAllocationConfig  param.Field[shared.MatrixWithAllocationConfigParam]   `json:"matrix_with_allocation_config"`
	MatrixWithDisplayNameConfig param.Field[interface{}]                              `json:"matrix_with_display_name_config"`
	MaxGroupTieredPackageConfig param.Field[interface{}]                              `json:"max_group_tiered_package_config"`
	Metadata                    param.Field[interface{}]                              `json:"metadata"`
	PackageConfig               param.Field[shared.PackageConfigParam]                `json:"package_config"`
	PackageWithAllocationConfig param.Field[interface{}]                              `json:"package_with_allocation_config"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID                           param.Field[string]                      `json:"reference_id"`
	ScalableMatrixWithTieredPricingConfig param.Field[interface{}]                 `json:"scalable_matrix_with_tiered_pricing_config"`
	ScalableMatrixWithUnitPricingConfig   param.Field[interface{}]                 `json:"scalable_matrix_with_unit_pricing_config"`
	ThresholdTotalAmountConfig            param.Field[interface{}]                 `json:"threshold_total_amount_config"`
	TieredBPSConfig                       param.Field[shared.TieredBPSConfigParam] `json:"tiered_bps_config"`
	TieredConfig                          param.Field[shared.TieredConfigParam]    `json:"tiered_config"`
	TieredPackageConfig                   param.Field[interface{}]                 `json:"tiered_package_config"`
	TieredPackageWithMinimumConfig        param.Field[interface{}]                 `json:"tiered_package_with_minimum_config"`
	TieredWithMinimumConfig               param.Field[interface{}]                 `json:"tiered_with_minimum_config"`
	TieredWithProrationConfig             param.Field[interface{}]                 `json:"tiered_with_proration_config"`
	UnitConfig                            param.Field[shared.UnitConfigParam]      `json:"unit_config"`
	UnitWithPercentConfig                 param.Field[interface{}]                 `json:"unit_with_percent_config"`
	UnitWithProrationConfig               param.Field[interface{}]                 `json:"unit_with_proration_config"`
}

The definition of a new price to create and add to the subscription.

func (SubscriptionSchedulePlanChangeParamsReplacePricesPrice) MarshalJSON added in v0.68.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceCadence added in v0.68.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceCadence string

The cadence to bill for this price on.

const (
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceCadenceAnnual     SubscriptionSchedulePlanChangeParamsReplacePricesPriceCadence = "annual"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceCadenceSemiAnnual SubscriptionSchedulePlanChangeParamsReplacePricesPriceCadence = "semi_annual"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceCadenceMonthly    SubscriptionSchedulePlanChangeParamsReplacePricesPriceCadence = "monthly"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceCadenceQuarterly  SubscriptionSchedulePlanChangeParamsReplacePricesPriceCadence = "quarterly"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceCadenceOneTime    SubscriptionSchedulePlanChangeParamsReplacePricesPriceCadence = "one_time"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceCadenceCustom     SubscriptionSchedulePlanChangeParamsReplacePricesPriceCadence = "custom"
)

func (SubscriptionSchedulePlanChangeParamsReplacePricesPriceCadence) IsKnown added in v0.68.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType added in v0.68.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType string
const (
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeUnit                            SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "unit"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypePackage                         SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "package"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeMatrix                          SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "matrix"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeTiered                          SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "tiered"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeTieredBPS                       SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "tiered_bps"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeBPS                             SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "bps"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeBulkBPS                         SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "bulk_bps"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeBulk                            SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "bulk"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeThresholdTotalAmount            SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "threshold_total_amount"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeTieredPackage                   SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "tiered_package"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeTieredWithMinimum               SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "tiered_with_minimum"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeUnitWithPercent                 SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "unit_with_percent"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypePackageWithAllocation           SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "package_with_allocation"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeTieredWithProration             SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "tiered_with_proration"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeUnitWithProration               SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "unit_with_proration"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeGroupedAllocation               SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "grouped_allocation"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeGroupedWithProratedMinimum      SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "grouped_with_prorated_minimum"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeBulkWithProration               SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "bulk_with_proration"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeScalableMatrixWithUnitPricing   SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "scalable_matrix_with_unit_pricing"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeScalableMatrixWithTieredPricing SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "scalable_matrix_with_tiered_pricing"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeCumulativeGroupedBulk           SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "cumulative_grouped_bulk"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeMaxGroupTieredPackage           SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "max_group_tiered_package"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeGroupedWithMeteredMinimum       SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "grouped_with_metered_minimum"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeMatrixWithDisplayName           SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "matrix_with_display_name"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeGroupedTieredPackage            SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "grouped_tiered_package"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeMatrixWithAllocation            SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "matrix_with_allocation"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeTieredPackageWithMinimum        SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "tiered_package_with_minimum"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeGroupedTiered                   SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "grouped_tiered"
)

func (SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType) IsKnown added in v0.68.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceUnion added in v0.68.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceUnion interface {
	// contains filtered or unexported methods
}

The definition of a new price to create and add to the subscription.

Satisfied by NewSubscriptionUnitPriceParam, NewSubscriptionPackagePriceParam, NewSubscriptionMatrixPriceParam, NewSubscriptionTieredPriceParam, NewSubscriptionTieredBPSPriceParam, NewSubscriptionBPSPriceParam, NewSubscriptionBulkBPSPriceParam, NewSubscriptionBulkPriceParam, NewSubscriptionThresholdTotalAmountPriceParam, NewSubscriptionTieredPackagePriceParam, NewSubscriptionTieredWithMinimumPriceParam, NewSubscriptionUnitWithPercentPriceParam, NewSubscriptionPackageWithAllocationPriceParam, NewSubscriptionTierWithProrationPriceParam, NewSubscriptionUnitWithProrationPriceParam, NewSubscriptionGroupedAllocationPriceParam, NewSubscriptionGroupedWithProratedMinimumPriceParam, NewSubscriptionBulkWithProrationPriceParam, NewSubscriptionScalableMatrixWithUnitPricingPriceParam, NewSubscriptionScalableMatrixWithTieredPricingPriceParam, NewSubscriptionCumulativeGroupedBulkPriceParam, NewSubscriptionMaxGroupTieredPackagePriceParam, NewSubscriptionGroupedWithMeteredMinimumPriceParam, NewSubscriptionMatrixWithDisplayNamePriceParam, NewSubscriptionGroupedTieredPackagePriceParam, NewSubscriptionMatrixWithAllocationPriceParam, NewSubscriptionTieredPackageWithMinimumPriceParam, NewSubscriptionGroupedTieredPriceParam, SubscriptionSchedulePlanChangeParamsReplacePricesPrice.

type SubscriptionService

type SubscriptionService struct {
	Options []option.RequestOption
}

SubscriptionService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSubscriptionService method instead.

func NewSubscriptionService

func NewSubscriptionService(opts ...option.RequestOption) (r *SubscriptionService)

NewSubscriptionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SubscriptionService) Cancel

func (r *SubscriptionService) Cancel(ctx context.Context, subscriptionID string, body SubscriptionCancelParams, opts ...option.RequestOption) (res *MutatedSubscription, err error)

This endpoint can be used to cancel an existing subscription. It returns the serialized subscription object with an `end_date` parameter that signifies when the subscription will transition to an ended state.

The body parameter `cancel_option` determines the cancellation behavior. Orb supports three cancellation options:

  • `end_of_subscription_term`: stops the subscription from auto-renewing. Subscriptions that have been cancelled with this option can still incur charges for the remainder of their term:

  • Issuing this cancellation request for a monthly subscription will keep the subscription active until the start of the subsequent month, and potentially issue an invoice for any usage charges incurred in the intervening period.

  • Issuing this cancellation request for a quarterly subscription will keep the subscription active until the end of the quarter and potentially issue an invoice for any usage charges incurred in the intervening period.

  • Issuing this cancellation request for a yearly subscription will keep the subscription active for the full year. For example, a yearly subscription starting on 2021-11-01 and cancelled on 2021-12-08 will remain active until 2022-11-01 and potentially issue charges in the intervening months for any recurring monthly usage charges in its plan.

  • **Note**: If a subscription's plan contains prices with difference cadences, the end of term date will be determined by the largest cadence value. For example, cancelling end of term for a subscription with a quarterly fixed fee with a monthly usage fee will result in the subscription ending at the end of the quarter.

  • `immediate`: ends the subscription immediately, setting the `end_date` to the current time:

  • Subscriptions that have been cancelled with this option will be invoiced immediately. This invoice will include any usage fees incurred in the billing period up to the cancellation, along with any prorated recurring fees for the billing period, if applicable.

  • **Note**: If the subscription has a recurring fee that was paid in-advance, the prorated amount for the remaining time period will be added to the [customer's balance](list-balance-transactions) upon immediate cancellation. However, if the customer is ineligible to use the customer balance, the subscription cannot be cancelled immediately.

  • `requested_date`: ends the subscription on a specified date, which requires a `cancellation_date` to be passed in. If no timezone is provided, the customer's timezone is used. For example, a subscription starting on January 1st with a monthly price can be set to be cancelled on the first of any month after January 1st (e.g. March 1st, April 1st, May 1st). A subscription with multiple prices with different cadences defines the "term" to be the highest cadence of the prices.

Upcoming subscriptions are only eligible for immediate cancellation, which will set the `end_date` equal to the `start_date` upon cancellation.

## Backdated cancellations

Orb allows you to cancel a subscription in the past as long as there are no paid invoices between the `requested_date` and the current time. If the cancellation is after the latest issued invoice, Orb will generate a balance refund for the current period. If the cancellation is before the most recently issued invoice, Orb will void the intervening invoice and generate a new one based on the new dates for the subscription. See the section on [cancellation behaviors](/product-catalog/creating-subscriptions#cancellation-behaviors).

func (*SubscriptionService) Fetch

func (r *SubscriptionService) Fetch(ctx context.Context, subscriptionID string, opts ...option.RequestOption) (res *Subscription, err error)

This endpoint is used to fetch a Subscription(/core-concepts##subscription) given an identifier.

func (*SubscriptionService) FetchCosts

This endpoint is used to fetch a day-by-day snapshot of a subscription's costs in Orb, calculated by applying pricing information to the underlying usage (see the [subscription usage endpoint](fetch-subscription-usage) to fetch usage per metric, in usage units rather than a currency).

The semantics of this endpoint exactly mirror those of [fetching a customer's costs](fetch-customer-costs). Use this endpoint to limit your analysis of costs to a specific subscription for the customer (e.g. to de-aggregate costs when a customer's subscription has started and stopped on the same day).

func (*SubscriptionService) FetchSchedule

This endpoint returns a [paginated](/api-reference/pagination) list of all plans associated with a subscription along with their start and end dates. This list contains the subscription's initial plan along with past and future plan changes.

func (*SubscriptionService) FetchScheduleAutoPaging

This endpoint returns a [paginated](/api-reference/pagination) list of all plans associated with a subscription along with their start and end dates. This list contains the subscription's initial plan along with past and future plan changes.

func (*SubscriptionService) FetchUsage

func (r *SubscriptionService) FetchUsage(ctx context.Context, subscriptionID string, query SubscriptionFetchUsageParams, opts ...option.RequestOption) (res *SubscriptionUsage, err error)

This endpoint is used to fetch a subscription's usage in Orb. Especially when combined with optional query parameters, this endpoint is a powerful way to build visualizations on top of Orb's event data and metrics.

With no query parameters specified, this endpoint returns usage for the subscription's _current billing period_ across each billable metric that participates in the subscription. Usage quantities returned are the result of evaluating the metric definition for the entirety of the customer's billing period.

### Default response shape

Orb returns a `data` array with an object corresponding to each billable metric. Nested within this object is a `usage` array which has a `quantity` value and a corresponding `timeframe_start` and `timeframe_end`. The `quantity` value represents the calculated usage value for the billable metric over the specified timeframe (inclusive of the `timeframe_start` timestamp and exclusive of the `timeframe_end` timestamp).

Orb will include _every_ window in the response starting from the beginning of the billing period, even when there were no events (and therefore no usage) in the window. This increases the size of the response but prevents the caller from filling in gaps and handling cumbersome time-based logic.

The query parameters in this endpoint serve to override this behavior and provide some key functionality, as listed below. Note that this functionality can also be used _in conjunction_ with each other, e.g. to display grouped usage on a custom timeframe.

## Custom timeframe

In order to view usage for a custom timeframe rather than the current billing period, specify a `timeframe_start` and `timeframe_end`. This will calculate quantities for usage incurred between timeframe_start (inclusive) and timeframe_end (exclusive), i.e. `[timeframe_start, timeframe_end)`.

Note:

  • These timestamps must be specified in ISO 8601 format and UTC timezone, e.g. `2022-02-01T05:00:00Z`.
  • Both parameters must be specified if either is specified.

## Grouping by custom attributes

In order to view a single metric grouped by a specific _attribute_ that each event is tagged with (e.g. `cluster`), you must additionally specify a `billable_metric_id` and a `group_by` key. The `group_by` key denotes the event property on which to group.

When returning grouped usage, only usage for `billable_metric_id` is returned, and a separate object in the `data` array is returned for each value of the `group_by` key present in your events. The `quantity` value is the result of evaluating the billable metric for events filtered to a single value of the `group_by` key.

Orb expects that events that match the billable metric will contain values in the `properties` dictionary that correspond to the `group_by` key specified. By default, Orb will not return a `null` group (i.e. events that match the metric but do not have the key set). Currently, it is only possible to view usage grouped by a single attribute at a time.

When viewing grouped usage, Orb uses pagination to limit the response size to 1000 groups by default. If there are more groups for a given subscription, pagination metadata in the response can be used to fetch all of the data.

The following example shows usage for an "API Requests" billable metric grouped by `region`. Note the extra `metric_group` dictionary in the response, which provides metadata about the group:

```json

{
    "data": [
        {
            "usage": [
                {
                    "quantity": 0.19291,
                    "timeframe_start": "2021-10-01T07:00:00Z",
                    "timeframe_end": "2021-10-02T07:00:00Z",
                },
                ...
            ],
            "metric_group": {
                "property_key": "region",
                "property_value": "asia/pacific"
            },
            "billable_metric": {
                "id": "Fe9pbpMk86xpwdGB",
                "name": "API Requests"
            },
            "view_mode": "periodic"
        },
        ...
    ]
}

```

## Windowed usage

The `granularity` parameter can be used to _window_ the usage `quantity` value into periods. When not specified, usage is returned for the entirety of the time range.

When `granularity = day` is specified with a timeframe longer than a day, Orb will return a `quantity` value for each full day between `timeframe_start` and `timeframe_end`. Note that the days are demarcated by the _customer's local midnight_.

For example, with `timeframe_start = 2022-02-01T05:00:00Z`, `timeframe_end = 2022-02-04T01:00:00Z` and `granularity=day`, the following windows will be returned for a customer in the `America/Los_Angeles` timezone since local midnight is `08:00` UTC:

- `[2022-02-01T05:00:00Z, 2022-02-01T08:00:00Z)` - `[2022-02-01T08:00:00, 2022-02-02T08:00:00Z)` - `[2022-02-02T08:00:00, 2022-02-03T08:00:00Z)` - `[2022-02-03T08:00:00, 2022-02-04T01:00:00Z)`

```json

{
    "data": [
        {
            "billable_metric": {
                "id": "Q8w89wjTtBdejXKsm",
                "name": "API Requests"
            },
            "usage": [
                {
                    "quantity": 0,
                    "timeframe_end": "2022-02-01T08:00:00+00:00",
                    "timeframe_start": "2022-02-01T05:00:00+00:00"
                },
                {

                    "quantity": 0,
                    "timeframe_end": "2022-02-02T08:00:00+00:00",
                    "timeframe_start": "2022-02-01T08:00:00+00:00"
                },
                {
                    "quantity": 0,
                    "timeframe_end": "2022-02-03T08:00:00+00:00",
                    "timeframe_start": "2022-02-02T08:00:00+00:00"
                },
                {
                    "quantity": 0,
                    "timeframe_end": "2022-02-04T01:00:00+00:00",
                    "timeframe_start": "2022-02-03T08:00:00+00:00"
                }
            ],
            "view_mode": "periodic"
        },
        ...
    ]
}

```

## Decomposable vs. non-decomposable metrics

Billable metrics fall into one of two categories: decomposable and non-decomposable. A decomposable billable metric, such as a sum or a count, can be displayed and aggregated across arbitrary timescales. On the other hand, a non-decomposable metric is not meaningful when only a slice of the billing window is considered.

As an example, if we have a billable metric that's defined to count unique users, displaying a graph of unique users for each day is not representative of the billable metric value over the month (days could have an overlapping set of 'unique' users). Instead, what's useful for any given day is the number of unique users in the billing period so far, which are the _cumulative_ unique users.

Accordingly, this endpoint returns treats these two types of metrics differently when `group_by` is specified:

  • Decomposable metrics can be grouped by any event property.
  • Non-decomposable metrics can only be grouped by the corresponding price's invoice grouping key. If no invoice grouping key is present, the metric does not support `group_by`.

## Matrix prices

When a billable metric is attached to a price that uses matrix pricing, it's important to view usage grouped by those matrix dimensions. In this case, use the query parameters `first_dimension_key`, `first_dimension_value` and `second_dimension_key`, `second_dimension_value` while filtering to a specific `billable_metric_id`.

For example, if your compute metric has a separate unit price (i.e. a matrix pricing model) per `region` and `provider`, your request might provide the following parameters:

- `first_dimension_key`: `region` - `first_dimension_value`: `us-east-1` - `second_dimension_key`: `provider` - `second_dimension_value`: `aws`

func (*SubscriptionService) List

This endpoint returns a list of all subscriptions for an account as a [paginated](/api-reference/pagination) list, ordered starting from the most recently created subscription. For a full discussion of the subscription resource, see Subscription(/core-concepts##subscription).

Subscriptions can be filtered for a specific customer by using either the customer_id or external_customer_id query parameters. To filter subscriptions for multiple customers, use the customer_id[] or external_customer_id[] query parameters.

func (*SubscriptionService) ListAutoPaging

This endpoint returns a list of all subscriptions for an account as a [paginated](/api-reference/pagination) list, ordered starting from the most recently created subscription. For a full discussion of the subscription resource, see Subscription(/core-concepts##subscription).

Subscriptions can be filtered for a specific customer by using either the customer_id or external_customer_id query parameters. To filter subscriptions for multiple customers, use the customer_id[] or external_customer_id[] query parameters.

func (*SubscriptionService) New

A subscription represents the purchase of a plan by a customer. The customer is identified by either the `customer_id` or the `external_customer_id`, and exactly one of these fields must be provided.

By default, subscriptions begin on the day that they're created and renew automatically for each billing cycle at the cadence that's configured in the plan definition.

The default configuration for subscriptions in Orb is **In-advance billing** and **Beginning of month alignment** (see Subscription(/core-concepts##subscription) for more details).

In order to change the alignment behavior, Orb also supports billing subscriptions on the day of the month they are created. If `align_billing_with_subscription_start_date = true` is specified, subscriptions have billing cycles that are aligned with their `start_date`. For example, a subscription that begins on January 15th will have a billing cycle from January 15th to February 15th. Every subsequent billing cycle will continue to start and invoice on the 15th.

If the "day" value is greater than the number of days in the month, the next billing cycle will start at the end of the month. For example, if the start_date is January 31st, the next billing cycle will start on February 28th.

If a customer was created with a currency, Orb only allows subscribing the customer to a plan with a matching `invoicing_currency`. If the customer does not have a currency set, on subscription creation, we set the customer's currency to be the `invoicing_currency` of the plan.

## Customize your customer's subscriptions

Prices and adjustments in a plan can be added, removed, or replaced for the subscription being created. This is useful when a customer has prices that differ from the default prices for a specific plan.

<Note> This feature is only available for accounts that have migrated to Subscription Overrides Version 2. You can find your Subscription Overrides Version at the bottom of your [Plans page](https://app.withorb.com/plans) </Note>

### Adding Prices

To add prices, provide a list of objects with the key `add_prices`. An object in the list must specify an existing add-on price with a `price_id` or `external_price_id` field, or create a new add-on price by including an object with the key `price`, identical to what would be used in the request body for the [create price endpoint](/api-reference/price/create-price). See the [Price resource](/product-catalog/price-configuration) for the specification of different price model configurations possible in this object.

If the plan has phases, each object in the list must include a number with `plan_phase_order` key to indicate which phase the price should be added to.

An object in the list can specify an optional `start_date` and optional `end_date`. This is equivalent to creating a price interval with the [add/edit price intervals endpoint](/api-reference/price-interval/add-or-edit-price-intervals). If unspecified, the start or end date of the phase or subscription will be used.

An object in the list can specify an optional `minimum_amount`, `maximum_amount`, or `discounts`. This will create adjustments which apply only to this price.

Additionally, an object in the list can specify an optional `reference_id`. This ID can be used to reference this price when [adding an adjustment](#adding-adjustments) in the same API call. However the ID is _transient_ and cannot be used to refer to the price in future API calls.

### Removing Prices

To remove prices, provide a list of objects with the key `remove_prices`. An object in the list must specify a plan price with either a `price_id` or `external_price_id` field.

### Replacing Prices

To replace prices, provide a list of objects with the key `replace_prices`. An object in the list must specify a plan price to replace with the `replaces_price_id` key, and it must specify a price to replace it with by either referencing an existing add-on price with a `price_id` or `external_price_id` field, or by creating a new add-on price by including an object with the key `price`, identical to what would be used in the request body for the [create price endpoint](/api-reference/price/create-price). See the [Price resource](/product-catalog/price-configuration) for the specification of different price model configurations possible in this object.

For fixed fees, an object in the list can supply a `fixed_price_quantity` instead of a `price`, `price_id`, or `external_price_id` field. This will update only the quantity for the price, similar to the [Update price quantity](/api-reference/subscription/update-price-quantity) endpoint.

The replacement price will have the same phase, if applicable, and the same start and end dates as the price it replaces.

An object in the list can specify an optional `minimum_amount`, `maximum_amount`, or `discounts`. This will create adjustments which apply only to this price.

Additionally, an object in the list can specify an optional `reference_id`. This ID can be used to reference the replacement price when [adding an adjustment](#adding-adjustments) in the same API call. However the ID is _transient_ and cannot be used to refer to the price in future API calls.

### Adding adjustments

To add adjustments, provide a list of objects with the key `add_adjustments`. An object in the list must include an object with the key `adjustment`, identical to the adjustment object in the [add/edit price intervals endpoint](/api-reference/price-interval/add-or-edit-price-intervals).

If the plan has phases, each object in the list must include a number with `plan_phase_order` key to indicate which phase the adjustment should be added to.

An object in the list can specify an optional `start_date` and optional `end_date`. If unspecified, the start or end date of the phase or subscription will be used.

### Removing adjustments

To remove adjustments, provide a list of objects with the key `remove_adjustments`. An object in the list must include a key, `adjustment_id`, with the ID of the adjustment to be removed.

### Replacing adjustments

To replace adjustments, provide a list of objects with the key `replace_adjustments`. An object in the list must specify a plan adjustment to replace with the `replaces_adjustment_id` key, and it must specify an adjustment to replace it with by including an object with the key `adjustment`, identical to the adjustment object in the [add/edit price intervals endpoint](/api-reference/price-interval/add-or-edit-price-intervals).

The replacement adjustment will have the same phase, if applicable, and the same start and end dates as the adjustment it replaces.

## Price overrides (DEPRECATED)

<Note> Price overrides are being phased out in favor adding/removing/replacing prices. (See [Customize your customer's subscriptions](/api-reference/subscription/create-subscription)) </Note>

Price overrides are used to update some or all prices in a plan for the specific subscription being created. This is useful when a new customer has negotiated a rate that is unique to the customer.

To override prices, provide a list of objects with the key `price_overrides`. The price object in the list of overrides is expected to contain the existing price id, the `model_type` and configuration. (See the [Price resource](/product-catalog/price-configuration) for the specification of different price model configurations.) The numerical values can be updated, but the billable metric, cadence, type, and name of a price can not be overridden.

### Maximums and Minimums

Minimums and maximums, much like price overrides, can be useful when a new customer has negotiated a new or different minimum or maximum spend cap than the default for a given price. If one exists for a price and null is provided for the minimum/maximum override on creation, then there will be no minimum/maximum on the new subscription. If no value is provided, then the default price maximum or minimum is used.

To add a minimum for a specific price, add `minimum_amount` to the specific price in the `price_overrides` object.

To add a maximum for a specific price, add `maximum_amount` to the specific price in the `price_overrides` object.

### Minimum override example

Price minimum override example:

```json

{
  ...
  "id": "price_id",
  "model_type": "unit",
  "unit_config": {
    "unit_amount": "0.50"
  },
  "minimum_amount": "100.00"
  ...
}

```

Removing an existing minimum example

```json

{
  ...
  "id": "price_id",
  "model_type": "unit",
  "unit_config": {
    "unit_amount": "0.50"
  },
  "minimum_amount": null
  ...
}

```

### Discounts

Discounts, like price overrides, can be useful when a new customer has negotiated a new or different discount than the default for a price. If a discount exists for a price and a null discount is provided on creation, then there will be no discount on the new subscription.

To add a discount for a specific price, add `discount` to the price in the `price_overrides` object. Discount should be a dictionary of the format:

```ts

{
  "discount_type": "amount" | "percentage" | "usage",
  "amount_discount": string,
  "percentage_discount": string,
  "usage_discount": string
}

```

where either `amount_discount`, `percentage_discount`, or `usage_discount` is provided.

Price discount example

```json

{
  ...
  "id": "price_id",
  "model_type": "unit",
  "unit_config": {
    "unit_amount": "0.50"
  },
  "discount": {"discount_type": "amount", "amount_discount": "175"},
}

```

Removing an existing discount example

```json

{
  "customer_id": "customer_id",
  "plan_id": "plan_id",
  "discount": null,
  "price_overrides": [ ... ]
  ...
}

```

## Threshold Billing

Orb supports invoicing for a subscription when a preconfigured usage threshold is hit. To enable threshold billing, pass in an `invoicing_threshold`, which is specified in the subscription's invoicing currency, when creating a subscription. E.g. pass in `10.00` to issue an invoice when usage amounts hit $10.00 for a subscription that invoices in USD.

func (*SubscriptionService) PriceIntervals

func (r *SubscriptionService) PriceIntervals(ctx context.Context, subscriptionID string, body SubscriptionPriceIntervalsParams, opts ...option.RequestOption) (res *MutatedSubscription, err error)

This endpoint is used to add and edit subscription [price intervals](/api-reference/price-interval/add-or-edit-price-intervals). By making modifications to a subscription’s price intervals, you can [flexibly and atomically control the billing behavior of a subscription](/product-catalog/modifying-subscriptions).

## Adding price intervals

Prices can be added as price intervals to a subscription by specifying them in the `add` array. A `price_id` or `external_price_id` from an add-on price or previously removed plan price can be specified to reuse an existing price definition (however, please note that prices from other plans cannot be added to the subscription). Additionally, a new price can be specified using the `price` field — this price will be created automatically.

A `start_date` must be specified for the price interval. This is the date when the price will start billing on the subscription, so this will notably result in an immediate charge at this time for any billed in advance fixed fees. The `end_date` will default to null, resulting in a price interval that will bill on a continually recurring basis. Both of these dates can be set in the past or the future and Orb will generate or modify invoices to ensure the subscription’s invoicing behavior is correct.

Additionally, a discount, minimum, or maximum can be specified on the price interval. This will only apply to this price interval, not any other price intervals on the subscription.

## Adjustment intervals

An adjustment interval represents the time period that a particular adjustment (a discount, minimum, or maximum) applies to the prices on a subscription. Adjustment intervals can be added to a subscription by specifying them in the `add_adjustments` array, or modified via the `edit_adjustments` array. When creating an adjustment interval, you'll need to provide the definition of the new adjustment (the type of adjustment, and which prices it applies to), as well as the start and end dates for the adjustment interval. The start and end dates of an existing adjustment interval can be edited via the `edit_adjustments` field (just like price intervals). (To "change" the amount of a discount, minimum, or maximum, then, you'll need to end the existing interval, and create a new adjustment interval with the new amount and a start date that matches the end date of the previous interval.)

## Editing price intervals

Price intervals can be adjusted by specifying edits to make in the `edit` array. A `price_interval_id` to edit must be specified — this can be retrieved from the `price_intervals` field on the subscription.

A new `start_date` or `end_date` can be specified to change the range of the price interval, which will modify past or future invoices to ensure correctness. If either of these dates are unspecified, they will default to the existing date on the price interval. To remove a price interval entirely from a subscription, set the `end_date` to be equivalent to the `start_date`.

## Fixed fee quantity transitions

The fixed fee quantity transitions for a fixed fee price interval can also be specified when adding or editing by passing an array for `fixed_fee_quantity_transitions`. A fixed fee quantity transition must have a `quantity` and an `effective_date`, which is the date after which the new quantity will be used for billing. If a fixed fee quantity transition is scheduled at a billing period boundary, the full quantity will be billed on an invoice with the other prices on the subscription. If the fixed fee quantity transition is scheduled mid-billing period, the difference between the existing quantity and quantity specified in the transition will be prorated for the rest of the billing period and billed immediately, which will generate a new invoice.

Notably, the list of fixed fee quantity transitions passed will overwrite the existing fixed fee quantity transitions on the price interval, so the entire list of transitions must be specified to add additional transitions. The existing list of transitions can be retrieved using the `fixed_fee_quantity_transitions` property on a subscription’s serialized price intervals.

func (*SubscriptionService) RedeemCoupon added in v0.118.0

func (r *SubscriptionService) RedeemCoupon(ctx context.Context, subscriptionID string, body SubscriptionRedeemCouponParams, opts ...option.RequestOption) (res *MutatedSubscription, err error)

Redeem a coupon effective at a given time.

func (*SubscriptionService) SchedulePlanChange

func (r *SubscriptionService) SchedulePlanChange(ctx context.Context, subscriptionID string, body SubscriptionSchedulePlanChangeParams, opts ...option.RequestOption) (res *MutatedSubscription, err error)

This endpoint can be used to change an existing subscription's plan. It returns the serialized updated subscription object.

The body parameter `change_option` determines when the plan change occurrs. Orb supports three options:

  • `end_of_subscription_term`: changes the plan at the end of the existing plan's term.
  • Issuing this plan change request for a monthly subscription will keep the existing plan active until the start of the subsequent month. Issuing this plan change request for a yearly subscription will keep the existing plan active for the full year. Charges incurred in the remaining period will be invoiced as normal.
  • Example: The plan is billed monthly on the 1st of the month, the request is made on January 15th, so the plan will be changed on February 1st, and invoice will be issued on February 1st for the last month of the original plan.
  • `immediate`: changes the plan immediately.
  • Subscriptions that have their plan changed with this option will move to the new plan immediately, and be invoiced immediately.
  • This invoice will include any usage fees incurred in the billing period up to the change, along with any prorated recurring fees for the billing period, if applicable.
  • Example: The plan is billed monthly on the 1st of the month, the request is made on January 15th, so the plan will be changed on January 15th, and an invoice will be issued for the partial month, from January 1 to January 15, on the original plan.
  • `requested_date`: changes the plan on the requested date (`change_date`).
  • If no timezone is provided, the customer's timezone is used. The `change_date` body parameter is required if this option is chosen.
  • Example: The plan is billed monthly on the 1st of the month, the request is made on January 15th, with a requested `change_date` of February 15th, so the plan will be changed on February 15th, and invoices will be issued on February 1st and February 15th.

Note that one of `plan_id` or `external_plan_id` is required in the request body for this operation.

## Customize your customer's subscriptions

Prices and adjustments in a plan can be added, removed, or replaced on the subscription when you schedule the plan change. This is useful when a customer has prices that differ from the default prices for a specific plan.

<Note> This feature is only available for accounts that have migrated to Subscription Overrides Version 2. You can find your Subscription Overrides Version at the bottom of your [Plans page](https://app.withorb.com/plans) </Note>

### Adding Prices

To add prices, provide a list of objects with the key `add_prices`. An object in the list must specify an existing add-on price with a `price_id` or `external_price_id` field, or create a new add-on price by including an object with the key `price`, identical to what would be used in the request body for the [create price endpoint](/api-reference/price/create-price). See the [Price resource](/product-catalog/price-configuration) for the specification of different price model configurations possible in this object.

If the plan has phases, each object in the list must include a number with `plan_phase_order` key to indicate which phase the price should be added to.

An object in the list can specify an optional `start_date` and optional `end_date`. If `start_date` is unspecified, the start of the phase / plan change time will be used. If `end_date` is unspecified, it will finish at the end of the phase / have no end time.

An object in the list can specify an optional `minimum_amount`, `maximum_amount`, or `discounts`. This will create adjustments which apply only to this price.

Additionally, an object in the list can specify an optional `reference_id`. This ID can be used to reference this price when [adding an adjustment](#adding-adjustments) in the same API call. However the ID is _transient_ and cannot be used to refer to the price in future API calls.

### Removing Prices

To remove prices, provide a list of objects with the key `remove_prices`. An object in the list must specify a plan price with either a `price_id` or `external_price_id` field.

### Replacing Prices

To replace prices, provide a list of objects with the key `replace_prices`. An object in the list must specify a plan price to replace with the `replaces_price_id` key, and it must specify a price to replace it with by either referencing an existing add-on price with a `price_id` or `external_price_id` field, or by creating a new add-on price by including an object with the key `price`, identical to what would be used in the request body for the [create price endpoint](/api-reference/price/create-price). See the [Price resource](/product-catalog/price-configuration) for the specification of different price model configurations possible in this object.

For fixed fees, an object in the list can supply a `fixed_price_quantity` instead of a `price`, `price_id`, or `external_price_id` field. This will update only the quantity for the price, similar to the [Update price quantity](/api-reference/subscription/update-price-quantity) endpoint.

The replacement price will have the same phase, if applicable, and the same start and end dates as the price it replaces.

An object in the list can specify an optional `minimum_amount`, `maximum_amount`, or `discounts`. This will create adjustments which apply only to this price.

Additionally, an object in the list can specify an optional `reference_id`. This ID can be used to reference the replacement price when [adding an adjustment](#adding-adjustments) in the same API call. However the ID is _transient_ and cannot be used to refer to the price in future API calls.

### Adding adjustments

To add adjustments, provide a list of objects with the key `add_adjustments`. An object in the list must include an object with the key `adjustment`, identical to the adjustment object in the [add/edit price intervals endpoint](/api-reference/price-interval/add-or-edit-price-intervals).

If the plan has phases, each object in the list must include a number with `plan_phase_order` key to indicate which phase the adjustment should be added to.

An object in the list can specify an optional `start_date` and optional `end_date`. If `start_date` is unspecified, the start of the phase / plan change time will be used. If `end_date` is unspecified, it will finish at the end of the phase / have no end time.

### Removing adjustments

To remove adjustments, provide a list of objects with the key `remove_adjustments`. An object in the list must include a key, `adjustment_id`, with the ID of the adjustment to be removed.

### Replacing adjustments

To replace adjustments, provide a list of objects with the key `replace_adjustments`. An object in the list must specify a plan adjustment to replace with the `replaces_adjustment_id` key, and it must specify an adjustment to replace it with by including an object with the key `adjustment`, identical to the adjustment object in the [add/edit price intervals endpoint](/api-reference/price-interval/add-or-edit-price-intervals).

The replacement adjustment will have the same phase, if applicable, and the same start and end dates as the adjustment it replaces.

## Price overrides (DEPRECATED)

<Note> Price overrides are being phased out in favor adding/removing/replacing prices. (See [Customize your customer's subscriptions](/api-reference/subscription/schedule-plan-change)) </Note>

Price overrides are used to update some or all prices in a plan for the specific subscription being created. This is useful when a new customer has negotiated a rate that is unique to the customer.

To override prices, provide a list of objects with the key `price_overrides`. The price object in the list of overrides is expected to contain the existing price id, the `model_type` and configuration. (See the [Price resource](/product-catalog/price-configuration) for the specification of different price model configurations.) The numerical values can be updated, but the billable metric, cadence, type, and name of a price can not be overridden.

### Maximums, and minimums

Price overrides are used to update some or all prices in the target plan. Minimums and maximums, much like price overrides, can be useful when a new customer has negotiated a new or different minimum or maximum spend cap than the default for the plan. The request format for maximums and minimums is the same as those in [subscription creation](create-subscription).

## Scheduling multiple plan changes

When scheduling multiple plan changes with the same date, the latest plan change on that day takes effect.

## Prorations for in-advance fees

By default, Orb calculates the prorated difference in any fixed fees when making a plan change, adjusting the customer balance as needed. For details on this behavior, see [Modifying subscriptions](/product-catalog/modifying-subscriptions#prorations-for-in-advance-fees).

func (*SubscriptionService) TriggerPhase

func (r *SubscriptionService) TriggerPhase(ctx context.Context, subscriptionID string, body SubscriptionTriggerPhaseParams, opts ...option.RequestOption) (res *MutatedSubscription, err error)

Manually trigger a phase, effective the given date (or the current time, if not specified).

func (*SubscriptionService) UnscheduleCancellation

func (r *SubscriptionService) UnscheduleCancellation(ctx context.Context, subscriptionID string, opts ...option.RequestOption) (res *MutatedSubscription, err error)

This endpoint can be used to unschedule any pending cancellations for a subscription.

To be eligible, the subscription must currently be active and have a future cancellation. This operation will turn on auto-renew, ensuring that the subscription does not end at the currently scheduled cancellation time.

func (*SubscriptionService) UnscheduleFixedFeeQuantityUpdates

func (r *SubscriptionService) UnscheduleFixedFeeQuantityUpdates(ctx context.Context, subscriptionID string, body SubscriptionUnscheduleFixedFeeQuantityUpdatesParams, opts ...option.RequestOption) (res *MutatedSubscription, err error)

This endpoint can be used to clear scheduled updates to the quantity for a fixed fee.

If there are no updates scheduled, a request validation error will be returned with a 400 status code.

func (*SubscriptionService) UnschedulePendingPlanChanges

func (r *SubscriptionService) UnschedulePendingPlanChanges(ctx context.Context, subscriptionID string, opts ...option.RequestOption) (res *MutatedSubscription, err error)

This endpoint can be used to unschedule any pending plan changes on an existing subscription. When called, all upcoming plan changes will be unscheduled.

func (*SubscriptionService) Update added in v0.25.0

func (r *SubscriptionService) Update(ctx context.Context, subscriptionID string, body SubscriptionUpdateParams, opts ...option.RequestOption) (res *Subscription, err error)

This endpoint can be used to update the `metadata`, `net terms`, `auto_collection`, `invoicing_threshold`, and `default_invoice_memo` properties on a subscription.

func (*SubscriptionService) UpdateFixedFeeQuantity

func (r *SubscriptionService) UpdateFixedFeeQuantity(ctx context.Context, subscriptionID string, body SubscriptionUpdateFixedFeeQuantityParams, opts ...option.RequestOption) (res *MutatedSubscription, err error)

This endpoint can be used to update the quantity for a fixed fee.

To be eligible, the subscription must currently be active and the price specified must be a fixed fee (not usage-based). This operation will immediately update the quantity for the fee, or if a `effective_date` is passed in, will update the quantity on the requested date at midnight in the customer's timezone.

In order to change the fixed fee quantity as of the next draft invoice for this subscription, pass `change_option=upcoming_invoice` without an `effective_date` specified.

If the fee is an in-advance fixed fee, it will also issue an immediate invoice for the difference for the remainder of the billing period.

func (*SubscriptionService) UpdateTrial added in v0.74.0

func (r *SubscriptionService) UpdateTrial(ctx context.Context, subscriptionID string, body SubscriptionUpdateTrialParams, opts ...option.RequestOption) (res *MutatedSubscription, err error)

This endpoint is used to update the trial end date for a subscription. The new trial end date must be within the time range of the current plan (i.e. the new trial end date must be on or after the subscription's start date on the current plan, and on or before the subscription end date).

In order to retroactively remove a trial completely, the end date can be set to the transition date of the subscription to this plan (or, if this is the first plan for this subscription, the subscription's start date). In order to end a trial immediately, the keyword `immediate` can be provided as the trial end date.

By default, Orb will shift only the trial end date (and price intervals that start or end on the previous trial end date), and leave all other future price intervals untouched. If the `shift` parameter is set to `true`, Orb will shift all subsequent price and adjustment intervals by the same amount as the trial end date shift (so, e.g., if a plan change is scheduled or an add-on price was added, that change will be pushed back by the same amount of time the trial is extended).

type SubscriptionStatus

type SubscriptionStatus string
const (
	SubscriptionStatusActive   SubscriptionStatus = "active"
	SubscriptionStatusEnded    SubscriptionStatus = "ended"
	SubscriptionStatusUpcoming SubscriptionStatus = "upcoming"
)

func (SubscriptionStatus) IsKnown added in v0.24.0

func (r SubscriptionStatus) IsKnown() bool

type SubscriptionTrialInfo

type SubscriptionTrialInfo = shared.SubscriptionTrialInfo

This is an alias to an internal type.

type SubscriptionTriggerPhaseParams

type SubscriptionTriggerPhaseParams struct {
	// If false, this request will fail if it would void an issued invoice or create a
	// credit note. Consider using this as a safety mechanism if you do not expect
	// existing invoices to be changed.
	AllowInvoiceCreditOrVoid param.Field[bool] `json:"allow_invoice_credit_or_void"`
	// The date on which the phase change should take effect. If not provided, defaults
	// to today in the customer's timezone.
	EffectiveDate param.Field[time.Time] `json:"effective_date" format:"date"`
}

func (SubscriptionTriggerPhaseParams) MarshalJSON

func (r SubscriptionTriggerPhaseParams) MarshalJSON() (data []byte, err error)

type SubscriptionUnscheduleFixedFeeQuantityUpdatesParams

type SubscriptionUnscheduleFixedFeeQuantityUpdatesParams struct {
	// Price for which the updates should be cleared. Must be a fixed fee.
	PriceID param.Field[string] `json:"price_id,required"`
}

func (SubscriptionUnscheduleFixedFeeQuantityUpdatesParams) MarshalJSON

func (r SubscriptionUnscheduleFixedFeeQuantityUpdatesParams) MarshalJSON() (data []byte, err error)

type SubscriptionUpdateFixedFeeQuantityParams

type SubscriptionUpdateFixedFeeQuantityParams struct {
	// Price for which the quantity should be updated. Must be a fixed fee.
	PriceID  param.Field[string]  `json:"price_id,required"`
	Quantity param.Field[float64] `json:"quantity,required"`
	// If false, this request will fail if it would void an issued invoice or create a
	// credit note. Consider using this as a safety mechanism if you do not expect
	// existing invoices to be changed.
	AllowInvoiceCreditOrVoid param.Field[bool] `json:"allow_invoice_credit_or_void"`
	// Determines when the change takes effect. Note that if `effective_date` is
	// specified, this defaults to `effective_date`. Otherwise, this defaults to
	// `immediate` unless it's explicitly set to `upcoming_invoice`.
	ChangeOption param.Field[SubscriptionUpdateFixedFeeQuantityParamsChangeOption] `json:"change_option"`
	// The date that the quantity change should take effect, localized to the
	// customer's timezone. If this parameter is not passed in, the quantity change is
	// effective according to `change_option`.
	EffectiveDate param.Field[time.Time] `json:"effective_date" format:"date"`
}

func (SubscriptionUpdateFixedFeeQuantityParams) MarshalJSON

func (r SubscriptionUpdateFixedFeeQuantityParams) MarshalJSON() (data []byte, err error)

type SubscriptionUpdateFixedFeeQuantityParamsChangeOption

type SubscriptionUpdateFixedFeeQuantityParamsChangeOption string

Determines when the change takes effect. Note that if `effective_date` is specified, this defaults to `effective_date`. Otherwise, this defaults to `immediate` unless it's explicitly set to `upcoming_invoice`.

const (
	SubscriptionUpdateFixedFeeQuantityParamsChangeOptionImmediate       SubscriptionUpdateFixedFeeQuantityParamsChangeOption = "immediate"
	SubscriptionUpdateFixedFeeQuantityParamsChangeOptionUpcomingInvoice SubscriptionUpdateFixedFeeQuantityParamsChangeOption = "upcoming_invoice"
	SubscriptionUpdateFixedFeeQuantityParamsChangeOptionEffectiveDate   SubscriptionUpdateFixedFeeQuantityParamsChangeOption = "effective_date"
)

func (SubscriptionUpdateFixedFeeQuantityParamsChangeOption) IsKnown added in v0.24.0

type SubscriptionUpdateParams added in v0.25.0

type SubscriptionUpdateParams struct {
	// Determines whether issued invoices for this subscription will automatically be
	// charged with the saved payment method on the due date. This property defaults to
	// the plan's behavior.
	AutoCollection param.Field[bool] `json:"auto_collection"`
	// Determines the default memo on this subscription's invoices. Note that if this
	// is not provided, it is determined by the plan configuration.
	DefaultInvoiceMemo param.Field[string] `json:"default_invoice_memo"`
	// When this subscription's accrued usage reaches this threshold, an invoice will
	// be issued for the subscription. If not specified, invoices will only be issued
	// at the end of the billing period.
	InvoicingThreshold param.Field[string] `json:"invoicing_threshold"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// Determines the difference between the invoice issue date for subscription
	// invoices as the date that they are due. A value of `0` here represents that the
	// invoice is due on issue, whereas a value of `30` represents that the customer
	// has a month to pay the invoice.
	NetTerms param.Field[int64] `json:"net_terms"`
}

func (SubscriptionUpdateParams) MarshalJSON added in v0.25.0

func (r SubscriptionUpdateParams) MarshalJSON() (data []byte, err error)

type SubscriptionUpdateTrialParams added in v0.74.0

type SubscriptionUpdateTrialParams struct {
	// The new date that the trial should end, or the literal string `immediate` to end
	// the trial immediately.
	TrialEndDate param.Field[SubscriptionUpdateTrialParamsTrialEndDateUnion] `json:"trial_end_date,required" format:"date-time"`
	// If true, shifts subsequent price and adjustment intervals (preserving their
	// durations, but adjusting their absolute dates).
	Shift param.Field[bool] `json:"shift"`
}

func (SubscriptionUpdateTrialParams) MarshalJSON added in v0.74.0

func (r SubscriptionUpdateTrialParams) MarshalJSON() (data []byte, err error)

type SubscriptionUpdateTrialParamsTrialEndDateString added in v0.74.0

type SubscriptionUpdateTrialParamsTrialEndDateString string
const (
	SubscriptionUpdateTrialParamsTrialEndDateStringImmediate SubscriptionUpdateTrialParamsTrialEndDateString = "immediate"
)

func (SubscriptionUpdateTrialParamsTrialEndDateString) ImplementsSubscriptionUpdateTrialParamsTrialEndDateUnion added in v0.74.0

func (r SubscriptionUpdateTrialParamsTrialEndDateString) ImplementsSubscriptionUpdateTrialParamsTrialEndDateUnion()

func (SubscriptionUpdateTrialParamsTrialEndDateString) IsKnown added in v0.74.0

type SubscriptionUpdateTrialParamsTrialEndDateUnion added in v0.74.0

type SubscriptionUpdateTrialParamsTrialEndDateUnion interface {
	ImplementsSubscriptionUpdateTrialParamsTrialEndDateUnion()
}

The new date that the trial should end, or the literal string `immediate` to end the trial immediately.

Satisfied by shared.UnionTime, SubscriptionUpdateTrialParamsTrialEndDateString.

type SubscriptionUsage

type SubscriptionUsage struct {
	// This field can have the runtime type of
	// [[]SubscriptionUsageUngroupedSubscriptionUsageData],
	// [[]SubscriptionUsageGroupedSubscriptionUsageData].
	Data               interface{}               `json:"data,required"`
	PaginationMetadata shared.PaginationMetadata `json:"pagination_metadata,nullable"`
	JSON               subscriptionUsageJSON     `json:"-"`
	// contains filtered or unexported fields
}

func (SubscriptionUsage) AsUnion added in v0.25.0

AsUnion returns a SubscriptionUsageUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are SubscriptionUsageUngroupedSubscriptionUsage, SubscriptionUsageGroupedSubscriptionUsage.

func (*SubscriptionUsage) UnmarshalJSON added in v0.25.0

func (r *SubscriptionUsage) UnmarshalJSON(data []byte) (err error)

type SubscriptionUsageGroupedSubscriptionUsage

type SubscriptionUsageGroupedSubscriptionUsage struct {
	Data               []SubscriptionUsageGroupedSubscriptionUsageData `json:"data,required"`
	PaginationMetadata shared.PaginationMetadata                       `json:"pagination_metadata,nullable"`
	JSON               subscriptionUsageGroupedSubscriptionUsageJSON   `json:"-"`
}

func (*SubscriptionUsageGroupedSubscriptionUsage) UnmarshalJSON

func (r *SubscriptionUsageGroupedSubscriptionUsage) UnmarshalJSON(data []byte) (err error)

type SubscriptionUsageGroupedSubscriptionUsageData

type SubscriptionUsageGroupedSubscriptionUsageData struct {
	BillableMetric SubscriptionUsageGroupedSubscriptionUsageDataBillableMetric `json:"billable_metric,required"`
	MetricGroup    SubscriptionUsageGroupedSubscriptionUsageDataMetricGroup    `json:"metric_group,required"`
	Usage          []SubscriptionUsageGroupedSubscriptionUsageDataUsage        `json:"usage,required"`
	ViewMode       SubscriptionUsageGroupedSubscriptionUsageDataViewMode       `json:"view_mode,required"`
	JSON           subscriptionUsageGroupedSubscriptionUsageDataJSON           `json:"-"`
}

func (*SubscriptionUsageGroupedSubscriptionUsageData) UnmarshalJSON

func (r *SubscriptionUsageGroupedSubscriptionUsageData) UnmarshalJSON(data []byte) (err error)

type SubscriptionUsageGroupedSubscriptionUsageDataBillableMetric

type SubscriptionUsageGroupedSubscriptionUsageDataBillableMetric struct {
	ID   string                                                          `json:"id,required"`
	Name string                                                          `json:"name,required"`
	JSON subscriptionUsageGroupedSubscriptionUsageDataBillableMetricJSON `json:"-"`
}

func (*SubscriptionUsageGroupedSubscriptionUsageDataBillableMetric) UnmarshalJSON

type SubscriptionUsageGroupedSubscriptionUsageDataMetricGroup

type SubscriptionUsageGroupedSubscriptionUsageDataMetricGroup struct {
	PropertyKey   string                                                       `json:"property_key,required"`
	PropertyValue string                                                       `json:"property_value,required"`
	JSON          subscriptionUsageGroupedSubscriptionUsageDataMetricGroupJSON `json:"-"`
}

func (*SubscriptionUsageGroupedSubscriptionUsageDataMetricGroup) UnmarshalJSON

type SubscriptionUsageGroupedSubscriptionUsageDataUsage

type SubscriptionUsageGroupedSubscriptionUsageDataUsage struct {
	Quantity       float64                                                `json:"quantity,required"`
	TimeframeEnd   time.Time                                              `json:"timeframe_end,required" format:"date-time"`
	TimeframeStart time.Time                                              `json:"timeframe_start,required" format:"date-time"`
	JSON           subscriptionUsageGroupedSubscriptionUsageDataUsageJSON `json:"-"`
}

func (*SubscriptionUsageGroupedSubscriptionUsageDataUsage) UnmarshalJSON

func (r *SubscriptionUsageGroupedSubscriptionUsageDataUsage) UnmarshalJSON(data []byte) (err error)

type SubscriptionUsageGroupedSubscriptionUsageDataViewMode

type SubscriptionUsageGroupedSubscriptionUsageDataViewMode string
const (
	SubscriptionUsageGroupedSubscriptionUsageDataViewModePeriodic   SubscriptionUsageGroupedSubscriptionUsageDataViewMode = "periodic"
	SubscriptionUsageGroupedSubscriptionUsageDataViewModeCumulative SubscriptionUsageGroupedSubscriptionUsageDataViewMode = "cumulative"
)

func (SubscriptionUsageGroupedSubscriptionUsageDataViewMode) IsKnown added in v0.24.0

type SubscriptionUsageUngroupedSubscriptionUsage

type SubscriptionUsageUngroupedSubscriptionUsage struct {
	Data []SubscriptionUsageUngroupedSubscriptionUsageData `json:"data,required"`
	JSON subscriptionUsageUngroupedSubscriptionUsageJSON   `json:"-"`
}

func (*SubscriptionUsageUngroupedSubscriptionUsage) UnmarshalJSON

func (r *SubscriptionUsageUngroupedSubscriptionUsage) UnmarshalJSON(data []byte) (err error)

type SubscriptionUsageUngroupedSubscriptionUsageData

type SubscriptionUsageUngroupedSubscriptionUsageData struct {
	BillableMetric SubscriptionUsageUngroupedSubscriptionUsageDataBillableMetric `json:"billable_metric,required"`
	Usage          []SubscriptionUsageUngroupedSubscriptionUsageDataUsage        `json:"usage,required"`
	ViewMode       SubscriptionUsageUngroupedSubscriptionUsageDataViewMode       `json:"view_mode,required"`
	JSON           subscriptionUsageUngroupedSubscriptionUsageDataJSON           `json:"-"`
}

func (*SubscriptionUsageUngroupedSubscriptionUsageData) UnmarshalJSON

func (r *SubscriptionUsageUngroupedSubscriptionUsageData) UnmarshalJSON(data []byte) (err error)

type SubscriptionUsageUngroupedSubscriptionUsageDataBillableMetric

type SubscriptionUsageUngroupedSubscriptionUsageDataBillableMetric struct {
	ID   string                                                            `json:"id,required"`
	Name string                                                            `json:"name,required"`
	JSON subscriptionUsageUngroupedSubscriptionUsageDataBillableMetricJSON `json:"-"`
}

func (*SubscriptionUsageUngroupedSubscriptionUsageDataBillableMetric) UnmarshalJSON

type SubscriptionUsageUngroupedSubscriptionUsageDataUsage

type SubscriptionUsageUngroupedSubscriptionUsageDataUsage struct {
	Quantity       float64                                                  `json:"quantity,required"`
	TimeframeEnd   time.Time                                                `json:"timeframe_end,required" format:"date-time"`
	TimeframeStart time.Time                                                `json:"timeframe_start,required" format:"date-time"`
	JSON           subscriptionUsageUngroupedSubscriptionUsageDataUsageJSON `json:"-"`
}

func (*SubscriptionUsageUngroupedSubscriptionUsageDataUsage) UnmarshalJSON

func (r *SubscriptionUsageUngroupedSubscriptionUsageDataUsage) UnmarshalJSON(data []byte) (err error)

type SubscriptionUsageUngroupedSubscriptionUsageDataViewMode

type SubscriptionUsageUngroupedSubscriptionUsageDataViewMode string
const (
	SubscriptionUsageUngroupedSubscriptionUsageDataViewModePeriodic   SubscriptionUsageUngroupedSubscriptionUsageDataViewMode = "periodic"
	SubscriptionUsageUngroupedSubscriptionUsageDataViewModeCumulative SubscriptionUsageUngroupedSubscriptionUsageDataViewMode = "cumulative"
)

func (SubscriptionUsageUngroupedSubscriptionUsageDataViewMode) IsKnown added in v0.24.0

type SubscriptionUsageUnion added in v0.25.0

type SubscriptionUsageUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by SubscriptionUsageUngroupedSubscriptionUsage or SubscriptionUsageGroupedSubscriptionUsage.

type Subscriptions

type Subscriptions struct {
	Data               []Subscription            `json:"data,required"`
	PaginationMetadata shared.PaginationMetadata `json:"pagination_metadata,required"`
	JSON               subscriptionsJSON         `json:"-"`
}

func (*Subscriptions) UnmarshalJSON

func (r *Subscriptions) UnmarshalJSON(data []byte) (err error)

type TaxAmount added in v0.121.0

type TaxAmount = shared.TaxAmount

This is an alias to an internal type.

type Threshold added in v0.121.0

type Threshold struct {
	// The value at which an alert will fire. For credit balance alerts, the alert will
	// fire at or below this value. For usage and cost alerts, the alert will fire at
	// or above this value.
	Value float64       `json:"value,required"`
	JSON  thresholdJSON `json:"-"`
}

Thresholds are used to define the conditions under which an alert will be triggered.

func (*Threshold) UnmarshalJSON added in v0.121.0

func (r *Threshold) UnmarshalJSON(data []byte) (err error)

type ThresholdParam added in v0.121.0

type ThresholdParam struct {
	// The value at which an alert will fire. For credit balance alerts, the alert will
	// fire at or below this value. For usage and cost alerts, the alert will fire at
	// or above this value.
	Value param.Field[float64] `json:"value,required"`
}

Thresholds are used to define the conditions under which an alert will be triggered.

func (ThresholdParam) MarshalJSON added in v0.121.0

func (r ThresholdParam) MarshalJSON() (data []byte, err error)

type Tier added in v0.121.0

type Tier = shared.Tier

This is an alias to an internal type.

type TierConfig added in v0.121.0

type TierConfig = shared.TierConfig

This is an alias to an internal type.

type TierParam added in v0.121.0

type TierParam = shared.TierParam

This is an alias to an internal type.

type TierSubLineItem added in v0.121.0

type TierSubLineItem = shared.TierSubLineItem

This is an alias to an internal type.

type TierSubLineItemType added in v0.121.0

type TierSubLineItemType = shared.TierSubLineItemType

This is an alias to an internal type.

type TieredBPSConfig added in v0.121.0

type TieredBPSConfig = shared.TieredBPSConfig

This is an alias to an internal type.

type TieredBPSConfigParam added in v0.121.0

type TieredBPSConfigParam = shared.TieredBPSConfigParam

This is an alias to an internal type.

type TieredConfig added in v0.121.0

type TieredConfig = shared.TieredConfig

This is an alias to an internal type.

type TieredConfigParam added in v0.121.0

type TieredConfigParam = shared.TieredConfigParam

This is an alias to an internal type.

type TieredConversionRateConfig added in v0.123.0

type TieredConversionRateConfig = shared.TieredConversionRateConfig

This is an alias to an internal type.

type TieredConversionRateConfigConversionRateType added in v0.123.0

type TieredConversionRateConfigConversionRateType = shared.TieredConversionRateConfigConversionRateType

This is an alias to an internal type.

type TieredConversionRateConfigParam added in v0.123.0

type TieredConversionRateConfigParam = shared.TieredConversionRateConfigParam

This is an alias to an internal type.

type TopLevelPingResponse

type TopLevelPingResponse struct {
	Response string                   `json:"response,required"`
	JSON     topLevelPingResponseJSON `json:"-"`
}

func (*TopLevelPingResponse) UnmarshalJSON

func (r *TopLevelPingResponse) UnmarshalJSON(data []byte) (err error)

type TopLevelService

type TopLevelService struct {
	Options []option.RequestOption
}

TopLevelService contains methods and other services that help with interacting with the orb API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTopLevelService method instead.

func NewTopLevelService

func NewTopLevelService(opts ...option.RequestOption) (r *TopLevelService)

NewTopLevelService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*TopLevelService) Ping

func (r *TopLevelService) Ping(ctx context.Context, opts ...option.RequestOption) (res *TopLevelPingResponse, err error)

This endpoint allows you to test your connection to the Orb API and check the validity of your API key, passed in the Authorization header. This is particularly useful for checking that your environment is set up properly, and is a great choice for connectors and integrations.

This API does not have any side-effects or return any Orb resources.

type TopUpInvoiceSettings added in v0.121.0

type TopUpInvoiceSettings struct {
	// Whether the credits purchase invoice should auto collect with the customer's
	// saved payment method.
	AutoCollection bool `json:"auto_collection,required"`
	// The net terms determines the difference between the invoice date and the issue
	// date for the invoice. If you intend the invoice to be due on issue, set this
	// to 0.
	NetTerms int64 `json:"net_terms,required"`
	// An optional memo to display on the invoice.
	Memo string `json:"memo,nullable"`
	// When true, credit blocks created by this top-up will require that the
	// corresponding invoice is paid before they are drawn down from. If any topup
	// block is pending payment, further automatic top-ups will be paused until the
	// invoice is paid or voided.
	RequireSuccessfulPayment bool                     `json:"require_successful_payment"`
	JSON                     topUpInvoiceSettingsJSON `json:"-"`
}

func (*TopUpInvoiceSettings) UnmarshalJSON added in v0.121.0

func (r *TopUpInvoiceSettings) UnmarshalJSON(data []byte) (err error)

type TransformPriceFilter added in v0.121.0

type TransformPriceFilter = shared.TransformPriceFilter

This is an alias to an internal type.

type TransformPriceFilterField added in v0.121.0

type TransformPriceFilterField = shared.TransformPriceFilterField

The property of the price to filter on.

This is an alias to an internal type.

type TransformPriceFilterOperator added in v0.121.0

type TransformPriceFilterOperator = shared.TransformPriceFilterOperator

Should prices that match the filter be included or excluded.

This is an alias to an internal type.

type TransformPriceFilterParam added in v0.121.0

type TransformPriceFilterParam = shared.TransformPriceFilterParam

This is an alias to an internal type.

type TrialDiscount added in v0.67.0

type TrialDiscount = shared.TrialDiscount

This is an alias to an internal type.

type TrialDiscountDiscountType added in v0.67.0

type TrialDiscountDiscountType = shared.TrialDiscountDiscountType

This is an alias to an internal type.

type TrialDiscountParam added in v0.67.0

type TrialDiscountParam = shared.TrialDiscountParam

This is an alias to an internal type.

type UnitConfig added in v0.121.0

type UnitConfig = shared.UnitConfig

This is an alias to an internal type.

type UnitConfigParam added in v0.121.0

type UnitConfigParam = shared.UnitConfigParam

This is an alias to an internal type.

type UnitConversionRateConfig added in v0.123.0

type UnitConversionRateConfig = shared.UnitConversionRateConfig

This is an alias to an internal type.

type UnitConversionRateConfigConversionRateType added in v0.123.0

type UnitConversionRateConfigConversionRateType = shared.UnitConversionRateConfigConversionRateType

This is an alias to an internal type.

type UnitConversionRateConfigParam added in v0.123.0

type UnitConversionRateConfigParam = shared.UnitConversionRateConfigParam

This is an alias to an internal type.

type UsageDiscount added in v0.105.0

type UsageDiscount = shared.UsageDiscount

This is an alias to an internal type.

type UsageDiscountDiscountType added in v0.105.0

type UsageDiscountDiscountType = shared.UsageDiscountDiscountType

This is an alias to an internal type.

type UsageDiscountInterval added in v0.121.0

type UsageDiscountInterval = shared.UsageDiscountInterval

This is an alias to an internal type.

type UsageDiscountIntervalDiscountType added in v0.121.0

type UsageDiscountIntervalDiscountType = shared.UsageDiscountIntervalDiscountType

This is an alias to an internal type.

type UsageDiscountParam added in v0.105.0

type UsageDiscountParam = shared.UsageDiscountParam

This is an alias to an internal type.

type VoidInitiatedLedgerEntry added in v0.121.0

type VoidInitiatedLedgerEntry struct {
	ID                   string                              `json:"id,required"`
	Amount               float64                             `json:"amount,required"`
	CreatedAt            time.Time                           `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlock                       `json:"credit_block,required"`
	Currency             string                              `json:"currency,required"`
	Customer             shared.CustomerMinified             `json:"customer,required"`
	Description          string                              `json:"description,required,nullable"`
	EndingBalance        float64                             `json:"ending_balance,required"`
	EntryStatus          VoidInitiatedLedgerEntryEntryStatus `json:"entry_status,required"`
	EntryType            VoidInitiatedLedgerEntryEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                               `json:"ledger_sequence_number,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata           map[string]string            `json:"metadata,required"`
	NewBlockExpiryDate time.Time                    `json:"new_block_expiry_date,required" format:"date-time"`
	StartingBalance    float64                      `json:"starting_balance,required"`
	VoidAmount         float64                      `json:"void_amount,required"`
	VoidReason         string                       `json:"void_reason,required,nullable"`
	JSON               voidInitiatedLedgerEntryJSON `json:"-"`
}

func (*VoidInitiatedLedgerEntry) UnmarshalJSON added in v0.121.0

func (r *VoidInitiatedLedgerEntry) UnmarshalJSON(data []byte) (err error)

type VoidInitiatedLedgerEntryEntryStatus added in v0.121.0

type VoidInitiatedLedgerEntryEntryStatus string
const (
	VoidInitiatedLedgerEntryEntryStatusCommitted VoidInitiatedLedgerEntryEntryStatus = "committed"
	VoidInitiatedLedgerEntryEntryStatusPending   VoidInitiatedLedgerEntryEntryStatus = "pending"
)

func (VoidInitiatedLedgerEntryEntryStatus) IsKnown added in v0.121.0

type VoidInitiatedLedgerEntryEntryType added in v0.121.0

type VoidInitiatedLedgerEntryEntryType string
const (
	VoidInitiatedLedgerEntryEntryTypeVoidInitiated VoidInitiatedLedgerEntryEntryType = "void_initiated"
)

func (VoidInitiatedLedgerEntryEntryType) IsKnown added in v0.121.0

type VoidLedgerEntry added in v0.121.0

type VoidLedgerEntry struct {
	ID                   string                     `json:"id,required"`
	Amount               float64                    `json:"amount,required"`
	CreatedAt            time.Time                  `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlock              `json:"credit_block,required"`
	Currency             string                     `json:"currency,required"`
	Customer             shared.CustomerMinified    `json:"customer,required"`
	Description          string                     `json:"description,required,nullable"`
	EndingBalance        float64                    `json:"ending_balance,required"`
	EntryStatus          VoidLedgerEntryEntryStatus `json:"entry_status,required"`
	EntryType            VoidLedgerEntryEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                      `json:"ledger_sequence_number,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata        map[string]string   `json:"metadata,required"`
	StartingBalance float64             `json:"starting_balance,required"`
	VoidAmount      float64             `json:"void_amount,required"`
	VoidReason      string              `json:"void_reason,required,nullable"`
	JSON            voidLedgerEntryJSON `json:"-"`
}

func (*VoidLedgerEntry) UnmarshalJSON added in v0.121.0

func (r *VoidLedgerEntry) UnmarshalJSON(data []byte) (err error)

type VoidLedgerEntryEntryStatus added in v0.121.0

type VoidLedgerEntryEntryStatus string
const (
	VoidLedgerEntryEntryStatusCommitted VoidLedgerEntryEntryStatus = "committed"
	VoidLedgerEntryEntryStatusPending   VoidLedgerEntryEntryStatus = "pending"
)

func (VoidLedgerEntryEntryStatus) IsKnown added in v0.121.0

func (r VoidLedgerEntryEntryStatus) IsKnown() bool

type VoidLedgerEntryEntryType added in v0.121.0

type VoidLedgerEntryEntryType string
const (
	VoidLedgerEntryEntryTypeVoid VoidLedgerEntryEntryType = "void"
)

func (VoidLedgerEntryEntryType) IsKnown added in v0.121.0

func (r VoidLedgerEntryEntryType) IsKnown() bool

type WebhookService added in v0.25.0

type WebhookService struct {
	Options []option.RequestOption
	// contains filtered or unexported fields
}

WebhookService contains methods and other services that help with interacting with the Orb API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWebhookService method instead.

func NewWebhookService added in v0.25.0

func NewWebhookService(opts ...option.RequestOption) (r *WebhookService)

NewWebhookService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*WebhookService) VerifySignature added in v0.25.0

func (r *WebhookService) VerifySignature(payload []byte, headers http.Header, secret string, now time.Time) (err error)

Validates whether or not the webhook payload was sent by Orb. Pass an empty string to use the secret defined at the client level.

An error will be raised if the webhook payload was not sent by Orb.

func (*WebhookService) VerifySignatureWithParams added in v0.107.0

func (r *WebhookService) VerifySignatureWithParams(params WebhookVerifySignatureParams) (err error)

Identical to VerifySignature, but allows you to pass in a WebhookVerifySignatureParams struct to specify extra parameters such as the tolerance for X-Orb-Timestamp.

type WebhookVerifySignatureParams added in v0.25.0

type WebhookVerifySignatureParams struct {
	Payload   []byte
	Headers   http.Header
	Secret    string
	Now       time.Time
	Tolerance time.Duration
}

Directories

Path Synopsis
examples
list-customers command
packages

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL