orb

package module
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: Apache-2.0 Imports: 23 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@v1.20.0'

Requirements

This library requires Go 1.22+.

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 world"),

	// 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 ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionAppliedToInvoice = shared.ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionAppliedToInvoice

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionCreditNoteApplied = shared.ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionCreditNoteApplied

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionCreditNoteVoided = shared.ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionCreditNoteVoided

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionExternalPayment = shared.ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionExternalPayment

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionManualAdjustment = shared.ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionManualAdjustment

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionOverpaymentRefund = shared.ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionOverpaymentRefund

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionProratedRefund = shared.ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionProratedRefund

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionReturnFromVoiding = shared.ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionReturnFromVoiding

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionRevertProratedRefund = shared.ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionRevertProratedRefund

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionSmallInvoiceCarryover = shared.ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsActionSmallInvoiceCarryover

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsTypeDecrement = shared.ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsTypeDecrement

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsTypeIncrement = shared.ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsTypeIncrement

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesInvoiceSourceOneOff = shared.ChangedSubscriptionResourcesCreatedInvoicesInvoiceSourceOneOff

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesInvoiceSourcePartial = shared.ChangedSubscriptionResourcesCreatedInvoicesInvoiceSourcePartial

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesInvoiceSourceSubscription = shared.ChangedSubscriptionResourcesCreatedInvoicesInvoiceSourceSubscription

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesLineItemsAdjustmentsAdjustmentTypeAmountDiscount = shared.ChangedSubscriptionResourcesCreatedInvoicesLineItemsAdjustmentsAdjustmentTypeAmountDiscount

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesLineItemsAdjustmentsAdjustmentTypeMaximum = shared.ChangedSubscriptionResourcesCreatedInvoicesLineItemsAdjustmentsAdjustmentTypeMaximum

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesLineItemsAdjustmentsAdjustmentTypeMinimum = shared.ChangedSubscriptionResourcesCreatedInvoicesLineItemsAdjustmentsAdjustmentTypeMinimum

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesLineItemsAdjustmentsAdjustmentTypePercentageDiscount = shared.ChangedSubscriptionResourcesCreatedInvoicesLineItemsAdjustmentsAdjustmentTypePercentageDiscount

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesLineItemsAdjustmentsAdjustmentTypeUsageDiscount = shared.ChangedSubscriptionResourcesCreatedInvoicesLineItemsAdjustmentsAdjustmentTypeUsageDiscount

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesLineItemsSubLineItemsTypeMatrix = shared.ChangedSubscriptionResourcesCreatedInvoicesLineItemsSubLineItemsTypeMatrix

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesLineItemsSubLineItemsTypeNull = shared.ChangedSubscriptionResourcesCreatedInvoicesLineItemsSubLineItemsTypeNull

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesLineItemsSubLineItemsTypeTier = shared.ChangedSubscriptionResourcesCreatedInvoicesLineItemsSubLineItemsTypeTier

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesPaymentAttemptsPaymentProviderStripe = shared.ChangedSubscriptionResourcesCreatedInvoicesPaymentAttemptsPaymentProviderStripe

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesStatusDraft = shared.ChangedSubscriptionResourcesCreatedInvoicesStatusDraft

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesStatusIssued = shared.ChangedSubscriptionResourcesCreatedInvoicesStatusIssued

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesStatusPaid = shared.ChangedSubscriptionResourcesCreatedInvoicesStatusPaid

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesStatusSynced = shared.ChangedSubscriptionResourcesCreatedInvoicesStatusSynced

This is an alias to an internal value.

View Source
const ChangedSubscriptionResourcesCreatedInvoicesStatusVoid = shared.ChangedSubscriptionResourcesCreatedInvoicesStatusVoid

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 CustomerTaxIDCountryAl = shared.CustomerTaxIDCountryAl

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryAm = shared.CustomerTaxIDCountryAm

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryAo = shared.CustomerTaxIDCountryAo

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 CustomerTaxIDCountryAw = shared.CustomerTaxIDCountryAw

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryAz = shared.CustomerTaxIDCountryAz

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryBa = shared.CustomerTaxIDCountryBa

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryBb = shared.CustomerTaxIDCountryBb

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryBd = shared.CustomerTaxIDCountryBd

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 CustomerTaxIDCountryBf = shared.CustomerTaxIDCountryBf

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 CustomerTaxIDCountryBj = shared.CustomerTaxIDCountryBj

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 CustomerTaxIDCountryBs = shared.CustomerTaxIDCountryBs

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryBy = shared.CustomerTaxIDCountryBy

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 CustomerTaxIDCountryCd = shared.CustomerTaxIDCountryCd

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 CustomerTaxIDCountryCm = shared.CustomerTaxIDCountryCm

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 CustomerTaxIDCountryCv = shared.CustomerTaxIDCountryCv

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 CustomerTaxIDCountryEt = shared.CustomerTaxIDCountryEt

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 CustomerTaxIDCountryGn = shared.CustomerTaxIDCountryGn

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 CustomerTaxIDCountryKg = shared.CustomerTaxIDCountryKg

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryKh = shared.CustomerTaxIDCountryKh

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 CustomerTaxIDCountryLa = shared.CustomerTaxIDCountryLa

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 CustomerTaxIDCountryMa = shared.CustomerTaxIDCountryMa

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryMd = shared.CustomerTaxIDCountryMd

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryMe = shared.CustomerTaxIDCountryMe

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryMk = shared.CustomerTaxIDCountryMk

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryMr = shared.CustomerTaxIDCountryMr

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 CustomerTaxIDCountryNp = shared.CustomerTaxIDCountryNp

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 CustomerTaxIDCountrySn = shared.CustomerTaxIDCountrySn

This is an alias to an internal value.

View Source
const CustomerTaxIDCountrySr = shared.CustomerTaxIDCountrySr

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 CustomerTaxIDCountryTj = shared.CustomerTaxIDCountryTj

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 CustomerTaxIDCountryTz = shared.CustomerTaxIDCountryTz

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 CustomerTaxIDCountryUg = shared.CustomerTaxIDCountryUg

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 CustomerTaxIDCountryUz = shared.CustomerTaxIDCountryUz

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 CustomerTaxIDCountryZm = shared.CustomerTaxIDCountryZm

This is an alias to an internal value.

View Source
const CustomerTaxIDCountryZw = shared.CustomerTaxIDCountryZw

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 CustomerTaxIDTypeAlTin = shared.CustomerTaxIDTypeAlTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeAmTin = shared.CustomerTaxIDTypeAmTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeAoTin = shared.CustomerTaxIDTypeAoTin

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 CustomerTaxIDTypeAwTin = shared.CustomerTaxIDTypeAwTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeAzTin = shared.CustomerTaxIDTypeAzTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeBaTin = shared.CustomerTaxIDTypeBaTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeBbTin = shared.CustomerTaxIDTypeBbTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeBdBin = shared.CustomerTaxIDTypeBdBin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeBfIfu = shared.CustomerTaxIDTypeBfIfu

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 CustomerTaxIDTypeBjIfu = shared.CustomerTaxIDTypeBjIfu

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 CustomerTaxIDTypeBsTin = shared.CustomerTaxIDTypeBsTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeByTin = shared.CustomerTaxIDTypeByTin

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 CustomerTaxIDTypeCdNif = shared.CustomerTaxIDTypeCdNif

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeChUid = shared.CustomerTaxIDTypeChUid

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 CustomerTaxIDTypeCmNiu = shared.CustomerTaxIDTypeCmNiu

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 CustomerTaxIDTypeCvNif = shared.CustomerTaxIDTypeCvNif

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeDeStn = shared.CustomerTaxIDTypeDeStn

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 CustomerTaxIDTypeEtTin = shared.CustomerTaxIDTypeEtTin

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 CustomerTaxIDTypeGnNif = shared.CustomerTaxIDTypeGnNif

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 CustomerTaxIDTypeHrOib = shared.CustomerTaxIDTypeHrOib

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 CustomerTaxIDTypeKgTin = shared.CustomerTaxIDTypeKgTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeKhTin = shared.CustomerTaxIDTypeKhTin

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 CustomerTaxIDTypeLaTin = shared.CustomerTaxIDTypeLaTin

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 CustomerTaxIDTypeLiVat = shared.CustomerTaxIDTypeLiVat

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeMaVat = shared.CustomerTaxIDTypeMaVat

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeMdVat = shared.CustomerTaxIDTypeMdVat

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeMePib = shared.CustomerTaxIDTypeMePib

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeMkVat = shared.CustomerTaxIDTypeMkVat

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeMrNif = shared.CustomerTaxIDTypeMrNif

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 CustomerTaxIDTypeNpPan = shared.CustomerTaxIDTypeNpPan

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 CustomerTaxIDTypeSnNinea = shared.CustomerTaxIDTypeSnNinea

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeSrFin = shared.CustomerTaxIDTypeSrFin

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 CustomerTaxIDTypeTjTin = shared.CustomerTaxIDTypeTjTin

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 CustomerTaxIDTypeTzVat = shared.CustomerTaxIDTypeTzVat

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 CustomerTaxIDTypeUgTin = shared.CustomerTaxIDTypeUgTin

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 CustomerTaxIDTypeUzTin = shared.CustomerTaxIDTypeUzTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeUzVat = shared.CustomerTaxIDTypeUzVat

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 CustomerTaxIDTypeZmTin = shared.CustomerTaxIDTypeZmTin

This is an alias to an internal value.

View Source
const CustomerTaxIDTypeZwTin = shared.CustomerTaxIDTypeZwTin

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 InvoiceCustomerBalanceTransactionsActionSmallInvoiceCarryover = shared.InvoiceCustomerBalanceTransactionsActionSmallInvoiceCarryover

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 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 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 NewFloatingMinimumCompositePriceCadenceAnnual = shared.NewFloatingMinimumCompositePriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewFloatingMinimumCompositePriceCadenceCustom = shared.NewFloatingMinimumCompositePriceCadenceCustom

This is an alias to an internal value.

View Source
const NewFloatingMinimumCompositePriceCadenceMonthly = shared.NewFloatingMinimumCompositePriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewFloatingMinimumCompositePriceCadenceOneTime = shared.NewFloatingMinimumCompositePriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewFloatingMinimumCompositePriceCadenceQuarterly = shared.NewFloatingMinimumCompositePriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewFloatingMinimumCompositePriceCadenceSemiAnnual = shared.NewFloatingMinimumCompositePriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewFloatingMinimumCompositePriceConversionRateConfigConversionRateTypeTiered = shared.NewFloatingMinimumCompositePriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewFloatingMinimumCompositePriceConversionRateConfigConversionRateTypeUnit = shared.NewFloatingMinimumCompositePriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewFloatingMinimumCompositePriceModelTypeMinimum = shared.NewFloatingMinimumCompositePriceModelTypeMinimum

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 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 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 NewPlanMinimumCompositePriceCadenceAnnual = shared.NewPlanMinimumCompositePriceCadenceAnnual

This is an alias to an internal value.

View Source
const NewPlanMinimumCompositePriceCadenceCustom = shared.NewPlanMinimumCompositePriceCadenceCustom

This is an alias to an internal value.

View Source
const NewPlanMinimumCompositePriceCadenceMonthly = shared.NewPlanMinimumCompositePriceCadenceMonthly

This is an alias to an internal value.

View Source
const NewPlanMinimumCompositePriceCadenceOneTime = shared.NewPlanMinimumCompositePriceCadenceOneTime

This is an alias to an internal value.

View Source
const NewPlanMinimumCompositePriceCadenceQuarterly = shared.NewPlanMinimumCompositePriceCadenceQuarterly

This is an alias to an internal value.

View Source
const NewPlanMinimumCompositePriceCadenceSemiAnnual = shared.NewPlanMinimumCompositePriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const NewPlanMinimumCompositePriceConversionRateConfigConversionRateTypeTiered = shared.NewPlanMinimumCompositePriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const NewPlanMinimumCompositePriceConversionRateConfigConversionRateTypeUnit = shared.NewPlanMinimumCompositePriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const NewPlanMinimumCompositePriceModelTypeMinimum = shared.NewPlanMinimumCompositePriceModelTypeMinimum

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 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 PriceBillingModeInAdvance = shared.PriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceBillingModeInArrear = shared.PriceBillingModeInArrear

This is an alias to an internal value.

View Source
const PriceBulkPriceBillingModeInAdvance = shared.PriceBulkPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceBulkPriceBillingModeInArrear = shared.PriceBulkPriceBillingModeInArrear

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 PriceBulkPricePriceTypeCompositePrice = shared.PriceBulkPricePriceTypeCompositePrice

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 PriceBulkWithProrationPriceBillingModeInAdvance = shared.PriceBulkWithProrationPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceBulkWithProrationPriceBillingModeInArrear = shared.PriceBulkWithProrationPriceBillingModeInArrear

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 PriceBulkWithProrationPricePriceTypeCompositePrice = shared.PriceBulkWithProrationPricePriceTypeCompositePrice

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 PriceCumulativeGroupedBulkPriceBillingModeInAdvance = shared.PriceCumulativeGroupedBulkPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceCumulativeGroupedBulkPriceBillingModeInArrear = shared.PriceCumulativeGroupedBulkPriceBillingModeInArrear

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 PriceCumulativeGroupedBulkPricePriceTypeCompositePrice = shared.PriceCumulativeGroupedBulkPricePriceTypeCompositePrice

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 PriceGroupedAllocationPriceBillingModeInAdvance = shared.PriceGroupedAllocationPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceGroupedAllocationPriceBillingModeInArrear = shared.PriceGroupedAllocationPriceBillingModeInArrear

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 PriceGroupedAllocationPricePriceTypeCompositePrice = shared.PriceGroupedAllocationPricePriceTypeCompositePrice

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 PriceGroupedTieredPackagePriceBillingModeInAdvance = shared.PriceGroupedTieredPackagePriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceGroupedTieredPackagePriceBillingModeInArrear = shared.PriceGroupedTieredPackagePriceBillingModeInArrear

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 PriceGroupedTieredPackagePricePriceTypeCompositePrice = shared.PriceGroupedTieredPackagePricePriceTypeCompositePrice

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 PriceGroupedTieredPriceBillingModeInAdvance = shared.PriceGroupedTieredPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceGroupedTieredPriceBillingModeInArrear = shared.PriceGroupedTieredPriceBillingModeInArrear

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 PriceGroupedTieredPricePriceTypeCompositePrice = shared.PriceGroupedTieredPricePriceTypeCompositePrice

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 PriceGroupedWithMeteredMinimumPriceBillingModeInAdvance = shared.PriceGroupedWithMeteredMinimumPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceGroupedWithMeteredMinimumPriceBillingModeInArrear = shared.PriceGroupedWithMeteredMinimumPriceBillingModeInArrear

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 PriceGroupedWithMeteredMinimumPricePriceTypeCompositePrice = shared.PriceGroupedWithMeteredMinimumPricePriceTypeCompositePrice

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 PriceGroupedWithMinMaxThresholdsPriceBillingModeInAdvance = shared.PriceGroupedWithMinMaxThresholdsPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceGroupedWithMinMaxThresholdsPriceBillingModeInArrear = shared.PriceGroupedWithMinMaxThresholdsPriceBillingModeInArrear

This is an alias to an internal value.

View Source
const PriceGroupedWithMinMaxThresholdsPriceCadenceAnnual = shared.PriceGroupedWithMinMaxThresholdsPriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceGroupedWithMinMaxThresholdsPriceCadenceCustom = shared.PriceGroupedWithMinMaxThresholdsPriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceGroupedWithMinMaxThresholdsPriceCadenceMonthly = shared.PriceGroupedWithMinMaxThresholdsPriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceGroupedWithMinMaxThresholdsPriceCadenceOneTime = shared.PriceGroupedWithMinMaxThresholdsPriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceGroupedWithMinMaxThresholdsPriceCadenceQuarterly = shared.PriceGroupedWithMinMaxThresholdsPriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceGroupedWithMinMaxThresholdsPriceCadenceSemiAnnual = shared.PriceGroupedWithMinMaxThresholdsPriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeTiered = shared.PriceGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeUnit = shared.PriceGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceGroupedWithMinMaxThresholdsPriceModelTypeGroupedWithMinMaxThresholds = shared.PriceGroupedWithMinMaxThresholdsPriceModelTypeGroupedWithMinMaxThresholds

This is an alias to an internal value.

View Source
const PriceGroupedWithMinMaxThresholdsPricePriceTypeCompositePrice = shared.PriceGroupedWithMinMaxThresholdsPricePriceTypeCompositePrice

This is an alias to an internal value.

View Source
const PriceGroupedWithMinMaxThresholdsPricePriceTypeFixedPrice = shared.PriceGroupedWithMinMaxThresholdsPricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceGroupedWithMinMaxThresholdsPricePriceTypeUsagePrice = shared.PriceGroupedWithMinMaxThresholdsPricePriceTypeUsagePrice

This is an alias to an internal value.

View Source
const PriceGroupedWithProratedMinimumPriceBillingModeInAdvance = shared.PriceGroupedWithProratedMinimumPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceGroupedWithProratedMinimumPriceBillingModeInArrear = shared.PriceGroupedWithProratedMinimumPriceBillingModeInArrear

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 PriceGroupedWithProratedMinimumPricePriceTypeCompositePrice = shared.PriceGroupedWithProratedMinimumPricePriceTypeCompositePrice

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 PriceMatrixPriceBillingModeInAdvance = shared.PriceMatrixPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceMatrixPriceBillingModeInArrear = shared.PriceMatrixPriceBillingModeInArrear

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 PriceMatrixPricePriceTypeCompositePrice = shared.PriceMatrixPricePriceTypeCompositePrice

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 PriceMatrixWithAllocationPriceBillingModeInAdvance = shared.PriceMatrixWithAllocationPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceMatrixWithAllocationPriceBillingModeInArrear = shared.PriceMatrixWithAllocationPriceBillingModeInArrear

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 PriceMatrixWithAllocationPricePriceTypeCompositePrice = shared.PriceMatrixWithAllocationPricePriceTypeCompositePrice

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 PriceMatrixWithDisplayNamePriceBillingModeInAdvance = shared.PriceMatrixWithDisplayNamePriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceMatrixWithDisplayNamePriceBillingModeInArrear = shared.PriceMatrixWithDisplayNamePriceBillingModeInArrear

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 PriceMatrixWithDisplayNamePricePriceTypeCompositePrice = shared.PriceMatrixWithDisplayNamePricePriceTypeCompositePrice

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 PriceMaxGroupTieredPackagePriceBillingModeInAdvance = shared.PriceMaxGroupTieredPackagePriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceMaxGroupTieredPackagePriceBillingModeInArrear = shared.PriceMaxGroupTieredPackagePriceBillingModeInArrear

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 PriceMaxGroupTieredPackagePricePriceTypeCompositePrice = shared.PriceMaxGroupTieredPackagePricePriceTypeCompositePrice

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 PriceMinimumCompositePriceBillingModeInAdvance = shared.PriceMinimumCompositePriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceMinimumCompositePriceBillingModeInArrear = shared.PriceMinimumCompositePriceBillingModeInArrear

This is an alias to an internal value.

View Source
const PriceMinimumCompositePriceCadenceAnnual = shared.PriceMinimumCompositePriceCadenceAnnual

This is an alias to an internal value.

View Source
const PriceMinimumCompositePriceCadenceCustom = shared.PriceMinimumCompositePriceCadenceCustom

This is an alias to an internal value.

View Source
const PriceMinimumCompositePriceCadenceMonthly = shared.PriceMinimumCompositePriceCadenceMonthly

This is an alias to an internal value.

View Source
const PriceMinimumCompositePriceCadenceOneTime = shared.PriceMinimumCompositePriceCadenceOneTime

This is an alias to an internal value.

View Source
const PriceMinimumCompositePriceCadenceQuarterly = shared.PriceMinimumCompositePriceCadenceQuarterly

This is an alias to an internal value.

View Source
const PriceMinimumCompositePriceCadenceSemiAnnual = shared.PriceMinimumCompositePriceCadenceSemiAnnual

This is an alias to an internal value.

View Source
const PriceMinimumCompositePriceConversionRateConfigConversionRateTypeTiered = shared.PriceMinimumCompositePriceConversionRateConfigConversionRateTypeTiered

This is an alias to an internal value.

View Source
const PriceMinimumCompositePriceConversionRateConfigConversionRateTypeUnit = shared.PriceMinimumCompositePriceConversionRateConfigConversionRateTypeUnit

This is an alias to an internal value.

View Source
const PriceMinimumCompositePriceModelTypeMinimum = shared.PriceMinimumCompositePriceModelTypeMinimum

This is an alias to an internal value.

View Source
const PriceMinimumCompositePricePriceTypeCompositePrice = shared.PriceMinimumCompositePricePriceTypeCompositePrice

This is an alias to an internal value.

View Source
const PriceMinimumCompositePricePriceTypeFixedPrice = shared.PriceMinimumCompositePricePriceTypeFixedPrice

This is an alias to an internal value.

View Source
const PriceMinimumCompositePricePriceTypeUsagePrice = shared.PriceMinimumCompositePricePriceTypeUsagePrice

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 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 PriceModelTypeGroupedWithMinMaxThresholds = shared.PriceModelTypeGroupedWithMinMaxThresholds

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 PriceModelTypeMinimum = shared.PriceModelTypeMinimum

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 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 PricePackagePriceBillingModeInAdvance = shared.PricePackagePriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PricePackagePriceBillingModeInArrear = shared.PricePackagePriceBillingModeInArrear

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 PricePackagePricePriceTypeCompositePrice = shared.PricePackagePricePriceTypeCompositePrice

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 PricePackageWithAllocationPriceBillingModeInAdvance = shared.PricePackageWithAllocationPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PricePackageWithAllocationPriceBillingModeInArrear = shared.PricePackageWithAllocationPriceBillingModeInArrear

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 PricePackageWithAllocationPricePriceTypeCompositePrice = shared.PricePackageWithAllocationPricePriceTypeCompositePrice

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 PricePriceTypeCompositePrice = shared.PricePriceTypeCompositePrice

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 PriceScalableMatrixWithTieredPricingPriceBillingModeInAdvance = shared.PriceScalableMatrixWithTieredPricingPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithTieredPricingPriceBillingModeInArrear = shared.PriceScalableMatrixWithTieredPricingPriceBillingModeInArrear

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 PriceScalableMatrixWithTieredPricingPricePriceTypeCompositePrice = shared.PriceScalableMatrixWithTieredPricingPricePriceTypeCompositePrice

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 PriceScalableMatrixWithUnitPricingPriceBillingModeInAdvance = shared.PriceScalableMatrixWithUnitPricingPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceScalableMatrixWithUnitPricingPriceBillingModeInArrear = shared.PriceScalableMatrixWithUnitPricingPriceBillingModeInArrear

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 PriceScalableMatrixWithUnitPricingPricePriceTypeCompositePrice = shared.PriceScalableMatrixWithUnitPricingPricePriceTypeCompositePrice

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 PriceThresholdTotalAmountPriceBillingModeInAdvance = shared.PriceThresholdTotalAmountPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceThresholdTotalAmountPriceBillingModeInArrear = shared.PriceThresholdTotalAmountPriceBillingModeInArrear

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 PriceThresholdTotalAmountPricePriceTypeCompositePrice = shared.PriceThresholdTotalAmountPricePriceTypeCompositePrice

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 PriceTieredPackagePriceBillingModeInAdvance = shared.PriceTieredPackagePriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceTieredPackagePriceBillingModeInArrear = shared.PriceTieredPackagePriceBillingModeInArrear

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 PriceTieredPackagePricePriceTypeCompositePrice = shared.PriceTieredPackagePricePriceTypeCompositePrice

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 PriceTieredPackageWithMinimumPriceBillingModeInAdvance = shared.PriceTieredPackageWithMinimumPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceTieredPackageWithMinimumPriceBillingModeInArrear = shared.PriceTieredPackageWithMinimumPriceBillingModeInArrear

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 PriceTieredPackageWithMinimumPricePriceTypeCompositePrice = shared.PriceTieredPackageWithMinimumPricePriceTypeCompositePrice

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 PriceTieredPriceBillingModeInAdvance = shared.PriceTieredPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceTieredPriceBillingModeInArrear = shared.PriceTieredPriceBillingModeInArrear

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 PriceTieredPricePriceTypeCompositePrice = shared.PriceTieredPricePriceTypeCompositePrice

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 PriceTieredWithMinimumPriceBillingModeInAdvance = shared.PriceTieredWithMinimumPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceTieredWithMinimumPriceBillingModeInArrear = shared.PriceTieredWithMinimumPriceBillingModeInArrear

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 PriceTieredWithMinimumPricePriceTypeCompositePrice = shared.PriceTieredWithMinimumPricePriceTypeCompositePrice

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 PriceTieredWithProrationPriceBillingModeInAdvance = shared.PriceTieredWithProrationPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceTieredWithProrationPriceBillingModeInArrear = shared.PriceTieredWithProrationPriceBillingModeInArrear

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 PriceTieredWithProrationPricePriceTypeCompositePrice = shared.PriceTieredWithProrationPricePriceTypeCompositePrice

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 PriceUnitPriceBillingModeInAdvance = shared.PriceUnitPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceUnitPriceBillingModeInArrear = shared.PriceUnitPriceBillingModeInArrear

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 PriceUnitPricePriceTypeCompositePrice = shared.PriceUnitPricePriceTypeCompositePrice

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 PriceUnitWithPercentPriceBillingModeInAdvance = shared.PriceUnitWithPercentPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceUnitWithPercentPriceBillingModeInArrear = shared.PriceUnitWithPercentPriceBillingModeInArrear

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 PriceUnitWithPercentPricePriceTypeCompositePrice = shared.PriceUnitWithPercentPricePriceTypeCompositePrice

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 PriceUnitWithProrationPriceBillingModeInAdvance = shared.PriceUnitWithProrationPriceBillingModeInAdvance

This is an alias to an internal value.

View Source
const PriceUnitWithProrationPriceBillingModeInArrear = shared.PriceUnitWithProrationPriceBillingModeInArrear

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 PriceUnitWithProrationPricePriceTypeCompositePrice = shared.PriceUnitWithProrationPricePriceTypeCompositePrice

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 subscription_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 subscription_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 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"`
	// New plan price request body params.
	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"`
	// The pricing model type
	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"`
	// Configuration for bulk pricing
	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"`
	GroupedWithMinMaxThresholdsConfig param.Field[interface{}] `json:"grouped_with_min_max_thresholds_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"`
	// Configuration for matrix pricing
	MatrixConfig param.Field[shared.MatrixConfigParam] `json:"matrix_config"`
	// Configuration for matrix_with_allocation pricing
	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"`
	MinimumConfig               param.Field[interface{}]                            `json:"minimum_config"`
	// Configuration for package pricing
	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"`
	// Configuration for tiered pricing
	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"`
	// Configuration for unit pricing
	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"`
}

New plan price request body params.

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

The pricing model type

const (
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeUnit                            BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "unit"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeTiered                          BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "tiered"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeBulk                            BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "bulk"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypePackage                         BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "package"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeMatrix                          BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "matrix"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeThresholdTotalAmount            BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "threshold_total_amount"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeTieredPackage                   BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "tiered_package"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeTieredWithMinimum               BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "tiered_with_minimum"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeGroupedTiered                   BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "grouped_tiered"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeTieredPackageWithMinimum        BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "tiered_package_with_minimum"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypePackageWithAllocation           BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "package_with_allocation"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeUnitWithPercent                 BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "unit_with_percent"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeMatrixWithAllocation            BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "matrix_with_allocation"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeTieredWithProration             BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "tiered_with_proration"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeUnitWithProration               BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "unit_with_proration"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeGroupedAllocation               BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "grouped_allocation"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeBulkWithProration               BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "bulk_with_proration"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeGroupedWithProratedMinimum      BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "grouped_with_prorated_minimum"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeGroupedWithMeteredMinimum       BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "grouped_with_metered_minimum"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeGroupedWithMinMaxThresholds     BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "grouped_with_min_max_thresholds"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeMatrixWithDisplayName           BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "matrix_with_display_name"
	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"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelTypeMinimum                         BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType = "minimum"
)

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceModelType) IsKnown added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPrice added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence] `json:"cadence,required"`
	// Configuration for grouped_with_min_max_thresholds pricing
	GroupedWithMinMaxThresholdsConfig param.Field[BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig] `json:"grouped_with_min_max_thresholds_config,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType] `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[BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion] `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 (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPrice) ImplementsBetaExternalPlanIDNewPlanVersionParamsAddPricesPriceUnion added in v1.14.0

func (r BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPrice) ImplementsBetaExternalPlanIDNewPlanVersionParamsAddPricesPriceUnion()

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPrice) MarshalJSON added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence string

The cadence to bill for this price on.

const (
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceAnnual     BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "annual"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceSemiAnnual BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "semi_annual"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceMonthly    BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "monthly"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceQuarterly  BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "quarterly"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceOneTime    BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "one_time"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceCustom     BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "custom"
)

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence) IsKnown added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig struct {
	ConversionRateType param.Field[BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                                            `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                                              `json:"unit_config"`
}

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsBetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

func (r BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsBetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig) MarshalJSON added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType string
const (
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeUnit   BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "unit"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeTiered BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "tiered"
)

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType) IsKnown added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion interface {
	ImplementsBetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig.

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig struct {
	// The event property used to group before applying thresholds
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// The maximum amount to charge each group
	MaximumCharge param.Field[string] `json:"maximum_charge,required"`
	// The minimum amount to charge each group, regardless of usage
	MinimumCharge param.Field[string] `json:"minimum_charge,required"`
	// The base price charged per group
	PerUnitRate param.Field[string] `json:"per_unit_rate,required"`
}

Configuration for grouped_with_min_max_thresholds pricing

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig) MarshalJSON added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType string

The pricing model type

const (
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelTypeGroupedWithMinMaxThresholds BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType = "grouped_with_min_max_thresholds"
)

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType) IsKnown added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPrice added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for tiered_with_proration pricing
	TieredWithProrationConfig param.Field[BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig] `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[BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion] `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 (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPrice) ImplementsBetaExternalPlanIDNewPlanVersionParamsAddPricesPriceUnion added in v1.16.0

func (r BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPrice) ImplementsBetaExternalPlanIDNewPlanVersionParamsAddPricesPriceUnion()

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPrice) MarshalJSON added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadenceAnnual     BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence = "annual"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadenceSemiAnnual BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence = "semi_annual"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadenceMonthly    BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence = "monthly"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadenceQuarterly  BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence = "quarterly"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadenceOneTime    BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence = "one_time"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadenceCustom     BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence = "custom"
)

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence) IsKnown added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfig added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfig struct {
	ConversionRateType param.Field[BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                                    `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                                      `json:"unit_config"`
}

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfig) ImplementsBetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion added in v1.16.0

func (r BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfig) ImplementsBetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion()

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfig) MarshalJSON added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType string
const (
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateTypeUnit   BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType = "unit"
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateTypeTiered BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType = "tiered"
)

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType) IsKnown added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion interface {
	ImplementsBetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfig.

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceModelType added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceModelType string

The pricing model type

const (
	BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceModelTypeTieredWithProration BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceModelType = "tiered_with_proration"
)

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceModelType) IsKnown added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig struct {
	// Tiers for rating based on total usage quantities into the specified tier with
	// proration
	Tiers param.Field[[]BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier] `json:"tiers,required"`
}

Configuration for tiered_with_proration pricing

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig) MarshalJSON added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier struct {
	// Inclusive tier starting value
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Amount per unit
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a single tiered with proration tier

func (BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier) MarshalJSON added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceUnion added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceUnion interface {
	ImplementsBetaExternalPlanIDNewPlanVersionParamsAddPricesPriceUnion()
}

New plan price request body params.

Satisfied by shared.NewPlanUnitPriceParam, shared.NewPlanTieredPriceParam, shared.NewPlanBulkPriceParam, shared.NewPlanPackagePriceParam, shared.NewPlanMatrixPriceParam, shared.NewPlanThresholdTotalAmountPriceParam, shared.NewPlanTieredPackagePriceParam, shared.NewPlanTieredWithMinimumPriceParam, shared.NewPlanGroupedTieredPriceParam, shared.NewPlanTieredPackageWithMinimumPriceParam, shared.NewPlanPackageWithAllocationPriceParam, shared.NewPlanUnitWithPercentPriceParam, shared.NewPlanMatrixWithAllocationPriceParam, BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPrice, shared.NewPlanUnitWithProrationPriceParam, shared.NewPlanGroupedAllocationPriceParam, shared.NewPlanBulkWithProrationPriceParam, shared.NewPlanGroupedWithProratedMinimumPriceParam, shared.NewPlanGroupedWithMeteredMinimumPriceParam, BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPrice, shared.NewPlanMatrixWithDisplayNamePriceParam, shared.NewPlanGroupedTieredPackagePriceParam, shared.NewPlanMaxGroupTieredPackagePriceParam, shared.NewPlanScalableMatrixWithUnitPricingPriceParam, shared.NewPlanScalableMatrixWithTieredPricingPriceParam, shared.NewPlanCumulativeGroupedBulkPriceParam, shared.NewPlanMinimumCompositePriceParam, 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"`
	// New plan price request body params.
	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"`
	// The pricing model type
	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"`
	// Configuration for bulk pricing
	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"`
	GroupedWithMinMaxThresholdsConfig param.Field[interface{}] `json:"grouped_with_min_max_thresholds_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"`
	// Configuration for matrix pricing
	MatrixConfig param.Field[shared.MatrixConfigParam] `json:"matrix_config"`
	// Configuration for matrix_with_allocation pricing
	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"`
	MinimumConfig               param.Field[interface{}]                            `json:"minimum_config"`
	// Configuration for package pricing
	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"`
	// Configuration for tiered pricing
	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"`
	// Configuration for unit pricing
	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"`
}

New plan price request body params.

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

The pricing model type

const (
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeUnit                            BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "unit"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeTiered                          BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "tiered"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeBulk                            BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "bulk"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypePackage                         BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "package"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeMatrix                          BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "matrix"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeThresholdTotalAmount            BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "threshold_total_amount"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeTieredPackage                   BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "tiered_package"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeTieredWithMinimum               BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "tiered_with_minimum"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeGroupedTiered                   BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "grouped_tiered"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeTieredPackageWithMinimum        BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "tiered_package_with_minimum"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypePackageWithAllocation           BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "package_with_allocation"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeUnitWithPercent                 BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "unit_with_percent"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeMatrixWithAllocation            BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "matrix_with_allocation"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeTieredWithProration             BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "tiered_with_proration"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeUnitWithProration               BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "unit_with_proration"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeGroupedAllocation               BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "grouped_allocation"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeBulkWithProration               BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "bulk_with_proration"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeGroupedWithProratedMinimum      BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "grouped_with_prorated_minimum"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeGroupedWithMeteredMinimum       BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "grouped_with_metered_minimum"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeGroupedWithMinMaxThresholds     BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "grouped_with_min_max_thresholds"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeMatrixWithDisplayName           BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "matrix_with_display_name"
	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"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelTypeMinimum                         BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType = "minimum"
)

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceModelType) IsKnown added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPrice added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence] `json:"cadence,required"`
	// Configuration for grouped_with_min_max_thresholds pricing
	GroupedWithMinMaxThresholdsConfig param.Field[BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig] `json:"grouped_with_min_max_thresholds_config,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType] `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[BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion] `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 (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPrice) ImplementsBetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceUnion added in v1.14.0

func (r BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPrice) ImplementsBetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceUnion()

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPrice) MarshalJSON added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence string

The cadence to bill for this price on.

const (
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceAnnual     BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "annual"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceSemiAnnual BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "semi_annual"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceMonthly    BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "monthly"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceQuarterly  BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "quarterly"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceOneTime    BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "one_time"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceCustom     BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "custom"
)

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence) IsKnown added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig struct {
	ConversionRateType param.Field[BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                                                `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                                                  `json:"unit_config"`
}

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsBetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

func (r BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsBetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig) MarshalJSON added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType string
const (
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeUnit   BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "unit"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeTiered BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "tiered"
)

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType) IsKnown added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion interface {
	ImplementsBetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig.

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig struct {
	// The event property used to group before applying thresholds
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// The maximum amount to charge each group
	MaximumCharge param.Field[string] `json:"maximum_charge,required"`
	// The minimum amount to charge each group, regardless of usage
	MinimumCharge param.Field[string] `json:"minimum_charge,required"`
	// The base price charged per group
	PerUnitRate param.Field[string] `json:"per_unit_rate,required"`
}

Configuration for grouped_with_min_max_thresholds pricing

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig) MarshalJSON added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType string

The pricing model type

const (
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelTypeGroupedWithMinMaxThresholds BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType = "grouped_with_min_max_thresholds"
)

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType) IsKnown added in v1.14.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPrice added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for tiered_with_proration pricing
	TieredWithProrationConfig param.Field[BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig] `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[BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion] `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 (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPrice) ImplementsBetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceUnion added in v1.16.0

func (r BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPrice) ImplementsBetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceUnion()

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPrice) MarshalJSON added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadenceAnnual     BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence = "annual"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadenceSemiAnnual BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence = "semi_annual"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadenceMonthly    BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence = "monthly"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadenceQuarterly  BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence = "quarterly"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadenceOneTime    BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence = "one_time"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadenceCustom     BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence = "custom"
)

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence) IsKnown added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfig added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfig struct {
	ConversionRateType param.Field[BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                                        `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                                          `json:"unit_config"`
}

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfig) ImplementsBetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion added in v1.16.0

func (r BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfig) ImplementsBetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion()

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfig) MarshalJSON added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType string
const (
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateTypeUnit   BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType = "unit"
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateTypeTiered BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType = "tiered"
)

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType) IsKnown added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion interface {
	ImplementsBetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfig.

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceModelType added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceModelType string

The pricing model type

const (
	BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceModelTypeTieredWithProration BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceModelType = "tiered_with_proration"
)

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceModelType) IsKnown added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig struct {
	// Tiers for rating based on total usage quantities into the specified tier with
	// proration
	Tiers param.Field[[]BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier] `json:"tiers,required"`
}

Configuration for tiered_with_proration pricing

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig) MarshalJSON added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier struct {
	// Inclusive tier starting value
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Amount per unit
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a single tiered with proration tier

func (BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier) MarshalJSON added in v1.16.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceUnion added in v0.116.0

type BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceUnion interface {
	ImplementsBetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceUnion()
}

New plan price request body params.

Satisfied by shared.NewPlanUnitPriceParam, shared.NewPlanTieredPriceParam, shared.NewPlanBulkPriceParam, shared.NewPlanPackagePriceParam, shared.NewPlanMatrixPriceParam, shared.NewPlanThresholdTotalAmountPriceParam, shared.NewPlanTieredPackagePriceParam, shared.NewPlanTieredWithMinimumPriceParam, shared.NewPlanGroupedTieredPriceParam, shared.NewPlanTieredPackageWithMinimumPriceParam, shared.NewPlanPackageWithAllocationPriceParam, shared.NewPlanUnitWithPercentPriceParam, shared.NewPlanMatrixWithAllocationPriceParam, BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPrice, shared.NewPlanUnitWithProrationPriceParam, shared.NewPlanGroupedAllocationPriceParam, shared.NewPlanBulkWithProrationPriceParam, shared.NewPlanGroupedWithProratedMinimumPriceParam, shared.NewPlanGroupedWithMeteredMinimumPriceParam, BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPrice, shared.NewPlanMatrixWithDisplayNamePriceParam, shared.NewPlanGroupedTieredPackagePriceParam, shared.NewPlanMaxGroupTieredPackagePriceParam, shared.NewPlanScalableMatrixWithUnitPricingPriceParam, shared.NewPlanScalableMatrixWithTieredPricingPriceParam, shared.NewPlanCumulativeGroupedBulkPriceParam, shared.NewPlanMinimumCompositePriceParam, 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 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"`
	// New plan price request body params.
	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"`
	// The pricing model type
	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"`
	// Configuration for bulk pricing
	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"`
	GroupedWithMinMaxThresholdsConfig param.Field[interface{}] `json:"grouped_with_min_max_thresholds_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"`
	// Configuration for matrix pricing
	MatrixConfig param.Field[shared.MatrixConfigParam] `json:"matrix_config"`
	// Configuration for matrix_with_allocation pricing
	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"`
	MinimumConfig               param.Field[interface{}]                            `json:"minimum_config"`
	// Configuration for package pricing
	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"`
	// Configuration for tiered pricing
	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"`
	// Configuration for unit pricing
	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"`
}

New plan price request body params.

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

The pricing model type

const (
	BetaNewPlanVersionParamsAddPricesPriceModelTypeUnit                            BetaNewPlanVersionParamsAddPricesPriceModelType = "unit"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeTiered                          BetaNewPlanVersionParamsAddPricesPriceModelType = "tiered"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeBulk                            BetaNewPlanVersionParamsAddPricesPriceModelType = "bulk"
	BetaNewPlanVersionParamsAddPricesPriceModelTypePackage                         BetaNewPlanVersionParamsAddPricesPriceModelType = "package"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeMatrix                          BetaNewPlanVersionParamsAddPricesPriceModelType = "matrix"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeThresholdTotalAmount            BetaNewPlanVersionParamsAddPricesPriceModelType = "threshold_total_amount"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeTieredPackage                   BetaNewPlanVersionParamsAddPricesPriceModelType = "tiered_package"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeTieredWithMinimum               BetaNewPlanVersionParamsAddPricesPriceModelType = "tiered_with_minimum"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeGroupedTiered                   BetaNewPlanVersionParamsAddPricesPriceModelType = "grouped_tiered"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeTieredPackageWithMinimum        BetaNewPlanVersionParamsAddPricesPriceModelType = "tiered_package_with_minimum"
	BetaNewPlanVersionParamsAddPricesPriceModelTypePackageWithAllocation           BetaNewPlanVersionParamsAddPricesPriceModelType = "package_with_allocation"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeUnitWithPercent                 BetaNewPlanVersionParamsAddPricesPriceModelType = "unit_with_percent"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeMatrixWithAllocation            BetaNewPlanVersionParamsAddPricesPriceModelType = "matrix_with_allocation"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeTieredWithProration             BetaNewPlanVersionParamsAddPricesPriceModelType = "tiered_with_proration"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeUnitWithProration               BetaNewPlanVersionParamsAddPricesPriceModelType = "unit_with_proration"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeGroupedAllocation               BetaNewPlanVersionParamsAddPricesPriceModelType = "grouped_allocation"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeBulkWithProration               BetaNewPlanVersionParamsAddPricesPriceModelType = "bulk_with_proration"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeGroupedWithProratedMinimum      BetaNewPlanVersionParamsAddPricesPriceModelType = "grouped_with_prorated_minimum"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeGroupedWithMeteredMinimum       BetaNewPlanVersionParamsAddPricesPriceModelType = "grouped_with_metered_minimum"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeGroupedWithMinMaxThresholds     BetaNewPlanVersionParamsAddPricesPriceModelType = "grouped_with_min_max_thresholds"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeMatrixWithDisplayName           BetaNewPlanVersionParamsAddPricesPriceModelType = "matrix_with_display_name"
	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"
	BetaNewPlanVersionParamsAddPricesPriceModelTypeMinimum                         BetaNewPlanVersionParamsAddPricesPriceModelType = "minimum"
)

func (BetaNewPlanVersionParamsAddPricesPriceModelType) IsKnown added in v0.116.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPrice added in v1.14.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence] `json:"cadence,required"`
	// Configuration for grouped_with_min_max_thresholds pricing
	GroupedWithMinMaxThresholdsConfig param.Field[BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig] `json:"grouped_with_min_max_thresholds_config,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType] `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[BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion] `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 (BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPrice) ImplementsBetaNewPlanVersionParamsAddPricesPriceUnion added in v1.14.0

func (r BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPrice) ImplementsBetaNewPlanVersionParamsAddPricesPriceUnion()

func (BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPrice) MarshalJSON added in v1.14.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence added in v1.14.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence string

The cadence to bill for this price on.

const (
	BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceAnnual     BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "annual"
	BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceSemiAnnual BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "semi_annual"
	BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceMonthly    BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "monthly"
	BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceQuarterly  BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "quarterly"
	BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceOneTime    BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "one_time"
	BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceCustom     BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "custom"
)

func (BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence) IsKnown added in v1.14.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig added in v1.14.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig struct {
	ConversionRateType param.Field[BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                              `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                                `json:"unit_config"`
}

func (BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsBetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

func (r BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsBetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()

func (BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig) MarshalJSON added in v1.14.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType added in v1.14.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType string
const (
	BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeUnit   BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "unit"
	BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeTiered BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "tiered"
)

func (BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType) IsKnown added in v1.14.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion interface {
	ImplementsBetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig.

type BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig added in v1.16.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig struct {
	// The event property used to group before applying thresholds
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// The maximum amount to charge each group
	MaximumCharge param.Field[string] `json:"maximum_charge,required"`
	// The minimum amount to charge each group, regardless of usage
	MinimumCharge param.Field[string] `json:"minimum_charge,required"`
	// The base price charged per group
	PerUnitRate param.Field[string] `json:"per_unit_rate,required"`
}

Configuration for grouped_with_min_max_thresholds pricing

func (BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig) MarshalJSON added in v1.16.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType added in v1.14.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType string

The pricing model type

const (
	BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelTypeGroupedWithMinMaxThresholds BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType = "grouped_with_min_max_thresholds"
)

func (BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType) IsKnown added in v1.14.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPrice added in v1.16.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for tiered_with_proration pricing
	TieredWithProrationConfig param.Field[BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig] `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[BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion] `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 (BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPrice) ImplementsBetaNewPlanVersionParamsAddPricesPriceUnion added in v1.16.0

func (r BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPrice) ImplementsBetaNewPlanVersionParamsAddPricesPriceUnion()

func (BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPrice) MarshalJSON added in v1.16.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence added in v1.16.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadenceAnnual     BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence = "annual"
	BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadenceSemiAnnual BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence = "semi_annual"
	BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadenceMonthly    BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence = "monthly"
	BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadenceQuarterly  BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence = "quarterly"
	BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadenceOneTime    BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence = "one_time"
	BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadenceCustom     BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence = "custom"
)

func (BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceCadence) IsKnown added in v1.16.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfig added in v1.16.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfig struct {
	ConversionRateType param.Field[BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                      `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                        `json:"unit_config"`
}

func (BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfig) ImplementsBetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion added in v1.16.0

func (r BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfig) ImplementsBetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion()

func (BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfig) MarshalJSON added in v1.16.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType added in v1.16.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType string
const (
	BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateTypeUnit   BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType = "unit"
	BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateTypeTiered BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType = "tiered"
)

func (BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType) IsKnown added in v1.16.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion added in v1.16.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion interface {
	ImplementsBetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceConversionRateConfig.

type BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceModelType added in v1.16.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceModelType string

The pricing model type

const (
	BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceModelTypeTieredWithProration BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceModelType = "tiered_with_proration"
)

func (BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceModelType) IsKnown added in v1.16.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig added in v1.16.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig struct {
	// Tiers for rating based on total usage quantities into the specified tier with
	// proration
	Tiers param.Field[[]BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier] `json:"tiers,required"`
}

Configuration for tiered_with_proration pricing

func (BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig) MarshalJSON added in v1.16.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier added in v1.16.0

type BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier struct {
	// Inclusive tier starting value
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Amount per unit
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a single tiered with proration tier

func (BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier) MarshalJSON added in v1.16.0

type BetaNewPlanVersionParamsAddPricesPriceUnion added in v0.116.0

type BetaNewPlanVersionParamsAddPricesPriceUnion interface {
	ImplementsBetaNewPlanVersionParamsAddPricesPriceUnion()
}

New plan price request body params.

Satisfied by shared.NewPlanUnitPriceParam, shared.NewPlanTieredPriceParam, shared.NewPlanBulkPriceParam, shared.NewPlanPackagePriceParam, shared.NewPlanMatrixPriceParam, shared.NewPlanThresholdTotalAmountPriceParam, shared.NewPlanTieredPackagePriceParam, shared.NewPlanTieredWithMinimumPriceParam, shared.NewPlanGroupedTieredPriceParam, shared.NewPlanTieredPackageWithMinimumPriceParam, shared.NewPlanPackageWithAllocationPriceParam, shared.NewPlanUnitWithPercentPriceParam, shared.NewPlanMatrixWithAllocationPriceParam, BetaNewPlanVersionParamsAddPricesPriceNewPlanTieredWithProrationPrice, shared.NewPlanUnitWithProrationPriceParam, shared.NewPlanGroupedAllocationPriceParam, shared.NewPlanBulkWithProrationPriceParam, shared.NewPlanGroupedWithProratedMinimumPriceParam, shared.NewPlanGroupedWithMeteredMinimumPriceParam, BetaNewPlanVersionParamsAddPricesPriceNewPlanGroupedWithMinMaxThresholdsPrice, shared.NewPlanMatrixWithDisplayNamePriceParam, shared.NewPlanGroupedTieredPackagePriceParam, shared.NewPlanMaxGroupTieredPackagePriceParam, shared.NewPlanScalableMatrixWithUnitPricingPriceParam, shared.NewPlanScalableMatrixWithTieredPricingPriceParam, shared.NewPlanCumulativeGroupedBulkPriceParam, shared.NewPlanMinimumCompositePriceParam, BetaNewPlanVersionParamsAddPricesPrice.

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"`
	// New plan price request body params.
	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"`
	// The pricing model type
	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"`
	// Configuration for bulk pricing
	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"`
	GroupedWithMinMaxThresholdsConfig param.Field[interface{}] `json:"grouped_with_min_max_thresholds_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"`
	// Configuration for matrix pricing
	MatrixConfig param.Field[shared.MatrixConfigParam] `json:"matrix_config"`
	// Configuration for matrix_with_allocation pricing
	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"`
	MinimumConfig               param.Field[interface{}]                            `json:"minimum_config"`
	// Configuration for package pricing
	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"`
	// Configuration for tiered pricing
	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"`
	// Configuration for unit pricing
	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"`
}

New plan price request body params.

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

The pricing model type

const (
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeUnit                            BetaNewPlanVersionParamsReplacePricesPriceModelType = "unit"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeTiered                          BetaNewPlanVersionParamsReplacePricesPriceModelType = "tiered"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeBulk                            BetaNewPlanVersionParamsReplacePricesPriceModelType = "bulk"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypePackage                         BetaNewPlanVersionParamsReplacePricesPriceModelType = "package"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeMatrix                          BetaNewPlanVersionParamsReplacePricesPriceModelType = "matrix"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeThresholdTotalAmount            BetaNewPlanVersionParamsReplacePricesPriceModelType = "threshold_total_amount"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeTieredPackage                   BetaNewPlanVersionParamsReplacePricesPriceModelType = "tiered_package"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeTieredWithMinimum               BetaNewPlanVersionParamsReplacePricesPriceModelType = "tiered_with_minimum"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeGroupedTiered                   BetaNewPlanVersionParamsReplacePricesPriceModelType = "grouped_tiered"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeTieredPackageWithMinimum        BetaNewPlanVersionParamsReplacePricesPriceModelType = "tiered_package_with_minimum"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypePackageWithAllocation           BetaNewPlanVersionParamsReplacePricesPriceModelType = "package_with_allocation"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeUnitWithPercent                 BetaNewPlanVersionParamsReplacePricesPriceModelType = "unit_with_percent"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeMatrixWithAllocation            BetaNewPlanVersionParamsReplacePricesPriceModelType = "matrix_with_allocation"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeTieredWithProration             BetaNewPlanVersionParamsReplacePricesPriceModelType = "tiered_with_proration"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeUnitWithProration               BetaNewPlanVersionParamsReplacePricesPriceModelType = "unit_with_proration"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeGroupedAllocation               BetaNewPlanVersionParamsReplacePricesPriceModelType = "grouped_allocation"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeBulkWithProration               BetaNewPlanVersionParamsReplacePricesPriceModelType = "bulk_with_proration"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeGroupedWithProratedMinimum      BetaNewPlanVersionParamsReplacePricesPriceModelType = "grouped_with_prorated_minimum"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeGroupedWithMeteredMinimum       BetaNewPlanVersionParamsReplacePricesPriceModelType = "grouped_with_metered_minimum"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeGroupedWithMinMaxThresholds     BetaNewPlanVersionParamsReplacePricesPriceModelType = "grouped_with_min_max_thresholds"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeMatrixWithDisplayName           BetaNewPlanVersionParamsReplacePricesPriceModelType = "matrix_with_display_name"
	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"
	BetaNewPlanVersionParamsReplacePricesPriceModelTypeMinimum                         BetaNewPlanVersionParamsReplacePricesPriceModelType = "minimum"
)

func (BetaNewPlanVersionParamsReplacePricesPriceModelType) IsKnown added in v0.116.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPrice added in v1.14.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence] `json:"cadence,required"`
	// Configuration for grouped_with_min_max_thresholds pricing
	GroupedWithMinMaxThresholdsConfig param.Field[BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig] `json:"grouped_with_min_max_thresholds_config,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType] `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[BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion] `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 (BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPrice) ImplementsBetaNewPlanVersionParamsReplacePricesPriceUnion added in v1.14.0

func (r BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPrice) ImplementsBetaNewPlanVersionParamsReplacePricesPriceUnion()

func (BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPrice) MarshalJSON added in v1.14.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence added in v1.14.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence string

The cadence to bill for this price on.

const (
	BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceAnnual     BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "annual"
	BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceSemiAnnual BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "semi_annual"
	BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceMonthly    BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "monthly"
	BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceQuarterly  BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "quarterly"
	BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceOneTime    BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "one_time"
	BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceCustom     BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "custom"
)

func (BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence) IsKnown added in v1.14.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig added in v1.14.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig struct {
	ConversionRateType param.Field[BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                                  `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                                    `json:"unit_config"`
}

func (BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsBetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

func (r BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsBetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()

func (BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig) MarshalJSON added in v1.14.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType added in v1.14.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType string
const (
	BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeUnit   BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "unit"
	BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeTiered BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "tiered"
)

func (BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType) IsKnown added in v1.14.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion interface {
	ImplementsBetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig.

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig added in v1.16.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig struct {
	// The event property used to group before applying thresholds
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// The maximum amount to charge each group
	MaximumCharge param.Field[string] `json:"maximum_charge,required"`
	// The minimum amount to charge each group, regardless of usage
	MinimumCharge param.Field[string] `json:"minimum_charge,required"`
	// The base price charged per group
	PerUnitRate param.Field[string] `json:"per_unit_rate,required"`
}

Configuration for grouped_with_min_max_thresholds pricing

func (BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig) MarshalJSON added in v1.16.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType added in v1.14.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType string

The pricing model type

const (
	BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelTypeGroupedWithMinMaxThresholds BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType = "grouped_with_min_max_thresholds"
)

func (BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType) IsKnown added in v1.14.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPrice added in v1.16.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for tiered_with_proration pricing
	TieredWithProrationConfig param.Field[BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig] `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[BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion] `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 (BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPrice) ImplementsBetaNewPlanVersionParamsReplacePricesPriceUnion added in v1.16.0

func (r BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPrice) ImplementsBetaNewPlanVersionParamsReplacePricesPriceUnion()

func (BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPrice) MarshalJSON added in v1.16.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence added in v1.16.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadenceAnnual     BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence = "annual"
	BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadenceSemiAnnual BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence = "semi_annual"
	BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadenceMonthly    BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence = "monthly"
	BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadenceQuarterly  BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence = "quarterly"
	BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadenceOneTime    BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence = "one_time"
	BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadenceCustom     BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence = "custom"
)

func (BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceCadence) IsKnown added in v1.16.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfig added in v1.16.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfig struct {
	ConversionRateType param.Field[BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                          `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                            `json:"unit_config"`
}

func (BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfig) ImplementsBetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion added in v1.16.0

func (r BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfig) ImplementsBetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion()

func (BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfig) MarshalJSON added in v1.16.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType added in v1.16.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType string
const (
	BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateTypeUnit   BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType = "unit"
	BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateTypeTiered BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType = "tiered"
)

func (BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType) IsKnown added in v1.16.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion added in v1.16.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion interface {
	ImplementsBetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceConversionRateConfig.

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceModelType added in v1.16.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceModelType string

The pricing model type

const (
	BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceModelTypeTieredWithProration BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceModelType = "tiered_with_proration"
)

func (BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceModelType) IsKnown added in v1.16.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig added in v1.16.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig struct {
	// Tiers for rating based on total usage quantities into the specified tier with
	// proration
	Tiers param.Field[[]BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier] `json:"tiers,required"`
}

Configuration for tiered_with_proration pricing

func (BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig) MarshalJSON added in v1.16.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier added in v1.16.0

type BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier struct {
	// Inclusive tier starting value
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Amount per unit
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a single tiered with proration tier

func (BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier) MarshalJSON added in v1.16.0

type BetaNewPlanVersionParamsReplacePricesPriceUnion added in v0.116.0

type BetaNewPlanVersionParamsReplacePricesPriceUnion interface {
	ImplementsBetaNewPlanVersionParamsReplacePricesPriceUnion()
}

New plan price request body params.

Satisfied by shared.NewPlanUnitPriceParam, shared.NewPlanTieredPriceParam, shared.NewPlanBulkPriceParam, shared.NewPlanPackagePriceParam, shared.NewPlanMatrixPriceParam, shared.NewPlanThresholdTotalAmountPriceParam, shared.NewPlanTieredPackagePriceParam, shared.NewPlanTieredWithMinimumPriceParam, shared.NewPlanGroupedTieredPriceParam, shared.NewPlanTieredPackageWithMinimumPriceParam, shared.NewPlanPackageWithAllocationPriceParam, shared.NewPlanUnitWithPercentPriceParam, shared.NewPlanMatrixWithAllocationPriceParam, BetaNewPlanVersionParamsReplacePricesPriceNewPlanTieredWithProrationPrice, shared.NewPlanUnitWithProrationPriceParam, shared.NewPlanGroupedAllocationPriceParam, shared.NewPlanBulkWithProrationPriceParam, shared.NewPlanGroupedWithProratedMinimumPriceParam, shared.NewPlanGroupedWithMeteredMinimumPriceParam, BetaNewPlanVersionParamsReplacePricesPriceNewPlanGroupedWithMinMaxThresholdsPrice, shared.NewPlanMatrixWithDisplayNamePriceParam, shared.NewPlanGroupedTieredPackagePriceParam, shared.NewPlanMaxGroupTieredPackagePriceParam, shared.NewPlanScalableMatrixWithUnitPricingPriceParam, shared.NewPlanScalableMatrixWithTieredPricingPriceParam, shared.NewPlanCumulativeGroupedBulkPriceParam, shared.NewPlanMinimumCompositePriceParam, BetaNewPlanVersionParamsReplacePricesPrice.

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 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 BulkConfig added in v0.121.0

type BulkConfig = shared.BulkConfig

Configuration for bulk pricing

This is an alias to an internal type.

type BulkConfigParam added in v0.121.0

type BulkConfigParam = shared.BulkConfigParam

Configuration for bulk pricing

This is an alias to an internal type.

type BulkTier added in v0.121.0

type BulkTier = shared.BulkTier

Configuration for a single bulk pricing tier

This is an alias to an internal type.

type BulkTierParam added in v0.121.0

type BulkTierParam = shared.BulkTierParam

Configuration for a single bulk pricing tier

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 ChangedSubscriptionResourcesCreatedInvoice added in v1.19.1

type ChangedSubscriptionResourcesCreatedInvoice = shared.ChangedSubscriptionResourcesCreatedInvoice

This is an alias to an internal type.

type ChangedSubscriptionResourcesCreatedInvoicesAutoCollection added in v1.19.1

type ChangedSubscriptionResourcesCreatedInvoicesAutoCollection = shared.ChangedSubscriptionResourcesCreatedInvoicesAutoCollection

This is an alias to an internal type.

type ChangedSubscriptionResourcesCreatedInvoicesCreditNote added in v1.19.1

type ChangedSubscriptionResourcesCreatedInvoicesCreditNote = shared.ChangedSubscriptionResourcesCreatedInvoicesCreditNote

This is an alias to an internal type.

type ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransaction added in v1.19.1

type ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransaction = shared.ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransaction

This is an alias to an internal type.

type ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsAction added in v1.19.1

type ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsAction = shared.ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsAction

This is an alias to an internal type.

type ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsType added in v1.19.1

type ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsType = shared.ChangedSubscriptionResourcesCreatedInvoicesCustomerBalanceTransactionsType

This is an alias to an internal type.

type ChangedSubscriptionResourcesCreatedInvoicesInvoiceSource added in v1.19.1

type ChangedSubscriptionResourcesCreatedInvoicesInvoiceSource = shared.ChangedSubscriptionResourcesCreatedInvoicesInvoiceSource

This is an alias to an internal type.

type ChangedSubscriptionResourcesCreatedInvoicesLineItem added in v1.19.1

type ChangedSubscriptionResourcesCreatedInvoicesLineItem = shared.ChangedSubscriptionResourcesCreatedInvoicesLineItem

This is an alias to an internal type.

type ChangedSubscriptionResourcesCreatedInvoicesLineItemsAdjustment added in v1.19.1

type ChangedSubscriptionResourcesCreatedInvoicesLineItemsAdjustment = shared.ChangedSubscriptionResourcesCreatedInvoicesLineItemsAdjustment

This is an alias to an internal type.

type ChangedSubscriptionResourcesCreatedInvoicesLineItemsAdjustmentsAdjustmentType added in v1.19.1

type ChangedSubscriptionResourcesCreatedInvoicesLineItemsAdjustmentsAdjustmentType = shared.ChangedSubscriptionResourcesCreatedInvoicesLineItemsAdjustmentsAdjustmentType

This is an alias to an internal type.

type ChangedSubscriptionResourcesCreatedInvoicesLineItemsSubLineItem added in v1.19.1

type ChangedSubscriptionResourcesCreatedInvoicesLineItemsSubLineItem = shared.ChangedSubscriptionResourcesCreatedInvoicesLineItemsSubLineItem

This is an alias to an internal type.

type ChangedSubscriptionResourcesCreatedInvoicesLineItemsSubLineItemsType added in v1.19.1

type ChangedSubscriptionResourcesCreatedInvoicesLineItemsSubLineItemsType = shared.ChangedSubscriptionResourcesCreatedInvoicesLineItemsSubLineItemsType

This is an alias to an internal type.

type ChangedSubscriptionResourcesCreatedInvoicesPaymentAttempt added in v1.19.1

type ChangedSubscriptionResourcesCreatedInvoicesPaymentAttempt = shared.ChangedSubscriptionResourcesCreatedInvoicesPaymentAttempt

This is an alias to an internal type.

type ChangedSubscriptionResourcesCreatedInvoicesPaymentAttemptsPaymentProvider added in v1.19.1

type ChangedSubscriptionResourcesCreatedInvoicesPaymentAttemptsPaymentProvider = shared.ChangedSubscriptionResourcesCreatedInvoicesPaymentAttemptsPaymentProvider

The payment provider that attempted to collect the payment.

This is an alias to an internal type.

type ChangedSubscriptionResourcesCreatedInvoicesStatus added in v1.19.1

type ChangedSubscriptionResourcesCreatedInvoicesStatus = shared.ChangedSubscriptionResourcesCreatedInvoicesStatus

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"`
	// A date string to specify the global credit note service period end date in the
	// customer's timezone. This will be applied to all line items that don't have
	// their own individual service periods specified. If not provided, line items will
	// use their original invoice line item service periods. This date is inclusive.
	EndDate param.Field[time.Time] `json:"end_date" format:"date"`
	// An optional memo to attach to the credit note.
	Memo param.Field[string] `json:"memo"`
	// A date string to specify the global credit note service period start date in the
	// customer's timezone. This will be applied to all line items that don't have
	// their own individual service periods specified. If not provided, line items will
	// use their original invoice line item service periods. This date is inclusive.
	StartDate param.Field[time.Time] `json:"start_date" format:"date"`
}

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"`
	// A date string to specify this line item's credit note service period end date in
	// the customer's timezone. If provided, this will be used for this specific line
	// item. If not provided, will use the global end_date if available, otherwise
	// defaults to the original invoice line item's end date. This date is inclusive.
	EndDate param.Field[time.Time] `json:"end_date" format:"date"`
	// A date string to specify this line item's credit note service period start date
	// in the customer's timezone. If provided, this will be used for this specific
	// line item. If not provided, will use the global start_date if available,
	// otherwise defaults to the original invoice line item's start date. This date is
	// inclusive.
	StartDate param.Field[time.Time] `json:"start_date" format:"date"`
}

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).

The credit note service period configuration supports two explicit modes:

  1. Global service periods: Specify start_date and end_date at the credit note level. These dates will be applied to all line items uniformly.

  2. Individual service periods: Specify start_date and end_date for each line item. When using this mode, ALL line items must have individual periods specified.

  3. Default behavior: If no service periods are specified (neither global nor individual), the original invoice line item service periods will be used.

Note: Mixing global and individual service periods in the same request is not allowed to prevent confusion.

Service period dates are normalized to the start of the day in the customer's timezone to ensure consistent handling across different timezones.

Date Format: Use start_date and end_date with format "YYYY-MM-DD" (e.g., "2023-09-22") to match other Orb APIs like /v1/invoice_line_items.

Note: Both start_date and end_date are inclusive - the service period will cover both the start date and end date completely (from start of start_date to end of end_date).

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"`
	// Whether invoices for this customer should be automatically issued. If true,
	// invoices will be automatically issued. If false, invoices will require manual
	// approval. If null, inherits the account-level setting.
	AutoIssuance bool `json:"auto_issuance,required,nullable"`
	// 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                                                                                             |
	// | ---------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
	// | Albania                | `al_tin`     | Albania Tax Identification Number                                                                       |
	// | Andorra                | `ad_nrt`     | Andorran NRT Number                                                                                     |
	// | Angola                 | `ao_tin`     | Angola Tax Identification Number                                                                        |
	// | Argentina              | `ar_cuit`    | Argentinian Tax ID Number                                                                               |
	// | Armenia                | `am_tin`     | Armenia Tax Identification Number                                                                       |
	// | Aruba                  | `aw_tin`     | Aruba Tax Identification Number                                                                         |
	// | Australia              | `au_abn`     | Australian Business Number (AU ABN)                                                                     |
	// | Australia              | `au_arn`     | Australian Taxation Office Reference Number                                                             |
	// | Austria                | `eu_vat`     | European VAT Number                                                                                     |
	// | Azerbaijan             | `az_tin`     | Azerbaijan Tax Identification Number                                                                    |
	// | Bahamas                | `bs_tin`     | Bahamas Tax Identification Number                                                                       |
	// | Bahrain                | `bh_vat`     | Bahraini VAT Number                                                                                     |
	// | Bangladesh             | `bd_bin`     | Bangladesh Business Identification Number                                                               |
	// | Barbados               | `bb_tin`     | Barbados Tax Identification Number                                                                      |
	// | Belarus                | `by_tin`     | Belarus TIN Number                                                                                      |
	// | Belgium                | `eu_vat`     | European VAT Number                                                                                     |
	// | Benin                  | `bj_ifu`     | Benin Tax Identification Number (Identifiant Fiscal Unique)                                             |
	// | Bolivia                | `bo_tin`     | Bolivian Tax ID                                                                                         |
	// | Bosnia and Herzegovina | `ba_tin`     | Bosnia and Herzegovina Tax Identification Number                                                        |
	// | 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                                                                                     |
	// | Burkina Faso           | `bf_ifu`     | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique)                             |
	// | Cambodia               | `kh_tin`     | Cambodia Tax Identification Number                                                                      |
	// | Cameroon               | `cm_niu`     | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique)                                 |
	// | 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)                                                                            |
	// | Cape Verde             | `cv_nif`     | Cape Verde Tax Identification Number (Número de Identificação Fiscal)                                   |
	// | Chile                  | `cl_tin`     | Chilean TIN                                                                                             |
	// | China                  | `cn_tin`     | Chinese Tax ID                                                                                          |
	// | Colombia               | `co_nit`     | Colombian NIT Number                                                                                    |
	// | Congo-Kinshasa         | `cd_nif`     | Congo (DR) Tax Identification Number (Número de Identificação Fiscal)                                   |
	// | Costa Rica             | `cr_tin`     | Costa Rican Tax ID                                                                                      |
	// | Croatia                | `eu_vat`     | European VAT Number                                                                                     |
	// | Croatia                | `hr_oib`     | Croatian Personal Identification Number (OIB)                                                           |
	// | 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                                                                                     |
	// | Ethiopia               | `et_tin`     | Ethiopia Tax Identification Number                                                                      |
	// | European Union         | `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                | `de_stn`     | German Tax Number (Steuernummer)                                                                        |
	// | Germany                | `eu_vat`     | European VAT Number                                                                                     |
	// | Greece                 | `eu_vat`     | European VAT Number                                                                                     |
	// | Guinea                 | `gn_nif`     | Guinea Tax Identification Number (Número de Identificação Fiscal)                                       |
	// | 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                                                  |
	// | Kyrgyzstan             | `kg_tin`     | Kyrgyzstan Tax Identification Number                                                                    |
	// | Laos                   | `la_tin`     | Laos Tax Identification Number                                                                          |
	// | Latvia                 | `eu_vat`     | European VAT Number                                                                                     |
	// | Liechtenstein          | `li_uid`     | Liechtensteinian UID Number                                                                             |
	// | Liechtenstein          | `li_vat`     | Liechtenstein VAT 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                                                                                     |
	// | Mauritania             | `mr_nif`     | Mauritania Tax Identification Number (Número de Identificação Fiscal)                                   |
	// | Mexico                 | `mx_rfc`     | Mexican RFC Number                                                                                      |
	// | Moldova                | `md_vat`     | Moldova VAT Number                                                                                      |
	// | Montenegro             | `me_pib`     | Montenegro PIB Number                                                                                   |
	// | Morocco                | `ma_vat`     | Morocco VAT Number                                                                                      |
	// | Nepal                  | `np_pan`     | Nepal PAN Number                                                                                        |
	// | Netherlands            | `eu_vat`     | European VAT Number                                                                                     |
	// | New Zealand            | `nz_gst`     | New Zealand GST Number                                                                                  |
	// | Nigeria                | `ng_tin`     | Nigerian Tax Identification Number                                                                      |
	// | North Macedonia        | `mk_vat`     | North Macedonia VAT Number                                                                              |
	// | Northern Ireland       | `eu_vat`     | Northern Ireland VAT 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                                                                                        |
	// | Senegal                | `sn_ninea`   | Senegal NINEA Number                                                                                    |
	// | 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                                                                                     |
	// | Suriname               | `sr_fin`     | Suriname FIN Number                                                                                     |
	// | Sweden                 | `eu_vat`     | European VAT Number                                                                                     |
	// | Switzerland            | `ch_uid`     | Switzerland UID Number                                                                                  |
	// | Switzerland            | `ch_vat`     | Switzerland VAT Number                                                                                  |
	// | Taiwan                 | `tw_vat`     | Taiwanese VAT                                                                                           |
	// | Tajikistan             | `tj_tin`     | Tajikistan Tax Identification Number                                                                    |
	// | Tanzania               | `tz_vat`     | Tanzania VAT Number                                                                                     |
	// | Thailand               | `th_vat`     | Thai VAT                                                                                                |
	// | Turkey                 | `tr_tin`     | Turkish Tax Identification Number                                                                       |
	// | Uganda                 | `ug_tin`     | Uganda Tax Identification Number                                                                        |
	// | Ukraine                | `ua_vat`     | Ukrainian VAT                                                                                           |
	// | United Arab Emirates   | `ae_trn`     | United Arab Emirates TRN                                                                                |
	// | United Kingdom         | `gb_vat`     | United Kingdom VAT Number                                                                               |
	// | United States          | `us_ein`     | United States EIN                                                                                       |
	// | Uruguay                | `uy_ruc`     | Uruguayan RUC Number                                                                                    |
	// | Uzbekistan             | `uz_tin`     | Uzbekistan TIN Number                                                                                   |
	// | Uzbekistan             | `uz_vat`     | Uzbekistan VAT Number                                                                                   |
	// | Venezuela              | `ve_rif`     | Venezuelan RIF Number                                                                                   |
	// | Vietnam                | `vn_tin`     | Vietnamese Tax ID Number                                                                                |
	// | Zambia                 | `zm_tin`     | Zambia Tax Identification Number                                                                        |
	// | Zimbabwe               | `zw_tin`     | Zimbabwe Tax Identification 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"
	CustomerBalanceTransactionListResponseActionSmallInvoiceCarryover CustomerBalanceTransactionListResponseAction = "small_invoice_carryover"
)

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"
	CustomerBalanceTransactionNewResponseActionSmallInvoiceCarryover CustomerBalanceTransactionNewResponseAction = "small_invoice_carryover"
)

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"`
	// 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"`
	// An ISO 8601 format date that identifies the origination credit block to expire
	ExpiryDate param.Field[time.Time] `json:"expiry_date" format:"date-time"`
	// 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 due date of the invoice. Due date is calculated
	// based on the invoice or issuance date, depending on the account's configured due
	// date calculation method. 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. Do not set this field if you want to set a custom due date.
	NetTerms param.Field[int64] `json:"net_terms,required"`
	// An optional custom due date for the invoice. If not set, the due date will be
	// calculated based on the `net_terms` value.
	CustomDueDate param.Field[time.Time] `json:"custom_due_date" format:"date-time"`
	// An ISO 8601 format date that denotes when this invoice should be dated in the
	// customer's timezone. If not provided, the invoice date will default to the
	// credit block's effective date.
	InvoiceDate param.Field[time.Time] `json:"invoice_date" format:"date-time"`
	// 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"`
	// 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"`
	// An ISO 8601 format date that identifies the origination credit block to expire
	ExpiryDate param.Field[time.Time] `json:"expiry_date" format:"date-time"`
	// 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 due date of the invoice. Due date is calculated
	// based on the invoice or issuance date, depending on the account's configured due
	// date calculation method. 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. Do not set this field if you want to set a custom due date.
	NetTerms param.Field[int64] `json:"net_terms,required"`
	// An optional custom due date for the invoice. If not set, the due date will be
	// calculated based on the `net_terms` value.
	CustomDueDate param.Field[time.Time] `json:"custom_due_date" format:"date-time"`
	// An ISO 8601 format date that denotes when this invoice should be dated in the
	// customer's timezone. If not provided, the invoice date will default to the
	// credit block's effective date.
	InvoiceDate param.Field[time.Time] `json:"invoice_date" format:"date-time"`
	// 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. The total number of email
	// addresses (including the primary email) cannot exceed 50.
	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"`
	// Used to determine if invoices for this customer will be automatically issued. If
	// true, invoices will be automatically issued. If false, invoices will require
	// manual approval. If `null` is specified, the customer's auto issuance setting
	// will be inherited from the account-level setting.
	AutoIssuance   param.Field[bool]              `json:"auto_issuance"`
	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                                                                                             |
	// | ---------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
	// | Albania                | `al_tin`     | Albania Tax Identification Number                                                                       |
	// | Andorra                | `ad_nrt`     | Andorran NRT Number                                                                                     |
	// | Angola                 | `ao_tin`     | Angola Tax Identification Number                                                                        |
	// | Argentina              | `ar_cuit`    | Argentinian Tax ID Number                                                                               |
	// | Armenia                | `am_tin`     | Armenia Tax Identification Number                                                                       |
	// | Aruba                  | `aw_tin`     | Aruba Tax Identification Number                                                                         |
	// | Australia              | `au_abn`     | Australian Business Number (AU ABN)                                                                     |
	// | Australia              | `au_arn`     | Australian Taxation Office Reference Number                                                             |
	// | Austria                | `eu_vat`     | European VAT Number                                                                                     |
	// | Azerbaijan             | `az_tin`     | Azerbaijan Tax Identification Number                                                                    |
	// | Bahamas                | `bs_tin`     | Bahamas Tax Identification Number                                                                       |
	// | Bahrain                | `bh_vat`     | Bahraini VAT Number                                                                                     |
	// | Bangladesh             | `bd_bin`     | Bangladesh Business Identification Number                                                               |
	// | Barbados               | `bb_tin`     | Barbados Tax Identification Number                                                                      |
	// | Belarus                | `by_tin`     | Belarus TIN Number                                                                                      |
	// | Belgium                | `eu_vat`     | European VAT Number                                                                                     |
	// | Benin                  | `bj_ifu`     | Benin Tax Identification Number (Identifiant Fiscal Unique)                                             |
	// | Bolivia                | `bo_tin`     | Bolivian Tax ID                                                                                         |
	// | Bosnia and Herzegovina | `ba_tin`     | Bosnia and Herzegovina Tax Identification Number                                                        |
	// | 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                                                                                     |
	// | Burkina Faso           | `bf_ifu`     | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique)                             |
	// | Cambodia               | `kh_tin`     | Cambodia Tax Identification Number                                                                      |
	// | Cameroon               | `cm_niu`     | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique)                                 |
	// | 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)                                                                            |
	// | Cape Verde             | `cv_nif`     | Cape Verde Tax Identification Number (Número de Identificação Fiscal)                                   |
	// | Chile                  | `cl_tin`     | Chilean TIN                                                                                             |
	// | China                  | `cn_tin`     | Chinese Tax ID                                                                                          |
	// | Colombia               | `co_nit`     | Colombian NIT Number                                                                                    |
	// | Congo-Kinshasa         | `cd_nif`     | Congo (DR) Tax Identification Number (Número de Identificação Fiscal)                                   |
	// | Costa Rica             | `cr_tin`     | Costa Rican Tax ID                                                                                      |
	// | Croatia                | `eu_vat`     | European VAT Number                                                                                     |
	// | Croatia                | `hr_oib`     | Croatian Personal Identification Number (OIB)                                                           |
	// | 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                                                                                     |
	// | Ethiopia               | `et_tin`     | Ethiopia Tax Identification Number                                                                      |
	// | European Union         | `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                | `de_stn`     | German Tax Number (Steuernummer)                                                                        |
	// | Germany                | `eu_vat`     | European VAT Number                                                                                     |
	// | Greece                 | `eu_vat`     | European VAT Number                                                                                     |
	// | Guinea                 | `gn_nif`     | Guinea Tax Identification Number (Número de Identificação Fiscal)                                       |
	// | 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                                                  |
	// | Kyrgyzstan             | `kg_tin`     | Kyrgyzstan Tax Identification Number                                                                    |
	// | Laos                   | `la_tin`     | Laos Tax Identification Number                                                                          |
	// | Latvia                 | `eu_vat`     | European VAT Number                                                                                     |
	// | Liechtenstein          | `li_uid`     | Liechtensteinian UID Number                                                                             |
	// | Liechtenstein          | `li_vat`     | Liechtenstein VAT 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                                                                                     |
	// | Mauritania             | `mr_nif`     | Mauritania Tax Identification Number (Número de Identificação Fiscal)                                   |
	// | Mexico                 | `mx_rfc`     | Mexican RFC Number                                                                                      |
	// | Moldova                | `md_vat`     | Moldova VAT Number                                                                                      |
	// | Montenegro             | `me_pib`     | Montenegro PIB Number                                                                                   |
	// | Morocco                | `ma_vat`     | Morocco VAT Number                                                                                      |
	// | Nepal                  | `np_pan`     | Nepal PAN Number                                                                                        |
	// | Netherlands            | `eu_vat`     | European VAT Number                                                                                     |
	// | New Zealand            | `nz_gst`     | New Zealand GST Number                                                                                  |
	// | Nigeria                | `ng_tin`     | Nigerian Tax Identification Number                                                                      |
	// | North Macedonia        | `mk_vat`     | North Macedonia VAT Number                                                                              |
	// | Northern Ireland       | `eu_vat`     | Northern Ireland VAT 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                                                                                        |
	// | Senegal                | `sn_ninea`   | Senegal NINEA Number                                                                                    |
	// | 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                                                                                     |
	// | Suriname               | `sr_fin`     | Suriname FIN Number                                                                                     |
	// | Sweden                 | `eu_vat`     | European VAT Number                                                                                     |
	// | Switzerland            | `ch_uid`     | Switzerland UID Number                                                                                  |
	// | Switzerland            | `ch_vat`     | Switzerland VAT Number                                                                                  |
	// | Taiwan                 | `tw_vat`     | Taiwanese VAT                                                                                           |
	// | Tajikistan             | `tj_tin`     | Tajikistan Tax Identification Number                                                                    |
	// | Tanzania               | `tz_vat`     | Tanzania VAT Number                                                                                     |
	// | Thailand               | `th_vat`     | Thai VAT                                                                                                |
	// | Turkey                 | `tr_tin`     | Turkish Tax Identification Number                                                                       |
	// | Uganda                 | `ug_tin`     | Uganda Tax Identification Number                                                                        |
	// | Ukraine                | `ua_vat`     | Ukrainian VAT                                                                                           |
	// | United Arab Emirates   | `ae_trn`     | United Arab Emirates TRN                                                                                |
	// | United Kingdom         | `gb_vat`     | United Kingdom VAT Number                                                                               |
	// | United States          | `us_ein`     | United States EIN                                                                                       |
	// | Uruguay                | `uy_ruc`     | Uruguayan RUC Number                                                                                    |
	// | Uzbekistan             | `uz_tin`     | Uzbekistan TIN Number                                                                                   |
	// | Uzbekistan             | `uz_vat`     | Uzbekistan VAT Number                                                                                   |
	// | Venezuela              | `ve_rif`     | Venezuelan RIF Number                                                                                   |
	// | Vietnam                | `vn_tin`     | Vietnamese Tax ID Number                                                                                |
	// | Zambia                 | `zm_tin`     | Zambia Tax Identification Number                                                                        |
	// | Zimbabwe               | `zw_tin`     | Zimbabwe Tax Identification 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 CustomerNewParamsTaxConfigurationNewNumeralConfiguration added in v1.16.0

type CustomerNewParamsTaxConfigurationNewNumeralConfiguration struct {
	TaxExempt   param.Field[bool]                                                                `json:"tax_exempt,required"`
	TaxProvider param.Field[CustomerNewParamsTaxConfigurationNewNumeralConfigurationTaxProvider] `json:"tax_provider,required"`
}

func (CustomerNewParamsTaxConfigurationNewNumeralConfiguration) MarshalJSON added in v1.16.0

type CustomerNewParamsTaxConfigurationNewNumeralConfigurationTaxProvider added in v1.16.0

type CustomerNewParamsTaxConfigurationNewNumeralConfigurationTaxProvider string
const (
	CustomerNewParamsTaxConfigurationNewNumeralConfigurationTaxProviderNumeral CustomerNewParamsTaxConfigurationNewNumeralConfigurationTaxProvider = "numeral"
)

func (CustomerNewParamsTaxConfigurationNewNumeralConfigurationTaxProvider) IsKnown added in v1.16.0

type CustomerNewParamsTaxConfigurationTaxProvider added in v0.66.0

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

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, CustomerNewParamsTaxConfigurationNewNumeralConfiguration, 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 | | ---------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | | Albania | `al_tin` | Albania Tax Identification Number | | Andorra | `ad_nrt` | Andorran NRT Number | | Angola | `ao_tin` | Angola Tax Identification Number | | Argentina | `ar_cuit` | Argentinian Tax ID Number | | Armenia | `am_tin` | Armenia Tax Identification Number | | Aruba | `aw_tin` | Aruba Tax Identification Number | | Australia | `au_abn` | Australian Business Number (AU ABN) | | Australia | `au_arn` | Australian Taxation Office Reference Number | | Austria | `eu_vat` | European VAT Number | | Azerbaijan | `az_tin` | Azerbaijan Tax Identification Number | | Bahamas | `bs_tin` | Bahamas Tax Identification Number | | Bahrain | `bh_vat` | Bahraini VAT Number | | Bangladesh | `bd_bin` | Bangladesh Business Identification Number | | Barbados | `bb_tin` | Barbados Tax Identification Number | | Belarus | `by_tin` | Belarus TIN Number | | Belgium | `eu_vat` | European VAT Number | | Benin | `bj_ifu` | Benin Tax Identification Number (Identifiant Fiscal Unique) | | Bolivia | `bo_tin` | Bolivian Tax ID | | Bosnia and Herzegovina | `ba_tin` | Bosnia and Herzegovina Tax Identification Number | | 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 | | Burkina Faso | `bf_ifu` | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique) | | Cambodia | `kh_tin` | Cambodia Tax Identification Number | | Cameroon | `cm_niu` | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique) | | 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) | | Cape Verde | `cv_nif` | Cape Verde Tax Identification Number (Número de Identificação Fiscal) | | Chile | `cl_tin` | Chilean TIN | | China | `cn_tin` | Chinese Tax ID | | Colombia | `co_nit` | Colombian NIT Number | | Congo-Kinshasa | `cd_nif` | Congo (DR) Tax Identification Number (Número de Identificação Fiscal) | | Costa Rica | `cr_tin` | Costa Rican Tax ID | | Croatia | `eu_vat` | European VAT Number | | Croatia | `hr_oib` | Croatian Personal Identification Number (OIB) | | 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 | | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | | European Union | `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 | `de_stn` | German Tax Number (Steuernummer) | | Germany | `eu_vat` | European VAT Number | | Greece | `eu_vat` | European VAT Number | | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | | 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 | | Kyrgyzstan | `kg_tin` | Kyrgyzstan Tax Identification Number | | Laos | `la_tin` | Laos Tax Identification Number | | Latvia | `eu_vat` | European VAT Number | | Liechtenstein | `li_uid` | Liechtensteinian UID Number | | Liechtenstein | `li_vat` | Liechtenstein VAT 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 | | Mauritania | `mr_nif` | Mauritania Tax Identification Number (Número de Identificação Fiscal) | | Mexico | `mx_rfc` | Mexican RFC Number | | Moldova | `md_vat` | Moldova VAT Number | | Montenegro | `me_pib` | Montenegro PIB Number | | Morocco | `ma_vat` | Morocco VAT Number | | Nepal | `np_pan` | Nepal PAN Number | | Netherlands | `eu_vat` | European VAT Number | | New Zealand | `nz_gst` | New Zealand GST Number | | Nigeria | `ng_tin` | Nigerian Tax Identification Number | | North Macedonia | `mk_vat` | North Macedonia VAT Number | | Northern Ireland | `eu_vat` | Northern Ireland VAT 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 | | Senegal | `sn_ninea` | Senegal NINEA Number | | 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 | | Suriname | `sr_fin` | Suriname FIN Number | | Sweden | `eu_vat` | European VAT Number | | Switzerland | `ch_uid` | Switzerland UID Number | | Switzerland | `ch_vat` | Switzerland VAT Number | | Taiwan | `tw_vat` | Taiwanese VAT | | Tajikistan | `tj_tin` | Tajikistan Tax Identification Number | | Tanzania | `tz_vat` | Tanzania VAT Number | | Thailand | `th_vat` | Thai VAT | | Turkey | `tr_tin` | Turkish Tax Identification Number | | Uganda | `ug_tin` | Uganda Tax Identification Number | | Ukraine | `ua_vat` | Ukrainian VAT | | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | | United Kingdom | `gb_vat` | United Kingdom VAT Number | | United States | `us_ein` | United States EIN | | Uruguay | `uy_ruc` | Uruguayan RUC Number | | Uzbekistan | `uz_tin` | Uzbekistan TIN Number | | Uzbekistan | `uz_vat` | Uzbekistan VAT Number | | Venezuela | `ve_rif` | Venezuelan RIF Number | | Vietnam | `vn_tin` | Vietnamese Tax ID Number | | Zambia | `zm_tin` | Zambia Tax Identification Number | | Zimbabwe | `zw_tin` | Zimbabwe Tax Identification 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 | | ---------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | | Albania | `al_tin` | Albania Tax Identification Number | | Andorra | `ad_nrt` | Andorran NRT Number | | Angola | `ao_tin` | Angola Tax Identification Number | | Argentina | `ar_cuit` | Argentinian Tax ID Number | | Armenia | `am_tin` | Armenia Tax Identification Number | | Aruba | `aw_tin` | Aruba Tax Identification Number | | Australia | `au_abn` | Australian Business Number (AU ABN) | | Australia | `au_arn` | Australian Taxation Office Reference Number | | Austria | `eu_vat` | European VAT Number | | Azerbaijan | `az_tin` | Azerbaijan Tax Identification Number | | Bahamas | `bs_tin` | Bahamas Tax Identification Number | | Bahrain | `bh_vat` | Bahraini VAT Number | | Bangladesh | `bd_bin` | Bangladesh Business Identification Number | | Barbados | `bb_tin` | Barbados Tax Identification Number | | Belarus | `by_tin` | Belarus TIN Number | | Belgium | `eu_vat` | European VAT Number | | Benin | `bj_ifu` | Benin Tax Identification Number (Identifiant Fiscal Unique) | | Bolivia | `bo_tin` | Bolivian Tax ID | | Bosnia and Herzegovina | `ba_tin` | Bosnia and Herzegovina Tax Identification Number | | 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 | | Burkina Faso | `bf_ifu` | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique) | | Cambodia | `kh_tin` | Cambodia Tax Identification Number | | Cameroon | `cm_niu` | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique) | | 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) | | Cape Verde | `cv_nif` | Cape Verde Tax Identification Number (Número de Identificação Fiscal) | | Chile | `cl_tin` | Chilean TIN | | China | `cn_tin` | Chinese Tax ID | | Colombia | `co_nit` | Colombian NIT Number | | Congo-Kinshasa | `cd_nif` | Congo (DR) Tax Identification Number (Número de Identificação Fiscal) | | Costa Rica | `cr_tin` | Costa Rican Tax ID | | Croatia | `eu_vat` | European VAT Number | | Croatia | `hr_oib` | Croatian Personal Identification Number (OIB) | | 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 | | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | | European Union | `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 | `de_stn` | German Tax Number (Steuernummer) | | Germany | `eu_vat` | European VAT Number | | Greece | `eu_vat` | European VAT Number | | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | | 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 | | Kyrgyzstan | `kg_tin` | Kyrgyzstan Tax Identification Number | | Laos | `la_tin` | Laos Tax Identification Number | | Latvia | `eu_vat` | European VAT Number | | Liechtenstein | `li_uid` | Liechtensteinian UID Number | | Liechtenstein | `li_vat` | Liechtenstein VAT 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 | | Mauritania | `mr_nif` | Mauritania Tax Identification Number (Número de Identificação Fiscal) | | Mexico | `mx_rfc` | Mexican RFC Number | | Moldova | `md_vat` | Moldova VAT Number | | Montenegro | `me_pib` | Montenegro PIB Number | | Morocco | `ma_vat` | Morocco VAT Number | | Nepal | `np_pan` | Nepal PAN Number | | Netherlands | `eu_vat` | European VAT Number | | New Zealand | `nz_gst` | New Zealand GST Number | | Nigeria | `ng_tin` | Nigerian Tax Identification Number | | North Macedonia | `mk_vat` | North Macedonia VAT Number | | Northern Ireland | `eu_vat` | Northern Ireland VAT 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 | | Senegal | `sn_ninea` | Senegal NINEA Number | | 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 | | Suriname | `sr_fin` | Suriname FIN Number | | Sweden | `eu_vat` | European VAT Number | | Switzerland | `ch_uid` | Switzerland UID Number | | Switzerland | `ch_vat` | Switzerland VAT Number | | Taiwan | `tw_vat` | Taiwanese VAT | | Tajikistan | `tj_tin` | Tajikistan Tax Identification Number | | Tanzania | `tz_vat` | Tanzania VAT Number | | Thailand | `th_vat` | Thai VAT | | Turkey | `tr_tin` | Turkish Tax Identification Number | | Uganda | `ug_tin` | Uganda Tax Identification Number | | Ukraine | `ua_vat` | Ukrainian VAT | | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | | United Kingdom | `gb_vat` | United Kingdom VAT Number | | United States | `us_ein` | United States EIN | | Uruguay | `uy_ruc` | Uruguayan RUC Number | | Uzbekistan | `uz_tin` | Uzbekistan TIN Number | | Uzbekistan | `uz_vat` | Uzbekistan VAT Number | | Venezuela | `ve_rif` | Venezuelan RIF Number | | Vietnam | `vn_tin` | Vietnamese Tax ID Number | | Zambia | `zm_tin` | Zambia Tax Identification Number | | Zimbabwe | `zw_tin` | Zimbabwe Tax Identification 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. The total number of email
	// addresses (including the primary email) cannot exceed 50.
	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"`
	// Used to determine if invoices for this customer will be automatically issued. If
	// true, invoices will be automatically issued. If false, invoices will require
	// manual approval.If `null` is specified, the customer's auto issuance setting
	// will be inherited from the account-level setting.
	AutoIssuance   param.Field[bool]              `json:"auto_issuance"`
	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 the customer has no existing
	// external customer ID. Since this action may change usage quantities for all
	// existing subscriptions, it is disallowed if the customer has issued invoices
	// with usage line items and subject to the same restrictions as backdated
	// subscription creation.
	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                                                                                             |
	// | ---------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
	// | Albania                | `al_tin`     | Albania Tax Identification Number                                                                       |
	// | Andorra                | `ad_nrt`     | Andorran NRT Number                                                                                     |
	// | Angola                 | `ao_tin`     | Angola Tax Identification Number                                                                        |
	// | Argentina              | `ar_cuit`    | Argentinian Tax ID Number                                                                               |
	// | Armenia                | `am_tin`     | Armenia Tax Identification Number                                                                       |
	// | Aruba                  | `aw_tin`     | Aruba Tax Identification Number                                                                         |
	// | Australia              | `au_abn`     | Australian Business Number (AU ABN)                                                                     |
	// | Australia              | `au_arn`     | Australian Taxation Office Reference Number                                                             |
	// | Austria                | `eu_vat`     | European VAT Number                                                                                     |
	// | Azerbaijan             | `az_tin`     | Azerbaijan Tax Identification Number                                                                    |
	// | Bahamas                | `bs_tin`     | Bahamas Tax Identification Number                                                                       |
	// | Bahrain                | `bh_vat`     | Bahraini VAT Number                                                                                     |
	// | Bangladesh             | `bd_bin`     | Bangladesh Business Identification Number                                                               |
	// | Barbados               | `bb_tin`     | Barbados Tax Identification Number                                                                      |
	// | Belarus                | `by_tin`     | Belarus TIN Number                                                                                      |
	// | Belgium                | `eu_vat`     | European VAT Number                                                                                     |
	// | Benin                  | `bj_ifu`     | Benin Tax Identification Number (Identifiant Fiscal Unique)                                             |
	// | Bolivia                | `bo_tin`     | Bolivian Tax ID                                                                                         |
	// | Bosnia and Herzegovina | `ba_tin`     | Bosnia and Herzegovina Tax Identification Number                                                        |
	// | 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                                                                                     |
	// | Burkina Faso           | `bf_ifu`     | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique)                             |
	// | Cambodia               | `kh_tin`     | Cambodia Tax Identification Number                                                                      |
	// | Cameroon               | `cm_niu`     | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique)                                 |
	// | 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)                                                                            |
	// | Cape Verde             | `cv_nif`     | Cape Verde Tax Identification Number (Número de Identificação Fiscal)                                   |
	// | Chile                  | `cl_tin`     | Chilean TIN                                                                                             |
	// | China                  | `cn_tin`     | Chinese Tax ID                                                                                          |
	// | Colombia               | `co_nit`     | Colombian NIT Number                                                                                    |
	// | Congo-Kinshasa         | `cd_nif`     | Congo (DR) Tax Identification Number (Número de Identificação Fiscal)                                   |
	// | Costa Rica             | `cr_tin`     | Costa Rican Tax ID                                                                                      |
	// | Croatia                | `eu_vat`     | European VAT Number                                                                                     |
	// | Croatia                | `hr_oib`     | Croatian Personal Identification Number (OIB)                                                           |
	// | 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                                                                                     |
	// | Ethiopia               | `et_tin`     | Ethiopia Tax Identification Number                                                                      |
	// | European Union         | `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                | `de_stn`     | German Tax Number (Steuernummer)                                                                        |
	// | Germany                | `eu_vat`     | European VAT Number                                                                                     |
	// | Greece                 | `eu_vat`     | European VAT Number                                                                                     |
	// | Guinea                 | `gn_nif`     | Guinea Tax Identification Number (Número de Identificação Fiscal)                                       |
	// | 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                                                  |
	// | Kyrgyzstan             | `kg_tin`     | Kyrgyzstan Tax Identification Number                                                                    |
	// | Laos                   | `la_tin`     | Laos Tax Identification Number                                                                          |
	// | Latvia                 | `eu_vat`     | European VAT Number                                                                                     |
	// | Liechtenstein          | `li_uid`     | Liechtensteinian UID Number                                                                             |
	// | Liechtenstein          | `li_vat`     | Liechtenstein VAT 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                                                                                     |
	// | Mauritania             | `mr_nif`     | Mauritania Tax Identification Number (Número de Identificação Fiscal)                                   |
	// | Mexico                 | `mx_rfc`     | Mexican RFC Number                                                                                      |
	// | Moldova                | `md_vat`     | Moldova VAT Number                                                                                      |
	// | Montenegro             | `me_pib`     | Montenegro PIB Number                                                                                   |
	// | Morocco                | `ma_vat`     | Morocco VAT Number                                                                                      |
	// | Nepal                  | `np_pan`     | Nepal PAN Number                                                                                        |
	// | Netherlands            | `eu_vat`     | European VAT Number                                                                                     |
	// | New Zealand            | `nz_gst`     | New Zealand GST Number                                                                                  |
	// | Nigeria                | `ng_tin`     | Nigerian Tax Identification Number                                                                      |
	// | North Macedonia        | `mk_vat`     | North Macedonia VAT Number                                                                              |
	// | Northern Ireland       | `eu_vat`     | Northern Ireland VAT 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                                                                                        |
	// | Senegal                | `sn_ninea`   | Senegal NINEA Number                                                                                    |
	// | 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                                                                                     |
	// | Suriname               | `sr_fin`     | Suriname FIN Number                                                                                     |
	// | Sweden                 | `eu_vat`     | European VAT Number                                                                                     |
	// | Switzerland            | `ch_uid`     | Switzerland UID Number                                                                                  |
	// | Switzerland            | `ch_vat`     | Switzerland VAT Number                                                                                  |
	// | Taiwan                 | `tw_vat`     | Taiwanese VAT                                                                                           |
	// | Tajikistan             | `tj_tin`     | Tajikistan Tax Identification Number                                                                    |
	// | Tanzania               | `tz_vat`     | Tanzania VAT Number                                                                                     |
	// | Thailand               | `th_vat`     | Thai VAT                                                                                                |
	// | Turkey                 | `tr_tin`     | Turkish Tax Identification Number                                                                       |
	// | Uganda                 | `ug_tin`     | Uganda Tax Identification Number                                                                        |
	// | Ukraine                | `ua_vat`     | Ukrainian VAT                                                                                           |
	// | United Arab Emirates   | `ae_trn`     | United Arab Emirates TRN                                                                                |
	// | United Kingdom         | `gb_vat`     | United Kingdom VAT Number                                                                               |
	// | United States          | `us_ein`     | United States EIN                                                                                       |
	// | Uruguay                | `uy_ruc`     | Uruguayan RUC Number                                                                                    |
	// | Uzbekistan             | `uz_tin`     | Uzbekistan TIN Number                                                                                   |
	// | Uzbekistan             | `uz_vat`     | Uzbekistan VAT Number                                                                                   |
	// | Venezuela              | `ve_rif`     | Venezuelan RIF Number                                                                                   |
	// | Vietnam                | `vn_tin`     | Vietnamese Tax ID Number                                                                                |
	// | Zambia                 | `zm_tin`     | Zambia Tax Identification Number                                                                        |
	// | Zimbabwe               | `zw_tin`     | Zimbabwe Tax Identification 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 CustomerUpdateByExternalIDParamsTaxConfigurationNewNumeralConfiguration added in v1.16.0

type CustomerUpdateByExternalIDParamsTaxConfigurationNewNumeralConfiguration struct {
	TaxExempt   param.Field[bool]                                                                               `json:"tax_exempt,required"`
	TaxProvider param.Field[CustomerUpdateByExternalIDParamsTaxConfigurationNewNumeralConfigurationTaxProvider] `json:"tax_provider,required"`
}

func (CustomerUpdateByExternalIDParamsTaxConfigurationNewNumeralConfiguration) MarshalJSON added in v1.16.0

type CustomerUpdateByExternalIDParamsTaxConfigurationNewNumeralConfigurationTaxProvider added in v1.16.0

type CustomerUpdateByExternalIDParamsTaxConfigurationNewNumeralConfigurationTaxProvider string
const (
	CustomerUpdateByExternalIDParamsTaxConfigurationNewNumeralConfigurationTaxProviderNumeral CustomerUpdateByExternalIDParamsTaxConfigurationNewNumeralConfigurationTaxProvider = "numeral"
)

func (CustomerUpdateByExternalIDParamsTaxConfigurationNewNumeralConfigurationTaxProvider) IsKnown added in v1.16.0

type CustomerUpdateByExternalIDParamsTaxConfigurationTaxProvider added in v0.64.0

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

func (CustomerUpdateByExternalIDParamsTaxConfigurationTaxProvider) IsKnown added in v0.64.0

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. The total number of email
	// addresses (including the primary email) cannot exceed 50.
	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"`
	// Used to determine if invoices for this customer will be automatically issued. If
	// true, invoices will be automatically issued. If false, invoices will require
	// manual approval.If `null` is specified, the customer's auto issuance setting
	// will be inherited from the account-level setting.
	AutoIssuance   param.Field[bool]              `json:"auto_issuance"`
	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 the customer has no existing
	// external customer ID. Since this action may change usage quantities for all
	// existing subscriptions, it is disallowed if the customer has issued invoices
	// with usage line items and subject to the same restrictions as backdated
	// subscription creation.
	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                                                                                             |
	// | ---------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
	// | Albania                | `al_tin`     | Albania Tax Identification Number                                                                       |
	// | Andorra                | `ad_nrt`     | Andorran NRT Number                                                                                     |
	// | Angola                 | `ao_tin`     | Angola Tax Identification Number                                                                        |
	// | Argentina              | `ar_cuit`    | Argentinian Tax ID Number                                                                               |
	// | Armenia                | `am_tin`     | Armenia Tax Identification Number                                                                       |
	// | Aruba                  | `aw_tin`     | Aruba Tax Identification Number                                                                         |
	// | Australia              | `au_abn`     | Australian Business Number (AU ABN)                                                                     |
	// | Australia              | `au_arn`     | Australian Taxation Office Reference Number                                                             |
	// | Austria                | `eu_vat`     | European VAT Number                                                                                     |
	// | Azerbaijan             | `az_tin`     | Azerbaijan Tax Identification Number                                                                    |
	// | Bahamas                | `bs_tin`     | Bahamas Tax Identification Number                                                                       |
	// | Bahrain                | `bh_vat`     | Bahraini VAT Number                                                                                     |
	// | Bangladesh             | `bd_bin`     | Bangladesh Business Identification Number                                                               |
	// | Barbados               | `bb_tin`     | Barbados Tax Identification Number                                                                      |
	// | Belarus                | `by_tin`     | Belarus TIN Number                                                                                      |
	// | Belgium                | `eu_vat`     | European VAT Number                                                                                     |
	// | Benin                  | `bj_ifu`     | Benin Tax Identification Number (Identifiant Fiscal Unique)                                             |
	// | Bolivia                | `bo_tin`     | Bolivian Tax ID                                                                                         |
	// | Bosnia and Herzegovina | `ba_tin`     | Bosnia and Herzegovina Tax Identification Number                                                        |
	// | 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                                                                                     |
	// | Burkina Faso           | `bf_ifu`     | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique)                             |
	// | Cambodia               | `kh_tin`     | Cambodia Tax Identification Number                                                                      |
	// | Cameroon               | `cm_niu`     | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique)                                 |
	// | 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)                                                                            |
	// | Cape Verde             | `cv_nif`     | Cape Verde Tax Identification Number (Número de Identificação Fiscal)                                   |
	// | Chile                  | `cl_tin`     | Chilean TIN                                                                                             |
	// | China                  | `cn_tin`     | Chinese Tax ID                                                                                          |
	// | Colombia               | `co_nit`     | Colombian NIT Number                                                                                    |
	// | Congo-Kinshasa         | `cd_nif`     | Congo (DR) Tax Identification Number (Número de Identificação Fiscal)                                   |
	// | Costa Rica             | `cr_tin`     | Costa Rican Tax ID                                                                                      |
	// | Croatia                | `eu_vat`     | European VAT Number                                                                                     |
	// | Croatia                | `hr_oib`     | Croatian Personal Identification Number (OIB)                                                           |
	// | 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                                                                                     |
	// | Ethiopia               | `et_tin`     | Ethiopia Tax Identification Number                                                                      |
	// | European Union         | `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                | `de_stn`     | German Tax Number (Steuernummer)                                                                        |
	// | Germany                | `eu_vat`     | European VAT Number                                                                                     |
	// | Greece                 | `eu_vat`     | European VAT Number                                                                                     |
	// | Guinea                 | `gn_nif`     | Guinea Tax Identification Number (Número de Identificação Fiscal)                                       |
	// | 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                                                  |
	// | Kyrgyzstan             | `kg_tin`     | Kyrgyzstan Tax Identification Number                                                                    |
	// | Laos                   | `la_tin`     | Laos Tax Identification Number                                                                          |
	// | Latvia                 | `eu_vat`     | European VAT Number                                                                                     |
	// | Liechtenstein          | `li_uid`     | Liechtensteinian UID Number                                                                             |
	// | Liechtenstein          | `li_vat`     | Liechtenstein VAT 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                                                                                     |
	// | Mauritania             | `mr_nif`     | Mauritania Tax Identification Number (Número de Identificação Fiscal)                                   |
	// | Mexico                 | `mx_rfc`     | Mexican RFC Number                                                                                      |
	// | Moldova                | `md_vat`     | Moldova VAT Number                                                                                      |
	// | Montenegro             | `me_pib`     | Montenegro PIB Number                                                                                   |
	// | Morocco                | `ma_vat`     | Morocco VAT Number                                                                                      |
	// | Nepal                  | `np_pan`     | Nepal PAN Number                                                                                        |
	// | Netherlands            | `eu_vat`     | European VAT Number                                                                                     |
	// | New Zealand            | `nz_gst`     | New Zealand GST Number                                                                                  |
	// | Nigeria                | `ng_tin`     | Nigerian Tax Identification Number                                                                      |
	// | North Macedonia        | `mk_vat`     | North Macedonia VAT Number                                                                              |
	// | Northern Ireland       | `eu_vat`     | Northern Ireland VAT 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                                                                                        |
	// | Senegal                | `sn_ninea`   | Senegal NINEA Number                                                                                    |
	// | 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                                                                                     |
	// | Suriname               | `sr_fin`     | Suriname FIN Number                                                                                     |
	// | Sweden                 | `eu_vat`     | European VAT Number                                                                                     |
	// | Switzerland            | `ch_uid`     | Switzerland UID Number                                                                                  |
	// | Switzerland            | `ch_vat`     | Switzerland VAT Number                                                                                  |
	// | Taiwan                 | `tw_vat`     | Taiwanese VAT                                                                                           |
	// | Tajikistan             | `tj_tin`     | Tajikistan Tax Identification Number                                                                    |
	// | Tanzania               | `tz_vat`     | Tanzania VAT Number                                                                                     |
	// | Thailand               | `th_vat`     | Thai VAT                                                                                                |
	// | Turkey                 | `tr_tin`     | Turkish Tax Identification Number                                                                       |
	// | Uganda                 | `ug_tin`     | Uganda Tax Identification Number                                                                        |
	// | Ukraine                | `ua_vat`     | Ukrainian VAT                                                                                           |
	// | United Arab Emirates   | `ae_trn`     | United Arab Emirates TRN                                                                                |
	// | United Kingdom         | `gb_vat`     | United Kingdom VAT Number                                                                               |
	// | United States          | `us_ein`     | United States EIN                                                                                       |
	// | Uruguay                | `uy_ruc`     | Uruguayan RUC Number                                                                                    |
	// | Uzbekistan             | `uz_tin`     | Uzbekistan TIN Number                                                                                   |
	// | Uzbekistan             | `uz_vat`     | Uzbekistan VAT Number                                                                                   |
	// | Venezuela              | `ve_rif`     | Venezuelan RIF Number                                                                                   |
	// | Vietnam                | `vn_tin`     | Vietnamese Tax ID Number                                                                                |
	// | Zambia                 | `zm_tin`     | Zambia Tax Identification Number                                                                        |
	// | Zimbabwe               | `zw_tin`     | Zimbabwe Tax Identification 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 CustomerUpdateParamsTaxConfigurationNewNumeralConfiguration added in v1.16.0

type CustomerUpdateParamsTaxConfigurationNewNumeralConfiguration struct {
	TaxExempt   param.Field[bool]                                                                   `json:"tax_exempt,required"`
	TaxProvider param.Field[CustomerUpdateParamsTaxConfigurationNewNumeralConfigurationTaxProvider] `json:"tax_provider,required"`
}

func (CustomerUpdateParamsTaxConfigurationNewNumeralConfiguration) MarshalJSON added in v1.16.0

type CustomerUpdateParamsTaxConfigurationNewNumeralConfigurationTaxProvider added in v1.16.0

type CustomerUpdateParamsTaxConfigurationNewNumeralConfigurationTaxProvider string
const (
	CustomerUpdateParamsTaxConfigurationNewNumeralConfigurationTaxProviderNumeral CustomerUpdateParamsTaxConfigurationNewNumeralConfigurationTaxProvider = "numeral"
)

func (CustomerUpdateParamsTaxConfigurationNewNumeralConfigurationTaxProvider) IsKnown added in v1.16.0

type CustomerUpdateParamsTaxConfigurationTaxProvider added in v0.64.0

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

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, CustomerUpdateParamsTaxConfigurationNewNumeralConfiguration, 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

func (*DimensionalPriceGroupExternalDimensionalPriceGroupIDService) Update added in v1.13.0

This endpoint can be used to update the `external_dimensional_price_group_id` and `metadata` of an existing dimensional price group. Other fields on a dimensional price group are currently immutable.

type DimensionalPriceGroupExternalDimensionalPriceGroupIDUpdateParams added in v1.13.0

type DimensionalPriceGroupExternalDimensionalPriceGroupIDUpdateParams struct {
	// An optional user-defined ID for this dimensional price group resource, used
	// throughout the system as an alias for this dimensional price group. Use this
	// field to identify a dimensional price group by an existing identifier in your
	// system.
	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 (DimensionalPriceGroupExternalDimensionalPriceGroupIDUpdateParams) MarshalJSON added in v1.13.0

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 partition 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.

func (*DimensionalPriceGroupService) Update added in v1.13.0

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

This endpoint can be used to update the `external_dimensional_price_group_id` and `metadata` of an existing dimensional price group. Other fields on a dimensional price group are currently immutable.

type DimensionalPriceGroupUpdateParams added in v1.13.0

type DimensionalPriceGroupUpdateParams struct {
	// An optional user-defined ID for this dimensional price group resource, used
	// throughout the system as an alias for this dimensional price group. Use this
	// field to identify a dimensional price group by an existing identifier in your
	// system.
	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 (DimensionalPriceGroupUpdateParams) MarshalJSON added in v1.13.0

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

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 31 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 31 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 `deprecation_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                                                                                             |
	// | ---------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
	// | Albania                | `al_tin`     | Albania Tax Identification Number                                                                       |
	// | Andorra                | `ad_nrt`     | Andorran NRT Number                                                                                     |
	// | Angola                 | `ao_tin`     | Angola Tax Identification Number                                                                        |
	// | Argentina              | `ar_cuit`    | Argentinian Tax ID Number                                                                               |
	// | Armenia                | `am_tin`     | Armenia Tax Identification Number                                                                       |
	// | Aruba                  | `aw_tin`     | Aruba Tax Identification Number                                                                         |
	// | Australia              | `au_abn`     | Australian Business Number (AU ABN)                                                                     |
	// | Australia              | `au_arn`     | Australian Taxation Office Reference Number                                                             |
	// | Austria                | `eu_vat`     | European VAT Number                                                                                     |
	// | Azerbaijan             | `az_tin`     | Azerbaijan Tax Identification Number                                                                    |
	// | Bahamas                | `bs_tin`     | Bahamas Tax Identification Number                                                                       |
	// | Bahrain                | `bh_vat`     | Bahraini VAT Number                                                                                     |
	// | Bangladesh             | `bd_bin`     | Bangladesh Business Identification Number                                                               |
	// | Barbados               | `bb_tin`     | Barbados Tax Identification Number                                                                      |
	// | Belarus                | `by_tin`     | Belarus TIN Number                                                                                      |
	// | Belgium                | `eu_vat`     | European VAT Number                                                                                     |
	// | Benin                  | `bj_ifu`     | Benin Tax Identification Number (Identifiant Fiscal Unique)                                             |
	// | Bolivia                | `bo_tin`     | Bolivian Tax ID                                                                                         |
	// | Bosnia and Herzegovina | `ba_tin`     | Bosnia and Herzegovina Tax Identification Number                                                        |
	// | 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                                                                                     |
	// | Burkina Faso           | `bf_ifu`     | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique)                             |
	// | Cambodia               | `kh_tin`     | Cambodia Tax Identification Number                                                                      |
	// | Cameroon               | `cm_niu`     | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique)                                 |
	// | 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)                                                                            |
	// | Cape Verde             | `cv_nif`     | Cape Verde Tax Identification Number (Número de Identificação Fiscal)                                   |
	// | Chile                  | `cl_tin`     | Chilean TIN                                                                                             |
	// | China                  | `cn_tin`     | Chinese Tax ID                                                                                          |
	// | Colombia               | `co_nit`     | Colombian NIT Number                                                                                    |
	// | Congo-Kinshasa         | `cd_nif`     | Congo (DR) Tax Identification Number (Número de Identificação Fiscal)                                   |
	// | Costa Rica             | `cr_tin`     | Costa Rican Tax ID                                                                                      |
	// | Croatia                | `eu_vat`     | European VAT Number                                                                                     |
	// | Croatia                | `hr_oib`     | Croatian Personal Identification Number (OIB)                                                           |
	// | 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                                                                                     |
	// | Ethiopia               | `et_tin`     | Ethiopia Tax Identification Number                                                                      |
	// | European Union         | `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                | `de_stn`     | German Tax Number (Steuernummer)                                                                        |
	// | Germany                | `eu_vat`     | European VAT Number                                                                                     |
	// | Greece                 | `eu_vat`     | European VAT Number                                                                                     |
	// | Guinea                 | `gn_nif`     | Guinea Tax Identification Number (Número de Identificação Fiscal)                                       |
	// | 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                                                  |
	// | Kyrgyzstan             | `kg_tin`     | Kyrgyzstan Tax Identification Number                                                                    |
	// | Laos                   | `la_tin`     | Laos Tax Identification Number                                                                          |
	// | Latvia                 | `eu_vat`     | European VAT Number                                                                                     |
	// | Liechtenstein          | `li_uid`     | Liechtensteinian UID Number                                                                             |
	// | Liechtenstein          | `li_vat`     | Liechtenstein VAT 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                                                                                     |
	// | Mauritania             | `mr_nif`     | Mauritania Tax Identification Number (Número de Identificação Fiscal)                                   |
	// | Mexico                 | `mx_rfc`     | Mexican RFC Number                                                                                      |
	// | Moldova                | `md_vat`     | Moldova VAT Number                                                                                      |
	// | Montenegro             | `me_pib`     | Montenegro PIB Number                                                                                   |
	// | Morocco                | `ma_vat`     | Morocco VAT Number                                                                                      |
	// | Nepal                  | `np_pan`     | Nepal PAN Number                                                                                        |
	// | Netherlands            | `eu_vat`     | European VAT Number                                                                                     |
	// | New Zealand            | `nz_gst`     | New Zealand GST Number                                                                                  |
	// | Nigeria                | `ng_tin`     | Nigerian Tax Identification Number                                                                      |
	// | North Macedonia        | `mk_vat`     | North Macedonia VAT Number                                                                              |
	// | Northern Ireland       | `eu_vat`     | Northern Ireland VAT 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                                                                                        |
	// | Senegal                | `sn_ninea`   | Senegal NINEA Number                                                                                    |
	// | 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                                                                                     |
	// | Suriname               | `sr_fin`     | Suriname FIN Number                                                                                     |
	// | Sweden                 | `eu_vat`     | European VAT Number                                                                                     |
	// | Switzerland            | `ch_uid`     | Switzerland UID Number                                                                                  |
	// | Switzerland            | `ch_vat`     | Switzerland VAT Number                                                                                  |
	// | Taiwan                 | `tw_vat`     | Taiwanese VAT                                                                                           |
	// | Tajikistan             | `tj_tin`     | Tajikistan Tax Identification Number                                                                    |
	// | Tanzania               | `tz_vat`     | Tanzania VAT Number                                                                                     |
	// | Thailand               | `th_vat`     | Thai VAT                                                                                                |
	// | Turkey                 | `tr_tin`     | Turkish Tax Identification Number                                                                       |
	// | Uganda                 | `ug_tin`     | Uganda Tax Identification Number                                                                        |
	// | Ukraine                | `ua_vat`     | Ukrainian VAT                                                                                           |
	// | United Arab Emirates   | `ae_trn`     | United Arab Emirates TRN                                                                                |
	// | United Kingdom         | `gb_vat`     | United Kingdom VAT Number                                                                               |
	// | United States          | `us_ein`     | United States EIN                                                                                       |
	// | Uruguay                | `uy_ruc`     | Uruguayan RUC Number                                                                                    |
	// | Uzbekistan             | `uz_tin`     | Uzbekistan TIN Number                                                                                   |
	// | Uzbekistan             | `uz_vat`     | Uzbekistan VAT Number                                                                                   |
	// | Venezuela              | `ve_rif`     | Venezuelan RIF Number                                                                                   |
	// | Vietnam                | `vn_tin`     | Vietnamese Tax ID Number                                                                                |
	// | Zambia                 | `zm_tin`     | Zambia Tax Identification Number                                                                        |
	// | Zimbabwe               | `zw_tin`     | Zimbabwe Tax Identification 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"
	InvoiceFetchUpcomingResponseCustomerBalanceTransactionsActionSmallInvoiceCarryover InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction = "small_invoice_carryover"
)

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"`
	// This field is deprecated in favor of `adjustments`
	//
	// Deprecated: deprecated
	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 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 invoice, 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 adjustment id this adjustment replaces. This adjustment will take the place
	// of the replaced adjustment in plan version migrations.
	ReplacesAdjustmentID string `json:"replaces_adjustment_id,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"`
	// This field can have the runtime type of [shared.TierSubLineItemTierConfig].
	TierConfig interface{}                                          `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"`
	// URL to the downloadable PDF version of the receipt. This field will be `null`
	// for payment attempts that did not succeed.
	ReceiptPdf string `json:"receipt_pdf,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"`
	// This field is deprecated in favor of `adjustments`
	//
	// Deprecated: deprecated
	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 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 invoice, 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 adjustment id this adjustment replaces. This adjustment will take the place
	// of the replaced adjustment in plan version migrations.
	ReplacesAdjustmentID string `json:"replaces_adjustment_id,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"`
	// This field can have the runtime type of [shared.TierSubLineItemTierConfig].
	TierConfig interface{}                               `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"`
	// 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"`
	// An optional custom due date for the invoice. If not set, the due date will be
	// calculated based on the `net_terms` value.
	DueDate param.Field[time.Time] `json:"due_date" format:"date-time"`
	// 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. If no memo is provided, we will
	// attach the default memo
	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"`
	// The net terms determines the due date of the invoice. Due date is calculated
	// based on the invoice or issuance date, depending on the account's configured due
	// date calculation method. 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. Do not set this field if you want to set a custom due date.
	NetTerms param.Field[int64] `json:"net_terms"`
	// 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"`
	// Configuration for unit pricing
	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 to the `paid` status. This can only be done to invoices that are in the `issued` or `synced` 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`, `net_terms`, and `due_date` properties 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. `net_terms` and `due_date` can only be modified if the invoice is in a `draft` 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 to 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 {
	// An optional custom due date for the invoice. If not set, the due date will be
	// calculated based on the `net_terms` value.
	DueDate param.Field[time.Time] `json:"due_date" format:"date-time"`
	// 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 due date of the invoice. Due date is calculated
	// based on the invoice or issuance date, depending on the account's configured due
	// date calculation method. 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. Do not set this field if you want to set a custom due date.
	NetTerms param.Field[int64] `json:"net_terms"`
}

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"
	ItemExternalConnectionsExternalConnectionNameNumeral    ItemExternalConnectionsExternalConnectionName = "numeral"
)

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"
	ItemUpdateParamsExternalConnectionsExternalConnectionNameNumeral    ItemUpdateParamsExternalConnectionsExternalConnectionName = "numeral"
)

func (ItemUpdateParamsExternalConnectionsExternalConnectionName) IsKnown added in v0.34.0

type MatrixConfig added in v0.121.0

type MatrixConfig = shared.MatrixConfig

Configuration for matrix pricing

This is an alias to an internal type.

type MatrixConfigParam added in v0.121.0

type MatrixConfigParam = shared.MatrixConfigParam

Configuration for matrix pricing

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

Configuration for a single matrix value

This is an alias to an internal type.

type MatrixValueParam added in v0.121.0

type MatrixValueParam = shared.MatrixValueParam

Configuration for a single matrix value

This is an alias to an internal type.

type MatrixWithAllocationConfig added in v0.121.0

type MatrixWithAllocationConfig = shared.MatrixWithAllocationConfig

Configuration for matrix pricing with usage allocation

This is an alias to an internal type.

type MatrixWithAllocationConfigMatrixValue added in v1.16.0

type MatrixWithAllocationConfigMatrixValue = shared.MatrixWithAllocationConfigMatrixValue

Configuration for a single matrix value

This is an alias to an internal type.

type MatrixWithAllocationConfigMatrixValueParam added in v1.16.0

type MatrixWithAllocationConfigMatrixValueParam = shared.MatrixWithAllocationConfigMatrixValueParam

Configuration for a single matrix value

This is an alias to an internal type.

type MatrixWithAllocationConfigParam added in v0.121.0

type MatrixWithAllocationConfigParam = shared.MatrixWithAllocationConfigParam

Configuration for matrix pricing with usage allocation

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. This
	// field is deprecated in favor of `adjustment_intervals`.
	//
	// 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. This field
	// is deprecated in favor of `adjustment_intervals`.
	//
	// 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. This field
	// is deprecated in favor of `adjustment_intervals`.
	//
	// 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 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

This is an alias to an internal type.

type NewFloatingBulkPriceModelType added in v0.121.0

type NewFloatingBulkPriceModelType = shared.NewFloatingBulkPriceModelType

The pricing model type

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 NewFloatingBulkWithProrationPriceBulkWithProrationConfigParam added in v1.16.0

type NewFloatingBulkWithProrationPriceBulkWithProrationConfigParam = shared.NewFloatingBulkWithProrationPriceBulkWithProrationConfigParam

Configuration for bulk_with_proration pricing

This is an alias to an internal type.

type NewFloatingBulkWithProrationPriceBulkWithProrationConfigTierParam added in v1.16.0

type NewFloatingBulkWithProrationPriceBulkWithProrationConfigTierParam = shared.NewFloatingBulkWithProrationPriceBulkWithProrationConfigTierParam

Configuration for a single bulk pricing tier with proration

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

This is an alias to an internal type.

type NewFloatingBulkWithProrationPriceModelType added in v0.121.0

type NewFloatingBulkWithProrationPriceModelType = shared.NewFloatingBulkWithProrationPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValueParam added in v1.16.0

type NewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValueParam = shared.NewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValueParam

Configuration for a dimension value entry

This is an alias to an internal type.

type NewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigParam added in v1.16.0

type NewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigParam = shared.NewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigParam

Configuration for cumulative_grouped_bulk pricing

This is an alias to an internal type.

type NewFloatingCumulativeGroupedBulkPriceModelType added in v0.121.0

type NewFloatingCumulativeGroupedBulkPriceModelType = shared.NewFloatingCumulativeGroupedBulkPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewFloatingGroupedAllocationPriceGroupedAllocationConfigParam added in v1.16.0

type NewFloatingGroupedAllocationPriceGroupedAllocationConfigParam = shared.NewFloatingGroupedAllocationPriceGroupedAllocationConfigParam

Configuration for grouped_allocation pricing

This is an alias to an internal type.

type NewFloatingGroupedAllocationPriceModelType added in v0.121.0

type NewFloatingGroupedAllocationPriceModelType = shared.NewFloatingGroupedAllocationPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewFloatingGroupedTieredPackagePriceGroupedTieredPackageConfigParam added in v1.16.0

type NewFloatingGroupedTieredPackagePriceGroupedTieredPackageConfigParam = shared.NewFloatingGroupedTieredPackagePriceGroupedTieredPackageConfigParam

Configuration for grouped_tiered_package pricing

This is an alias to an internal type.

type NewFloatingGroupedTieredPackagePriceGroupedTieredPackageConfigTierParam added in v1.16.0

type NewFloatingGroupedTieredPackagePriceGroupedTieredPackageConfigTierParam = shared.NewFloatingGroupedTieredPackagePriceGroupedTieredPackageConfigTierParam

Configuration for a single tier

This is an alias to an internal type.

type NewFloatingGroupedTieredPackagePriceModelType added in v0.121.0

type NewFloatingGroupedTieredPackagePriceModelType = shared.NewFloatingGroupedTieredPackagePriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewFloatingGroupedTieredPriceGroupedTieredConfigParam added in v1.16.0

type NewFloatingGroupedTieredPriceGroupedTieredConfigParam = shared.NewFloatingGroupedTieredPriceGroupedTieredConfigParam

Configuration for grouped_tiered pricing

This is an alias to an internal type.

type NewFloatingGroupedTieredPriceGroupedTieredConfigTierParam added in v1.16.0

type NewFloatingGroupedTieredPriceGroupedTieredConfigTierParam = shared.NewFloatingGroupedTieredPriceGroupedTieredConfigTierParam

Configuration for a single tier

This is an alias to an internal type.

type NewFloatingGroupedTieredPriceModelType added in v0.121.0

type NewFloatingGroupedTieredPriceModelType = shared.NewFloatingGroupedTieredPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigParam added in v1.16.0

type NewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigParam = shared.NewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigParam

Configuration for grouped_with_metered_minimum pricing

This is an alias to an internal type.

type NewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactorParam added in v1.16.0

type NewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactorParam = shared.NewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactorParam

Configuration for a scaling factor

This is an alias to an internal type.

type NewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmountParam added in v1.16.0

type NewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmountParam = shared.NewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmountParam

Configuration for a unit amount

This is an alias to an internal type.

type NewFloatingGroupedWithMeteredMinimumPriceModelType added in v0.121.0

type NewFloatingGroupedWithMeteredMinimumPriceModelType = shared.NewFloatingGroupedWithMeteredMinimumPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewFloatingGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfigParam added in v1.16.0

type NewFloatingGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfigParam = shared.NewFloatingGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfigParam

Configuration for grouped_with_prorated_minimum pricing

This is an alias to an internal type.

type NewFloatingGroupedWithProratedMinimumPriceModelType added in v0.121.0

type NewFloatingGroupedWithProratedMinimumPriceModelType = shared.NewFloatingGroupedWithProratedMinimumPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewFloatingMatrixPriceModelType added in v0.121.0

type NewFloatingMatrixPriceModelType = shared.NewFloatingMatrixPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewFloatingMatrixWithAllocationPriceModelType added in v0.121.0

type NewFloatingMatrixWithAllocationPriceModelType = shared.NewFloatingMatrixWithAllocationPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewFloatingMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigParam added in v1.16.0

type NewFloatingMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigParam = shared.NewFloatingMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigParam

Configuration for matrix_with_display_name pricing

This is an alias to an internal type.

type NewFloatingMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmountParam added in v1.16.0

type NewFloatingMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmountParam = shared.NewFloatingMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmountParam

Configuration for a unit amount item

This is an alias to an internal type.

type NewFloatingMatrixWithDisplayNamePriceModelType added in v0.121.0

type NewFloatingMatrixWithDisplayNamePriceModelType = shared.NewFloatingMatrixWithDisplayNamePriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewFloatingMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigParam added in v1.16.0

type NewFloatingMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigParam = shared.NewFloatingMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigParam

Configuration for max_group_tiered_package pricing

This is an alias to an internal type.

type NewFloatingMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTierParam added in v1.16.0

type NewFloatingMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTierParam = shared.NewFloatingMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTierParam

Configuration for a single tier

This is an alias to an internal type.

type NewFloatingMaxGroupTieredPackagePriceModelType added in v0.121.0

type NewFloatingMaxGroupTieredPackagePriceModelType = shared.NewFloatingMaxGroupTieredPackagePriceModelType

The pricing model type

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 NewFloatingMinimumCompositePriceCadence added in v1.14.0

type NewFloatingMinimumCompositePriceCadence = shared.NewFloatingMinimumCompositePriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewFloatingMinimumCompositePriceConversionRateConfigConversionRateType added in v1.14.0

type NewFloatingMinimumCompositePriceConversionRateConfigConversionRateType = shared.NewFloatingMinimumCompositePriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewFloatingMinimumCompositePriceConversionRateConfigUnionParam added in v1.14.0

type NewFloatingMinimumCompositePriceConversionRateConfigUnionParam = shared.NewFloatingMinimumCompositePriceConversionRateConfigUnionParam

This is an alias to an internal type.

type NewFloatingMinimumCompositePriceMinimumConfigParam added in v1.14.0

type NewFloatingMinimumCompositePriceMinimumConfigParam = shared.NewFloatingMinimumCompositePriceMinimumConfigParam

Configuration for minimum pricing

This is an alias to an internal type.

type NewFloatingMinimumCompositePriceModelType added in v1.14.0

type NewFloatingMinimumCompositePriceModelType = shared.NewFloatingMinimumCompositePriceModelType

The pricing model type

This is an alias to an internal type.

type NewFloatingMinimumCompositePriceParam added in v1.14.0

type NewFloatingMinimumCompositePriceParam = shared.NewFloatingMinimumCompositePriceParam

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

This is an alias to an internal type.

type NewFloatingPackagePriceModelType added in v0.121.0

type NewFloatingPackagePriceModelType = shared.NewFloatingPackagePriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewFloatingPackageWithAllocationPriceModelType added in v0.121.0

type NewFloatingPackageWithAllocationPriceModelType = shared.NewFloatingPackageWithAllocationPriceModelType

The pricing model type

This is an alias to an internal type.

type NewFloatingPackageWithAllocationPricePackageWithAllocationConfigParam added in v1.16.0

type NewFloatingPackageWithAllocationPricePackageWithAllocationConfigParam = shared.NewFloatingPackageWithAllocationPricePackageWithAllocationConfigParam

Configuration for package_with_allocation pricing

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

This is an alias to an internal type.

type NewFloatingScalableMatrixWithTieredPricingPriceModelType added in v0.121.0

type NewFloatingScalableMatrixWithTieredPricingPriceModelType = shared.NewFloatingScalableMatrixWithTieredPricingPriceModelType

The pricing model type

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 NewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactorParam added in v1.16.0

type NewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactorParam = shared.NewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactorParam

Configuration for a single matrix scaling factor

This is an alias to an internal type.

type NewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigParam added in v1.16.0

type NewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigParam = shared.NewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigParam

Configuration for scalable_matrix_with_tiered_pricing pricing

This is an alias to an internal type.

type NewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTierParam added in v1.16.0

type NewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTierParam = shared.NewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTierParam

Configuration for a single tier entry with business logic

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

This is an alias to an internal type.

type NewFloatingScalableMatrixWithUnitPricingPriceModelType added in v0.121.0

type NewFloatingScalableMatrixWithUnitPricingPriceModelType = shared.NewFloatingScalableMatrixWithUnitPricingPriceModelType

The pricing model type

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 NewFloatingScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactorParam added in v1.16.0

type NewFloatingScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactorParam = shared.NewFloatingScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactorParam

Configuration for a single matrix scaling factor

This is an alias to an internal type.

type NewFloatingScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigParam added in v1.16.0

type NewFloatingScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigParam = shared.NewFloatingScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigParam

Configuration for scalable_matrix_with_unit_pricing pricing

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

This is an alias to an internal type.

type NewFloatingThresholdTotalAmountPriceModelType added in v0.121.0

type NewFloatingThresholdTotalAmountPriceModelType = shared.NewFloatingThresholdTotalAmountPriceModelType

The pricing model type

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 NewFloatingThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTableParam added in v1.16.0

type NewFloatingThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTableParam = shared.NewFloatingThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTableParam

Configuration for a single threshold

This is an alias to an internal type.

type NewFloatingThresholdTotalAmountPriceThresholdTotalAmountConfigParam added in v1.16.0

type NewFloatingThresholdTotalAmountPriceThresholdTotalAmountConfigParam = shared.NewFloatingThresholdTotalAmountPriceThresholdTotalAmountConfigParam

Configuration for threshold_total_amount pricing

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

This is an alias to an internal type.

type NewFloatingTieredPackagePriceModelType added in v0.121.0

type NewFloatingTieredPackagePriceModelType = shared.NewFloatingTieredPackagePriceModelType

The pricing model type

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 NewFloatingTieredPackagePriceTieredPackageConfigParam added in v1.16.0

type NewFloatingTieredPackagePriceTieredPackageConfigParam = shared.NewFloatingTieredPackagePriceTieredPackageConfigParam

Configuration for tiered_package pricing

This is an alias to an internal type.

type NewFloatingTieredPackagePriceTieredPackageConfigTierParam added in v1.16.0

type NewFloatingTieredPackagePriceTieredPackageConfigTierParam = shared.NewFloatingTieredPackagePriceTieredPackageConfigTierParam

Configuration for a single tier with business logic

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

This is an alias to an internal type.

type NewFloatingTieredPackageWithMinimumPriceModelType added in v0.121.0

type NewFloatingTieredPackageWithMinimumPriceModelType = shared.NewFloatingTieredPackageWithMinimumPriceModelType

The pricing model type

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 NewFloatingTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigParam added in v1.16.0

type NewFloatingTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigParam = shared.NewFloatingTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigParam

Configuration for tiered_package_with_minimum pricing

This is an alias to an internal type.

type NewFloatingTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTierParam added in v1.16.0

type NewFloatingTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTierParam = shared.NewFloatingTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTierParam

Configuration for a single tier

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

This is an alias to an internal type.

type NewFloatingTieredPriceModelType added in v0.121.0

type NewFloatingTieredPriceModelType = shared.NewFloatingTieredPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewFloatingTieredWithMinimumPriceModelType added in v0.121.0

type NewFloatingTieredWithMinimumPriceModelType = shared.NewFloatingTieredWithMinimumPriceModelType

The pricing model type

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 NewFloatingTieredWithMinimumPriceTieredWithMinimumConfigParam added in v1.16.0

type NewFloatingTieredWithMinimumPriceTieredWithMinimumConfigParam = shared.NewFloatingTieredWithMinimumPriceTieredWithMinimumConfigParam

Configuration for tiered_with_minimum pricing

This is an alias to an internal type.

type NewFloatingTieredWithMinimumPriceTieredWithMinimumConfigTierParam added in v1.16.0

type NewFloatingTieredWithMinimumPriceTieredWithMinimumConfigTierParam = shared.NewFloatingTieredWithMinimumPriceTieredWithMinimumConfigTierParam

Configuration for a single tier

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

This is an alias to an internal type.

type NewFloatingTieredWithProrationPriceModelType added in v0.121.0

type NewFloatingTieredWithProrationPriceModelType = shared.NewFloatingTieredWithProrationPriceModelType

The pricing model type

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 NewFloatingTieredWithProrationPriceTieredWithProrationConfigParam added in v1.16.0

type NewFloatingTieredWithProrationPriceTieredWithProrationConfigParam = shared.NewFloatingTieredWithProrationPriceTieredWithProrationConfigParam

Configuration for tiered_with_proration pricing

This is an alias to an internal type.

type NewFloatingTieredWithProrationPriceTieredWithProrationConfigTierParam added in v1.16.0

type NewFloatingTieredWithProrationPriceTieredWithProrationConfigTierParam = shared.NewFloatingTieredWithProrationPriceTieredWithProrationConfigTierParam

Configuration for a single tiered with proration tier

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

This is an alias to an internal type.

type NewFloatingUnitPriceModelType added in v0.121.0

type NewFloatingUnitPriceModelType = shared.NewFloatingUnitPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewFloatingUnitWithPercentPriceModelType added in v0.121.0

type NewFloatingUnitWithPercentPriceModelType = shared.NewFloatingUnitWithPercentPriceModelType

The pricing model type

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 NewFloatingUnitWithPercentPriceUnitWithPercentConfigParam added in v1.16.0

type NewFloatingUnitWithPercentPriceUnitWithPercentConfigParam = shared.NewFloatingUnitWithPercentPriceUnitWithPercentConfigParam

Configuration for unit_with_percent pricing

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

This is an alias to an internal type.

type NewFloatingUnitWithProrationPriceModelType added in v0.121.0

type NewFloatingUnitWithProrationPriceModelType = shared.NewFloatingUnitWithProrationPriceModelType

The pricing model type

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 NewFloatingUnitWithProrationPriceUnitWithProrationConfigParam added in v1.16.0

type NewFloatingUnitWithProrationPriceUnitWithProrationConfigParam = shared.NewFloatingUnitWithProrationPriceUnitWithProrationConfigParam

Configuration for unit_with_proration pricing

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 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

This is an alias to an internal type.

type NewPlanBulkPriceModelType added in v0.121.0

type NewPlanBulkPriceModelType = shared.NewPlanBulkPriceModelType

The pricing model type

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 NewPlanBulkWithProrationPriceBulkWithProrationConfigParam added in v1.16.0

type NewPlanBulkWithProrationPriceBulkWithProrationConfigParam = shared.NewPlanBulkWithProrationPriceBulkWithProrationConfigParam

Configuration for bulk_with_proration pricing

This is an alias to an internal type.

type NewPlanBulkWithProrationPriceBulkWithProrationConfigTierParam added in v1.16.0

type NewPlanBulkWithProrationPriceBulkWithProrationConfigTierParam = shared.NewPlanBulkWithProrationPriceBulkWithProrationConfigTierParam

Configuration for a single bulk pricing tier with proration

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

This is an alias to an internal type.

type NewPlanBulkWithProrationPriceModelType added in v0.121.0

type NewPlanBulkWithProrationPriceModelType = shared.NewPlanBulkWithProrationPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewPlanCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValueParam added in v1.16.0

type NewPlanCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValueParam = shared.NewPlanCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValueParam

Configuration for a dimension value entry

This is an alias to an internal type.

type NewPlanCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigParam added in v1.16.0

type NewPlanCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigParam = shared.NewPlanCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigParam

Configuration for cumulative_grouped_bulk pricing

This is an alias to an internal type.

type NewPlanCumulativeGroupedBulkPriceModelType added in v0.121.0

type NewPlanCumulativeGroupedBulkPriceModelType = shared.NewPlanCumulativeGroupedBulkPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewPlanGroupedAllocationPriceGroupedAllocationConfigParam added in v1.16.0

type NewPlanGroupedAllocationPriceGroupedAllocationConfigParam = shared.NewPlanGroupedAllocationPriceGroupedAllocationConfigParam

Configuration for grouped_allocation pricing

This is an alias to an internal type.

type NewPlanGroupedAllocationPriceModelType added in v0.121.0

type NewPlanGroupedAllocationPriceModelType = shared.NewPlanGroupedAllocationPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewPlanGroupedTieredPackagePriceGroupedTieredPackageConfigParam added in v1.16.0

type NewPlanGroupedTieredPackagePriceGroupedTieredPackageConfigParam = shared.NewPlanGroupedTieredPackagePriceGroupedTieredPackageConfigParam

Configuration for grouped_tiered_package pricing

This is an alias to an internal type.

type NewPlanGroupedTieredPackagePriceGroupedTieredPackageConfigTierParam added in v1.16.0

type NewPlanGroupedTieredPackagePriceGroupedTieredPackageConfigTierParam = shared.NewPlanGroupedTieredPackagePriceGroupedTieredPackageConfigTierParam

Configuration for a single tier

This is an alias to an internal type.

type NewPlanGroupedTieredPackagePriceModelType added in v0.121.0

type NewPlanGroupedTieredPackagePriceModelType = shared.NewPlanGroupedTieredPackagePriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewPlanGroupedTieredPriceGroupedTieredConfigParam added in v1.16.0

type NewPlanGroupedTieredPriceGroupedTieredConfigParam = shared.NewPlanGroupedTieredPriceGroupedTieredConfigParam

Configuration for grouped_tiered pricing

This is an alias to an internal type.

type NewPlanGroupedTieredPriceGroupedTieredConfigTierParam added in v1.16.0

type NewPlanGroupedTieredPriceGroupedTieredConfigTierParam = shared.NewPlanGroupedTieredPriceGroupedTieredConfigTierParam

Configuration for a single tier

This is an alias to an internal type.

type NewPlanGroupedTieredPriceModelType added in v0.121.0

type NewPlanGroupedTieredPriceModelType = shared.NewPlanGroupedTieredPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewPlanGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigParam added in v1.16.0

type NewPlanGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigParam = shared.NewPlanGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigParam

Configuration for grouped_with_metered_minimum pricing

This is an alias to an internal type.

type NewPlanGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactorParam added in v1.16.0

type NewPlanGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactorParam = shared.NewPlanGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactorParam

Configuration for a scaling factor

This is an alias to an internal type.

type NewPlanGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmountParam added in v1.16.0

type NewPlanGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmountParam = shared.NewPlanGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmountParam

Configuration for a unit amount

This is an alias to an internal type.

type NewPlanGroupedWithMeteredMinimumPriceModelType added in v0.121.0

type NewPlanGroupedWithMeteredMinimumPriceModelType = shared.NewPlanGroupedWithMeteredMinimumPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewPlanGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfigParam added in v1.16.0

type NewPlanGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfigParam = shared.NewPlanGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfigParam

Configuration for grouped_with_prorated_minimum pricing

This is an alias to an internal type.

type NewPlanGroupedWithProratedMinimumPriceModelType added in v0.121.0

type NewPlanGroupedWithProratedMinimumPriceModelType = shared.NewPlanGroupedWithProratedMinimumPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewPlanMatrixPriceModelType added in v0.121.0

type NewPlanMatrixPriceModelType = shared.NewPlanMatrixPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewPlanMatrixWithAllocationPriceModelType added in v0.121.0

type NewPlanMatrixWithAllocationPriceModelType = shared.NewPlanMatrixWithAllocationPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewPlanMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigParam added in v1.16.0

type NewPlanMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigParam = shared.NewPlanMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigParam

Configuration for matrix_with_display_name pricing

This is an alias to an internal type.

type NewPlanMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmountParam added in v1.16.0

type NewPlanMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmountParam = shared.NewPlanMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmountParam

Configuration for a unit amount item

This is an alias to an internal type.

type NewPlanMatrixWithDisplayNamePriceModelType added in v0.121.0

type NewPlanMatrixWithDisplayNamePriceModelType = shared.NewPlanMatrixWithDisplayNamePriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewPlanMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigParam added in v1.16.0

type NewPlanMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigParam = shared.NewPlanMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigParam

Configuration for max_group_tiered_package pricing

This is an alias to an internal type.

type NewPlanMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTierParam added in v1.16.0

type NewPlanMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTierParam = shared.NewPlanMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTierParam

Configuration for a single tier

This is an alias to an internal type.

type NewPlanMaxGroupTieredPackagePriceModelType added in v0.121.0

type NewPlanMaxGroupTieredPackagePriceModelType = shared.NewPlanMaxGroupTieredPackagePriceModelType

The pricing model type

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 NewPlanMinimumCompositePriceCadence added in v1.14.0

type NewPlanMinimumCompositePriceCadence = shared.NewPlanMinimumCompositePriceCadence

The cadence to bill for this price on.

This is an alias to an internal type.

type NewPlanMinimumCompositePriceConversionRateConfigConversionRateType added in v1.14.0

type NewPlanMinimumCompositePriceConversionRateConfigConversionRateType = shared.NewPlanMinimumCompositePriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type NewPlanMinimumCompositePriceConversionRateConfigUnionParam added in v1.14.0

type NewPlanMinimumCompositePriceConversionRateConfigUnionParam = shared.NewPlanMinimumCompositePriceConversionRateConfigUnionParam

This is an alias to an internal type.

type NewPlanMinimumCompositePriceMinimumConfigParam added in v1.14.0

type NewPlanMinimumCompositePriceMinimumConfigParam = shared.NewPlanMinimumCompositePriceMinimumConfigParam

Configuration for minimum pricing

This is an alias to an internal type.

type NewPlanMinimumCompositePriceModelType added in v1.14.0

type NewPlanMinimumCompositePriceModelType = shared.NewPlanMinimumCompositePriceModelType

The pricing model type

This is an alias to an internal type.

type NewPlanMinimumCompositePriceParam added in v1.14.0

type NewPlanMinimumCompositePriceParam = shared.NewPlanMinimumCompositePriceParam

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

This is an alias to an internal type.

type NewPlanPackagePriceModelType added in v0.121.0

type NewPlanPackagePriceModelType = shared.NewPlanPackagePriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewPlanPackageWithAllocationPriceModelType added in v0.121.0

type NewPlanPackageWithAllocationPriceModelType = shared.NewPlanPackageWithAllocationPriceModelType

The pricing model type

This is an alias to an internal type.

type NewPlanPackageWithAllocationPricePackageWithAllocationConfigParam added in v1.16.0

type NewPlanPackageWithAllocationPricePackageWithAllocationConfigParam = shared.NewPlanPackageWithAllocationPricePackageWithAllocationConfigParam

Configuration for package_with_allocation pricing

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

This is an alias to an internal type.

type NewPlanScalableMatrixWithTieredPricingPriceModelType added in v0.121.0

type NewPlanScalableMatrixWithTieredPricingPriceModelType = shared.NewPlanScalableMatrixWithTieredPricingPriceModelType

The pricing model type

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 NewPlanScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactorParam added in v1.16.0

type NewPlanScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactorParam = shared.NewPlanScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactorParam

Configuration for a single matrix scaling factor

This is an alias to an internal type.

type NewPlanScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigParam added in v1.16.0

type NewPlanScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigParam = shared.NewPlanScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigParam

Configuration for scalable_matrix_with_tiered_pricing pricing

This is an alias to an internal type.

type NewPlanScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTierParam added in v1.16.0

type NewPlanScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTierParam = shared.NewPlanScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTierParam

Configuration for a single tier entry with business logic

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

This is an alias to an internal type.

type NewPlanScalableMatrixWithUnitPricingPriceModelType added in v0.121.0

type NewPlanScalableMatrixWithUnitPricingPriceModelType = shared.NewPlanScalableMatrixWithUnitPricingPriceModelType

The pricing model type

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 NewPlanScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactorParam added in v1.16.0

type NewPlanScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactorParam = shared.NewPlanScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactorParam

Configuration for a single matrix scaling factor

This is an alias to an internal type.

type NewPlanScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigParam added in v1.16.0

type NewPlanScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigParam = shared.NewPlanScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigParam

Configuration for scalable_matrix_with_unit_pricing pricing

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

This is an alias to an internal type.

type NewPlanThresholdTotalAmountPriceModelType added in v0.121.0

type NewPlanThresholdTotalAmountPriceModelType = shared.NewPlanThresholdTotalAmountPriceModelType

The pricing model type

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 NewPlanThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTableParam added in v1.16.0

type NewPlanThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTableParam = shared.NewPlanThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTableParam

Configuration for a single threshold

This is an alias to an internal type.

type NewPlanThresholdTotalAmountPriceThresholdTotalAmountConfigParam added in v1.16.0

type NewPlanThresholdTotalAmountPriceThresholdTotalAmountConfigParam = shared.NewPlanThresholdTotalAmountPriceThresholdTotalAmountConfigParam

Configuration for threshold_total_amount pricing

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

This is an alias to an internal type.

type NewPlanTieredPackagePriceModelType added in v0.121.0

type NewPlanTieredPackagePriceModelType = shared.NewPlanTieredPackagePriceModelType

The pricing model type

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 NewPlanTieredPackagePriceTieredPackageConfigParam added in v1.16.0

type NewPlanTieredPackagePriceTieredPackageConfigParam = shared.NewPlanTieredPackagePriceTieredPackageConfigParam

Configuration for tiered_package pricing

This is an alias to an internal type.

type NewPlanTieredPackagePriceTieredPackageConfigTierParam added in v1.16.0

type NewPlanTieredPackagePriceTieredPackageConfigTierParam = shared.NewPlanTieredPackagePriceTieredPackageConfigTierParam

Configuration for a single tier with business logic

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

This is an alias to an internal type.

type NewPlanTieredPackageWithMinimumPriceModelType added in v0.121.0

type NewPlanTieredPackageWithMinimumPriceModelType = shared.NewPlanTieredPackageWithMinimumPriceModelType

The pricing model type

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 NewPlanTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigParam added in v1.16.0

type NewPlanTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigParam = shared.NewPlanTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigParam

Configuration for tiered_package_with_minimum pricing

This is an alias to an internal type.

type NewPlanTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTierParam added in v1.16.0

type NewPlanTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTierParam = shared.NewPlanTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTierParam

Configuration for a single tier

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

This is an alias to an internal type.

type NewPlanTieredPriceModelType added in v0.121.0

type NewPlanTieredPriceModelType = shared.NewPlanTieredPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewPlanTieredWithMinimumPriceModelType added in v0.121.0

type NewPlanTieredWithMinimumPriceModelType = shared.NewPlanTieredWithMinimumPriceModelType

The pricing model type

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 NewPlanTieredWithMinimumPriceTieredWithMinimumConfigParam added in v1.16.0

type NewPlanTieredWithMinimumPriceTieredWithMinimumConfigParam = shared.NewPlanTieredWithMinimumPriceTieredWithMinimumConfigParam

Configuration for tiered_with_minimum pricing

This is an alias to an internal type.

type NewPlanTieredWithMinimumPriceTieredWithMinimumConfigTierParam added in v1.16.0

type NewPlanTieredWithMinimumPriceTieredWithMinimumConfigTierParam = shared.NewPlanTieredWithMinimumPriceTieredWithMinimumConfigTierParam

Configuration for a single tier

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

This is an alias to an internal type.

type NewPlanUnitPriceModelType added in v0.121.0

type NewPlanUnitPriceModelType = shared.NewPlanUnitPriceModelType

The pricing model type

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

This is an alias to an internal type.

type NewPlanUnitWithPercentPriceModelType added in v0.121.0

type NewPlanUnitWithPercentPriceModelType = shared.NewPlanUnitWithPercentPriceModelType

The pricing model type

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 NewPlanUnitWithPercentPriceUnitWithPercentConfigParam added in v1.16.0

type NewPlanUnitWithPercentPriceUnitWithPercentConfigParam = shared.NewPlanUnitWithPercentPriceUnitWithPercentConfigParam

Configuration for unit_with_percent pricing

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

This is an alias to an internal type.

type NewPlanUnitWithProrationPriceModelType added in v0.121.0

type NewPlanUnitWithProrationPriceModelType = shared.NewPlanUnitWithProrationPriceModelType

The pricing model type

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 NewPlanUnitWithProrationPriceUnitWithProrationConfigParam added in v1.16.0

type NewPlanUnitWithProrationPriceUnitWithProrationConfigParam = shared.NewPlanUnitWithProrationPriceUnitWithProrationConfigParam

Configuration for unit_with_proration pricing

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 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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionBulkPriceConversionRateConfigParam.

type NewSubscriptionBulkPriceModelType added in v0.121.0

type NewSubscriptionBulkPriceModelType string

The pricing model type

const (
	NewSubscriptionBulkPriceModelTypeBulk NewSubscriptionBulkPriceModelType = "bulk"
)

func (NewSubscriptionBulkPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionBulkPriceParam added in v0.121.0

type NewSubscriptionBulkPriceParam struct {
	// Configuration for bulk pricing
	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"`
	// The pricing model type
	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 NewSubscriptionBulkWithProrationPriceBulkWithProrationConfigParam added in v1.16.0

type NewSubscriptionBulkWithProrationPriceBulkWithProrationConfigParam struct {
	// Bulk tiers for rating based on total usage volume
	Tiers param.Field[[]NewSubscriptionBulkWithProrationPriceBulkWithProrationConfigTierParam] `json:"tiers,required"`
}

Configuration for bulk_with_proration pricing

func (NewSubscriptionBulkWithProrationPriceBulkWithProrationConfigParam) MarshalJSON added in v1.16.0

type NewSubscriptionBulkWithProrationPriceBulkWithProrationConfigTierParam added in v1.16.0

type NewSubscriptionBulkWithProrationPriceBulkWithProrationConfigTierParam struct {
	// Cost per unit
	UnitAmount param.Field[string] `json:"unit_amount,required"`
	// The lower bound for this tier
	TierLowerBound param.Field[string] `json:"tier_lower_bound"`
}

Configuration for a single bulk pricing tier with proration

func (NewSubscriptionBulkWithProrationPriceBulkWithProrationConfigTierParam) MarshalJSON added in v1.16.0

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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionBulkWithProrationPriceConversionRateConfigParam.

type NewSubscriptionBulkWithProrationPriceModelType added in v0.121.0

type NewSubscriptionBulkWithProrationPriceModelType string

The pricing model type

const (
	NewSubscriptionBulkWithProrationPriceModelTypeBulkWithProration NewSubscriptionBulkWithProrationPriceModelType = "bulk_with_proration"
)

func (NewSubscriptionBulkWithProrationPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionBulkWithProrationPriceParam added in v0.121.0

type NewSubscriptionBulkWithProrationPriceParam struct {
	// Configuration for bulk_with_proration pricing
	BulkWithProrationConfig param.Field[NewSubscriptionBulkWithProrationPriceBulkWithProrationConfigParam] `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"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionCumulativeGroupedBulkPriceConversionRateConfigParam.

type NewSubscriptionCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValueParam added in v1.16.0

type NewSubscriptionCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValueParam struct {
	// Grouping key value
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// Tier lower bound
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Unit amount for this combination
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a dimension value entry

func (NewSubscriptionCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValueParam) MarshalJSON added in v1.16.0

type NewSubscriptionCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigParam added in v1.16.0

type NewSubscriptionCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigParam struct {
	// Each tier lower bound must have the same group of values.
	DimensionValues param.Field[[]NewSubscriptionCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValueParam] `json:"dimension_values,required"`
	// Grouping key name
	Group param.Field[string] `json:"group,required"`
}

Configuration for cumulative_grouped_bulk pricing

func (NewSubscriptionCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigParam) MarshalJSON added in v1.16.0

type NewSubscriptionCumulativeGroupedBulkPriceModelType added in v0.121.0

type NewSubscriptionCumulativeGroupedBulkPriceModelType string

The pricing model type

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"`
	// Configuration for cumulative_grouped_bulk pricing
	CumulativeGroupedBulkConfig param.Field[NewSubscriptionCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigParam] `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"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionGroupedAllocationPriceConversionRateConfigParam.

type NewSubscriptionGroupedAllocationPriceGroupedAllocationConfigParam added in v1.16.0

type NewSubscriptionGroupedAllocationPriceGroupedAllocationConfigParam struct {
	// Usage allocation per group
	Allocation param.Field[string] `json:"allocation,required"`
	// How to determine the groups that should each be allocated some quantity
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// Unit rate for post-allocation
	OverageUnitRate param.Field[string] `json:"overage_unit_rate,required"`
}

Configuration for grouped_allocation pricing

func (NewSubscriptionGroupedAllocationPriceGroupedAllocationConfigParam) MarshalJSON added in v1.16.0

type NewSubscriptionGroupedAllocationPriceModelType added in v0.121.0

type NewSubscriptionGroupedAllocationPriceModelType string

The pricing model type

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"`
	// Configuration for grouped_allocation pricing
	GroupedAllocationConfig param.Field[NewSubscriptionGroupedAllocationPriceGroupedAllocationConfigParam] `json:"grouped_allocation_config,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionGroupedTieredPackagePriceConversionRateConfigParam.

type NewSubscriptionGroupedTieredPackagePriceGroupedTieredPackageConfigParam added in v1.16.0

type NewSubscriptionGroupedTieredPackagePriceGroupedTieredPackageConfigParam struct {
	// The event property used to group before tiering
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// Package size
	PackageSize param.Field[string] `json:"package_size,required"`
	// Apply tiered pricing after rounding up the quantity to the package size. Tiers
	// are defined using exclusive lower bounds.
	Tiers param.Field[[]NewSubscriptionGroupedTieredPackagePriceGroupedTieredPackageConfigTierParam] `json:"tiers,required"`
}

Configuration for grouped_tiered_package pricing

func (NewSubscriptionGroupedTieredPackagePriceGroupedTieredPackageConfigParam) MarshalJSON added in v1.16.0

type NewSubscriptionGroupedTieredPackagePriceGroupedTieredPackageConfigTierParam added in v1.16.0

type NewSubscriptionGroupedTieredPackagePriceGroupedTieredPackageConfigTierParam struct {
	// Price per package
	PerUnit param.Field[string] `json:"per_unit,required"`
	// Tier lower bound
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
}

Configuration for a single tier

func (NewSubscriptionGroupedTieredPackagePriceGroupedTieredPackageConfigTierParam) MarshalJSON added in v1.16.0

type NewSubscriptionGroupedTieredPackagePriceModelType added in v0.121.0

type NewSubscriptionGroupedTieredPackagePriceModelType string

The pricing model type

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"`
	// Configuration for grouped_tiered_package pricing
	GroupedTieredPackageConfig param.Field[NewSubscriptionGroupedTieredPackagePriceGroupedTieredPackageConfigParam] `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"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionGroupedTieredPriceConversionRateConfigParam.

type NewSubscriptionGroupedTieredPriceGroupedTieredConfigParam added in v1.16.0

type NewSubscriptionGroupedTieredPriceGroupedTieredConfigParam struct {
	// The billable metric property used to group before tiering
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// Apply tiered pricing to each segment generated after grouping with the provided
	// key
	Tiers param.Field[[]NewSubscriptionGroupedTieredPriceGroupedTieredConfigTierParam] `json:"tiers,required"`
}

Configuration for grouped_tiered pricing

func (NewSubscriptionGroupedTieredPriceGroupedTieredConfigParam) MarshalJSON added in v1.16.0

type NewSubscriptionGroupedTieredPriceGroupedTieredConfigTierParam added in v1.16.0

type NewSubscriptionGroupedTieredPriceGroupedTieredConfigTierParam struct {
	// Tier lower bound
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Per unit amount
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a single tier

func (NewSubscriptionGroupedTieredPriceGroupedTieredConfigTierParam) MarshalJSON added in v1.16.0

type NewSubscriptionGroupedTieredPriceModelType added in v0.121.0

type NewSubscriptionGroupedTieredPriceModelType string

The pricing model type

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"`
	// Configuration for grouped_tiered pricing
	GroupedTieredConfig param.Field[NewSubscriptionGroupedTieredPriceGroupedTieredConfigParam] `json:"grouped_tiered_config,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionGroupedWithMeteredMinimumPriceConversionRateConfigParam.

type NewSubscriptionGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigParam added in v1.16.0

type NewSubscriptionGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigParam struct {
	// Used to partition the usage into groups. The minimum amount is applied to each
	// group.
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// The minimum amount to charge per group per unit
	MinimumUnitAmount param.Field[string] `json:"minimum_unit_amount,required"`
	// Used to determine the unit rate
	PricingKey param.Field[string] `json:"pricing_key,required"`
	// Scale the unit rates by the scaling factor.
	ScalingFactors param.Field[[]NewSubscriptionGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactorParam] `json:"scaling_factors,required"`
	// Used to determine the unit rate scaling factor
	ScalingKey param.Field[string] `json:"scaling_key,required"`
	// Apply per unit pricing to each pricing value. The minimum amount is applied any
	// unmatched usage.
	UnitAmounts param.Field[[]NewSubscriptionGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmountParam] `json:"unit_amounts,required"`
}

Configuration for grouped_with_metered_minimum pricing

func (NewSubscriptionGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigParam) MarshalJSON added in v1.16.0

type NewSubscriptionGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactorParam added in v1.16.0

type NewSubscriptionGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactorParam struct {
	// Scaling factor
	ScalingFactor param.Field[string] `json:"scaling_factor,required"`
	// Scaling value
	ScalingValue param.Field[string] `json:"scaling_value,required"`
}

Configuration for a scaling factor

func (NewSubscriptionGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactorParam) MarshalJSON added in v1.16.0

type NewSubscriptionGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmountParam added in v1.16.0

type NewSubscriptionGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmountParam struct {
	// Pricing value
	PricingValue param.Field[string] `json:"pricing_value,required"`
	// Per unit amount
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a unit amount

func (NewSubscriptionGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmountParam) MarshalJSON added in v1.16.0

type NewSubscriptionGroupedWithMeteredMinimumPriceModelType added in v0.121.0

type NewSubscriptionGroupedWithMeteredMinimumPriceModelType string

The pricing model type

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"`
	// Configuration for grouped_with_metered_minimum pricing
	GroupedWithMeteredMinimumConfig param.Field[NewSubscriptionGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigParam] `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"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionGroupedWithProratedMinimumPriceConversionRateConfigParam.

type NewSubscriptionGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfigParam added in v1.16.0

type NewSubscriptionGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfigParam struct {
	// How to determine the groups that should each have a minimum
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// The minimum amount to charge per group
	Minimum param.Field[string] `json:"minimum,required"`
	// The amount to charge per unit
	UnitRate param.Field[string] `json:"unit_rate,required"`
}

Configuration for grouped_with_prorated_minimum pricing

func (NewSubscriptionGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfigParam) MarshalJSON added in v1.16.0

type NewSubscriptionGroupedWithProratedMinimumPriceModelType added in v0.121.0

type NewSubscriptionGroupedWithProratedMinimumPriceModelType string

The pricing model type

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"`
	// Configuration for grouped_with_prorated_minimum pricing
	GroupedWithProratedMinimumConfig param.Field[NewSubscriptionGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfigParam] `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"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionMatrixPriceConversionRateConfigParam.

type NewSubscriptionMatrixPriceModelType added in v0.121.0

type NewSubscriptionMatrixPriceModelType string

The pricing model type

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"`
	// Configuration for matrix pricing
	MatrixConfig param.Field[shared.MatrixConfigParam] `json:"matrix_config,required"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionMatrixWithAllocationPriceConversionRateConfigParam.

type NewSubscriptionMatrixWithAllocationPriceModelType added in v0.121.0

type NewSubscriptionMatrixWithAllocationPriceModelType string

The pricing model type

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"`
	// Configuration for matrix_with_allocation pricing
	MatrixWithAllocationConfig param.Field[shared.MatrixWithAllocationConfigParam] `json:"matrix_with_allocation_config,required"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionMatrixWithDisplayNamePriceConversionRateConfigParam.

type NewSubscriptionMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigParam added in v1.16.0

type NewSubscriptionMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigParam struct {
	// Used to determine the unit rate
	Dimension param.Field[string] `json:"dimension,required"`
	// Apply per unit pricing to each dimension value
	UnitAmounts param.Field[[]NewSubscriptionMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmountParam] `json:"unit_amounts,required"`
}

Configuration for matrix_with_display_name pricing

func (NewSubscriptionMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigParam) MarshalJSON added in v1.16.0

type NewSubscriptionMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmountParam added in v1.16.0

type NewSubscriptionMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmountParam struct {
	// The dimension value
	DimensionValue param.Field[string] `json:"dimension_value,required"`
	// Display name for this dimension value
	DisplayName param.Field[string] `json:"display_name,required"`
	// Per unit amount
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a unit amount item

func (NewSubscriptionMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmountParam) MarshalJSON added in v1.16.0

type NewSubscriptionMatrixWithDisplayNamePriceModelType added in v0.121.0

type NewSubscriptionMatrixWithDisplayNamePriceModelType string

The pricing model type

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"`
	// Configuration for matrix_with_display_name pricing
	MatrixWithDisplayNameConfig param.Field[NewSubscriptionMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigParam] `json:"matrix_with_display_name_config,required"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionMaxGroupTieredPackagePriceConversionRateConfigParam.

type NewSubscriptionMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigParam added in v1.16.0

type NewSubscriptionMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigParam struct {
	// The event property used to group before tiering the group with the highest value
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// Package size
	PackageSize param.Field[string] `json:"package_size,required"`
	// Apply tiered pricing to the largest group after grouping with the provided key.
	Tiers param.Field[[]NewSubscriptionMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTierParam] `json:"tiers,required"`
}

Configuration for max_group_tiered_package pricing

func (NewSubscriptionMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigParam) MarshalJSON added in v1.16.0

type NewSubscriptionMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTierParam added in v1.16.0

type NewSubscriptionMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTierParam struct {
	// Tier lower bound
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Per unit amount
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a single tier

func (NewSubscriptionMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTierParam) MarshalJSON added in v1.16.0

type NewSubscriptionMaxGroupTieredPackagePriceModelType added in v0.121.0

type NewSubscriptionMaxGroupTieredPackagePriceModelType string

The pricing model type

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"`
	// Configuration for max_group_tiered_package pricing
	MaxGroupTieredPackageConfig param.Field[NewSubscriptionMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigParam] `json:"max_group_tiered_package_config,required"`
	// The pricing model type
	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 NewSubscriptionMinimumCompositePriceCadence added in v1.14.0

type NewSubscriptionMinimumCompositePriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionMinimumCompositePriceCadenceAnnual     NewSubscriptionMinimumCompositePriceCadence = "annual"
	NewSubscriptionMinimumCompositePriceCadenceSemiAnnual NewSubscriptionMinimumCompositePriceCadence = "semi_annual"
	NewSubscriptionMinimumCompositePriceCadenceMonthly    NewSubscriptionMinimumCompositePriceCadence = "monthly"
	NewSubscriptionMinimumCompositePriceCadenceQuarterly  NewSubscriptionMinimumCompositePriceCadence = "quarterly"
	NewSubscriptionMinimumCompositePriceCadenceOneTime    NewSubscriptionMinimumCompositePriceCadence = "one_time"
	NewSubscriptionMinimumCompositePriceCadenceCustom     NewSubscriptionMinimumCompositePriceCadence = "custom"
)

func (NewSubscriptionMinimumCompositePriceCadence) IsKnown added in v1.14.0

type NewSubscriptionMinimumCompositePriceConversionRateConfigConversionRateType added in v1.14.0

type NewSubscriptionMinimumCompositePriceConversionRateConfigConversionRateType string
const (
	NewSubscriptionMinimumCompositePriceConversionRateConfigConversionRateTypeUnit   NewSubscriptionMinimumCompositePriceConversionRateConfigConversionRateType = "unit"
	NewSubscriptionMinimumCompositePriceConversionRateConfigConversionRateTypeTiered NewSubscriptionMinimumCompositePriceConversionRateConfigConversionRateType = "tiered"
)

func (NewSubscriptionMinimumCompositePriceConversionRateConfigConversionRateType) IsKnown added in v1.14.0

type NewSubscriptionMinimumCompositePriceConversionRateConfigParam added in v1.14.0

type NewSubscriptionMinimumCompositePriceConversionRateConfigParam struct {
	ConversionRateType param.Field[NewSubscriptionMinimumCompositePriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                     `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                       `json:"unit_config"`
}

func (NewSubscriptionMinimumCompositePriceConversionRateConfigParam) ImplementsNewSubscriptionMinimumCompositePriceConversionRateConfigUnionParam added in v1.14.0

func (r NewSubscriptionMinimumCompositePriceConversionRateConfigParam) ImplementsNewSubscriptionMinimumCompositePriceConversionRateConfigUnionParam()

func (NewSubscriptionMinimumCompositePriceConversionRateConfigParam) MarshalJSON added in v1.14.0

type NewSubscriptionMinimumCompositePriceConversionRateConfigUnionParam added in v1.14.0

type NewSubscriptionMinimumCompositePriceConversionRateConfigUnionParam interface {
	ImplementsNewSubscriptionMinimumCompositePriceConversionRateConfigUnionParam()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionMinimumCompositePriceConversionRateConfigParam.

type NewSubscriptionMinimumCompositePriceMinimumConfigParam added in v1.14.0

type NewSubscriptionMinimumCompositePriceMinimumConfigParam struct {
	// The minimum amount to apply
	MinimumAmount param.Field[string] `json:"minimum_amount,required"`
	// If true, subtotals from this price are prorated based on the service period
	Prorated param.Field[bool] `json:"prorated"`
}

Configuration for minimum pricing

func (NewSubscriptionMinimumCompositePriceMinimumConfigParam) MarshalJSON added in v1.14.0

type NewSubscriptionMinimumCompositePriceModelType added in v1.14.0

type NewSubscriptionMinimumCompositePriceModelType string

The pricing model type

const (
	NewSubscriptionMinimumCompositePriceModelTypeMinimum NewSubscriptionMinimumCompositePriceModelType = "minimum"
)

func (NewSubscriptionMinimumCompositePriceModelType) IsKnown added in v1.14.0

type NewSubscriptionMinimumCompositePriceParam added in v1.14.0

type NewSubscriptionMinimumCompositePriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionMinimumCompositePriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// Configuration for minimum pricing
	MinimumConfig param.Field[NewSubscriptionMinimumCompositePriceMinimumConfigParam] `json:"minimum_config,required"`
	// The pricing model type
	ModelType param.Field[NewSubscriptionMinimumCompositePriceModelType] `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[NewSubscriptionMinimumCompositePriceConversionRateConfigUnionParam] `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 (NewSubscriptionMinimumCompositePriceParam) MarshalJSON added in v1.14.0

func (r NewSubscriptionMinimumCompositePriceParam) 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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionPackagePriceConversionRateConfigParam.

type NewSubscriptionPackagePriceModelType added in v0.121.0

type NewSubscriptionPackagePriceModelType string

The pricing model type

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"`
	// The pricing model type
	ModelType param.Field[NewSubscriptionPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for package pricing
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionPackageWithAllocationPriceConversionRateConfigParam.

type NewSubscriptionPackageWithAllocationPriceModelType added in v0.121.0

type NewSubscriptionPackageWithAllocationPriceModelType string

The pricing model type

const (
	NewSubscriptionPackageWithAllocationPriceModelTypePackageWithAllocation NewSubscriptionPackageWithAllocationPriceModelType = "package_with_allocation"
)

func (NewSubscriptionPackageWithAllocationPriceModelType) IsKnown added in v0.121.0

type NewSubscriptionPackageWithAllocationPricePackageWithAllocationConfigParam added in v1.16.0

type NewSubscriptionPackageWithAllocationPricePackageWithAllocationConfigParam struct {
	// Usage allocation
	Allocation param.Field[string] `json:"allocation,required"`
	// Price per package
	PackageAmount param.Field[string] `json:"package_amount,required"`
	// Package size
	PackageSize param.Field[string] `json:"package_size,required"`
}

Configuration for package_with_allocation pricing

func (NewSubscriptionPackageWithAllocationPricePackageWithAllocationConfigParam) MarshalJSON added in v1.16.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"`
	// The pricing model type
	ModelType param.Field[NewSubscriptionPackageWithAllocationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for package_with_allocation pricing
	PackageWithAllocationConfig param.Field[NewSubscriptionPackageWithAllocationPricePackageWithAllocationConfigParam] `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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionScalableMatrixWithTieredPricingPriceConversionRateConfigParam.

type NewSubscriptionScalableMatrixWithTieredPricingPriceModelType added in v0.121.0

type NewSubscriptionScalableMatrixWithTieredPricingPriceModelType string

The pricing model type

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"`
	// The pricing model type
	ModelType param.Field[NewSubscriptionScalableMatrixWithTieredPricingPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for scalable_matrix_with_tiered_pricing pricing
	ScalableMatrixWithTieredPricingConfig param.Field[NewSubscriptionScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigParam] `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 NewSubscriptionScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactorParam added in v1.16.0

type NewSubscriptionScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactorParam struct {
	// First dimension value
	FirstDimensionValue param.Field[string] `json:"first_dimension_value,required"`
	// Scaling factor
	ScalingFactor param.Field[string] `json:"scaling_factor,required"`
	// Second dimension value (optional)
	SecondDimensionValue param.Field[string] `json:"second_dimension_value"`
}

Configuration for a single matrix scaling factor

func (NewSubscriptionScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactorParam) MarshalJSON added in v1.16.0

type NewSubscriptionScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigParam added in v1.16.0

type NewSubscriptionScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigParam struct {
	// Used for the scalable matrix first dimension
	FirstDimension param.Field[string] `json:"first_dimension,required"`
	// Apply a scaling factor to each dimension
	MatrixScalingFactors param.Field[[]NewSubscriptionScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactorParam] `json:"matrix_scaling_factors,required"`
	// Tier pricing structure
	Tiers param.Field[[]NewSubscriptionScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTierParam] `json:"tiers,required"`
	// Used for the scalable matrix second dimension (optional)
	SecondDimension param.Field[string] `json:"second_dimension"`
}

Configuration for scalable_matrix_with_tiered_pricing pricing

func (NewSubscriptionScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigParam) MarshalJSON added in v1.16.0

type NewSubscriptionScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTierParam added in v1.16.0

type NewSubscriptionScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTierParam struct {
	// Tier lower bound
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Per unit amount
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a single tier entry with business logic

func (NewSubscriptionScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTierParam) MarshalJSON added in v1.16.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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionScalableMatrixWithUnitPricingPriceConversionRateConfigParam.

type NewSubscriptionScalableMatrixWithUnitPricingPriceModelType added in v0.121.0

type NewSubscriptionScalableMatrixWithUnitPricingPriceModelType string

The pricing model type

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"`
	// The pricing model type
	ModelType param.Field[NewSubscriptionScalableMatrixWithUnitPricingPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for scalable_matrix_with_unit_pricing pricing
	ScalableMatrixWithUnitPricingConfig param.Field[NewSubscriptionScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigParam] `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 NewSubscriptionScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactorParam added in v1.16.0

type NewSubscriptionScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactorParam struct {
	// First dimension value
	FirstDimensionValue param.Field[string] `json:"first_dimension_value,required"`
	// Scaling factor
	ScalingFactor param.Field[string] `json:"scaling_factor,required"`
	// Second dimension value (optional)
	SecondDimensionValue param.Field[string] `json:"second_dimension_value"`
}

Configuration for a single matrix scaling factor

func (NewSubscriptionScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactorParam) MarshalJSON added in v1.16.0

type NewSubscriptionScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigParam added in v1.16.0

type NewSubscriptionScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigParam struct {
	// Used to determine the unit rate
	FirstDimension param.Field[string] `json:"first_dimension,required"`
	// Apply a scaling factor to each dimension
	MatrixScalingFactors param.Field[[]NewSubscriptionScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactorParam] `json:"matrix_scaling_factors,required"`
	// The final unit price to rate against the output of the matrix
	UnitPrice param.Field[string] `json:"unit_price,required"`
	// If true, the unit price will be prorated to the billing period
	Prorate param.Field[bool] `json:"prorate"`
	// Used to determine the unit rate (optional)
	SecondDimension param.Field[string] `json:"second_dimension"`
}

Configuration for scalable_matrix_with_unit_pricing pricing

func (NewSubscriptionScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigParam) MarshalJSON added in v1.16.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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionThresholdTotalAmountPriceConversionRateConfigParam.

type NewSubscriptionThresholdTotalAmountPriceModelType added in v0.121.0

type NewSubscriptionThresholdTotalAmountPriceModelType string

The pricing model type

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"`
	// The pricing model type
	ModelType param.Field[NewSubscriptionThresholdTotalAmountPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for threshold_total_amount pricing
	ThresholdTotalAmountConfig param.Field[NewSubscriptionThresholdTotalAmountPriceThresholdTotalAmountConfigParam] `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 NewSubscriptionThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTableParam added in v1.16.0

type NewSubscriptionThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTableParam struct {
	// Quantity threshold
	Threshold param.Field[string] `json:"threshold,required"`
	// Total amount for this threshold
	TotalAmount param.Field[string] `json:"total_amount,required"`
}

Configuration for a single threshold

func (NewSubscriptionThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTableParam) MarshalJSON added in v1.16.0

type NewSubscriptionThresholdTotalAmountPriceThresholdTotalAmountConfigParam added in v1.16.0

type NewSubscriptionThresholdTotalAmountPriceThresholdTotalAmountConfigParam struct {
	// When the quantity consumed passes a provided threshold, the configured total
	// will be charged
	ConsumptionTable param.Field[[]NewSubscriptionThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTableParam] `json:"consumption_table,required"`
	// If true, the unit price will be prorated to the billing period
	Prorate param.Field[bool] `json:"prorate"`
}

Configuration for threshold_total_amount pricing

func (NewSubscriptionThresholdTotalAmountPriceThresholdTotalAmountConfigParam) MarshalJSON added in v1.16.0

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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionTieredPackagePriceConversionRateConfigParam.

type NewSubscriptionTieredPackagePriceModelType added in v0.121.0

type NewSubscriptionTieredPackagePriceModelType string

The pricing model type

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"`
	// The pricing model type
	ModelType param.Field[NewSubscriptionTieredPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for tiered_package pricing
	TieredPackageConfig param.Field[NewSubscriptionTieredPackagePriceTieredPackageConfigParam] `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 NewSubscriptionTieredPackagePriceTieredPackageConfigParam added in v1.16.0

type NewSubscriptionTieredPackagePriceTieredPackageConfigParam struct {
	// Package size
	PackageSize param.Field[string] `json:"package_size,required"`
	// Apply tiered pricing after rounding up the quantity to the package size. Tiers
	// are defined using exclusive lower bounds. The tier bounds are defined based on
	// the total quantity rather than the number of packages, so they must be multiples
	// of the package size.
	Tiers param.Field[[]NewSubscriptionTieredPackagePriceTieredPackageConfigTierParam] `json:"tiers,required"`
}

Configuration for tiered_package pricing

func (NewSubscriptionTieredPackagePriceTieredPackageConfigParam) MarshalJSON added in v1.16.0

type NewSubscriptionTieredPackagePriceTieredPackageConfigTierParam added in v1.16.0

type NewSubscriptionTieredPackagePriceTieredPackageConfigTierParam struct {
	// Price per package
	PerUnit param.Field[string] `json:"per_unit,required"`
	// Tier lower bound
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
}

Configuration for a single tier with business logic

func (NewSubscriptionTieredPackagePriceTieredPackageConfigTierParam) MarshalJSON added in v1.16.0

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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionTieredPackageWithMinimumPriceConversionRateConfigParam.

type NewSubscriptionTieredPackageWithMinimumPriceModelType added in v0.121.0

type NewSubscriptionTieredPackageWithMinimumPriceModelType string

The pricing model type

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"`
	// The pricing model type
	ModelType param.Field[NewSubscriptionTieredPackageWithMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for tiered_package_with_minimum pricing
	TieredPackageWithMinimumConfig param.Field[NewSubscriptionTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigParam] `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 NewSubscriptionTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigParam added in v1.16.0

type NewSubscriptionTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigParam struct {
	// Package size
	PackageSize param.Field[float64] `json:"package_size,required"`
	// Apply tiered pricing after rounding up the quantity to the package size. Tiers
	// are defined using exclusive lower bounds.
	Tiers param.Field[[]NewSubscriptionTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTierParam] `json:"tiers,required"`
}

Configuration for tiered_package_with_minimum pricing

func (NewSubscriptionTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigParam) MarshalJSON added in v1.16.0

type NewSubscriptionTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTierParam added in v1.16.0

type NewSubscriptionTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTierParam struct {
	// Minimum amount
	MinimumAmount param.Field[string] `json:"minimum_amount,required"`
	// Price per package
	PerUnit param.Field[string] `json:"per_unit,required"`
	// Tier lower bound
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
}

Configuration for a single tier

func (NewSubscriptionTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTierParam) MarshalJSON added in v1.16.0

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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionTieredPriceConversionRateConfigParam.

type NewSubscriptionTieredPriceModelType added in v0.121.0

type NewSubscriptionTieredPriceModelType string

The pricing model type

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"`
	// The pricing model type
	ModelType param.Field[NewSubscriptionTieredPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for tiered pricing
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionTieredWithMinimumPriceConversionRateConfigParam.

type NewSubscriptionTieredWithMinimumPriceModelType added in v0.121.0

type NewSubscriptionTieredWithMinimumPriceModelType string

The pricing model type

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"`
	// The pricing model type
	ModelType param.Field[NewSubscriptionTieredWithMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for tiered_with_minimum pricing
	TieredWithMinimumConfig param.Field[NewSubscriptionTieredWithMinimumPriceTieredWithMinimumConfigParam] `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 NewSubscriptionTieredWithMinimumPriceTieredWithMinimumConfigParam added in v1.16.0

type NewSubscriptionTieredWithMinimumPriceTieredWithMinimumConfigParam struct {
	// Tiered pricing with a minimum amount dependent on the volume tier. Tiers are
	// defined using exclusive lower bounds.
	Tiers param.Field[[]NewSubscriptionTieredWithMinimumPriceTieredWithMinimumConfigTierParam] `json:"tiers,required"`
	// If true, tiers with an accrued amount of 0 will not be included in the rating.
	HideZeroAmountTiers param.Field[bool] `json:"hide_zero_amount_tiers"`
	// If true, the unit price will be prorated to the billing period
	Prorate param.Field[bool] `json:"prorate"`
}

Configuration for tiered_with_minimum pricing

func (NewSubscriptionTieredWithMinimumPriceTieredWithMinimumConfigParam) MarshalJSON added in v1.16.0

type NewSubscriptionTieredWithMinimumPriceTieredWithMinimumConfigTierParam added in v1.16.0

type NewSubscriptionTieredWithMinimumPriceTieredWithMinimumConfigTierParam struct {
	// Minimum amount
	MinimumAmount param.Field[string] `json:"minimum_amount,required"`
	// Tier lower bound
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Per unit amount
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a single tier

func (NewSubscriptionTieredWithMinimumPriceTieredWithMinimumConfigTierParam) MarshalJSON added in v1.16.0

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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionUnitPriceConversionRateConfigParam.

type NewSubscriptionUnitPriceModelType added in v0.121.0

type NewSubscriptionUnitPriceModelType string

The pricing model type

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"`
	// The pricing model type
	ModelType param.Field[NewSubscriptionUnitPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for unit pricing
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionUnitWithPercentPriceConversionRateConfigParam.

type NewSubscriptionUnitWithPercentPriceModelType added in v0.121.0

type NewSubscriptionUnitWithPercentPriceModelType string

The pricing model type

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"`
	// The pricing model type
	ModelType param.Field[NewSubscriptionUnitWithPercentPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for unit_with_percent pricing
	UnitWithPercentConfig param.Field[NewSubscriptionUnitWithPercentPriceUnitWithPercentConfigParam] `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 NewSubscriptionUnitWithPercentPriceUnitWithPercentConfigParam added in v1.16.0

type NewSubscriptionUnitWithPercentPriceUnitWithPercentConfigParam struct {
	// What percent, out of 100, of the calculated total to charge
	Percent param.Field[string] `json:"percent,required"`
	// Rate per unit of usage
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for unit_with_percent pricing

func (NewSubscriptionUnitWithPercentPriceUnitWithPercentConfigParam) MarshalJSON added in v1.16.0

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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, NewSubscriptionUnitWithProrationPriceConversionRateConfigParam.

type NewSubscriptionUnitWithProrationPriceModelType added in v0.121.0

type NewSubscriptionUnitWithProrationPriceModelType string

The pricing model type

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"`
	// The pricing model type
	ModelType param.Field[NewSubscriptionUnitWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for unit_with_proration pricing
	UnitWithProrationConfig param.Field[NewSubscriptionUnitWithProrationPriceUnitWithProrationConfigParam] `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 NewSubscriptionUnitWithProrationPriceUnitWithProrationConfigParam added in v1.16.0

type NewSubscriptionUnitWithProrationPriceUnitWithProrationConfigParam struct {
	// Rate per unit of usage
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for unit_with_proration pricing

func (NewSubscriptionUnitWithProrationPriceUnitWithProrationConfigParam) MarshalJSON added in v1.16.0

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

Configuration for package pricing

This is an alias to an internal type.

type PackageConfigParam added in v0.121.0

type PackageConfigParam = shared.PackageConfigParam

Configuration for package pricing

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 invoice, 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 adjustment id this adjustment replaces. This adjustment will take the place
	// of the replaced adjustment in plan version migrations.
	ReplacesAdjustmentID string `json:"replaces_adjustment_id,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[[]PlanNewParamsPrice] `json:"prices,required"`
	// Adjustments for this plan. If the plan has phases, this includes adjustments
	// across all phases of the plan.
	Adjustments param.Field[[]PlanNewParamsAdjustment] `json:"adjustments"`
	// 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"`
	// Configuration of pre-defined phases, each with their own prices and adjustments.
	// Leave unspecified for plans with a single phase.
	PlanPhases param.Field[[]PlanNewParamsPlanPhase] `json:"plan_phases"`
	// 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 PlanNewParamsAdjustment added in v1.2.0

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

func (PlanNewParamsAdjustment) MarshalJSON added in v1.2.0

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

type PlanNewParamsAdjustmentsAdjustment added in v1.2.0

type PlanNewParamsAdjustmentsAdjustment struct {
	AdjustmentType param.Field[PlanNewParamsAdjustmentsAdjustmentAdjustmentType] `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[PlanNewParamsAdjustmentsAdjustmentAppliesToAll] `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[PlanNewParamsAdjustmentsAdjustmentPriceType] `json:"price_type"`
	UsageDiscount param.Field[float64]                                     `json:"usage_discount"`
}

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

func (PlanNewParamsAdjustmentsAdjustment) ImplementsPlanNewParamsAdjustmentsAdjustmentUnion added in v1.2.0

func (r PlanNewParamsAdjustmentsAdjustment) ImplementsPlanNewParamsAdjustmentsAdjustmentUnion()

func (PlanNewParamsAdjustmentsAdjustment) MarshalJSON added in v1.2.0

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

type PlanNewParamsAdjustmentsAdjustmentAdjustmentType added in v1.2.0

type PlanNewParamsAdjustmentsAdjustmentAdjustmentType string
const (
	PlanNewParamsAdjustmentsAdjustmentAdjustmentTypePercentageDiscount PlanNewParamsAdjustmentsAdjustmentAdjustmentType = "percentage_discount"
	PlanNewParamsAdjustmentsAdjustmentAdjustmentTypeUsageDiscount      PlanNewParamsAdjustmentsAdjustmentAdjustmentType = "usage_discount"
	PlanNewParamsAdjustmentsAdjustmentAdjustmentTypeAmountDiscount     PlanNewParamsAdjustmentsAdjustmentAdjustmentType = "amount_discount"
	PlanNewParamsAdjustmentsAdjustmentAdjustmentTypeMinimum            PlanNewParamsAdjustmentsAdjustmentAdjustmentType = "minimum"
	PlanNewParamsAdjustmentsAdjustmentAdjustmentTypeMaximum            PlanNewParamsAdjustmentsAdjustmentAdjustmentType = "maximum"
)

func (PlanNewParamsAdjustmentsAdjustmentAdjustmentType) IsKnown added in v1.2.0

type PlanNewParamsAdjustmentsAdjustmentAppliesToAll added in v1.2.0

type PlanNewParamsAdjustmentsAdjustmentAppliesToAll bool

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

const (
	PlanNewParamsAdjustmentsAdjustmentAppliesToAllTrue PlanNewParamsAdjustmentsAdjustmentAppliesToAll = true
)

func (PlanNewParamsAdjustmentsAdjustmentAppliesToAll) IsKnown added in v1.2.0

type PlanNewParamsAdjustmentsAdjustmentPriceType added in v1.2.0

type PlanNewParamsAdjustmentsAdjustmentPriceType string

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

const (
	PlanNewParamsAdjustmentsAdjustmentPriceTypeUsage          PlanNewParamsAdjustmentsAdjustmentPriceType = "usage"
	PlanNewParamsAdjustmentsAdjustmentPriceTypeFixedInAdvance PlanNewParamsAdjustmentsAdjustmentPriceType = "fixed_in_advance"
	PlanNewParamsAdjustmentsAdjustmentPriceTypeFixedInArrears PlanNewParamsAdjustmentsAdjustmentPriceType = "fixed_in_arrears"
	PlanNewParamsAdjustmentsAdjustmentPriceTypeFixed          PlanNewParamsAdjustmentsAdjustmentPriceType = "fixed"
	PlanNewParamsAdjustmentsAdjustmentPriceTypeInArrears      PlanNewParamsAdjustmentsAdjustmentPriceType = "in_arrears"
)

func (PlanNewParamsAdjustmentsAdjustmentPriceType) IsKnown added in v1.2.0

type PlanNewParamsAdjustmentsAdjustmentUnion added in v1.2.0

type PlanNewParamsAdjustmentsAdjustmentUnion interface {
	ImplementsPlanNewParamsAdjustmentsAdjustmentUnion()
}

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, PlanNewParamsAdjustmentsAdjustment.

type PlanNewParamsPlanPhase added in v1.2.0

type PlanNewParamsPlanPhase struct {
	// Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
	Order param.Field[int64] `json:"order,required"`
	// Align billing cycle day with phase start date.
	AlignBillingWithPhaseStartDate param.Field[bool] `json:"align_billing_with_phase_start_date"`
	// How many terms of length `duration_unit` this phase is active for. If null, this
	// phase is evergreen and active indefinitely
	Duration     param.Field[int64]                               `json:"duration"`
	DurationUnit param.Field[PlanNewParamsPlanPhasesDurationUnit] `json:"duration_unit"`
}

func (PlanNewParamsPlanPhase) MarshalJSON added in v1.2.0

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

type PlanNewParamsPlanPhasesDurationUnit added in v1.2.0

type PlanNewParamsPlanPhasesDurationUnit string
const (
	PlanNewParamsPlanPhasesDurationUnitDaily      PlanNewParamsPlanPhasesDurationUnit = "daily"
	PlanNewParamsPlanPhasesDurationUnitMonthly    PlanNewParamsPlanPhasesDurationUnit = "monthly"
	PlanNewParamsPlanPhasesDurationUnitQuarterly  PlanNewParamsPlanPhasesDurationUnit = "quarterly"
	PlanNewParamsPlanPhasesDurationUnitSemiAnnual PlanNewParamsPlanPhasesDurationUnit = "semi_annual"
	PlanNewParamsPlanPhasesDurationUnitAnnual     PlanNewParamsPlanPhasesDurationUnit = "annual"
)

func (PlanNewParamsPlanPhasesDurationUnit) IsKnown added in v1.2.0

type PlanNewParamsPrice added in v0.2.0

type PlanNewParamsPrice 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"`
	// New plan price request body params.
	Price param.Field[PlanNewParamsPricesPriceUnion] `json:"price"`
}

func (PlanNewParamsPrice) MarshalJSON added in v0.25.0

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

type PlanNewParamsPricesPrice added in v1.2.0

type PlanNewParamsPricesPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PlanNewParamsPricesPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[PlanNewParamsPricesPriceModelType] `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"`
	// Configuration for bulk pricing
	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"`
	GroupedWithMinMaxThresholdsConfig param.Field[interface{}] `json:"grouped_with_min_max_thresholds_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"`
	// Configuration for matrix pricing
	MatrixConfig param.Field[shared.MatrixConfigParam] `json:"matrix_config"`
	// Configuration for matrix_with_allocation pricing
	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"`
	MinimumConfig               param.Field[interface{}]                            `json:"minimum_config"`
	// Configuration for package pricing
	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"`
	// Configuration for tiered pricing
	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"`
	// Configuration for unit pricing
	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"`
}

New plan price request body params.

func (PlanNewParamsPricesPrice) ImplementsPlanNewParamsPricesPriceUnion added in v1.2.0

func (r PlanNewParamsPricesPrice) ImplementsPlanNewParamsPricesPriceUnion()

func (PlanNewParamsPricesPrice) MarshalJSON added in v1.2.0

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

type PlanNewParamsPricesPriceCadence added in v1.2.0

type PlanNewParamsPricesPriceCadence string

The cadence to bill for this price on.

const (
	PlanNewParamsPricesPriceCadenceAnnual     PlanNewParamsPricesPriceCadence = "annual"
	PlanNewParamsPricesPriceCadenceSemiAnnual PlanNewParamsPricesPriceCadence = "semi_annual"
	PlanNewParamsPricesPriceCadenceMonthly    PlanNewParamsPricesPriceCadence = "monthly"
	PlanNewParamsPricesPriceCadenceQuarterly  PlanNewParamsPricesPriceCadence = "quarterly"
	PlanNewParamsPricesPriceCadenceOneTime    PlanNewParamsPricesPriceCadence = "one_time"
	PlanNewParamsPricesPriceCadenceCustom     PlanNewParamsPricesPriceCadence = "custom"
)

func (PlanNewParamsPricesPriceCadence) IsKnown added in v1.2.0

type PlanNewParamsPricesPriceModelType added in v1.2.0

type PlanNewParamsPricesPriceModelType string

The pricing model type

const (
	PlanNewParamsPricesPriceModelTypeUnit                            PlanNewParamsPricesPriceModelType = "unit"
	PlanNewParamsPricesPriceModelTypeTiered                          PlanNewParamsPricesPriceModelType = "tiered"
	PlanNewParamsPricesPriceModelTypeBulk                            PlanNewParamsPricesPriceModelType = "bulk"
	PlanNewParamsPricesPriceModelTypePackage                         PlanNewParamsPricesPriceModelType = "package"
	PlanNewParamsPricesPriceModelTypeMatrix                          PlanNewParamsPricesPriceModelType = "matrix"
	PlanNewParamsPricesPriceModelTypeThresholdTotalAmount            PlanNewParamsPricesPriceModelType = "threshold_total_amount"
	PlanNewParamsPricesPriceModelTypeTieredPackage                   PlanNewParamsPricesPriceModelType = "tiered_package"
	PlanNewParamsPricesPriceModelTypeTieredWithMinimum               PlanNewParamsPricesPriceModelType = "tiered_with_minimum"
	PlanNewParamsPricesPriceModelTypeGroupedTiered                   PlanNewParamsPricesPriceModelType = "grouped_tiered"
	PlanNewParamsPricesPriceModelTypeTieredPackageWithMinimum        PlanNewParamsPricesPriceModelType = "tiered_package_with_minimum"
	PlanNewParamsPricesPriceModelTypePackageWithAllocation           PlanNewParamsPricesPriceModelType = "package_with_allocation"
	PlanNewParamsPricesPriceModelTypeUnitWithPercent                 PlanNewParamsPricesPriceModelType = "unit_with_percent"
	PlanNewParamsPricesPriceModelTypeMatrixWithAllocation            PlanNewParamsPricesPriceModelType = "matrix_with_allocation"
	PlanNewParamsPricesPriceModelTypeTieredWithProration             PlanNewParamsPricesPriceModelType = "tiered_with_proration"
	PlanNewParamsPricesPriceModelTypeUnitWithProration               PlanNewParamsPricesPriceModelType = "unit_with_proration"
	PlanNewParamsPricesPriceModelTypeGroupedAllocation               PlanNewParamsPricesPriceModelType = "grouped_allocation"
	PlanNewParamsPricesPriceModelTypeBulkWithProration               PlanNewParamsPricesPriceModelType = "bulk_with_proration"
	PlanNewParamsPricesPriceModelTypeGroupedWithProratedMinimum      PlanNewParamsPricesPriceModelType = "grouped_with_prorated_minimum"
	PlanNewParamsPricesPriceModelTypeGroupedWithMeteredMinimum       PlanNewParamsPricesPriceModelType = "grouped_with_metered_minimum"
	PlanNewParamsPricesPriceModelTypeGroupedWithMinMaxThresholds     PlanNewParamsPricesPriceModelType = "grouped_with_min_max_thresholds"
	PlanNewParamsPricesPriceModelTypeMatrixWithDisplayName           PlanNewParamsPricesPriceModelType = "matrix_with_display_name"
	PlanNewParamsPricesPriceModelTypeGroupedTieredPackage            PlanNewParamsPricesPriceModelType = "grouped_tiered_package"
	PlanNewParamsPricesPriceModelTypeMaxGroupTieredPackage           PlanNewParamsPricesPriceModelType = "max_group_tiered_package"
	PlanNewParamsPricesPriceModelTypeScalableMatrixWithUnitPricing   PlanNewParamsPricesPriceModelType = "scalable_matrix_with_unit_pricing"
	PlanNewParamsPricesPriceModelTypeScalableMatrixWithTieredPricing PlanNewParamsPricesPriceModelType = "scalable_matrix_with_tiered_pricing"
	PlanNewParamsPricesPriceModelTypeCumulativeGroupedBulk           PlanNewParamsPricesPriceModelType = "cumulative_grouped_bulk"
	PlanNewParamsPricesPriceModelTypeMinimum                         PlanNewParamsPricesPriceModelType = "minimum"
)

func (PlanNewParamsPricesPriceModelType) IsKnown added in v1.2.0

type PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPrice added in v1.14.0

type PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence] `json:"cadence,required"`
	// Configuration for grouped_with_min_max_thresholds pricing
	GroupedWithMinMaxThresholdsConfig param.Field[PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig] `json:"grouped_with_min_max_thresholds_config,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType] `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[PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion] `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 (PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPrice) ImplementsPlanNewParamsPricesPriceUnion added in v1.14.0

func (r PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPrice) ImplementsPlanNewParamsPricesPriceUnion()

func (PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPrice) MarshalJSON added in v1.14.0

type PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence added in v1.14.0

type PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence string

The cadence to bill for this price on.

const (
	PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceAnnual     PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "annual"
	PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceSemiAnnual PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "semi_annual"
	PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceMonthly    PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "monthly"
	PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceQuarterly  PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "quarterly"
	PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceOneTime    PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "one_time"
	PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadenceCustom     PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence = "custom"
)

func (PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceCadence) IsKnown added in v1.14.0

type PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig added in v1.14.0

type PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig struct {
	ConversionRateType param.Field[PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                  `json:"unit_config"`
}

func (PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsPlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

func (r PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsPlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()

func (PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig) MarshalJSON added in v1.14.0

type PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType added in v1.14.0

type PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType string
const (
	PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeUnit   PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "unit"
	PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeTiered PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "tiered"
)

func (PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType) IsKnown added in v1.14.0

type PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

type PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion interface {
	ImplementsPlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceConversionRateConfig.

type PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig added in v1.16.0

type PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig struct {
	// The event property used to group before applying thresholds
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// The maximum amount to charge each group
	MaximumCharge param.Field[string] `json:"maximum_charge,required"`
	// The minimum amount to charge each group, regardless of usage
	MinimumCharge param.Field[string] `json:"minimum_charge,required"`
	// The base price charged per group
	PerUnitRate param.Field[string] `json:"per_unit_rate,required"`
}

Configuration for grouped_with_min_max_thresholds pricing

func (PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig) MarshalJSON added in v1.16.0

type PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType added in v1.14.0

type PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType string

The pricing model type

const (
	PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelTypeGroupedWithMinMaxThresholds PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType = "grouped_with_min_max_thresholds"
)

func (PlanNewParamsPricesPriceNewPlanGroupedWithMinMaxThresholdsPriceModelType) IsKnown added in v1.14.0

type PlanNewParamsPricesPriceNewPlanTieredWithProrationPrice added in v1.16.0

type PlanNewParamsPricesPriceNewPlanTieredWithProrationPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for tiered_with_proration pricing
	TieredWithProrationConfig param.Field[PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig] `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[PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion] `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 (PlanNewParamsPricesPriceNewPlanTieredWithProrationPrice) ImplementsPlanNewParamsPricesPriceUnion added in v1.16.0

func (r PlanNewParamsPricesPriceNewPlanTieredWithProrationPrice) ImplementsPlanNewParamsPricesPriceUnion()

func (PlanNewParamsPricesPriceNewPlanTieredWithProrationPrice) MarshalJSON added in v1.16.0

type PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceCadence added in v1.16.0

type PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceCadenceAnnual     PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceCadence = "annual"
	PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceCadenceSemiAnnual PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceCadence = "semi_annual"
	PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceCadenceMonthly    PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceCadence = "monthly"
	PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceCadenceQuarterly  PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceCadence = "quarterly"
	PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceCadenceOneTime    PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceCadence = "one_time"
	PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceCadenceCustom     PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceCadence = "custom"
)

func (PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceCadence) IsKnown added in v1.16.0

type PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfig added in v1.16.0

type PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfig struct {
	ConversionRateType param.Field[PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                        `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                          `json:"unit_config"`
}

func (PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfig) ImplementsPlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion added in v1.16.0

func (r PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfig) ImplementsPlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion()

func (PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfig) MarshalJSON added in v1.16.0

type PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType added in v1.16.0

type PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType string
const (
	PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateTypeUnit   PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType = "unit"
	PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateTypeTiered PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType = "tiered"
)

func (PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigConversionRateType) IsKnown added in v1.16.0

type PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion added in v1.16.0

type PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion interface {
	ImplementsPlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceConversionRateConfig.

type PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceModelType added in v1.16.0

type PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceModelType string

The pricing model type

const (
	PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceModelTypeTieredWithProration PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceModelType = "tiered_with_proration"
)

func (PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceModelType) IsKnown added in v1.16.0

type PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig added in v1.16.0

type PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig struct {
	// Tiers for rating based on total usage quantities into the specified tier with
	// proration
	Tiers param.Field[[]PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier] `json:"tiers,required"`
}

Configuration for tiered_with_proration pricing

func (PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfig) MarshalJSON added in v1.16.0

type PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier added in v1.16.0

type PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier struct {
	// Inclusive tier starting value
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Amount per unit
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a single tiered with proration tier

func (PlanNewParamsPricesPriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier) MarshalJSON added in v1.16.0

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 invoice, 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 adjustment id this adjustment replaces. This adjustment will take the place
	// of the replaced adjustment in plan version migrations.
	ReplacesAdjustmentID string `json:"replaces_adjustment_id,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 PriceBillingMode added in v1.19.1

type PriceBillingMode = shared.PriceBillingMode

This is an alias to an internal type.

type PriceBulkPrice

type PriceBulkPrice = shared.PriceBulkPrice

This is an alias to an internal type.

type PriceBulkPriceBillingMode added in v1.19.1

type PriceBulkPriceBillingMode = shared.PriceBulkPriceBillingMode

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

The pricing model type

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 PriceBulkWithProrationPriceBillingMode added in v1.19.1

type PriceBulkWithProrationPriceBillingMode = shared.PriceBulkWithProrationPriceBillingMode

This is an alias to an internal type.

type PriceBulkWithProrationPriceBulkWithProrationConfig added in v1.16.0

type PriceBulkWithProrationPriceBulkWithProrationConfig = shared.PriceBulkWithProrationPriceBulkWithProrationConfig

Configuration for bulk_with_proration pricing

This is an alias to an internal type.

type PriceBulkWithProrationPriceBulkWithProrationConfigTier added in v1.16.0

type PriceBulkWithProrationPriceBulkWithProrationConfigTier = shared.PriceBulkWithProrationPriceBulkWithProrationConfigTier

Configuration for a single bulk pricing tier with proration

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

The pricing model type

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 PriceCumulativeGroupedBulkPriceBillingMode added in v1.19.1

type PriceCumulativeGroupedBulkPriceBillingMode = shared.PriceCumulativeGroupedBulkPriceBillingMode

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 PriceCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig added in v1.16.0

type PriceCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig = shared.PriceCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig

Configuration for cumulative_grouped_bulk pricing

This is an alias to an internal type.

type PriceCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue added in v1.16.0

type PriceCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue = shared.PriceCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue

Configuration for a dimension value entry

This is an alias to an internal type.

type PriceCumulativeGroupedBulkPriceModelType added in v0.94.0

type PriceCumulativeGroupedBulkPriceModelType = shared.PriceCumulativeGroupedBulkPriceModelType

The pricing model type

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 {
	// The external ID of a price to evaluate that exists in your Orb account.
	ExternalPriceID param.Field[string] `json:"external_price_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"`
	// New floating price request body params.
	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"`
	// The pricing model type
	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"`
	// Configuration for bulk pricing
	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"`
	GroupedWithMinMaxThresholdsConfig param.Field[interface{}] `json:"grouped_with_min_max_thresholds_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"`
	// Configuration for matrix pricing
	MatrixConfig param.Field[shared.MatrixConfigParam] `json:"matrix_config"`
	// Configuration for matrix_with_allocation pricing
	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"`
	MinimumConfig               param.Field[interface{}]                            `json:"minimum_config"`
	// Configuration for package pricing
	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"`
	// Configuration for tiered pricing
	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"`
	// Configuration for unit pricing
	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"`
}

New floating price request body params.

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

The pricing model type

const (
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeUnit                            PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "unit"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeTiered                          PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "tiered"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeBulk                            PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "bulk"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypePackage                         PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "package"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeMatrix                          PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "matrix"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeThresholdTotalAmount            PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "threshold_total_amount"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeTieredPackage                   PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "tiered_package"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeTieredWithMinimum               PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "tiered_with_minimum"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeGroupedTiered                   PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "grouped_tiered"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeTieredPackageWithMinimum        PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "tiered_package_with_minimum"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypePackageWithAllocation           PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "package_with_allocation"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeUnitWithPercent                 PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "unit_with_percent"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeMatrixWithAllocation            PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "matrix_with_allocation"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeTieredWithProration             PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "tiered_with_proration"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeUnitWithProration               PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "unit_with_proration"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeGroupedAllocation               PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "grouped_allocation"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeBulkWithProration               PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "bulk_with_proration"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeGroupedWithProratedMinimum      PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "grouped_with_prorated_minimum"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeGroupedWithMeteredMinimum       PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "grouped_with_metered_minimum"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeGroupedWithMinMaxThresholds     PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "grouped_with_min_max_thresholds"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeMatrixWithDisplayName           PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "matrix_with_display_name"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeGroupedTieredPackage            PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "grouped_tiered_package"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeMaxGroupTieredPackage           PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "max_group_tiered_package"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeScalableMatrixWithUnitPricing   PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "scalable_matrix_with_unit_pricing"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeScalableMatrixWithTieredPricing PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "scalable_matrix_with_tiered_pricing"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeCumulativeGroupedBulk           PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "cumulative_grouped_bulk"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceModelTypeMinimum                         PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType = "minimum"
)

func (PriceEvaluateMultipleParamsPriceEvaluationsPriceModelType) IsKnown added in v0.116.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPrice added in v1.14.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// Configuration for grouped_with_min_max_thresholds pricing
	GroupedWithMinMaxThresholdsConfig param.Field[PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig] `json:"grouped_with_min_max_thresholds_config,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceModelType] `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[PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion] `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 (PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPrice) ImplementsPriceEvaluateMultipleParamsPriceEvaluationsPriceUnion added in v1.14.0

func (r PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPrice) ImplementsPriceEvaluateMultipleParamsPriceEvaluationsPriceUnion()

func (PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPrice) MarshalJSON added in v1.14.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence added in v1.14.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence string

The cadence to bill for this price on.

const (
	PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadenceAnnual     PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "annual"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadenceSemiAnnual PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "semi_annual"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadenceMonthly    PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "monthly"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadenceQuarterly  PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "quarterly"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadenceOneTime    PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "one_time"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadenceCustom     PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "custom"
)

func (PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence) IsKnown added in v1.14.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig added in v1.14.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                                            `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                                              `json:"unit_config"`
}

func (PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsPriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

func (r PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsPriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()

func (PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig) MarshalJSON added in v1.14.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType added in v1.14.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType string
const (
	PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeUnit   PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "unit"
	PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeTiered PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType) IsKnown added in v1.14.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion interface {
	ImplementsPriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig.

type PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig added in v1.16.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig struct {
	// The event property used to group before applying thresholds
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// The maximum amount to charge each group
	MaximumCharge param.Field[string] `json:"maximum_charge,required"`
	// The minimum amount to charge each group, regardless of usage
	MinimumCharge param.Field[string] `json:"minimum_charge,required"`
	// The base price charged per group
	PerUnitRate param.Field[string] `json:"per_unit_rate,required"`
}

Configuration for grouped_with_min_max_thresholds pricing

func (PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig) MarshalJSON added in v1.16.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceModelType added in v1.14.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceModelType string

The pricing model type

const (
	PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceModelTypeGroupedWithMinMaxThresholds PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceModelType = "grouped_with_min_max_thresholds"
)

func (PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceModelType) IsKnown added in v1.14.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceUnion added in v0.116.0

type PriceEvaluateMultipleParamsPriceEvaluationsPriceUnion interface {
	ImplementsPriceEvaluateMultipleParamsPriceEvaluationsPriceUnion()
}

New floating price request body params.

Satisfied by shared.NewFloatingUnitPriceParam, shared.NewFloatingTieredPriceParam, shared.NewFloatingBulkPriceParam, shared.NewFloatingPackagePriceParam, shared.NewFloatingMatrixPriceParam, shared.NewFloatingThresholdTotalAmountPriceParam, shared.NewFloatingTieredPackagePriceParam, shared.NewFloatingTieredWithMinimumPriceParam, shared.NewFloatingGroupedTieredPriceParam, shared.NewFloatingTieredPackageWithMinimumPriceParam, shared.NewFloatingPackageWithAllocationPriceParam, shared.NewFloatingUnitWithPercentPriceParam, shared.NewFloatingMatrixWithAllocationPriceParam, shared.NewFloatingTieredWithProrationPriceParam, shared.NewFloatingUnitWithProrationPriceParam, shared.NewFloatingGroupedAllocationPriceParam, shared.NewFloatingBulkWithProrationPriceParam, shared.NewFloatingGroupedWithProratedMinimumPriceParam, shared.NewFloatingGroupedWithMeteredMinimumPriceParam, PriceEvaluateMultipleParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPrice, shared.NewFloatingMatrixWithDisplayNamePriceParam, shared.NewFloatingGroupedTieredPackagePriceParam, shared.NewFloatingMaxGroupTieredPackagePriceParam, shared.NewFloatingScalableMatrixWithUnitPricingPriceParam, shared.NewFloatingScalableMatrixWithTieredPricingPriceParam, shared.NewFloatingCumulativeGroupedBulkPriceParam, shared.NewFloatingMinimumCompositePriceParam, 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 external ID of the price
	ExternalPriceID string `json:"external_price_id,nullable"`
	// 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 {
	// The external ID of a price to evaluate that exists in your Orb account.
	ExternalPriceID param.Field[string] `json:"external_price_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"`
	// New floating price request body params.
	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"`
	// The pricing model type
	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"`
	// Configuration for bulk pricing
	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"`
	GroupedWithMinMaxThresholdsConfig param.Field[interface{}] `json:"grouped_with_min_max_thresholds_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"`
	// Configuration for matrix pricing
	MatrixConfig param.Field[shared.MatrixConfigParam] `json:"matrix_config"`
	// Configuration for matrix_with_allocation pricing
	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"`
	MinimumConfig               param.Field[interface{}]                            `json:"minimum_config"`
	// Configuration for package pricing
	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"`
	// Configuration for tiered pricing
	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"`
	// Configuration for unit pricing
	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"`
}

New floating price request body params.

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

The pricing model type

const (
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeUnit                            PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "unit"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeTiered                          PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "tiered"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeBulk                            PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "bulk"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypePackage                         PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "package"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeMatrix                          PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "matrix"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeThresholdTotalAmount            PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "threshold_total_amount"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeTieredPackage                   PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "tiered_package"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeTieredWithMinimum               PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "tiered_with_minimum"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeGroupedTiered                   PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "grouped_tiered"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeTieredPackageWithMinimum        PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "tiered_package_with_minimum"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypePackageWithAllocation           PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "package_with_allocation"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeUnitWithPercent                 PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "unit_with_percent"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeMatrixWithAllocation            PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "matrix_with_allocation"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeTieredWithProration             PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "tiered_with_proration"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeUnitWithProration               PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "unit_with_proration"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeGroupedAllocation               PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "grouped_allocation"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeBulkWithProration               PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "bulk_with_proration"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeGroupedWithProratedMinimum      PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "grouped_with_prorated_minimum"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeGroupedWithMeteredMinimum       PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "grouped_with_metered_minimum"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeGroupedWithMinMaxThresholds     PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "grouped_with_min_max_thresholds"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeMatrixWithDisplayName           PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "matrix_with_display_name"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeGroupedTieredPackage            PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "grouped_tiered_package"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeMaxGroupTieredPackage           PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "max_group_tiered_package"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeScalableMatrixWithUnitPricing   PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "scalable_matrix_with_unit_pricing"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeScalableMatrixWithTieredPricing PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "scalable_matrix_with_tiered_pricing"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeCumulativeGroupedBulk           PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "cumulative_grouped_bulk"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelTypeMinimum                         PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType = "minimum"
)

func (PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceModelType) IsKnown added in v0.121.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPrice added in v1.14.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// Configuration for grouped_with_min_max_thresholds pricing
	GroupedWithMinMaxThresholdsConfig param.Field[PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig] `json:"grouped_with_min_max_thresholds_config,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceModelType] `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[PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion] `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 (PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPrice) ImplementsPriceEvaluatePreviewEventsParamsPriceEvaluationsPriceUnion added in v1.14.0

func (r PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPrice) ImplementsPriceEvaluatePreviewEventsParamsPriceEvaluationsPriceUnion()

func (PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPrice) MarshalJSON added in v1.14.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence added in v1.14.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence string

The cadence to bill for this price on.

const (
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadenceAnnual     PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "annual"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadenceSemiAnnual PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "semi_annual"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadenceMonthly    PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "monthly"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadenceQuarterly  PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "quarterly"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadenceOneTime    PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "one_time"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadenceCustom     PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "custom"
)

func (PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence) IsKnown added in v1.14.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig added in v1.14.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                                                 `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                                                   `json:"unit_config"`
}

func (PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsPriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

func (r PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsPriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()

func (PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig) MarshalJSON added in v1.14.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType added in v1.14.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType string
const (
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeUnit   PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "unit"
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeTiered PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType) IsKnown added in v1.14.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion interface {
	ImplementsPriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig.

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig added in v1.16.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig struct {
	// The event property used to group before applying thresholds
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// The maximum amount to charge each group
	MaximumCharge param.Field[string] `json:"maximum_charge,required"`
	// The minimum amount to charge each group, regardless of usage
	MinimumCharge param.Field[string] `json:"minimum_charge,required"`
	// The base price charged per group
	PerUnitRate param.Field[string] `json:"per_unit_rate,required"`
}

Configuration for grouped_with_min_max_thresholds pricing

func (PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig) MarshalJSON added in v1.16.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceModelType added in v1.14.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceModelType string

The pricing model type

const (
	PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceModelTypeGroupedWithMinMaxThresholds PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceModelType = "grouped_with_min_max_thresholds"
)

func (PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPriceModelType) IsKnown added in v1.14.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceUnion added in v0.121.0

type PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceUnion interface {
	ImplementsPriceEvaluatePreviewEventsParamsPriceEvaluationsPriceUnion()
}

New floating price request body params.

Satisfied by shared.NewFloatingUnitPriceParam, shared.NewFloatingTieredPriceParam, shared.NewFloatingBulkPriceParam, shared.NewFloatingPackagePriceParam, shared.NewFloatingMatrixPriceParam, shared.NewFloatingThresholdTotalAmountPriceParam, shared.NewFloatingTieredPackagePriceParam, shared.NewFloatingTieredWithMinimumPriceParam, shared.NewFloatingGroupedTieredPriceParam, shared.NewFloatingTieredPackageWithMinimumPriceParam, shared.NewFloatingPackageWithAllocationPriceParam, shared.NewFloatingUnitWithPercentPriceParam, shared.NewFloatingMatrixWithAllocationPriceParam, shared.NewFloatingTieredWithProrationPriceParam, shared.NewFloatingUnitWithProrationPriceParam, shared.NewFloatingGroupedAllocationPriceParam, shared.NewFloatingBulkWithProrationPriceParam, shared.NewFloatingGroupedWithProratedMinimumPriceParam, shared.NewFloatingGroupedWithMeteredMinimumPriceParam, PriceEvaluatePreviewEventsParamsPriceEvaluationsPriceNewFloatingGroupedWithMinMaxThresholdsPrice, shared.NewFloatingMatrixWithDisplayNamePriceParam, shared.NewFloatingGroupedTieredPackagePriceParam, shared.NewFloatingMaxGroupTieredPackagePriceParam, shared.NewFloatingScalableMatrixWithUnitPricingPriceParam, shared.NewFloatingScalableMatrixWithTieredPricingPriceParam, shared.NewFloatingCumulativeGroupedBulkPriceParam, shared.NewFloatingMinimumCompositePriceParam, 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 external ID of the price
	ExternalPriceID string `json:"external_price_id,nullable"`
	// 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 PriceGroupedAllocationPriceBillingMode added in v1.19.1

type PriceGroupedAllocationPriceBillingMode = shared.PriceGroupedAllocationPriceBillingMode

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 PriceGroupedAllocationPriceGroupedAllocationConfig added in v1.16.0

type PriceGroupedAllocationPriceGroupedAllocationConfig = shared.PriceGroupedAllocationPriceGroupedAllocationConfig

Configuration for grouped_allocation pricing

This is an alias to an internal type.

type PriceGroupedAllocationPriceModelType added in v0.48.0

type PriceGroupedAllocationPriceModelType = shared.PriceGroupedAllocationPriceModelType

The pricing model type

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 PriceGroupedTieredPackagePriceBillingMode added in v1.19.1

type PriceGroupedTieredPackagePriceBillingMode = shared.PriceGroupedTieredPackagePriceBillingMode

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 PriceGroupedTieredPackagePriceGroupedTieredPackageConfig added in v1.16.0

type PriceGroupedTieredPackagePriceGroupedTieredPackageConfig = shared.PriceGroupedTieredPackagePriceGroupedTieredPackageConfig

Configuration for grouped_tiered_package pricing

This is an alias to an internal type.

type PriceGroupedTieredPackagePriceGroupedTieredPackageConfigTier added in v1.16.0

type PriceGroupedTieredPackagePriceGroupedTieredPackageConfigTier = shared.PriceGroupedTieredPackagePriceGroupedTieredPackageConfigTier

Configuration for a single tier

This is an alias to an internal type.

type PriceGroupedTieredPackagePriceModelType added in v0.81.0

type PriceGroupedTieredPackagePriceModelType = shared.PriceGroupedTieredPackagePriceModelType

The pricing model type

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 PriceGroupedTieredPriceBillingMode added in v1.19.1

type PriceGroupedTieredPriceBillingMode = shared.PriceGroupedTieredPriceBillingMode

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 PriceGroupedTieredPriceGroupedTieredConfig added in v1.16.0

type PriceGroupedTieredPriceGroupedTieredConfig = shared.PriceGroupedTieredPriceGroupedTieredConfig

Configuration for grouped_tiered pricing

This is an alias to an internal type.

type PriceGroupedTieredPriceGroupedTieredConfigTier added in v1.16.0

type PriceGroupedTieredPriceGroupedTieredConfigTier = shared.PriceGroupedTieredPriceGroupedTieredConfigTier

Configuration for a single tier

This is an alias to an internal type.

type PriceGroupedTieredPriceModelType added in v0.25.0

type PriceGroupedTieredPriceModelType = shared.PriceGroupedTieredPriceModelType

The pricing model type

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 PriceGroupedWithMeteredMinimumPriceBillingMode added in v1.19.1

type PriceGroupedWithMeteredMinimumPriceBillingMode = shared.PriceGroupedWithMeteredMinimumPriceBillingMode

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 PriceGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig added in v1.16.0

type PriceGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig = shared.PriceGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig

Configuration for grouped_with_metered_minimum pricing

This is an alias to an internal type.

type PriceGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor added in v1.16.0

type PriceGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor = shared.PriceGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor

Configuration for a scaling factor

This is an alias to an internal type.

type PriceGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount added in v1.16.0

type PriceGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount = shared.PriceGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount

Configuration for a unit amount

This is an alias to an internal type.

type PriceGroupedWithMeteredMinimumPriceModelType added in v0.66.0

type PriceGroupedWithMeteredMinimumPriceModelType = shared.PriceGroupedWithMeteredMinimumPriceModelType

The pricing model type

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 PriceGroupedWithMinMaxThresholdsPrice added in v1.13.0

type PriceGroupedWithMinMaxThresholdsPrice = shared.PriceGroupedWithMinMaxThresholdsPrice

This is an alias to an internal type.

type PriceGroupedWithMinMaxThresholdsPriceBillingMode added in v1.19.1

type PriceGroupedWithMinMaxThresholdsPriceBillingMode = shared.PriceGroupedWithMinMaxThresholdsPriceBillingMode

This is an alias to an internal type.

type PriceGroupedWithMinMaxThresholdsPriceCadence added in v1.13.0

type PriceGroupedWithMinMaxThresholdsPriceCadence = shared.PriceGroupedWithMinMaxThresholdsPriceCadence

This is an alias to an internal type.

type PriceGroupedWithMinMaxThresholdsPriceConversionRateConfig added in v1.13.0

type PriceGroupedWithMinMaxThresholdsPriceConversionRateConfig = shared.PriceGroupedWithMinMaxThresholdsPriceConversionRateConfig

This is an alias to an internal type.

type PriceGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType added in v1.13.0

type PriceGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = shared.PriceGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig added in v1.16.0

type PriceGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig = shared.PriceGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig

Configuration for grouped_with_min_max_thresholds pricing

This is an alias to an internal type.

type PriceGroupedWithMinMaxThresholdsPriceModelType added in v1.13.0

type PriceGroupedWithMinMaxThresholdsPriceModelType = shared.PriceGroupedWithMinMaxThresholdsPriceModelType

The pricing model type

This is an alias to an internal type.

type PriceGroupedWithMinMaxThresholdsPricePriceType added in v1.13.0

type PriceGroupedWithMinMaxThresholdsPricePriceType = shared.PriceGroupedWithMinMaxThresholdsPricePriceType

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 PriceGroupedWithProratedMinimumPriceBillingMode added in v1.19.1

type PriceGroupedWithProratedMinimumPriceBillingMode = shared.PriceGroupedWithProratedMinimumPriceBillingMode

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 PriceGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig added in v1.16.0

type PriceGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig = shared.PriceGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig

Configuration for grouped_with_prorated_minimum pricing

This is an alias to an internal type.

type PriceGroupedWithProratedMinimumPriceModelType added in v0.58.0

type PriceGroupedWithProratedMinimumPriceModelType = shared.PriceGroupedWithProratedMinimumPriceModelType

The pricing model type

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 PriceMatrixPriceBillingMode added in v1.19.1

type PriceMatrixPriceBillingMode = shared.PriceMatrixPriceBillingMode

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

The pricing model type

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 PriceMatrixWithAllocationPriceBillingMode added in v1.19.1

type PriceMatrixWithAllocationPriceBillingMode = shared.PriceMatrixWithAllocationPriceBillingMode

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

The pricing model type

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 PriceMatrixWithDisplayNamePriceBillingMode added in v1.19.1

type PriceMatrixWithDisplayNamePriceBillingMode = shared.PriceMatrixWithDisplayNamePriceBillingMode

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 PriceMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig added in v1.16.0

type PriceMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig = shared.PriceMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig

Configuration for matrix_with_display_name pricing

This is an alias to an internal type.

type PriceMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount added in v1.16.0

type PriceMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount = shared.PriceMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount

Configuration for a unit amount item

This is an alias to an internal type.

type PriceMatrixWithDisplayNamePriceModelType added in v0.78.0

type PriceMatrixWithDisplayNamePriceModelType = shared.PriceMatrixWithDisplayNamePriceModelType

The pricing model type

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 PriceMaxGroupTieredPackagePriceBillingMode added in v1.19.1

type PriceMaxGroupTieredPackagePriceBillingMode = shared.PriceMaxGroupTieredPackagePriceBillingMode

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 PriceMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig added in v1.16.0

type PriceMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig = shared.PriceMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig

Configuration for max_group_tiered_package pricing

This is an alias to an internal type.

type PriceMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier added in v1.16.0

type PriceMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier = shared.PriceMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier

Configuration for a single tier

This is an alias to an internal type.

type PriceMaxGroupTieredPackagePriceModelType added in v0.90.0

type PriceMaxGroupTieredPackagePriceModelType = shared.PriceMaxGroupTieredPackagePriceModelType

The pricing model type

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 PriceMinimumCompositePrice added in v1.14.0

type PriceMinimumCompositePrice = shared.PriceMinimumCompositePrice

This is an alias to an internal type.

type PriceMinimumCompositePriceBillingMode added in v1.19.1

type PriceMinimumCompositePriceBillingMode = shared.PriceMinimumCompositePriceBillingMode

This is an alias to an internal type.

type PriceMinimumCompositePriceCadence added in v1.14.0

type PriceMinimumCompositePriceCadence = shared.PriceMinimumCompositePriceCadence

This is an alias to an internal type.

type PriceMinimumCompositePriceConversionRateConfig added in v1.14.0

type PriceMinimumCompositePriceConversionRateConfig = shared.PriceMinimumCompositePriceConversionRateConfig

This is an alias to an internal type.

type PriceMinimumCompositePriceConversionRateConfigConversionRateType added in v1.14.0

type PriceMinimumCompositePriceConversionRateConfigConversionRateType = shared.PriceMinimumCompositePriceConversionRateConfigConversionRateType

This is an alias to an internal type.

type PriceMinimumCompositePriceMinimumConfig added in v1.14.0

type PriceMinimumCompositePriceMinimumConfig = shared.PriceMinimumCompositePriceMinimumConfig

Configuration for minimum pricing

This is an alias to an internal type.

type PriceMinimumCompositePriceModelType added in v1.14.0

type PriceMinimumCompositePriceModelType = shared.PriceMinimumCompositePriceModelType

The pricing model type

This is an alias to an internal type.

type PriceMinimumCompositePricePriceType added in v1.14.0

type PriceMinimumCompositePricePriceType = shared.PriceMinimumCompositePricePriceType

This is an alias to an internal type.

type PriceModelType added in v0.25.0

type PriceModelType = shared.PriceModelType

The pricing model type

This is an alias to an internal type.

type PriceNewParamsNewFloatingBulkPrice added in v0.2.0

type PriceNewParamsNewFloatingBulkPrice struct {
	// Configuration for bulk pricing
	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"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingBulkPriceConversionRateConfig.

type PriceNewParamsNewFloatingBulkPriceModelType added in v0.2.0

type PriceNewParamsNewFloatingBulkPriceModelType string

The pricing model type

const (
	PriceNewParamsNewFloatingBulkPriceModelTypeBulk PriceNewParamsNewFloatingBulkPriceModelType = "bulk"
)

func (PriceNewParamsNewFloatingBulkPriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingBulkWithProrationPrice added in v0.49.0

type PriceNewParamsNewFloatingBulkWithProrationPrice struct {
	// Configuration for bulk_with_proration pricing
	BulkWithProrationConfig param.Field[PriceNewParamsNewFloatingBulkWithProrationPriceBulkWithProrationConfig] `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"`
	// The pricing model type
	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 PriceNewParamsNewFloatingBulkWithProrationPriceBulkWithProrationConfig added in v1.16.0

type PriceNewParamsNewFloatingBulkWithProrationPriceBulkWithProrationConfig struct {
	// Bulk tiers for rating based on total usage volume
	Tiers param.Field[[]PriceNewParamsNewFloatingBulkWithProrationPriceBulkWithProrationConfigTier] `json:"tiers,required"`
}

Configuration for bulk_with_proration pricing

func (PriceNewParamsNewFloatingBulkWithProrationPriceBulkWithProrationConfig) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingBulkWithProrationPriceBulkWithProrationConfigTier added in v1.16.0

type PriceNewParamsNewFloatingBulkWithProrationPriceBulkWithProrationConfigTier struct {
	// Cost per unit
	UnitAmount param.Field[string] `json:"unit_amount,required"`
	// The lower bound for this tier
	TierLowerBound param.Field[string] `json:"tier_lower_bound"`
}

Configuration for a single bulk pricing tier with proration

func (PriceNewParamsNewFloatingBulkWithProrationPriceBulkWithProrationConfigTier) MarshalJSON added in v1.16.0

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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingBulkWithProrationPriceConversionRateConfig.

type PriceNewParamsNewFloatingBulkWithProrationPriceModelType added in v0.49.0

type PriceNewParamsNewFloatingBulkWithProrationPriceModelType string

The pricing model type

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"`
	// Configuration for cumulative_grouped_bulk pricing
	CumulativeGroupedBulkConfig param.Field[PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig] `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"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingCumulativeGroupedBulkPriceConversionRateConfig.

type PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig added in v1.16.0

type PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig struct {
	// Each tier lower bound must have the same group of values.
	DimensionValues param.Field[[]PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue] `json:"dimension_values,required"`
	// Grouping key name
	Group param.Field[string] `json:"group,required"`
}

Configuration for cumulative_grouped_bulk pricing

func (PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue added in v1.16.0

type PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue struct {
	// Grouping key value
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// Tier lower bound
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Unit amount for this combination
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a dimension value entry

func (PriceNewParamsNewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfigDimensionValue) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingCumulativeGroupedBulkPriceModelType added in v0.94.0

type PriceNewParamsNewFloatingCumulativeGroupedBulkPriceModelType string

The pricing model type

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"`
	// Configuration for grouped_allocation pricing
	GroupedAllocationConfig param.Field[PriceNewParamsNewFloatingGroupedAllocationPriceGroupedAllocationConfig] `json:"grouped_allocation_config,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingGroupedAllocationPriceConversionRateConfig.

type PriceNewParamsNewFloatingGroupedAllocationPriceGroupedAllocationConfig added in v1.16.0

type PriceNewParamsNewFloatingGroupedAllocationPriceGroupedAllocationConfig struct {
	// Usage allocation per group
	Allocation param.Field[string] `json:"allocation,required"`
	// How to determine the groups that should each be allocated some quantity
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// Unit rate for post-allocation
	OverageUnitRate param.Field[string] `json:"overage_unit_rate,required"`
}

Configuration for grouped_allocation pricing

func (PriceNewParamsNewFloatingGroupedAllocationPriceGroupedAllocationConfig) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingGroupedAllocationPriceModelType added in v0.48.0

type PriceNewParamsNewFloatingGroupedAllocationPriceModelType string

The pricing model type

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"`
	// Configuration for grouped_tiered_package pricing
	GroupedTieredPackageConfig param.Field[PriceNewParamsNewFloatingGroupedTieredPackagePriceGroupedTieredPackageConfig] `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"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingGroupedTieredPackagePriceConversionRateConfig.

type PriceNewParamsNewFloatingGroupedTieredPackagePriceGroupedTieredPackageConfig added in v1.16.0

type PriceNewParamsNewFloatingGroupedTieredPackagePriceGroupedTieredPackageConfig struct {
	// The event property used to group before tiering
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// Package size
	PackageSize param.Field[string] `json:"package_size,required"`
	// Apply tiered pricing after rounding up the quantity to the package size. Tiers
	// are defined using exclusive lower bounds.
	Tiers param.Field[[]PriceNewParamsNewFloatingGroupedTieredPackagePriceGroupedTieredPackageConfigTier] `json:"tiers,required"`
}

Configuration for grouped_tiered_package pricing

func (PriceNewParamsNewFloatingGroupedTieredPackagePriceGroupedTieredPackageConfig) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingGroupedTieredPackagePriceGroupedTieredPackageConfigTier added in v1.16.0

type PriceNewParamsNewFloatingGroupedTieredPackagePriceGroupedTieredPackageConfigTier struct {
	// Price per package
	PerUnit param.Field[string] `json:"per_unit,required"`
	// Tier lower bound
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
}

Configuration for a single tier

func (PriceNewParamsNewFloatingGroupedTieredPackagePriceGroupedTieredPackageConfigTier) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingGroupedTieredPackagePriceModelType added in v0.81.0

type PriceNewParamsNewFloatingGroupedTieredPackagePriceModelType string

The pricing model type

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"`
	// Configuration for grouped_tiered pricing
	GroupedTieredConfig param.Field[PriceNewParamsNewFloatingGroupedTieredPriceGroupedTieredConfig] `json:"grouped_tiered_config,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingGroupedTieredPriceConversionRateConfig.

type PriceNewParamsNewFloatingGroupedTieredPriceGroupedTieredConfig added in v1.16.0

type PriceNewParamsNewFloatingGroupedTieredPriceGroupedTieredConfig struct {
	// The billable metric property used to group before tiering
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// Apply tiered pricing to each segment generated after grouping with the provided
	// key
	Tiers param.Field[[]PriceNewParamsNewFloatingGroupedTieredPriceGroupedTieredConfigTier] `json:"tiers,required"`
}

Configuration for grouped_tiered pricing

func (PriceNewParamsNewFloatingGroupedTieredPriceGroupedTieredConfig) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingGroupedTieredPriceGroupedTieredConfigTier added in v1.16.0

type PriceNewParamsNewFloatingGroupedTieredPriceGroupedTieredConfigTier struct {
	// Tier lower bound
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Per unit amount
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a single tier

func (PriceNewParamsNewFloatingGroupedTieredPriceGroupedTieredConfigTier) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingGroupedTieredPriceModelType added in v0.25.0

type PriceNewParamsNewFloatingGroupedTieredPriceModelType string

The pricing model type

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"`
	// Configuration for grouped_with_metered_minimum pricing
	GroupedWithMeteredMinimumConfig param.Field[PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig] `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"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceConversionRateConfig.

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig added in v1.16.0

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig struct {
	// Used to partition the usage into groups. The minimum amount is applied to each
	// group.
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// The minimum amount to charge per group per unit
	MinimumUnitAmount param.Field[string] `json:"minimum_unit_amount,required"`
	// Used to determine the unit rate
	PricingKey param.Field[string] `json:"pricing_key,required"`
	// Scale the unit rates by the scaling factor.
	ScalingFactors param.Field[[]PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor] `json:"scaling_factors,required"`
	// Used to determine the unit rate scaling factor
	ScalingKey param.Field[string] `json:"scaling_key,required"`
	// Apply per unit pricing to each pricing value. The minimum amount is applied any
	// unmatched usage.
	UnitAmounts param.Field[[]PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount] `json:"unit_amounts,required"`
}

Configuration for grouped_with_metered_minimum pricing

func (PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfig) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor added in v1.16.0

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor struct {
	// Scaling factor
	ScalingFactor param.Field[string] `json:"scaling_factor,required"`
	// Scaling value
	ScalingValue param.Field[string] `json:"scaling_value,required"`
}

Configuration for a scaling factor

func (PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigScalingFactor) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount added in v1.16.0

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount struct {
	// Pricing value
	PricingValue param.Field[string] `json:"pricing_value,required"`
	// Per unit amount
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a unit amount

func (PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceGroupedWithMeteredMinimumConfigUnitAmount) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceModelType added in v0.66.0

type PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceModelType string

The pricing model type

const (
	PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceModelTypeGroupedWithMeteredMinimum PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceModelType = "grouped_with_metered_minimum"
)

func (PriceNewParamsNewFloatingGroupedWithMeteredMinimumPriceModelType) IsKnown added in v0.66.0

type PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPrice added in v1.14.0

type PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// Configuration for grouped_with_min_max_thresholds pricing
	GroupedWithMinMaxThresholdsConfig param.Field[PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig] `json:"grouped_with_min_max_thresholds_config,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceModelType] `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[PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion] `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 (PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPrice) ImplementsPriceNewParams added in v1.14.0

func (PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPrice) MarshalJSON added in v1.14.0

type PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceCadence added in v1.14.0

type PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceCadenceAnnual     PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "annual"
	PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceCadenceSemiAnnual PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "semi_annual"
	PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceCadenceMonthly    PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "monthly"
	PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceCadenceQuarterly  PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "quarterly"
	PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceCadenceOneTime    PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "one_time"
	PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceCadenceCustom     PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "custom"
)

func (PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceCadence) IsKnown added in v1.14.0

type PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig added in v1.14.0

type PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                          `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                            `json:"unit_config"`
}

func (PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

func (r PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig) MarshalJSON added in v1.14.0

type PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType added in v1.14.0

type PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType) IsKnown added in v1.14.0

type PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

type PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig.

type PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig added in v1.16.0

type PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig struct {
	// The event property used to group before applying thresholds
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// The maximum amount to charge each group
	MaximumCharge param.Field[string] `json:"maximum_charge,required"`
	// The minimum amount to charge each group, regardless of usage
	MinimumCharge param.Field[string] `json:"minimum_charge,required"`
	// The base price charged per group
	PerUnitRate param.Field[string] `json:"per_unit_rate,required"`
}

Configuration for grouped_with_min_max_thresholds pricing

func (PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceModelType added in v1.14.0

type PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceModelType string

The pricing model type

const (
	PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceModelTypeGroupedWithMinMaxThresholds PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceModelType = "grouped_with_min_max_thresholds"
)

func (PriceNewParamsNewFloatingGroupedWithMinMaxThresholdsPriceModelType) IsKnown added in v1.14.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"`
	// Configuration for grouped_with_prorated_minimum pricing
	GroupedWithProratedMinimumConfig param.Field[PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig] `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"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceConversionRateConfig.

type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig added in v1.16.0

type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig struct {
	// How to determine the groups that should each have a minimum
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// The minimum amount to charge per group
	Minimum param.Field[string] `json:"minimum,required"`
	// The amount to charge per unit
	UnitRate param.Field[string] `json:"unit_rate,required"`
}

Configuration for grouped_with_prorated_minimum pricing

func (PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceGroupedWithProratedMinimumConfig) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceModelType added in v0.58.0

type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceModelType string

The pricing model type

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"`
	// Configuration for matrix pricing
	MatrixConfig param.Field[shared.MatrixConfigParam] `json:"matrix_config,required"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingMatrixPriceConversionRateConfig.

type PriceNewParamsNewFloatingMatrixPriceModelType added in v0.2.0

type PriceNewParamsNewFloatingMatrixPriceModelType string

The pricing model type

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"`
	// Configuration for matrix_with_allocation pricing
	MatrixWithAllocationConfig param.Field[shared.MatrixWithAllocationConfigParam] `json:"matrix_with_allocation_config,required"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingMatrixWithAllocationPriceConversionRateConfig.

type PriceNewParamsNewFloatingMatrixWithAllocationPriceModelType added in v0.22.0

type PriceNewParamsNewFloatingMatrixWithAllocationPriceModelType string

The pricing model type

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"`
	// Configuration for matrix_with_display_name pricing
	MatrixWithDisplayNameConfig param.Field[PriceNewParamsNewFloatingMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig] `json:"matrix_with_display_name_config,required"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingMatrixWithDisplayNamePriceConversionRateConfig.

type PriceNewParamsNewFloatingMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig added in v1.16.0

type PriceNewParamsNewFloatingMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig struct {
	// Used to determine the unit rate
	Dimension param.Field[string] `json:"dimension,required"`
	// Apply per unit pricing to each dimension value
	UnitAmounts param.Field[[]PriceNewParamsNewFloatingMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount] `json:"unit_amounts,required"`
}

Configuration for matrix_with_display_name pricing

func (PriceNewParamsNewFloatingMatrixWithDisplayNamePriceMatrixWithDisplayNameConfig) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount added in v1.16.0

type PriceNewParamsNewFloatingMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount struct {
	// The dimension value
	DimensionValue param.Field[string] `json:"dimension_value,required"`
	// Display name for this dimension value
	DisplayName param.Field[string] `json:"display_name,required"`
	// Per unit amount
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a unit amount item

func (PriceNewParamsNewFloatingMatrixWithDisplayNamePriceMatrixWithDisplayNameConfigUnitAmount) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingMatrixWithDisplayNamePriceModelType added in v0.78.0

type PriceNewParamsNewFloatingMatrixWithDisplayNamePriceModelType string

The pricing model type

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"`
	// Configuration for max_group_tiered_package pricing
	MaxGroupTieredPackageConfig param.Field[PriceNewParamsNewFloatingMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig] `json:"max_group_tiered_package_config,required"`
	// The pricing model type
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingMaxGroupTieredPackagePriceConversionRateConfig.

type PriceNewParamsNewFloatingMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig added in v1.16.0

type PriceNewParamsNewFloatingMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig struct {
	// The event property used to group before tiering the group with the highest value
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// Package size
	PackageSize param.Field[string] `json:"package_size,required"`
	// Apply tiered pricing to the largest group after grouping with the provided key.
	Tiers param.Field[[]PriceNewParamsNewFloatingMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier] `json:"tiers,required"`
}

Configuration for max_group_tiered_package pricing

func (PriceNewParamsNewFloatingMaxGroupTieredPackagePriceMaxGroupTieredPackageConfig) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier added in v1.16.0

type PriceNewParamsNewFloatingMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier struct {
	// Tier lower bound
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Per unit amount
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a single tier

func (PriceNewParamsNewFloatingMaxGroupTieredPackagePriceMaxGroupTieredPackageConfigTier) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingMaxGroupTieredPackagePriceModelType added in v0.90.0

type PriceNewParamsNewFloatingMaxGroupTieredPackagePriceModelType string

The pricing model type

const (
	PriceNewParamsNewFloatingMaxGroupTieredPackagePriceModelTypeMaxGroupTieredPackage PriceNewParamsNewFloatingMaxGroupTieredPackagePriceModelType = "max_group_tiered_package"
)

func (PriceNewParamsNewFloatingMaxGroupTieredPackagePriceModelType) IsKnown added in v0.90.0

type PriceNewParamsNewFloatingMinimumCompositePrice added in v1.14.0

type PriceNewParamsNewFloatingMinimumCompositePrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[PriceNewParamsNewFloatingMinimumCompositePriceCadence] `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"`
	// Configuration for minimum pricing
	MinimumConfig param.Field[PriceNewParamsNewFloatingMinimumCompositePriceMinimumConfig] `json:"minimum_config,required"`
	// The pricing model type
	ModelType param.Field[PriceNewParamsNewFloatingMinimumCompositePriceModelType] `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[PriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfigUnion] `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 (PriceNewParamsNewFloatingMinimumCompositePrice) ImplementsPriceNewParams added in v1.14.0

func (PriceNewParamsNewFloatingMinimumCompositePrice) ImplementsPriceNewParams()

func (PriceNewParamsNewFloatingMinimumCompositePrice) MarshalJSON added in v1.14.0

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

type PriceNewParamsNewFloatingMinimumCompositePriceCadence added in v1.14.0

type PriceNewParamsNewFloatingMinimumCompositePriceCadence string

The cadence to bill for this price on.

const (
	PriceNewParamsNewFloatingMinimumCompositePriceCadenceAnnual     PriceNewParamsNewFloatingMinimumCompositePriceCadence = "annual"
	PriceNewParamsNewFloatingMinimumCompositePriceCadenceSemiAnnual PriceNewParamsNewFloatingMinimumCompositePriceCadence = "semi_annual"
	PriceNewParamsNewFloatingMinimumCompositePriceCadenceMonthly    PriceNewParamsNewFloatingMinimumCompositePriceCadence = "monthly"
	PriceNewParamsNewFloatingMinimumCompositePriceCadenceQuarterly  PriceNewParamsNewFloatingMinimumCompositePriceCadence = "quarterly"
	PriceNewParamsNewFloatingMinimumCompositePriceCadenceOneTime    PriceNewParamsNewFloatingMinimumCompositePriceCadence = "one_time"
	PriceNewParamsNewFloatingMinimumCompositePriceCadenceCustom     PriceNewParamsNewFloatingMinimumCompositePriceCadence = "custom"
)

func (PriceNewParamsNewFloatingMinimumCompositePriceCadence) IsKnown added in v1.14.0

type PriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfig added in v1.14.0

type PriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfig struct {
	ConversionRateType param.Field[PriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                               `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                 `json:"unit_config"`
}

func (PriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfigUnion added in v1.14.0

func (r PriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfig) ImplementsPriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfigUnion()

func (PriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfig) MarshalJSON added in v1.14.0

type PriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfigConversionRateType added in v1.14.0

type PriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfigConversionRateType string
const (
	PriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfigConversionRateTypeUnit   PriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfigConversionRateType = "unit"
	PriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfigConversionRateTypeTiered PriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfigConversionRateType = "tiered"
)

func (PriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfigConversionRateType) IsKnown added in v1.14.0

type PriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfigUnion added in v1.14.0

type PriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfigUnion interface {
	ImplementsPriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingMinimumCompositePriceConversionRateConfig.

type PriceNewParamsNewFloatingMinimumCompositePriceMinimumConfig added in v1.14.0

type PriceNewParamsNewFloatingMinimumCompositePriceMinimumConfig struct {
	// The minimum amount to apply
	MinimumAmount param.Field[string] `json:"minimum_amount,required"`
	// If true, subtotals from this price are prorated based on the service period
	Prorated param.Field[bool] `json:"prorated"`
}

Configuration for minimum pricing

func (PriceNewParamsNewFloatingMinimumCompositePriceMinimumConfig) MarshalJSON added in v1.14.0

type PriceNewParamsNewFloatingMinimumCompositePriceModelType added in v1.14.0

type PriceNewParamsNewFloatingMinimumCompositePriceModelType string

The pricing model type

const (
	PriceNewParamsNewFloatingMinimumCompositePriceModelTypeMinimum PriceNewParamsNewFloatingMinimumCompositePriceModelType = "minimum"
)

func (PriceNewParamsNewFloatingMinimumCompositePriceModelType) IsKnown added in v1.14.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"`
	// The pricing model type
	ModelType param.Field[PriceNewParamsNewFloatingPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for package pricing
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingPackagePriceConversionRateConfig.

type PriceNewParamsNewFloatingPackagePriceModelType added in v0.2.0

type PriceNewParamsNewFloatingPackagePriceModelType string

The pricing model type

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"`
	// The pricing model type
	ModelType param.Field[PriceNewParamsNewFloatingPackageWithAllocationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for package_with_allocation pricing
	PackageWithAllocationConfig param.Field[PriceNewParamsNewFloatingPackageWithAllocationPricePackageWithAllocationConfig] `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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingPackageWithAllocationPriceConversionRateConfig.

type PriceNewParamsNewFloatingPackageWithAllocationPriceModelType added in v0.2.0

type PriceNewParamsNewFloatingPackageWithAllocationPriceModelType string

The pricing model type

const (
	PriceNewParamsNewFloatingPackageWithAllocationPriceModelTypePackageWithAllocation PriceNewParamsNewFloatingPackageWithAllocationPriceModelType = "package_with_allocation"
)

func (PriceNewParamsNewFloatingPackageWithAllocationPriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingPackageWithAllocationPricePackageWithAllocationConfig added in v1.16.0

type PriceNewParamsNewFloatingPackageWithAllocationPricePackageWithAllocationConfig struct {
	// Usage allocation
	Allocation param.Field[string] `json:"allocation,required"`
	// Price per package
	PackageAmount param.Field[string] `json:"package_amount,required"`
	// Package size
	PackageSize param.Field[string] `json:"package_size,required"`
}

Configuration for package_with_allocation pricing

func (PriceNewParamsNewFloatingPackageWithAllocationPricePackageWithAllocationConfig) MarshalJSON added in v1.16.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"`
	// The pricing model type
	ModelType param.Field[PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for scalable_matrix_with_tiered_pricing pricing
	ScalableMatrixWithTieredPricingConfig param.Field[PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig] `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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfig.

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceModelType added in v0.91.0

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceModelType string

The pricing model type

const (
	PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceModelTypeScalableMatrixWithTieredPricing PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceModelType = "scalable_matrix_with_tiered_pricing"
)

func (PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceModelType) IsKnown added in v0.91.0

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig added in v1.16.0

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig struct {
	// Used for the scalable matrix first dimension
	FirstDimension param.Field[string] `json:"first_dimension,required"`
	// Apply a scaling factor to each dimension
	MatrixScalingFactors param.Field[[]PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor] `json:"matrix_scaling_factors,required"`
	// Tier pricing structure
	Tiers param.Field[[]PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier] `json:"tiers,required"`
	// Used for the scalable matrix second dimension (optional)
	SecondDimension param.Field[string] `json:"second_dimension"`
}

Configuration for scalable_matrix_with_tiered_pricing pricing

func (PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor added in v1.16.0

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor struct {
	// First dimension value
	FirstDimensionValue param.Field[string] `json:"first_dimension_value,required"`
	// Scaling factor
	ScalingFactor param.Field[string] `json:"scaling_factor,required"`
	// Second dimension value (optional)
	SecondDimensionValue param.Field[string] `json:"second_dimension_value"`
}

Configuration for a single matrix scaling factor

func (PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier added in v1.16.0

type PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier struct {
	// Tier lower bound
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Per unit amount
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a single tier entry with business logic

func (PriceNewParamsNewFloatingScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier) MarshalJSON added in v1.16.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"`
	// The pricing model type
	ModelType param.Field[PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for scalable_matrix_with_unit_pricing pricing
	ScalableMatrixWithUnitPricingConfig param.Field[PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig] `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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfig.

type PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceModelType added in v0.91.0

type PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceModelType string

The pricing model type

const (
	PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceModelTypeScalableMatrixWithUnitPricing PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceModelType = "scalable_matrix_with_unit_pricing"
)

func (PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceModelType) IsKnown added in v0.91.0

type PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig added in v1.16.0

type PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig struct {
	// Used to determine the unit rate
	FirstDimension param.Field[string] `json:"first_dimension,required"`
	// Apply a scaling factor to each dimension
	MatrixScalingFactors param.Field[[]PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor] `json:"matrix_scaling_factors,required"`
	// The final unit price to rate against the output of the matrix
	UnitPrice param.Field[string] `json:"unit_price,required"`
	// If true, the unit price will be prorated to the billing period
	Prorate param.Field[bool] `json:"prorate"`
	// Used to determine the unit rate (optional)
	SecondDimension param.Field[string] `json:"second_dimension"`
}

Configuration for scalable_matrix_with_unit_pricing pricing

func (PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor added in v1.16.0

type PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor struct {
	// First dimension value
	FirstDimensionValue param.Field[string] `json:"first_dimension_value,required"`
	// Scaling factor
	ScalingFactor param.Field[string] `json:"scaling_factor,required"`
	// Second dimension value (optional)
	SecondDimensionValue param.Field[string] `json:"second_dimension_value"`
}

Configuration for a single matrix scaling factor

func (PriceNewParamsNewFloatingScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor) MarshalJSON added in v1.16.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"`
	// The pricing model type
	ModelType param.Field[PriceNewParamsNewFloatingThresholdTotalAmountPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for threshold_total_amount pricing
	ThresholdTotalAmountConfig param.Field[PriceNewParamsNewFloatingThresholdTotalAmountPriceThresholdTotalAmountConfig] `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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingThresholdTotalAmountPriceConversionRateConfig.

type PriceNewParamsNewFloatingThresholdTotalAmountPriceModelType added in v0.2.0

type PriceNewParamsNewFloatingThresholdTotalAmountPriceModelType string

The pricing model type

const (
	PriceNewParamsNewFloatingThresholdTotalAmountPriceModelTypeThresholdTotalAmount PriceNewParamsNewFloatingThresholdTotalAmountPriceModelType = "threshold_total_amount"
)

func (PriceNewParamsNewFloatingThresholdTotalAmountPriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingThresholdTotalAmountPriceThresholdTotalAmountConfig added in v1.16.0

type PriceNewParamsNewFloatingThresholdTotalAmountPriceThresholdTotalAmountConfig struct {
	// When the quantity consumed passes a provided threshold, the configured total
	// will be charged
	ConsumptionTable param.Field[[]PriceNewParamsNewFloatingThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable] `json:"consumption_table,required"`
	// If true, the unit price will be prorated to the billing period
	Prorate param.Field[bool] `json:"prorate"`
}

Configuration for threshold_total_amount pricing

func (PriceNewParamsNewFloatingThresholdTotalAmountPriceThresholdTotalAmountConfig) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable added in v1.16.0

type PriceNewParamsNewFloatingThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable struct {
	// Quantity threshold
	Threshold param.Field[string] `json:"threshold,required"`
	// Total amount for this threshold
	TotalAmount param.Field[string] `json:"total_amount,required"`
}

Configuration for a single threshold

func (PriceNewParamsNewFloatingThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable) MarshalJSON added in v1.16.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"`
	// The pricing model type
	ModelType param.Field[PriceNewParamsNewFloatingTieredPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for tiered_package pricing
	TieredPackageConfig param.Field[PriceNewParamsNewFloatingTieredPackagePriceTieredPackageConfig] `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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingTieredPackagePriceConversionRateConfig.

type PriceNewParamsNewFloatingTieredPackagePriceModelType added in v0.2.0

type PriceNewParamsNewFloatingTieredPackagePriceModelType string

The pricing model type

const (
	PriceNewParamsNewFloatingTieredPackagePriceModelTypeTieredPackage PriceNewParamsNewFloatingTieredPackagePriceModelType = "tiered_package"
)

func (PriceNewParamsNewFloatingTieredPackagePriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingTieredPackagePriceTieredPackageConfig added in v1.16.0

type PriceNewParamsNewFloatingTieredPackagePriceTieredPackageConfig struct {
	// Package size
	PackageSize param.Field[string] `json:"package_size,required"`
	// Apply tiered pricing after rounding up the quantity to the package size. Tiers
	// are defined using exclusive lower bounds. The tier bounds are defined based on
	// the total quantity rather than the number of packages, so they must be multiples
	// of the package size.
	Tiers param.Field[[]PriceNewParamsNewFloatingTieredPackagePriceTieredPackageConfigTier] `json:"tiers,required"`
}

Configuration for tiered_package pricing

func (PriceNewParamsNewFloatingTieredPackagePriceTieredPackageConfig) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingTieredPackagePriceTieredPackageConfigTier added in v1.16.0

type PriceNewParamsNewFloatingTieredPackagePriceTieredPackageConfigTier struct {
	// Price per package
	PerUnit param.Field[string] `json:"per_unit,required"`
	// Tier lower bound
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
}

Configuration for a single tier with business logic

func (PriceNewParamsNewFloatingTieredPackagePriceTieredPackageConfigTier) MarshalJSON added in v1.16.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"`
	// The pricing model type
	ModelType param.Field[PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for tiered_package_with_minimum pricing
	TieredPackageWithMinimumConfig param.Field[PriceNewParamsNewFloatingTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig] `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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingTieredPackageWithMinimumPriceConversionRateConfig.

type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelType added in v0.20.0

type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelType string

The pricing model type

const (
	PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelTypeTieredPackageWithMinimum PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelType = "tiered_package_with_minimum"
)

func (PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig added in v1.16.0

type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig struct {
	// Package size
	PackageSize param.Field[float64] `json:"package_size,required"`
	// Apply tiered pricing after rounding up the quantity to the package size. Tiers
	// are defined using exclusive lower bounds.
	Tiers param.Field[[]PriceNewParamsNewFloatingTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier] `json:"tiers,required"`
}

Configuration for tiered_package_with_minimum pricing

func (PriceNewParamsNewFloatingTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier added in v1.16.0

type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier struct {
	// Minimum amount
	MinimumAmount param.Field[string] `json:"minimum_amount,required"`
	// Price per package
	PerUnit param.Field[string] `json:"per_unit,required"`
	// Tier lower bound
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
}

Configuration for a single tier

func (PriceNewParamsNewFloatingTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier) MarshalJSON added in v1.16.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"`
	// The pricing model type
	ModelType param.Field[PriceNewParamsNewFloatingTieredPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for tiered pricing
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingTieredPriceConversionRateConfig.

type PriceNewParamsNewFloatingTieredPriceModelType added in v0.2.0

type PriceNewParamsNewFloatingTieredPriceModelType string

The pricing model type

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"`
	// The pricing model type
	ModelType param.Field[PriceNewParamsNewFloatingTieredWithMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for tiered_with_minimum pricing
	TieredWithMinimumConfig param.Field[PriceNewParamsNewFloatingTieredWithMinimumPriceTieredWithMinimumConfig] `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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingTieredWithMinimumPriceConversionRateConfig.

type PriceNewParamsNewFloatingTieredWithMinimumPriceModelType added in v0.2.0

type PriceNewParamsNewFloatingTieredWithMinimumPriceModelType string

The pricing model type

const (
	PriceNewParamsNewFloatingTieredWithMinimumPriceModelTypeTieredWithMinimum PriceNewParamsNewFloatingTieredWithMinimumPriceModelType = "tiered_with_minimum"
)

func (PriceNewParamsNewFloatingTieredWithMinimumPriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingTieredWithMinimumPriceTieredWithMinimumConfig added in v1.16.0

type PriceNewParamsNewFloatingTieredWithMinimumPriceTieredWithMinimumConfig struct {
	// Tiered pricing with a minimum amount dependent on the volume tier. Tiers are
	// defined using exclusive lower bounds.
	Tiers param.Field[[]PriceNewParamsNewFloatingTieredWithMinimumPriceTieredWithMinimumConfigTier] `json:"tiers,required"`
	// If true, tiers with an accrued amount of 0 will not be included in the rating.
	HideZeroAmountTiers param.Field[bool] `json:"hide_zero_amount_tiers"`
	// If true, the unit price will be prorated to the billing period
	Prorate param.Field[bool] `json:"prorate"`
}

Configuration for tiered_with_minimum pricing

func (PriceNewParamsNewFloatingTieredWithMinimumPriceTieredWithMinimumConfig) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingTieredWithMinimumPriceTieredWithMinimumConfigTier added in v1.16.0

type PriceNewParamsNewFloatingTieredWithMinimumPriceTieredWithMinimumConfigTier struct {
	// Minimum amount
	MinimumAmount param.Field[string] `json:"minimum_amount,required"`
	// Tier lower bound
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Per unit amount
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a single tier

func (PriceNewParamsNewFloatingTieredWithMinimumPriceTieredWithMinimumConfigTier) MarshalJSON added in v1.16.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"`
	// The pricing model type
	ModelType param.Field[PriceNewParamsNewFloatingTieredWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for tiered_with_proration pricing
	TieredWithProrationConfig param.Field[PriceNewParamsNewFloatingTieredWithProrationPriceTieredWithProrationConfig] `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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingTieredWithProrationPriceConversionRateConfig.

type PriceNewParamsNewFloatingTieredWithProrationPriceModelType added in v0.34.0

type PriceNewParamsNewFloatingTieredWithProrationPriceModelType string

The pricing model type

const (
	PriceNewParamsNewFloatingTieredWithProrationPriceModelTypeTieredWithProration PriceNewParamsNewFloatingTieredWithProrationPriceModelType = "tiered_with_proration"
)

func (PriceNewParamsNewFloatingTieredWithProrationPriceModelType) IsKnown added in v0.34.0

type PriceNewParamsNewFloatingTieredWithProrationPriceTieredWithProrationConfig added in v1.16.0

type PriceNewParamsNewFloatingTieredWithProrationPriceTieredWithProrationConfig struct {
	// Tiers for rating based on total usage quantities into the specified tier with
	// proration
	Tiers param.Field[[]PriceNewParamsNewFloatingTieredWithProrationPriceTieredWithProrationConfigTier] `json:"tiers,required"`
}

Configuration for tiered_with_proration pricing

func (PriceNewParamsNewFloatingTieredWithProrationPriceTieredWithProrationConfig) MarshalJSON added in v1.16.0

type PriceNewParamsNewFloatingTieredWithProrationPriceTieredWithProrationConfigTier added in v1.16.0

type PriceNewParamsNewFloatingTieredWithProrationPriceTieredWithProrationConfigTier struct {
	// Inclusive tier starting value
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Amount per unit
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a single tiered with proration tier

func (PriceNewParamsNewFloatingTieredWithProrationPriceTieredWithProrationConfigTier) MarshalJSON added in v1.16.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"`
	// The pricing model type
	ModelType param.Field[PriceNewParamsNewFloatingUnitPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for unit pricing
	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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingUnitPriceConversionRateConfig.

type PriceNewParamsNewFloatingUnitPriceModelType added in v0.2.0

type PriceNewParamsNewFloatingUnitPriceModelType string

The pricing model type

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"`
	// The pricing model type
	ModelType param.Field[PriceNewParamsNewFloatingUnitWithPercentPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for unit_with_percent pricing
	UnitWithPercentConfig param.Field[PriceNewParamsNewFloatingUnitWithPercentPriceUnitWithPercentConfig] `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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingUnitWithPercentPriceConversionRateConfig.

type PriceNewParamsNewFloatingUnitWithPercentPriceModelType added in v0.20.0

type PriceNewParamsNewFloatingUnitWithPercentPriceModelType string

The pricing model type

const (
	PriceNewParamsNewFloatingUnitWithPercentPriceModelTypeUnitWithPercent PriceNewParamsNewFloatingUnitWithPercentPriceModelType = "unit_with_percent"
)

func (PriceNewParamsNewFloatingUnitWithPercentPriceModelType) IsKnown added in v0.24.0

type PriceNewParamsNewFloatingUnitWithPercentPriceUnitWithPercentConfig added in v1.16.0

type PriceNewParamsNewFloatingUnitWithPercentPriceUnitWithPercentConfig struct {
	// What percent, out of 100, of the calculated total to charge
	Percent param.Field[string] `json:"percent,required"`
	// Rate per unit of usage
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for unit_with_percent pricing

func (PriceNewParamsNewFloatingUnitWithPercentPriceUnitWithPercentConfig) MarshalJSON added in v1.16.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"`
	// The pricing model type
	ModelType param.Field[PriceNewParamsNewFloatingUnitWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for unit_with_proration pricing
	UnitWithProrationConfig param.Field[PriceNewParamsNewFloatingUnitWithProrationPriceUnitWithProrationConfig] `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"`
}

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()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, PriceNewParamsNewFloatingUnitWithProrationPriceConversionRateConfig.

type PriceNewParamsNewFloatingUnitWithProrationPriceModelType added in v0.34.0

type PriceNewParamsNewFloatingUnitWithProrationPriceModelType string

The pricing model type

const (
	PriceNewParamsNewFloatingUnitWithProrationPriceModelTypeUnitWithProration PriceNewParamsNewFloatingUnitWithProrationPriceModelType = "unit_with_proration"
)

func (PriceNewParamsNewFloatingUnitWithProrationPriceModelType) IsKnown added in v0.34.0

type PriceNewParamsNewFloatingUnitWithProrationPriceUnitWithProrationConfig added in v1.16.0

type PriceNewParamsNewFloatingUnitWithProrationPriceUnitWithProrationConfig struct {
	// Rate per unit of usage
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for unit_with_proration pricing

func (PriceNewParamsNewFloatingUnitWithProrationPriceUnitWithProrationConfig) MarshalJSON added in v1.16.0

type PricePackagePrice

type PricePackagePrice = shared.PricePackagePrice

This is an alias to an internal type.

type PricePackagePriceBillingMode added in v1.19.1

type PricePackagePriceBillingMode = shared.PricePackagePriceBillingMode

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

The pricing model type

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 PricePackageWithAllocationPriceBillingMode added in v1.19.1

type PricePackageWithAllocationPriceBillingMode = shared.PricePackageWithAllocationPriceBillingMode

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

The pricing model type

This is an alias to an internal type.

type PricePackageWithAllocationPricePackageWithAllocationConfig added in v1.16.0

type PricePackageWithAllocationPricePackageWithAllocationConfig = shared.PricePackageWithAllocationPricePackageWithAllocationConfig

Configuration for package_with_allocation pricing

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 PriceScalableMatrixWithTieredPricingPriceBillingMode added in v1.19.1

type PriceScalableMatrixWithTieredPricingPriceBillingMode = shared.PriceScalableMatrixWithTieredPricingPriceBillingMode

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

The pricing model type

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 PriceScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig added in v1.16.0

type PriceScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig = shared.PriceScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfig

Configuration for scalable_matrix_with_tiered_pricing pricing

This is an alias to an internal type.

type PriceScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor added in v1.16.0

type PriceScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor = shared.PriceScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigMatrixScalingFactor

Configuration for a single matrix scaling factor

This is an alias to an internal type.

type PriceScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier added in v1.16.0

type PriceScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier = shared.PriceScalableMatrixWithTieredPricingPriceScalableMatrixWithTieredPricingConfigTier

Configuration for a single tier entry with business logic

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 PriceScalableMatrixWithUnitPricingPriceBillingMode added in v1.19.1

type PriceScalableMatrixWithUnitPricingPriceBillingMode = shared.PriceScalableMatrixWithUnitPricingPriceBillingMode

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

The pricing model type

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 PriceScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig added in v1.16.0

type PriceScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig = shared.PriceScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfig

Configuration for scalable_matrix_with_unit_pricing pricing

This is an alias to an internal type.

type PriceScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor added in v1.16.0

type PriceScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor = shared.PriceScalableMatrixWithUnitPricingPriceScalableMatrixWithUnitPricingConfigMatrixScalingFactor

Configuration for a single matrix scaling factor

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 PriceThresholdTotalAmountPriceBillingMode added in v1.19.1

type PriceThresholdTotalAmountPriceBillingMode = shared.PriceThresholdTotalAmountPriceBillingMode

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

The pricing model type

This is an alias to an internal type.

type PriceThresholdTotalAmountPricePriceType

type PriceThresholdTotalAmountPricePriceType = shared.PriceThresholdTotalAmountPricePriceType

This is an alias to an internal type.

type PriceThresholdTotalAmountPriceThresholdTotalAmountConfig added in v1.16.0

type PriceThresholdTotalAmountPriceThresholdTotalAmountConfig = shared.PriceThresholdTotalAmountPriceThresholdTotalAmountConfig

Configuration for threshold_total_amount pricing

This is an alias to an internal type.

type PriceThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable added in v1.16.0

type PriceThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable = shared.PriceThresholdTotalAmountPriceThresholdTotalAmountConfigConsumptionTable

Configuration for a single threshold

This is an alias to an internal type.

type PriceTieredPackagePrice

type PriceTieredPackagePrice = shared.PriceTieredPackagePrice

This is an alias to an internal type.

type PriceTieredPackagePriceBillingMode added in v1.19.1

type PriceTieredPackagePriceBillingMode = shared.PriceTieredPackagePriceBillingMode

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

The pricing model type

This is an alias to an internal type.

type PriceTieredPackagePricePriceType

type PriceTieredPackagePricePriceType = shared.PriceTieredPackagePricePriceType

This is an alias to an internal type.

type PriceTieredPackagePriceTieredPackageConfig added in v1.16.0

type PriceTieredPackagePriceTieredPackageConfig = shared.PriceTieredPackagePriceTieredPackageConfig

Configuration for tiered_package pricing

This is an alias to an internal type.

type PriceTieredPackagePriceTieredPackageConfigTier added in v1.16.0

type PriceTieredPackagePriceTieredPackageConfigTier = shared.PriceTieredPackagePriceTieredPackageConfigTier

Configuration for a single tier with business logic

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 PriceTieredPackageWithMinimumPriceBillingMode added in v1.19.1

type PriceTieredPackageWithMinimumPriceBillingMode = shared.PriceTieredPackageWithMinimumPriceBillingMode

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

The pricing model type

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 PriceTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig added in v1.16.0

type PriceTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig = shared.PriceTieredPackageWithMinimumPriceTieredPackageWithMinimumConfig

Configuration for tiered_package_with_minimum pricing

This is an alias to an internal type.

type PriceTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier added in v1.16.0

type PriceTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier = shared.PriceTieredPackageWithMinimumPriceTieredPackageWithMinimumConfigTier

Configuration for a single tier

This is an alias to an internal type.

type PriceTieredPrice

type PriceTieredPrice = shared.PriceTieredPrice

This is an alias to an internal type.

type PriceTieredPriceBillingMode added in v1.19.1

type PriceTieredPriceBillingMode = shared.PriceTieredPriceBillingMode

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

The pricing model type

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 PriceTieredWithMinimumPriceBillingMode added in v1.19.1

type PriceTieredWithMinimumPriceBillingMode = shared.PriceTieredWithMinimumPriceBillingMode

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

The pricing model type

This is an alias to an internal type.

type PriceTieredWithMinimumPricePriceType

type PriceTieredWithMinimumPricePriceType = shared.PriceTieredWithMinimumPricePriceType

This is an alias to an internal type.

type PriceTieredWithMinimumPriceTieredWithMinimumConfig added in v1.16.0

type PriceTieredWithMinimumPriceTieredWithMinimumConfig = shared.PriceTieredWithMinimumPriceTieredWithMinimumConfig

Configuration for tiered_with_minimum pricing

This is an alias to an internal type.

type PriceTieredWithMinimumPriceTieredWithMinimumConfigTier added in v1.16.0

type PriceTieredWithMinimumPriceTieredWithMinimumConfigTier = shared.PriceTieredWithMinimumPriceTieredWithMinimumConfigTier

Configuration for a single tier

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 PriceTieredWithProrationPriceBillingMode added in v1.19.1

type PriceTieredWithProrationPriceBillingMode = shared.PriceTieredWithProrationPriceBillingMode

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

The pricing model type

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 PriceTieredWithProrationPriceTieredWithProrationConfig added in v1.16.0

type PriceTieredWithProrationPriceTieredWithProrationConfig = shared.PriceTieredWithProrationPriceTieredWithProrationConfig

Configuration for tiered_with_proration pricing

This is an alias to an internal type.

type PriceTieredWithProrationPriceTieredWithProrationConfigTier added in v1.16.0

type PriceTieredWithProrationPriceTieredWithProrationConfigTier = shared.PriceTieredWithProrationPriceTieredWithProrationConfigTier

Configuration for a single tiered with proration tier

This is an alias to an internal type.

type PriceUnitPrice

type PriceUnitPrice = shared.PriceUnitPrice

This is an alias to an internal type.

type PriceUnitPriceBillingMode added in v1.19.1

type PriceUnitPriceBillingMode = shared.PriceUnitPriceBillingMode

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

The pricing model type

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 PriceUnitWithPercentPriceBillingMode added in v1.19.1

type PriceUnitWithPercentPriceBillingMode = shared.PriceUnitWithPercentPriceBillingMode

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

The pricing model type

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 PriceUnitWithPercentPriceUnitWithPercentConfig added in v1.16.0

type PriceUnitWithPercentPriceUnitWithPercentConfig = shared.PriceUnitWithPercentPriceUnitWithPercentConfig

Configuration for unit_with_percent pricing

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 PriceUnitWithProrationPriceBillingMode added in v1.19.1

type PriceUnitWithProrationPriceBillingMode = shared.PriceUnitWithProrationPriceBillingMode

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

The pricing model type

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 PriceUnitWithProrationPriceUnitWithProrationConfig added in v1.16.0

type PriceUnitWithProrationPriceUnitWithProrationConfig = shared.PriceUnitWithProrationPriceUnitWithProrationConfig

Configuration for unit_with_proration pricing

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. This
	// field is deprecated in favor of `adjustment_intervals`.
	//
	// 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. This field
	// is deprecated in favor of `adjustment_intervals`.
	//
	// 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. This field
	// is deprecated in favor of `adjustment_intervals`.
	//
	// 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"`
	// New subscription price request body params.
	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"`
	// The pricing model type
	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"`
	// Configuration for bulk pricing
	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"`
	GroupedWithMinMaxThresholdsConfig param.Field[interface{}] `json:"grouped_with_min_max_thresholds_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"`
	// Configuration for matrix pricing
	MatrixConfig param.Field[shared.MatrixConfigParam] `json:"matrix_config"`
	// Configuration for matrix_with_allocation pricing
	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"`
	MinimumConfig               param.Field[interface{}]                            `json:"minimum_config"`
	// Configuration for package pricing
	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"`
	// Configuration for tiered pricing
	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"`
	// Configuration for unit pricing
	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"`
}

New subscription price request body params.

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

The pricing model type

const (
	SubscriptionNewParamsAddPricesPriceModelTypeUnit                            SubscriptionNewParamsAddPricesPriceModelType = "unit"
	SubscriptionNewParamsAddPricesPriceModelTypeTiered                          SubscriptionNewParamsAddPricesPriceModelType = "tiered"
	SubscriptionNewParamsAddPricesPriceModelTypeBulk                            SubscriptionNewParamsAddPricesPriceModelType = "bulk"
	SubscriptionNewParamsAddPricesPriceModelTypePackage                         SubscriptionNewParamsAddPricesPriceModelType = "package"
	SubscriptionNewParamsAddPricesPriceModelTypeMatrix                          SubscriptionNewParamsAddPricesPriceModelType = "matrix"
	SubscriptionNewParamsAddPricesPriceModelTypeThresholdTotalAmount            SubscriptionNewParamsAddPricesPriceModelType = "threshold_total_amount"
	SubscriptionNewParamsAddPricesPriceModelTypeTieredPackage                   SubscriptionNewParamsAddPricesPriceModelType = "tiered_package"
	SubscriptionNewParamsAddPricesPriceModelTypeTieredWithMinimum               SubscriptionNewParamsAddPricesPriceModelType = "tiered_with_minimum"
	SubscriptionNewParamsAddPricesPriceModelTypeGroupedTiered                   SubscriptionNewParamsAddPricesPriceModelType = "grouped_tiered"
	SubscriptionNewParamsAddPricesPriceModelTypeTieredPackageWithMinimum        SubscriptionNewParamsAddPricesPriceModelType = "tiered_package_with_minimum"
	SubscriptionNewParamsAddPricesPriceModelTypePackageWithAllocation           SubscriptionNewParamsAddPricesPriceModelType = "package_with_allocation"
	SubscriptionNewParamsAddPricesPriceModelTypeUnitWithPercent                 SubscriptionNewParamsAddPricesPriceModelType = "unit_with_percent"
	SubscriptionNewParamsAddPricesPriceModelTypeMatrixWithAllocation            SubscriptionNewParamsAddPricesPriceModelType = "matrix_with_allocation"
	SubscriptionNewParamsAddPricesPriceModelTypeTieredWithProration             SubscriptionNewParamsAddPricesPriceModelType = "tiered_with_proration"
	SubscriptionNewParamsAddPricesPriceModelTypeUnitWithProration               SubscriptionNewParamsAddPricesPriceModelType = "unit_with_proration"
	SubscriptionNewParamsAddPricesPriceModelTypeGroupedAllocation               SubscriptionNewParamsAddPricesPriceModelType = "grouped_allocation"
	SubscriptionNewParamsAddPricesPriceModelTypeBulkWithProration               SubscriptionNewParamsAddPricesPriceModelType = "bulk_with_proration"
	SubscriptionNewParamsAddPricesPriceModelTypeGroupedWithProratedMinimum      SubscriptionNewParamsAddPricesPriceModelType = "grouped_with_prorated_minimum"
	SubscriptionNewParamsAddPricesPriceModelTypeGroupedWithMeteredMinimum       SubscriptionNewParamsAddPricesPriceModelType = "grouped_with_metered_minimum"
	SubscriptionNewParamsAddPricesPriceModelTypeGroupedWithMinMaxThresholds     SubscriptionNewParamsAddPricesPriceModelType = "grouped_with_min_max_thresholds"
	SubscriptionNewParamsAddPricesPriceModelTypeMatrixWithDisplayName           SubscriptionNewParamsAddPricesPriceModelType = "matrix_with_display_name"
	SubscriptionNewParamsAddPricesPriceModelTypeGroupedTieredPackage            SubscriptionNewParamsAddPricesPriceModelType = "grouped_tiered_package"
	SubscriptionNewParamsAddPricesPriceModelTypeMaxGroupTieredPackage           SubscriptionNewParamsAddPricesPriceModelType = "max_group_tiered_package"
	SubscriptionNewParamsAddPricesPriceModelTypeScalableMatrixWithUnitPricing   SubscriptionNewParamsAddPricesPriceModelType = "scalable_matrix_with_unit_pricing"
	SubscriptionNewParamsAddPricesPriceModelTypeScalableMatrixWithTieredPricing SubscriptionNewParamsAddPricesPriceModelType = "scalable_matrix_with_tiered_pricing"
	SubscriptionNewParamsAddPricesPriceModelTypeCumulativeGroupedBulk           SubscriptionNewParamsAddPricesPriceModelType = "cumulative_grouped_bulk"
	SubscriptionNewParamsAddPricesPriceModelTypeMinimum                         SubscriptionNewParamsAddPricesPriceModelType = "minimum"
)

func (SubscriptionNewParamsAddPricesPriceModelType) IsKnown added in v0.66.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPrice added in v1.14.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence] `json:"cadence,required"`
	// Configuration for grouped_with_min_max_thresholds pricing
	GroupedWithMinMaxThresholdsConfig param.Field[SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig] `json:"grouped_with_min_max_thresholds_config,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType] `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[SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion] `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 (SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPrice) MarshalJSON added in v1.14.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence added in v1.14.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence string

The cadence to bill for this price on.

const (
	SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceAnnual     SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "annual"
	SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceSemiAnnual SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "semi_annual"
	SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceMonthly    SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "monthly"
	SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceQuarterly  SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "quarterly"
	SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceOneTime    SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "one_time"
	SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceCustom     SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "custom"
)

func (SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence) IsKnown added in v1.14.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig added in v1.14.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig struct {
	ConversionRateType param.Field[SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                                   `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                                     `json:"unit_config"`
}

func (SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsSubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

func (r SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsSubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()

func (SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig) MarshalJSON added in v1.14.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType added in v1.14.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType string
const (
	SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeUnit   SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "unit"
	SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeTiered SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "tiered"
)

func (SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType) IsKnown added in v1.14.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion interface {
	ImplementsSubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig.

type SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig added in v1.16.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig struct {
	// The event property used to group before applying thresholds
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// The maximum amount to charge each group
	MaximumCharge param.Field[string] `json:"maximum_charge,required"`
	// The minimum amount to charge each group, regardless of usage
	MinimumCharge param.Field[string] `json:"minimum_charge,required"`
	// The base price charged per group
	PerUnitRate param.Field[string] `json:"per_unit_rate,required"`
}

Configuration for grouped_with_min_max_thresholds pricing

func (SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig) MarshalJSON added in v1.16.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType added in v1.14.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType string

The pricing model type

const (
	SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelTypeGroupedWithMinMaxThresholds SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType = "grouped_with_min_max_thresholds"
)

func (SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType) IsKnown added in v1.14.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPrice added in v1.16.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for tiered_with_proration pricing
	TieredWithProrationConfig param.Field[SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfig] `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[SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion] `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 (SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPrice) MarshalJSON added in v1.16.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence added in v1.16.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadenceAnnual     SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence = "annual"
	SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadenceSemiAnnual SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence = "semi_annual"
	SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadenceMonthly    SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence = "monthly"
	SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadenceQuarterly  SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence = "quarterly"
	SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadenceOneTime    SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence = "one_time"
	SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadenceCustom     SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence = "custom"
)

func (SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence) IsKnown added in v1.16.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig added in v1.16.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig struct {
	ConversionRateType param.Field[SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                           `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                             `json:"unit_config"`
}

func (SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig) ImplementsSubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion added in v1.16.0

func (r SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig) ImplementsSubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion()

func (SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig) MarshalJSON added in v1.16.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType added in v1.16.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType string
const (
	SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateTypeUnit   SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType = "unit"
	SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateTypeTiered SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType = "tiered"
)

func (SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType) IsKnown added in v1.16.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion added in v1.16.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion interface {
	ImplementsSubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig.

type SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceModelType added in v1.16.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceModelType string

The pricing model type

const (
	SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceModelTypeTieredWithProration SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceModelType = "tiered_with_proration"
)

func (SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceModelType) IsKnown added in v1.16.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfig added in v1.16.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfig struct {
	// Tiers for rating based on total usage quantities into the specified tier with
	// proration
	Tiers param.Field[[]SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfigTier] `json:"tiers,required"`
}

Configuration for tiered_with_proration pricing

func (SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfig) MarshalJSON added in v1.16.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfigTier added in v1.16.0

type SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfigTier struct {
	// Inclusive tier starting value
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Amount per unit
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a single tiered with proration tier

func (SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfigTier) MarshalJSON added in v1.16.0

type SubscriptionNewParamsAddPricesPriceUnion added in v0.66.0

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

New subscription price request body params.

Satisfied by NewSubscriptionUnitPriceParam, NewSubscriptionTieredPriceParam, NewSubscriptionBulkPriceParam, NewSubscriptionPackagePriceParam, NewSubscriptionMatrixPriceParam, NewSubscriptionThresholdTotalAmountPriceParam, NewSubscriptionTieredPackagePriceParam, NewSubscriptionTieredWithMinimumPriceParam, NewSubscriptionGroupedTieredPriceParam, NewSubscriptionTieredPackageWithMinimumPriceParam, NewSubscriptionPackageWithAllocationPriceParam, NewSubscriptionUnitWithPercentPriceParam, NewSubscriptionMatrixWithAllocationPriceParam, SubscriptionNewParamsAddPricesPriceNewSubscriptionTieredWithProrationPrice, NewSubscriptionUnitWithProrationPriceParam, NewSubscriptionGroupedAllocationPriceParam, NewSubscriptionBulkWithProrationPriceParam, NewSubscriptionGroupedWithProratedMinimumPriceParam, NewSubscriptionGroupedWithMeteredMinimumPriceParam, SubscriptionNewParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPrice, NewSubscriptionMatrixWithDisplayNamePriceParam, NewSubscriptionGroupedTieredPackagePriceParam, NewSubscriptionMaxGroupTieredPackagePriceParam, NewSubscriptionScalableMatrixWithUnitPricingPriceParam, NewSubscriptionScalableMatrixWithTieredPricingPriceParam, NewSubscriptionCumulativeGroupedBulkPriceParam, NewSubscriptionMinimumCompositePriceParam, SubscriptionNewParamsAddPricesPrice.

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"`
	// New subscription price request body params.
	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"`
	// The pricing model type
	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"`
	// Configuration for bulk pricing
	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"`
	GroupedWithMinMaxThresholdsConfig param.Field[interface{}] `json:"grouped_with_min_max_thresholds_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"`
	// Configuration for matrix pricing
	MatrixConfig param.Field[shared.MatrixConfigParam] `json:"matrix_config"`
	// Configuration for matrix_with_allocation pricing
	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"`
	MinimumConfig               param.Field[interface{}]                            `json:"minimum_config"`
	// Configuration for package pricing
	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"`
	// Configuration for tiered pricing
	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"`
	// Configuration for unit pricing
	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"`
}

New subscription price request body params.

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

The pricing model type

const (
	SubscriptionNewParamsReplacePricesPriceModelTypeUnit                            SubscriptionNewParamsReplacePricesPriceModelType = "unit"
	SubscriptionNewParamsReplacePricesPriceModelTypeTiered                          SubscriptionNewParamsReplacePricesPriceModelType = "tiered"
	SubscriptionNewParamsReplacePricesPriceModelTypeBulk                            SubscriptionNewParamsReplacePricesPriceModelType = "bulk"
	SubscriptionNewParamsReplacePricesPriceModelTypePackage                         SubscriptionNewParamsReplacePricesPriceModelType = "package"
	SubscriptionNewParamsReplacePricesPriceModelTypeMatrix                          SubscriptionNewParamsReplacePricesPriceModelType = "matrix"
	SubscriptionNewParamsReplacePricesPriceModelTypeThresholdTotalAmount            SubscriptionNewParamsReplacePricesPriceModelType = "threshold_total_amount"
	SubscriptionNewParamsReplacePricesPriceModelTypeTieredPackage                   SubscriptionNewParamsReplacePricesPriceModelType = "tiered_package"
	SubscriptionNewParamsReplacePricesPriceModelTypeTieredWithMinimum               SubscriptionNewParamsReplacePricesPriceModelType = "tiered_with_minimum"
	SubscriptionNewParamsReplacePricesPriceModelTypeGroupedTiered                   SubscriptionNewParamsReplacePricesPriceModelType = "grouped_tiered"
	SubscriptionNewParamsReplacePricesPriceModelTypeTieredPackageWithMinimum        SubscriptionNewParamsReplacePricesPriceModelType = "tiered_package_with_minimum"
	SubscriptionNewParamsReplacePricesPriceModelTypePackageWithAllocation           SubscriptionNewParamsReplacePricesPriceModelType = "package_with_allocation"
	SubscriptionNewParamsReplacePricesPriceModelTypeUnitWithPercent                 SubscriptionNewParamsReplacePricesPriceModelType = "unit_with_percent"
	SubscriptionNewParamsReplacePricesPriceModelTypeMatrixWithAllocation            SubscriptionNewParamsReplacePricesPriceModelType = "matrix_with_allocation"
	SubscriptionNewParamsReplacePricesPriceModelTypeTieredWithProration             SubscriptionNewParamsReplacePricesPriceModelType = "tiered_with_proration"
	SubscriptionNewParamsReplacePricesPriceModelTypeUnitWithProration               SubscriptionNewParamsReplacePricesPriceModelType = "unit_with_proration"
	SubscriptionNewParamsReplacePricesPriceModelTypeGroupedAllocation               SubscriptionNewParamsReplacePricesPriceModelType = "grouped_allocation"
	SubscriptionNewParamsReplacePricesPriceModelTypeBulkWithProration               SubscriptionNewParamsReplacePricesPriceModelType = "bulk_with_proration"
	SubscriptionNewParamsReplacePricesPriceModelTypeGroupedWithProratedMinimum      SubscriptionNewParamsReplacePricesPriceModelType = "grouped_with_prorated_minimum"
	SubscriptionNewParamsReplacePricesPriceModelTypeGroupedWithMeteredMinimum       SubscriptionNewParamsReplacePricesPriceModelType = "grouped_with_metered_minimum"
	SubscriptionNewParamsReplacePricesPriceModelTypeGroupedWithMinMaxThresholds     SubscriptionNewParamsReplacePricesPriceModelType = "grouped_with_min_max_thresholds"
	SubscriptionNewParamsReplacePricesPriceModelTypeMatrixWithDisplayName           SubscriptionNewParamsReplacePricesPriceModelType = "matrix_with_display_name"
	SubscriptionNewParamsReplacePricesPriceModelTypeGroupedTieredPackage            SubscriptionNewParamsReplacePricesPriceModelType = "grouped_tiered_package"
	SubscriptionNewParamsReplacePricesPriceModelTypeMaxGroupTieredPackage           SubscriptionNewParamsReplacePricesPriceModelType = "max_group_tiered_package"
	SubscriptionNewParamsReplacePricesPriceModelTypeScalableMatrixWithUnitPricing   SubscriptionNewParamsReplacePricesPriceModelType = "scalable_matrix_with_unit_pricing"
	SubscriptionNewParamsReplacePricesPriceModelTypeScalableMatrixWithTieredPricing SubscriptionNewParamsReplacePricesPriceModelType = "scalable_matrix_with_tiered_pricing"
	SubscriptionNewParamsReplacePricesPriceModelTypeCumulativeGroupedBulk           SubscriptionNewParamsReplacePricesPriceModelType = "cumulative_grouped_bulk"
	SubscriptionNewParamsReplacePricesPriceModelTypeMinimum                         SubscriptionNewParamsReplacePricesPriceModelType = "minimum"
)

func (SubscriptionNewParamsReplacePricesPriceModelType) IsKnown added in v0.66.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPrice added in v1.14.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence] `json:"cadence,required"`
	// Configuration for grouped_with_min_max_thresholds pricing
	GroupedWithMinMaxThresholdsConfig param.Field[SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig] `json:"grouped_with_min_max_thresholds_config,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType] `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[SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion] `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 (SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPrice) MarshalJSON added in v1.14.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence added in v1.14.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence string

The cadence to bill for this price on.

const (
	SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceAnnual     SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "annual"
	SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceSemiAnnual SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "semi_annual"
	SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceMonthly    SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "monthly"
	SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceQuarterly  SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "quarterly"
	SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceOneTime    SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "one_time"
	SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceCustom     SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "custom"
)

func (SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence) IsKnown added in v1.14.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig added in v1.14.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig struct {
	ConversionRateType param.Field[SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                                       `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                                         `json:"unit_config"`
}

func (SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsSubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

func (r SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsSubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()

func (SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig) MarshalJSON added in v1.14.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType added in v1.14.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType string
const (
	SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeUnit   SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "unit"
	SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeTiered SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "tiered"
)

func (SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType) IsKnown added in v1.14.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion interface {
	ImplementsSubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig.

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig added in v1.16.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig struct {
	// The event property used to group before applying thresholds
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// The maximum amount to charge each group
	MaximumCharge param.Field[string] `json:"maximum_charge,required"`
	// The minimum amount to charge each group, regardless of usage
	MinimumCharge param.Field[string] `json:"minimum_charge,required"`
	// The base price charged per group
	PerUnitRate param.Field[string] `json:"per_unit_rate,required"`
}

Configuration for grouped_with_min_max_thresholds pricing

func (SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig) MarshalJSON added in v1.16.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType added in v1.14.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType string

The pricing model type

const (
	SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelTypeGroupedWithMinMaxThresholds SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType = "grouped_with_min_max_thresholds"
)

func (SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType) IsKnown added in v1.14.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPrice added in v1.16.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for tiered_with_proration pricing
	TieredWithProrationConfig param.Field[SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfig] `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[SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion] `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 (SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPrice) MarshalJSON added in v1.16.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence added in v1.16.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadenceAnnual     SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence = "annual"
	SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadenceSemiAnnual SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence = "semi_annual"
	SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadenceMonthly    SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence = "monthly"
	SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadenceQuarterly  SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence = "quarterly"
	SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadenceOneTime    SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence = "one_time"
	SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadenceCustom     SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence = "custom"
)

func (SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence) IsKnown added in v1.16.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig added in v1.16.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig struct {
	ConversionRateType param.Field[SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                               `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                                 `json:"unit_config"`
}

func (SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig) ImplementsSubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion added in v1.16.0

func (r SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig) ImplementsSubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion()

func (SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig) MarshalJSON added in v1.16.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType added in v1.16.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType string
const (
	SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateTypeUnit   SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType = "unit"
	SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateTypeTiered SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType = "tiered"
)

func (SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType) IsKnown added in v1.16.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion added in v1.16.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion interface {
	ImplementsSubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig.

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceModelType added in v1.16.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceModelType string

The pricing model type

const (
	SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceModelTypeTieredWithProration SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceModelType = "tiered_with_proration"
)

func (SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceModelType) IsKnown added in v1.16.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfig added in v1.16.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfig struct {
	// Tiers for rating based on total usage quantities into the specified tier with
	// proration
	Tiers param.Field[[]SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfigTier] `json:"tiers,required"`
}

Configuration for tiered_with_proration pricing

func (SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfig) MarshalJSON added in v1.16.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfigTier added in v1.16.0

type SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfigTier struct {
	// Inclusive tier starting value
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Amount per unit
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a single tiered with proration tier

func (SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfigTier) MarshalJSON added in v1.16.0

type SubscriptionNewParamsReplacePricesPriceUnion added in v0.66.0

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

New subscription price request body params.

Satisfied by NewSubscriptionUnitPriceParam, NewSubscriptionTieredPriceParam, NewSubscriptionBulkPriceParam, NewSubscriptionPackagePriceParam, NewSubscriptionMatrixPriceParam, NewSubscriptionThresholdTotalAmountPriceParam, NewSubscriptionTieredPackagePriceParam, NewSubscriptionTieredWithMinimumPriceParam, NewSubscriptionGroupedTieredPriceParam, NewSubscriptionTieredPackageWithMinimumPriceParam, NewSubscriptionPackageWithAllocationPriceParam, NewSubscriptionUnitWithPercentPriceParam, NewSubscriptionMatrixWithAllocationPriceParam, SubscriptionNewParamsReplacePricesPriceNewSubscriptionTieredWithProrationPrice, NewSubscriptionUnitWithProrationPriceParam, NewSubscriptionGroupedAllocationPriceParam, NewSubscriptionBulkWithProrationPriceParam, NewSubscriptionGroupedWithProratedMinimumPriceParam, NewSubscriptionGroupedWithMeteredMinimumPriceParam, SubscriptionNewParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPrice, NewSubscriptionMatrixWithDisplayNamePriceParam, NewSubscriptionGroupedTieredPackagePriceParam, NewSubscriptionMaxGroupTieredPackagePriceParam, NewSubscriptionScalableMatrixWithUnitPricingPriceParam, NewSubscriptionScalableMatrixWithTieredPricingPriceParam, NewSubscriptionCumulativeGroupedBulkPriceParam, NewSubscriptionMinimumCompositePriceParam, 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"`
	// New floating price request body params.
	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 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 definition of a new adjustment to create and add to the subscription.
	Adjustment param.Field[SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentUnion] `json:"adjustment"`
	// The ID of the adjustment to add to the subscription. Adjustment IDs can be
	// re-used from existing subscriptions or plans, but adjustments associated with
	// coupon redemptions cannot be re-used.
	AdjustmentID param.Field[string] `json:"adjustment_id"`
	// 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"`
	// The pricing model type
	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"`
	// Configuration for bulk pricing
	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"`
	GroupedWithMinMaxThresholdsConfig param.Field[interface{}] `json:"grouped_with_min_max_thresholds_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"`
	// Configuration for matrix pricing
	MatrixConfig param.Field[shared.MatrixConfigParam] `json:"matrix_config"`
	// Configuration for matrix_with_allocation pricing
	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"`
	MinimumConfig               param.Field[interface{}]                            `json:"minimum_config"`
	// Configuration for package pricing
	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"`
	// Configuration for tiered pricing
	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"`
	// Configuration for unit pricing
	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"`
}

New floating price request body params.

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

The pricing model type

const (
	SubscriptionPriceIntervalsParamsAddPriceModelTypeUnit                            SubscriptionPriceIntervalsParamsAddPriceModelType = "unit"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeTiered                          SubscriptionPriceIntervalsParamsAddPriceModelType = "tiered"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeBulk                            SubscriptionPriceIntervalsParamsAddPriceModelType = "bulk"
	SubscriptionPriceIntervalsParamsAddPriceModelTypePackage                         SubscriptionPriceIntervalsParamsAddPriceModelType = "package"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeMatrix                          SubscriptionPriceIntervalsParamsAddPriceModelType = "matrix"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeThresholdTotalAmount            SubscriptionPriceIntervalsParamsAddPriceModelType = "threshold_total_amount"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeTieredPackage                   SubscriptionPriceIntervalsParamsAddPriceModelType = "tiered_package"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeTieredWithMinimum               SubscriptionPriceIntervalsParamsAddPriceModelType = "tiered_with_minimum"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeGroupedTiered                   SubscriptionPriceIntervalsParamsAddPriceModelType = "grouped_tiered"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeTieredPackageWithMinimum        SubscriptionPriceIntervalsParamsAddPriceModelType = "tiered_package_with_minimum"
	SubscriptionPriceIntervalsParamsAddPriceModelTypePackageWithAllocation           SubscriptionPriceIntervalsParamsAddPriceModelType = "package_with_allocation"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeUnitWithPercent                 SubscriptionPriceIntervalsParamsAddPriceModelType = "unit_with_percent"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeMatrixWithAllocation            SubscriptionPriceIntervalsParamsAddPriceModelType = "matrix_with_allocation"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeTieredWithProration             SubscriptionPriceIntervalsParamsAddPriceModelType = "tiered_with_proration"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeUnitWithProration               SubscriptionPriceIntervalsParamsAddPriceModelType = "unit_with_proration"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeGroupedAllocation               SubscriptionPriceIntervalsParamsAddPriceModelType = "grouped_allocation"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeBulkWithProration               SubscriptionPriceIntervalsParamsAddPriceModelType = "bulk_with_proration"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeGroupedWithProratedMinimum      SubscriptionPriceIntervalsParamsAddPriceModelType = "grouped_with_prorated_minimum"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeGroupedWithMeteredMinimum       SubscriptionPriceIntervalsParamsAddPriceModelType = "grouped_with_metered_minimum"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeGroupedWithMinMaxThresholds     SubscriptionPriceIntervalsParamsAddPriceModelType = "grouped_with_min_max_thresholds"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeMatrixWithDisplayName           SubscriptionPriceIntervalsParamsAddPriceModelType = "matrix_with_display_name"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeGroupedTieredPackage            SubscriptionPriceIntervalsParamsAddPriceModelType = "grouped_tiered_package"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeMaxGroupTieredPackage           SubscriptionPriceIntervalsParamsAddPriceModelType = "max_group_tiered_package"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeScalableMatrixWithUnitPricing   SubscriptionPriceIntervalsParamsAddPriceModelType = "scalable_matrix_with_unit_pricing"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeScalableMatrixWithTieredPricing SubscriptionPriceIntervalsParamsAddPriceModelType = "scalable_matrix_with_tiered_pricing"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeCumulativeGroupedBulk           SubscriptionPriceIntervalsParamsAddPriceModelType = "cumulative_grouped_bulk"
	SubscriptionPriceIntervalsParamsAddPriceModelTypeMinimum                         SubscriptionPriceIntervalsParamsAddPriceModelType = "minimum"
)

func (SubscriptionPriceIntervalsParamsAddPriceModelType) IsKnown added in v0.25.0

type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPrice added in v1.14.0

type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// Configuration for grouped_with_min_max_thresholds pricing
	GroupedWithMinMaxThresholdsConfig param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig] `json:"grouped_with_min_max_thresholds_config,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceModelType] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPrice) ImplementsSubscriptionPriceIntervalsParamsAddPriceUnion added in v1.14.0

func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPrice) ImplementsSubscriptionPriceIntervalsParamsAddPriceUnion()

func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPrice) MarshalJSON added in v1.14.0

type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence added in v1.14.0

type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence string

The cadence to bill for this price on.

const (
	SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadenceAnnual     SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "annual"
	SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "semi_annual"
	SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadenceMonthly    SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "monthly"
	SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadenceQuarterly  SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "quarterly"
	SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadenceOneTime    SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "one_time"
	SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadenceCustom     SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence = "custom"
)

func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceCadence) IsKnown added in v1.14.0

type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig added in v1.14.0

type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig struct {
	ConversionRateType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                                    `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                                      `json:"unit_config"`
}

func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsSubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsSubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()

func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig) MarshalJSON added in v1.14.0

type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType added in v1.14.0

type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType string
const (
	SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeUnit   SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "unit"
	SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeTiered SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "tiered"
)

func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType) IsKnown added in v1.14.0

type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion interface {
	ImplementsSubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceConversionRateConfig.

type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig added in v1.16.0

type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig struct {
	// The event property used to group before applying thresholds
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// The maximum amount to charge each group
	MaximumCharge param.Field[string] `json:"maximum_charge,required"`
	// The minimum amount to charge each group, regardless of usage
	MinimumCharge param.Field[string] `json:"minimum_charge,required"`
	// The base price charged per group
	PerUnitRate param.Field[string] `json:"per_unit_rate,required"`
}

Configuration for grouped_with_min_max_thresholds pricing

func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig) MarshalJSON added in v1.16.0

type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceModelType added in v1.14.0

type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceModelType string

The pricing model type

const (
	SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceModelTypeGroupedWithMinMaxThresholds SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceModelType = "grouped_with_min_max_thresholds"
)

func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPriceModelType) IsKnown added in v1.14.0

type SubscriptionPriceIntervalsParamsAddPriceUnion added in v0.25.0

type SubscriptionPriceIntervalsParamsAddPriceUnion interface {
	ImplementsSubscriptionPriceIntervalsParamsAddPriceUnion()
}

New floating price request body params.

Satisfied by shared.NewFloatingUnitPriceParam, shared.NewFloatingTieredPriceParam, shared.NewFloatingBulkPriceParam, shared.NewFloatingPackagePriceParam, shared.NewFloatingMatrixPriceParam, shared.NewFloatingThresholdTotalAmountPriceParam, shared.NewFloatingTieredPackagePriceParam, shared.NewFloatingTieredWithMinimumPriceParam, shared.NewFloatingGroupedTieredPriceParam, shared.NewFloatingTieredPackageWithMinimumPriceParam, shared.NewFloatingPackageWithAllocationPriceParam, shared.NewFloatingUnitWithPercentPriceParam, shared.NewFloatingMatrixWithAllocationPriceParam, shared.NewFloatingTieredWithProrationPriceParam, shared.NewFloatingUnitWithProrationPriceParam, shared.NewFloatingGroupedAllocationPriceParam, shared.NewFloatingBulkWithProrationPriceParam, shared.NewFloatingGroupedWithProratedMinimumPriceParam, shared.NewFloatingGroupedWithMeteredMinimumPriceParam, SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithMinMaxThresholdsPrice, shared.NewFloatingMatrixWithDisplayNamePriceParam, shared.NewFloatingGroupedTieredPackagePriceParam, shared.NewFloatingMaxGroupTieredPackagePriceParam, shared.NewFloatingScalableMatrixWithUnitPricingPriceParam, shared.NewFloatingScalableMatrixWithTieredPricingPriceParam, shared.NewFloatingCumulativeGroupedBulkPriceParam, shared.NewFloatingMinimumCompositePriceParam, 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 end 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 end 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 end 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 end 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"`
	// New subscription price request body params.
	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"`
	// The pricing model type
	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"`
	// Configuration for bulk pricing
	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"`
	GroupedWithMinMaxThresholdsConfig param.Field[interface{}] `json:"grouped_with_min_max_thresholds_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"`
	// Configuration for matrix pricing
	MatrixConfig param.Field[shared.MatrixConfigParam] `json:"matrix_config"`
	// Configuration for matrix_with_allocation pricing
	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"`
	MinimumConfig               param.Field[interface{}]                            `json:"minimum_config"`
	// Configuration for package pricing
	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"`
	// Configuration for tiered pricing
	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"`
	// Configuration for unit pricing
	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"`
}

New subscription price request body params.

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

The pricing model type

const (
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeUnit                            SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "unit"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeTiered                          SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "tiered"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeBulk                            SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "bulk"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypePackage                         SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "package"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeMatrix                          SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "matrix"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeThresholdTotalAmount            SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "threshold_total_amount"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeTieredPackage                   SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "tiered_package"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeTieredWithMinimum               SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "tiered_with_minimum"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeGroupedTiered                   SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "grouped_tiered"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeTieredPackageWithMinimum        SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "tiered_package_with_minimum"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypePackageWithAllocation           SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "package_with_allocation"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeUnitWithPercent                 SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "unit_with_percent"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeMatrixWithAllocation            SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "matrix_with_allocation"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeTieredWithProration             SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "tiered_with_proration"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeUnitWithProration               SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "unit_with_proration"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeGroupedAllocation               SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "grouped_allocation"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeBulkWithProration               SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "bulk_with_proration"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeGroupedWithProratedMinimum      SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "grouped_with_prorated_minimum"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeGroupedWithMeteredMinimum       SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "grouped_with_metered_minimum"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeGroupedWithMinMaxThresholds     SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "grouped_with_min_max_thresholds"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeMatrixWithDisplayName           SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "matrix_with_display_name"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeGroupedTieredPackage            SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "grouped_tiered_package"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeMaxGroupTieredPackage           SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "max_group_tiered_package"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeScalableMatrixWithUnitPricing   SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "scalable_matrix_with_unit_pricing"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeScalableMatrixWithTieredPricing SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "scalable_matrix_with_tiered_pricing"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeCumulativeGroupedBulk           SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "cumulative_grouped_bulk"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceModelTypeMinimum                         SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType = "minimum"
)

func (SubscriptionSchedulePlanChangeParamsAddPricesPriceModelType) IsKnown added in v0.68.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPrice added in v1.14.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence] `json:"cadence,required"`
	// Configuration for grouped_with_min_max_thresholds pricing
	GroupedWithMinMaxThresholdsConfig param.Field[SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig] `json:"grouped_with_min_max_thresholds_config,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType] `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[SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion] `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 (SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPrice) MarshalJSON added in v1.14.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence added in v1.14.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence string

The cadence to bill for this price on.

const (
	SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceAnnual     SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "annual"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceSemiAnnual SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "semi_annual"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceMonthly    SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "monthly"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceQuarterly  SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "quarterly"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceOneTime    SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "one_time"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceCustom     SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "custom"
)

func (SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence) IsKnown added in v1.14.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig added in v1.14.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig struct {
	ConversionRateType param.Field[SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                                                  `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                                                    `json:"unit_config"`
}

func (SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsSubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

func (r SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsSubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()

func (SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig) MarshalJSON added in v1.14.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType added in v1.14.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType string
const (
	SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeUnit   SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "unit"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeTiered SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "tiered"
)

func (SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType) IsKnown added in v1.14.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion interface {
	ImplementsSubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig.

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig added in v1.16.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig struct {
	// The event property used to group before applying thresholds
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// The maximum amount to charge each group
	MaximumCharge param.Field[string] `json:"maximum_charge,required"`
	// The minimum amount to charge each group, regardless of usage
	MinimumCharge param.Field[string] `json:"minimum_charge,required"`
	// The base price charged per group
	PerUnitRate param.Field[string] `json:"per_unit_rate,required"`
}

Configuration for grouped_with_min_max_thresholds pricing

func (SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig) MarshalJSON added in v1.16.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType added in v1.14.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType string

The pricing model type

const (
	SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelTypeGroupedWithMinMaxThresholds SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType = "grouped_with_min_max_thresholds"
)

func (SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType) IsKnown added in v1.14.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPrice added in v1.16.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for tiered_with_proration pricing
	TieredWithProrationConfig param.Field[SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfig] `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[SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion] `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 (SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPrice) MarshalJSON added in v1.16.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence added in v1.16.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadenceAnnual     SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence = "annual"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadenceSemiAnnual SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence = "semi_annual"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadenceMonthly    SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence = "monthly"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadenceQuarterly  SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence = "quarterly"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadenceOneTime    SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence = "one_time"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadenceCustom     SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence = "custom"
)

func (SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceCadence) IsKnown added in v1.16.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig added in v1.16.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig struct {
	ConversionRateType param.Field[SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                                          `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                                            `json:"unit_config"`
}

func (SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig) ImplementsSubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion added in v1.16.0

func (r SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig) ImplementsSubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion()

func (SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig) MarshalJSON added in v1.16.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType added in v1.16.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType string
const (
	SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateTypeUnit   SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType = "unit"
	SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateTypeTiered SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType = "tiered"
)

func (SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType) IsKnown added in v1.16.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion added in v1.16.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion interface {
	ImplementsSubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig.

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceModelType added in v1.16.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceModelType string

The pricing model type

const (
	SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceModelTypeTieredWithProration SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceModelType = "tiered_with_proration"
)

func (SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceModelType) IsKnown added in v1.16.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfig added in v1.16.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfig struct {
	// Tiers for rating based on total usage quantities into the specified tier with
	// proration
	Tiers param.Field[[]SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfigTier] `json:"tiers,required"`
}

Configuration for tiered_with_proration pricing

func (SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfig) MarshalJSON added in v1.16.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfigTier added in v1.16.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfigTier struct {
	// Inclusive tier starting value
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Amount per unit
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a single tiered with proration tier

func (SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfigTier) MarshalJSON added in v1.16.0

type SubscriptionSchedulePlanChangeParamsAddPricesPriceUnion added in v0.68.0

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

New subscription price request body params.

Satisfied by NewSubscriptionUnitPriceParam, NewSubscriptionTieredPriceParam, NewSubscriptionBulkPriceParam, NewSubscriptionPackagePriceParam, NewSubscriptionMatrixPriceParam, NewSubscriptionThresholdTotalAmountPriceParam, NewSubscriptionTieredPackagePriceParam, NewSubscriptionTieredWithMinimumPriceParam, NewSubscriptionGroupedTieredPriceParam, NewSubscriptionTieredPackageWithMinimumPriceParam, NewSubscriptionPackageWithAllocationPriceParam, NewSubscriptionUnitWithPercentPriceParam, NewSubscriptionMatrixWithAllocationPriceParam, SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionTieredWithProrationPrice, NewSubscriptionUnitWithProrationPriceParam, NewSubscriptionGroupedAllocationPriceParam, NewSubscriptionBulkWithProrationPriceParam, NewSubscriptionGroupedWithProratedMinimumPriceParam, NewSubscriptionGroupedWithMeteredMinimumPriceParam, SubscriptionSchedulePlanChangeParamsAddPricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPrice, NewSubscriptionMatrixWithDisplayNamePriceParam, NewSubscriptionGroupedTieredPackagePriceParam, NewSubscriptionMaxGroupTieredPackagePriceParam, NewSubscriptionScalableMatrixWithUnitPricingPriceParam, NewSubscriptionScalableMatrixWithTieredPricingPriceParam, NewSubscriptionCumulativeGroupedBulkPriceParam, NewSubscriptionMinimumCompositePriceParam, 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"`
	// New subscription price request body params.
	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"`
	// The pricing model type
	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"`
	// Configuration for bulk pricing
	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"`
	GroupedWithMinMaxThresholdsConfig param.Field[interface{}] `json:"grouped_with_min_max_thresholds_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"`
	// Configuration for matrix pricing
	MatrixConfig param.Field[shared.MatrixConfigParam] `json:"matrix_config"`
	// Configuration for matrix_with_allocation pricing
	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"`
	MinimumConfig               param.Field[interface{}]                            `json:"minimum_config"`
	// Configuration for package pricing
	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"`
	// Configuration for tiered pricing
	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"`
	// Configuration for unit pricing
	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"`
}

New subscription price request body params.

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

The pricing model type

const (
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeUnit                            SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "unit"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeTiered                          SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "tiered"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeBulk                            SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "bulk"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypePackage                         SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "package"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeMatrix                          SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "matrix"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeThresholdTotalAmount            SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "threshold_total_amount"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeTieredPackage                   SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "tiered_package"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeTieredWithMinimum               SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "tiered_with_minimum"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeGroupedTiered                   SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "grouped_tiered"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeTieredPackageWithMinimum        SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "tiered_package_with_minimum"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypePackageWithAllocation           SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "package_with_allocation"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeUnitWithPercent                 SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "unit_with_percent"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeMatrixWithAllocation            SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "matrix_with_allocation"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeTieredWithProration             SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "tiered_with_proration"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeUnitWithProration               SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "unit_with_proration"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeGroupedAllocation               SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "grouped_allocation"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeBulkWithProration               SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "bulk_with_proration"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeGroupedWithProratedMinimum      SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "grouped_with_prorated_minimum"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeGroupedWithMeteredMinimum       SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "grouped_with_metered_minimum"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeGroupedWithMinMaxThresholds     SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "grouped_with_min_max_thresholds"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeMatrixWithDisplayName           SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "matrix_with_display_name"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeGroupedTieredPackage            SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "grouped_tiered_package"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeMaxGroupTieredPackage           SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "max_group_tiered_package"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeScalableMatrixWithUnitPricing   SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "scalable_matrix_with_unit_pricing"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeScalableMatrixWithTieredPricing SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "scalable_matrix_with_tiered_pricing"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeCumulativeGroupedBulk           SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "cumulative_grouped_bulk"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelTypeMinimum                         SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType = "minimum"
)

func (SubscriptionSchedulePlanChangeParamsReplacePricesPriceModelType) IsKnown added in v0.68.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPrice added in v1.14.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence] `json:"cadence,required"`
	// Configuration for grouped_with_min_max_thresholds pricing
	GroupedWithMinMaxThresholdsConfig param.Field[SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig] `json:"grouped_with_min_max_thresholds_config,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType] `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[SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion] `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 (SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPrice) MarshalJSON added in v1.14.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence added in v1.14.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence string

The cadence to bill for this price on.

const (
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceAnnual     SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "annual"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceSemiAnnual SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "semi_annual"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceMonthly    SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "monthly"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceQuarterly  SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "quarterly"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceOneTime    SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "one_time"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadenceCustom     SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence = "custom"
)

func (SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceCadence) IsKnown added in v1.14.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig added in v1.14.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig struct {
	ConversionRateType param.Field[SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                                                      `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                                                        `json:"unit_config"`
}

func (SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsSubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

func (r SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig) ImplementsSubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()

func (SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig) MarshalJSON added in v1.14.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType added in v1.14.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType string
const (
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeUnit   SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "unit"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateTypeTiered SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType = "tiered"
)

func (SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigConversionRateType) IsKnown added in v1.14.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion added in v1.14.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion interface {
	ImplementsSubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceConversionRateConfig.

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig added in v1.16.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig struct {
	// The event property used to group before applying thresholds
	GroupingKey param.Field[string] `json:"grouping_key,required"`
	// The maximum amount to charge each group
	MaximumCharge param.Field[string] `json:"maximum_charge,required"`
	// The minimum amount to charge each group, regardless of usage
	MinimumCharge param.Field[string] `json:"minimum_charge,required"`
	// The base price charged per group
	PerUnitRate param.Field[string] `json:"per_unit_rate,required"`
}

Configuration for grouped_with_min_max_thresholds pricing

func (SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig) MarshalJSON added in v1.16.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType added in v1.14.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType string

The pricing model type

const (
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelTypeGroupedWithMinMaxThresholds SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType = "grouped_with_min_max_thresholds"
)

func (SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPriceModelType) IsKnown added in v1.14.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPrice added in v1.16.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPrice struct {
	// The cadence to bill for this price on.
	Cadence param.Field[SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID param.Field[string] `json:"item_id,required"`
	// The pricing model type
	ModelType param.Field[SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// Configuration for tiered_with_proration pricing
	TieredWithProrationConfig param.Field[SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfig] `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[SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion] `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 (SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPrice) MarshalJSON added in v1.16.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence added in v1.16.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadenceAnnual     SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence = "annual"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadenceSemiAnnual SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence = "semi_annual"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadenceMonthly    SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence = "monthly"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadenceQuarterly  SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence = "quarterly"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadenceOneTime    SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence = "one_time"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadenceCustom     SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence = "custom"
)

func (SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceCadence) IsKnown added in v1.16.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig added in v1.16.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig struct {
	ConversionRateType param.Field[SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType] `json:"conversion_rate_type,required"`
	TieredConfig       param.Field[shared.ConversionRateTieredConfigParam]                                                                                              `json:"tiered_config"`
	UnitConfig         param.Field[shared.ConversionRateUnitConfigParam]                                                                                                `json:"unit_config"`
}

func (SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig) ImplementsSubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion added in v1.16.0

func (r SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig) ImplementsSubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion()

func (SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig) MarshalJSON added in v1.16.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType added in v1.16.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType string
const (
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateTypeUnit   SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType = "unit"
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateTypeTiered SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType = "tiered"
)

func (SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigConversionRateType) IsKnown added in v1.16.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion added in v1.16.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion interface {
	ImplementsSubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfigUnion()
}

Satisfied by shared.UnitConversionRateConfigParam, shared.TieredConversionRateConfigParam, SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceConversionRateConfig.

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceModelType added in v1.16.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceModelType string

The pricing model type

const (
	SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceModelTypeTieredWithProration SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceModelType = "tiered_with_proration"
)

func (SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceModelType) IsKnown added in v1.16.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfig added in v1.16.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfig struct {
	// Tiers for rating based on total usage quantities into the specified tier with
	// proration
	Tiers param.Field[[]SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfigTier] `json:"tiers,required"`
}

Configuration for tiered_with_proration pricing

func (SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfig) MarshalJSON added in v1.16.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfigTier added in v1.16.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfigTier struct {
	// Inclusive tier starting value
	TierLowerBound param.Field[string] `json:"tier_lower_bound,required"`
	// Amount per unit
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

Configuration for a single tiered with proration tier

func (SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPriceTieredWithProrationConfigTier) MarshalJSON added in v1.16.0

type SubscriptionSchedulePlanChangeParamsReplacePricesPriceUnion added in v0.68.0

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

New subscription price request body params.

Satisfied by NewSubscriptionUnitPriceParam, NewSubscriptionTieredPriceParam, NewSubscriptionBulkPriceParam, NewSubscriptionPackagePriceParam, NewSubscriptionMatrixPriceParam, NewSubscriptionThresholdTotalAmountPriceParam, NewSubscriptionTieredPackagePriceParam, NewSubscriptionTieredWithMinimumPriceParam, NewSubscriptionGroupedTieredPriceParam, NewSubscriptionTieredPackageWithMinimumPriceParam, NewSubscriptionPackageWithAllocationPriceParam, NewSubscriptionUnitWithPercentPriceParam, NewSubscriptionMatrixWithAllocationPriceParam, SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionTieredWithProrationPrice, NewSubscriptionUnitWithProrationPriceParam, NewSubscriptionGroupedAllocationPriceParam, NewSubscriptionBulkWithProrationPriceParam, NewSubscriptionGroupedWithProratedMinimumPriceParam, NewSubscriptionGroupedWithMeteredMinimumPriceParam, SubscriptionSchedulePlanChangeParamsReplacePricesPriceNewSubscriptionGroupedWithMinMaxThresholdsPrice, NewSubscriptionMatrixWithDisplayNamePriceParam, NewSubscriptionGroupedTieredPackagePriceParam, NewSubscriptionMaxGroupTieredPackagePriceParam, NewSubscriptionScalableMatrixWithUnitPricingPriceParam, NewSubscriptionScalableMatrixWithTieredPricingPriceParam, NewSubscriptionCumulativeGroupedBulkPriceParam, NewSubscriptionMinimumCompositePriceParam, 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 occurs. 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

Configuration for a single tier

This is an alias to an internal type.

type TierParam added in v0.121.0

type TierParam = shared.TierParam

Configuration for a single tier

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 TierSubLineItemTierConfig added in v1.16.0

type TierSubLineItemTierConfig = shared.TierSubLineItemTierConfig

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 TieredConfig added in v0.121.0

type TieredConfig = shared.TieredConfig

Configuration for tiered pricing

This is an alias to an internal type.

type TieredConfigParam added in v0.121.0

type TieredConfigParam = shared.TieredConfigParam

Configuration for tiered pricing

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

Configuration for unit pricing

This is an alias to an internal type.

type UnitConfigParam added in v0.121.0

type UnitConfigParam = shared.UnitConfigParam

Configuration for unit pricing

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