metronome

package module
v0.1.0-beta.9 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

README

Metronome Go API Library

[!WARNING] This is prerelease software that is not ready for production use. There may be bugs and there will be breaking changes version to version. Use at your own risk.

Go Reference

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

Installation

import (
	"github.com/Metronome-Industries/metronome-go" // imported as metronome
)

Or to pin the version:

go get -u 'github.com/Metronome-Industries/metronome-go@v0.1.0-beta.9'

Requirements

This library requires Go 1.18+.

Usage

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

package main

import (
	"context"

	"github.com/Metronome-Industries/metronome-go"
	"github.com/Metronome-Industries/metronome-go/option"
)

func main() {
	client := metronome.NewClient(
		option.WithBearerToken("My Bearer Token"), // defaults to os.LookupEnv("METRONOME_BEARER_TOKEN")
	)
	err := client.V1.Usage.Ingest(context.TODO(), metronome.V1UsageIngestParams{
		Usage: []metronome.V1UsageIngestParamsUsage{{
			TransactionID: metronome.F("90e9401f-0f8c-4cd3-9a9f-d6beb56d8d72"),
			CustomerID:    metronome.F("team@example.com"),
			EventType:     metronome.F("heartbeat"),
			Timestamp:     metronome.F("2024-01-01T00:00:00Z"),
			Properties: metronome.F(map[string]interface{}{
				"cluster_id":  "42",
				"cpu_seconds": 60,
				"region":      "Europe",
			}),
		}},
	})
	if err != nil {
		panic(err.Error())
	}
}

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: metronome.F("hello"),

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

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

		// In cases where the API specifies a given type,
		// but you want to send something else, use `Raw`:
		Z: metronome.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 := metronome.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.V1.Contracts.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.V1.Contracts.Products.ListAutoPaging(context.TODO(), metronome.V1ContractProductListParams{})
// Automatically fetches more pages as needed.
for iter.Next() {
	v1ContractProductListResponse := iter.Current()
	fmt.Printf("%+v\n", v1ContractProductListResponse)
}
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.V1.Contracts.Products.List(context.TODO(), metronome.V1ContractProductListParams{})
for page != nil {
	for _, product := range page.Data {
		fmt.Printf("%+v\n", product)
	}
	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 *metronome.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.V1.Contracts.New(context.TODO(), metronome.V1ContractNewParams{
	CustomerID: metronome.F("13117714-3f05-48e5-a6e9-a66093f13b4d"),
	StartingAt: metronome.F(time.Now()),
})
if err != nil {
	var apierr *metronome.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 "/v1/contracts/create": 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.V1.Contracts.New(
	ctx,
	metronome.V1ContractNewParams{
		CustomerID: metronome.F("13117714-3f05-48e5-a6e9-a66093f13b4d"),
		StartingAt: metronome.F(time.Now()),
	},
	// 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 metronome.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 := metronome.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.V1.Contracts.New(
	context.TODO(),
	metronome.V1ContractNewParams{
		CustomerID: metronome.F("13117714-3f05-48e5-a6e9-a66093f13b4d"),
		StartingAt: metronome.F(time.Now()),
	},
	option.WithMaxRetries(5),
)
Accessing raw response data (e.g. response headers)

You can access the raw HTTP response data by using the option.WithResponseInto() request option. This is useful when you need to examine response headers, status codes, or other details.

// Create a variable to store the HTTP response
var response *http.Response
contract, err := client.V1.Contracts.New(
	context.TODO(),
	metronome.V1ContractNewParams{
		CustomerID: metronome.F("13117714-3f05-48e5-a6e9-a66093f13b4d"),
		StartingAt: metronome.F(time.Now()),
	},
	option.WithResponseInto(&response),
)
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", contract)

fmt.Printf("Status Code: %d\n", response.StatusCode)
fmt.Printf("Headers: %+#v\n", response.Header)
Making custom/undocumented requests

This library is typed for convenient access to the documented API. If you need to access undocumented endpoints, params, or response properties, the library can still be used.

Undocumented endpoints

To make requests to undocumented endpoints, you can use client.Get, client.Post, and other HTTP verbs. RequestOptions on the client, such as retries, will be respected when making these requests.

var (
    // params can be an io.Reader, a []byte, an encoding/json serializable object,
    // or a "…Params" struct defined in this library.
    params map[string]interface{}

    // result can be an []byte, *http.Response, a encoding/json deserializable object,
    // or a model defined in this library.
    result *http.Response
)
err := client.Post(context.Background(), "/unspecified", params, &result)
if err != nil {
    …
}
Undocumented request params

To make requests using undocumented parameters, you may use either the option.WithQuerySet() or the option.WithJSONSet() methods.

params := FooNewParams{
    ID:   metronome.F("id_xxxx"),
    Data: metronome.F(FooNewParamsData{
        FirstName: metronome.F("John"),
    }),
}
client.Foo.New(context.Background(), params, option.WithJSONSet("data.last_name", "Doe"))
Undocumented response properties

To access undocumented response properties, you may either access the raw JSON of the response as a string with result.JSON.RawJSON(), or get the raw JSON of a particular field on the result with result.JSON.Foo.Raw().

Any fields that are not present on the response struct will be saved and can be accessed by result.JSON.ExtraFields() which returns the extra fields as a map[string]Field.

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 := metronome.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.

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

This section is empty.

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

func DefaultClientOptions() []option.RequestOption

DefaultClientOptions read from the environment (METRONOME_BEARER_TOKEN, METRONOME_WEBHOOK_SECRET, METRONOME_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

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 Client

type Client struct {
	Options []option.RequestOption
	V2      *V2Service
	V1      *V1Service
}

Client creates a struct with services and top level methods that help with interacting with the metronome 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 (METRONOME_BEARER_TOKEN, METRONOME_WEBHOOK_SECRET, METRONOME_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

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

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

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

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

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

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 Error

type Error = apierror.Error

type V1AlertArchiveParams

type V1AlertArchiveParams struct {
	// The Metronome ID of the alert
	ID param.Field[string] `json:"id,required" format:"uuid"`
	// If true, resets the uniqueness key on this alert so it can be re-used
	ReleaseUniquenessKey param.Field[bool] `json:"release_uniqueness_key"`
}

func (V1AlertArchiveParams) MarshalJSON

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

type V1AlertArchiveResponse

type V1AlertArchiveResponse struct {
	Data V1AlertArchiveResponseData `json:"data,required"`
	JSON v1AlertArchiveResponseJSON `json:"-"`
}

func (*V1AlertArchiveResponse) UnmarshalJSON

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

type V1AlertArchiveResponseData

type V1AlertArchiveResponseData struct {
	ID   string                         `json:"id,required" format:"uuid"`
	JSON v1AlertArchiveResponseDataJSON `json:"-"`
}

func (*V1AlertArchiveResponseData) UnmarshalJSON

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

type V1AlertNewParams

type V1AlertNewParams struct {
	// Type of the alert
	AlertType param.Field[V1AlertNewParamsAlertType] `json:"alert_type,required"`
	// Name of the alert
	Name param.Field[string] `json:"name,required"`
	// Threshold value of the alert policy. Depending upon the alert type, this number
	// may represent a financial amount, the days remaining, or a percentage reached.
	Threshold param.Field[float64] `json:"threshold,required"`
	// For alerts of type `usage_threshold_reached`, specifies which billable metric to
	// track the usage for.
	BillableMetricID param.Field[string] `json:"billable_metric_id" format:"uuid"`
	// An array of strings, representing a way to filter the credit grant this alert
	// applies to, by looking at the credit_grant_type field on the credit grant. This
	// field is only defined for CreditPercentage and CreditBalance alerts
	CreditGrantTypeFilters param.Field[[]string] `json:"credit_grant_type_filters"`
	CreditTypeID           param.Field[string]   `json:"credit_type_id" format:"uuid"`
	// A list of custom field filters for alert types that support advanced filtering.
	// Only present for contract invoices.
	CustomFieldFilters param.Field[[]V1AlertNewParamsCustomFieldFilter] `json:"custom_field_filters"`
	// If provided, will create this alert for this specific customer. To create an
	// alert for all customers, do not specify a `customer_id`.
	CustomerID param.Field[string] `json:"customer_id" format:"uuid"`
	// If true, the alert will evaluate immediately on customers that already meet the
	// alert threshold. If false, it will only evaluate on future customers that
	// trigger the alert threshold. Defaults to true.
	EvaluateOnCreate param.Field[bool] `json:"evaluate_on_create"`
	// Scopes alert evaluation to a specific presentation group key on individual line
	// items. Only present for spend alerts.
	GroupKeyFilter param.Field[V1AlertNewParamsGroupKeyFilter] `json:"group_key_filter"`
	// Only supported for invoice_total_reached alerts. A list of invoice types to
	// evaluate.
	InvoiceTypesFilter param.Field[[]string] `json:"invoice_types_filter"`
	// If provided, will create this alert for this specific plan. To create an alert
	// for all customers, do not specify a `plan_id`.
	PlanID param.Field[string] `json:"plan_id" format:"uuid"`
	// Prevents the creation of duplicates. If a request to create a record is made
	// with a previously used uniqueness key, a new record will not be created and the
	// request will fail with a 409 error.
	UniquenessKey param.Field[string] `json:"uniqueness_key"`
}

func (V1AlertNewParams) MarshalJSON

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

type V1AlertNewParamsAlertType

type V1AlertNewParamsAlertType string

Type of the alert

const (
	V1AlertNewParamsAlertTypeLowCreditBalanceReached                           V1AlertNewParamsAlertType = "low_credit_balance_reached"
	V1AlertNewParamsAlertTypeSpendThresholdReached                             V1AlertNewParamsAlertType = "spend_threshold_reached"
	V1AlertNewParamsAlertTypeMonthlyInvoiceTotalSpendThresholdReached          V1AlertNewParamsAlertType = "monthly_invoice_total_spend_threshold_reached"
	V1AlertNewParamsAlertTypeLowRemainingDaysInPlanReached                     V1AlertNewParamsAlertType = "low_remaining_days_in_plan_reached"
	V1AlertNewParamsAlertTypeLowRemainingCreditPercentageReached               V1AlertNewParamsAlertType = "low_remaining_credit_percentage_reached"
	V1AlertNewParamsAlertTypeUsageThresholdReached                             V1AlertNewParamsAlertType = "usage_threshold_reached"
	V1AlertNewParamsAlertTypeLowRemainingDaysForCommitSegmentReached           V1AlertNewParamsAlertType = "low_remaining_days_for_commit_segment_reached"
	V1AlertNewParamsAlertTypeLowRemainingCommitBalanceReached                  V1AlertNewParamsAlertType = "low_remaining_commit_balance_reached"
	V1AlertNewParamsAlertTypeLowRemainingCommitPercentageReached               V1AlertNewParamsAlertType = "low_remaining_commit_percentage_reached"
	V1AlertNewParamsAlertTypeLowRemainingDaysForContractCreditSegmentReached   V1AlertNewParamsAlertType = "low_remaining_days_for_contract_credit_segment_reached"
	V1AlertNewParamsAlertTypeLowRemainingContractCreditBalanceReached          V1AlertNewParamsAlertType = "low_remaining_contract_credit_balance_reached"
	V1AlertNewParamsAlertTypeLowRemainingContractCreditPercentageReached       V1AlertNewParamsAlertType = "low_remaining_contract_credit_percentage_reached"
	V1AlertNewParamsAlertTypeLowRemainingContractCreditAndCommitBalanceReached V1AlertNewParamsAlertType = "low_remaining_contract_credit_and_commit_balance_reached"
	V1AlertNewParamsAlertTypeInvoiceTotalReached                               V1AlertNewParamsAlertType = "invoice_total_reached"
)

func (V1AlertNewParamsAlertType) IsKnown

func (r V1AlertNewParamsAlertType) IsKnown() bool

type V1AlertNewParamsCustomFieldFilter

type V1AlertNewParamsCustomFieldFilter struct {
	Entity param.Field[V1AlertNewParamsCustomFieldFiltersEntity] `json:"entity,required"`
	Key    param.Field[string]                                   `json:"key,required"`
	Value  param.Field[string]                                   `json:"value,required"`
}

func (V1AlertNewParamsCustomFieldFilter) MarshalJSON

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

type V1AlertNewParamsCustomFieldFiltersEntity

type V1AlertNewParamsCustomFieldFiltersEntity string
const (
	V1AlertNewParamsCustomFieldFiltersEntityContract       V1AlertNewParamsCustomFieldFiltersEntity = "Contract"
	V1AlertNewParamsCustomFieldFiltersEntityCommit         V1AlertNewParamsCustomFieldFiltersEntity = "Commit"
	V1AlertNewParamsCustomFieldFiltersEntityContractCredit V1AlertNewParamsCustomFieldFiltersEntity = "ContractCredit"
)

func (V1AlertNewParamsCustomFieldFiltersEntity) IsKnown

type V1AlertNewParamsGroupKeyFilter

type V1AlertNewParamsGroupKeyFilter struct {
	Key   param.Field[string] `json:"key,required"`
	Value param.Field[string] `json:"value,required"`
}

Scopes alert evaluation to a specific presentation group key on individual line items. Only present for spend alerts.

func (V1AlertNewParamsGroupKeyFilter) MarshalJSON

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

type V1AlertNewResponse

type V1AlertNewResponse struct {
	Data V1AlertNewResponseData `json:"data,required"`
	JSON v1AlertNewResponseJSON `json:"-"`
}

func (*V1AlertNewResponse) UnmarshalJSON

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

type V1AlertNewResponseData

type V1AlertNewResponseData struct {
	ID   string                     `json:"id,required" format:"uuid"`
	JSON v1AlertNewResponseDataJSON `json:"-"`
}

func (*V1AlertNewResponseData) UnmarshalJSON

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

type V1AlertService

type V1AlertService struct {
	Options []option.RequestOption
}

V1AlertService contains methods and other services that help with interacting with the metronome 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 NewV1AlertService method instead.

func NewV1AlertService

func NewV1AlertService(opts ...option.RequestOption) (r *V1AlertService)

NewV1AlertService 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 (*V1AlertService) Archive

Archive an existing alert

func (*V1AlertService) New

Create a new alert

type V1AuditLogListParams

type V1AuditLogListParams struct {
	// RFC 3339 timestamp (exclusive). Cannot be used with 'next_page'.
	EndingBefore param.Field[time.Time] `query:"ending_before" format:"date-time"`
	// Max number of results that should be returned
	Limit param.Field[int64] `query:"limit"`
	// Cursor that indicates where the next page of results should start.
	NextPage param.Field[string] `query:"next_page"`
	// Optional parameter that can be used to filter which audit logs are returned. If
	// you specify resource_id, you must also specify resource_type.
	ResourceID param.Field[string] `query:"resource_id"`
	// Optional parameter that can be used to filter which audit logs are returned. If
	// you specify resource_type, you must also specify resource_id.
	ResourceType param.Field[string] `query:"resource_type"`
	// Sort order by timestamp, e.g. date_asc or date_desc. Defaults to date_asc.
	Sort param.Field[V1AuditLogListParamsSort] `query:"sort"`
	// RFC 3339 timestamp of the earliest audit log to return. Cannot be used with
	// 'next_page'.
	StartingOn param.Field[time.Time] `query:"starting_on" format:"date-time"`
}

func (V1AuditLogListParams) URLQuery

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

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

type V1AuditLogListParamsSort

type V1AuditLogListParamsSort string

Sort order by timestamp, e.g. date_asc or date_desc. Defaults to date_asc.

const (
	V1AuditLogListParamsSortDateAsc  V1AuditLogListParamsSort = "date_asc"
	V1AuditLogListParamsSortDateDesc V1AuditLogListParamsSort = "date_desc"
)

func (V1AuditLogListParamsSort) IsKnown

func (r V1AuditLogListParamsSort) IsKnown() bool

type V1AuditLogListResponse

type V1AuditLogListResponse struct {
	ID           string                        `json:"id,required"`
	Request      V1AuditLogListResponseRequest `json:"request,required"`
	Timestamp    time.Time                     `json:"timestamp,required" format:"date-time"`
	Action       string                        `json:"action"`
	Actor        V1AuditLogListResponseActor   `json:"actor"`
	Description  string                        `json:"description"`
	ResourceID   string                        `json:"resource_id"`
	ResourceType string                        `json:"resource_type"`
	Status       V1AuditLogListResponseStatus  `json:"status"`
	JSON         v1AuditLogListResponseJSON    `json:"-"`
}

func (*V1AuditLogListResponse) UnmarshalJSON

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

type V1AuditLogListResponseActor

type V1AuditLogListResponseActor struct {
	ID    string                          `json:"id,required"`
	Name  string                          `json:"name,required"`
	Email string                          `json:"email"`
	JSON  v1AuditLogListResponseActorJSON `json:"-"`
}

func (*V1AuditLogListResponseActor) UnmarshalJSON

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

type V1AuditLogListResponseRequest

type V1AuditLogListResponseRequest struct {
	ID        string                            `json:"id,required"`
	IP        string                            `json:"ip"`
	UserAgent string                            `json:"user_agent"`
	JSON      v1AuditLogListResponseRequestJSON `json:"-"`
}

func (*V1AuditLogListResponseRequest) UnmarshalJSON

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

type V1AuditLogListResponseStatus

type V1AuditLogListResponseStatus string
const (
	V1AuditLogListResponseStatusSuccess V1AuditLogListResponseStatus = "success"
	V1AuditLogListResponseStatusFailure V1AuditLogListResponseStatus = "failure"
	V1AuditLogListResponseStatusPending V1AuditLogListResponseStatus = "pending"
)

func (V1AuditLogListResponseStatus) IsKnown

func (r V1AuditLogListResponseStatus) IsKnown() bool

type V1AuditLogService

type V1AuditLogService struct {
	Options []option.RequestOption
}

V1AuditLogService contains methods and other services that help with interacting with the metronome 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 NewV1AuditLogService method instead.

func NewV1AuditLogService

func NewV1AuditLogService(opts ...option.RequestOption) (r *V1AuditLogService)

NewV1AuditLogService 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 (*V1AuditLogService) List

Retrieves a range of audit logs. If no further audit logs are currently available, the data array will be empty. As new audit logs are created, subsequent requests using the same next_page value will be in the returned data array, ensuring a continuous and uninterrupted reading of audit logs.

func (*V1AuditLogService) ListAutoPaging

Retrieves a range of audit logs. If no further audit logs are currently available, the data array will be empty. As new audit logs are created, subsequent requests using the same next_page value will be in the returned data array, ensuring a continuous and uninterrupted reading of audit logs.

type V1BillableMetricArchiveParams

type V1BillableMetricArchiveParams struct {
	ID param.Field[string] `json:"id,required" format:"uuid"`
}

func (V1BillableMetricArchiveParams) MarshalJSON

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

type V1BillableMetricArchiveResponse

type V1BillableMetricArchiveResponse struct {
	Data V1BillableMetricArchiveResponseData `json:"data,required"`
	JSON v1BillableMetricArchiveResponseJSON `json:"-"`
}

func (*V1BillableMetricArchiveResponse) UnmarshalJSON

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

type V1BillableMetricArchiveResponseData

type V1BillableMetricArchiveResponseData struct {
	ID   string                                  `json:"id,required" format:"uuid"`
	JSON v1BillableMetricArchiveResponseDataJSON `json:"-"`
}

func (*V1BillableMetricArchiveResponseData) UnmarshalJSON

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

type V1BillableMetricGetParams

type V1BillableMetricGetParams struct {
	BillableMetricID param.Field[string] `path:"billable_metric_id,required" format:"uuid"`
}

type V1BillableMetricGetResponse

type V1BillableMetricGetResponse struct {
	Data V1BillableMetricGetResponseData `json:"data,required"`
	JSON v1BillableMetricGetResponseJSON `json:"-"`
}

func (*V1BillableMetricGetResponse) UnmarshalJSON

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

type V1BillableMetricGetResponseData

type V1BillableMetricGetResponseData struct {
	// ID of the billable metric
	ID string `json:"id,required" format:"uuid"`
	// The display name of the billable metric.
	Name string `json:"name,required"`
	// A key that specifies which property of the event is used to aggregate data. This
	// key must be one of the property filter names and is not applicable when the
	// aggregation type is 'count'.
	AggregationKey string `json:"aggregation_key"`
	// Specifies the type of aggregation performed on matching events.
	AggregationType V1BillableMetricGetResponseDataAggregationType `json:"aggregation_type"`
	// RFC 3339 timestamp indicating when the billable metric was archived. If not
	// provided, the billable metric is not archived.
	ArchivedAt   time.Time         `json:"archived_at" format:"date-time"`
	CustomFields map[string]string `json:"custom_fields"`
	// An optional filtering rule to match the 'event_type' property of an event.
	EventTypeFilter V1BillableMetricGetResponseDataEventTypeFilter `json:"event_type_filter"`
	// Property names that are used to group usage costs on an invoice. Each entry
	// represents a set of properties used to slice events into distinct buckets.
	GroupKeys [][]string `json:"group_keys"`
	// A list of filters to match events to this billable metric. Each filter defines a
	// rule on an event property. All rules must pass for the event to match the
	// billable metric.
	PropertyFilters []V1BillableMetricGetResponseDataPropertyFilter `json:"property_filters"`
	// The SQL query associated with the billable metric
	Sql  string                              `json:"sql"`
	JSON v1BillableMetricGetResponseDataJSON `json:"-"`
}

func (*V1BillableMetricGetResponseData) UnmarshalJSON

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

type V1BillableMetricGetResponseDataAggregationType

type V1BillableMetricGetResponseDataAggregationType string

Specifies the type of aggregation performed on matching events.

const (
	V1BillableMetricGetResponseDataAggregationTypeCount  V1BillableMetricGetResponseDataAggregationType = "COUNT"
	V1BillableMetricGetResponseDataAggregationTypeLatest V1BillableMetricGetResponseDataAggregationType = "LATEST"
	V1BillableMetricGetResponseDataAggregationTypeMax    V1BillableMetricGetResponseDataAggregationType = "MAX"
	V1BillableMetricGetResponseDataAggregationTypeSum    V1BillableMetricGetResponseDataAggregationType = "SUM"
	V1BillableMetricGetResponseDataAggregationTypeUnique V1BillableMetricGetResponseDataAggregationType = "UNIQUE"
)

func (V1BillableMetricGetResponseDataAggregationType) IsKnown

type V1BillableMetricGetResponseDataEventTypeFilter

type V1BillableMetricGetResponseDataEventTypeFilter struct {
	// A list of event types that are explicitly included in the billable metric. If
	// specified, only events of these types will match the billable metric. Must be
	// non-empty if present.
	InValues []string `json:"in_values"`
	// A list of event types that are explicitly excluded from the billable metric. If
	// specified, events of these types will not match the billable metric. Must be
	// non-empty if present.
	NotInValues []string                                           `json:"not_in_values"`
	JSON        v1BillableMetricGetResponseDataEventTypeFilterJSON `json:"-"`
}

An optional filtering rule to match the 'event_type' property of an event.

func (*V1BillableMetricGetResponseDataEventTypeFilter) UnmarshalJSON

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

type V1BillableMetricGetResponseDataPropertyFilter

type V1BillableMetricGetResponseDataPropertyFilter struct {
	// The name of the event property.
	Name string `json:"name,required"`
	// Determines whether the property must exist in the event. If true, only events
	// with this property will pass the filter. If false, only events without this
	// property will pass the filter. If null or omitted, the existence of the property
	// is optional.
	Exists bool `json:"exists"`
	// Specifies the allowed values for the property to match an event. An event will
	// pass the filter only if its property value is included in this list. If
	// undefined, all property values will pass the filter. Must be non-empty if
	// present.
	InValues []string `json:"in_values"`
	// Specifies the values that prevent an event from matching the filter. An event
	// will not pass the filter if its property value is included in this list. If null
	// or empty, all property values will pass the filter. Must be non-empty if
	// present.
	NotInValues []string                                          `json:"not_in_values"`
	JSON        v1BillableMetricGetResponseDataPropertyFilterJSON `json:"-"`
}

func (*V1BillableMetricGetResponseDataPropertyFilter) UnmarshalJSON

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

type V1BillableMetricListParams

type V1BillableMetricListParams struct {
	// If true, the list of returned metrics will include archived metrics
	IncludeArchived param.Field[bool] `query:"include_archived"`
	// Max number of results that should be returned
	Limit param.Field[int64] `query:"limit"`
	// Cursor that indicates where the next page of results should start.
	NextPage param.Field[string] `query:"next_page"`
}

func (V1BillableMetricListParams) URLQuery

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

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

type V1BillableMetricListResponse

type V1BillableMetricListResponse struct {
	// ID of the billable metric
	ID string `json:"id,required" format:"uuid"`
	// The display name of the billable metric.
	Name string `json:"name,required"`
	// A key that specifies which property of the event is used to aggregate data. This
	// key must be one of the property filter names and is not applicable when the
	// aggregation type is 'count'.
	AggregationKey string `json:"aggregation_key"`
	// Specifies the type of aggregation performed on matching events.
	AggregationType V1BillableMetricListResponseAggregationType `json:"aggregation_type"`
	// RFC 3339 timestamp indicating when the billable metric was archived. If not
	// provided, the billable metric is not archived.
	ArchivedAt   time.Time         `json:"archived_at" format:"date-time"`
	CustomFields map[string]string `json:"custom_fields"`
	// An optional filtering rule to match the 'event_type' property of an event.
	EventTypeFilter V1BillableMetricListResponseEventTypeFilter `json:"event_type_filter"`
	// Property names that are used to group usage costs on an invoice. Each entry
	// represents a set of properties used to slice events into distinct buckets.
	GroupKeys [][]string `json:"group_keys"`
	// A list of filters to match events to this billable metric. Each filter defines a
	// rule on an event property. All rules must pass for the event to match the
	// billable metric.
	PropertyFilters []V1BillableMetricListResponsePropertyFilter `json:"property_filters"`
	// The SQL query associated with the billable metric
	Sql  string                           `json:"sql"`
	JSON v1BillableMetricListResponseJSON `json:"-"`
}

func (*V1BillableMetricListResponse) UnmarshalJSON

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

type V1BillableMetricListResponseAggregationType

type V1BillableMetricListResponseAggregationType string

Specifies the type of aggregation performed on matching events.

const (
	V1BillableMetricListResponseAggregationTypeCount  V1BillableMetricListResponseAggregationType = "COUNT"
	V1BillableMetricListResponseAggregationTypeLatest V1BillableMetricListResponseAggregationType = "LATEST"
	V1BillableMetricListResponseAggregationTypeMax    V1BillableMetricListResponseAggregationType = "MAX"
	V1BillableMetricListResponseAggregationTypeSum    V1BillableMetricListResponseAggregationType = "SUM"
	V1BillableMetricListResponseAggregationTypeUnique V1BillableMetricListResponseAggregationType = "UNIQUE"
)

func (V1BillableMetricListResponseAggregationType) IsKnown

type V1BillableMetricListResponseEventTypeFilter

type V1BillableMetricListResponseEventTypeFilter struct {
	// A list of event types that are explicitly included in the billable metric. If
	// specified, only events of these types will match the billable metric. Must be
	// non-empty if present.
	InValues []string `json:"in_values"`
	// A list of event types that are explicitly excluded from the billable metric. If
	// specified, events of these types will not match the billable metric. Must be
	// non-empty if present.
	NotInValues []string                                        `json:"not_in_values"`
	JSON        v1BillableMetricListResponseEventTypeFilterJSON `json:"-"`
}

An optional filtering rule to match the 'event_type' property of an event.

func (*V1BillableMetricListResponseEventTypeFilter) UnmarshalJSON

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

type V1BillableMetricListResponsePropertyFilter

type V1BillableMetricListResponsePropertyFilter struct {
	// The name of the event property.
	Name string `json:"name,required"`
	// Determines whether the property must exist in the event. If true, only events
	// with this property will pass the filter. If false, only events without this
	// property will pass the filter. If null or omitted, the existence of the property
	// is optional.
	Exists bool `json:"exists"`
	// Specifies the allowed values for the property to match an event. An event will
	// pass the filter only if its property value is included in this list. If
	// undefined, all property values will pass the filter. Must be non-empty if
	// present.
	InValues []string `json:"in_values"`
	// Specifies the values that prevent an event from matching the filter. An event
	// will not pass the filter if its property value is included in this list. If null
	// or empty, all property values will pass the filter. Must be non-empty if
	// present.
	NotInValues []string                                       `json:"not_in_values"`
	JSON        v1BillableMetricListResponsePropertyFilterJSON `json:"-"`
}

func (*V1BillableMetricListResponsePropertyFilter) UnmarshalJSON

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

type V1BillableMetricNewParams

type V1BillableMetricNewParams struct {
	// The display name of the billable metric.
	Name param.Field[string] `json:"name,required"`
	// Specifies the type of aggregation performed on matching events. Required if
	// `sql` is not provided.
	AggregationKey param.Field[string] `json:"aggregation_key"`
	// Specifies the type of aggregation performed on matching events.
	AggregationType param.Field[V1BillableMetricNewParamsAggregationType] `json:"aggregation_type"`
	// Custom fields to attach to the billable metric.
	CustomFields param.Field[map[string]string] `json:"custom_fields"`
	// An optional filtering rule to match the 'event_type' property of an event.
	EventTypeFilter param.Field[V1BillableMetricNewParamsEventTypeFilter] `json:"event_type_filter"`
	// Property names that are used to group usage costs on an invoice. Each entry
	// represents a set of properties used to slice events into distinct buckets.
	GroupKeys param.Field[[][]string] `json:"group_keys"`
	// A list of filters to match events to this billable metric. Each filter defines a
	// rule on an event property. All rules must pass for the event to match the
	// billable metric.
	PropertyFilters param.Field[[]V1BillableMetricNewParamsPropertyFilter] `json:"property_filters"`
	// The SQL query associated with the billable metric. This field is mutually
	// exclusive with aggregation_type, event_type_filter, property_filters,
	// aggregation_key, and group_keys. If provided, these other fields must be
	// omitted.
	Sql param.Field[string] `json:"sql"`
}

func (V1BillableMetricNewParams) MarshalJSON

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

type V1BillableMetricNewParamsAggregationType

type V1BillableMetricNewParamsAggregationType string

Specifies the type of aggregation performed on matching events.

const (
	V1BillableMetricNewParamsAggregationTypeCount  V1BillableMetricNewParamsAggregationType = "COUNT"
	V1BillableMetricNewParamsAggregationTypeLatest V1BillableMetricNewParamsAggregationType = "LATEST"
	V1BillableMetricNewParamsAggregationTypeMax    V1BillableMetricNewParamsAggregationType = "MAX"
	V1BillableMetricNewParamsAggregationTypeSum    V1BillableMetricNewParamsAggregationType = "SUM"
	V1BillableMetricNewParamsAggregationTypeUnique V1BillableMetricNewParamsAggregationType = "UNIQUE"
)

func (V1BillableMetricNewParamsAggregationType) IsKnown

type V1BillableMetricNewParamsEventTypeFilter

type V1BillableMetricNewParamsEventTypeFilter struct {
	// A list of event types that are explicitly included in the billable metric. If
	// specified, only events of these types will match the billable metric. Must be
	// non-empty if present.
	InValues param.Field[[]string] `json:"in_values"`
	// A list of event types that are explicitly excluded from the billable metric. If
	// specified, events of these types will not match the billable metric. Must be
	// non-empty if present.
	NotInValues param.Field[[]string] `json:"not_in_values"`
}

An optional filtering rule to match the 'event_type' property of an event.

func (V1BillableMetricNewParamsEventTypeFilter) MarshalJSON

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

type V1BillableMetricNewParamsPropertyFilter

type V1BillableMetricNewParamsPropertyFilter struct {
	// The name of the event property.
	Name param.Field[string] `json:"name,required"`
	// Determines whether the property must exist in the event. If true, only events
	// with this property will pass the filter. If false, only events without this
	// property will pass the filter. If null or omitted, the existence of the property
	// is optional.
	Exists param.Field[bool] `json:"exists"`
	// Specifies the allowed values for the property to match an event. An event will
	// pass the filter only if its property value is included in this list. If
	// undefined, all property values will pass the filter. Must be non-empty if
	// present.
	InValues param.Field[[]string] `json:"in_values"`
	// Specifies the values that prevent an event from matching the filter. An event
	// will not pass the filter if its property value is included in this list. If null
	// or empty, all property values will pass the filter. Must be non-empty if
	// present.
	NotInValues param.Field[[]string] `json:"not_in_values"`
}

func (V1BillableMetricNewParamsPropertyFilter) MarshalJSON

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

type V1BillableMetricNewResponse

type V1BillableMetricNewResponse struct {
	Data V1BillableMetricNewResponseData `json:"data,required"`
	JSON v1BillableMetricNewResponseJSON `json:"-"`
}

func (*V1BillableMetricNewResponse) UnmarshalJSON

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

type V1BillableMetricNewResponseData

type V1BillableMetricNewResponseData struct {
	ID   string                              `json:"id,required" format:"uuid"`
	JSON v1BillableMetricNewResponseDataJSON `json:"-"`
}

func (*V1BillableMetricNewResponseData) UnmarshalJSON

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

type V1BillableMetricService

type V1BillableMetricService struct {
	Options []option.RequestOption
}

V1BillableMetricService contains methods and other services that help with interacting with the metronome 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 NewV1BillableMetricService method instead.

func NewV1BillableMetricService

func NewV1BillableMetricService(opts ...option.RequestOption) (r *V1BillableMetricService)

NewV1BillableMetricService 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 (*V1BillableMetricService) Archive

Archive an existing billable metric.

func (*V1BillableMetricService) Get

Get a billable metric.

func (*V1BillableMetricService) List

List all billable metrics.

func (*V1BillableMetricService) ListAutoPaging

List all billable metrics.

func (*V1BillableMetricService) New

Creates a new Billable Metric.

type V1ContractAddManualBalanceEntryParams

type V1ContractAddManualBalanceEntryParams struct {
	// ID of the balance (commit or credit) to update.
	ID param.Field[string] `json:"id,required" format:"uuid"`
	// Amount to add to the segment. A negative number will draw down from the balance.
	Amount param.Field[float64] `json:"amount,required"`
	// ID of the customer whose balance is to be updated.
	CustomerID param.Field[string] `json:"customer_id,required" format:"uuid"`
	// Reason for the manual adjustment. This will be displayed in the ledger.
	Reason param.Field[string] `json:"reason,required"`
	// ID of the segment to update.
	SegmentID param.Field[string] `json:"segment_id,required" format:"uuid"`
	// ID of the contract to update. Leave blank to update a customer level balance.
	ContractID param.Field[string] `json:"contract_id" format:"uuid"`
	// RFC 3339 timestamp indicating when the manual adjustment takes place. If not
	// provided, it will default to the start of the segment.
	Timestamp param.Field[time.Time] `json:"timestamp" format:"date-time"`
}

func (V1ContractAddManualBalanceEntryParams) MarshalJSON

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

type V1ContractAmendParams

type V1ContractAmendParams struct {
	// ID of the contract to amend
	ContractID param.Field[string] `json:"contract_id,required" format:"uuid"`
	// ID of the customer whose contract is to be amended
	CustomerID param.Field[string] `json:"customer_id,required" format:"uuid"`
	// inclusive start time for the amendment
	StartingAt   param.Field[time.Time]                     `json:"starting_at,required" format:"date-time"`
	Commits      param.Field[[]V1ContractAmendParamsCommit] `json:"commits"`
	Credits      param.Field[[]V1ContractAmendParamsCredit] `json:"credits"`
	CustomFields param.Field[map[string]string]             `json:"custom_fields"`
	// This field's availability is dependent on your client's configuration.
	Discounts param.Field[[]V1ContractAmendParamsDiscount] `json:"discounts"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID param.Field[string]                          `json:"netsuite_sales_order_id"`
	Overrides            param.Field[[]V1ContractAmendParamsOverride] `json:"overrides"`
	// This field's availability is dependent on your client's configuration.
	ProfessionalServices param.Field[[]V1ContractAmendParamsProfessionalService] `json:"professional_services"`
	// This field's availability is dependent on your client's configuration.
	ResellerRoyalties param.Field[[]V1ContractAmendParamsResellerRoyalty] `json:"reseller_royalties"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID param.Field[string]                                 `json:"salesforce_opportunity_id"`
	ScheduledCharges        param.Field[[]V1ContractAmendParamsScheduledCharge] `json:"scheduled_charges"`
	// This field's availability is dependent on your client's configuration.
	TotalContractValue param.Field[float64] `json:"total_contract_value"`
}

func (V1ContractAmendParams) MarshalJSON

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

type V1ContractAmendParamsCommit

type V1ContractAmendParamsCommit struct {
	ProductID param.Field[string]                           `json:"product_id,required" format:"uuid"`
	Type      param.Field[V1ContractAmendParamsCommitsType] `json:"type,required"`
	// Required: Schedule for distributing the commit to the customer. For "POSTPAID"
	// commits only one schedule item is allowed and amount must match invoice_schedule
	// total.
	AccessSchedule param.Field[V1ContractAmendParamsCommitsAccessSchedule] `json:"access_schedule"`
	// (DEPRECATED) Use access_schedule and invoice_schedule instead.
	Amount param.Field[float64] `json:"amount"`
	// Which products the commit applies to. If both applicable_product_ids and
	// applicable_product_tags are not provided, the commit applies to all products.
	ApplicableProductIDs param.Field[[]string] `json:"applicable_product_ids" format:"uuid"`
	// Which tags the commit applies to. If both applicable_product_ids and
	// applicable_product_tags are not provided, the commit applies to all products.
	ApplicableProductTags param.Field[[]string]          `json:"applicable_product_tags"`
	CustomFields          param.Field[map[string]string] `json:"custom_fields"`
	// Used only in UI/API. It is not exposed to end customers.
	Description param.Field[string] `json:"description"`
	// Required for "POSTPAID" commits: the true up invoice will be generated at this
	// time and only one schedule item is allowed; the total must match access_schedule
	// amount. Optional for "PREPAID" commits: if not provided, this will be a
	// "complimentary" commit with no invoice.
	InvoiceSchedule param.Field[V1ContractAmendParamsCommitsInvoiceSchedule] `json:"invoice_schedule"`
	// displayed on invoices
	Name param.Field[string] `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID param.Field[string] `json:"netsuite_sales_order_id"`
	// optionally payment gate this commit
	PaymentGateConfig param.Field[V1ContractAmendParamsCommitsPaymentGateConfig] `json:"payment_gate_config"`
	// If multiple commits are applicable, the one with the lower priority will apply
	// first.
	Priority param.Field[float64]                              `json:"priority"`
	RateType param.Field[V1ContractAmendParamsCommitsRateType] `json:"rate_type"`
	// Fraction of unused segments that will be rolled over. Must be between 0 and 1.
	RolloverFraction param.Field[float64] `json:"rollover_fraction"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown. This field cannot
	// be used together with `applicable_product_ids` or `applicable_product_tags`.
	Specifiers param.Field[[]V1ContractAmendParamsCommitsSpecifier] `json:"specifiers"`
	// A temporary ID for the commit that can be used to reference the commit for
	// commit specific overrides.
	TemporaryID param.Field[string] `json:"temporary_id"`
}

func (V1ContractAmendParamsCommit) MarshalJSON

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

type V1ContractAmendParamsCommitsAccessSchedule

type V1ContractAmendParamsCommitsAccessSchedule struct {
	ScheduleItems param.Field[[]V1ContractAmendParamsCommitsAccessScheduleScheduleItem] `json:"schedule_items,required"`
	// Defaults to USD (cents) if not passed
	CreditTypeID param.Field[string] `json:"credit_type_id" format:"uuid"`
}

Required: Schedule for distributing the commit to the customer. For "POSTPAID" commits only one schedule item is allowed and amount must match invoice_schedule total.

func (V1ContractAmendParamsCommitsAccessSchedule) MarshalJSON

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

type V1ContractAmendParamsCommitsAccessScheduleScheduleItem

type V1ContractAmendParamsCommitsAccessScheduleScheduleItem struct {
	Amount param.Field[float64] `json:"amount,required"`
	// RFC 3339 timestamp (exclusive)
	EndingBefore param.Field[time.Time] `json:"ending_before,required" format:"date-time"`
	// RFC 3339 timestamp (inclusive)
	StartingAt param.Field[time.Time] `json:"starting_at,required" format:"date-time"`
}

func (V1ContractAmendParamsCommitsAccessScheduleScheduleItem) MarshalJSON

type V1ContractAmendParamsCommitsInvoiceSchedule

type V1ContractAmendParamsCommitsInvoiceSchedule struct {
	// Defaults to USD (cents) if not passed.
	CreditTypeID param.Field[string] `json:"credit_type_id" format:"uuid"`
	// Enter the unit price and quantity for the charge or instead only send the
	// amount. If amount is sent, the unit price is assumed to be the amount and
	// quantity is inferred to be 1.
	RecurringSchedule param.Field[V1ContractAmendParamsCommitsInvoiceScheduleRecurringSchedule] `json:"recurring_schedule"`
	// Either provide amount or provide both unit_price and quantity.
	ScheduleItems param.Field[[]V1ContractAmendParamsCommitsInvoiceScheduleScheduleItem] `json:"schedule_items"`
}

Required for "POSTPAID" commits: the true up invoice will be generated at this time and only one schedule item is allowed; the total must match access_schedule amount. Optional for "PREPAID" commits: if not provided, this will be a "complimentary" commit with no invoice.

func (V1ContractAmendParamsCommitsInvoiceSchedule) MarshalJSON

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

type V1ContractAmendParamsCommitsInvoiceScheduleRecurringSchedule

type V1ContractAmendParamsCommitsInvoiceScheduleRecurringSchedule struct {
	AmountDistribution param.Field[V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleAmountDistribution] `json:"amount_distribution,required"`
	// RFC 3339 timestamp (exclusive).
	EndingBefore param.Field[time.Time]                                                             `json:"ending_before,required" format:"date-time"`
	Frequency    param.Field[V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleFrequency] `json:"frequency,required"`
	// RFC 3339 timestamp (inclusive).
	StartingAt param.Field[time.Time] `json:"starting_at,required" format:"date-time"`
	// Amount for the charge. Can be provided instead of unit_price and quantity. If
	// amount is sent, the unit_price is assumed to be the amount and quantity is
	// inferred to be 1.
	Amount param.Field[float64] `json:"amount"`
	// Quantity for the charge. Will be multiplied by unit_price to determine the
	// amount and must be specified with unit_price. If specified amount cannot be
	// provided.
	Quantity param.Field[float64] `json:"quantity"`
	// Unit price for the charge. Will be multiplied by quantity to determine the
	// amount and must be specified with quantity. If specified amount cannot be
	// provided.
	UnitPrice param.Field[float64] `json:"unit_price"`
}

Enter the unit price and quantity for the charge or instead only send the amount. If amount is sent, the unit price is assumed to be the amount and quantity is inferred to be 1.

func (V1ContractAmendParamsCommitsInvoiceScheduleRecurringSchedule) MarshalJSON

type V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleAmountDistribution

type V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleAmountDistribution string
const (
	V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleAmountDistributionDivided        V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleAmountDistribution = "DIVIDED"
	V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleAmountDistributionDividedRounded V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleAmountDistribution = "DIVIDED_ROUNDED"
	V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleAmountDistributionEach           V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleAmountDistribution = "EACH"
)

func (V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleAmountDistribution) IsKnown

type V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleFrequency

type V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleFrequency string
const (
	V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleFrequencyMonthly    V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleFrequency = "MONTHLY"
	V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleFrequencyQuarterly  V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleFrequency = "QUARTERLY"
	V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleFrequencySemiAnnual V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleFrequency = "SEMI_ANNUAL"
	V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleFrequencyAnnual     V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleFrequency = "ANNUAL"
)

func (V1ContractAmendParamsCommitsInvoiceScheduleRecurringScheduleFrequency) IsKnown

type V1ContractAmendParamsCommitsInvoiceScheduleScheduleItem

type V1ContractAmendParamsCommitsInvoiceScheduleScheduleItem struct {
	// timestamp of the scheduled event
	Timestamp param.Field[time.Time] `json:"timestamp,required" format:"date-time"`
	// Amount for the charge. Can be provided instead of unit_price and quantity. If
	// amount is sent, the unit_price is assumed to be the amount and quantity is
	// inferred to be 1.
	Amount param.Field[float64] `json:"amount"`
	// Quantity for the charge. Will be multiplied by unit_price to determine the
	// amount and must be specified with unit_price. If specified amount cannot be
	// provided.
	Quantity param.Field[float64] `json:"quantity"`
	// Unit price for the charge. Will be multiplied by quantity to determine the
	// amount and must be specified with quantity. If specified amount cannot be
	// provided.
	UnitPrice param.Field[float64] `json:"unit_price"`
}

func (V1ContractAmendParamsCommitsInvoiceScheduleScheduleItem) MarshalJSON

type V1ContractAmendParamsCommitsPaymentGateConfig

type V1ContractAmendParamsCommitsPaymentGateConfig struct {
	// Gate access to the commit balance based on successful collection of payment.
	// Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
	// facilitate payment using your own payment integration. Select NONE if you do not
	// wish to payment gate the commit balance.
	PaymentGateType param.Field[V1ContractAmendParamsCommitsPaymentGateConfigPaymentGateType] `json:"payment_gate_type,required"`
	// Only applicable if using Stripe as your payment gateway through Metronome.
	StripeConfig param.Field[V1ContractAmendParamsCommitsPaymentGateConfigStripeConfig] `json:"stripe_config"`
	// Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
	// not wish Metronome to calculate tax on your behalf. Leaving this field blank
	// will default to NONE.
	TaxType param.Field[V1ContractAmendParamsCommitsPaymentGateConfigTaxType] `json:"tax_type"`
}

optionally payment gate this commit

func (V1ContractAmendParamsCommitsPaymentGateConfig) MarshalJSON

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

type V1ContractAmendParamsCommitsPaymentGateConfigPaymentGateType

type V1ContractAmendParamsCommitsPaymentGateConfigPaymentGateType string

Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance.

const (
	V1ContractAmendParamsCommitsPaymentGateConfigPaymentGateTypeNone     V1ContractAmendParamsCommitsPaymentGateConfigPaymentGateType = "NONE"
	V1ContractAmendParamsCommitsPaymentGateConfigPaymentGateTypeStripe   V1ContractAmendParamsCommitsPaymentGateConfigPaymentGateType = "STRIPE"
	V1ContractAmendParamsCommitsPaymentGateConfigPaymentGateTypeExternal V1ContractAmendParamsCommitsPaymentGateConfigPaymentGateType = "EXTERNAL"
)

func (V1ContractAmendParamsCommitsPaymentGateConfigPaymentGateType) IsKnown

type V1ContractAmendParamsCommitsPaymentGateConfigStripeConfig

type V1ContractAmendParamsCommitsPaymentGateConfigStripeConfig struct {
	// If left blank, will default to INVOICE
	PaymentType param.Field[V1ContractAmendParamsCommitsPaymentGateConfigStripeConfigPaymentType] `json:"payment_type,required"`
}

Only applicable if using Stripe as your payment gateway through Metronome.

func (V1ContractAmendParamsCommitsPaymentGateConfigStripeConfig) MarshalJSON

type V1ContractAmendParamsCommitsPaymentGateConfigStripeConfigPaymentType

type V1ContractAmendParamsCommitsPaymentGateConfigStripeConfigPaymentType string

If left blank, will default to INVOICE

const (
	V1ContractAmendParamsCommitsPaymentGateConfigStripeConfigPaymentTypeInvoice       V1ContractAmendParamsCommitsPaymentGateConfigStripeConfigPaymentType = "INVOICE"
	V1ContractAmendParamsCommitsPaymentGateConfigStripeConfigPaymentTypePaymentIntent V1ContractAmendParamsCommitsPaymentGateConfigStripeConfigPaymentType = "PAYMENT_INTENT"
)

func (V1ContractAmendParamsCommitsPaymentGateConfigStripeConfigPaymentType) IsKnown

type V1ContractAmendParamsCommitsPaymentGateConfigTaxType

type V1ContractAmendParamsCommitsPaymentGateConfigTaxType string

Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE.

const (
	V1ContractAmendParamsCommitsPaymentGateConfigTaxTypeNone   V1ContractAmendParamsCommitsPaymentGateConfigTaxType = "NONE"
	V1ContractAmendParamsCommitsPaymentGateConfigTaxTypeStripe V1ContractAmendParamsCommitsPaymentGateConfigTaxType = "STRIPE"
)

func (V1ContractAmendParamsCommitsPaymentGateConfigTaxType) IsKnown

type V1ContractAmendParamsCommitsRateType

type V1ContractAmendParamsCommitsRateType string
const (
	V1ContractAmendParamsCommitsRateTypeCommitRate V1ContractAmendParamsCommitsRateType = "COMMIT_RATE"
	V1ContractAmendParamsCommitsRateTypeListRate   V1ContractAmendParamsCommitsRateType = "LIST_RATE"
)

func (V1ContractAmendParamsCommitsRateType) IsKnown

type V1ContractAmendParamsCommitsSpecifier

type V1ContractAmendParamsCommitsSpecifier struct {
	PresentationGroupValues param.Field[map[string]string] `json:"presentation_group_values"`
	PricingGroupValues      param.Field[map[string]string] `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID param.Field[string] `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags param.Field[[]string] `json:"product_tags"`
}

func (V1ContractAmendParamsCommitsSpecifier) MarshalJSON

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

type V1ContractAmendParamsCommitsType

type V1ContractAmendParamsCommitsType string
const (
	V1ContractAmendParamsCommitsTypePrepaid  V1ContractAmendParamsCommitsType = "PREPAID"
	V1ContractAmendParamsCommitsTypePostpaid V1ContractAmendParamsCommitsType = "POSTPAID"
)

func (V1ContractAmendParamsCommitsType) IsKnown

type V1ContractAmendParamsCredit

type V1ContractAmendParamsCredit struct {
	// Schedule for distributing the credit to the customer.
	AccessSchedule param.Field[V1ContractAmendParamsCreditsAccessSchedule] `json:"access_schedule,required"`
	ProductID      param.Field[string]                                     `json:"product_id,required" format:"uuid"`
	// Which products the credit applies to. If both applicable_product_ids and
	// applicable_product_tags are not provided, the credit applies to all products.
	ApplicableProductIDs param.Field[[]string] `json:"applicable_product_ids" format:"uuid"`
	// Which tags the credit applies to. If both applicable_product_ids and
	// applicable_product_tags are not provided, the credit applies to all products.
	ApplicableProductTags param.Field[[]string]          `json:"applicable_product_tags"`
	CustomFields          param.Field[map[string]string] `json:"custom_fields"`
	// Used only in UI/API. It is not exposed to end customers.
	Description param.Field[string] `json:"description"`
	// displayed on invoices
	Name param.Field[string] `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID param.Field[string] `json:"netsuite_sales_order_id"`
	// If multiple credits are applicable, the one with the lower priority will apply
	// first.
	Priority param.Field[float64]                              `json:"priority"`
	RateType param.Field[V1ContractAmendParamsCreditsRateType] `json:"rate_type"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown. This field cannot
	// be used together with `applicable_product_ids` or `applicable_product_tags`.
	Specifiers param.Field[[]V1ContractAmendParamsCreditsSpecifier] `json:"specifiers"`
}

func (V1ContractAmendParamsCredit) MarshalJSON

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

type V1ContractAmendParamsCreditsAccessSchedule

type V1ContractAmendParamsCreditsAccessSchedule struct {
	ScheduleItems param.Field[[]V1ContractAmendParamsCreditsAccessScheduleScheduleItem] `json:"schedule_items,required"`
	// Defaults to USD (cents) if not passed
	CreditTypeID param.Field[string] `json:"credit_type_id" format:"uuid"`
}

Schedule for distributing the credit to the customer.

func (V1ContractAmendParamsCreditsAccessSchedule) MarshalJSON

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

type V1ContractAmendParamsCreditsAccessScheduleScheduleItem

type V1ContractAmendParamsCreditsAccessScheduleScheduleItem struct {
	Amount param.Field[float64] `json:"amount,required"`
	// RFC 3339 timestamp (exclusive)
	EndingBefore param.Field[time.Time] `json:"ending_before,required" format:"date-time"`
	// RFC 3339 timestamp (inclusive)
	StartingAt param.Field[time.Time] `json:"starting_at,required" format:"date-time"`
}

func (V1ContractAmendParamsCreditsAccessScheduleScheduleItem) MarshalJSON

type V1ContractAmendParamsCreditsRateType

type V1ContractAmendParamsCreditsRateType string
const (
	V1ContractAmendParamsCreditsRateTypeCommitRate V1ContractAmendParamsCreditsRateType = "COMMIT_RATE"
	V1ContractAmendParamsCreditsRateTypeListRate   V1ContractAmendParamsCreditsRateType = "LIST_RATE"
)

func (V1ContractAmendParamsCreditsRateType) IsKnown

type V1ContractAmendParamsCreditsSpecifier

type V1ContractAmendParamsCreditsSpecifier struct {
	PresentationGroupValues param.Field[map[string]string] `json:"presentation_group_values"`
	PricingGroupValues      param.Field[map[string]string] `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID param.Field[string] `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags param.Field[[]string] `json:"product_tags"`
}

func (V1ContractAmendParamsCreditsSpecifier) MarshalJSON

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

type V1ContractAmendParamsDiscount

type V1ContractAmendParamsDiscount struct {
	ProductID param.Field[string] `json:"product_id,required" format:"uuid"`
	// Must provide either schedule_items or recurring_schedule.
	Schedule     param.Field[V1ContractAmendParamsDiscountsSchedule] `json:"schedule,required"`
	CustomFields param.Field[map[string]string]                      `json:"custom_fields"`
	// displayed on invoices
	Name param.Field[string] `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID param.Field[string] `json:"netsuite_sales_order_id"`
}

func (V1ContractAmendParamsDiscount) MarshalJSON

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

type V1ContractAmendParamsDiscountsSchedule

type V1ContractAmendParamsDiscountsSchedule struct {
	// Defaults to USD (cents) if not passed.
	CreditTypeID param.Field[string] `json:"credit_type_id" format:"uuid"`
	// Enter the unit price and quantity for the charge or instead only send the
	// amount. If amount is sent, the unit price is assumed to be the amount and
	// quantity is inferred to be 1.
	RecurringSchedule param.Field[V1ContractAmendParamsDiscountsScheduleRecurringSchedule] `json:"recurring_schedule"`
	// Either provide amount or provide both unit_price and quantity.
	ScheduleItems param.Field[[]V1ContractAmendParamsDiscountsScheduleScheduleItem] `json:"schedule_items"`
}

Must provide either schedule_items or recurring_schedule.

func (V1ContractAmendParamsDiscountsSchedule) MarshalJSON

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

type V1ContractAmendParamsDiscountsScheduleRecurringSchedule

type V1ContractAmendParamsDiscountsScheduleRecurringSchedule struct {
	AmountDistribution param.Field[V1ContractAmendParamsDiscountsScheduleRecurringScheduleAmountDistribution] `json:"amount_distribution,required"`
	// RFC 3339 timestamp (exclusive).
	EndingBefore param.Field[time.Time]                                                        `json:"ending_before,required" format:"date-time"`
	Frequency    param.Field[V1ContractAmendParamsDiscountsScheduleRecurringScheduleFrequency] `json:"frequency,required"`
	// RFC 3339 timestamp (inclusive).
	StartingAt param.Field[time.Time] `json:"starting_at,required" format:"date-time"`
	// Amount for the charge. Can be provided instead of unit_price and quantity. If
	// amount is sent, the unit_price is assumed to be the amount and quantity is
	// inferred to be 1.
	Amount param.Field[float64] `json:"amount"`
	// Quantity for the charge. Will be multiplied by unit_price to determine the
	// amount and must be specified with unit_price. If specified amount cannot be
	// provided.
	Quantity param.Field[float64] `json:"quantity"`
	// Unit price for the charge. Will be multiplied by quantity to determine the
	// amount and must be specified with quantity. If specified amount cannot be
	// provided.
	UnitPrice param.Field[float64] `json:"unit_price"`
}

Enter the unit price and quantity for the charge or instead only send the amount. If amount is sent, the unit price is assumed to be the amount and quantity is inferred to be 1.

func (V1ContractAmendParamsDiscountsScheduleRecurringSchedule) MarshalJSON

type V1ContractAmendParamsDiscountsScheduleRecurringScheduleAmountDistribution

type V1ContractAmendParamsDiscountsScheduleRecurringScheduleAmountDistribution string
const (
	V1ContractAmendParamsDiscountsScheduleRecurringScheduleAmountDistributionDivided        V1ContractAmendParamsDiscountsScheduleRecurringScheduleAmountDistribution = "DIVIDED"
	V1ContractAmendParamsDiscountsScheduleRecurringScheduleAmountDistributionDividedRounded V1ContractAmendParamsDiscountsScheduleRecurringScheduleAmountDistribution = "DIVIDED_ROUNDED"
	V1ContractAmendParamsDiscountsScheduleRecurringScheduleAmountDistributionEach           V1ContractAmendParamsDiscountsScheduleRecurringScheduleAmountDistribution = "EACH"
)

func (V1ContractAmendParamsDiscountsScheduleRecurringScheduleAmountDistribution) IsKnown

type V1ContractAmendParamsDiscountsScheduleRecurringScheduleFrequency

type V1ContractAmendParamsDiscountsScheduleRecurringScheduleFrequency string
const (
	V1ContractAmendParamsDiscountsScheduleRecurringScheduleFrequencyMonthly    V1ContractAmendParamsDiscountsScheduleRecurringScheduleFrequency = "MONTHLY"
	V1ContractAmendParamsDiscountsScheduleRecurringScheduleFrequencyQuarterly  V1ContractAmendParamsDiscountsScheduleRecurringScheduleFrequency = "QUARTERLY"
	V1ContractAmendParamsDiscountsScheduleRecurringScheduleFrequencySemiAnnual V1ContractAmendParamsDiscountsScheduleRecurringScheduleFrequency = "SEMI_ANNUAL"
	V1ContractAmendParamsDiscountsScheduleRecurringScheduleFrequencyAnnual     V1ContractAmendParamsDiscountsScheduleRecurringScheduleFrequency = "ANNUAL"
)

func (V1ContractAmendParamsDiscountsScheduleRecurringScheduleFrequency) IsKnown

type V1ContractAmendParamsDiscountsScheduleScheduleItem

type V1ContractAmendParamsDiscountsScheduleScheduleItem struct {
	// timestamp of the scheduled event
	Timestamp param.Field[time.Time] `json:"timestamp,required" format:"date-time"`
	// Amount for the charge. Can be provided instead of unit_price and quantity. If
	// amount is sent, the unit_price is assumed to be the amount and quantity is
	// inferred to be 1.
	Amount param.Field[float64] `json:"amount"`
	// Quantity for the charge. Will be multiplied by unit_price to determine the
	// amount and must be specified with unit_price. If specified amount cannot be
	// provided.
	Quantity param.Field[float64] `json:"quantity"`
	// Unit price for the charge. Will be multiplied by quantity to determine the
	// amount and must be specified with quantity. If specified amount cannot be
	// provided.
	UnitPrice param.Field[float64] `json:"unit_price"`
}

func (V1ContractAmendParamsDiscountsScheduleScheduleItem) MarshalJSON

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

type V1ContractAmendParamsOverride

type V1ContractAmendParamsOverride struct {
	// RFC 3339 timestamp indicating when the override will start applying (inclusive)
	StartingAt param.Field[time.Time] `json:"starting_at,required" format:"date-time"`
	// tags identifying products whose rates are being overridden. Cannot be used in
	// conjunction with override_specifiers.
	ApplicableProductTags param.Field[[]string] `json:"applicable_product_tags"`
	// RFC 3339 timestamp indicating when the override will stop applying (exclusive)
	EndingBefore param.Field[time.Time] `json:"ending_before" format:"date-time"`
	Entitled     param.Field[bool]      `json:"entitled"`
	// Indicates whether the override should only apply to commits. Defaults to
	// `false`. If `true`, you can specify relevant commits in `override_specifiers` by
	// passing `commit_ids`. if you do not specify `commit_ids`, then the override will
	// apply when consuming any prepaid or postpaid commit.
	IsCommitSpecific param.Field[bool] `json:"is_commit_specific"`
	// Required for MULTIPLIER type. Must be >=0.
	Multiplier param.Field[float64] `json:"multiplier"`
	// Cannot be used in conjunction with product_id or applicable_product_tags. If
	// provided, the override will apply to all products with the specified specifiers.
	OverrideSpecifiers param.Field[[]V1ContractAmendParamsOverridesOverrideSpecifier] `json:"override_specifiers"`
	// Required for OVERWRITE type.
	OverwriteRate param.Field[V1ContractAmendParamsOverridesOverwriteRate] `json:"overwrite_rate"`
	// Required for EXPLICIT multiplier prioritization scheme and all TIERED overrides.
	// Under EXPLICIT prioritization, overwrites are prioritized first, and then tiered
	// and multiplier overrides are prioritized by their priority value (lowest first).
	// Must be > 0.
	Priority param.Field[float64] `json:"priority"`
	// ID of the product whose rate is being overridden. Cannot be used in conjunction
	// with override_specifiers.
	ProductID param.Field[string] `json:"product_id" format:"uuid"`
	// Indicates whether the override applies to commit rates or list rates. Can only
	// be used for overrides that have `is_commit_specific` set to `true`. Defaults to
	// `"LIST_RATE"`.
	Target param.Field[V1ContractAmendParamsOverridesTarget] `json:"target"`
	// Required for TIERED type. Must have at least one tier.
	Tiers param.Field[[]V1ContractAmendParamsOverridesTier] `json:"tiers"`
	// Overwrites are prioritized over multipliers and tiered overrides.
	Type param.Field[V1ContractAmendParamsOverridesType] `json:"type"`
}

func (V1ContractAmendParamsOverride) MarshalJSON

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

type V1ContractAmendParamsOverridesOverrideSpecifier

type V1ContractAmendParamsOverridesOverrideSpecifier struct {
	BillingFrequency param.Field[V1ContractAmendParamsOverridesOverrideSpecifiersBillingFrequency] `json:"billing_frequency"`
	// Can only be used for commit specific overrides. Must be used in conjunction with
	// one of product_id, product_tags, pricing_group_values, or
	// presentation_group_values. If provided, the override will only apply to the
	// specified commits. If not provided, the override will apply to all commits.
	CommitIDs param.Field[[]string] `json:"commit_ids"`
	// A map of group names to values. The override will only apply to line items with
	// the specified presentation group values.
	PresentationGroupValues param.Field[map[string]string] `json:"presentation_group_values"`
	// A map of pricing group names to values. The override will only apply to products
	// with the specified pricing group values.
	PricingGroupValues param.Field[map[string]string] `json:"pricing_group_values"`
	// If provided, the override will only apply to the product with the specified ID.
	ProductID param.Field[string] `json:"product_id" format:"uuid"`
	// If provided, the override will only apply to products with all the specified
	// tags.
	ProductTags param.Field[[]string] `json:"product_tags"`
	// Can only be used for commit specific overrides. Must be used in conjunction with
	// one of product_id, product_tags, pricing_group_values, or
	// presentation_group_values. If provided, the override will only apply to commits
	// created by the specified recurring commit ids.
	RecurringCommitIDs param.Field[[]string] `json:"recurring_commit_ids"`
	// Can only be used for commit specific overrides. Must be used in conjunction with
	// one of product_id, product_tags, pricing_group_values, or
	// presentation_group_values. If provided, the override will only apply to credits
	// created by the specified recurring credit ids.
	RecurringCreditIDs param.Field[[]string] `json:"recurring_credit_ids"`
}

func (V1ContractAmendParamsOverridesOverrideSpecifier) MarshalJSON

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

type V1ContractAmendParamsOverridesOverrideSpecifiersBillingFrequency

type V1ContractAmendParamsOverridesOverrideSpecifiersBillingFrequency string
const (
	V1ContractAmendParamsOverridesOverrideSpecifiersBillingFrequencyMonthly   V1ContractAmendParamsOverridesOverrideSpecifiersBillingFrequency = "MONTHLY"
	V1ContractAmendParamsOverridesOverrideSpecifiersBillingFrequencyQuarterly V1ContractAmendParamsOverridesOverrideSpecifiersBillingFrequency = "QUARTERLY"
	V1ContractAmendParamsOverridesOverrideSpecifiersBillingFrequencyAnnual    V1ContractAmendParamsOverridesOverrideSpecifiersBillingFrequency = "ANNUAL"
	V1ContractAmendParamsOverridesOverrideSpecifiersBillingFrequencyWeekly    V1ContractAmendParamsOverridesOverrideSpecifiersBillingFrequency = "WEEKLY"
)

func (V1ContractAmendParamsOverridesOverrideSpecifiersBillingFrequency) IsKnown

type V1ContractAmendParamsOverridesOverwriteRate

type V1ContractAmendParamsOverridesOverwriteRate struct {
	RateType     param.Field[V1ContractAmendParamsOverridesOverwriteRateRateType] `json:"rate_type,required"`
	CreditTypeID param.Field[string]                                              `json:"credit_type_id" format:"uuid"`
	// Only set for CUSTOM rate_type. This field is interpreted by custom rate
	// processors.
	CustomRate param.Field[map[string]interface{}] `json:"custom_rate"`
	// Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
	// set to true.
	IsProrated param.Field[bool] `json:"is_prorated"`
	// Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
	// this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
	Price param.Field[float64] `json:"price"`
	// Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
	Quantity param.Field[float64] `json:"quantity"`
	// Only set for TIERED rate_type.
	Tiers param.Field[[]V1ContractAmendParamsOverridesOverwriteRateTier] `json:"tiers"`
}

Required for OVERWRITE type.

func (V1ContractAmendParamsOverridesOverwriteRate) MarshalJSON

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

type V1ContractAmendParamsOverridesOverwriteRateRateType

type V1ContractAmendParamsOverridesOverwriteRateRateType string
const (
	V1ContractAmendParamsOverridesOverwriteRateRateTypeFlat         V1ContractAmendParamsOverridesOverwriteRateRateType = "FLAT"
	V1ContractAmendParamsOverridesOverwriteRateRateTypePercentage   V1ContractAmendParamsOverridesOverwriteRateRateType = "PERCENTAGE"
	V1ContractAmendParamsOverridesOverwriteRateRateTypeSubscription V1ContractAmendParamsOverridesOverwriteRateRateType = "SUBSCRIPTION"
	V1ContractAmendParamsOverridesOverwriteRateRateTypeTiered       V1ContractAmendParamsOverridesOverwriteRateRateType = "TIERED"
	V1ContractAmendParamsOverridesOverwriteRateRateTypeCustom       V1ContractAmendParamsOverridesOverwriteRateRateType = "CUSTOM"
)

func (V1ContractAmendParamsOverridesOverwriteRateRateType) IsKnown

type V1ContractAmendParamsOverridesOverwriteRateTier

type V1ContractAmendParamsOverridesOverwriteRateTier struct {
	Price param.Field[float64] `json:"price,required"`
	Size  param.Field[float64] `json:"size"`
}

func (V1ContractAmendParamsOverridesOverwriteRateTier) MarshalJSON

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

type V1ContractAmendParamsOverridesTarget

type V1ContractAmendParamsOverridesTarget string

Indicates whether the override applies to commit rates or list rates. Can only be used for overrides that have `is_commit_specific` set to `true`. Defaults to `"LIST_RATE"`.

const (
	V1ContractAmendParamsOverridesTargetCommitRate V1ContractAmendParamsOverridesTarget = "COMMIT_RATE"
	V1ContractAmendParamsOverridesTargetListRate   V1ContractAmendParamsOverridesTarget = "LIST_RATE"
)

func (V1ContractAmendParamsOverridesTarget) IsKnown

type V1ContractAmendParamsOverridesTier

type V1ContractAmendParamsOverridesTier struct {
	Multiplier param.Field[float64] `json:"multiplier,required"`
	Size       param.Field[float64] `json:"size"`
}

func (V1ContractAmendParamsOverridesTier) MarshalJSON

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

type V1ContractAmendParamsOverridesType

type V1ContractAmendParamsOverridesType string

Overwrites are prioritized over multipliers and tiered overrides.

const (
	V1ContractAmendParamsOverridesTypeOverwrite  V1ContractAmendParamsOverridesType = "OVERWRITE"
	V1ContractAmendParamsOverridesTypeMultiplier V1ContractAmendParamsOverridesType = "MULTIPLIER"
	V1ContractAmendParamsOverridesTypeTiered     V1ContractAmendParamsOverridesType = "TIERED"
)

func (V1ContractAmendParamsOverridesType) IsKnown

type V1ContractAmendParamsProfessionalService

type V1ContractAmendParamsProfessionalService struct {
	// Maximum amount for the term.
	MaxAmount param.Field[float64] `json:"max_amount,required"`
	ProductID param.Field[string]  `json:"product_id,required" format:"uuid"`
	// Quantity for the charge. Will be multiplied by unit_price to determine the
	// amount.
	Quantity param.Field[float64] `json:"quantity,required"`
	// Unit price for the charge. Will be multiplied by quantity to determine the
	// amount and must be specified.
	UnitPrice    param.Field[float64]           `json:"unit_price,required"`
	CustomFields param.Field[map[string]string] `json:"custom_fields"`
	Description  param.Field[string]            `json:"description"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID param.Field[string] `json:"netsuite_sales_order_id"`
}

func (V1ContractAmendParamsProfessionalService) MarshalJSON

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

type V1ContractAmendParamsResellerRoyaltiesAwsOptions

type V1ContractAmendParamsResellerRoyaltiesAwsOptions struct {
	AwsAccountNumber    param.Field[string] `json:"aws_account_number"`
	AwsOfferID          param.Field[string] `json:"aws_offer_id"`
	AwsPayerReferenceID param.Field[string] `json:"aws_payer_reference_id"`
}

func (V1ContractAmendParamsResellerRoyaltiesAwsOptions) MarshalJSON

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

type V1ContractAmendParamsResellerRoyaltiesGcpOptions

type V1ContractAmendParamsResellerRoyaltiesGcpOptions struct {
	GcpAccountID param.Field[string] `json:"gcp_account_id"`
	GcpOfferID   param.Field[string] `json:"gcp_offer_id"`
}

func (V1ContractAmendParamsResellerRoyaltiesGcpOptions) MarshalJSON

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

type V1ContractAmendParamsResellerRoyaltiesResellerType

type V1ContractAmendParamsResellerRoyaltiesResellerType string
const (
	V1ContractAmendParamsResellerRoyaltiesResellerTypeAws           V1ContractAmendParamsResellerRoyaltiesResellerType = "AWS"
	V1ContractAmendParamsResellerRoyaltiesResellerTypeAwsProService V1ContractAmendParamsResellerRoyaltiesResellerType = "AWS_PRO_SERVICE"
	V1ContractAmendParamsResellerRoyaltiesResellerTypeGcp           V1ContractAmendParamsResellerRoyaltiesResellerType = "GCP"
	V1ContractAmendParamsResellerRoyaltiesResellerTypeGcpProService V1ContractAmendParamsResellerRoyaltiesResellerType = "GCP_PRO_SERVICE"
)

func (V1ContractAmendParamsResellerRoyaltiesResellerType) IsKnown

type V1ContractAmendParamsResellerRoyalty

type V1ContractAmendParamsResellerRoyalty struct {
	ResellerType param.Field[V1ContractAmendParamsResellerRoyaltiesResellerType] `json:"reseller_type,required"`
	// Must provide at least one of applicable_product_ids or applicable_product_tags.
	ApplicableProductIDs param.Field[[]string] `json:"applicable_product_ids" format:"uuid"`
	// Must provide at least one of applicable_product_ids or applicable_product_tags.
	ApplicableProductTags param.Field[[]string]                                         `json:"applicable_product_tags"`
	AwsOptions            param.Field[V1ContractAmendParamsResellerRoyaltiesAwsOptions] `json:"aws_options"`
	// Use null to indicate that the existing end timestamp should be removed.
	EndingBefore          param.Field[time.Time]                                        `json:"ending_before" format:"date-time"`
	Fraction              param.Field[float64]                                          `json:"fraction"`
	GcpOptions            param.Field[V1ContractAmendParamsResellerRoyaltiesGcpOptions] `json:"gcp_options"`
	NetsuiteResellerID    param.Field[string]                                           `json:"netsuite_reseller_id"`
	ResellerContractValue param.Field[float64]                                          `json:"reseller_contract_value"`
	StartingAt            param.Field[time.Time]                                        `json:"starting_at" format:"date-time"`
}

func (V1ContractAmendParamsResellerRoyalty) MarshalJSON

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

type V1ContractAmendParamsScheduledCharge

type V1ContractAmendParamsScheduledCharge struct {
	ProductID param.Field[string] `json:"product_id,required" format:"uuid"`
	// Must provide either schedule_items or recurring_schedule.
	Schedule param.Field[V1ContractAmendParamsScheduledChargesSchedule] `json:"schedule,required"`
	// displayed on invoices
	Name param.Field[string] `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID param.Field[string] `json:"netsuite_sales_order_id"`
}

func (V1ContractAmendParamsScheduledCharge) MarshalJSON

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

type V1ContractAmendParamsScheduledChargesSchedule

type V1ContractAmendParamsScheduledChargesSchedule struct {
	// Defaults to USD (cents) if not passed.
	CreditTypeID param.Field[string] `json:"credit_type_id" format:"uuid"`
	// Enter the unit price and quantity for the charge or instead only send the
	// amount. If amount is sent, the unit price is assumed to be the amount and
	// quantity is inferred to be 1.
	RecurringSchedule param.Field[V1ContractAmendParamsScheduledChargesScheduleRecurringSchedule] `json:"recurring_schedule"`
	// Either provide amount or provide both unit_price and quantity.
	ScheduleItems param.Field[[]V1ContractAmendParamsScheduledChargesScheduleScheduleItem] `json:"schedule_items"`
}

Must provide either schedule_items or recurring_schedule.

func (V1ContractAmendParamsScheduledChargesSchedule) MarshalJSON

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

type V1ContractAmendParamsScheduledChargesScheduleRecurringSchedule

type V1ContractAmendParamsScheduledChargesScheduleRecurringSchedule struct {
	AmountDistribution param.Field[V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleAmountDistribution] `json:"amount_distribution,required"`
	// RFC 3339 timestamp (exclusive).
	EndingBefore param.Field[time.Time]                                                               `json:"ending_before,required" format:"date-time"`
	Frequency    param.Field[V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleFrequency] `json:"frequency,required"`
	// RFC 3339 timestamp (inclusive).
	StartingAt param.Field[time.Time] `json:"starting_at,required" format:"date-time"`
	// Amount for the charge. Can be provided instead of unit_price and quantity. If
	// amount is sent, the unit_price is assumed to be the amount and quantity is
	// inferred to be 1.
	Amount param.Field[float64] `json:"amount"`
	// Quantity for the charge. Will be multiplied by unit_price to determine the
	// amount and must be specified with unit_price. If specified amount cannot be
	// provided.
	Quantity param.Field[float64] `json:"quantity"`
	// Unit price for the charge. Will be multiplied by quantity to determine the
	// amount and must be specified with quantity. If specified amount cannot be
	// provided.
	UnitPrice param.Field[float64] `json:"unit_price"`
}

Enter the unit price and quantity for the charge or instead only send the amount. If amount is sent, the unit price is assumed to be the amount and quantity is inferred to be 1.

func (V1ContractAmendParamsScheduledChargesScheduleRecurringSchedule) MarshalJSON

type V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleAmountDistribution

type V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleAmountDistribution string
const (
	V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleAmountDistributionDivided        V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleAmountDistribution = "DIVIDED"
	V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleAmountDistributionDividedRounded V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleAmountDistribution = "DIVIDED_ROUNDED"
	V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleAmountDistributionEach           V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleAmountDistribution = "EACH"
)

func (V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleAmountDistribution) IsKnown

type V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleFrequency

type V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleFrequency string
const (
	V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleFrequencyMonthly    V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleFrequency = "MONTHLY"
	V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleFrequencyQuarterly  V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleFrequency = "QUARTERLY"
	V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleFrequencySemiAnnual V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleFrequency = "SEMI_ANNUAL"
	V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleFrequencyAnnual     V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleFrequency = "ANNUAL"
)

func (V1ContractAmendParamsScheduledChargesScheduleRecurringScheduleFrequency) IsKnown

type V1ContractAmendParamsScheduledChargesScheduleScheduleItem

type V1ContractAmendParamsScheduledChargesScheduleScheduleItem struct {
	// timestamp of the scheduled event
	Timestamp param.Field[time.Time] `json:"timestamp,required" format:"date-time"`
	// Amount for the charge. Can be provided instead of unit_price and quantity. If
	// amount is sent, the unit_price is assumed to be the amount and quantity is
	// inferred to be 1.
	Amount param.Field[float64] `json:"amount"`
	// Quantity for the charge. Will be multiplied by unit_price to determine the
	// amount and must be specified with unit_price. If specified amount cannot be
	// provided.
	Quantity param.Field[float64] `json:"quantity"`
	// Unit price for the charge. Will be multiplied by quantity to determine the
	// amount and must be specified with quantity. If specified amount cannot be
	// provided.
	UnitPrice param.Field[float64] `json:"unit_price"`
}

func (V1ContractAmendParamsScheduledChargesScheduleScheduleItem) MarshalJSON

type V1ContractAmendResponse

type V1ContractAmendResponse struct {
	Data V1ContractAmendResponseData `json:"data,required"`
	JSON v1ContractAmendResponseJSON `json:"-"`
}

func (*V1ContractAmendResponse) UnmarshalJSON

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

type V1ContractAmendResponseData

type V1ContractAmendResponseData struct {
	ID   string                          `json:"id,required" format:"uuid"`
	JSON v1ContractAmendResponseDataJSON `json:"-"`
}

func (*V1ContractAmendResponseData) UnmarshalJSON

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

type V1ContractArchiveParams

type V1ContractArchiveParams struct {
	// ID of the contract to archive
	ContractID param.Field[string] `json:"contract_id,required" format:"uuid"`
	// ID of the customer whose contract is to be archived
	CustomerID param.Field[string] `json:"customer_id,required" format:"uuid"`
	// If false, the existing finalized invoices will remain after the contract is
	// archived.
	VoidInvoices param.Field[bool] `json:"void_invoices,required"`
}

func (V1ContractArchiveParams) MarshalJSON

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

type V1ContractArchiveResponse

type V1ContractArchiveResponse struct {
	Data V1ContractArchiveResponseData `json:"data,required"`
	JSON v1ContractArchiveResponseJSON `json:"-"`
}

func (*V1ContractArchiveResponse) UnmarshalJSON

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

type V1ContractArchiveResponseData

type V1ContractArchiveResponseData struct {
	ID   string                            `json:"id,required" format:"uuid"`
	JSON v1ContractArchiveResponseDataJSON `json:"-"`
}

func (*V1ContractArchiveResponseData) UnmarshalJSON

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

type V1ContractGetParams

type V1ContractGetParams struct {
	ContractID param.Field[string] `json:"contract_id,required" format:"uuid"`
	CustomerID param.Field[string] `json:"customer_id,required" format:"uuid"`
	// Include the balance of credits and commits in the response. Setting this flag
	// may cause the query to be slower.
	IncludeBalance param.Field[bool] `json:"include_balance"`
	// Include commit ledgers in the response. Setting this flag may cause the query to
	// be slower.
	IncludeLedgers param.Field[bool] `json:"include_ledgers"`
}

func (V1ContractGetParams) MarshalJSON

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

type V1ContractGetRateScheduleParams

type V1ContractGetRateScheduleParams struct {
	// ID of the contract to get the rate schedule for.
	ContractID param.Field[string] `json:"contract_id,required" format:"uuid"`
	// ID of the customer for whose contract to get the rate schedule for.
	CustomerID param.Field[string] `json:"customer_id,required" format:"uuid"`
	// Max number of results that should be returned
	Limit param.Field[int64] `query:"limit"`
	// Cursor that indicates where the next page of results should start.
	NextPage param.Field[string] `query:"next_page"`
	// optional timestamp which overlaps with the returned rate schedule segments. When
	// not specified, the current timestamp will be used.
	At param.Field[time.Time] `json:"at" format:"date-time"`
	// List of rate selectors, rates matching ANY of the selectors will be included in
	// the response. Passing no selectors will result in all rates being returned.
	Selectors param.Field[[]V1ContractGetRateScheduleParamsSelector] `json:"selectors"`
}

func (V1ContractGetRateScheduleParams) MarshalJSON

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

func (V1ContractGetRateScheduleParams) URLQuery

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

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

type V1ContractGetRateScheduleParamsSelector

type V1ContractGetRateScheduleParamsSelector struct {
	// Subscription rates matching the billing frequency will be included in the
	// response.
	BillingFrequency param.Field[V1ContractGetRateScheduleParamsSelectorsBillingFrequency] `json:"billing_frequency"`
	// List of pricing group key value pairs, rates containing the matching key / value
	// pairs will be included in the response.
	PartialPricingGroupValues param.Field[map[string]string] `json:"partial_pricing_group_values"`
	// List of pricing group key value pairs, rates matching all of the key / value
	// pairs will be included in the response.
	PricingGroupValues param.Field[map[string]string] `json:"pricing_group_values"`
	// Rates matching the product id will be included in the response.
	ProductID param.Field[string] `json:"product_id" format:"uuid"`
	// List of product tags, rates matching any of the tags will be included in the
	// response.
	ProductTags param.Field[[]string] `json:"product_tags"`
}

func (V1ContractGetRateScheduleParamsSelector) MarshalJSON

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

type V1ContractGetRateScheduleParamsSelectorsBillingFrequency

type V1ContractGetRateScheduleParamsSelectorsBillingFrequency string

Subscription rates matching the billing frequency will be included in the response.

const (
	V1ContractGetRateScheduleParamsSelectorsBillingFrequencyMonthly   V1ContractGetRateScheduleParamsSelectorsBillingFrequency = "MONTHLY"
	V1ContractGetRateScheduleParamsSelectorsBillingFrequencyQuarterly V1ContractGetRateScheduleParamsSelectorsBillingFrequency = "QUARTERLY"
	V1ContractGetRateScheduleParamsSelectorsBillingFrequencyAnnual    V1ContractGetRateScheduleParamsSelectorsBillingFrequency = "ANNUAL"
	V1ContractGetRateScheduleParamsSelectorsBillingFrequencyWeekly    V1ContractGetRateScheduleParamsSelectorsBillingFrequency = "WEEKLY"
)

func (V1ContractGetRateScheduleParamsSelectorsBillingFrequency) IsKnown

type V1ContractGetRateScheduleResponse

type V1ContractGetRateScheduleResponse struct {
	Data     []V1ContractGetRateScheduleResponseData `json:"data,required"`
	NextPage string                                  `json:"next_page,nullable"`
	JSON     v1ContractGetRateScheduleResponseJSON   `json:"-"`
}

func (*V1ContractGetRateScheduleResponse) UnmarshalJSON

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

type V1ContractGetRateScheduleResponseData

type V1ContractGetRateScheduleResponseData struct {
	Entitled            bool                                                  `json:"entitled,required"`
	ListRate            V1ContractGetRateScheduleResponseDataListRate         `json:"list_rate,required"`
	ProductCustomFields map[string]string                                     `json:"product_custom_fields,required"`
	ProductID           string                                                `json:"product_id,required" format:"uuid"`
	ProductName         string                                                `json:"product_name,required"`
	ProductTags         []string                                              `json:"product_tags,required"`
	RateCardID          string                                                `json:"rate_card_id,required" format:"uuid"`
	StartingAt          time.Time                                             `json:"starting_at,required" format:"date-time"`
	BillingFrequency    V1ContractGetRateScheduleResponseDataBillingFrequency `json:"billing_frequency"`
	// A distinct rate on the rate card. You can choose to use this rate rather than
	// list rate when consuming a credit or commit.
	CommitRate         V1ContractGetRateScheduleResponseDataCommitRate   `json:"commit_rate"`
	EndingBefore       time.Time                                         `json:"ending_before" format:"date-time"`
	OverrideRate       V1ContractGetRateScheduleResponseDataOverrideRate `json:"override_rate"`
	PricingGroupValues map[string]string                                 `json:"pricing_group_values"`
	JSON               v1ContractGetRateScheduleResponseDataJSON         `json:"-"`
}

func (*V1ContractGetRateScheduleResponseData) UnmarshalJSON

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

type V1ContractGetRateScheduleResponseDataBillingFrequency

type V1ContractGetRateScheduleResponseDataBillingFrequency string
const (
	V1ContractGetRateScheduleResponseDataBillingFrequencyMonthly   V1ContractGetRateScheduleResponseDataBillingFrequency = "MONTHLY"
	V1ContractGetRateScheduleResponseDataBillingFrequencyQuarterly V1ContractGetRateScheduleResponseDataBillingFrequency = "QUARTERLY"
	V1ContractGetRateScheduleResponseDataBillingFrequencyAnnual    V1ContractGetRateScheduleResponseDataBillingFrequency = "ANNUAL"
	V1ContractGetRateScheduleResponseDataBillingFrequencyWeekly    V1ContractGetRateScheduleResponseDataBillingFrequency = "WEEKLY"
)

func (V1ContractGetRateScheduleResponseDataBillingFrequency) IsKnown

type V1ContractGetRateScheduleResponseDataCommitRate

type V1ContractGetRateScheduleResponseDataCommitRate struct {
	RateType V1ContractGetRateScheduleResponseDataCommitRateRateType `json:"rate_type,required"`
	// Commit rate price. For FLAT rate_type, this must be >=0.
	Price float64 `json:"price"`
	// Only set for TIERED rate_type.
	Tiers []V1ContractGetRateScheduleResponseDataCommitRateTier `json:"tiers"`
	JSON  v1ContractGetRateScheduleResponseDataCommitRateJSON   `json:"-"`
}

A distinct rate on the rate card. You can choose to use this rate rather than list rate when consuming a credit or commit.

func (*V1ContractGetRateScheduleResponseDataCommitRate) UnmarshalJSON

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

type V1ContractGetRateScheduleResponseDataCommitRateRateType

type V1ContractGetRateScheduleResponseDataCommitRateRateType string
const (
	V1ContractGetRateScheduleResponseDataCommitRateRateTypeFlat         V1ContractGetRateScheduleResponseDataCommitRateRateType = "FLAT"
	V1ContractGetRateScheduleResponseDataCommitRateRateTypePercentage   V1ContractGetRateScheduleResponseDataCommitRateRateType = "PERCENTAGE"
	V1ContractGetRateScheduleResponseDataCommitRateRateTypeSubscription V1ContractGetRateScheduleResponseDataCommitRateRateType = "SUBSCRIPTION"
	V1ContractGetRateScheduleResponseDataCommitRateRateTypeTiered       V1ContractGetRateScheduleResponseDataCommitRateRateType = "TIERED"
	V1ContractGetRateScheduleResponseDataCommitRateRateTypeCustom       V1ContractGetRateScheduleResponseDataCommitRateRateType = "CUSTOM"
)

func (V1ContractGetRateScheduleResponseDataCommitRateRateType) IsKnown

type V1ContractGetRateScheduleResponseDataCommitRateTier

type V1ContractGetRateScheduleResponseDataCommitRateTier struct {
	Price float64                                                 `json:"price,required"`
	Size  float64                                                 `json:"size"`
	JSON  v1ContractGetRateScheduleResponseDataCommitRateTierJSON `json:"-"`
}

func (*V1ContractGetRateScheduleResponseDataCommitRateTier) UnmarshalJSON

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

type V1ContractGetRateScheduleResponseDataListRate

type V1ContractGetRateScheduleResponseDataListRate struct {
	RateType   V1ContractGetRateScheduleResponseDataListRateRateType   `json:"rate_type,required"`
	CreditType V1ContractGetRateScheduleResponseDataListRateCreditType `json:"credit_type"`
	// Only set for CUSTOM rate_type. This field is interpreted by custom rate
	// processors.
	CustomRate map[string]interface{} `json:"custom_rate"`
	// Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
	// set to true.
	IsProrated bool `json:"is_prorated"`
	// Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
	// this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
	Price float64 `json:"price"`
	// if pricing groups are used, this will contain the values used to calculate the
	// price
	PricingGroupValues map[string]string `json:"pricing_group_values"`
	// Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
	Quantity float64 `json:"quantity"`
	// Only set for TIERED rate_type.
	Tiers []V1ContractGetRateScheduleResponseDataListRateTier `json:"tiers"`
	// Only set for PERCENTAGE rate_type. Defaults to false. If true, rate is computed
	// using list prices rather than the standard rates for this product on the
	// contract.
	UseListPrices bool                                              `json:"use_list_prices"`
	JSON          v1ContractGetRateScheduleResponseDataListRateJSON `json:"-"`
}

func (*V1ContractGetRateScheduleResponseDataListRate) UnmarshalJSON

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

type V1ContractGetRateScheduleResponseDataListRateCreditType

type V1ContractGetRateScheduleResponseDataListRateCreditType struct {
	ID   string                                                      `json:"id,required" format:"uuid"`
	Name string                                                      `json:"name,required"`
	JSON v1ContractGetRateScheduleResponseDataListRateCreditTypeJSON `json:"-"`
}

func (*V1ContractGetRateScheduleResponseDataListRateCreditType) UnmarshalJSON

type V1ContractGetRateScheduleResponseDataListRateRateType

type V1ContractGetRateScheduleResponseDataListRateRateType string
const (
	V1ContractGetRateScheduleResponseDataListRateRateTypeFlat         V1ContractGetRateScheduleResponseDataListRateRateType = "FLAT"
	V1ContractGetRateScheduleResponseDataListRateRateTypePercentage   V1ContractGetRateScheduleResponseDataListRateRateType = "PERCENTAGE"
	V1ContractGetRateScheduleResponseDataListRateRateTypeSubscription V1ContractGetRateScheduleResponseDataListRateRateType = "SUBSCRIPTION"
	V1ContractGetRateScheduleResponseDataListRateRateTypeCustom       V1ContractGetRateScheduleResponseDataListRateRateType = "CUSTOM"
	V1ContractGetRateScheduleResponseDataListRateRateTypeTiered       V1ContractGetRateScheduleResponseDataListRateRateType = "TIERED"
)

func (V1ContractGetRateScheduleResponseDataListRateRateType) IsKnown

type V1ContractGetRateScheduleResponseDataListRateTier

type V1ContractGetRateScheduleResponseDataListRateTier struct {
	Price float64                                               `json:"price,required"`
	Size  float64                                               `json:"size"`
	JSON  v1ContractGetRateScheduleResponseDataListRateTierJSON `json:"-"`
}

func (*V1ContractGetRateScheduleResponseDataListRateTier) UnmarshalJSON

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

type V1ContractGetRateScheduleResponseDataOverrideRate

type V1ContractGetRateScheduleResponseDataOverrideRate struct {
	RateType   V1ContractGetRateScheduleResponseDataOverrideRateRateType   `json:"rate_type,required"`
	CreditType V1ContractGetRateScheduleResponseDataOverrideRateCreditType `json:"credit_type"`
	// Only set for CUSTOM rate_type. This field is interpreted by custom rate
	// processors.
	CustomRate map[string]interface{} `json:"custom_rate"`
	// Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
	// set to true.
	IsProrated bool `json:"is_prorated"`
	// Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
	// this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
	Price float64 `json:"price"`
	// if pricing groups are used, this will contain the values used to calculate the
	// price
	PricingGroupValues map[string]string `json:"pricing_group_values"`
	// Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
	Quantity float64 `json:"quantity"`
	// Only set for TIERED rate_type.
	Tiers []V1ContractGetRateScheduleResponseDataOverrideRateTier `json:"tiers"`
	// Only set for PERCENTAGE rate_type. Defaults to false. If true, rate is computed
	// using list prices rather than the standard rates for this product on the
	// contract.
	UseListPrices bool                                                  `json:"use_list_prices"`
	JSON          v1ContractGetRateScheduleResponseDataOverrideRateJSON `json:"-"`
}

func (*V1ContractGetRateScheduleResponseDataOverrideRate) UnmarshalJSON

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

type V1ContractGetRateScheduleResponseDataOverrideRateCreditType

type V1ContractGetRateScheduleResponseDataOverrideRateCreditType struct {
	ID   string                                                          `json:"id,required" format:"uuid"`
	Name string                                                          `json:"name,required"`
	JSON v1ContractGetRateScheduleResponseDataOverrideRateCreditTypeJSON `json:"-"`
}

func (*V1ContractGetRateScheduleResponseDataOverrideRateCreditType) UnmarshalJSON

type V1ContractGetRateScheduleResponseDataOverrideRateRateType

type V1ContractGetRateScheduleResponseDataOverrideRateRateType string
const (
	V1ContractGetRateScheduleResponseDataOverrideRateRateTypeFlat         V1ContractGetRateScheduleResponseDataOverrideRateRateType = "FLAT"
	V1ContractGetRateScheduleResponseDataOverrideRateRateTypePercentage   V1ContractGetRateScheduleResponseDataOverrideRateRateType = "PERCENTAGE"
	V1ContractGetRateScheduleResponseDataOverrideRateRateTypeSubscription V1ContractGetRateScheduleResponseDataOverrideRateRateType = "SUBSCRIPTION"
	V1ContractGetRateScheduleResponseDataOverrideRateRateTypeCustom       V1ContractGetRateScheduleResponseDataOverrideRateRateType = "CUSTOM"
	V1ContractGetRateScheduleResponseDataOverrideRateRateTypeTiered       V1ContractGetRateScheduleResponseDataOverrideRateRateType = "TIERED"
)

func (V1ContractGetRateScheduleResponseDataOverrideRateRateType) IsKnown

type V1ContractGetRateScheduleResponseDataOverrideRateTier

type V1ContractGetRateScheduleResponseDataOverrideRateTier struct {
	Price float64                                                   `json:"price,required"`
	Size  float64                                                   `json:"size"`
	JSON  v1ContractGetRateScheduleResponseDataOverrideRateTierJSON `json:"-"`
}

func (*V1ContractGetRateScheduleResponseDataOverrideRateTier) UnmarshalJSON

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

type V1ContractGetResponse

type V1ContractGetResponse struct {
	Data V1ContractGetResponseData `json:"data,required"`
	JSON v1ContractGetResponseJSON `json:"-"`
}

func (*V1ContractGetResponse) UnmarshalJSON

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

type V1ContractGetResponseData

type V1ContractGetResponseData struct {
	ID         string                               `json:"id,required" format:"uuid"`
	Amendments []V1ContractGetResponseDataAmendment `json:"amendments,required"`
	Current    V1ContractGetResponseDataCurrent     `json:"current,required"`
	CustomerID string                               `json:"customer_id,required" format:"uuid"`
	Initial    V1ContractGetResponseDataInitial     `json:"initial,required"`
	// RFC 3339 timestamp indicating when the contract was archived. If not returned,
	// the contract is not archived.
	ArchivedAt   time.Time         `json:"archived_at" format:"date-time"`
	CustomFields map[string]string `json:"custom_fields"`
	// The billing provider configuration associated with a contract.
	CustomerBillingProviderConfiguration V1ContractGetResponseDataCustomerBillingProviderConfiguration `json:"customer_billing_provider_configuration"`
	PrepaidBalanceThresholdConfiguration V1ContractGetResponseDataPrepaidBalanceThresholdConfiguration `json:"prepaid_balance_threshold_configuration"`
	// Determines which scheduled and commit charges to consolidate onto the Contract's
	// usage invoice. The charge's `timestamp` must match the usage invoice's
	// `ending_before` date for consolidation to occur. This field cannot be modified
	// after a Contract has been created. If this field is omitted, charges will appear
	// on a separate invoice from usage charges.
	ScheduledChargesOnUsageInvoices V1ContractGetResponseDataScheduledChargesOnUsageInvoices `json:"scheduled_charges_on_usage_invoices"`
	SpendThresholdConfiguration     V1ContractGetResponseDataSpendThresholdConfiguration     `json:"spend_threshold_configuration"`
	// (beta) List of subscriptions on the contract.
	Subscriptions []V1ContractGetResponseDataSubscription `json:"subscriptions"`
	// Prevents the creation of duplicates. If a request to create a record is made
	// with a previously used uniqueness key, a new record will not be created and the
	// request will fail with a 409 error.
	UniquenessKey string                        `json:"uniqueness_key"`
	JSON          v1ContractGetResponseDataJSON `json:"-"`
}

func (*V1ContractGetResponseData) UnmarshalJSON

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

type V1ContractGetResponseDataAmendment

type V1ContractGetResponseDataAmendment struct {
	ID               string                                               `json:"id,required" format:"uuid"`
	Commits          []V1ContractGetResponseDataAmendmentsCommit          `json:"commits,required"`
	CreatedAt        time.Time                                            `json:"created_at,required" format:"date-time"`
	CreatedBy        string                                               `json:"created_by,required"`
	Overrides        []V1ContractGetResponseDataAmendmentsOverride        `json:"overrides,required"`
	ScheduledCharges []V1ContractGetResponseDataAmendmentsScheduledCharge `json:"scheduled_charges,required"`
	StartingAt       time.Time                                            `json:"starting_at,required" format:"date-time"`
	Credits          []V1ContractGetResponseDataAmendmentsCredit          `json:"credits"`
	// This field's availability is dependent on your client's configuration.
	Discounts []V1ContractGetResponseDataAmendmentsDiscount `json:"discounts"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// This field's availability is dependent on your client's configuration.
	ProfessionalServices []V1ContractGetResponseDataAmendmentsProfessionalService `json:"professional_services"`
	// This field's availability is dependent on your client's configuration.
	ResellerRoyalties []V1ContractGetResponseDataAmendmentsResellerRoyalty `json:"reseller_royalties"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string                                 `json:"salesforce_opportunity_id"`
	JSON                    v1ContractGetResponseDataAmendmentJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendment) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsCommit

type V1ContractGetResponseDataAmendmentsCommit struct {
	ID      string                                            `json:"id,required" format:"uuid"`
	Product V1ContractGetResponseDataAmendmentsCommitsProduct `json:"product,required"`
	Type    V1ContractGetResponseDataAmendmentsCommitsType    `json:"type,required"`
	// The schedule that the customer will gain access to the credits purposed with
	// this commit.
	AccessSchedule V1ContractGetResponseDataAmendmentsCommitsAccessSchedule `json:"access_schedule"`
	// (DEPRECATED) Use access_schedule + invoice_schedule instead.
	Amount                float64  `json:"amount"`
	ApplicableContractIDs []string `json:"applicable_contract_ids" format:"uuid"`
	ApplicableProductIDs  []string `json:"applicable_product_ids" format:"uuid"`
	ApplicableProductTags []string `json:"applicable_product_tags"`
	// RFC 3339 timestamp indicating when the commit was archived. If not provided, the
	// commit is not archived.
	ArchivedAt time.Time `json:"archived_at" format:"date-time"`
	// The current balance of the credit or commit. This balance reflects the amount of
	// credit or commit that the customer has access to use at this moment - thus,
	// expired and upcoming credit or commit segments contribute 0 to the balance. The
	// balance will match the sum of all ledger entries with the exception of the case
	// where the sum of negative manual ledger entries exceeds the positive amount
	// remaining on the credit or commit - in that case, the balance will be 0. All
	// manual ledger entries associated with active credit or commit segments are
	// included in the balance, including future-dated manual ledger entries.
	Balance      float64                                            `json:"balance"`
	Contract     V1ContractGetResponseDataAmendmentsCommitsContract `json:"contract"`
	CustomFields map[string]string                                  `json:"custom_fields"`
	Description  string                                             `json:"description"`
	// The contract that this commit will be billed on.
	InvoiceContract V1ContractGetResponseDataAmendmentsCommitsInvoiceContract `json:"invoice_contract"`
	// The schedule that the customer will be invoiced for this commit.
	InvoiceSchedule V1ContractGetResponseDataAmendmentsCommitsInvoiceSchedule `json:"invoice_schedule"`
	// A list of ordered events that impact the balance of a commit. For example, an
	// invoice deduction or a rollover.
	Ledger []V1ContractGetResponseDataAmendmentsCommitsLedger `json:"ledger"`
	Name   string                                             `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// If multiple credits or commits are applicable, the one with the lower priority
	// will apply first.
	Priority         float64                                                  `json:"priority"`
	RateType         V1ContractGetResponseDataAmendmentsCommitsRateType       `json:"rate_type"`
	RolledOverFrom   V1ContractGetResponseDataAmendmentsCommitsRolledOverFrom `json:"rolled_over_from"`
	RolloverFraction float64                                                  `json:"rollover_fraction"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractGetResponseDataAmendmentsCommitsSpecifier `json:"specifiers"`
	// Prevents the creation of duplicates. If a request to create a commit or credit
	// is made with a uniqueness key that was previously used to create a commit or
	// credit, a new record will not be created and the request will fail with a 409
	// error.
	UniquenessKey string                                        `json:"uniqueness_key"`
	JSON          v1ContractGetResponseDataAmendmentsCommitJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsCommit) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsCommitsAccessSchedule

type V1ContractGetResponseDataAmendmentsCommitsAccessSchedule struct {
	ScheduleItems []V1ContractGetResponseDataAmendmentsCommitsAccessScheduleScheduleItem `json:"schedule_items,required"`
	CreditType    V1ContractGetResponseDataAmendmentsCommitsAccessScheduleCreditType     `json:"credit_type"`
	JSON          v1ContractGetResponseDataAmendmentsCommitsAccessScheduleJSON           `json:"-"`
}

The schedule that the customer will gain access to the credits purposed with this commit.

func (*V1ContractGetResponseDataAmendmentsCommitsAccessSchedule) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsCommitsAccessScheduleCreditType

type V1ContractGetResponseDataAmendmentsCommitsAccessScheduleCreditType struct {
	ID   string                                                                 `json:"id,required" format:"uuid"`
	Name string                                                                 `json:"name,required"`
	JSON v1ContractGetResponseDataAmendmentsCommitsAccessScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsCommitsAccessScheduleCreditType) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsCommitsAccessScheduleScheduleItem

type V1ContractGetResponseDataAmendmentsCommitsAccessScheduleScheduleItem struct {
	ID           string                                                                   `json:"id,required" format:"uuid"`
	Amount       float64                                                                  `json:"amount,required"`
	EndingBefore time.Time                                                                `json:"ending_before,required" format:"date-time"`
	StartingAt   time.Time                                                                `json:"starting_at,required" format:"date-time"`
	JSON         v1ContractGetResponseDataAmendmentsCommitsAccessScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsCommitsAccessScheduleScheduleItem) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsCommitsContract

type V1ContractGetResponseDataAmendmentsCommitsContract struct {
	ID   string                                                 `json:"id,required" format:"uuid"`
	JSON v1ContractGetResponseDataAmendmentsCommitsContractJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsCommitsContract) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsCommitsInvoiceContract

type V1ContractGetResponseDataAmendmentsCommitsInvoiceContract struct {
	ID   string                                                        `json:"id,required" format:"uuid"`
	JSON v1ContractGetResponseDataAmendmentsCommitsInvoiceContractJSON `json:"-"`
}

The contract that this commit will be billed on.

func (*V1ContractGetResponseDataAmendmentsCommitsInvoiceContract) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsCommitsInvoiceSchedule

type V1ContractGetResponseDataAmendmentsCommitsInvoiceSchedule struct {
	CreditType    V1ContractGetResponseDataAmendmentsCommitsInvoiceScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractGetResponseDataAmendmentsCommitsInvoiceScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractGetResponseDataAmendmentsCommitsInvoiceScheduleJSON           `json:"-"`
}

The schedule that the customer will be invoiced for this commit.

func (*V1ContractGetResponseDataAmendmentsCommitsInvoiceSchedule) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsCommitsInvoiceScheduleCreditType

type V1ContractGetResponseDataAmendmentsCommitsInvoiceScheduleCreditType struct {
	ID   string                                                                  `json:"id,required" format:"uuid"`
	Name string                                                                  `json:"name,required"`
	JSON v1ContractGetResponseDataAmendmentsCommitsInvoiceScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsCommitsInvoiceScheduleCreditType) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsCommitsInvoiceScheduleScheduleItem

type V1ContractGetResponseDataAmendmentsCommitsInvoiceScheduleScheduleItem struct {
	ID        string                                                                    `json:"id,required" format:"uuid"`
	Amount    float64                                                                   `json:"amount,required"`
	InvoiceID string                                                                    `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                                   `json:"quantity,required"`
	Timestamp time.Time                                                                 `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                                   `json:"unit_price,required"`
	JSON      v1ContractGetResponseDataAmendmentsCommitsInvoiceScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsCommitsInvoiceScheduleScheduleItem) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsCommitsLedger

type V1ContractGetResponseDataAmendmentsCommitsLedger struct {
	Amount        float64                                              `json:"amount,required"`
	Timestamp     time.Time                                            `json:"timestamp,required" format:"date-time"`
	Type          V1ContractGetResponseDataAmendmentsCommitsLedgerType `json:"type,required"`
	InvoiceID     string                                               `json:"invoice_id" format:"uuid"`
	NewContractID string                                               `json:"new_contract_id" format:"uuid"`
	Reason        string                                               `json:"reason"`
	SegmentID     string                                               `json:"segment_id" format:"uuid"`
	JSON          v1ContractGetResponseDataAmendmentsCommitsLedgerJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*V1ContractGetResponseDataAmendmentsCommitsLedger) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsCommitsLedgerObject

type V1ContractGetResponseDataAmendmentsCommitsLedgerObject struct {
	Amount    float64                                                    `json:"amount,required"`
	SegmentID string                                                     `json:"segment_id,required" format:"uuid"`
	Timestamp time.Time                                                  `json:"timestamp,required" format:"date-time"`
	Type      V1ContractGetResponseDataAmendmentsCommitsLedgerObjectType `json:"type,required"`
	JSON      v1ContractGetResponseDataAmendmentsCommitsLedgerObjectJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsCommitsLedgerObject) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsCommitsLedgerObjectType

type V1ContractGetResponseDataAmendmentsCommitsLedgerObjectType string
const (
	V1ContractGetResponseDataAmendmentsCommitsLedgerObjectTypePrepaidCommitSegmentStart V1ContractGetResponseDataAmendmentsCommitsLedgerObjectType = "PREPAID_COMMIT_SEGMENT_START"
)

func (V1ContractGetResponseDataAmendmentsCommitsLedgerObjectType) IsKnown

type V1ContractGetResponseDataAmendmentsCommitsLedgerType

type V1ContractGetResponseDataAmendmentsCommitsLedgerType string
const (
	V1ContractGetResponseDataAmendmentsCommitsLedgerTypePrepaidCommitSegmentStart               V1ContractGetResponseDataAmendmentsCommitsLedgerType = "PREPAID_COMMIT_SEGMENT_START"
	V1ContractGetResponseDataAmendmentsCommitsLedgerTypePrepaidCommitAutomatedInvoiceDeduction  V1ContractGetResponseDataAmendmentsCommitsLedgerType = "PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractGetResponseDataAmendmentsCommitsLedgerTypePrepaidCommitRollover                   V1ContractGetResponseDataAmendmentsCommitsLedgerType = "PREPAID_COMMIT_ROLLOVER"
	V1ContractGetResponseDataAmendmentsCommitsLedgerTypePrepaidCommitExpiration                 V1ContractGetResponseDataAmendmentsCommitsLedgerType = "PREPAID_COMMIT_EXPIRATION"
	V1ContractGetResponseDataAmendmentsCommitsLedgerTypePrepaidCommitCanceled                   V1ContractGetResponseDataAmendmentsCommitsLedgerType = "PREPAID_COMMIT_CANCELED"
	V1ContractGetResponseDataAmendmentsCommitsLedgerTypePrepaidCommitCredited                   V1ContractGetResponseDataAmendmentsCommitsLedgerType = "PREPAID_COMMIT_CREDITED"
	V1ContractGetResponseDataAmendmentsCommitsLedgerTypePostpaidCommitInitialBalance            V1ContractGetResponseDataAmendmentsCommitsLedgerType = "POSTPAID_COMMIT_INITIAL_BALANCE"
	V1ContractGetResponseDataAmendmentsCommitsLedgerTypePostpaidCommitAutomatedInvoiceDeduction V1ContractGetResponseDataAmendmentsCommitsLedgerType = "POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractGetResponseDataAmendmentsCommitsLedgerTypePostpaidCommitRollover                  V1ContractGetResponseDataAmendmentsCommitsLedgerType = "POSTPAID_COMMIT_ROLLOVER"
	V1ContractGetResponseDataAmendmentsCommitsLedgerTypePostpaidCommitTrueup                    V1ContractGetResponseDataAmendmentsCommitsLedgerType = "POSTPAID_COMMIT_TRUEUP"
	V1ContractGetResponseDataAmendmentsCommitsLedgerTypePrepaidCommitManual                     V1ContractGetResponseDataAmendmentsCommitsLedgerType = "PREPAID_COMMIT_MANUAL"
	V1ContractGetResponseDataAmendmentsCommitsLedgerTypePostpaidCommitManual                    V1ContractGetResponseDataAmendmentsCommitsLedgerType = "POSTPAID_COMMIT_MANUAL"
	V1ContractGetResponseDataAmendmentsCommitsLedgerTypePostpaidCommitExpiration                V1ContractGetResponseDataAmendmentsCommitsLedgerType = "POSTPAID_COMMIT_EXPIRATION"
)

func (V1ContractGetResponseDataAmendmentsCommitsLedgerType) IsKnown

type V1ContractGetResponseDataAmendmentsCommitsProduct

type V1ContractGetResponseDataAmendmentsCommitsProduct struct {
	ID   string                                                `json:"id,required" format:"uuid"`
	Name string                                                `json:"name,required"`
	JSON v1ContractGetResponseDataAmendmentsCommitsProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsCommitsProduct) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsCommitsRateType

type V1ContractGetResponseDataAmendmentsCommitsRateType string
const (
	V1ContractGetResponseDataAmendmentsCommitsRateTypeCommitRate V1ContractGetResponseDataAmendmentsCommitsRateType = "COMMIT_RATE"
	V1ContractGetResponseDataAmendmentsCommitsRateTypeListRate   V1ContractGetResponseDataAmendmentsCommitsRateType = "LIST_RATE"
)

func (V1ContractGetResponseDataAmendmentsCommitsRateType) IsKnown

type V1ContractGetResponseDataAmendmentsCommitsRolledOverFrom

type V1ContractGetResponseDataAmendmentsCommitsRolledOverFrom struct {
	CommitID   string                                                       `json:"commit_id,required" format:"uuid"`
	ContractID string                                                       `json:"contract_id,required" format:"uuid"`
	JSON       v1ContractGetResponseDataAmendmentsCommitsRolledOverFromJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsCommitsRolledOverFrom) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsCommitsSpecifier

type V1ContractGetResponseDataAmendmentsCommitsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                                `json:"product_tags"`
	JSON        v1ContractGetResponseDataAmendmentsCommitsSpecifierJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsCommitsSpecifier) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsCommitsType

type V1ContractGetResponseDataAmendmentsCommitsType string
const (
	V1ContractGetResponseDataAmendmentsCommitsTypePrepaid  V1ContractGetResponseDataAmendmentsCommitsType = "PREPAID"
	V1ContractGetResponseDataAmendmentsCommitsTypePostpaid V1ContractGetResponseDataAmendmentsCommitsType = "POSTPAID"
)

func (V1ContractGetResponseDataAmendmentsCommitsType) IsKnown

type V1ContractGetResponseDataAmendmentsCredit

type V1ContractGetResponseDataAmendmentsCredit struct {
	ID      string                                            `json:"id,required" format:"uuid"`
	Product V1ContractGetResponseDataAmendmentsCreditsProduct `json:"product,required"`
	Type    V1ContractGetResponseDataAmendmentsCreditsType    `json:"type,required"`
	// The schedule that the customer will gain access to the credits.
	AccessSchedule        V1ContractGetResponseDataAmendmentsCreditsAccessSchedule `json:"access_schedule"`
	ApplicableContractIDs []string                                                 `json:"applicable_contract_ids" format:"uuid"`
	ApplicableProductIDs  []string                                                 `json:"applicable_product_ids" format:"uuid"`
	ApplicableProductTags []string                                                 `json:"applicable_product_tags"`
	// The current balance of the credit or commit. This balance reflects the amount of
	// credit or commit that the customer has access to use at this moment - thus,
	// expired and upcoming credit or commit segments contribute 0 to the balance. The
	// balance will match the sum of all ledger entries with the exception of the case
	// where the sum of negative manual ledger entries exceeds the positive amount
	// remaining on the credit or commit - in that case, the balance will be 0. All
	// manual ledger entries associated with active credit or commit segments are
	// included in the balance, including future-dated manual ledger entries.
	Balance      float64                                            `json:"balance"`
	Contract     V1ContractGetResponseDataAmendmentsCreditsContract `json:"contract"`
	CustomFields map[string]string                                  `json:"custom_fields"`
	Description  string                                             `json:"description"`
	// A list of ordered events that impact the balance of a credit. For example, an
	// invoice deduction or an expiration.
	Ledger []V1ContractGetResponseDataAmendmentsCreditsLedger `json:"ledger"`
	Name   string                                             `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// If multiple credits or commits are applicable, the one with the lower priority
	// will apply first.
	Priority float64                                            `json:"priority"`
	RateType V1ContractGetResponseDataAmendmentsCreditsRateType `json:"rate_type"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractGetResponseDataAmendmentsCreditsSpecifier `json:"specifiers"`
	// Prevents the creation of duplicates. If a request to create a commit or credit
	// is made with a uniqueness key that was previously used to create a commit or
	// credit, a new record will not be created and the request will fail with a 409
	// error.
	UniquenessKey string                                        `json:"uniqueness_key"`
	JSON          v1ContractGetResponseDataAmendmentsCreditJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsCredit) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsCreditsAccessSchedule

type V1ContractGetResponseDataAmendmentsCreditsAccessSchedule struct {
	ScheduleItems []V1ContractGetResponseDataAmendmentsCreditsAccessScheduleScheduleItem `json:"schedule_items,required"`
	CreditType    V1ContractGetResponseDataAmendmentsCreditsAccessScheduleCreditType     `json:"credit_type"`
	JSON          v1ContractGetResponseDataAmendmentsCreditsAccessScheduleJSON           `json:"-"`
}

The schedule that the customer will gain access to the credits.

func (*V1ContractGetResponseDataAmendmentsCreditsAccessSchedule) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsCreditsAccessScheduleCreditType

type V1ContractGetResponseDataAmendmentsCreditsAccessScheduleCreditType struct {
	ID   string                                                                 `json:"id,required" format:"uuid"`
	Name string                                                                 `json:"name,required"`
	JSON v1ContractGetResponseDataAmendmentsCreditsAccessScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsCreditsAccessScheduleCreditType) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsCreditsAccessScheduleScheduleItem

type V1ContractGetResponseDataAmendmentsCreditsAccessScheduleScheduleItem struct {
	ID           string                                                                   `json:"id,required" format:"uuid"`
	Amount       float64                                                                  `json:"amount,required"`
	EndingBefore time.Time                                                                `json:"ending_before,required" format:"date-time"`
	StartingAt   time.Time                                                                `json:"starting_at,required" format:"date-time"`
	JSON         v1ContractGetResponseDataAmendmentsCreditsAccessScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsCreditsAccessScheduleScheduleItem) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsCreditsContract

type V1ContractGetResponseDataAmendmentsCreditsContract struct {
	ID   string                                                 `json:"id,required" format:"uuid"`
	JSON v1ContractGetResponseDataAmendmentsCreditsContractJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsCreditsContract) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsCreditsLedger

type V1ContractGetResponseDataAmendmentsCreditsLedger struct {
	Amount    float64                                              `json:"amount,required"`
	Timestamp time.Time                                            `json:"timestamp,required" format:"date-time"`
	Type      V1ContractGetResponseDataAmendmentsCreditsLedgerType `json:"type,required"`
	InvoiceID string                                               `json:"invoice_id" format:"uuid"`
	Reason    string                                               `json:"reason"`
	SegmentID string                                               `json:"segment_id" format:"uuid"`
	JSON      v1ContractGetResponseDataAmendmentsCreditsLedgerJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*V1ContractGetResponseDataAmendmentsCreditsLedger) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsCreditsLedgerObject

type V1ContractGetResponseDataAmendmentsCreditsLedgerObject struct {
	Amount    float64                                                    `json:"amount,required"`
	SegmentID string                                                     `json:"segment_id,required" format:"uuid"`
	Timestamp time.Time                                                  `json:"timestamp,required" format:"date-time"`
	Type      V1ContractGetResponseDataAmendmentsCreditsLedgerObjectType `json:"type,required"`
	JSON      v1ContractGetResponseDataAmendmentsCreditsLedgerObjectJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsCreditsLedgerObject) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsCreditsLedgerObjectType

type V1ContractGetResponseDataAmendmentsCreditsLedgerObjectType string
const (
	V1ContractGetResponseDataAmendmentsCreditsLedgerObjectTypeCreditSegmentStart V1ContractGetResponseDataAmendmentsCreditsLedgerObjectType = "CREDIT_SEGMENT_START"
)

func (V1ContractGetResponseDataAmendmentsCreditsLedgerObjectType) IsKnown

type V1ContractGetResponseDataAmendmentsCreditsLedgerType

type V1ContractGetResponseDataAmendmentsCreditsLedgerType string
const (
	V1ContractGetResponseDataAmendmentsCreditsLedgerTypeCreditSegmentStart              V1ContractGetResponseDataAmendmentsCreditsLedgerType = "CREDIT_SEGMENT_START"
	V1ContractGetResponseDataAmendmentsCreditsLedgerTypeCreditAutomatedInvoiceDeduction V1ContractGetResponseDataAmendmentsCreditsLedgerType = "CREDIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractGetResponseDataAmendmentsCreditsLedgerTypeCreditExpiration                V1ContractGetResponseDataAmendmentsCreditsLedgerType = "CREDIT_EXPIRATION"
	V1ContractGetResponseDataAmendmentsCreditsLedgerTypeCreditCanceled                  V1ContractGetResponseDataAmendmentsCreditsLedgerType = "CREDIT_CANCELED"
	V1ContractGetResponseDataAmendmentsCreditsLedgerTypeCreditCredited                  V1ContractGetResponseDataAmendmentsCreditsLedgerType = "CREDIT_CREDITED"
	V1ContractGetResponseDataAmendmentsCreditsLedgerTypeCreditManual                    V1ContractGetResponseDataAmendmentsCreditsLedgerType = "CREDIT_MANUAL"
)

func (V1ContractGetResponseDataAmendmentsCreditsLedgerType) IsKnown

type V1ContractGetResponseDataAmendmentsCreditsProduct

type V1ContractGetResponseDataAmendmentsCreditsProduct struct {
	ID   string                                                `json:"id,required" format:"uuid"`
	Name string                                                `json:"name,required"`
	JSON v1ContractGetResponseDataAmendmentsCreditsProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsCreditsProduct) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsCreditsRateType

type V1ContractGetResponseDataAmendmentsCreditsRateType string
const (
	V1ContractGetResponseDataAmendmentsCreditsRateTypeCommitRate V1ContractGetResponseDataAmendmentsCreditsRateType = "COMMIT_RATE"
	V1ContractGetResponseDataAmendmentsCreditsRateTypeListRate   V1ContractGetResponseDataAmendmentsCreditsRateType = "LIST_RATE"
)

func (V1ContractGetResponseDataAmendmentsCreditsRateType) IsKnown

type V1ContractGetResponseDataAmendmentsCreditsSpecifier

type V1ContractGetResponseDataAmendmentsCreditsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                                `json:"product_tags"`
	JSON        v1ContractGetResponseDataAmendmentsCreditsSpecifierJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsCreditsSpecifier) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsCreditsType

type V1ContractGetResponseDataAmendmentsCreditsType string
const (
	V1ContractGetResponseDataAmendmentsCreditsTypeCredit V1ContractGetResponseDataAmendmentsCreditsType = "CREDIT"
)

func (V1ContractGetResponseDataAmendmentsCreditsType) IsKnown

type V1ContractGetResponseDataAmendmentsDiscount

type V1ContractGetResponseDataAmendmentsDiscount struct {
	ID           string                                               `json:"id,required" format:"uuid"`
	Product      V1ContractGetResponseDataAmendmentsDiscountsProduct  `json:"product,required"`
	Schedule     V1ContractGetResponseDataAmendmentsDiscountsSchedule `json:"schedule,required"`
	CustomFields map[string]string                                    `json:"custom_fields"`
	Name         string                                               `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string                                          `json:"netsuite_sales_order_id"`
	JSON                 v1ContractGetResponseDataAmendmentsDiscountJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsDiscount) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsDiscountsProduct

type V1ContractGetResponseDataAmendmentsDiscountsProduct struct {
	ID   string                                                  `json:"id,required" format:"uuid"`
	Name string                                                  `json:"name,required"`
	JSON v1ContractGetResponseDataAmendmentsDiscountsProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsDiscountsProduct) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsDiscountsSchedule

type V1ContractGetResponseDataAmendmentsDiscountsSchedule struct {
	CreditType    V1ContractGetResponseDataAmendmentsDiscountsScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractGetResponseDataAmendmentsDiscountsScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractGetResponseDataAmendmentsDiscountsScheduleJSON           `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsDiscountsSchedule) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsDiscountsScheduleCreditType

type V1ContractGetResponseDataAmendmentsDiscountsScheduleCreditType struct {
	ID   string                                                             `json:"id,required" format:"uuid"`
	Name string                                                             `json:"name,required"`
	JSON v1ContractGetResponseDataAmendmentsDiscountsScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsDiscountsScheduleCreditType) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsDiscountsScheduleScheduleItem

type V1ContractGetResponseDataAmendmentsDiscountsScheduleScheduleItem struct {
	ID        string                                                               `json:"id,required" format:"uuid"`
	Amount    float64                                                              `json:"amount,required"`
	InvoiceID string                                                               `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                              `json:"quantity,required"`
	Timestamp time.Time                                                            `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                              `json:"unit_price,required"`
	JSON      v1ContractGetResponseDataAmendmentsDiscountsScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsDiscountsScheduleScheduleItem) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsOverride

type V1ContractGetResponseDataAmendmentsOverride struct {
	ID                    string                                                 `json:"id,required" format:"uuid"`
	StartingAt            time.Time                                              `json:"starting_at,required" format:"date-time"`
	ApplicableProductTags []string                                               `json:"applicable_product_tags"`
	CreditType            V1ContractGetResponseDataAmendmentsOverridesCreditType `json:"credit_type"`
	EndingBefore          time.Time                                              `json:"ending_before" format:"date-time"`
	Entitled              bool                                                   `json:"entitled"`
	IsCommitSpecific      bool                                                   `json:"is_commit_specific"`
	// Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
	// set to true.
	IsProrated         bool                                                            `json:"is_prorated"`
	Multiplier         float64                                                         `json:"multiplier"`
	OverrideSpecifiers []V1ContractGetResponseDataAmendmentsOverridesOverrideSpecifier `json:"override_specifiers"`
	OverrideTiers      []V1ContractGetResponseDataAmendmentsOverridesOverrideTier      `json:"override_tiers"`
	OverwriteRate      V1ContractGetResponseDataAmendmentsOverridesOverwriteRate       `json:"overwrite_rate"`
	// Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
	// this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
	Price    float64                                             `json:"price"`
	Priority float64                                             `json:"priority"`
	Product  V1ContractGetResponseDataAmendmentsOverridesProduct `json:"product"`
	// Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
	Quantity float64                                              `json:"quantity"`
	RateType V1ContractGetResponseDataAmendmentsOverridesRateType `json:"rate_type"`
	Target   V1ContractGetResponseDataAmendmentsOverridesTarget   `json:"target"`
	// Only set for TIERED rate_type.
	Tiers []V1ContractGetResponseDataAmendmentsOverridesTier `json:"tiers"`
	Type  V1ContractGetResponseDataAmendmentsOverridesType   `json:"type"`
	// Only set for CUSTOM rate_type. This field is interpreted by custom rate
	// processors.
	Value map[string]interface{}                          `json:"value"`
	JSON  v1ContractGetResponseDataAmendmentsOverrideJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsOverride) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsOverridesCreditType

type V1ContractGetResponseDataAmendmentsOverridesCreditType struct {
	ID   string                                                     `json:"id,required" format:"uuid"`
	Name string                                                     `json:"name,required"`
	JSON v1ContractGetResponseDataAmendmentsOverridesCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsOverridesCreditType) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsOverridesOverrideSpecifier

type V1ContractGetResponseDataAmendmentsOverridesOverrideSpecifier struct {
	BillingFrequency        V1ContractGetResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequency `json:"billing_frequency"`
	CommitIDs               []string                                                                       `json:"commit_ids"`
	PresentationGroupValues map[string]string                                                              `json:"presentation_group_values"`
	PricingGroupValues      map[string]string                                                              `json:"pricing_group_values"`
	ProductID               string                                                                         `json:"product_id" format:"uuid"`
	ProductTags             []string                                                                       `json:"product_tags"`
	RecurringCommitIDs      []string                                                                       `json:"recurring_commit_ids"`
	RecurringCreditIDs      []string                                                                       `json:"recurring_credit_ids"`
	JSON                    v1ContractGetResponseDataAmendmentsOverridesOverrideSpecifierJSON              `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsOverridesOverrideSpecifier) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequency

type V1ContractGetResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequency string
const (
	V1ContractGetResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequencyMonthly   V1ContractGetResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequency = "MONTHLY"
	V1ContractGetResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequencyQuarterly V1ContractGetResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequency = "QUARTERLY"
	V1ContractGetResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequencyAnnual    V1ContractGetResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequency = "ANNUAL"
	V1ContractGetResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequencyWeekly    V1ContractGetResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequency = "WEEKLY"
)

func (V1ContractGetResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequency) IsKnown

type V1ContractGetResponseDataAmendmentsOverridesOverrideTier

type V1ContractGetResponseDataAmendmentsOverridesOverrideTier struct {
	Multiplier float64                                                      `json:"multiplier,required"`
	Size       float64                                                      `json:"size"`
	JSON       v1ContractGetResponseDataAmendmentsOverridesOverrideTierJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsOverridesOverrideTier) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsOverridesOverwriteRate

type V1ContractGetResponseDataAmendmentsOverridesOverwriteRate struct {
	RateType   V1ContractGetResponseDataAmendmentsOverridesOverwriteRateRateType   `json:"rate_type,required"`
	CreditType V1ContractGetResponseDataAmendmentsOverridesOverwriteRateCreditType `json:"credit_type"`
	// Only set for CUSTOM rate_type. This field is interpreted by custom rate
	// processors.
	CustomRate map[string]interface{} `json:"custom_rate"`
	// Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
	// set to true.
	IsProrated bool `json:"is_prorated"`
	// Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
	// this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
	Price float64 `json:"price"`
	// Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
	Quantity float64 `json:"quantity"`
	// Only set for TIERED rate_type.
	Tiers []V1ContractGetResponseDataAmendmentsOverridesOverwriteRateTier `json:"tiers"`
	JSON  v1ContractGetResponseDataAmendmentsOverridesOverwriteRateJSON   `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsOverridesOverwriteRate) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsOverridesOverwriteRateCreditType

type V1ContractGetResponseDataAmendmentsOverridesOverwriteRateCreditType struct {
	ID   string                                                                  `json:"id,required" format:"uuid"`
	Name string                                                                  `json:"name,required"`
	JSON v1ContractGetResponseDataAmendmentsOverridesOverwriteRateCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsOverridesOverwriteRateCreditType) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsOverridesOverwriteRateRateType

type V1ContractGetResponseDataAmendmentsOverridesOverwriteRateRateType string
const (
	V1ContractGetResponseDataAmendmentsOverridesOverwriteRateRateTypeFlat         V1ContractGetResponseDataAmendmentsOverridesOverwriteRateRateType = "FLAT"
	V1ContractGetResponseDataAmendmentsOverridesOverwriteRateRateTypePercentage   V1ContractGetResponseDataAmendmentsOverridesOverwriteRateRateType = "PERCENTAGE"
	V1ContractGetResponseDataAmendmentsOverridesOverwriteRateRateTypeSubscription V1ContractGetResponseDataAmendmentsOverridesOverwriteRateRateType = "SUBSCRIPTION"
	V1ContractGetResponseDataAmendmentsOverridesOverwriteRateRateTypeTiered       V1ContractGetResponseDataAmendmentsOverridesOverwriteRateRateType = "TIERED"
	V1ContractGetResponseDataAmendmentsOverridesOverwriteRateRateTypeCustom       V1ContractGetResponseDataAmendmentsOverridesOverwriteRateRateType = "CUSTOM"
)

func (V1ContractGetResponseDataAmendmentsOverridesOverwriteRateRateType) IsKnown

type V1ContractGetResponseDataAmendmentsOverridesOverwriteRateTier

type V1ContractGetResponseDataAmendmentsOverridesOverwriteRateTier struct {
	Price float64                                                           `json:"price,required"`
	Size  float64                                                           `json:"size"`
	JSON  v1ContractGetResponseDataAmendmentsOverridesOverwriteRateTierJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsOverridesOverwriteRateTier) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsOverridesProduct

type V1ContractGetResponseDataAmendmentsOverridesProduct struct {
	ID   string                                                  `json:"id,required" format:"uuid"`
	Name string                                                  `json:"name,required"`
	JSON v1ContractGetResponseDataAmendmentsOverridesProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsOverridesProduct) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsOverridesRateType

type V1ContractGetResponseDataAmendmentsOverridesRateType string
const (
	V1ContractGetResponseDataAmendmentsOverridesRateTypeFlat         V1ContractGetResponseDataAmendmentsOverridesRateType = "FLAT"
	V1ContractGetResponseDataAmendmentsOverridesRateTypePercentage   V1ContractGetResponseDataAmendmentsOverridesRateType = "PERCENTAGE"
	V1ContractGetResponseDataAmendmentsOverridesRateTypeSubscription V1ContractGetResponseDataAmendmentsOverridesRateType = "SUBSCRIPTION"
	V1ContractGetResponseDataAmendmentsOverridesRateTypeTiered       V1ContractGetResponseDataAmendmentsOverridesRateType = "TIERED"
	V1ContractGetResponseDataAmendmentsOverridesRateTypeCustom       V1ContractGetResponseDataAmendmentsOverridesRateType = "CUSTOM"
)

func (V1ContractGetResponseDataAmendmentsOverridesRateType) IsKnown

type V1ContractGetResponseDataAmendmentsOverridesTarget

type V1ContractGetResponseDataAmendmentsOverridesTarget string
const (
	V1ContractGetResponseDataAmendmentsOverridesTargetCommitRate V1ContractGetResponseDataAmendmentsOverridesTarget = "COMMIT_RATE"
	V1ContractGetResponseDataAmendmentsOverridesTargetListRate   V1ContractGetResponseDataAmendmentsOverridesTarget = "LIST_RATE"
)

func (V1ContractGetResponseDataAmendmentsOverridesTarget) IsKnown

type V1ContractGetResponseDataAmendmentsOverridesTier

type V1ContractGetResponseDataAmendmentsOverridesTier struct {
	Price float64                                              `json:"price,required"`
	Size  float64                                              `json:"size"`
	JSON  v1ContractGetResponseDataAmendmentsOverridesTierJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsOverridesTier) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsOverridesType

type V1ContractGetResponseDataAmendmentsOverridesType string
const (
	V1ContractGetResponseDataAmendmentsOverridesTypeOverwrite  V1ContractGetResponseDataAmendmentsOverridesType = "OVERWRITE"
	V1ContractGetResponseDataAmendmentsOverridesTypeMultiplier V1ContractGetResponseDataAmendmentsOverridesType = "MULTIPLIER"
	V1ContractGetResponseDataAmendmentsOverridesTypeTiered     V1ContractGetResponseDataAmendmentsOverridesType = "TIERED"
)

func (V1ContractGetResponseDataAmendmentsOverridesType) IsKnown

type V1ContractGetResponseDataAmendmentsProfessionalService

type V1ContractGetResponseDataAmendmentsProfessionalService struct {
	ID string `json:"id,required" format:"uuid"`
	// Maximum amount for the term.
	MaxAmount float64 `json:"max_amount,required"`
	ProductID string  `json:"product_id,required" format:"uuid"`
	// Quantity for the charge. Will be multiplied by unit_price to determine the
	// amount.
	Quantity float64 `json:"quantity,required"`
	// Unit price for the charge. Will be multiplied by quantity to determine the
	// amount and must be specified.
	UnitPrice    float64           `json:"unit_price,required"`
	CustomFields map[string]string `json:"custom_fields"`
	Description  string            `json:"description"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string                                                     `json:"netsuite_sales_order_id"`
	JSON                 v1ContractGetResponseDataAmendmentsProfessionalServiceJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsProfessionalService) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsResellerRoyaltiesResellerType

type V1ContractGetResponseDataAmendmentsResellerRoyaltiesResellerType string
const (
	V1ContractGetResponseDataAmendmentsResellerRoyaltiesResellerTypeAws           V1ContractGetResponseDataAmendmentsResellerRoyaltiesResellerType = "AWS"
	V1ContractGetResponseDataAmendmentsResellerRoyaltiesResellerTypeAwsProService V1ContractGetResponseDataAmendmentsResellerRoyaltiesResellerType = "AWS_PRO_SERVICE"
	V1ContractGetResponseDataAmendmentsResellerRoyaltiesResellerTypeGcp           V1ContractGetResponseDataAmendmentsResellerRoyaltiesResellerType = "GCP"
	V1ContractGetResponseDataAmendmentsResellerRoyaltiesResellerTypeGcpProService V1ContractGetResponseDataAmendmentsResellerRoyaltiesResellerType = "GCP_PRO_SERVICE"
)

func (V1ContractGetResponseDataAmendmentsResellerRoyaltiesResellerType) IsKnown

type V1ContractGetResponseDataAmendmentsResellerRoyalty

type V1ContractGetResponseDataAmendmentsResellerRoyalty struct {
	ResellerType          V1ContractGetResponseDataAmendmentsResellerRoyaltiesResellerType `json:"reseller_type,required"`
	AwsAccountNumber      string                                                           `json:"aws_account_number"`
	AwsOfferID            string                                                           `json:"aws_offer_id"`
	AwsPayerReferenceID   string                                                           `json:"aws_payer_reference_id"`
	EndingBefore          time.Time                                                        `json:"ending_before,nullable" format:"date-time"`
	Fraction              float64                                                          `json:"fraction"`
	GcpAccountID          string                                                           `json:"gcp_account_id"`
	GcpOfferID            string                                                           `json:"gcp_offer_id"`
	NetsuiteResellerID    string                                                           `json:"netsuite_reseller_id"`
	ResellerContractValue float64                                                          `json:"reseller_contract_value"`
	StartingAt            time.Time                                                        `json:"starting_at" format:"date-time"`
	JSON                  v1ContractGetResponseDataAmendmentsResellerRoyaltyJSON           `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsResellerRoyalty) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsScheduledCharge

type V1ContractGetResponseDataAmendmentsScheduledCharge struct {
	ID           string                                                      `json:"id,required" format:"uuid"`
	Product      V1ContractGetResponseDataAmendmentsScheduledChargesProduct  `json:"product,required"`
	Schedule     V1ContractGetResponseDataAmendmentsScheduledChargesSchedule `json:"schedule,required"`
	ArchivedAt   time.Time                                                   `json:"archived_at" format:"date-time"`
	CustomFields map[string]string                                           `json:"custom_fields"`
	// displayed on invoices
	Name string `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string                                                 `json:"netsuite_sales_order_id"`
	JSON                 v1ContractGetResponseDataAmendmentsScheduledChargeJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsScheduledCharge) UnmarshalJSON

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

type V1ContractGetResponseDataAmendmentsScheduledChargesProduct

type V1ContractGetResponseDataAmendmentsScheduledChargesProduct struct {
	ID   string                                                         `json:"id,required" format:"uuid"`
	Name string                                                         `json:"name,required"`
	JSON v1ContractGetResponseDataAmendmentsScheduledChargesProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsScheduledChargesProduct) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsScheduledChargesSchedule

type V1ContractGetResponseDataAmendmentsScheduledChargesSchedule struct {
	CreditType    V1ContractGetResponseDataAmendmentsScheduledChargesScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractGetResponseDataAmendmentsScheduledChargesScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractGetResponseDataAmendmentsScheduledChargesScheduleJSON           `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsScheduledChargesSchedule) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsScheduledChargesScheduleCreditType

type V1ContractGetResponseDataAmendmentsScheduledChargesScheduleCreditType struct {
	ID   string                                                                    `json:"id,required" format:"uuid"`
	Name string                                                                    `json:"name,required"`
	JSON v1ContractGetResponseDataAmendmentsScheduledChargesScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsScheduledChargesScheduleCreditType) UnmarshalJSON

type V1ContractGetResponseDataAmendmentsScheduledChargesScheduleScheduleItem

type V1ContractGetResponseDataAmendmentsScheduledChargesScheduleScheduleItem struct {
	ID        string                                                                      `json:"id,required" format:"uuid"`
	Amount    float64                                                                     `json:"amount,required"`
	InvoiceID string                                                                      `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                                     `json:"quantity,required"`
	Timestamp time.Time                                                                   `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                                     `json:"unit_price,required"`
	JSON      v1ContractGetResponseDataAmendmentsScheduledChargesScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractGetResponseDataAmendmentsScheduledChargesScheduleScheduleItem) UnmarshalJSON

type V1ContractGetResponseDataCurrent

type V1ContractGetResponseDataCurrent struct {
	Commits                []V1ContractGetResponseDataCurrentCommit               `json:"commits,required"`
	CreatedAt              time.Time                                              `json:"created_at,required" format:"date-time"`
	CreatedBy              string                                                 `json:"created_by,required"`
	Overrides              []V1ContractGetResponseDataCurrentOverride             `json:"overrides,required"`
	ScheduledCharges       []V1ContractGetResponseDataCurrentScheduledCharge      `json:"scheduled_charges,required"`
	StartingAt             time.Time                                              `json:"starting_at,required" format:"date-time"`
	Transitions            []V1ContractGetResponseDataCurrentTransition           `json:"transitions,required"`
	UsageStatementSchedule V1ContractGetResponseDataCurrentUsageStatementSchedule `json:"usage_statement_schedule,required"`
	Credits                []V1ContractGetResponseDataCurrentCredit               `json:"credits"`
	// This field's availability is dependent on your client's configuration.
	Discounts           []V1ContractGetResponseDataCurrentDiscount `json:"discounts"`
	EndingBefore        time.Time                                  `json:"ending_before" format:"date-time"`
	Name                string                                     `json:"name"`
	NetPaymentTermsDays float64                                    `json:"net_payment_terms_days"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID                 string                                                               `json:"netsuite_sales_order_id"`
	PrepaidBalanceThresholdConfiguration V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfiguration `json:"prepaid_balance_threshold_configuration"`
	// This field's availability is dependent on your client's configuration.
	ProfessionalServices []V1ContractGetResponseDataCurrentProfessionalService `json:"professional_services"`
	RateCardID           string                                                `json:"rate_card_id" format:"uuid"`
	RecurringCommits     []V1ContractGetResponseDataCurrentRecurringCommit     `json:"recurring_commits"`
	RecurringCredits     []V1ContractGetResponseDataCurrentRecurringCredit     `json:"recurring_credits"`
	// This field's availability is dependent on your client's configuration.
	ResellerRoyalties []V1ContractGetResponseDataCurrentResellerRoyalty `json:"reseller_royalties"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// Determines which scheduled and commit charges to consolidate onto the Contract's
	// usage invoice. The charge's `timestamp` must match the usage invoice's
	// `ending_before` date for consolidation to occur. This field cannot be modified
	// after a Contract has been created. If this field is omitted, charges will appear
	// on a separate invoice from usage charges.
	ScheduledChargesOnUsageInvoices V1ContractGetResponseDataCurrentScheduledChargesOnUsageInvoices `json:"scheduled_charges_on_usage_invoices"`
	SpendThresholdConfiguration     V1ContractGetResponseDataCurrentSpendThresholdConfiguration     `json:"spend_threshold_configuration"`
	// This field's availability is dependent on your client's configuration.
	TotalContractValue float64                                     `json:"total_contract_value"`
	UsageFilter        V1ContractGetResponseDataCurrentUsageFilter `json:"usage_filter"`
	JSON               v1ContractGetResponseDataCurrentJSON        `json:"-"`
}

func (*V1ContractGetResponseDataCurrent) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentCommit

type V1ContractGetResponseDataCurrentCommit struct {
	ID      string                                         `json:"id,required" format:"uuid"`
	Product V1ContractGetResponseDataCurrentCommitsProduct `json:"product,required"`
	Type    V1ContractGetResponseDataCurrentCommitsType    `json:"type,required"`
	// The schedule that the customer will gain access to the credits purposed with
	// this commit.
	AccessSchedule V1ContractGetResponseDataCurrentCommitsAccessSchedule `json:"access_schedule"`
	// (DEPRECATED) Use access_schedule + invoice_schedule instead.
	Amount                float64  `json:"amount"`
	ApplicableContractIDs []string `json:"applicable_contract_ids" format:"uuid"`
	ApplicableProductIDs  []string `json:"applicable_product_ids" format:"uuid"`
	ApplicableProductTags []string `json:"applicable_product_tags"`
	// RFC 3339 timestamp indicating when the commit was archived. If not provided, the
	// commit is not archived.
	ArchivedAt time.Time `json:"archived_at" format:"date-time"`
	// The current balance of the credit or commit. This balance reflects the amount of
	// credit or commit that the customer has access to use at this moment - thus,
	// expired and upcoming credit or commit segments contribute 0 to the balance. The
	// balance will match the sum of all ledger entries with the exception of the case
	// where the sum of negative manual ledger entries exceeds the positive amount
	// remaining on the credit or commit - in that case, the balance will be 0. All
	// manual ledger entries associated with active credit or commit segments are
	// included in the balance, including future-dated manual ledger entries.
	Balance      float64                                         `json:"balance"`
	Contract     V1ContractGetResponseDataCurrentCommitsContract `json:"contract"`
	CustomFields map[string]string                               `json:"custom_fields"`
	Description  string                                          `json:"description"`
	// The contract that this commit will be billed on.
	InvoiceContract V1ContractGetResponseDataCurrentCommitsInvoiceContract `json:"invoice_contract"`
	// The schedule that the customer will be invoiced for this commit.
	InvoiceSchedule V1ContractGetResponseDataCurrentCommitsInvoiceSchedule `json:"invoice_schedule"`
	// A list of ordered events that impact the balance of a commit. For example, an
	// invoice deduction or a rollover.
	Ledger []V1ContractGetResponseDataCurrentCommitsLedger `json:"ledger"`
	Name   string                                          `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// If multiple credits or commits are applicable, the one with the lower priority
	// will apply first.
	Priority         float64                                               `json:"priority"`
	RateType         V1ContractGetResponseDataCurrentCommitsRateType       `json:"rate_type"`
	RolledOverFrom   V1ContractGetResponseDataCurrentCommitsRolledOverFrom `json:"rolled_over_from"`
	RolloverFraction float64                                               `json:"rollover_fraction"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractGetResponseDataCurrentCommitsSpecifier `json:"specifiers"`
	// Prevents the creation of duplicates. If a request to create a commit or credit
	// is made with a uniqueness key that was previously used to create a commit or
	// credit, a new record will not be created and the request will fail with a 409
	// error.
	UniquenessKey string                                     `json:"uniqueness_key"`
	JSON          v1ContractGetResponseDataCurrentCommitJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentCommit) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentCommitsAccessSchedule

type V1ContractGetResponseDataCurrentCommitsAccessSchedule struct {
	ScheduleItems []V1ContractGetResponseDataCurrentCommitsAccessScheduleScheduleItem `json:"schedule_items,required"`
	CreditType    V1ContractGetResponseDataCurrentCommitsAccessScheduleCreditType     `json:"credit_type"`
	JSON          v1ContractGetResponseDataCurrentCommitsAccessScheduleJSON           `json:"-"`
}

The schedule that the customer will gain access to the credits purposed with this commit.

func (*V1ContractGetResponseDataCurrentCommitsAccessSchedule) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentCommitsAccessScheduleCreditType

type V1ContractGetResponseDataCurrentCommitsAccessScheduleCreditType struct {
	ID   string                                                              `json:"id,required" format:"uuid"`
	Name string                                                              `json:"name,required"`
	JSON v1ContractGetResponseDataCurrentCommitsAccessScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentCommitsAccessScheduleCreditType) UnmarshalJSON

type V1ContractGetResponseDataCurrentCommitsAccessScheduleScheduleItem

type V1ContractGetResponseDataCurrentCommitsAccessScheduleScheduleItem struct {
	ID           string                                                                `json:"id,required" format:"uuid"`
	Amount       float64                                                               `json:"amount,required"`
	EndingBefore time.Time                                                             `json:"ending_before,required" format:"date-time"`
	StartingAt   time.Time                                                             `json:"starting_at,required" format:"date-time"`
	JSON         v1ContractGetResponseDataCurrentCommitsAccessScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentCommitsAccessScheduleScheduleItem) UnmarshalJSON

type V1ContractGetResponseDataCurrentCommitsContract

type V1ContractGetResponseDataCurrentCommitsContract struct {
	ID   string                                              `json:"id,required" format:"uuid"`
	JSON v1ContractGetResponseDataCurrentCommitsContractJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentCommitsContract) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentCommitsInvoiceContract

type V1ContractGetResponseDataCurrentCommitsInvoiceContract struct {
	ID   string                                                     `json:"id,required" format:"uuid"`
	JSON v1ContractGetResponseDataCurrentCommitsInvoiceContractJSON `json:"-"`
}

The contract that this commit will be billed on.

func (*V1ContractGetResponseDataCurrentCommitsInvoiceContract) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentCommitsInvoiceSchedule

type V1ContractGetResponseDataCurrentCommitsInvoiceSchedule struct {
	CreditType    V1ContractGetResponseDataCurrentCommitsInvoiceScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractGetResponseDataCurrentCommitsInvoiceScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractGetResponseDataCurrentCommitsInvoiceScheduleJSON           `json:"-"`
}

The schedule that the customer will be invoiced for this commit.

func (*V1ContractGetResponseDataCurrentCommitsInvoiceSchedule) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentCommitsInvoiceScheduleCreditType

type V1ContractGetResponseDataCurrentCommitsInvoiceScheduleCreditType struct {
	ID   string                                                               `json:"id,required" format:"uuid"`
	Name string                                                               `json:"name,required"`
	JSON v1ContractGetResponseDataCurrentCommitsInvoiceScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentCommitsInvoiceScheduleCreditType) UnmarshalJSON

type V1ContractGetResponseDataCurrentCommitsInvoiceScheduleScheduleItem

type V1ContractGetResponseDataCurrentCommitsInvoiceScheduleScheduleItem struct {
	ID        string                                                                 `json:"id,required" format:"uuid"`
	Amount    float64                                                                `json:"amount,required"`
	InvoiceID string                                                                 `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                                `json:"quantity,required"`
	Timestamp time.Time                                                              `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                                `json:"unit_price,required"`
	JSON      v1ContractGetResponseDataCurrentCommitsInvoiceScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentCommitsInvoiceScheduleScheduleItem) UnmarshalJSON

type V1ContractGetResponseDataCurrentCommitsLedger

type V1ContractGetResponseDataCurrentCommitsLedger struct {
	Amount        float64                                           `json:"amount,required"`
	Timestamp     time.Time                                         `json:"timestamp,required" format:"date-time"`
	Type          V1ContractGetResponseDataCurrentCommitsLedgerType `json:"type,required"`
	InvoiceID     string                                            `json:"invoice_id" format:"uuid"`
	NewContractID string                                            `json:"new_contract_id" format:"uuid"`
	Reason        string                                            `json:"reason"`
	SegmentID     string                                            `json:"segment_id" format:"uuid"`
	JSON          v1ContractGetResponseDataCurrentCommitsLedgerJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*V1ContractGetResponseDataCurrentCommitsLedger) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentCommitsLedgerObject

type V1ContractGetResponseDataCurrentCommitsLedgerObject struct {
	Amount    float64                                                 `json:"amount,required"`
	SegmentID string                                                  `json:"segment_id,required" format:"uuid"`
	Timestamp time.Time                                               `json:"timestamp,required" format:"date-time"`
	Type      V1ContractGetResponseDataCurrentCommitsLedgerObjectType `json:"type,required"`
	JSON      v1ContractGetResponseDataCurrentCommitsLedgerObjectJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentCommitsLedgerObject) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentCommitsLedgerObjectType

type V1ContractGetResponseDataCurrentCommitsLedgerObjectType string
const (
	V1ContractGetResponseDataCurrentCommitsLedgerObjectTypePrepaidCommitSegmentStart V1ContractGetResponseDataCurrentCommitsLedgerObjectType = "PREPAID_COMMIT_SEGMENT_START"
)

func (V1ContractGetResponseDataCurrentCommitsLedgerObjectType) IsKnown

type V1ContractGetResponseDataCurrentCommitsLedgerType

type V1ContractGetResponseDataCurrentCommitsLedgerType string
const (
	V1ContractGetResponseDataCurrentCommitsLedgerTypePrepaidCommitSegmentStart               V1ContractGetResponseDataCurrentCommitsLedgerType = "PREPAID_COMMIT_SEGMENT_START"
	V1ContractGetResponseDataCurrentCommitsLedgerTypePrepaidCommitAutomatedInvoiceDeduction  V1ContractGetResponseDataCurrentCommitsLedgerType = "PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractGetResponseDataCurrentCommitsLedgerTypePrepaidCommitRollover                   V1ContractGetResponseDataCurrentCommitsLedgerType = "PREPAID_COMMIT_ROLLOVER"
	V1ContractGetResponseDataCurrentCommitsLedgerTypePrepaidCommitExpiration                 V1ContractGetResponseDataCurrentCommitsLedgerType = "PREPAID_COMMIT_EXPIRATION"
	V1ContractGetResponseDataCurrentCommitsLedgerTypePrepaidCommitCanceled                   V1ContractGetResponseDataCurrentCommitsLedgerType = "PREPAID_COMMIT_CANCELED"
	V1ContractGetResponseDataCurrentCommitsLedgerTypePrepaidCommitCredited                   V1ContractGetResponseDataCurrentCommitsLedgerType = "PREPAID_COMMIT_CREDITED"
	V1ContractGetResponseDataCurrentCommitsLedgerTypePostpaidCommitInitialBalance            V1ContractGetResponseDataCurrentCommitsLedgerType = "POSTPAID_COMMIT_INITIAL_BALANCE"
	V1ContractGetResponseDataCurrentCommitsLedgerTypePostpaidCommitAutomatedInvoiceDeduction V1ContractGetResponseDataCurrentCommitsLedgerType = "POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractGetResponseDataCurrentCommitsLedgerTypePostpaidCommitRollover                  V1ContractGetResponseDataCurrentCommitsLedgerType = "POSTPAID_COMMIT_ROLLOVER"
	V1ContractGetResponseDataCurrentCommitsLedgerTypePostpaidCommitTrueup                    V1ContractGetResponseDataCurrentCommitsLedgerType = "POSTPAID_COMMIT_TRUEUP"
	V1ContractGetResponseDataCurrentCommitsLedgerTypePrepaidCommitManual                     V1ContractGetResponseDataCurrentCommitsLedgerType = "PREPAID_COMMIT_MANUAL"
	V1ContractGetResponseDataCurrentCommitsLedgerTypePostpaidCommitManual                    V1ContractGetResponseDataCurrentCommitsLedgerType = "POSTPAID_COMMIT_MANUAL"
	V1ContractGetResponseDataCurrentCommitsLedgerTypePostpaidCommitExpiration                V1ContractGetResponseDataCurrentCommitsLedgerType = "POSTPAID_COMMIT_EXPIRATION"
)

func (V1ContractGetResponseDataCurrentCommitsLedgerType) IsKnown

type V1ContractGetResponseDataCurrentCommitsProduct

type V1ContractGetResponseDataCurrentCommitsProduct struct {
	ID   string                                             `json:"id,required" format:"uuid"`
	Name string                                             `json:"name,required"`
	JSON v1ContractGetResponseDataCurrentCommitsProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentCommitsProduct) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentCommitsRateType

type V1ContractGetResponseDataCurrentCommitsRateType string
const (
	V1ContractGetResponseDataCurrentCommitsRateTypeCommitRate V1ContractGetResponseDataCurrentCommitsRateType = "COMMIT_RATE"
	V1ContractGetResponseDataCurrentCommitsRateTypeListRate   V1ContractGetResponseDataCurrentCommitsRateType = "LIST_RATE"
)

func (V1ContractGetResponseDataCurrentCommitsRateType) IsKnown

type V1ContractGetResponseDataCurrentCommitsRolledOverFrom

type V1ContractGetResponseDataCurrentCommitsRolledOverFrom struct {
	CommitID   string                                                    `json:"commit_id,required" format:"uuid"`
	ContractID string                                                    `json:"contract_id,required" format:"uuid"`
	JSON       v1ContractGetResponseDataCurrentCommitsRolledOverFromJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentCommitsRolledOverFrom) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentCommitsSpecifier

type V1ContractGetResponseDataCurrentCommitsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                             `json:"product_tags"`
	JSON        v1ContractGetResponseDataCurrentCommitsSpecifierJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentCommitsSpecifier) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentCommitsType

type V1ContractGetResponseDataCurrentCommitsType string
const (
	V1ContractGetResponseDataCurrentCommitsTypePrepaid  V1ContractGetResponseDataCurrentCommitsType = "PREPAID"
	V1ContractGetResponseDataCurrentCommitsTypePostpaid V1ContractGetResponseDataCurrentCommitsType = "POSTPAID"
)

func (V1ContractGetResponseDataCurrentCommitsType) IsKnown

type V1ContractGetResponseDataCurrentCredit

type V1ContractGetResponseDataCurrentCredit struct {
	ID      string                                         `json:"id,required" format:"uuid"`
	Product V1ContractGetResponseDataCurrentCreditsProduct `json:"product,required"`
	Type    V1ContractGetResponseDataCurrentCreditsType    `json:"type,required"`
	// The schedule that the customer will gain access to the credits.
	AccessSchedule        V1ContractGetResponseDataCurrentCreditsAccessSchedule `json:"access_schedule"`
	ApplicableContractIDs []string                                              `json:"applicable_contract_ids" format:"uuid"`
	ApplicableProductIDs  []string                                              `json:"applicable_product_ids" format:"uuid"`
	ApplicableProductTags []string                                              `json:"applicable_product_tags"`
	// The current balance of the credit or commit. This balance reflects the amount of
	// credit or commit that the customer has access to use at this moment - thus,
	// expired and upcoming credit or commit segments contribute 0 to the balance. The
	// balance will match the sum of all ledger entries with the exception of the case
	// where the sum of negative manual ledger entries exceeds the positive amount
	// remaining on the credit or commit - in that case, the balance will be 0. All
	// manual ledger entries associated with active credit or commit segments are
	// included in the balance, including future-dated manual ledger entries.
	Balance      float64                                         `json:"balance"`
	Contract     V1ContractGetResponseDataCurrentCreditsContract `json:"contract"`
	CustomFields map[string]string                               `json:"custom_fields"`
	Description  string                                          `json:"description"`
	// A list of ordered events that impact the balance of a credit. For example, an
	// invoice deduction or an expiration.
	Ledger []V1ContractGetResponseDataCurrentCreditsLedger `json:"ledger"`
	Name   string                                          `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// If multiple credits or commits are applicable, the one with the lower priority
	// will apply first.
	Priority float64                                         `json:"priority"`
	RateType V1ContractGetResponseDataCurrentCreditsRateType `json:"rate_type"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractGetResponseDataCurrentCreditsSpecifier `json:"specifiers"`
	// Prevents the creation of duplicates. If a request to create a commit or credit
	// is made with a uniqueness key that was previously used to create a commit or
	// credit, a new record will not be created and the request will fail with a 409
	// error.
	UniquenessKey string                                     `json:"uniqueness_key"`
	JSON          v1ContractGetResponseDataCurrentCreditJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentCredit) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentCreditsAccessSchedule

type V1ContractGetResponseDataCurrentCreditsAccessSchedule struct {
	ScheduleItems []V1ContractGetResponseDataCurrentCreditsAccessScheduleScheduleItem `json:"schedule_items,required"`
	CreditType    V1ContractGetResponseDataCurrentCreditsAccessScheduleCreditType     `json:"credit_type"`
	JSON          v1ContractGetResponseDataCurrentCreditsAccessScheduleJSON           `json:"-"`
}

The schedule that the customer will gain access to the credits.

func (*V1ContractGetResponseDataCurrentCreditsAccessSchedule) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentCreditsAccessScheduleCreditType

type V1ContractGetResponseDataCurrentCreditsAccessScheduleCreditType struct {
	ID   string                                                              `json:"id,required" format:"uuid"`
	Name string                                                              `json:"name,required"`
	JSON v1ContractGetResponseDataCurrentCreditsAccessScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentCreditsAccessScheduleCreditType) UnmarshalJSON

type V1ContractGetResponseDataCurrentCreditsAccessScheduleScheduleItem

type V1ContractGetResponseDataCurrentCreditsAccessScheduleScheduleItem struct {
	ID           string                                                                `json:"id,required" format:"uuid"`
	Amount       float64                                                               `json:"amount,required"`
	EndingBefore time.Time                                                             `json:"ending_before,required" format:"date-time"`
	StartingAt   time.Time                                                             `json:"starting_at,required" format:"date-time"`
	JSON         v1ContractGetResponseDataCurrentCreditsAccessScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentCreditsAccessScheduleScheduleItem) UnmarshalJSON

type V1ContractGetResponseDataCurrentCreditsContract

type V1ContractGetResponseDataCurrentCreditsContract struct {
	ID   string                                              `json:"id,required" format:"uuid"`
	JSON v1ContractGetResponseDataCurrentCreditsContractJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentCreditsContract) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentCreditsLedger

type V1ContractGetResponseDataCurrentCreditsLedger struct {
	Amount    float64                                           `json:"amount,required"`
	Timestamp time.Time                                         `json:"timestamp,required" format:"date-time"`
	Type      V1ContractGetResponseDataCurrentCreditsLedgerType `json:"type,required"`
	InvoiceID string                                            `json:"invoice_id" format:"uuid"`
	Reason    string                                            `json:"reason"`
	SegmentID string                                            `json:"segment_id" format:"uuid"`
	JSON      v1ContractGetResponseDataCurrentCreditsLedgerJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*V1ContractGetResponseDataCurrentCreditsLedger) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentCreditsLedgerObject

type V1ContractGetResponseDataCurrentCreditsLedgerObject struct {
	Amount    float64                                                 `json:"amount,required"`
	SegmentID string                                                  `json:"segment_id,required" format:"uuid"`
	Timestamp time.Time                                               `json:"timestamp,required" format:"date-time"`
	Type      V1ContractGetResponseDataCurrentCreditsLedgerObjectType `json:"type,required"`
	JSON      v1ContractGetResponseDataCurrentCreditsLedgerObjectJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentCreditsLedgerObject) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentCreditsLedgerObjectType

type V1ContractGetResponseDataCurrentCreditsLedgerObjectType string
const (
	V1ContractGetResponseDataCurrentCreditsLedgerObjectTypeCreditSegmentStart V1ContractGetResponseDataCurrentCreditsLedgerObjectType = "CREDIT_SEGMENT_START"
)

func (V1ContractGetResponseDataCurrentCreditsLedgerObjectType) IsKnown

type V1ContractGetResponseDataCurrentCreditsLedgerType

type V1ContractGetResponseDataCurrentCreditsLedgerType string
const (
	V1ContractGetResponseDataCurrentCreditsLedgerTypeCreditSegmentStart              V1ContractGetResponseDataCurrentCreditsLedgerType = "CREDIT_SEGMENT_START"
	V1ContractGetResponseDataCurrentCreditsLedgerTypeCreditAutomatedInvoiceDeduction V1ContractGetResponseDataCurrentCreditsLedgerType = "CREDIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractGetResponseDataCurrentCreditsLedgerTypeCreditExpiration                V1ContractGetResponseDataCurrentCreditsLedgerType = "CREDIT_EXPIRATION"
	V1ContractGetResponseDataCurrentCreditsLedgerTypeCreditCanceled                  V1ContractGetResponseDataCurrentCreditsLedgerType = "CREDIT_CANCELED"
	V1ContractGetResponseDataCurrentCreditsLedgerTypeCreditCredited                  V1ContractGetResponseDataCurrentCreditsLedgerType = "CREDIT_CREDITED"
	V1ContractGetResponseDataCurrentCreditsLedgerTypeCreditManual                    V1ContractGetResponseDataCurrentCreditsLedgerType = "CREDIT_MANUAL"
)

func (V1ContractGetResponseDataCurrentCreditsLedgerType) IsKnown

type V1ContractGetResponseDataCurrentCreditsProduct

type V1ContractGetResponseDataCurrentCreditsProduct struct {
	ID   string                                             `json:"id,required" format:"uuid"`
	Name string                                             `json:"name,required"`
	JSON v1ContractGetResponseDataCurrentCreditsProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentCreditsProduct) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentCreditsRateType

type V1ContractGetResponseDataCurrentCreditsRateType string
const (
	V1ContractGetResponseDataCurrentCreditsRateTypeCommitRate V1ContractGetResponseDataCurrentCreditsRateType = "COMMIT_RATE"
	V1ContractGetResponseDataCurrentCreditsRateTypeListRate   V1ContractGetResponseDataCurrentCreditsRateType = "LIST_RATE"
)

func (V1ContractGetResponseDataCurrentCreditsRateType) IsKnown

type V1ContractGetResponseDataCurrentCreditsSpecifier

type V1ContractGetResponseDataCurrentCreditsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                             `json:"product_tags"`
	JSON        v1ContractGetResponseDataCurrentCreditsSpecifierJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentCreditsSpecifier) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentCreditsType

type V1ContractGetResponseDataCurrentCreditsType string
const (
	V1ContractGetResponseDataCurrentCreditsTypeCredit V1ContractGetResponseDataCurrentCreditsType = "CREDIT"
)

func (V1ContractGetResponseDataCurrentCreditsType) IsKnown

type V1ContractGetResponseDataCurrentDiscount

type V1ContractGetResponseDataCurrentDiscount struct {
	ID           string                                            `json:"id,required" format:"uuid"`
	Product      V1ContractGetResponseDataCurrentDiscountsProduct  `json:"product,required"`
	Schedule     V1ContractGetResponseDataCurrentDiscountsSchedule `json:"schedule,required"`
	CustomFields map[string]string                                 `json:"custom_fields"`
	Name         string                                            `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string                                       `json:"netsuite_sales_order_id"`
	JSON                 v1ContractGetResponseDataCurrentDiscountJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentDiscount) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentDiscountsProduct

type V1ContractGetResponseDataCurrentDiscountsProduct struct {
	ID   string                                               `json:"id,required" format:"uuid"`
	Name string                                               `json:"name,required"`
	JSON v1ContractGetResponseDataCurrentDiscountsProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentDiscountsProduct) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentDiscountsSchedule

type V1ContractGetResponseDataCurrentDiscountsSchedule struct {
	CreditType    V1ContractGetResponseDataCurrentDiscountsScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractGetResponseDataCurrentDiscountsScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractGetResponseDataCurrentDiscountsScheduleJSON           `json:"-"`
}

func (*V1ContractGetResponseDataCurrentDiscountsSchedule) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentDiscountsScheduleCreditType

type V1ContractGetResponseDataCurrentDiscountsScheduleCreditType struct {
	ID   string                                                          `json:"id,required" format:"uuid"`
	Name string                                                          `json:"name,required"`
	JSON v1ContractGetResponseDataCurrentDiscountsScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentDiscountsScheduleCreditType) UnmarshalJSON

type V1ContractGetResponseDataCurrentDiscountsScheduleScheduleItem

type V1ContractGetResponseDataCurrentDiscountsScheduleScheduleItem struct {
	ID        string                                                            `json:"id,required" format:"uuid"`
	Amount    float64                                                           `json:"amount,required"`
	InvoiceID string                                                            `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                           `json:"quantity,required"`
	Timestamp time.Time                                                         `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                           `json:"unit_price,required"`
	JSON      v1ContractGetResponseDataCurrentDiscountsScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentDiscountsScheduleScheduleItem) UnmarshalJSON

type V1ContractGetResponseDataCurrentOverride

type V1ContractGetResponseDataCurrentOverride struct {
	ID                    string                                              `json:"id,required" format:"uuid"`
	StartingAt            time.Time                                           `json:"starting_at,required" format:"date-time"`
	ApplicableProductTags []string                                            `json:"applicable_product_tags"`
	CreditType            V1ContractGetResponseDataCurrentOverridesCreditType `json:"credit_type"`
	EndingBefore          time.Time                                           `json:"ending_before" format:"date-time"`
	Entitled              bool                                                `json:"entitled"`
	IsCommitSpecific      bool                                                `json:"is_commit_specific"`
	// Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
	// set to true.
	IsProrated         bool                                                         `json:"is_prorated"`
	Multiplier         float64                                                      `json:"multiplier"`
	OverrideSpecifiers []V1ContractGetResponseDataCurrentOverridesOverrideSpecifier `json:"override_specifiers"`
	OverrideTiers      []V1ContractGetResponseDataCurrentOverridesOverrideTier      `json:"override_tiers"`
	OverwriteRate      V1ContractGetResponseDataCurrentOverridesOverwriteRate       `json:"overwrite_rate"`
	// Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
	// this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
	Price    float64                                          `json:"price"`
	Priority float64                                          `json:"priority"`
	Product  V1ContractGetResponseDataCurrentOverridesProduct `json:"product"`
	// Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
	Quantity float64                                           `json:"quantity"`
	RateType V1ContractGetResponseDataCurrentOverridesRateType `json:"rate_type"`
	Target   V1ContractGetResponseDataCurrentOverridesTarget   `json:"target"`
	// Only set for TIERED rate_type.
	Tiers []V1ContractGetResponseDataCurrentOverridesTier `json:"tiers"`
	Type  V1ContractGetResponseDataCurrentOverridesType   `json:"type"`
	// Only set for CUSTOM rate_type. This field is interpreted by custom rate
	// processors.
	Value map[string]interface{}                       `json:"value"`
	JSON  v1ContractGetResponseDataCurrentOverrideJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentOverride) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentOverridesCreditType

type V1ContractGetResponseDataCurrentOverridesCreditType struct {
	ID   string                                                  `json:"id,required" format:"uuid"`
	Name string                                                  `json:"name,required"`
	JSON v1ContractGetResponseDataCurrentOverridesCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentOverridesCreditType) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentOverridesOverrideSpecifier

type V1ContractGetResponseDataCurrentOverridesOverrideSpecifier struct {
	BillingFrequency        V1ContractGetResponseDataCurrentOverridesOverrideSpecifiersBillingFrequency `json:"billing_frequency"`
	CommitIDs               []string                                                                    `json:"commit_ids"`
	PresentationGroupValues map[string]string                                                           `json:"presentation_group_values"`
	PricingGroupValues      map[string]string                                                           `json:"pricing_group_values"`
	ProductID               string                                                                      `json:"product_id" format:"uuid"`
	ProductTags             []string                                                                    `json:"product_tags"`
	RecurringCommitIDs      []string                                                                    `json:"recurring_commit_ids"`
	RecurringCreditIDs      []string                                                                    `json:"recurring_credit_ids"`
	JSON                    v1ContractGetResponseDataCurrentOverridesOverrideSpecifierJSON              `json:"-"`
}

func (*V1ContractGetResponseDataCurrentOverridesOverrideSpecifier) UnmarshalJSON

type V1ContractGetResponseDataCurrentOverridesOverrideSpecifiersBillingFrequency

type V1ContractGetResponseDataCurrentOverridesOverrideSpecifiersBillingFrequency string
const (
	V1ContractGetResponseDataCurrentOverridesOverrideSpecifiersBillingFrequencyMonthly   V1ContractGetResponseDataCurrentOverridesOverrideSpecifiersBillingFrequency = "MONTHLY"
	V1ContractGetResponseDataCurrentOverridesOverrideSpecifiersBillingFrequencyQuarterly V1ContractGetResponseDataCurrentOverridesOverrideSpecifiersBillingFrequency = "QUARTERLY"
	V1ContractGetResponseDataCurrentOverridesOverrideSpecifiersBillingFrequencyAnnual    V1ContractGetResponseDataCurrentOverridesOverrideSpecifiersBillingFrequency = "ANNUAL"
	V1ContractGetResponseDataCurrentOverridesOverrideSpecifiersBillingFrequencyWeekly    V1ContractGetResponseDataCurrentOverridesOverrideSpecifiersBillingFrequency = "WEEKLY"
)

func (V1ContractGetResponseDataCurrentOverridesOverrideSpecifiersBillingFrequency) IsKnown

type V1ContractGetResponseDataCurrentOverridesOverrideTier

type V1ContractGetResponseDataCurrentOverridesOverrideTier struct {
	Multiplier float64                                                   `json:"multiplier,required"`
	Size       float64                                                   `json:"size"`
	JSON       v1ContractGetResponseDataCurrentOverridesOverrideTierJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentOverridesOverrideTier) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentOverridesOverwriteRate

type V1ContractGetResponseDataCurrentOverridesOverwriteRate struct {
	RateType   V1ContractGetResponseDataCurrentOverridesOverwriteRateRateType   `json:"rate_type,required"`
	CreditType V1ContractGetResponseDataCurrentOverridesOverwriteRateCreditType `json:"credit_type"`
	// Only set for CUSTOM rate_type. This field is interpreted by custom rate
	// processors.
	CustomRate map[string]interface{} `json:"custom_rate"`
	// Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
	// set to true.
	IsProrated bool `json:"is_prorated"`
	// Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
	// this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
	Price float64 `json:"price"`
	// Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
	Quantity float64 `json:"quantity"`
	// Only set for TIERED rate_type.
	Tiers []V1ContractGetResponseDataCurrentOverridesOverwriteRateTier `json:"tiers"`
	JSON  v1ContractGetResponseDataCurrentOverridesOverwriteRateJSON   `json:"-"`
}

func (*V1ContractGetResponseDataCurrentOverridesOverwriteRate) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentOverridesOverwriteRateCreditType

type V1ContractGetResponseDataCurrentOverridesOverwriteRateCreditType struct {
	ID   string                                                               `json:"id,required" format:"uuid"`
	Name string                                                               `json:"name,required"`
	JSON v1ContractGetResponseDataCurrentOverridesOverwriteRateCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentOverridesOverwriteRateCreditType) UnmarshalJSON

type V1ContractGetResponseDataCurrentOverridesOverwriteRateRateType

type V1ContractGetResponseDataCurrentOverridesOverwriteRateRateType string
const (
	V1ContractGetResponseDataCurrentOverridesOverwriteRateRateTypeFlat         V1ContractGetResponseDataCurrentOverridesOverwriteRateRateType = "FLAT"
	V1ContractGetResponseDataCurrentOverridesOverwriteRateRateTypePercentage   V1ContractGetResponseDataCurrentOverridesOverwriteRateRateType = "PERCENTAGE"
	V1ContractGetResponseDataCurrentOverridesOverwriteRateRateTypeSubscription V1ContractGetResponseDataCurrentOverridesOverwriteRateRateType = "SUBSCRIPTION"
	V1ContractGetResponseDataCurrentOverridesOverwriteRateRateTypeTiered       V1ContractGetResponseDataCurrentOverridesOverwriteRateRateType = "TIERED"
	V1ContractGetResponseDataCurrentOverridesOverwriteRateRateTypeCustom       V1ContractGetResponseDataCurrentOverridesOverwriteRateRateType = "CUSTOM"
)

func (V1ContractGetResponseDataCurrentOverridesOverwriteRateRateType) IsKnown

type V1ContractGetResponseDataCurrentOverridesOverwriteRateTier

type V1ContractGetResponseDataCurrentOverridesOverwriteRateTier struct {
	Price float64                                                        `json:"price,required"`
	Size  float64                                                        `json:"size"`
	JSON  v1ContractGetResponseDataCurrentOverridesOverwriteRateTierJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentOverridesOverwriteRateTier) UnmarshalJSON

type V1ContractGetResponseDataCurrentOverridesProduct

type V1ContractGetResponseDataCurrentOverridesProduct struct {
	ID   string                                               `json:"id,required" format:"uuid"`
	Name string                                               `json:"name,required"`
	JSON v1ContractGetResponseDataCurrentOverridesProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentOverridesProduct) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentOverridesRateType

type V1ContractGetResponseDataCurrentOverridesRateType string
const (
	V1ContractGetResponseDataCurrentOverridesRateTypeFlat         V1ContractGetResponseDataCurrentOverridesRateType = "FLAT"
	V1ContractGetResponseDataCurrentOverridesRateTypePercentage   V1ContractGetResponseDataCurrentOverridesRateType = "PERCENTAGE"
	V1ContractGetResponseDataCurrentOverridesRateTypeSubscription V1ContractGetResponseDataCurrentOverridesRateType = "SUBSCRIPTION"
	V1ContractGetResponseDataCurrentOverridesRateTypeTiered       V1ContractGetResponseDataCurrentOverridesRateType = "TIERED"
	V1ContractGetResponseDataCurrentOverridesRateTypeCustom       V1ContractGetResponseDataCurrentOverridesRateType = "CUSTOM"
)

func (V1ContractGetResponseDataCurrentOverridesRateType) IsKnown

type V1ContractGetResponseDataCurrentOverridesTarget

type V1ContractGetResponseDataCurrentOverridesTarget string
const (
	V1ContractGetResponseDataCurrentOverridesTargetCommitRate V1ContractGetResponseDataCurrentOverridesTarget = "COMMIT_RATE"
	V1ContractGetResponseDataCurrentOverridesTargetListRate   V1ContractGetResponseDataCurrentOverridesTarget = "LIST_RATE"
)

func (V1ContractGetResponseDataCurrentOverridesTarget) IsKnown

type V1ContractGetResponseDataCurrentOverridesTier

type V1ContractGetResponseDataCurrentOverridesTier struct {
	Price float64                                           `json:"price,required"`
	Size  float64                                           `json:"size"`
	JSON  v1ContractGetResponseDataCurrentOverridesTierJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentOverridesTier) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentOverridesType

type V1ContractGetResponseDataCurrentOverridesType string
const (
	V1ContractGetResponseDataCurrentOverridesTypeOverwrite  V1ContractGetResponseDataCurrentOverridesType = "OVERWRITE"
	V1ContractGetResponseDataCurrentOverridesTypeMultiplier V1ContractGetResponseDataCurrentOverridesType = "MULTIPLIER"
	V1ContractGetResponseDataCurrentOverridesTypeTiered     V1ContractGetResponseDataCurrentOverridesType = "TIERED"
)

func (V1ContractGetResponseDataCurrentOverridesType) IsKnown

type V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfiguration

type V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfiguration struct {
	Commit V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationCommit `json:"commit,required"`
	// When set to false, the contract will not be evaluated against the
	// threshold_amount. Toggling to true will result an immediate evaluation,
	// regardless of prior state.
	IsEnabled         bool                                                                                  `json:"is_enabled,required"`
	PaymentGateConfig V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfig `json:"payment_gate_config,required"`
	// Specify the amount the balance should be recharged to.
	RechargeToAmount float64 `json:"recharge_to_amount,required"`
	// Specify the threshold amount for the contract. Each time the contract's prepaid
	// balance lowers to this amount, a threshold charge will be initiated.
	ThresholdAmount float64                                                                  `json:"threshold_amount,required"`
	JSON            v1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfiguration) UnmarshalJSON

type V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationCommit

type V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationCommit struct {
	// The commit product that will be used to generate the line item for commit
	// payment.
	ProductID string `json:"product_id,required"`
	// Which products the threshold commit applies to. If both applicable_product_ids
	// and applicable_product_tags are not provided, the commit applies to all
	// products.
	ApplicableProductIDs []string `json:"applicable_product_ids" format:"uuid"`
	// Which tags the threshold commit applies to. If both applicable_product_ids and
	// applicable_product_tags are not provided, the commit applies to all products.
	ApplicableProductTags []string `json:"applicable_product_tags"`
	Description           string   `json:"description"`
	// Specify the name of the line item for the threshold charge. If left blank, it
	// will default to the commit product name.
	Name string `json:"name"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown. This field cannot
	// be used together with `applicable_product_ids` or `applicable_product_tags`.
	Specifiers []V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationCommitSpecifier `json:"specifiers"`
	JSON       v1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationCommitJSON        `json:"-"`
}

func (*V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationCommit) UnmarshalJSON

type V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationCommitSpecifier

type V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationCommitSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                                                                `json:"product_tags"`
	JSON        v1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationCommitSpecifierJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationCommitSpecifier) UnmarshalJSON

type V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfig

type V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfig struct {
	// Gate access to the commit balance based on successful collection of payment.
	// Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
	// facilitate payment using your own payment integration. Select NONE if you do not
	// wish to payment gate the commit balance.
	PaymentGateType V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType `json:"payment_gate_type,required"`
	// Only applicable if using Stripe as your payment gateway through Metronome.
	StripeConfig V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig `json:"stripe_config"`
	// Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
	// not wish Metronome to calculate tax on your behalf. Leaving this field blank
	// will default to NONE.
	TaxType V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType `json:"tax_type"`
	JSON    v1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigJSON    `json:"-"`
}

func (*V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfig) UnmarshalJSON

type V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType

type V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType string

Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance.

const (
	V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateTypeNone     V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType = "NONE"
	V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateTypeStripe   V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType = "STRIPE"
	V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateTypeExternal V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType = "EXTERNAL"
)

func (V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType) IsKnown

type V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig

type V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig struct {
	// If left blank, will default to INVOICE
	PaymentType V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType `json:"payment_type,required"`
	JSON        v1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigJSON        `json:"-"`
}

Only applicable if using Stripe as your payment gateway through Metronome.

func (*V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig) UnmarshalJSON

type V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType

type V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType string

If left blank, will default to INVOICE

const (
	V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypeInvoice       V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "INVOICE"
	V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypePaymentIntent V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "PAYMENT_INTENT"
)

func (V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType) IsKnown

type V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType

type V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType string

Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE.

const (
	V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxTypeNone   V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType = "NONE"
	V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxTypeStripe V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType = "STRIPE"
)

func (V1ContractGetResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType) IsKnown

type V1ContractGetResponseDataCurrentProfessionalService

type V1ContractGetResponseDataCurrentProfessionalService struct {
	ID string `json:"id,required" format:"uuid"`
	// Maximum amount for the term.
	MaxAmount float64 `json:"max_amount,required"`
	ProductID string  `json:"product_id,required" format:"uuid"`
	// Quantity for the charge. Will be multiplied by unit_price to determine the
	// amount.
	Quantity float64 `json:"quantity,required"`
	// Unit price for the charge. Will be multiplied by quantity to determine the
	// amount and must be specified.
	UnitPrice    float64           `json:"unit_price,required"`
	CustomFields map[string]string `json:"custom_fields"`
	Description  string            `json:"description"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string                                                  `json:"netsuite_sales_order_id"`
	JSON                 v1ContractGetResponseDataCurrentProfessionalServiceJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentProfessionalService) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentRecurringCommit

type V1ContractGetResponseDataCurrentRecurringCommit struct {
	ID string `json:"id,required" format:"uuid"`
	// The amount of commit to grant.
	AccessAmount V1ContractGetResponseDataCurrentRecurringCommitsAccessAmount `json:"access_amount,required"`
	// The amount of time the created commits will be valid for
	CommitDuration V1ContractGetResponseDataCurrentRecurringCommitsCommitDuration `json:"commit_duration,required"`
	// Will be passed down to the individual commits
	Priority float64                                                 `json:"priority,required"`
	Product  V1ContractGetResponseDataCurrentRecurringCommitsProduct `json:"product,required"`
	// Whether the created commits will use the commit rate or list rate
	RateType V1ContractGetResponseDataCurrentRecurringCommitsRateType `json:"rate_type,required"`
	// Determines the start time for the first commit
	StartingAt time.Time `json:"starting_at,required" format:"date-time"`
	// Will be passed down to the individual commits
	ApplicableProductIDs []string `json:"applicable_product_ids" format:"uuid"`
	// Will be passed down to the individual commits
	ApplicableProductTags []string                                                 `json:"applicable_product_tags"`
	Contract              V1ContractGetResponseDataCurrentRecurringCommitsContract `json:"contract"`
	// Will be passed down to the individual commits
	Description string `json:"description"`
	// Determines when the contract will stop creating recurring commits. Optional
	EndingBefore time.Time `json:"ending_before" format:"date-time"`
	// The amount the customer should be billed for the commit. Not required.
	InvoiceAmount V1ContractGetResponseDataCurrentRecurringCommitsInvoiceAmount `json:"invoice_amount"`
	// Displayed on invoices. Will be passed through to the individual commits
	Name string `json:"name"`
	// Will be passed down to the individual commits
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// Determines whether the first and last commit will be prorated. If not provided,
	// the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
	Proration V1ContractGetResponseDataCurrentRecurringCommitsProration `json:"proration"`
	// The frequency at which the recurring commits will be created. If not provided: -
	// The commits will be created on the usage invoice frequency. If provided: - The
	// period defined in the duration will correspond to this frequency. - Commits will
	// be created aligned with the recurring commit's starting_at rather than the usage
	// invoice dates.
	RecurrenceFrequency V1ContractGetResponseDataCurrentRecurringCommitsRecurrenceFrequency `json:"recurrence_frequency"`
	// Will be passed down to the individual commits. This controls how much of an
	// individual unexpired commit will roll over upon contract transition. Must be
	// between 0 and 1.
	RolloverFraction float64 `json:"rollover_fraction"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractGetResponseDataCurrentRecurringCommitsSpecifier `json:"specifiers"`
	JSON       v1ContractGetResponseDataCurrentRecurringCommitJSON         `json:"-"`
}

func (*V1ContractGetResponseDataCurrentRecurringCommit) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentRecurringCommitsAccessAmount

type V1ContractGetResponseDataCurrentRecurringCommitsAccessAmount struct {
	CreditTypeID string                                                           `json:"credit_type_id,required" format:"uuid"`
	Quantity     float64                                                          `json:"quantity,required"`
	UnitPrice    float64                                                          `json:"unit_price,required"`
	JSON         v1ContractGetResponseDataCurrentRecurringCommitsAccessAmountJSON `json:"-"`
}

The amount of commit to grant.

func (*V1ContractGetResponseDataCurrentRecurringCommitsAccessAmount) UnmarshalJSON

type V1ContractGetResponseDataCurrentRecurringCommitsCommitDuration

type V1ContractGetResponseDataCurrentRecurringCommitsCommitDuration struct {
	Value float64                                                            `json:"value,required"`
	Unit  V1ContractGetResponseDataCurrentRecurringCommitsCommitDurationUnit `json:"unit"`
	JSON  v1ContractGetResponseDataCurrentRecurringCommitsCommitDurationJSON `json:"-"`
}

The amount of time the created commits will be valid for

func (*V1ContractGetResponseDataCurrentRecurringCommitsCommitDuration) UnmarshalJSON

type V1ContractGetResponseDataCurrentRecurringCommitsCommitDurationUnit

type V1ContractGetResponseDataCurrentRecurringCommitsCommitDurationUnit string
const (
	V1ContractGetResponseDataCurrentRecurringCommitsCommitDurationUnitPeriods V1ContractGetResponseDataCurrentRecurringCommitsCommitDurationUnit = "PERIODS"
)

func (V1ContractGetResponseDataCurrentRecurringCommitsCommitDurationUnit) IsKnown

type V1ContractGetResponseDataCurrentRecurringCommitsContract

type V1ContractGetResponseDataCurrentRecurringCommitsContract struct {
	ID   string                                                       `json:"id,required" format:"uuid"`
	JSON v1ContractGetResponseDataCurrentRecurringCommitsContractJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentRecurringCommitsContract) UnmarshalJSON

type V1ContractGetResponseDataCurrentRecurringCommitsInvoiceAmount

type V1ContractGetResponseDataCurrentRecurringCommitsInvoiceAmount struct {
	CreditTypeID string                                                            `json:"credit_type_id,required" format:"uuid"`
	Quantity     float64                                                           `json:"quantity,required"`
	UnitPrice    float64                                                           `json:"unit_price,required"`
	JSON         v1ContractGetResponseDataCurrentRecurringCommitsInvoiceAmountJSON `json:"-"`
}

The amount the customer should be billed for the commit. Not required.

func (*V1ContractGetResponseDataCurrentRecurringCommitsInvoiceAmount) UnmarshalJSON

type V1ContractGetResponseDataCurrentRecurringCommitsProduct

type V1ContractGetResponseDataCurrentRecurringCommitsProduct struct {
	ID   string                                                      `json:"id,required" format:"uuid"`
	Name string                                                      `json:"name,required"`
	JSON v1ContractGetResponseDataCurrentRecurringCommitsProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentRecurringCommitsProduct) UnmarshalJSON

type V1ContractGetResponseDataCurrentRecurringCommitsProration

type V1ContractGetResponseDataCurrentRecurringCommitsProration string

Determines whether the first and last commit will be prorated. If not provided, the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).

const (
	V1ContractGetResponseDataCurrentRecurringCommitsProrationNone         V1ContractGetResponseDataCurrentRecurringCommitsProration = "NONE"
	V1ContractGetResponseDataCurrentRecurringCommitsProrationFirst        V1ContractGetResponseDataCurrentRecurringCommitsProration = "FIRST"
	V1ContractGetResponseDataCurrentRecurringCommitsProrationLast         V1ContractGetResponseDataCurrentRecurringCommitsProration = "LAST"
	V1ContractGetResponseDataCurrentRecurringCommitsProrationFirstAndLast V1ContractGetResponseDataCurrentRecurringCommitsProration = "FIRST_AND_LAST"
)

func (V1ContractGetResponseDataCurrentRecurringCommitsProration) IsKnown

type V1ContractGetResponseDataCurrentRecurringCommitsRateType

type V1ContractGetResponseDataCurrentRecurringCommitsRateType string

Whether the created commits will use the commit rate or list rate

const (
	V1ContractGetResponseDataCurrentRecurringCommitsRateTypeCommitRate V1ContractGetResponseDataCurrentRecurringCommitsRateType = "COMMIT_RATE"
	V1ContractGetResponseDataCurrentRecurringCommitsRateTypeListRate   V1ContractGetResponseDataCurrentRecurringCommitsRateType = "LIST_RATE"
)

func (V1ContractGetResponseDataCurrentRecurringCommitsRateType) IsKnown

type V1ContractGetResponseDataCurrentRecurringCommitsRecurrenceFrequency

type V1ContractGetResponseDataCurrentRecurringCommitsRecurrenceFrequency string

The frequency at which the recurring commits will be created. If not provided: - The commits will be created on the usage invoice frequency. If provided: - The period defined in the duration will correspond to this frequency. - Commits will be created aligned with the recurring commit's starting_at rather than the usage invoice dates.

const (
	V1ContractGetResponseDataCurrentRecurringCommitsRecurrenceFrequencyMonthly   V1ContractGetResponseDataCurrentRecurringCommitsRecurrenceFrequency = "MONTHLY"
	V1ContractGetResponseDataCurrentRecurringCommitsRecurrenceFrequencyQuarterly V1ContractGetResponseDataCurrentRecurringCommitsRecurrenceFrequency = "QUARTERLY"
	V1ContractGetResponseDataCurrentRecurringCommitsRecurrenceFrequencyAnnual    V1ContractGetResponseDataCurrentRecurringCommitsRecurrenceFrequency = "ANNUAL"
	V1ContractGetResponseDataCurrentRecurringCommitsRecurrenceFrequencyWeekly    V1ContractGetResponseDataCurrentRecurringCommitsRecurrenceFrequency = "WEEKLY"
)

func (V1ContractGetResponseDataCurrentRecurringCommitsRecurrenceFrequency) IsKnown

type V1ContractGetResponseDataCurrentRecurringCommitsSpecifier

type V1ContractGetResponseDataCurrentRecurringCommitsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                                      `json:"product_tags"`
	JSON        v1ContractGetResponseDataCurrentRecurringCommitsSpecifierJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentRecurringCommitsSpecifier) UnmarshalJSON

type V1ContractGetResponseDataCurrentRecurringCredit

type V1ContractGetResponseDataCurrentRecurringCredit struct {
	ID string `json:"id,required" format:"uuid"`
	// The amount of commit to grant.
	AccessAmount V1ContractGetResponseDataCurrentRecurringCreditsAccessAmount `json:"access_amount,required"`
	// The amount of time the created commits will be valid for
	CommitDuration V1ContractGetResponseDataCurrentRecurringCreditsCommitDuration `json:"commit_duration,required"`
	// Will be passed down to the individual commits
	Priority float64                                                 `json:"priority,required"`
	Product  V1ContractGetResponseDataCurrentRecurringCreditsProduct `json:"product,required"`
	// Whether the created commits will use the commit rate or list rate
	RateType V1ContractGetResponseDataCurrentRecurringCreditsRateType `json:"rate_type,required"`
	// Determines the start time for the first commit
	StartingAt time.Time `json:"starting_at,required" format:"date-time"`
	// Will be passed down to the individual commits
	ApplicableProductIDs []string `json:"applicable_product_ids" format:"uuid"`
	// Will be passed down to the individual commits
	ApplicableProductTags []string                                                 `json:"applicable_product_tags"`
	Contract              V1ContractGetResponseDataCurrentRecurringCreditsContract `json:"contract"`
	// Will be passed down to the individual commits
	Description string `json:"description"`
	// Determines when the contract will stop creating recurring commits. Optional
	EndingBefore time.Time `json:"ending_before" format:"date-time"`
	// Displayed on invoices. Will be passed through to the individual commits
	Name string `json:"name"`
	// Will be passed down to the individual commits
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// Determines whether the first and last commit will be prorated. If not provided,
	// the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
	Proration V1ContractGetResponseDataCurrentRecurringCreditsProration `json:"proration"`
	// The frequency at which the recurring commits will be created. If not provided: -
	// The commits will be created on the usage invoice frequency. If provided: - The
	// period defined in the duration will correspond to this frequency. - Commits will
	// be created aligned with the recurring commit's starting_at rather than the usage
	// invoice dates.
	RecurrenceFrequency V1ContractGetResponseDataCurrentRecurringCreditsRecurrenceFrequency `json:"recurrence_frequency"`
	// Will be passed down to the individual commits. This controls how much of an
	// individual unexpired commit will roll over upon contract transition. Must be
	// between 0 and 1.
	RolloverFraction float64 `json:"rollover_fraction"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractGetResponseDataCurrentRecurringCreditsSpecifier `json:"specifiers"`
	JSON       v1ContractGetResponseDataCurrentRecurringCreditJSON         `json:"-"`
}

func (*V1ContractGetResponseDataCurrentRecurringCredit) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentRecurringCreditsAccessAmount

type V1ContractGetResponseDataCurrentRecurringCreditsAccessAmount struct {
	CreditTypeID string                                                           `json:"credit_type_id,required" format:"uuid"`
	Quantity     float64                                                          `json:"quantity,required"`
	UnitPrice    float64                                                          `json:"unit_price,required"`
	JSON         v1ContractGetResponseDataCurrentRecurringCreditsAccessAmountJSON `json:"-"`
}

The amount of commit to grant.

func (*V1ContractGetResponseDataCurrentRecurringCreditsAccessAmount) UnmarshalJSON

type V1ContractGetResponseDataCurrentRecurringCreditsCommitDuration

type V1ContractGetResponseDataCurrentRecurringCreditsCommitDuration struct {
	Value float64                                                            `json:"value,required"`
	Unit  V1ContractGetResponseDataCurrentRecurringCreditsCommitDurationUnit `json:"unit"`
	JSON  v1ContractGetResponseDataCurrentRecurringCreditsCommitDurationJSON `json:"-"`
}

The amount of time the created commits will be valid for

func (*V1ContractGetResponseDataCurrentRecurringCreditsCommitDuration) UnmarshalJSON

type V1ContractGetResponseDataCurrentRecurringCreditsCommitDurationUnit

type V1ContractGetResponseDataCurrentRecurringCreditsCommitDurationUnit string
const (
	V1ContractGetResponseDataCurrentRecurringCreditsCommitDurationUnitPeriods V1ContractGetResponseDataCurrentRecurringCreditsCommitDurationUnit = "PERIODS"
)

func (V1ContractGetResponseDataCurrentRecurringCreditsCommitDurationUnit) IsKnown

type V1ContractGetResponseDataCurrentRecurringCreditsContract

type V1ContractGetResponseDataCurrentRecurringCreditsContract struct {
	ID   string                                                       `json:"id,required" format:"uuid"`
	JSON v1ContractGetResponseDataCurrentRecurringCreditsContractJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentRecurringCreditsContract) UnmarshalJSON

type V1ContractGetResponseDataCurrentRecurringCreditsProduct

type V1ContractGetResponseDataCurrentRecurringCreditsProduct struct {
	ID   string                                                      `json:"id,required" format:"uuid"`
	Name string                                                      `json:"name,required"`
	JSON v1ContractGetResponseDataCurrentRecurringCreditsProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentRecurringCreditsProduct) UnmarshalJSON

type V1ContractGetResponseDataCurrentRecurringCreditsProration

type V1ContractGetResponseDataCurrentRecurringCreditsProration string

Determines whether the first and last commit will be prorated. If not provided, the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).

const (
	V1ContractGetResponseDataCurrentRecurringCreditsProrationNone         V1ContractGetResponseDataCurrentRecurringCreditsProration = "NONE"
	V1ContractGetResponseDataCurrentRecurringCreditsProrationFirst        V1ContractGetResponseDataCurrentRecurringCreditsProration = "FIRST"
	V1ContractGetResponseDataCurrentRecurringCreditsProrationLast         V1ContractGetResponseDataCurrentRecurringCreditsProration = "LAST"
	V1ContractGetResponseDataCurrentRecurringCreditsProrationFirstAndLast V1ContractGetResponseDataCurrentRecurringCreditsProration = "FIRST_AND_LAST"
)

func (V1ContractGetResponseDataCurrentRecurringCreditsProration) IsKnown

type V1ContractGetResponseDataCurrentRecurringCreditsRateType

type V1ContractGetResponseDataCurrentRecurringCreditsRateType string

Whether the created commits will use the commit rate or list rate

const (
	V1ContractGetResponseDataCurrentRecurringCreditsRateTypeCommitRate V1ContractGetResponseDataCurrentRecurringCreditsRateType = "COMMIT_RATE"
	V1ContractGetResponseDataCurrentRecurringCreditsRateTypeListRate   V1ContractGetResponseDataCurrentRecurringCreditsRateType = "LIST_RATE"
)

func (V1ContractGetResponseDataCurrentRecurringCreditsRateType) IsKnown

type V1ContractGetResponseDataCurrentRecurringCreditsRecurrenceFrequency

type V1ContractGetResponseDataCurrentRecurringCreditsRecurrenceFrequency string

The frequency at which the recurring commits will be created. If not provided: - The commits will be created on the usage invoice frequency. If provided: - The period defined in the duration will correspond to this frequency. - Commits will be created aligned with the recurring commit's starting_at rather than the usage invoice dates.

const (
	V1ContractGetResponseDataCurrentRecurringCreditsRecurrenceFrequencyMonthly   V1ContractGetResponseDataCurrentRecurringCreditsRecurrenceFrequency = "MONTHLY"
	V1ContractGetResponseDataCurrentRecurringCreditsRecurrenceFrequencyQuarterly V1ContractGetResponseDataCurrentRecurringCreditsRecurrenceFrequency = "QUARTERLY"
	V1ContractGetResponseDataCurrentRecurringCreditsRecurrenceFrequencyAnnual    V1ContractGetResponseDataCurrentRecurringCreditsRecurrenceFrequency = "ANNUAL"
	V1ContractGetResponseDataCurrentRecurringCreditsRecurrenceFrequencyWeekly    V1ContractGetResponseDataCurrentRecurringCreditsRecurrenceFrequency = "WEEKLY"
)

func (V1ContractGetResponseDataCurrentRecurringCreditsRecurrenceFrequency) IsKnown

type V1ContractGetResponseDataCurrentRecurringCreditsSpecifier

type V1ContractGetResponseDataCurrentRecurringCreditsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                                      `json:"product_tags"`
	JSON        v1ContractGetResponseDataCurrentRecurringCreditsSpecifierJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentRecurringCreditsSpecifier) UnmarshalJSON

type V1ContractGetResponseDataCurrentResellerRoyaltiesResellerType

type V1ContractGetResponseDataCurrentResellerRoyaltiesResellerType string
const (
	V1ContractGetResponseDataCurrentResellerRoyaltiesResellerTypeAws           V1ContractGetResponseDataCurrentResellerRoyaltiesResellerType = "AWS"
	V1ContractGetResponseDataCurrentResellerRoyaltiesResellerTypeAwsProService V1ContractGetResponseDataCurrentResellerRoyaltiesResellerType = "AWS_PRO_SERVICE"
	V1ContractGetResponseDataCurrentResellerRoyaltiesResellerTypeGcp           V1ContractGetResponseDataCurrentResellerRoyaltiesResellerType = "GCP"
	V1ContractGetResponseDataCurrentResellerRoyaltiesResellerTypeGcpProService V1ContractGetResponseDataCurrentResellerRoyaltiesResellerType = "GCP_PRO_SERVICE"
)

func (V1ContractGetResponseDataCurrentResellerRoyaltiesResellerType) IsKnown

type V1ContractGetResponseDataCurrentResellerRoyalty

type V1ContractGetResponseDataCurrentResellerRoyalty struct {
	Fraction              float64                                                       `json:"fraction,required"`
	NetsuiteResellerID    string                                                        `json:"netsuite_reseller_id,required"`
	ResellerType          V1ContractGetResponseDataCurrentResellerRoyaltiesResellerType `json:"reseller_type,required"`
	StartingAt            time.Time                                                     `json:"starting_at,required" format:"date-time"`
	ApplicableProductIDs  []string                                                      `json:"applicable_product_ids"`
	ApplicableProductTags []string                                                      `json:"applicable_product_tags"`
	AwsAccountNumber      string                                                        `json:"aws_account_number"`
	AwsOfferID            string                                                        `json:"aws_offer_id"`
	AwsPayerReferenceID   string                                                        `json:"aws_payer_reference_id"`
	EndingBefore          time.Time                                                     `json:"ending_before" format:"date-time"`
	GcpAccountID          string                                                        `json:"gcp_account_id"`
	GcpOfferID            string                                                        `json:"gcp_offer_id"`
	ResellerContractValue float64                                                       `json:"reseller_contract_value"`
	JSON                  v1ContractGetResponseDataCurrentResellerRoyaltyJSON           `json:"-"`
}

func (*V1ContractGetResponseDataCurrentResellerRoyalty) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentScheduledCharge

type V1ContractGetResponseDataCurrentScheduledCharge struct {
	ID           string                                                   `json:"id,required" format:"uuid"`
	Product      V1ContractGetResponseDataCurrentScheduledChargesProduct  `json:"product,required"`
	Schedule     V1ContractGetResponseDataCurrentScheduledChargesSchedule `json:"schedule,required"`
	ArchivedAt   time.Time                                                `json:"archived_at" format:"date-time"`
	CustomFields map[string]string                                        `json:"custom_fields"`
	// displayed on invoices
	Name string `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string                                              `json:"netsuite_sales_order_id"`
	JSON                 v1ContractGetResponseDataCurrentScheduledChargeJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentScheduledCharge) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentScheduledChargesOnUsageInvoices

type V1ContractGetResponseDataCurrentScheduledChargesOnUsageInvoices string

Determines which scheduled and commit charges to consolidate onto the Contract's usage invoice. The charge's `timestamp` must match the usage invoice's `ending_before` date for consolidation to occur. This field cannot be modified after a Contract has been created. If this field is omitted, charges will appear on a separate invoice from usage charges.

const (
	V1ContractGetResponseDataCurrentScheduledChargesOnUsageInvoicesAll V1ContractGetResponseDataCurrentScheduledChargesOnUsageInvoices = "ALL"
)

func (V1ContractGetResponseDataCurrentScheduledChargesOnUsageInvoices) IsKnown

type V1ContractGetResponseDataCurrentScheduledChargesProduct

type V1ContractGetResponseDataCurrentScheduledChargesProduct struct {
	ID   string                                                      `json:"id,required" format:"uuid"`
	Name string                                                      `json:"name,required"`
	JSON v1ContractGetResponseDataCurrentScheduledChargesProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentScheduledChargesProduct) UnmarshalJSON

type V1ContractGetResponseDataCurrentScheduledChargesSchedule

type V1ContractGetResponseDataCurrentScheduledChargesSchedule struct {
	CreditType    V1ContractGetResponseDataCurrentScheduledChargesScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractGetResponseDataCurrentScheduledChargesScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractGetResponseDataCurrentScheduledChargesScheduleJSON           `json:"-"`
}

func (*V1ContractGetResponseDataCurrentScheduledChargesSchedule) UnmarshalJSON

type V1ContractGetResponseDataCurrentScheduledChargesScheduleCreditType

type V1ContractGetResponseDataCurrentScheduledChargesScheduleCreditType struct {
	ID   string                                                                 `json:"id,required" format:"uuid"`
	Name string                                                                 `json:"name,required"`
	JSON v1ContractGetResponseDataCurrentScheduledChargesScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentScheduledChargesScheduleCreditType) UnmarshalJSON

type V1ContractGetResponseDataCurrentScheduledChargesScheduleScheduleItem

type V1ContractGetResponseDataCurrentScheduledChargesScheduleScheduleItem struct {
	ID        string                                                                   `json:"id,required" format:"uuid"`
	Amount    float64                                                                  `json:"amount,required"`
	InvoiceID string                                                                   `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                                  `json:"quantity,required"`
	Timestamp time.Time                                                                `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                                  `json:"unit_price,required"`
	JSON      v1ContractGetResponseDataCurrentScheduledChargesScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentScheduledChargesScheduleScheduleItem) UnmarshalJSON

type V1ContractGetResponseDataCurrentSpendThresholdConfiguration

type V1ContractGetResponseDataCurrentSpendThresholdConfiguration struct {
	Commit V1ContractGetResponseDataCurrentSpendThresholdConfigurationCommit `json:"commit,required"`
	// When set to false, the contract will not be evaluated against the
	// threshold_amount. Toggling to true will result an immediate evaluation,
	// regardless of prior state.
	IsEnabled         bool                                                                         `json:"is_enabled,required"`
	PaymentGateConfig V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfig `json:"payment_gate_config,required"`
	// Specify the threshold amount for the contract. Each time the contract's usage
	// hits this amount, a threshold charge will be initiated.
	ThresholdAmount float64                                                         `json:"threshold_amount,required"`
	JSON            v1ContractGetResponseDataCurrentSpendThresholdConfigurationJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentSpendThresholdConfiguration) UnmarshalJSON

type V1ContractGetResponseDataCurrentSpendThresholdConfigurationCommit

type V1ContractGetResponseDataCurrentSpendThresholdConfigurationCommit struct {
	// The commit product that will be used to generate the line item for commit
	// payment.
	ProductID   string `json:"product_id,required"`
	Description string `json:"description"`
	// Specify the name of the line item for the threshold charge. If left blank, it
	// will default to the commit product name.
	Name string                                                                `json:"name"`
	JSON v1ContractGetResponseDataCurrentSpendThresholdConfigurationCommitJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentSpendThresholdConfigurationCommit) UnmarshalJSON

type V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfig

type V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfig struct {
	// Gate access to the commit balance based on successful collection of payment.
	// Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
	// facilitate payment using your own payment integration. Select NONE if you do not
	// wish to payment gate the commit balance.
	PaymentGateType V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateType `json:"payment_gate_type,required"`
	// Only applicable if using Stripe as your payment gateway through Metronome.
	StripeConfig V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfig `json:"stripe_config"`
	// Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
	// not wish Metronome to calculate tax on your behalf. Leaving this field blank
	// will default to NONE.
	TaxType V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigTaxType `json:"tax_type"`
	JSON    v1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigJSON    `json:"-"`
}

func (*V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfig) UnmarshalJSON

type V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateType

type V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateType string

Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance.

const (
	V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateTypeNone     V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateType = "NONE"
	V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateTypeStripe   V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateType = "STRIPE"
	V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateTypeExternal V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateType = "EXTERNAL"
)

func (V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateType) IsKnown

type V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfig

type V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfig struct {
	// If left blank, will default to INVOICE
	PaymentType V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType `json:"payment_type,required"`
	JSON        v1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfigJSON        `json:"-"`
}

Only applicable if using Stripe as your payment gateway through Metronome.

func (*V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfig) UnmarshalJSON

type V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType

type V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType string

If left blank, will default to INVOICE

const (
	V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypeInvoice       V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "INVOICE"
	V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypePaymentIntent V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "PAYMENT_INTENT"
)

func (V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType) IsKnown

type V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigTaxType

type V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigTaxType string

Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE.

const (
	V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigTaxTypeNone   V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigTaxType = "NONE"
	V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigTaxTypeStripe V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigTaxType = "STRIPE"
)

func (V1ContractGetResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigTaxType) IsKnown

type V1ContractGetResponseDataCurrentTransition

type V1ContractGetResponseDataCurrentTransition struct {
	FromContractID string                                          `json:"from_contract_id,required" format:"uuid"`
	ToContractID   string                                          `json:"to_contract_id,required" format:"uuid"`
	Type           V1ContractGetResponseDataCurrentTransitionsType `json:"type,required"`
	JSON           v1ContractGetResponseDataCurrentTransitionJSON  `json:"-"`
}

func (*V1ContractGetResponseDataCurrentTransition) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentTransitionsType

type V1ContractGetResponseDataCurrentTransitionsType string
const (
	V1ContractGetResponseDataCurrentTransitionsTypeSupersede V1ContractGetResponseDataCurrentTransitionsType = "SUPERSEDE"
	V1ContractGetResponseDataCurrentTransitionsTypeRenewal   V1ContractGetResponseDataCurrentTransitionsType = "RENEWAL"
)

func (V1ContractGetResponseDataCurrentTransitionsType) IsKnown

type V1ContractGetResponseDataCurrentUsageFilter

type V1ContractGetResponseDataCurrentUsageFilter struct {
	Current V1ContractGetResponseDataCurrentUsageFilterCurrent  `json:"current,required,nullable"`
	Initial V1ContractGetResponseDataCurrentUsageFilterInitial  `json:"initial,required"`
	Updates []V1ContractGetResponseDataCurrentUsageFilterUpdate `json:"updates,required"`
	JSON    v1ContractGetResponseDataCurrentUsageFilterJSON     `json:"-"`
}

func (*V1ContractGetResponseDataCurrentUsageFilter) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentUsageFilterCurrent

type V1ContractGetResponseDataCurrentUsageFilterCurrent struct {
	GroupKey    string                                                 `json:"group_key,required"`
	GroupValues []string                                               `json:"group_values,required"`
	StartingAt  time.Time                                              `json:"starting_at" format:"date-time"`
	JSON        v1ContractGetResponseDataCurrentUsageFilterCurrentJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentUsageFilterCurrent) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentUsageFilterInitial

type V1ContractGetResponseDataCurrentUsageFilterInitial struct {
	GroupKey    string                                                 `json:"group_key,required"`
	GroupValues []string                                               `json:"group_values,required"`
	StartingAt  time.Time                                              `json:"starting_at" format:"date-time"`
	JSON        v1ContractGetResponseDataCurrentUsageFilterInitialJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentUsageFilterInitial) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentUsageFilterUpdate

type V1ContractGetResponseDataCurrentUsageFilterUpdate struct {
	GroupKey    string                                                `json:"group_key,required"`
	GroupValues []string                                              `json:"group_values,required"`
	StartingAt  time.Time                                             `json:"starting_at,required" format:"date-time"`
	JSON        v1ContractGetResponseDataCurrentUsageFilterUpdateJSON `json:"-"`
}

func (*V1ContractGetResponseDataCurrentUsageFilterUpdate) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentUsageStatementSchedule

type V1ContractGetResponseDataCurrentUsageStatementSchedule struct {
	// Contract usage statements follow a selected cadence based on this date.
	BillingAnchorDate time.Time                                                       `json:"billing_anchor_date,required" format:"date-time"`
	Frequency         V1ContractGetResponseDataCurrentUsageStatementScheduleFrequency `json:"frequency,required"`
	JSON              v1ContractGetResponseDataCurrentUsageStatementScheduleJSON      `json:"-"`
}

func (*V1ContractGetResponseDataCurrentUsageStatementSchedule) UnmarshalJSON

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

type V1ContractGetResponseDataCurrentUsageStatementScheduleFrequency

type V1ContractGetResponseDataCurrentUsageStatementScheduleFrequency string
const (
	V1ContractGetResponseDataCurrentUsageStatementScheduleFrequencyMonthly   V1ContractGetResponseDataCurrentUsageStatementScheduleFrequency = "MONTHLY"
	V1ContractGetResponseDataCurrentUsageStatementScheduleFrequencyQuarterly V1ContractGetResponseDataCurrentUsageStatementScheduleFrequency = "QUARTERLY"
	V1ContractGetResponseDataCurrentUsageStatementScheduleFrequencyAnnual    V1ContractGetResponseDataCurrentUsageStatementScheduleFrequency = "ANNUAL"
	V1ContractGetResponseDataCurrentUsageStatementScheduleFrequencyWeekly    V1ContractGetResponseDataCurrentUsageStatementScheduleFrequency = "WEEKLY"
)

func (V1ContractGetResponseDataCurrentUsageStatementScheduleFrequency) IsKnown

type V1ContractGetResponseDataCustomerBillingProviderConfiguration

type V1ContractGetResponseDataCustomerBillingProviderConfiguration struct {
	BillingProvider V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider `json:"billing_provider,required"`
	DeliveryMethod  V1ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethod  `json:"delivery_method,required"`
	ID              string                                                                       `json:"id" format:"uuid"`
	// Configuration for the billing provider. The structure of this object is specific
	// to the billing provider.
	Configuration map[string]interface{}                                            `json:"configuration"`
	JSON          v1ContractGetResponseDataCustomerBillingProviderConfigurationJSON `json:"-"`
}

The billing provider configuration associated with a contract.

func (*V1ContractGetResponseDataCustomerBillingProviderConfiguration) UnmarshalJSON

type V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider

type V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider string
const (
	V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderAwsMarketplace   V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider = "aws_marketplace"
	V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderStripe           V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider = "stripe"
	V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderNetsuite         V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider = "netsuite"
	V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderCustom           V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider = "custom"
	V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderAzureMarketplace V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider = "azure_marketplace"
	V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderQuickbooksOnline V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider = "quickbooks_online"
	V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderWorkday          V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider = "workday"
	V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderGcpMarketplace   V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider = "gcp_marketplace"
)

func (V1ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider) IsKnown

type V1ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethod

type V1ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethod string
const (
	V1ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethodDirectToBillingProvider V1ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethod = "direct_to_billing_provider"
	V1ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethodAwsSqs                  V1ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethod = "aws_sqs"
	V1ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethodTackle                  V1ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethod = "tackle"
	V1ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethodAwsSns                  V1ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethod = "aws_sns"
)

func (V1ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethod) IsKnown

type V1ContractGetResponseDataInitial

type V1ContractGetResponseDataInitial struct {
	Commits                []V1ContractGetResponseDataInitialCommit               `json:"commits,required"`
	CreatedAt              time.Time                                              `json:"created_at,required" format:"date-time"`
	CreatedBy              string                                                 `json:"created_by,required"`
	Overrides              []V1ContractGetResponseDataInitialOverride             `json:"overrides,required"`
	ScheduledCharges       []V1ContractGetResponseDataInitialScheduledCharge      `json:"scheduled_charges,required"`
	StartingAt             time.Time                                              `json:"starting_at,required" format:"date-time"`
	Transitions            []V1ContractGetResponseDataInitialTransition           `json:"transitions,required"`
	UsageStatementSchedule V1ContractGetResponseDataInitialUsageStatementSchedule `json:"usage_statement_schedule,required"`
	Credits                []V1ContractGetResponseDataInitialCredit               `json:"credits"`
	// This field's availability is dependent on your client's configuration.
	Discounts           []V1ContractGetResponseDataInitialDiscount `json:"discounts"`
	EndingBefore        time.Time                                  `json:"ending_before" format:"date-time"`
	Name                string                                     `json:"name"`
	NetPaymentTermsDays float64                                    `json:"net_payment_terms_days"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID                 string                                                               `json:"netsuite_sales_order_id"`
	PrepaidBalanceThresholdConfiguration V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfiguration `json:"prepaid_balance_threshold_configuration"`
	// This field's availability is dependent on your client's configuration.
	ProfessionalServices []V1ContractGetResponseDataInitialProfessionalService `json:"professional_services"`
	RateCardID           string                                                `json:"rate_card_id" format:"uuid"`
	RecurringCommits     []V1ContractGetResponseDataInitialRecurringCommit     `json:"recurring_commits"`
	RecurringCredits     []V1ContractGetResponseDataInitialRecurringCredit     `json:"recurring_credits"`
	// This field's availability is dependent on your client's configuration.
	ResellerRoyalties []V1ContractGetResponseDataInitialResellerRoyalty `json:"reseller_royalties"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// Determines which scheduled and commit charges to consolidate onto the Contract's
	// usage invoice. The charge's `timestamp` must match the usage invoice's
	// `ending_before` date for consolidation to occur. This field cannot be modified
	// after a Contract has been created. If this field is omitted, charges will appear
	// on a separate invoice from usage charges.
	ScheduledChargesOnUsageInvoices V1ContractGetResponseDataInitialScheduledChargesOnUsageInvoices `json:"scheduled_charges_on_usage_invoices"`
	SpendThresholdConfiguration     V1ContractGetResponseDataInitialSpendThresholdConfiguration     `json:"spend_threshold_configuration"`
	// This field's availability is dependent on your client's configuration.
	TotalContractValue float64                                     `json:"total_contract_value"`
	UsageFilter        V1ContractGetResponseDataInitialUsageFilter `json:"usage_filter"`
	JSON               v1ContractGetResponseDataInitialJSON        `json:"-"`
}

func (*V1ContractGetResponseDataInitial) UnmarshalJSON

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

type V1ContractGetResponseDataInitialCommit

type V1ContractGetResponseDataInitialCommit struct {
	ID      string                                         `json:"id,required" format:"uuid"`
	Product V1ContractGetResponseDataInitialCommitsProduct `json:"product,required"`
	Type    V1ContractGetResponseDataInitialCommitsType    `json:"type,required"`
	// The schedule that the customer will gain access to the credits purposed with
	// this commit.
	AccessSchedule V1ContractGetResponseDataInitialCommitsAccessSchedule `json:"access_schedule"`
	// (DEPRECATED) Use access_schedule + invoice_schedule instead.
	Amount                float64  `json:"amount"`
	ApplicableContractIDs []string `json:"applicable_contract_ids" format:"uuid"`
	ApplicableProductIDs  []string `json:"applicable_product_ids" format:"uuid"`
	ApplicableProductTags []string `json:"applicable_product_tags"`
	// RFC 3339 timestamp indicating when the commit was archived. If not provided, the
	// commit is not archived.
	ArchivedAt time.Time `json:"archived_at" format:"date-time"`
	// The current balance of the credit or commit. This balance reflects the amount of
	// credit or commit that the customer has access to use at this moment - thus,
	// expired and upcoming credit or commit segments contribute 0 to the balance. The
	// balance will match the sum of all ledger entries with the exception of the case
	// where the sum of negative manual ledger entries exceeds the positive amount
	// remaining on the credit or commit - in that case, the balance will be 0. All
	// manual ledger entries associated with active credit or commit segments are
	// included in the balance, including future-dated manual ledger entries.
	Balance      float64                                         `json:"balance"`
	Contract     V1ContractGetResponseDataInitialCommitsContract `json:"contract"`
	CustomFields map[string]string                               `json:"custom_fields"`
	Description  string                                          `json:"description"`
	// The contract that this commit will be billed on.
	InvoiceContract V1ContractGetResponseDataInitialCommitsInvoiceContract `json:"invoice_contract"`
	// The schedule that the customer will be invoiced for this commit.
	InvoiceSchedule V1ContractGetResponseDataInitialCommitsInvoiceSchedule `json:"invoice_schedule"`
	// A list of ordered events that impact the balance of a commit. For example, an
	// invoice deduction or a rollover.
	Ledger []V1ContractGetResponseDataInitialCommitsLedger `json:"ledger"`
	Name   string                                          `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// If multiple credits or commits are applicable, the one with the lower priority
	// will apply first.
	Priority         float64                                               `json:"priority"`
	RateType         V1ContractGetResponseDataInitialCommitsRateType       `json:"rate_type"`
	RolledOverFrom   V1ContractGetResponseDataInitialCommitsRolledOverFrom `json:"rolled_over_from"`
	RolloverFraction float64                                               `json:"rollover_fraction"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractGetResponseDataInitialCommitsSpecifier `json:"specifiers"`
	// Prevents the creation of duplicates. If a request to create a commit or credit
	// is made with a uniqueness key that was previously used to create a commit or
	// credit, a new record will not be created and the request will fail with a 409
	// error.
	UniquenessKey string                                     `json:"uniqueness_key"`
	JSON          v1ContractGetResponseDataInitialCommitJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialCommit) UnmarshalJSON

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

type V1ContractGetResponseDataInitialCommitsAccessSchedule

type V1ContractGetResponseDataInitialCommitsAccessSchedule struct {
	ScheduleItems []V1ContractGetResponseDataInitialCommitsAccessScheduleScheduleItem `json:"schedule_items,required"`
	CreditType    V1ContractGetResponseDataInitialCommitsAccessScheduleCreditType     `json:"credit_type"`
	JSON          v1ContractGetResponseDataInitialCommitsAccessScheduleJSON           `json:"-"`
}

The schedule that the customer will gain access to the credits purposed with this commit.

func (*V1ContractGetResponseDataInitialCommitsAccessSchedule) UnmarshalJSON

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

type V1ContractGetResponseDataInitialCommitsAccessScheduleCreditType

type V1ContractGetResponseDataInitialCommitsAccessScheduleCreditType struct {
	ID   string                                                              `json:"id,required" format:"uuid"`
	Name string                                                              `json:"name,required"`
	JSON v1ContractGetResponseDataInitialCommitsAccessScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialCommitsAccessScheduleCreditType) UnmarshalJSON

type V1ContractGetResponseDataInitialCommitsAccessScheduleScheduleItem

type V1ContractGetResponseDataInitialCommitsAccessScheduleScheduleItem struct {
	ID           string                                                                `json:"id,required" format:"uuid"`
	Amount       float64                                                               `json:"amount,required"`
	EndingBefore time.Time                                                             `json:"ending_before,required" format:"date-time"`
	StartingAt   time.Time                                                             `json:"starting_at,required" format:"date-time"`
	JSON         v1ContractGetResponseDataInitialCommitsAccessScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialCommitsAccessScheduleScheduleItem) UnmarshalJSON

type V1ContractGetResponseDataInitialCommitsContract

type V1ContractGetResponseDataInitialCommitsContract struct {
	ID   string                                              `json:"id,required" format:"uuid"`
	JSON v1ContractGetResponseDataInitialCommitsContractJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialCommitsContract) UnmarshalJSON

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

type V1ContractGetResponseDataInitialCommitsInvoiceContract

type V1ContractGetResponseDataInitialCommitsInvoiceContract struct {
	ID   string                                                     `json:"id,required" format:"uuid"`
	JSON v1ContractGetResponseDataInitialCommitsInvoiceContractJSON `json:"-"`
}

The contract that this commit will be billed on.

func (*V1ContractGetResponseDataInitialCommitsInvoiceContract) UnmarshalJSON

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

type V1ContractGetResponseDataInitialCommitsInvoiceSchedule

type V1ContractGetResponseDataInitialCommitsInvoiceSchedule struct {
	CreditType    V1ContractGetResponseDataInitialCommitsInvoiceScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractGetResponseDataInitialCommitsInvoiceScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractGetResponseDataInitialCommitsInvoiceScheduleJSON           `json:"-"`
}

The schedule that the customer will be invoiced for this commit.

func (*V1ContractGetResponseDataInitialCommitsInvoiceSchedule) UnmarshalJSON

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

type V1ContractGetResponseDataInitialCommitsInvoiceScheduleCreditType

type V1ContractGetResponseDataInitialCommitsInvoiceScheduleCreditType struct {
	ID   string                                                               `json:"id,required" format:"uuid"`
	Name string                                                               `json:"name,required"`
	JSON v1ContractGetResponseDataInitialCommitsInvoiceScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialCommitsInvoiceScheduleCreditType) UnmarshalJSON

type V1ContractGetResponseDataInitialCommitsInvoiceScheduleScheduleItem

type V1ContractGetResponseDataInitialCommitsInvoiceScheduleScheduleItem struct {
	ID        string                                                                 `json:"id,required" format:"uuid"`
	Amount    float64                                                                `json:"amount,required"`
	InvoiceID string                                                                 `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                                `json:"quantity,required"`
	Timestamp time.Time                                                              `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                                `json:"unit_price,required"`
	JSON      v1ContractGetResponseDataInitialCommitsInvoiceScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialCommitsInvoiceScheduleScheduleItem) UnmarshalJSON

type V1ContractGetResponseDataInitialCommitsLedger

type V1ContractGetResponseDataInitialCommitsLedger struct {
	Amount        float64                                           `json:"amount,required"`
	Timestamp     time.Time                                         `json:"timestamp,required" format:"date-time"`
	Type          V1ContractGetResponseDataInitialCommitsLedgerType `json:"type,required"`
	InvoiceID     string                                            `json:"invoice_id" format:"uuid"`
	NewContractID string                                            `json:"new_contract_id" format:"uuid"`
	Reason        string                                            `json:"reason"`
	SegmentID     string                                            `json:"segment_id" format:"uuid"`
	JSON          v1ContractGetResponseDataInitialCommitsLedgerJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*V1ContractGetResponseDataInitialCommitsLedger) UnmarshalJSON

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

type V1ContractGetResponseDataInitialCommitsLedgerObject

type V1ContractGetResponseDataInitialCommitsLedgerObject struct {
	Amount    float64                                                 `json:"amount,required"`
	SegmentID string                                                  `json:"segment_id,required" format:"uuid"`
	Timestamp time.Time                                               `json:"timestamp,required" format:"date-time"`
	Type      V1ContractGetResponseDataInitialCommitsLedgerObjectType `json:"type,required"`
	JSON      v1ContractGetResponseDataInitialCommitsLedgerObjectJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialCommitsLedgerObject) UnmarshalJSON

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

type V1ContractGetResponseDataInitialCommitsLedgerObjectType

type V1ContractGetResponseDataInitialCommitsLedgerObjectType string
const (
	V1ContractGetResponseDataInitialCommitsLedgerObjectTypePrepaidCommitSegmentStart V1ContractGetResponseDataInitialCommitsLedgerObjectType = "PREPAID_COMMIT_SEGMENT_START"
)

func (V1ContractGetResponseDataInitialCommitsLedgerObjectType) IsKnown

type V1ContractGetResponseDataInitialCommitsLedgerType

type V1ContractGetResponseDataInitialCommitsLedgerType string
const (
	V1ContractGetResponseDataInitialCommitsLedgerTypePrepaidCommitSegmentStart               V1ContractGetResponseDataInitialCommitsLedgerType = "PREPAID_COMMIT_SEGMENT_START"
	V1ContractGetResponseDataInitialCommitsLedgerTypePrepaidCommitAutomatedInvoiceDeduction  V1ContractGetResponseDataInitialCommitsLedgerType = "PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractGetResponseDataInitialCommitsLedgerTypePrepaidCommitRollover                   V1ContractGetResponseDataInitialCommitsLedgerType = "PREPAID_COMMIT_ROLLOVER"
	V1ContractGetResponseDataInitialCommitsLedgerTypePrepaidCommitExpiration                 V1ContractGetResponseDataInitialCommitsLedgerType = "PREPAID_COMMIT_EXPIRATION"
	V1ContractGetResponseDataInitialCommitsLedgerTypePrepaidCommitCanceled                   V1ContractGetResponseDataInitialCommitsLedgerType = "PREPAID_COMMIT_CANCELED"
	V1ContractGetResponseDataInitialCommitsLedgerTypePrepaidCommitCredited                   V1ContractGetResponseDataInitialCommitsLedgerType = "PREPAID_COMMIT_CREDITED"
	V1ContractGetResponseDataInitialCommitsLedgerTypePostpaidCommitInitialBalance            V1ContractGetResponseDataInitialCommitsLedgerType = "POSTPAID_COMMIT_INITIAL_BALANCE"
	V1ContractGetResponseDataInitialCommitsLedgerTypePostpaidCommitAutomatedInvoiceDeduction V1ContractGetResponseDataInitialCommitsLedgerType = "POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractGetResponseDataInitialCommitsLedgerTypePostpaidCommitRollover                  V1ContractGetResponseDataInitialCommitsLedgerType = "POSTPAID_COMMIT_ROLLOVER"
	V1ContractGetResponseDataInitialCommitsLedgerTypePostpaidCommitTrueup                    V1ContractGetResponseDataInitialCommitsLedgerType = "POSTPAID_COMMIT_TRUEUP"
	V1ContractGetResponseDataInitialCommitsLedgerTypePrepaidCommitManual                     V1ContractGetResponseDataInitialCommitsLedgerType = "PREPAID_COMMIT_MANUAL"
	V1ContractGetResponseDataInitialCommitsLedgerTypePostpaidCommitManual                    V1ContractGetResponseDataInitialCommitsLedgerType = "POSTPAID_COMMIT_MANUAL"
	V1ContractGetResponseDataInitialCommitsLedgerTypePostpaidCommitExpiration                V1ContractGetResponseDataInitialCommitsLedgerType = "POSTPAID_COMMIT_EXPIRATION"
)

func (V1ContractGetResponseDataInitialCommitsLedgerType) IsKnown

type V1ContractGetResponseDataInitialCommitsProduct

type V1ContractGetResponseDataInitialCommitsProduct struct {
	ID   string                                             `json:"id,required" format:"uuid"`
	Name string                                             `json:"name,required"`
	JSON v1ContractGetResponseDataInitialCommitsProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialCommitsProduct) UnmarshalJSON

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

type V1ContractGetResponseDataInitialCommitsRateType

type V1ContractGetResponseDataInitialCommitsRateType string
const (
	V1ContractGetResponseDataInitialCommitsRateTypeCommitRate V1ContractGetResponseDataInitialCommitsRateType = "COMMIT_RATE"
	V1ContractGetResponseDataInitialCommitsRateTypeListRate   V1ContractGetResponseDataInitialCommitsRateType = "LIST_RATE"
)

func (V1ContractGetResponseDataInitialCommitsRateType) IsKnown

type V1ContractGetResponseDataInitialCommitsRolledOverFrom

type V1ContractGetResponseDataInitialCommitsRolledOverFrom struct {
	CommitID   string                                                    `json:"commit_id,required" format:"uuid"`
	ContractID string                                                    `json:"contract_id,required" format:"uuid"`
	JSON       v1ContractGetResponseDataInitialCommitsRolledOverFromJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialCommitsRolledOverFrom) UnmarshalJSON

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

type V1ContractGetResponseDataInitialCommitsSpecifier

type V1ContractGetResponseDataInitialCommitsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                             `json:"product_tags"`
	JSON        v1ContractGetResponseDataInitialCommitsSpecifierJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialCommitsSpecifier) UnmarshalJSON

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

type V1ContractGetResponseDataInitialCommitsType

type V1ContractGetResponseDataInitialCommitsType string
const (
	V1ContractGetResponseDataInitialCommitsTypePrepaid  V1ContractGetResponseDataInitialCommitsType = "PREPAID"
	V1ContractGetResponseDataInitialCommitsTypePostpaid V1ContractGetResponseDataInitialCommitsType = "POSTPAID"
)

func (V1ContractGetResponseDataInitialCommitsType) IsKnown

type V1ContractGetResponseDataInitialCredit

type V1ContractGetResponseDataInitialCredit struct {
	ID      string                                         `json:"id,required" format:"uuid"`
	Product V1ContractGetResponseDataInitialCreditsProduct `json:"product,required"`
	Type    V1ContractGetResponseDataInitialCreditsType    `json:"type,required"`
	// The schedule that the customer will gain access to the credits.
	AccessSchedule        V1ContractGetResponseDataInitialCreditsAccessSchedule `json:"access_schedule"`
	ApplicableContractIDs []string                                              `json:"applicable_contract_ids" format:"uuid"`
	ApplicableProductIDs  []string                                              `json:"applicable_product_ids" format:"uuid"`
	ApplicableProductTags []string                                              `json:"applicable_product_tags"`
	// The current balance of the credit or commit. This balance reflects the amount of
	// credit or commit that the customer has access to use at this moment - thus,
	// expired and upcoming credit or commit segments contribute 0 to the balance. The
	// balance will match the sum of all ledger entries with the exception of the case
	// where the sum of negative manual ledger entries exceeds the positive amount
	// remaining on the credit or commit - in that case, the balance will be 0. All
	// manual ledger entries associated with active credit or commit segments are
	// included in the balance, including future-dated manual ledger entries.
	Balance      float64                                         `json:"balance"`
	Contract     V1ContractGetResponseDataInitialCreditsContract `json:"contract"`
	CustomFields map[string]string                               `json:"custom_fields"`
	Description  string                                          `json:"description"`
	// A list of ordered events that impact the balance of a credit. For example, an
	// invoice deduction or an expiration.
	Ledger []V1ContractGetResponseDataInitialCreditsLedger `json:"ledger"`
	Name   string                                          `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// If multiple credits or commits are applicable, the one with the lower priority
	// will apply first.
	Priority float64                                         `json:"priority"`
	RateType V1ContractGetResponseDataInitialCreditsRateType `json:"rate_type"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractGetResponseDataInitialCreditsSpecifier `json:"specifiers"`
	// Prevents the creation of duplicates. If a request to create a commit or credit
	// is made with a uniqueness key that was previously used to create a commit or
	// credit, a new record will not be created and the request will fail with a 409
	// error.
	UniquenessKey string                                     `json:"uniqueness_key"`
	JSON          v1ContractGetResponseDataInitialCreditJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialCredit) UnmarshalJSON

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

type V1ContractGetResponseDataInitialCreditsAccessSchedule

type V1ContractGetResponseDataInitialCreditsAccessSchedule struct {
	ScheduleItems []V1ContractGetResponseDataInitialCreditsAccessScheduleScheduleItem `json:"schedule_items,required"`
	CreditType    V1ContractGetResponseDataInitialCreditsAccessScheduleCreditType     `json:"credit_type"`
	JSON          v1ContractGetResponseDataInitialCreditsAccessScheduleJSON           `json:"-"`
}

The schedule that the customer will gain access to the credits.

func (*V1ContractGetResponseDataInitialCreditsAccessSchedule) UnmarshalJSON

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

type V1ContractGetResponseDataInitialCreditsAccessScheduleCreditType

type V1ContractGetResponseDataInitialCreditsAccessScheduleCreditType struct {
	ID   string                                                              `json:"id,required" format:"uuid"`
	Name string                                                              `json:"name,required"`
	JSON v1ContractGetResponseDataInitialCreditsAccessScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialCreditsAccessScheduleCreditType) UnmarshalJSON

type V1ContractGetResponseDataInitialCreditsAccessScheduleScheduleItem

type V1ContractGetResponseDataInitialCreditsAccessScheduleScheduleItem struct {
	ID           string                                                                `json:"id,required" format:"uuid"`
	Amount       float64                                                               `json:"amount,required"`
	EndingBefore time.Time                                                             `json:"ending_before,required" format:"date-time"`
	StartingAt   time.Time                                                             `json:"starting_at,required" format:"date-time"`
	JSON         v1ContractGetResponseDataInitialCreditsAccessScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialCreditsAccessScheduleScheduleItem) UnmarshalJSON

type V1ContractGetResponseDataInitialCreditsContract

type V1ContractGetResponseDataInitialCreditsContract struct {
	ID   string                                              `json:"id,required" format:"uuid"`
	JSON v1ContractGetResponseDataInitialCreditsContractJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialCreditsContract) UnmarshalJSON

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

type V1ContractGetResponseDataInitialCreditsLedger

type V1ContractGetResponseDataInitialCreditsLedger struct {
	Amount    float64                                           `json:"amount,required"`
	Timestamp time.Time                                         `json:"timestamp,required" format:"date-time"`
	Type      V1ContractGetResponseDataInitialCreditsLedgerType `json:"type,required"`
	InvoiceID string                                            `json:"invoice_id" format:"uuid"`
	Reason    string                                            `json:"reason"`
	SegmentID string                                            `json:"segment_id" format:"uuid"`
	JSON      v1ContractGetResponseDataInitialCreditsLedgerJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*V1ContractGetResponseDataInitialCreditsLedger) UnmarshalJSON

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

type V1ContractGetResponseDataInitialCreditsLedgerObject

type V1ContractGetResponseDataInitialCreditsLedgerObject struct {
	Amount    float64                                                 `json:"amount,required"`
	SegmentID string                                                  `json:"segment_id,required" format:"uuid"`
	Timestamp time.Time                                               `json:"timestamp,required" format:"date-time"`
	Type      V1ContractGetResponseDataInitialCreditsLedgerObjectType `json:"type,required"`
	JSON      v1ContractGetResponseDataInitialCreditsLedgerObjectJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialCreditsLedgerObject) UnmarshalJSON

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

type V1ContractGetResponseDataInitialCreditsLedgerObjectType

type V1ContractGetResponseDataInitialCreditsLedgerObjectType string
const (
	V1ContractGetResponseDataInitialCreditsLedgerObjectTypeCreditSegmentStart V1ContractGetResponseDataInitialCreditsLedgerObjectType = "CREDIT_SEGMENT_START"
)

func (V1ContractGetResponseDataInitialCreditsLedgerObjectType) IsKnown

type V1ContractGetResponseDataInitialCreditsLedgerType

type V1ContractGetResponseDataInitialCreditsLedgerType string
const (
	V1ContractGetResponseDataInitialCreditsLedgerTypeCreditSegmentStart              V1ContractGetResponseDataInitialCreditsLedgerType = "CREDIT_SEGMENT_START"
	V1ContractGetResponseDataInitialCreditsLedgerTypeCreditAutomatedInvoiceDeduction V1ContractGetResponseDataInitialCreditsLedgerType = "CREDIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractGetResponseDataInitialCreditsLedgerTypeCreditExpiration                V1ContractGetResponseDataInitialCreditsLedgerType = "CREDIT_EXPIRATION"
	V1ContractGetResponseDataInitialCreditsLedgerTypeCreditCanceled                  V1ContractGetResponseDataInitialCreditsLedgerType = "CREDIT_CANCELED"
	V1ContractGetResponseDataInitialCreditsLedgerTypeCreditCredited                  V1ContractGetResponseDataInitialCreditsLedgerType = "CREDIT_CREDITED"
	V1ContractGetResponseDataInitialCreditsLedgerTypeCreditManual                    V1ContractGetResponseDataInitialCreditsLedgerType = "CREDIT_MANUAL"
)

func (V1ContractGetResponseDataInitialCreditsLedgerType) IsKnown

type V1ContractGetResponseDataInitialCreditsProduct

type V1ContractGetResponseDataInitialCreditsProduct struct {
	ID   string                                             `json:"id,required" format:"uuid"`
	Name string                                             `json:"name,required"`
	JSON v1ContractGetResponseDataInitialCreditsProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialCreditsProduct) UnmarshalJSON

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

type V1ContractGetResponseDataInitialCreditsRateType

type V1ContractGetResponseDataInitialCreditsRateType string
const (
	V1ContractGetResponseDataInitialCreditsRateTypeCommitRate V1ContractGetResponseDataInitialCreditsRateType = "COMMIT_RATE"
	V1ContractGetResponseDataInitialCreditsRateTypeListRate   V1ContractGetResponseDataInitialCreditsRateType = "LIST_RATE"
)

func (V1ContractGetResponseDataInitialCreditsRateType) IsKnown

type V1ContractGetResponseDataInitialCreditsSpecifier

type V1ContractGetResponseDataInitialCreditsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                             `json:"product_tags"`
	JSON        v1ContractGetResponseDataInitialCreditsSpecifierJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialCreditsSpecifier) UnmarshalJSON

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

type V1ContractGetResponseDataInitialCreditsType

type V1ContractGetResponseDataInitialCreditsType string
const (
	V1ContractGetResponseDataInitialCreditsTypeCredit V1ContractGetResponseDataInitialCreditsType = "CREDIT"
)

func (V1ContractGetResponseDataInitialCreditsType) IsKnown

type V1ContractGetResponseDataInitialDiscount

type V1ContractGetResponseDataInitialDiscount struct {
	ID           string                                            `json:"id,required" format:"uuid"`
	Product      V1ContractGetResponseDataInitialDiscountsProduct  `json:"product,required"`
	Schedule     V1ContractGetResponseDataInitialDiscountsSchedule `json:"schedule,required"`
	CustomFields map[string]string                                 `json:"custom_fields"`
	Name         string                                            `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string                                       `json:"netsuite_sales_order_id"`
	JSON                 v1ContractGetResponseDataInitialDiscountJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialDiscount) UnmarshalJSON

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

type V1ContractGetResponseDataInitialDiscountsProduct

type V1ContractGetResponseDataInitialDiscountsProduct struct {
	ID   string                                               `json:"id,required" format:"uuid"`
	Name string                                               `json:"name,required"`
	JSON v1ContractGetResponseDataInitialDiscountsProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialDiscountsProduct) UnmarshalJSON

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

type V1ContractGetResponseDataInitialDiscountsSchedule

type V1ContractGetResponseDataInitialDiscountsSchedule struct {
	CreditType    V1ContractGetResponseDataInitialDiscountsScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractGetResponseDataInitialDiscountsScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractGetResponseDataInitialDiscountsScheduleJSON           `json:"-"`
}

func (*V1ContractGetResponseDataInitialDiscountsSchedule) UnmarshalJSON

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

type V1ContractGetResponseDataInitialDiscountsScheduleCreditType

type V1ContractGetResponseDataInitialDiscountsScheduleCreditType struct {
	ID   string                                                          `json:"id,required" format:"uuid"`
	Name string                                                          `json:"name,required"`
	JSON v1ContractGetResponseDataInitialDiscountsScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialDiscountsScheduleCreditType) UnmarshalJSON

type V1ContractGetResponseDataInitialDiscountsScheduleScheduleItem

type V1ContractGetResponseDataInitialDiscountsScheduleScheduleItem struct {
	ID        string                                                            `json:"id,required" format:"uuid"`
	Amount    float64                                                           `json:"amount,required"`
	InvoiceID string                                                            `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                           `json:"quantity,required"`
	Timestamp time.Time                                                         `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                           `json:"unit_price,required"`
	JSON      v1ContractGetResponseDataInitialDiscountsScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialDiscountsScheduleScheduleItem) UnmarshalJSON

type V1ContractGetResponseDataInitialOverride

type V1ContractGetResponseDataInitialOverride struct {
	ID                    string                                              `json:"id,required" format:"uuid"`
	StartingAt            time.Time                                           `json:"starting_at,required" format:"date-time"`
	ApplicableProductTags []string                                            `json:"applicable_product_tags"`
	CreditType            V1ContractGetResponseDataInitialOverridesCreditType `json:"credit_type"`
	EndingBefore          time.Time                                           `json:"ending_before" format:"date-time"`
	Entitled              bool                                                `json:"entitled"`
	IsCommitSpecific      bool                                                `json:"is_commit_specific"`
	// Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
	// set to true.
	IsProrated         bool                                                         `json:"is_prorated"`
	Multiplier         float64                                                      `json:"multiplier"`
	OverrideSpecifiers []V1ContractGetResponseDataInitialOverridesOverrideSpecifier `json:"override_specifiers"`
	OverrideTiers      []V1ContractGetResponseDataInitialOverridesOverrideTier      `json:"override_tiers"`
	OverwriteRate      V1ContractGetResponseDataInitialOverridesOverwriteRate       `json:"overwrite_rate"`
	// Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
	// this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
	Price    float64                                          `json:"price"`
	Priority float64                                          `json:"priority"`
	Product  V1ContractGetResponseDataInitialOverridesProduct `json:"product"`
	// Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
	Quantity float64                                           `json:"quantity"`
	RateType V1ContractGetResponseDataInitialOverridesRateType `json:"rate_type"`
	Target   V1ContractGetResponseDataInitialOverridesTarget   `json:"target"`
	// Only set for TIERED rate_type.
	Tiers []V1ContractGetResponseDataInitialOverridesTier `json:"tiers"`
	Type  V1ContractGetResponseDataInitialOverridesType   `json:"type"`
	// Only set for CUSTOM rate_type. This field is interpreted by custom rate
	// processors.
	Value map[string]interface{}                       `json:"value"`
	JSON  v1ContractGetResponseDataInitialOverrideJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialOverride) UnmarshalJSON

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

type V1ContractGetResponseDataInitialOverridesCreditType

type V1ContractGetResponseDataInitialOverridesCreditType struct {
	ID   string                                                  `json:"id,required" format:"uuid"`
	Name string                                                  `json:"name,required"`
	JSON v1ContractGetResponseDataInitialOverridesCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialOverridesCreditType) UnmarshalJSON

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

type V1ContractGetResponseDataInitialOverridesOverrideSpecifier

type V1ContractGetResponseDataInitialOverridesOverrideSpecifier struct {
	BillingFrequency        V1ContractGetResponseDataInitialOverridesOverrideSpecifiersBillingFrequency `json:"billing_frequency"`
	CommitIDs               []string                                                                    `json:"commit_ids"`
	PresentationGroupValues map[string]string                                                           `json:"presentation_group_values"`
	PricingGroupValues      map[string]string                                                           `json:"pricing_group_values"`
	ProductID               string                                                                      `json:"product_id" format:"uuid"`
	ProductTags             []string                                                                    `json:"product_tags"`
	RecurringCommitIDs      []string                                                                    `json:"recurring_commit_ids"`
	RecurringCreditIDs      []string                                                                    `json:"recurring_credit_ids"`
	JSON                    v1ContractGetResponseDataInitialOverridesOverrideSpecifierJSON              `json:"-"`
}

func (*V1ContractGetResponseDataInitialOverridesOverrideSpecifier) UnmarshalJSON

type V1ContractGetResponseDataInitialOverridesOverrideSpecifiersBillingFrequency

type V1ContractGetResponseDataInitialOverridesOverrideSpecifiersBillingFrequency string
const (
	V1ContractGetResponseDataInitialOverridesOverrideSpecifiersBillingFrequencyMonthly   V1ContractGetResponseDataInitialOverridesOverrideSpecifiersBillingFrequency = "MONTHLY"
	V1ContractGetResponseDataInitialOverridesOverrideSpecifiersBillingFrequencyQuarterly V1ContractGetResponseDataInitialOverridesOverrideSpecifiersBillingFrequency = "QUARTERLY"
	V1ContractGetResponseDataInitialOverridesOverrideSpecifiersBillingFrequencyAnnual    V1ContractGetResponseDataInitialOverridesOverrideSpecifiersBillingFrequency = "ANNUAL"
	V1ContractGetResponseDataInitialOverridesOverrideSpecifiersBillingFrequencyWeekly    V1ContractGetResponseDataInitialOverridesOverrideSpecifiersBillingFrequency = "WEEKLY"
)

func (V1ContractGetResponseDataInitialOverridesOverrideSpecifiersBillingFrequency) IsKnown

type V1ContractGetResponseDataInitialOverridesOverrideTier

type V1ContractGetResponseDataInitialOverridesOverrideTier struct {
	Multiplier float64                                                   `json:"multiplier,required"`
	Size       float64                                                   `json:"size"`
	JSON       v1ContractGetResponseDataInitialOverridesOverrideTierJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialOverridesOverrideTier) UnmarshalJSON

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

type V1ContractGetResponseDataInitialOverridesOverwriteRate

type V1ContractGetResponseDataInitialOverridesOverwriteRate struct {
	RateType   V1ContractGetResponseDataInitialOverridesOverwriteRateRateType   `json:"rate_type,required"`
	CreditType V1ContractGetResponseDataInitialOverridesOverwriteRateCreditType `json:"credit_type"`
	// Only set for CUSTOM rate_type. This field is interpreted by custom rate
	// processors.
	CustomRate map[string]interface{} `json:"custom_rate"`
	// Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
	// set to true.
	IsProrated bool `json:"is_prorated"`
	// Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
	// this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
	Price float64 `json:"price"`
	// Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
	Quantity float64 `json:"quantity"`
	// Only set for TIERED rate_type.
	Tiers []V1ContractGetResponseDataInitialOverridesOverwriteRateTier `json:"tiers"`
	JSON  v1ContractGetResponseDataInitialOverridesOverwriteRateJSON   `json:"-"`
}

func (*V1ContractGetResponseDataInitialOverridesOverwriteRate) UnmarshalJSON

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

type V1ContractGetResponseDataInitialOverridesOverwriteRateCreditType

type V1ContractGetResponseDataInitialOverridesOverwriteRateCreditType struct {
	ID   string                                                               `json:"id,required" format:"uuid"`
	Name string                                                               `json:"name,required"`
	JSON v1ContractGetResponseDataInitialOverridesOverwriteRateCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialOverridesOverwriteRateCreditType) UnmarshalJSON

type V1ContractGetResponseDataInitialOverridesOverwriteRateRateType

type V1ContractGetResponseDataInitialOverridesOverwriteRateRateType string
const (
	V1ContractGetResponseDataInitialOverridesOverwriteRateRateTypeFlat         V1ContractGetResponseDataInitialOverridesOverwriteRateRateType = "FLAT"
	V1ContractGetResponseDataInitialOverridesOverwriteRateRateTypePercentage   V1ContractGetResponseDataInitialOverridesOverwriteRateRateType = "PERCENTAGE"
	V1ContractGetResponseDataInitialOverridesOverwriteRateRateTypeSubscription V1ContractGetResponseDataInitialOverridesOverwriteRateRateType = "SUBSCRIPTION"
	V1ContractGetResponseDataInitialOverridesOverwriteRateRateTypeTiered       V1ContractGetResponseDataInitialOverridesOverwriteRateRateType = "TIERED"
	V1ContractGetResponseDataInitialOverridesOverwriteRateRateTypeCustom       V1ContractGetResponseDataInitialOverridesOverwriteRateRateType = "CUSTOM"
)

func (V1ContractGetResponseDataInitialOverridesOverwriteRateRateType) IsKnown

type V1ContractGetResponseDataInitialOverridesOverwriteRateTier

type V1ContractGetResponseDataInitialOverridesOverwriteRateTier struct {
	Price float64                                                        `json:"price,required"`
	Size  float64                                                        `json:"size"`
	JSON  v1ContractGetResponseDataInitialOverridesOverwriteRateTierJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialOverridesOverwriteRateTier) UnmarshalJSON

type V1ContractGetResponseDataInitialOverridesProduct

type V1ContractGetResponseDataInitialOverridesProduct struct {
	ID   string                                               `json:"id,required" format:"uuid"`
	Name string                                               `json:"name,required"`
	JSON v1ContractGetResponseDataInitialOverridesProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialOverridesProduct) UnmarshalJSON

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

type V1ContractGetResponseDataInitialOverridesRateType

type V1ContractGetResponseDataInitialOverridesRateType string
const (
	V1ContractGetResponseDataInitialOverridesRateTypeFlat         V1ContractGetResponseDataInitialOverridesRateType = "FLAT"
	V1ContractGetResponseDataInitialOverridesRateTypePercentage   V1ContractGetResponseDataInitialOverridesRateType = "PERCENTAGE"
	V1ContractGetResponseDataInitialOverridesRateTypeSubscription V1ContractGetResponseDataInitialOverridesRateType = "SUBSCRIPTION"
	V1ContractGetResponseDataInitialOverridesRateTypeTiered       V1ContractGetResponseDataInitialOverridesRateType = "TIERED"
	V1ContractGetResponseDataInitialOverridesRateTypeCustom       V1ContractGetResponseDataInitialOverridesRateType = "CUSTOM"
)

func (V1ContractGetResponseDataInitialOverridesRateType) IsKnown

type V1ContractGetResponseDataInitialOverridesTarget

type V1ContractGetResponseDataInitialOverridesTarget string
const (
	V1ContractGetResponseDataInitialOverridesTargetCommitRate V1ContractGetResponseDataInitialOverridesTarget = "COMMIT_RATE"
	V1ContractGetResponseDataInitialOverridesTargetListRate   V1ContractGetResponseDataInitialOverridesTarget = "LIST_RATE"
)

func (V1ContractGetResponseDataInitialOverridesTarget) IsKnown

type V1ContractGetResponseDataInitialOverridesTier

type V1ContractGetResponseDataInitialOverridesTier struct {
	Price float64                                           `json:"price,required"`
	Size  float64                                           `json:"size"`
	JSON  v1ContractGetResponseDataInitialOverridesTierJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialOverridesTier) UnmarshalJSON

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

type V1ContractGetResponseDataInitialOverridesType

type V1ContractGetResponseDataInitialOverridesType string
const (
	V1ContractGetResponseDataInitialOverridesTypeOverwrite  V1ContractGetResponseDataInitialOverridesType = "OVERWRITE"
	V1ContractGetResponseDataInitialOverridesTypeMultiplier V1ContractGetResponseDataInitialOverridesType = "MULTIPLIER"
	V1ContractGetResponseDataInitialOverridesTypeTiered     V1ContractGetResponseDataInitialOverridesType = "TIERED"
)

func (V1ContractGetResponseDataInitialOverridesType) IsKnown

type V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfiguration

type V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfiguration struct {
	Commit V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationCommit `json:"commit,required"`
	// When set to false, the contract will not be evaluated against the
	// threshold_amount. Toggling to true will result an immediate evaluation,
	// regardless of prior state.
	IsEnabled         bool                                                                                  `json:"is_enabled,required"`
	PaymentGateConfig V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfig `json:"payment_gate_config,required"`
	// Specify the amount the balance should be recharged to.
	RechargeToAmount float64 `json:"recharge_to_amount,required"`
	// Specify the threshold amount for the contract. Each time the contract's prepaid
	// balance lowers to this amount, a threshold charge will be initiated.
	ThresholdAmount float64                                                                  `json:"threshold_amount,required"`
	JSON            v1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfiguration) UnmarshalJSON

type V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationCommit

type V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationCommit struct {
	// The commit product that will be used to generate the line item for commit
	// payment.
	ProductID string `json:"product_id,required"`
	// Which products the threshold commit applies to. If both applicable_product_ids
	// and applicable_product_tags are not provided, the commit applies to all
	// products.
	ApplicableProductIDs []string `json:"applicable_product_ids" format:"uuid"`
	// Which tags the threshold commit applies to. If both applicable_product_ids and
	// applicable_product_tags are not provided, the commit applies to all products.
	ApplicableProductTags []string `json:"applicable_product_tags"`
	Description           string   `json:"description"`
	// Specify the name of the line item for the threshold charge. If left blank, it
	// will default to the commit product name.
	Name string `json:"name"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown. This field cannot
	// be used together with `applicable_product_ids` or `applicable_product_tags`.
	Specifiers []V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationCommitSpecifier `json:"specifiers"`
	JSON       v1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationCommitJSON        `json:"-"`
}

func (*V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationCommit) UnmarshalJSON

type V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationCommitSpecifier

type V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationCommitSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                                                                `json:"product_tags"`
	JSON        v1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationCommitSpecifierJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationCommitSpecifier) UnmarshalJSON

type V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfig

type V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfig struct {
	// Gate access to the commit balance based on successful collection of payment.
	// Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
	// facilitate payment using your own payment integration. Select NONE if you do not
	// wish to payment gate the commit balance.
	PaymentGateType V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType `json:"payment_gate_type,required"`
	// Only applicable if using Stripe as your payment gateway through Metronome.
	StripeConfig V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig `json:"stripe_config"`
	// Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
	// not wish Metronome to calculate tax on your behalf. Leaving this field blank
	// will default to NONE.
	TaxType V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType `json:"tax_type"`
	JSON    v1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigJSON    `json:"-"`
}

func (*V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfig) UnmarshalJSON

type V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType

type V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType string

Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance.

const (
	V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateTypeNone     V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType = "NONE"
	V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateTypeStripe   V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType = "STRIPE"
	V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateTypeExternal V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType = "EXTERNAL"
)

func (V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType) IsKnown

type V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig

type V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig struct {
	// If left blank, will default to INVOICE
	PaymentType V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType `json:"payment_type,required"`
	JSON        v1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigJSON        `json:"-"`
}

Only applicable if using Stripe as your payment gateway through Metronome.

func (*V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig) UnmarshalJSON

type V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType

type V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType string

If left blank, will default to INVOICE

const (
	V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypeInvoice       V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "INVOICE"
	V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypePaymentIntent V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "PAYMENT_INTENT"
)

func (V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType) IsKnown

type V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType

type V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType string

Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE.

const (
	V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxTypeNone   V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType = "NONE"
	V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxTypeStripe V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType = "STRIPE"
)

func (V1ContractGetResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType) IsKnown

type V1ContractGetResponseDataInitialProfessionalService

type V1ContractGetResponseDataInitialProfessionalService struct {
	ID string `json:"id,required" format:"uuid"`
	// Maximum amount for the term.
	MaxAmount float64 `json:"max_amount,required"`
	ProductID string  `json:"product_id,required" format:"uuid"`
	// Quantity for the charge. Will be multiplied by unit_price to determine the
	// amount.
	Quantity float64 `json:"quantity,required"`
	// Unit price for the charge. Will be multiplied by quantity to determine the
	// amount and must be specified.
	UnitPrice    float64           `json:"unit_price,required"`
	CustomFields map[string]string `json:"custom_fields"`
	Description  string            `json:"description"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string                                                  `json:"netsuite_sales_order_id"`
	JSON                 v1ContractGetResponseDataInitialProfessionalServiceJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialProfessionalService) UnmarshalJSON

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

type V1ContractGetResponseDataInitialRecurringCommit

type V1ContractGetResponseDataInitialRecurringCommit struct {
	ID string `json:"id,required" format:"uuid"`
	// The amount of commit to grant.
	AccessAmount V1ContractGetResponseDataInitialRecurringCommitsAccessAmount `json:"access_amount,required"`
	// The amount of time the created commits will be valid for
	CommitDuration V1ContractGetResponseDataInitialRecurringCommitsCommitDuration `json:"commit_duration,required"`
	// Will be passed down to the individual commits
	Priority float64                                                 `json:"priority,required"`
	Product  V1ContractGetResponseDataInitialRecurringCommitsProduct `json:"product,required"`
	// Whether the created commits will use the commit rate or list rate
	RateType V1ContractGetResponseDataInitialRecurringCommitsRateType `json:"rate_type,required"`
	// Determines the start time for the first commit
	StartingAt time.Time `json:"starting_at,required" format:"date-time"`
	// Will be passed down to the individual commits
	ApplicableProductIDs []string `json:"applicable_product_ids" format:"uuid"`
	// Will be passed down to the individual commits
	ApplicableProductTags []string                                                 `json:"applicable_product_tags"`
	Contract              V1ContractGetResponseDataInitialRecurringCommitsContract `json:"contract"`
	// Will be passed down to the individual commits
	Description string `json:"description"`
	// Determines when the contract will stop creating recurring commits. Optional
	EndingBefore time.Time `json:"ending_before" format:"date-time"`
	// The amount the customer should be billed for the commit. Not required.
	InvoiceAmount V1ContractGetResponseDataInitialRecurringCommitsInvoiceAmount `json:"invoice_amount"`
	// Displayed on invoices. Will be passed through to the individual commits
	Name string `json:"name"`
	// Will be passed down to the individual commits
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// Determines whether the first and last commit will be prorated. If not provided,
	// the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
	Proration V1ContractGetResponseDataInitialRecurringCommitsProration `json:"proration"`
	// The frequency at which the recurring commits will be created. If not provided: -
	// The commits will be created on the usage invoice frequency. If provided: - The
	// period defined in the duration will correspond to this frequency. - Commits will
	// be created aligned with the recurring commit's starting_at rather than the usage
	// invoice dates.
	RecurrenceFrequency V1ContractGetResponseDataInitialRecurringCommitsRecurrenceFrequency `json:"recurrence_frequency"`
	// Will be passed down to the individual commits. This controls how much of an
	// individual unexpired commit will roll over upon contract transition. Must be
	// between 0 and 1.
	RolloverFraction float64 `json:"rollover_fraction"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractGetResponseDataInitialRecurringCommitsSpecifier `json:"specifiers"`
	JSON       v1ContractGetResponseDataInitialRecurringCommitJSON         `json:"-"`
}

func (*V1ContractGetResponseDataInitialRecurringCommit) UnmarshalJSON

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

type V1ContractGetResponseDataInitialRecurringCommitsAccessAmount

type V1ContractGetResponseDataInitialRecurringCommitsAccessAmount struct {
	CreditTypeID string                                                           `json:"credit_type_id,required" format:"uuid"`
	Quantity     float64                                                          `json:"quantity,required"`
	UnitPrice    float64                                                          `json:"unit_price,required"`
	JSON         v1ContractGetResponseDataInitialRecurringCommitsAccessAmountJSON `json:"-"`
}

The amount of commit to grant.

func (*V1ContractGetResponseDataInitialRecurringCommitsAccessAmount) UnmarshalJSON

type V1ContractGetResponseDataInitialRecurringCommitsCommitDuration

type V1ContractGetResponseDataInitialRecurringCommitsCommitDuration struct {
	Value float64                                                            `json:"value,required"`
	Unit  V1ContractGetResponseDataInitialRecurringCommitsCommitDurationUnit `json:"unit"`
	JSON  v1ContractGetResponseDataInitialRecurringCommitsCommitDurationJSON `json:"-"`
}

The amount of time the created commits will be valid for

func (*V1ContractGetResponseDataInitialRecurringCommitsCommitDuration) UnmarshalJSON

type V1ContractGetResponseDataInitialRecurringCommitsCommitDurationUnit

type V1ContractGetResponseDataInitialRecurringCommitsCommitDurationUnit string
const (
	V1ContractGetResponseDataInitialRecurringCommitsCommitDurationUnitPeriods V1ContractGetResponseDataInitialRecurringCommitsCommitDurationUnit = "PERIODS"
)

func (V1ContractGetResponseDataInitialRecurringCommitsCommitDurationUnit) IsKnown

type V1ContractGetResponseDataInitialRecurringCommitsContract

type V1ContractGetResponseDataInitialRecurringCommitsContract struct {
	ID   string                                                       `json:"id,required" format:"uuid"`
	JSON v1ContractGetResponseDataInitialRecurringCommitsContractJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialRecurringCommitsContract) UnmarshalJSON

type V1ContractGetResponseDataInitialRecurringCommitsInvoiceAmount

type V1ContractGetResponseDataInitialRecurringCommitsInvoiceAmount struct {
	CreditTypeID string                                                            `json:"credit_type_id,required" format:"uuid"`
	Quantity     float64                                                           `json:"quantity,required"`
	UnitPrice    float64                                                           `json:"unit_price,required"`
	JSON         v1ContractGetResponseDataInitialRecurringCommitsInvoiceAmountJSON `json:"-"`
}

The amount the customer should be billed for the commit. Not required.

func (*V1ContractGetResponseDataInitialRecurringCommitsInvoiceAmount) UnmarshalJSON

type V1ContractGetResponseDataInitialRecurringCommitsProduct

type V1ContractGetResponseDataInitialRecurringCommitsProduct struct {
	ID   string                                                      `json:"id,required" format:"uuid"`
	Name string                                                      `json:"name,required"`
	JSON v1ContractGetResponseDataInitialRecurringCommitsProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialRecurringCommitsProduct) UnmarshalJSON

type V1ContractGetResponseDataInitialRecurringCommitsProration

type V1ContractGetResponseDataInitialRecurringCommitsProration string

Determines whether the first and last commit will be prorated. If not provided, the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).

const (
	V1ContractGetResponseDataInitialRecurringCommitsProrationNone         V1ContractGetResponseDataInitialRecurringCommitsProration = "NONE"
	V1ContractGetResponseDataInitialRecurringCommitsProrationFirst        V1ContractGetResponseDataInitialRecurringCommitsProration = "FIRST"
	V1ContractGetResponseDataInitialRecurringCommitsProrationLast         V1ContractGetResponseDataInitialRecurringCommitsProration = "LAST"
	V1ContractGetResponseDataInitialRecurringCommitsProrationFirstAndLast V1ContractGetResponseDataInitialRecurringCommitsProration = "FIRST_AND_LAST"
)

func (V1ContractGetResponseDataInitialRecurringCommitsProration) IsKnown

type V1ContractGetResponseDataInitialRecurringCommitsRateType

type V1ContractGetResponseDataInitialRecurringCommitsRateType string

Whether the created commits will use the commit rate or list rate

const (
	V1ContractGetResponseDataInitialRecurringCommitsRateTypeCommitRate V1ContractGetResponseDataInitialRecurringCommitsRateType = "COMMIT_RATE"
	V1ContractGetResponseDataInitialRecurringCommitsRateTypeListRate   V1ContractGetResponseDataInitialRecurringCommitsRateType = "LIST_RATE"
)

func (V1ContractGetResponseDataInitialRecurringCommitsRateType) IsKnown

type V1ContractGetResponseDataInitialRecurringCommitsRecurrenceFrequency

type V1ContractGetResponseDataInitialRecurringCommitsRecurrenceFrequency string

The frequency at which the recurring commits will be created. If not provided: - The commits will be created on the usage invoice frequency. If provided: - The period defined in the duration will correspond to this frequency. - Commits will be created aligned with the recurring commit's starting_at rather than the usage invoice dates.

const (
	V1ContractGetResponseDataInitialRecurringCommitsRecurrenceFrequencyMonthly   V1ContractGetResponseDataInitialRecurringCommitsRecurrenceFrequency = "MONTHLY"
	V1ContractGetResponseDataInitialRecurringCommitsRecurrenceFrequencyQuarterly V1ContractGetResponseDataInitialRecurringCommitsRecurrenceFrequency = "QUARTERLY"
	V1ContractGetResponseDataInitialRecurringCommitsRecurrenceFrequencyAnnual    V1ContractGetResponseDataInitialRecurringCommitsRecurrenceFrequency = "ANNUAL"
	V1ContractGetResponseDataInitialRecurringCommitsRecurrenceFrequencyWeekly    V1ContractGetResponseDataInitialRecurringCommitsRecurrenceFrequency = "WEEKLY"
)

func (V1ContractGetResponseDataInitialRecurringCommitsRecurrenceFrequency) IsKnown

type V1ContractGetResponseDataInitialRecurringCommitsSpecifier

type V1ContractGetResponseDataInitialRecurringCommitsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                                      `json:"product_tags"`
	JSON        v1ContractGetResponseDataInitialRecurringCommitsSpecifierJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialRecurringCommitsSpecifier) UnmarshalJSON

type V1ContractGetResponseDataInitialRecurringCredit

type V1ContractGetResponseDataInitialRecurringCredit struct {
	ID string `json:"id,required" format:"uuid"`
	// The amount of commit to grant.
	AccessAmount V1ContractGetResponseDataInitialRecurringCreditsAccessAmount `json:"access_amount,required"`
	// The amount of time the created commits will be valid for
	CommitDuration V1ContractGetResponseDataInitialRecurringCreditsCommitDuration `json:"commit_duration,required"`
	// Will be passed down to the individual commits
	Priority float64                                                 `json:"priority,required"`
	Product  V1ContractGetResponseDataInitialRecurringCreditsProduct `json:"product,required"`
	// Whether the created commits will use the commit rate or list rate
	RateType V1ContractGetResponseDataInitialRecurringCreditsRateType `json:"rate_type,required"`
	// Determines the start time for the first commit
	StartingAt time.Time `json:"starting_at,required" format:"date-time"`
	// Will be passed down to the individual commits
	ApplicableProductIDs []string `json:"applicable_product_ids" format:"uuid"`
	// Will be passed down to the individual commits
	ApplicableProductTags []string                                                 `json:"applicable_product_tags"`
	Contract              V1ContractGetResponseDataInitialRecurringCreditsContract `json:"contract"`
	// Will be passed down to the individual commits
	Description string `json:"description"`
	// Determines when the contract will stop creating recurring commits. Optional
	EndingBefore time.Time `json:"ending_before" format:"date-time"`
	// Displayed on invoices. Will be passed through to the individual commits
	Name string `json:"name"`
	// Will be passed down to the individual commits
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// Determines whether the first and last commit will be prorated. If not provided,
	// the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
	Proration V1ContractGetResponseDataInitialRecurringCreditsProration `json:"proration"`
	// The frequency at which the recurring commits will be created. If not provided: -
	// The commits will be created on the usage invoice frequency. If provided: - The
	// period defined in the duration will correspond to this frequency. - Commits will
	// be created aligned with the recurring commit's starting_at rather than the usage
	// invoice dates.
	RecurrenceFrequency V1ContractGetResponseDataInitialRecurringCreditsRecurrenceFrequency `json:"recurrence_frequency"`
	// Will be passed down to the individual commits. This controls how much of an
	// individual unexpired commit will roll over upon contract transition. Must be
	// between 0 and 1.
	RolloverFraction float64 `json:"rollover_fraction"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractGetResponseDataInitialRecurringCreditsSpecifier `json:"specifiers"`
	JSON       v1ContractGetResponseDataInitialRecurringCreditJSON         `json:"-"`
}

func (*V1ContractGetResponseDataInitialRecurringCredit) UnmarshalJSON

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

type V1ContractGetResponseDataInitialRecurringCreditsAccessAmount

type V1ContractGetResponseDataInitialRecurringCreditsAccessAmount struct {
	CreditTypeID string                                                           `json:"credit_type_id,required" format:"uuid"`
	Quantity     float64                                                          `json:"quantity,required"`
	UnitPrice    float64                                                          `json:"unit_price,required"`
	JSON         v1ContractGetResponseDataInitialRecurringCreditsAccessAmountJSON `json:"-"`
}

The amount of commit to grant.

func (*V1ContractGetResponseDataInitialRecurringCreditsAccessAmount) UnmarshalJSON

type V1ContractGetResponseDataInitialRecurringCreditsCommitDuration

type V1ContractGetResponseDataInitialRecurringCreditsCommitDuration struct {
	Value float64                                                            `json:"value,required"`
	Unit  V1ContractGetResponseDataInitialRecurringCreditsCommitDurationUnit `json:"unit"`
	JSON  v1ContractGetResponseDataInitialRecurringCreditsCommitDurationJSON `json:"-"`
}

The amount of time the created commits will be valid for

func (*V1ContractGetResponseDataInitialRecurringCreditsCommitDuration) UnmarshalJSON

type V1ContractGetResponseDataInitialRecurringCreditsCommitDurationUnit

type V1ContractGetResponseDataInitialRecurringCreditsCommitDurationUnit string
const (
	V1ContractGetResponseDataInitialRecurringCreditsCommitDurationUnitPeriods V1ContractGetResponseDataInitialRecurringCreditsCommitDurationUnit = "PERIODS"
)

func (V1ContractGetResponseDataInitialRecurringCreditsCommitDurationUnit) IsKnown

type V1ContractGetResponseDataInitialRecurringCreditsContract

type V1ContractGetResponseDataInitialRecurringCreditsContract struct {
	ID   string                                                       `json:"id,required" format:"uuid"`
	JSON v1ContractGetResponseDataInitialRecurringCreditsContractJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialRecurringCreditsContract) UnmarshalJSON

type V1ContractGetResponseDataInitialRecurringCreditsProduct

type V1ContractGetResponseDataInitialRecurringCreditsProduct struct {
	ID   string                                                      `json:"id,required" format:"uuid"`
	Name string                                                      `json:"name,required"`
	JSON v1ContractGetResponseDataInitialRecurringCreditsProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialRecurringCreditsProduct) UnmarshalJSON

type V1ContractGetResponseDataInitialRecurringCreditsProration

type V1ContractGetResponseDataInitialRecurringCreditsProration string

Determines whether the first and last commit will be prorated. If not provided, the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).

const (
	V1ContractGetResponseDataInitialRecurringCreditsProrationNone         V1ContractGetResponseDataInitialRecurringCreditsProration = "NONE"
	V1ContractGetResponseDataInitialRecurringCreditsProrationFirst        V1ContractGetResponseDataInitialRecurringCreditsProration = "FIRST"
	V1ContractGetResponseDataInitialRecurringCreditsProrationLast         V1ContractGetResponseDataInitialRecurringCreditsProration = "LAST"
	V1ContractGetResponseDataInitialRecurringCreditsProrationFirstAndLast V1ContractGetResponseDataInitialRecurringCreditsProration = "FIRST_AND_LAST"
)

func (V1ContractGetResponseDataInitialRecurringCreditsProration) IsKnown

type V1ContractGetResponseDataInitialRecurringCreditsRateType

type V1ContractGetResponseDataInitialRecurringCreditsRateType string

Whether the created commits will use the commit rate or list rate

const (
	V1ContractGetResponseDataInitialRecurringCreditsRateTypeCommitRate V1ContractGetResponseDataInitialRecurringCreditsRateType = "COMMIT_RATE"
	V1ContractGetResponseDataInitialRecurringCreditsRateTypeListRate   V1ContractGetResponseDataInitialRecurringCreditsRateType = "LIST_RATE"
)

func (V1ContractGetResponseDataInitialRecurringCreditsRateType) IsKnown

type V1ContractGetResponseDataInitialRecurringCreditsRecurrenceFrequency

type V1ContractGetResponseDataInitialRecurringCreditsRecurrenceFrequency string

The frequency at which the recurring commits will be created. If not provided: - The commits will be created on the usage invoice frequency. If provided: - The period defined in the duration will correspond to this frequency. - Commits will be created aligned with the recurring commit's starting_at rather than the usage invoice dates.

const (
	V1ContractGetResponseDataInitialRecurringCreditsRecurrenceFrequencyMonthly   V1ContractGetResponseDataInitialRecurringCreditsRecurrenceFrequency = "MONTHLY"
	V1ContractGetResponseDataInitialRecurringCreditsRecurrenceFrequencyQuarterly V1ContractGetResponseDataInitialRecurringCreditsRecurrenceFrequency = "QUARTERLY"
	V1ContractGetResponseDataInitialRecurringCreditsRecurrenceFrequencyAnnual    V1ContractGetResponseDataInitialRecurringCreditsRecurrenceFrequency = "ANNUAL"
	V1ContractGetResponseDataInitialRecurringCreditsRecurrenceFrequencyWeekly    V1ContractGetResponseDataInitialRecurringCreditsRecurrenceFrequency = "WEEKLY"
)

func (V1ContractGetResponseDataInitialRecurringCreditsRecurrenceFrequency) IsKnown

type V1ContractGetResponseDataInitialRecurringCreditsSpecifier

type V1ContractGetResponseDataInitialRecurringCreditsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                                      `json:"product_tags"`
	JSON        v1ContractGetResponseDataInitialRecurringCreditsSpecifierJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialRecurringCreditsSpecifier) UnmarshalJSON

type V1ContractGetResponseDataInitialResellerRoyaltiesResellerType

type V1ContractGetResponseDataInitialResellerRoyaltiesResellerType string
const (
	V1ContractGetResponseDataInitialResellerRoyaltiesResellerTypeAws           V1ContractGetResponseDataInitialResellerRoyaltiesResellerType = "AWS"
	V1ContractGetResponseDataInitialResellerRoyaltiesResellerTypeAwsProService V1ContractGetResponseDataInitialResellerRoyaltiesResellerType = "AWS_PRO_SERVICE"
	V1ContractGetResponseDataInitialResellerRoyaltiesResellerTypeGcp           V1ContractGetResponseDataInitialResellerRoyaltiesResellerType = "GCP"
	V1ContractGetResponseDataInitialResellerRoyaltiesResellerTypeGcpProService V1ContractGetResponseDataInitialResellerRoyaltiesResellerType = "GCP_PRO_SERVICE"
)

func (V1ContractGetResponseDataInitialResellerRoyaltiesResellerType) IsKnown

type V1ContractGetResponseDataInitialResellerRoyalty

type V1ContractGetResponseDataInitialResellerRoyalty struct {
	Fraction              float64                                                       `json:"fraction,required"`
	NetsuiteResellerID    string                                                        `json:"netsuite_reseller_id,required"`
	ResellerType          V1ContractGetResponseDataInitialResellerRoyaltiesResellerType `json:"reseller_type,required"`
	StartingAt            time.Time                                                     `json:"starting_at,required" format:"date-time"`
	ApplicableProductIDs  []string                                                      `json:"applicable_product_ids"`
	ApplicableProductTags []string                                                      `json:"applicable_product_tags"`
	AwsAccountNumber      string                                                        `json:"aws_account_number"`
	AwsOfferID            string                                                        `json:"aws_offer_id"`
	AwsPayerReferenceID   string                                                        `json:"aws_payer_reference_id"`
	EndingBefore          time.Time                                                     `json:"ending_before" format:"date-time"`
	GcpAccountID          string                                                        `json:"gcp_account_id"`
	GcpOfferID            string                                                        `json:"gcp_offer_id"`
	ResellerContractValue float64                                                       `json:"reseller_contract_value"`
	JSON                  v1ContractGetResponseDataInitialResellerRoyaltyJSON           `json:"-"`
}

func (*V1ContractGetResponseDataInitialResellerRoyalty) UnmarshalJSON

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

type V1ContractGetResponseDataInitialScheduledCharge

type V1ContractGetResponseDataInitialScheduledCharge struct {
	ID           string                                                   `json:"id,required" format:"uuid"`
	Product      V1ContractGetResponseDataInitialScheduledChargesProduct  `json:"product,required"`
	Schedule     V1ContractGetResponseDataInitialScheduledChargesSchedule `json:"schedule,required"`
	ArchivedAt   time.Time                                                `json:"archived_at" format:"date-time"`
	CustomFields map[string]string                                        `json:"custom_fields"`
	// displayed on invoices
	Name string `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string                                              `json:"netsuite_sales_order_id"`
	JSON                 v1ContractGetResponseDataInitialScheduledChargeJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialScheduledCharge) UnmarshalJSON

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

type V1ContractGetResponseDataInitialScheduledChargesOnUsageInvoices

type V1ContractGetResponseDataInitialScheduledChargesOnUsageInvoices string

Determines which scheduled and commit charges to consolidate onto the Contract's usage invoice. The charge's `timestamp` must match the usage invoice's `ending_before` date for consolidation to occur. This field cannot be modified after a Contract has been created. If this field is omitted, charges will appear on a separate invoice from usage charges.

const (
	V1ContractGetResponseDataInitialScheduledChargesOnUsageInvoicesAll V1ContractGetResponseDataInitialScheduledChargesOnUsageInvoices = "ALL"
)

func (V1ContractGetResponseDataInitialScheduledChargesOnUsageInvoices) IsKnown

type V1ContractGetResponseDataInitialScheduledChargesProduct

type V1ContractGetResponseDataInitialScheduledChargesProduct struct {
	ID   string                                                      `json:"id,required" format:"uuid"`
	Name string                                                      `json:"name,required"`
	JSON v1ContractGetResponseDataInitialScheduledChargesProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialScheduledChargesProduct) UnmarshalJSON

type V1ContractGetResponseDataInitialScheduledChargesSchedule

type V1ContractGetResponseDataInitialScheduledChargesSchedule struct {
	CreditType    V1ContractGetResponseDataInitialScheduledChargesScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractGetResponseDataInitialScheduledChargesScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractGetResponseDataInitialScheduledChargesScheduleJSON           `json:"-"`
}

func (*V1ContractGetResponseDataInitialScheduledChargesSchedule) UnmarshalJSON

type V1ContractGetResponseDataInitialScheduledChargesScheduleCreditType

type V1ContractGetResponseDataInitialScheduledChargesScheduleCreditType struct {
	ID   string                                                                 `json:"id,required" format:"uuid"`
	Name string                                                                 `json:"name,required"`
	JSON v1ContractGetResponseDataInitialScheduledChargesScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialScheduledChargesScheduleCreditType) UnmarshalJSON

type V1ContractGetResponseDataInitialScheduledChargesScheduleScheduleItem

type V1ContractGetResponseDataInitialScheduledChargesScheduleScheduleItem struct {
	ID        string                                                                   `json:"id,required" format:"uuid"`
	Amount    float64                                                                  `json:"amount,required"`
	InvoiceID string                                                                   `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                                  `json:"quantity,required"`
	Timestamp time.Time                                                                `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                                  `json:"unit_price,required"`
	JSON      v1ContractGetResponseDataInitialScheduledChargesScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialScheduledChargesScheduleScheduleItem) UnmarshalJSON

type V1ContractGetResponseDataInitialSpendThresholdConfiguration

type V1ContractGetResponseDataInitialSpendThresholdConfiguration struct {
	Commit V1ContractGetResponseDataInitialSpendThresholdConfigurationCommit `json:"commit,required"`
	// When set to false, the contract will not be evaluated against the
	// threshold_amount. Toggling to true will result an immediate evaluation,
	// regardless of prior state.
	IsEnabled         bool                                                                         `json:"is_enabled,required"`
	PaymentGateConfig V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfig `json:"payment_gate_config,required"`
	// Specify the threshold amount for the contract. Each time the contract's usage
	// hits this amount, a threshold charge will be initiated.
	ThresholdAmount float64                                                         `json:"threshold_amount,required"`
	JSON            v1ContractGetResponseDataInitialSpendThresholdConfigurationJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialSpendThresholdConfiguration) UnmarshalJSON

type V1ContractGetResponseDataInitialSpendThresholdConfigurationCommit

type V1ContractGetResponseDataInitialSpendThresholdConfigurationCommit struct {
	// The commit product that will be used to generate the line item for commit
	// payment.
	ProductID   string `json:"product_id,required"`
	Description string `json:"description"`
	// Specify the name of the line item for the threshold charge. If left blank, it
	// will default to the commit product name.
	Name string                                                                `json:"name"`
	JSON v1ContractGetResponseDataInitialSpendThresholdConfigurationCommitJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialSpendThresholdConfigurationCommit) UnmarshalJSON

type V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfig

type V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfig struct {
	// Gate access to the commit balance based on successful collection of payment.
	// Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
	// facilitate payment using your own payment integration. Select NONE if you do not
	// wish to payment gate the commit balance.
	PaymentGateType V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateType `json:"payment_gate_type,required"`
	// Only applicable if using Stripe as your payment gateway through Metronome.
	StripeConfig V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfig `json:"stripe_config"`
	// Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
	// not wish Metronome to calculate tax on your behalf. Leaving this field blank
	// will default to NONE.
	TaxType V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigTaxType `json:"tax_type"`
	JSON    v1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigJSON    `json:"-"`
}

func (*V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfig) UnmarshalJSON

type V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateType

type V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateType string

Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance.

const (
	V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateTypeNone     V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateType = "NONE"
	V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateTypeStripe   V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateType = "STRIPE"
	V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateTypeExternal V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateType = "EXTERNAL"
)

func (V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateType) IsKnown

type V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfig

type V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfig struct {
	// If left blank, will default to INVOICE
	PaymentType V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType `json:"payment_type,required"`
	JSON        v1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfigJSON        `json:"-"`
}

Only applicable if using Stripe as your payment gateway through Metronome.

func (*V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfig) UnmarshalJSON

type V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType

type V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType string

If left blank, will default to INVOICE

const (
	V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypeInvoice       V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "INVOICE"
	V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypePaymentIntent V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "PAYMENT_INTENT"
)

func (V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType) IsKnown

type V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigTaxType

type V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigTaxType string

Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE.

const (
	V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigTaxTypeNone   V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigTaxType = "NONE"
	V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigTaxTypeStripe V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigTaxType = "STRIPE"
)

func (V1ContractGetResponseDataInitialSpendThresholdConfigurationPaymentGateConfigTaxType) IsKnown

type V1ContractGetResponseDataInitialTransition

type V1ContractGetResponseDataInitialTransition struct {
	FromContractID string                                          `json:"from_contract_id,required" format:"uuid"`
	ToContractID   string                                          `json:"to_contract_id,required" format:"uuid"`
	Type           V1ContractGetResponseDataInitialTransitionsType `json:"type,required"`
	JSON           v1ContractGetResponseDataInitialTransitionJSON  `json:"-"`
}

func (*V1ContractGetResponseDataInitialTransition) UnmarshalJSON

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

type V1ContractGetResponseDataInitialTransitionsType

type V1ContractGetResponseDataInitialTransitionsType string
const (
	V1ContractGetResponseDataInitialTransitionsTypeSupersede V1ContractGetResponseDataInitialTransitionsType = "SUPERSEDE"
	V1ContractGetResponseDataInitialTransitionsTypeRenewal   V1ContractGetResponseDataInitialTransitionsType = "RENEWAL"
)

func (V1ContractGetResponseDataInitialTransitionsType) IsKnown

type V1ContractGetResponseDataInitialUsageFilter

type V1ContractGetResponseDataInitialUsageFilter struct {
	Current V1ContractGetResponseDataInitialUsageFilterCurrent  `json:"current,required,nullable"`
	Initial V1ContractGetResponseDataInitialUsageFilterInitial  `json:"initial,required"`
	Updates []V1ContractGetResponseDataInitialUsageFilterUpdate `json:"updates,required"`
	JSON    v1ContractGetResponseDataInitialUsageFilterJSON     `json:"-"`
}

func (*V1ContractGetResponseDataInitialUsageFilter) UnmarshalJSON

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

type V1ContractGetResponseDataInitialUsageFilterCurrent

type V1ContractGetResponseDataInitialUsageFilterCurrent struct {
	GroupKey    string                                                 `json:"group_key,required"`
	GroupValues []string                                               `json:"group_values,required"`
	StartingAt  time.Time                                              `json:"starting_at" format:"date-time"`
	JSON        v1ContractGetResponseDataInitialUsageFilterCurrentJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialUsageFilterCurrent) UnmarshalJSON

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

type V1ContractGetResponseDataInitialUsageFilterInitial

type V1ContractGetResponseDataInitialUsageFilterInitial struct {
	GroupKey    string                                                 `json:"group_key,required"`
	GroupValues []string                                               `json:"group_values,required"`
	StartingAt  time.Time                                              `json:"starting_at" format:"date-time"`
	JSON        v1ContractGetResponseDataInitialUsageFilterInitialJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialUsageFilterInitial) UnmarshalJSON

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

type V1ContractGetResponseDataInitialUsageFilterUpdate

type V1ContractGetResponseDataInitialUsageFilterUpdate struct {
	GroupKey    string                                                `json:"group_key,required"`
	GroupValues []string                                              `json:"group_values,required"`
	StartingAt  time.Time                                             `json:"starting_at,required" format:"date-time"`
	JSON        v1ContractGetResponseDataInitialUsageFilterUpdateJSON `json:"-"`
}

func (*V1ContractGetResponseDataInitialUsageFilterUpdate) UnmarshalJSON

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

type V1ContractGetResponseDataInitialUsageStatementSchedule

type V1ContractGetResponseDataInitialUsageStatementSchedule struct {
	// Contract usage statements follow a selected cadence based on this date.
	BillingAnchorDate time.Time                                                       `json:"billing_anchor_date,required" format:"date-time"`
	Frequency         V1ContractGetResponseDataInitialUsageStatementScheduleFrequency `json:"frequency,required"`
	JSON              v1ContractGetResponseDataInitialUsageStatementScheduleJSON      `json:"-"`
}

func (*V1ContractGetResponseDataInitialUsageStatementSchedule) UnmarshalJSON

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

type V1ContractGetResponseDataInitialUsageStatementScheduleFrequency

type V1ContractGetResponseDataInitialUsageStatementScheduleFrequency string
const (
	V1ContractGetResponseDataInitialUsageStatementScheduleFrequencyMonthly   V1ContractGetResponseDataInitialUsageStatementScheduleFrequency = "MONTHLY"
	V1ContractGetResponseDataInitialUsageStatementScheduleFrequencyQuarterly V1ContractGetResponseDataInitialUsageStatementScheduleFrequency = "QUARTERLY"
	V1ContractGetResponseDataInitialUsageStatementScheduleFrequencyAnnual    V1ContractGetResponseDataInitialUsageStatementScheduleFrequency = "ANNUAL"
	V1ContractGetResponseDataInitialUsageStatementScheduleFrequencyWeekly    V1ContractGetResponseDataInitialUsageStatementScheduleFrequency = "WEEKLY"
)

func (V1ContractGetResponseDataInitialUsageStatementScheduleFrequency) IsKnown

type V1ContractGetResponseDataPrepaidBalanceThresholdConfiguration

type V1ContractGetResponseDataPrepaidBalanceThresholdConfiguration struct {
	Commit V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationCommit `json:"commit,required"`
	// When set to false, the contract will not be evaluated against the
	// threshold_amount. Toggling to true will result an immediate evaluation,
	// regardless of prior state.
	IsEnabled         bool                                                                           `json:"is_enabled,required"`
	PaymentGateConfig V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfig `json:"payment_gate_config,required"`
	// Specify the amount the balance should be recharged to.
	RechargeToAmount float64 `json:"recharge_to_amount,required"`
	// Specify the threshold amount for the contract. Each time the contract's prepaid
	// balance lowers to this amount, a threshold charge will be initiated.
	ThresholdAmount float64                                                           `json:"threshold_amount,required"`
	JSON            v1ContractGetResponseDataPrepaidBalanceThresholdConfigurationJSON `json:"-"`
}

func (*V1ContractGetResponseDataPrepaidBalanceThresholdConfiguration) UnmarshalJSON

type V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationCommit

type V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationCommit struct {
	// The commit product that will be used to generate the line item for commit
	// payment.
	ProductID string `json:"product_id,required"`
	// Which products the threshold commit applies to. If both applicable_product_ids
	// and applicable_product_tags are not provided, the commit applies to all
	// products.
	ApplicableProductIDs []string `json:"applicable_product_ids" format:"uuid"`
	// Which tags the threshold commit applies to. If both applicable_product_ids and
	// applicable_product_tags are not provided, the commit applies to all products.
	ApplicableProductTags []string `json:"applicable_product_tags"`
	Description           string   `json:"description"`
	// Specify the name of the line item for the threshold charge. If left blank, it
	// will default to the commit product name.
	Name string `json:"name"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown. This field cannot
	// be used together with `applicable_product_ids` or `applicable_product_tags`.
	Specifiers []V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationCommitSpecifier `json:"specifiers"`
	JSON       v1ContractGetResponseDataPrepaidBalanceThresholdConfigurationCommitJSON        `json:"-"`
}

func (*V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationCommit) UnmarshalJSON

type V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationCommitSpecifier

type V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationCommitSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                                                         `json:"product_tags"`
	JSON        v1ContractGetResponseDataPrepaidBalanceThresholdConfigurationCommitSpecifierJSON `json:"-"`
}

func (*V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationCommitSpecifier) UnmarshalJSON

type V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfig

type V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfig struct {
	// Gate access to the commit balance based on successful collection of payment.
	// Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
	// facilitate payment using your own payment integration. Select NONE if you do not
	// wish to payment gate the commit balance.
	PaymentGateType V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType `json:"payment_gate_type,required"`
	// Only applicable if using Stripe as your payment gateway through Metronome.
	StripeConfig V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig `json:"stripe_config"`
	// Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
	// not wish Metronome to calculate tax on your behalf. Leaving this field blank
	// will default to NONE.
	TaxType V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType `json:"tax_type"`
	JSON    v1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigJSON    `json:"-"`
}

func (*V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfig) UnmarshalJSON

type V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType

type V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType string

Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance.

const (
	V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateTypeNone     V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType = "NONE"
	V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateTypeStripe   V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType = "STRIPE"
	V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateTypeExternal V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType = "EXTERNAL"
)

func (V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType) IsKnown

type V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig

type V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig struct {
	// If left blank, will default to INVOICE
	PaymentType V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType `json:"payment_type,required"`
	JSON        v1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigJSON        `json:"-"`
}

Only applicable if using Stripe as your payment gateway through Metronome.

func (*V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig) UnmarshalJSON

type V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType

type V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType string

If left blank, will default to INVOICE

const (
	V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypeInvoice       V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "INVOICE"
	V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypePaymentIntent V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "PAYMENT_INTENT"
)

func (V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType) IsKnown

type V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType

type V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType string

Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE.

const (
	V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxTypeNone   V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType = "NONE"
	V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxTypeStripe V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType = "STRIPE"
)

func (V1ContractGetResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType) IsKnown

type V1ContractGetResponseDataScheduledChargesOnUsageInvoices

type V1ContractGetResponseDataScheduledChargesOnUsageInvoices string

Determines which scheduled and commit charges to consolidate onto the Contract's usage invoice. The charge's `timestamp` must match the usage invoice's `ending_before` date for consolidation to occur. This field cannot be modified after a Contract has been created. If this field is omitted, charges will appear on a separate invoice from usage charges.

const (
	V1ContractGetResponseDataScheduledChargesOnUsageInvoicesAll V1ContractGetResponseDataScheduledChargesOnUsageInvoices = "ALL"
)

func (V1ContractGetResponseDataScheduledChargesOnUsageInvoices) IsKnown

type V1ContractGetResponseDataSpendThresholdConfiguration

type V1ContractGetResponseDataSpendThresholdConfiguration struct {
	Commit V1ContractGetResponseDataSpendThresholdConfigurationCommit `json:"commit,required"`
	// When set to false, the contract will not be evaluated against the
	// threshold_amount. Toggling to true will result an immediate evaluation,
	// regardless of prior state.
	IsEnabled         bool                                                                  `json:"is_enabled,required"`
	PaymentGateConfig V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfig `json:"payment_gate_config,required"`
	// Specify the threshold amount for the contract. Each time the contract's usage
	// hits this amount, a threshold charge will be initiated.
	ThresholdAmount float64                                                  `json:"threshold_amount,required"`
	JSON            v1ContractGetResponseDataSpendThresholdConfigurationJSON `json:"-"`
}

func (*V1ContractGetResponseDataSpendThresholdConfiguration) UnmarshalJSON

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

type V1ContractGetResponseDataSpendThresholdConfigurationCommit

type V1ContractGetResponseDataSpendThresholdConfigurationCommit struct {
	// The commit product that will be used to generate the line item for commit
	// payment.
	ProductID   string `json:"product_id,required"`
	Description string `json:"description"`
	// Specify the name of the line item for the threshold charge. If left blank, it
	// will default to the commit product name.
	Name string                                                         `json:"name"`
	JSON v1ContractGetResponseDataSpendThresholdConfigurationCommitJSON `json:"-"`
}

func (*V1ContractGetResponseDataSpendThresholdConfigurationCommit) UnmarshalJSON

type V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfig

type V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfig struct {
	// Gate access to the commit balance based on successful collection of payment.
	// Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
	// facilitate payment using your own payment integration. Select NONE if you do not
	// wish to payment gate the commit balance.
	PaymentGateType V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateType `json:"payment_gate_type,required"`
	// Only applicable if using Stripe as your payment gateway through Metronome.
	StripeConfig V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfig `json:"stripe_config"`
	// Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
	// not wish Metronome to calculate tax on your behalf. Leaving this field blank
	// will default to NONE.
	TaxType V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigTaxType `json:"tax_type"`
	JSON    v1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigJSON    `json:"-"`
}

func (*V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfig) UnmarshalJSON

type V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateType

type V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateType string

Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance.

const (
	V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateTypeNone     V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateType = "NONE"
	V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateTypeStripe   V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateType = "STRIPE"
	V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateTypeExternal V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateType = "EXTERNAL"
)

func (V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateType) IsKnown

type V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfig

type V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfig struct {
	// If left blank, will default to INVOICE
	PaymentType V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType `json:"payment_type,required"`
	JSON        v1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfigJSON        `json:"-"`
}

Only applicable if using Stripe as your payment gateway through Metronome.

func (*V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfig) UnmarshalJSON

type V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType

type V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType string

If left blank, will default to INVOICE

const (
	V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypeInvoice       V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "INVOICE"
	V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypePaymentIntent V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "PAYMENT_INTENT"
)

func (V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType) IsKnown

type V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigTaxType

type V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigTaxType string

Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE.

const (
	V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigTaxTypeNone   V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigTaxType = "NONE"
	V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigTaxTypeStripe V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigTaxType = "STRIPE"
)

func (V1ContractGetResponseDataSpendThresholdConfigurationPaymentGateConfigTaxType) IsKnown

type V1ContractGetResponseDataSubscription

type V1ContractGetResponseDataSubscription struct {
	CollectionSchedule V1ContractGetResponseDataSubscriptionsCollectionSchedule `json:"collection_schedule,required"`
	Proration          V1ContractGetResponseDataSubscriptionsProration          `json:"proration,required"`
	QuantitySchedule   []V1ContractGetResponseDataSubscriptionsQuantitySchedule `json:"quantity_schedule,required"`
	StartingAt         time.Time                                                `json:"starting_at,required" format:"date-time"`
	SubscriptionRate   V1ContractGetResponseDataSubscriptionsSubscriptionRate   `json:"subscription_rate,required"`
	ID                 string                                                   `json:"id" format:"uuid"`
	CustomFields       map[string]string                                        `json:"custom_fields"`
	Description        string                                                   `json:"description"`
	EndingBefore       time.Time                                                `json:"ending_before" format:"date-time"`
	FiatCreditTypeID   string                                                   `json:"fiat_credit_type_id" format:"uuid"`
	Name               string                                                   `json:"name"`
	JSON               v1ContractGetResponseDataSubscriptionJSON                `json:"-"`
}

func (*V1ContractGetResponseDataSubscription) UnmarshalJSON

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

type V1ContractGetResponseDataSubscriptionsCollectionSchedule

type V1ContractGetResponseDataSubscriptionsCollectionSchedule string
const (
	V1ContractGetResponseDataSubscriptionsCollectionScheduleAdvance V1ContractGetResponseDataSubscriptionsCollectionSchedule = "ADVANCE"
	V1ContractGetResponseDataSubscriptionsCollectionScheduleArrears V1ContractGetResponseDataSubscriptionsCollectionSchedule = "ARREARS"
)

func (V1ContractGetResponseDataSubscriptionsCollectionSchedule) IsKnown

type V1ContractGetResponseDataSubscriptionsProration

type V1ContractGetResponseDataSubscriptionsProration struct {
	InvoiceBehavior V1ContractGetResponseDataSubscriptionsProrationInvoiceBehavior `json:"invoice_behavior,required"`
	IsProrated      bool                                                           `json:"is_prorated,required"`
	JSON            v1ContractGetResponseDataSubscriptionsProrationJSON            `json:"-"`
}

func (*V1ContractGetResponseDataSubscriptionsProration) UnmarshalJSON

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

type V1ContractGetResponseDataSubscriptionsProrationInvoiceBehavior

type V1ContractGetResponseDataSubscriptionsProrationInvoiceBehavior string
const (
	V1ContractGetResponseDataSubscriptionsProrationInvoiceBehaviorBillImmediately          V1ContractGetResponseDataSubscriptionsProrationInvoiceBehavior = "BILL_IMMEDIATELY"
	V1ContractGetResponseDataSubscriptionsProrationInvoiceBehaviorBillOnNextCollectionDate V1ContractGetResponseDataSubscriptionsProrationInvoiceBehavior = "BILL_ON_NEXT_COLLECTION_DATE"
)

func (V1ContractGetResponseDataSubscriptionsProrationInvoiceBehavior) IsKnown

type V1ContractGetResponseDataSubscriptionsQuantitySchedule

type V1ContractGetResponseDataSubscriptionsQuantitySchedule struct {
	Quantity     float64                                                    `json:"quantity,required"`
	StartingAt   time.Time                                                  `json:"starting_at,required" format:"date-time"`
	EndingBefore time.Time                                                  `json:"ending_before" format:"date-time"`
	JSON         v1ContractGetResponseDataSubscriptionsQuantityScheduleJSON `json:"-"`
}

func (*V1ContractGetResponseDataSubscriptionsQuantitySchedule) UnmarshalJSON

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

type V1ContractGetResponseDataSubscriptionsSubscriptionRate

type V1ContractGetResponseDataSubscriptionsSubscriptionRate struct {
	BillingFrequency V1ContractGetResponseDataSubscriptionsSubscriptionRateBillingFrequency `json:"billing_frequency,required"`
	Product          V1ContractGetResponseDataSubscriptionsSubscriptionRateProduct          `json:"product,required"`
	JSON             v1ContractGetResponseDataSubscriptionsSubscriptionRateJSON             `json:"-"`
}

func (*V1ContractGetResponseDataSubscriptionsSubscriptionRate) UnmarshalJSON

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

type V1ContractGetResponseDataSubscriptionsSubscriptionRateBillingFrequency

type V1ContractGetResponseDataSubscriptionsSubscriptionRateBillingFrequency string
const (
	V1ContractGetResponseDataSubscriptionsSubscriptionRateBillingFrequencyMonthly   V1ContractGetResponseDataSubscriptionsSubscriptionRateBillingFrequency = "MONTHLY"
	V1ContractGetResponseDataSubscriptionsSubscriptionRateBillingFrequencyQuarterly V1ContractGetResponseDataSubscriptionsSubscriptionRateBillingFrequency = "QUARTERLY"
	V1ContractGetResponseDataSubscriptionsSubscriptionRateBillingFrequencyAnnual    V1ContractGetResponseDataSubscriptionsSubscriptionRateBillingFrequency = "ANNUAL"
	V1ContractGetResponseDataSubscriptionsSubscriptionRateBillingFrequencyWeekly    V1ContractGetResponseDataSubscriptionsSubscriptionRateBillingFrequency = "WEEKLY"
)

func (V1ContractGetResponseDataSubscriptionsSubscriptionRateBillingFrequency) IsKnown

type V1ContractGetResponseDataSubscriptionsSubscriptionRateProduct

type V1ContractGetResponseDataSubscriptionsSubscriptionRateProduct struct {
	ID   string                                                            `json:"id,required" format:"uuid"`
	Name string                                                            `json:"name,required"`
	JSON v1ContractGetResponseDataSubscriptionsSubscriptionRateProductJSON `json:"-"`
}

func (*V1ContractGetResponseDataSubscriptionsSubscriptionRateProduct) UnmarshalJSON

type V1ContractGetSubscriptionQuantityHistoryParams

type V1ContractGetSubscriptionQuantityHistoryParams struct {
	ContractID     param.Field[string] `json:"contract_id,required" format:"uuid"`
	CustomerID     param.Field[string] `json:"customer_id,required" format:"uuid"`
	SubscriptionID param.Field[string] `json:"subscription_id,required" format:"uuid"`
}

func (V1ContractGetSubscriptionQuantityHistoryParams) MarshalJSON

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

type V1ContractGetSubscriptionQuantityHistoryResponse

type V1ContractGetSubscriptionQuantityHistoryResponse struct {
	Data V1ContractGetSubscriptionQuantityHistoryResponseData `json:"data,required"`
	JSON v1ContractGetSubscriptionQuantityHistoryResponseJSON `json:"-"`
}

func (*V1ContractGetSubscriptionQuantityHistoryResponse) UnmarshalJSON

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

type V1ContractGetSubscriptionQuantityHistoryResponseData

type V1ContractGetSubscriptionQuantityHistoryResponseData struct {
	FiatCreditTypeID string                                                        `json:"fiat_credit_type_id" format:"uuid"`
	History          []V1ContractGetSubscriptionQuantityHistoryResponseDataHistory `json:"history"`
	SubscriptionID   string                                                        `json:"subscription_id" format:"uuid"`
	JSON             v1ContractGetSubscriptionQuantityHistoryResponseDataJSON      `json:"-"`
}

func (*V1ContractGetSubscriptionQuantityHistoryResponseData) UnmarshalJSON

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

type V1ContractGetSubscriptionQuantityHistoryResponseDataHistory

type V1ContractGetSubscriptionQuantityHistoryResponseDataHistory struct {
	Data       []V1ContractGetSubscriptionQuantityHistoryResponseDataHistoryData `json:"data,required"`
	StartingAt time.Time                                                         `json:"starting_at,required" format:"date-time"`
	JSON       v1ContractGetSubscriptionQuantityHistoryResponseDataHistoryJSON   `json:"-"`
}

func (*V1ContractGetSubscriptionQuantityHistoryResponseDataHistory) UnmarshalJSON

type V1ContractGetSubscriptionQuantityHistoryResponseDataHistoryData

type V1ContractGetSubscriptionQuantityHistoryResponseDataHistoryData struct {
	Quantity  float64                                                             `json:"quantity,required"`
	Total     float64                                                             `json:"total,required"`
	UnitPrice float64                                                             `json:"unit_price,required"`
	JSON      v1ContractGetSubscriptionQuantityHistoryResponseDataHistoryDataJSON `json:"-"`
}

func (*V1ContractGetSubscriptionQuantityHistoryResponseDataHistoryData) UnmarshalJSON

type V1ContractListBalancesParams

type V1ContractListBalancesParams struct {
	CustomerID param.Field[string] `json:"customer_id,required" format:"uuid"`
	ID         param.Field[string] `json:"id" format:"uuid"`
	// Return only balances that have access schedules that "cover" the provided date
	CoveringDate param.Field[time.Time] `json:"covering_date" format:"date-time"`
	// Include only balances that have any access before the provided date (exclusive)
	EffectiveBefore param.Field[time.Time] `json:"effective_before" format:"date-time"`
	// Include archived credits and credits from archived contracts.
	IncludeArchived param.Field[bool] `json:"include_archived"`
	// Include the balance of credits and commits in the response. Setting this flag
	// may cause the query to be slower.
	IncludeBalance param.Field[bool] `json:"include_balance"`
	// Include balances on the contract level.
	IncludeContractBalances param.Field[bool] `json:"include_contract_balances"`
	// Include ledgers in the response. Setting this flag may cause the query to be
	// slower.
	IncludeLedgers param.Field[bool] `json:"include_ledgers"`
	// The next page token from a previous response.
	NextPage param.Field[string] `json:"next_page"`
	// Include only balances that have any access on or after the provided date
	StartingAt param.Field[time.Time] `json:"starting_at" format:"date-time"`
}

func (V1ContractListBalancesParams) MarshalJSON

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

type V1ContractListBalancesResponse

type V1ContractListBalancesResponse struct {
	Data     []V1ContractListBalancesResponseData `json:"data,required"`
	NextPage string                               `json:"next_page,required,nullable"`
	JSON     v1ContractListBalancesResponseJSON   `json:"-"`
}

func (*V1ContractListBalancesResponse) UnmarshalJSON

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

type V1ContractListBalancesResponseData

type V1ContractListBalancesResponseData struct {
	ID string `json:"id,required" format:"uuid"`
	// This field can have the runtime type of
	// [V1ContractListBalancesResponseDataObjectProduct].
	Product interface{}                            `json:"product,required"`
	Type    V1ContractListBalancesResponseDataType `json:"type,required"`
	// This field can have the runtime type of
	// [V1ContractListBalancesResponseDataObjectAccessSchedule].
	AccessSchedule interface{} `json:"access_schedule"`
	// (DEPRECATED) Use access_schedule + invoice_schedule instead.
	Amount float64 `json:"amount"`
	// This field can have the runtime type of [[]string].
	ApplicableContractIDs interface{} `json:"applicable_contract_ids"`
	// This field can have the runtime type of [[]string].
	ApplicableProductIDs interface{} `json:"applicable_product_ids"`
	// This field can have the runtime type of [[]string].
	ApplicableProductTags interface{} `json:"applicable_product_tags"`
	// RFC 3339 timestamp indicating when the commit was archived. If not provided, the
	// commit is not archived.
	ArchivedAt time.Time `json:"archived_at" format:"date-time"`
	// The current balance of the credit or commit. This balance reflects the amount of
	// credit or commit that the customer has access to use at this moment - thus,
	// expired and upcoming credit or commit segments contribute 0 to the balance. The
	// balance will match the sum of all ledger entries with the exception of the case
	// where the sum of negative manual ledger entries exceeds the positive amount
	// remaining on the credit or commit - in that case, the balance will be 0. All
	// manual ledger entries associated with active credit or commit segments are
	// included in the balance, including future-dated manual ledger entries.
	Balance float64 `json:"balance"`
	// This field can have the runtime type of
	// [V1ContractListBalancesResponseDataObjectContract].
	Contract interface{} `json:"contract"`
	// This field can have the runtime type of [map[string]string].
	CustomFields interface{} `json:"custom_fields"`
	Description  string      `json:"description"`
	// This field can have the runtime type of
	// [V1ContractListBalancesResponseDataObjectInvoiceContract].
	InvoiceContract interface{} `json:"invoice_contract"`
	// This field can have the runtime type of
	// [V1ContractListBalancesResponseDataObjectInvoiceSchedule].
	InvoiceSchedule interface{} `json:"invoice_schedule"`
	// This field can have the runtime type of
	// [[]V1ContractListBalancesResponseDataObjectLedger].
	Ledger interface{} `json:"ledger"`
	Name   string      `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// If multiple credits or commits are applicable, the one with the lower priority
	// will apply first.
	Priority float64                                    `json:"priority"`
	RateType V1ContractListBalancesResponseDataRateType `json:"rate_type"`
	// This field can have the runtime type of
	// [V1ContractListBalancesResponseDataObjectRolledOverFrom].
	RolledOverFrom   interface{} `json:"rolled_over_from"`
	RolloverFraction float64     `json:"rollover_fraction"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// This field can have the runtime type of
	// [[]V1ContractListBalancesResponseDataObjectSpecifier].
	Specifiers interface{} `json:"specifiers"`
	// Prevents the creation of duplicates. If a request to create a commit or credit
	// is made with a uniqueness key that was previously used to create a commit or
	// credit, a new record will not be created and the request will fail with a 409
	// error.
	UniquenessKey string                                 `json:"uniqueness_key"`
	JSON          v1ContractListBalancesResponseDataJSON `json:"-"`
	// contains filtered or unexported fields
}

func (V1ContractListBalancesResponseData) AsUnion

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

Possible runtime types of the union are V1ContractListBalancesResponseDataObject, V1ContractListBalancesResponseDataObject.

func (*V1ContractListBalancesResponseData) UnmarshalJSON

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

type V1ContractListBalancesResponseDataObject

type V1ContractListBalancesResponseDataObject struct {
	ID      string                                          `json:"id,required" format:"uuid"`
	Product V1ContractListBalancesResponseDataObjectProduct `json:"product,required"`
	Type    V1ContractListBalancesResponseDataObjectType    `json:"type,required"`
	// The schedule that the customer will gain access to the credits purposed with
	// this commit.
	AccessSchedule V1ContractListBalancesResponseDataObjectAccessSchedule `json:"access_schedule"`
	// (DEPRECATED) Use access_schedule + invoice_schedule instead.
	Amount                float64  `json:"amount"`
	ApplicableContractIDs []string `json:"applicable_contract_ids" format:"uuid"`
	ApplicableProductIDs  []string `json:"applicable_product_ids" format:"uuid"`
	ApplicableProductTags []string `json:"applicable_product_tags"`
	// RFC 3339 timestamp indicating when the commit was archived. If not provided, the
	// commit is not archived.
	ArchivedAt time.Time `json:"archived_at" format:"date-time"`
	// The current balance of the credit or commit. This balance reflects the amount of
	// credit or commit that the customer has access to use at this moment - thus,
	// expired and upcoming credit or commit segments contribute 0 to the balance. The
	// balance will match the sum of all ledger entries with the exception of the case
	// where the sum of negative manual ledger entries exceeds the positive amount
	// remaining on the credit or commit - in that case, the balance will be 0. All
	// manual ledger entries associated with active credit or commit segments are
	// included in the balance, including future-dated manual ledger entries.
	Balance      float64                                          `json:"balance"`
	Contract     V1ContractListBalancesResponseDataObjectContract `json:"contract"`
	CustomFields map[string]string                                `json:"custom_fields"`
	Description  string                                           `json:"description"`
	// The contract that this commit will be billed on.
	InvoiceContract V1ContractListBalancesResponseDataObjectInvoiceContract `json:"invoice_contract"`
	// The schedule that the customer will be invoiced for this commit.
	InvoiceSchedule V1ContractListBalancesResponseDataObjectInvoiceSchedule `json:"invoice_schedule"`
	// A list of ordered events that impact the balance of a commit. For example, an
	// invoice deduction or a rollover.
	Ledger []V1ContractListBalancesResponseDataObjectLedger `json:"ledger"`
	Name   string                                           `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// If multiple credits or commits are applicable, the one with the lower priority
	// will apply first.
	Priority         float64                                                `json:"priority"`
	RateType         V1ContractListBalancesResponseDataObjectRateType       `json:"rate_type"`
	RolledOverFrom   V1ContractListBalancesResponseDataObjectRolledOverFrom `json:"rolled_over_from"`
	RolloverFraction float64                                                `json:"rollover_fraction"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractListBalancesResponseDataObjectSpecifier `json:"specifiers"`
	// Prevents the creation of duplicates. If a request to create a commit or credit
	// is made with a uniqueness key that was previously used to create a commit or
	// credit, a new record will not be created and the request will fail with a 409
	// error.
	UniquenessKey string                                       `json:"uniqueness_key"`
	JSON          v1ContractListBalancesResponseDataObjectJSON `json:"-"`
}

func (*V1ContractListBalancesResponseDataObject) UnmarshalJSON

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

type V1ContractListBalancesResponseDataObjectAccessSchedule

type V1ContractListBalancesResponseDataObjectAccessSchedule struct {
	ScheduleItems []V1ContractListBalancesResponseDataObjectAccessScheduleScheduleItem `json:"schedule_items,required"`
	CreditType    V1ContractListBalancesResponseDataObjectAccessScheduleCreditType     `json:"credit_type"`
	JSON          v1ContractListBalancesResponseDataObjectAccessScheduleJSON           `json:"-"`
}

The schedule that the customer will gain access to the credits purposed with this commit.

func (*V1ContractListBalancesResponseDataObjectAccessSchedule) UnmarshalJSON

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

type V1ContractListBalancesResponseDataObjectAccessScheduleCreditType

type V1ContractListBalancesResponseDataObjectAccessScheduleCreditType struct {
	ID   string                                                               `json:"id,required" format:"uuid"`
	Name string                                                               `json:"name,required"`
	JSON v1ContractListBalancesResponseDataObjectAccessScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractListBalancesResponseDataObjectAccessScheduleCreditType) UnmarshalJSON

type V1ContractListBalancesResponseDataObjectAccessScheduleScheduleItem

type V1ContractListBalancesResponseDataObjectAccessScheduleScheduleItem struct {
	ID           string                                                                 `json:"id,required" format:"uuid"`
	Amount       float64                                                                `json:"amount,required"`
	EndingBefore time.Time                                                              `json:"ending_before,required" format:"date-time"`
	StartingAt   time.Time                                                              `json:"starting_at,required" format:"date-time"`
	JSON         v1ContractListBalancesResponseDataObjectAccessScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractListBalancesResponseDataObjectAccessScheduleScheduleItem) UnmarshalJSON

type V1ContractListBalancesResponseDataObjectContract

type V1ContractListBalancesResponseDataObjectContract struct {
	ID   string                                               `json:"id,required" format:"uuid"`
	JSON v1ContractListBalancesResponseDataObjectContractJSON `json:"-"`
}

func (*V1ContractListBalancesResponseDataObjectContract) UnmarshalJSON

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

type V1ContractListBalancesResponseDataObjectInvoiceContract

type V1ContractListBalancesResponseDataObjectInvoiceContract struct {
	ID   string                                                      `json:"id,required" format:"uuid"`
	JSON v1ContractListBalancesResponseDataObjectInvoiceContractJSON `json:"-"`
}

The contract that this commit will be billed on.

func (*V1ContractListBalancesResponseDataObjectInvoiceContract) UnmarshalJSON

type V1ContractListBalancesResponseDataObjectInvoiceSchedule

type V1ContractListBalancesResponseDataObjectInvoiceSchedule struct {
	CreditType    V1ContractListBalancesResponseDataObjectInvoiceScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractListBalancesResponseDataObjectInvoiceScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractListBalancesResponseDataObjectInvoiceScheduleJSON           `json:"-"`
}

The schedule that the customer will be invoiced for this commit.

func (*V1ContractListBalancesResponseDataObjectInvoiceSchedule) UnmarshalJSON

type V1ContractListBalancesResponseDataObjectInvoiceScheduleCreditType

type V1ContractListBalancesResponseDataObjectInvoiceScheduleCreditType struct {
	ID   string                                                                `json:"id,required" format:"uuid"`
	Name string                                                                `json:"name,required"`
	JSON v1ContractListBalancesResponseDataObjectInvoiceScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractListBalancesResponseDataObjectInvoiceScheduleCreditType) UnmarshalJSON

type V1ContractListBalancesResponseDataObjectInvoiceScheduleScheduleItem

type V1ContractListBalancesResponseDataObjectInvoiceScheduleScheduleItem struct {
	ID        string                                                                  `json:"id,required" format:"uuid"`
	Amount    float64                                                                 `json:"amount,required"`
	InvoiceID string                                                                  `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                                 `json:"quantity,required"`
	Timestamp time.Time                                                               `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                                 `json:"unit_price,required"`
	JSON      v1ContractListBalancesResponseDataObjectInvoiceScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractListBalancesResponseDataObjectInvoiceScheduleScheduleItem) UnmarshalJSON

type V1ContractListBalancesResponseDataObjectLedger

type V1ContractListBalancesResponseDataObjectLedger struct {
	Amount        float64                                            `json:"amount,required"`
	Timestamp     time.Time                                          `json:"timestamp,required" format:"date-time"`
	Type          V1ContractListBalancesResponseDataObjectLedgerType `json:"type,required"`
	InvoiceID     string                                             `json:"invoice_id" format:"uuid"`
	NewContractID string                                             `json:"new_contract_id" format:"uuid"`
	Reason        string                                             `json:"reason"`
	SegmentID     string                                             `json:"segment_id" format:"uuid"`
	JSON          v1ContractListBalancesResponseDataObjectLedgerJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*V1ContractListBalancesResponseDataObjectLedger) UnmarshalJSON

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

type V1ContractListBalancesResponseDataObjectLedgerObject

type V1ContractListBalancesResponseDataObjectLedgerObject struct {
	Amount    float64                                                  `json:"amount,required"`
	SegmentID string                                                   `json:"segment_id,required" format:"uuid"`
	Timestamp time.Time                                                `json:"timestamp,required" format:"date-time"`
	Type      V1ContractListBalancesResponseDataObjectLedgerObjectType `json:"type,required"`
	JSON      v1ContractListBalancesResponseDataObjectLedgerObjectJSON `json:"-"`
}

func (*V1ContractListBalancesResponseDataObjectLedgerObject) UnmarshalJSON

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

type V1ContractListBalancesResponseDataObjectLedgerObjectType

type V1ContractListBalancesResponseDataObjectLedgerObjectType string
const (
	V1ContractListBalancesResponseDataObjectLedgerObjectTypePrepaidCommitSegmentStart V1ContractListBalancesResponseDataObjectLedgerObjectType = "PREPAID_COMMIT_SEGMENT_START"
)

func (V1ContractListBalancesResponseDataObjectLedgerObjectType) IsKnown

type V1ContractListBalancesResponseDataObjectLedgerType

type V1ContractListBalancesResponseDataObjectLedgerType string
const (
	V1ContractListBalancesResponseDataObjectLedgerTypePrepaidCommitSegmentStart               V1ContractListBalancesResponseDataObjectLedgerType = "PREPAID_COMMIT_SEGMENT_START"
	V1ContractListBalancesResponseDataObjectLedgerTypePrepaidCommitAutomatedInvoiceDeduction  V1ContractListBalancesResponseDataObjectLedgerType = "PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractListBalancesResponseDataObjectLedgerTypePrepaidCommitRollover                   V1ContractListBalancesResponseDataObjectLedgerType = "PREPAID_COMMIT_ROLLOVER"
	V1ContractListBalancesResponseDataObjectLedgerTypePrepaidCommitExpiration                 V1ContractListBalancesResponseDataObjectLedgerType = "PREPAID_COMMIT_EXPIRATION"
	V1ContractListBalancesResponseDataObjectLedgerTypePrepaidCommitCanceled                   V1ContractListBalancesResponseDataObjectLedgerType = "PREPAID_COMMIT_CANCELED"
	V1ContractListBalancesResponseDataObjectLedgerTypePrepaidCommitCredited                   V1ContractListBalancesResponseDataObjectLedgerType = "PREPAID_COMMIT_CREDITED"
	V1ContractListBalancesResponseDataObjectLedgerTypePostpaidCommitInitialBalance            V1ContractListBalancesResponseDataObjectLedgerType = "POSTPAID_COMMIT_INITIAL_BALANCE"
	V1ContractListBalancesResponseDataObjectLedgerTypePostpaidCommitAutomatedInvoiceDeduction V1ContractListBalancesResponseDataObjectLedgerType = "POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractListBalancesResponseDataObjectLedgerTypePostpaidCommitRollover                  V1ContractListBalancesResponseDataObjectLedgerType = "POSTPAID_COMMIT_ROLLOVER"
	V1ContractListBalancesResponseDataObjectLedgerTypePostpaidCommitTrueup                    V1ContractListBalancesResponseDataObjectLedgerType = "POSTPAID_COMMIT_TRUEUP"
	V1ContractListBalancesResponseDataObjectLedgerTypePrepaidCommitManual                     V1ContractListBalancesResponseDataObjectLedgerType = "PREPAID_COMMIT_MANUAL"
	V1ContractListBalancesResponseDataObjectLedgerTypePostpaidCommitManual                    V1ContractListBalancesResponseDataObjectLedgerType = "POSTPAID_COMMIT_MANUAL"
	V1ContractListBalancesResponseDataObjectLedgerTypePostpaidCommitExpiration                V1ContractListBalancesResponseDataObjectLedgerType = "POSTPAID_COMMIT_EXPIRATION"
)

func (V1ContractListBalancesResponseDataObjectLedgerType) IsKnown

type V1ContractListBalancesResponseDataObjectProduct

type V1ContractListBalancesResponseDataObjectProduct struct {
	ID   string                                              `json:"id,required" format:"uuid"`
	Name string                                              `json:"name,required"`
	JSON v1ContractListBalancesResponseDataObjectProductJSON `json:"-"`
}

func (*V1ContractListBalancesResponseDataObjectProduct) UnmarshalJSON

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

type V1ContractListBalancesResponseDataObjectRateType

type V1ContractListBalancesResponseDataObjectRateType string
const (
	V1ContractListBalancesResponseDataObjectRateTypeCommitRate V1ContractListBalancesResponseDataObjectRateType = "COMMIT_RATE"
	V1ContractListBalancesResponseDataObjectRateTypeListRate   V1ContractListBalancesResponseDataObjectRateType = "LIST_RATE"
)

func (V1ContractListBalancesResponseDataObjectRateType) IsKnown

type V1ContractListBalancesResponseDataObjectRolledOverFrom

type V1ContractListBalancesResponseDataObjectRolledOverFrom struct {
	CommitID   string                                                     `json:"commit_id,required" format:"uuid"`
	ContractID string                                                     `json:"contract_id,required" format:"uuid"`
	JSON       v1ContractListBalancesResponseDataObjectRolledOverFromJSON `json:"-"`
}

func (*V1ContractListBalancesResponseDataObjectRolledOverFrom) UnmarshalJSON

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

type V1ContractListBalancesResponseDataObjectSpecifier

type V1ContractListBalancesResponseDataObjectSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                              `json:"product_tags"`
	JSON        v1ContractListBalancesResponseDataObjectSpecifierJSON `json:"-"`
}

func (*V1ContractListBalancesResponseDataObjectSpecifier) UnmarshalJSON

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

type V1ContractListBalancesResponseDataObjectType

type V1ContractListBalancesResponseDataObjectType string
const (
	V1ContractListBalancesResponseDataObjectTypePrepaid  V1ContractListBalancesResponseDataObjectType = "PREPAID"
	V1ContractListBalancesResponseDataObjectTypePostpaid V1ContractListBalancesResponseDataObjectType = "POSTPAID"
)

func (V1ContractListBalancesResponseDataObjectType) IsKnown

type V1ContractListBalancesResponseDataRateType

type V1ContractListBalancesResponseDataRateType string
const (
	V1ContractListBalancesResponseDataRateTypeCommitRate V1ContractListBalancesResponseDataRateType = "COMMIT_RATE"
	V1ContractListBalancesResponseDataRateTypeListRate   V1ContractListBalancesResponseDataRateType = "LIST_RATE"
)

func (V1ContractListBalancesResponseDataRateType) IsKnown

type V1ContractListBalancesResponseDataType

type V1ContractListBalancesResponseDataType string
const (
	V1ContractListBalancesResponseDataTypePrepaid  V1ContractListBalancesResponseDataType = "PREPAID"
	V1ContractListBalancesResponseDataTypePostpaid V1ContractListBalancesResponseDataType = "POSTPAID"
	V1ContractListBalancesResponseDataTypeCredit   V1ContractListBalancesResponseDataType = "CREDIT"
)

func (V1ContractListBalancesResponseDataType) IsKnown

type V1ContractListBalancesResponseDataUnion

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

Union satisfied by V1ContractListBalancesResponseDataObject or V1ContractListBalancesResponseDataObject.

type V1ContractListParams

type V1ContractListParams struct {
	CustomerID param.Field[string] `json:"customer_id,required" format:"uuid"`
	// Optional RFC 3339 timestamp. If provided, the response will include only
	// contracts effective on the provided date. This cannot be provided if the
	// starting_at filter is provided.
	CoveringDate param.Field[time.Time] `json:"covering_date" format:"date-time"`
	// Include archived contracts in the response
	IncludeArchived param.Field[bool] `json:"include_archived"`
	// Include the balance of credits and commits in the response. Setting this flag
	// may cause the query to be slower.
	IncludeBalance param.Field[bool] `json:"include_balance"`
	// Include commit ledgers in the response. Setting this flag may cause the query to
	// be slower.
	IncludeLedgers param.Field[bool] `json:"include_ledgers"`
	// Optional RFC 3339 timestamp. If provided, the response will include only
	// contracts where effective_at is on or after the provided date. This cannot be
	// provided if the covering_date filter is provided.
	StartingAt param.Field[time.Time] `json:"starting_at" format:"date-time"`
}

func (V1ContractListParams) MarshalJSON

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

type V1ContractListResponse

type V1ContractListResponse struct {
	Data []V1ContractListResponseData `json:"data,required"`
	JSON v1ContractListResponseJSON   `json:"-"`
}

func (*V1ContractListResponse) UnmarshalJSON

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

type V1ContractListResponseData

type V1ContractListResponseData struct {
	ID         string                                `json:"id,required" format:"uuid"`
	Amendments []V1ContractListResponseDataAmendment `json:"amendments,required"`
	Current    V1ContractListResponseDataCurrent     `json:"current,required"`
	CustomerID string                                `json:"customer_id,required" format:"uuid"`
	Initial    V1ContractListResponseDataInitial     `json:"initial,required"`
	// RFC 3339 timestamp indicating when the contract was archived. If not returned,
	// the contract is not archived.
	ArchivedAt   time.Time         `json:"archived_at" format:"date-time"`
	CustomFields map[string]string `json:"custom_fields"`
	// The billing provider configuration associated with a contract.
	CustomerBillingProviderConfiguration V1ContractListResponseDataCustomerBillingProviderConfiguration `json:"customer_billing_provider_configuration"`
	PrepaidBalanceThresholdConfiguration V1ContractListResponseDataPrepaidBalanceThresholdConfiguration `json:"prepaid_balance_threshold_configuration"`
	// Determines which scheduled and commit charges to consolidate onto the Contract's
	// usage invoice. The charge's `timestamp` must match the usage invoice's
	// `ending_before` date for consolidation to occur. This field cannot be modified
	// after a Contract has been created. If this field is omitted, charges will appear
	// on a separate invoice from usage charges.
	ScheduledChargesOnUsageInvoices V1ContractListResponseDataScheduledChargesOnUsageInvoices `json:"scheduled_charges_on_usage_invoices"`
	SpendThresholdConfiguration     V1ContractListResponseDataSpendThresholdConfiguration     `json:"spend_threshold_configuration"`
	// (beta) List of subscriptions on the contract.
	Subscriptions []V1ContractListResponseDataSubscription `json:"subscriptions"`
	// Prevents the creation of duplicates. If a request to create a record is made
	// with a previously used uniqueness key, a new record will not be created and the
	// request will fail with a 409 error.
	UniquenessKey string                         `json:"uniqueness_key"`
	JSON          v1ContractListResponseDataJSON `json:"-"`
}

func (*V1ContractListResponseData) UnmarshalJSON

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

type V1ContractListResponseDataAmendment

type V1ContractListResponseDataAmendment struct {
	ID               string                                                `json:"id,required" format:"uuid"`
	Commits          []V1ContractListResponseDataAmendmentsCommit          `json:"commits,required"`
	CreatedAt        time.Time                                             `json:"created_at,required" format:"date-time"`
	CreatedBy        string                                                `json:"created_by,required"`
	Overrides        []V1ContractListResponseDataAmendmentsOverride        `json:"overrides,required"`
	ScheduledCharges []V1ContractListResponseDataAmendmentsScheduledCharge `json:"scheduled_charges,required"`
	StartingAt       time.Time                                             `json:"starting_at,required" format:"date-time"`
	Credits          []V1ContractListResponseDataAmendmentsCredit          `json:"credits"`
	// This field's availability is dependent on your client's configuration.
	Discounts []V1ContractListResponseDataAmendmentsDiscount `json:"discounts"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// This field's availability is dependent on your client's configuration.
	ProfessionalServices []V1ContractListResponseDataAmendmentsProfessionalService `json:"professional_services"`
	// This field's availability is dependent on your client's configuration.
	ResellerRoyalties []V1ContractListResponseDataAmendmentsResellerRoyalty `json:"reseller_royalties"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string                                  `json:"salesforce_opportunity_id"`
	JSON                    v1ContractListResponseDataAmendmentJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendment) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsCommit

type V1ContractListResponseDataAmendmentsCommit struct {
	ID      string                                             `json:"id,required" format:"uuid"`
	Product V1ContractListResponseDataAmendmentsCommitsProduct `json:"product,required"`
	Type    V1ContractListResponseDataAmendmentsCommitsType    `json:"type,required"`
	// The schedule that the customer will gain access to the credits purposed with
	// this commit.
	AccessSchedule V1ContractListResponseDataAmendmentsCommitsAccessSchedule `json:"access_schedule"`
	// (DEPRECATED) Use access_schedule + invoice_schedule instead.
	Amount                float64  `json:"amount"`
	ApplicableContractIDs []string `json:"applicable_contract_ids" format:"uuid"`
	ApplicableProductIDs  []string `json:"applicable_product_ids" format:"uuid"`
	ApplicableProductTags []string `json:"applicable_product_tags"`
	// RFC 3339 timestamp indicating when the commit was archived. If not provided, the
	// commit is not archived.
	ArchivedAt time.Time `json:"archived_at" format:"date-time"`
	// The current balance of the credit or commit. This balance reflects the amount of
	// credit or commit that the customer has access to use at this moment - thus,
	// expired and upcoming credit or commit segments contribute 0 to the balance. The
	// balance will match the sum of all ledger entries with the exception of the case
	// where the sum of negative manual ledger entries exceeds the positive amount
	// remaining on the credit or commit - in that case, the balance will be 0. All
	// manual ledger entries associated with active credit or commit segments are
	// included in the balance, including future-dated manual ledger entries.
	Balance      float64                                             `json:"balance"`
	Contract     V1ContractListResponseDataAmendmentsCommitsContract `json:"contract"`
	CustomFields map[string]string                                   `json:"custom_fields"`
	Description  string                                              `json:"description"`
	// The contract that this commit will be billed on.
	InvoiceContract V1ContractListResponseDataAmendmentsCommitsInvoiceContract `json:"invoice_contract"`
	// The schedule that the customer will be invoiced for this commit.
	InvoiceSchedule V1ContractListResponseDataAmendmentsCommitsInvoiceSchedule `json:"invoice_schedule"`
	// A list of ordered events that impact the balance of a commit. For example, an
	// invoice deduction or a rollover.
	Ledger []V1ContractListResponseDataAmendmentsCommitsLedger `json:"ledger"`
	Name   string                                              `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// If multiple credits or commits are applicable, the one with the lower priority
	// will apply first.
	Priority         float64                                                   `json:"priority"`
	RateType         V1ContractListResponseDataAmendmentsCommitsRateType       `json:"rate_type"`
	RolledOverFrom   V1ContractListResponseDataAmendmentsCommitsRolledOverFrom `json:"rolled_over_from"`
	RolloverFraction float64                                                   `json:"rollover_fraction"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractListResponseDataAmendmentsCommitsSpecifier `json:"specifiers"`
	// Prevents the creation of duplicates. If a request to create a commit or credit
	// is made with a uniqueness key that was previously used to create a commit or
	// credit, a new record will not be created and the request will fail with a 409
	// error.
	UniquenessKey string                                         `json:"uniqueness_key"`
	JSON          v1ContractListResponseDataAmendmentsCommitJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsCommit) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsCommitsAccessSchedule

type V1ContractListResponseDataAmendmentsCommitsAccessSchedule struct {
	ScheduleItems []V1ContractListResponseDataAmendmentsCommitsAccessScheduleScheduleItem `json:"schedule_items,required"`
	CreditType    V1ContractListResponseDataAmendmentsCommitsAccessScheduleCreditType     `json:"credit_type"`
	JSON          v1ContractListResponseDataAmendmentsCommitsAccessScheduleJSON           `json:"-"`
}

The schedule that the customer will gain access to the credits purposed with this commit.

func (*V1ContractListResponseDataAmendmentsCommitsAccessSchedule) UnmarshalJSON

type V1ContractListResponseDataAmendmentsCommitsAccessScheduleCreditType

type V1ContractListResponseDataAmendmentsCommitsAccessScheduleCreditType struct {
	ID   string                                                                  `json:"id,required" format:"uuid"`
	Name string                                                                  `json:"name,required"`
	JSON v1ContractListResponseDataAmendmentsCommitsAccessScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsCommitsAccessScheduleCreditType) UnmarshalJSON

type V1ContractListResponseDataAmendmentsCommitsAccessScheduleScheduleItem

type V1ContractListResponseDataAmendmentsCommitsAccessScheduleScheduleItem struct {
	ID           string                                                                    `json:"id,required" format:"uuid"`
	Amount       float64                                                                   `json:"amount,required"`
	EndingBefore time.Time                                                                 `json:"ending_before,required" format:"date-time"`
	StartingAt   time.Time                                                                 `json:"starting_at,required" format:"date-time"`
	JSON         v1ContractListResponseDataAmendmentsCommitsAccessScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsCommitsAccessScheduleScheduleItem) UnmarshalJSON

type V1ContractListResponseDataAmendmentsCommitsContract

type V1ContractListResponseDataAmendmentsCommitsContract struct {
	ID   string                                                  `json:"id,required" format:"uuid"`
	JSON v1ContractListResponseDataAmendmentsCommitsContractJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsCommitsContract) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsCommitsInvoiceContract

type V1ContractListResponseDataAmendmentsCommitsInvoiceContract struct {
	ID   string                                                         `json:"id,required" format:"uuid"`
	JSON v1ContractListResponseDataAmendmentsCommitsInvoiceContractJSON `json:"-"`
}

The contract that this commit will be billed on.

func (*V1ContractListResponseDataAmendmentsCommitsInvoiceContract) UnmarshalJSON

type V1ContractListResponseDataAmendmentsCommitsInvoiceSchedule

type V1ContractListResponseDataAmendmentsCommitsInvoiceSchedule struct {
	CreditType    V1ContractListResponseDataAmendmentsCommitsInvoiceScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractListResponseDataAmendmentsCommitsInvoiceScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractListResponseDataAmendmentsCommitsInvoiceScheduleJSON           `json:"-"`
}

The schedule that the customer will be invoiced for this commit.

func (*V1ContractListResponseDataAmendmentsCommitsInvoiceSchedule) UnmarshalJSON

type V1ContractListResponseDataAmendmentsCommitsInvoiceScheduleCreditType

type V1ContractListResponseDataAmendmentsCommitsInvoiceScheduleCreditType struct {
	ID   string                                                                   `json:"id,required" format:"uuid"`
	Name string                                                                   `json:"name,required"`
	JSON v1ContractListResponseDataAmendmentsCommitsInvoiceScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsCommitsInvoiceScheduleCreditType) UnmarshalJSON

type V1ContractListResponseDataAmendmentsCommitsInvoiceScheduleScheduleItem

type V1ContractListResponseDataAmendmentsCommitsInvoiceScheduleScheduleItem struct {
	ID        string                                                                     `json:"id,required" format:"uuid"`
	Amount    float64                                                                    `json:"amount,required"`
	InvoiceID string                                                                     `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                                    `json:"quantity,required"`
	Timestamp time.Time                                                                  `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                                    `json:"unit_price,required"`
	JSON      v1ContractListResponseDataAmendmentsCommitsInvoiceScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsCommitsInvoiceScheduleScheduleItem) UnmarshalJSON

type V1ContractListResponseDataAmendmentsCommitsLedger

type V1ContractListResponseDataAmendmentsCommitsLedger struct {
	Amount        float64                                               `json:"amount,required"`
	Timestamp     time.Time                                             `json:"timestamp,required" format:"date-time"`
	Type          V1ContractListResponseDataAmendmentsCommitsLedgerType `json:"type,required"`
	InvoiceID     string                                                `json:"invoice_id" format:"uuid"`
	NewContractID string                                                `json:"new_contract_id" format:"uuid"`
	Reason        string                                                `json:"reason"`
	SegmentID     string                                                `json:"segment_id" format:"uuid"`
	JSON          v1ContractListResponseDataAmendmentsCommitsLedgerJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*V1ContractListResponseDataAmendmentsCommitsLedger) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsCommitsLedgerObject

type V1ContractListResponseDataAmendmentsCommitsLedgerObject struct {
	Amount    float64                                                     `json:"amount,required"`
	SegmentID string                                                      `json:"segment_id,required" format:"uuid"`
	Timestamp time.Time                                                   `json:"timestamp,required" format:"date-time"`
	Type      V1ContractListResponseDataAmendmentsCommitsLedgerObjectType `json:"type,required"`
	JSON      v1ContractListResponseDataAmendmentsCommitsLedgerObjectJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsCommitsLedgerObject) UnmarshalJSON

type V1ContractListResponseDataAmendmentsCommitsLedgerObjectType

type V1ContractListResponseDataAmendmentsCommitsLedgerObjectType string
const (
	V1ContractListResponseDataAmendmentsCommitsLedgerObjectTypePrepaidCommitSegmentStart V1ContractListResponseDataAmendmentsCommitsLedgerObjectType = "PREPAID_COMMIT_SEGMENT_START"
)

func (V1ContractListResponseDataAmendmentsCommitsLedgerObjectType) IsKnown

type V1ContractListResponseDataAmendmentsCommitsLedgerType

type V1ContractListResponseDataAmendmentsCommitsLedgerType string
const (
	V1ContractListResponseDataAmendmentsCommitsLedgerTypePrepaidCommitSegmentStart               V1ContractListResponseDataAmendmentsCommitsLedgerType = "PREPAID_COMMIT_SEGMENT_START"
	V1ContractListResponseDataAmendmentsCommitsLedgerTypePrepaidCommitAutomatedInvoiceDeduction  V1ContractListResponseDataAmendmentsCommitsLedgerType = "PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractListResponseDataAmendmentsCommitsLedgerTypePrepaidCommitRollover                   V1ContractListResponseDataAmendmentsCommitsLedgerType = "PREPAID_COMMIT_ROLLOVER"
	V1ContractListResponseDataAmendmentsCommitsLedgerTypePrepaidCommitExpiration                 V1ContractListResponseDataAmendmentsCommitsLedgerType = "PREPAID_COMMIT_EXPIRATION"
	V1ContractListResponseDataAmendmentsCommitsLedgerTypePrepaidCommitCanceled                   V1ContractListResponseDataAmendmentsCommitsLedgerType = "PREPAID_COMMIT_CANCELED"
	V1ContractListResponseDataAmendmentsCommitsLedgerTypePrepaidCommitCredited                   V1ContractListResponseDataAmendmentsCommitsLedgerType = "PREPAID_COMMIT_CREDITED"
	V1ContractListResponseDataAmendmentsCommitsLedgerTypePostpaidCommitInitialBalance            V1ContractListResponseDataAmendmentsCommitsLedgerType = "POSTPAID_COMMIT_INITIAL_BALANCE"
	V1ContractListResponseDataAmendmentsCommitsLedgerTypePostpaidCommitAutomatedInvoiceDeduction V1ContractListResponseDataAmendmentsCommitsLedgerType = "POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractListResponseDataAmendmentsCommitsLedgerTypePostpaidCommitRollover                  V1ContractListResponseDataAmendmentsCommitsLedgerType = "POSTPAID_COMMIT_ROLLOVER"
	V1ContractListResponseDataAmendmentsCommitsLedgerTypePostpaidCommitTrueup                    V1ContractListResponseDataAmendmentsCommitsLedgerType = "POSTPAID_COMMIT_TRUEUP"
	V1ContractListResponseDataAmendmentsCommitsLedgerTypePrepaidCommitManual                     V1ContractListResponseDataAmendmentsCommitsLedgerType = "PREPAID_COMMIT_MANUAL"
	V1ContractListResponseDataAmendmentsCommitsLedgerTypePostpaidCommitManual                    V1ContractListResponseDataAmendmentsCommitsLedgerType = "POSTPAID_COMMIT_MANUAL"
	V1ContractListResponseDataAmendmentsCommitsLedgerTypePostpaidCommitExpiration                V1ContractListResponseDataAmendmentsCommitsLedgerType = "POSTPAID_COMMIT_EXPIRATION"
)

func (V1ContractListResponseDataAmendmentsCommitsLedgerType) IsKnown

type V1ContractListResponseDataAmendmentsCommitsProduct

type V1ContractListResponseDataAmendmentsCommitsProduct struct {
	ID   string                                                 `json:"id,required" format:"uuid"`
	Name string                                                 `json:"name,required"`
	JSON v1ContractListResponseDataAmendmentsCommitsProductJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsCommitsProduct) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsCommitsRateType

type V1ContractListResponseDataAmendmentsCommitsRateType string
const (
	V1ContractListResponseDataAmendmentsCommitsRateTypeCommitRate V1ContractListResponseDataAmendmentsCommitsRateType = "COMMIT_RATE"
	V1ContractListResponseDataAmendmentsCommitsRateTypeListRate   V1ContractListResponseDataAmendmentsCommitsRateType = "LIST_RATE"
)

func (V1ContractListResponseDataAmendmentsCommitsRateType) IsKnown

type V1ContractListResponseDataAmendmentsCommitsRolledOverFrom

type V1ContractListResponseDataAmendmentsCommitsRolledOverFrom struct {
	CommitID   string                                                        `json:"commit_id,required" format:"uuid"`
	ContractID string                                                        `json:"contract_id,required" format:"uuid"`
	JSON       v1ContractListResponseDataAmendmentsCommitsRolledOverFromJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsCommitsRolledOverFrom) UnmarshalJSON

type V1ContractListResponseDataAmendmentsCommitsSpecifier

type V1ContractListResponseDataAmendmentsCommitsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                                 `json:"product_tags"`
	JSON        v1ContractListResponseDataAmendmentsCommitsSpecifierJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsCommitsSpecifier) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsCommitsType

type V1ContractListResponseDataAmendmentsCommitsType string
const (
	V1ContractListResponseDataAmendmentsCommitsTypePrepaid  V1ContractListResponseDataAmendmentsCommitsType = "PREPAID"
	V1ContractListResponseDataAmendmentsCommitsTypePostpaid V1ContractListResponseDataAmendmentsCommitsType = "POSTPAID"
)

func (V1ContractListResponseDataAmendmentsCommitsType) IsKnown

type V1ContractListResponseDataAmendmentsCredit

type V1ContractListResponseDataAmendmentsCredit struct {
	ID      string                                             `json:"id,required" format:"uuid"`
	Product V1ContractListResponseDataAmendmentsCreditsProduct `json:"product,required"`
	Type    V1ContractListResponseDataAmendmentsCreditsType    `json:"type,required"`
	// The schedule that the customer will gain access to the credits.
	AccessSchedule        V1ContractListResponseDataAmendmentsCreditsAccessSchedule `json:"access_schedule"`
	ApplicableContractIDs []string                                                  `json:"applicable_contract_ids" format:"uuid"`
	ApplicableProductIDs  []string                                                  `json:"applicable_product_ids" format:"uuid"`
	ApplicableProductTags []string                                                  `json:"applicable_product_tags"`
	// The current balance of the credit or commit. This balance reflects the amount of
	// credit or commit that the customer has access to use at this moment - thus,
	// expired and upcoming credit or commit segments contribute 0 to the balance. The
	// balance will match the sum of all ledger entries with the exception of the case
	// where the sum of negative manual ledger entries exceeds the positive amount
	// remaining on the credit or commit - in that case, the balance will be 0. All
	// manual ledger entries associated with active credit or commit segments are
	// included in the balance, including future-dated manual ledger entries.
	Balance      float64                                             `json:"balance"`
	Contract     V1ContractListResponseDataAmendmentsCreditsContract `json:"contract"`
	CustomFields map[string]string                                   `json:"custom_fields"`
	Description  string                                              `json:"description"`
	// A list of ordered events that impact the balance of a credit. For example, an
	// invoice deduction or an expiration.
	Ledger []V1ContractListResponseDataAmendmentsCreditsLedger `json:"ledger"`
	Name   string                                              `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// If multiple credits or commits are applicable, the one with the lower priority
	// will apply first.
	Priority float64                                             `json:"priority"`
	RateType V1ContractListResponseDataAmendmentsCreditsRateType `json:"rate_type"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractListResponseDataAmendmentsCreditsSpecifier `json:"specifiers"`
	// Prevents the creation of duplicates. If a request to create a commit or credit
	// is made with a uniqueness key that was previously used to create a commit or
	// credit, a new record will not be created and the request will fail with a 409
	// error.
	UniquenessKey string                                         `json:"uniqueness_key"`
	JSON          v1ContractListResponseDataAmendmentsCreditJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsCredit) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsCreditsAccessSchedule

type V1ContractListResponseDataAmendmentsCreditsAccessSchedule struct {
	ScheduleItems []V1ContractListResponseDataAmendmentsCreditsAccessScheduleScheduleItem `json:"schedule_items,required"`
	CreditType    V1ContractListResponseDataAmendmentsCreditsAccessScheduleCreditType     `json:"credit_type"`
	JSON          v1ContractListResponseDataAmendmentsCreditsAccessScheduleJSON           `json:"-"`
}

The schedule that the customer will gain access to the credits.

func (*V1ContractListResponseDataAmendmentsCreditsAccessSchedule) UnmarshalJSON

type V1ContractListResponseDataAmendmentsCreditsAccessScheduleCreditType

type V1ContractListResponseDataAmendmentsCreditsAccessScheduleCreditType struct {
	ID   string                                                                  `json:"id,required" format:"uuid"`
	Name string                                                                  `json:"name,required"`
	JSON v1ContractListResponseDataAmendmentsCreditsAccessScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsCreditsAccessScheduleCreditType) UnmarshalJSON

type V1ContractListResponseDataAmendmentsCreditsAccessScheduleScheduleItem

type V1ContractListResponseDataAmendmentsCreditsAccessScheduleScheduleItem struct {
	ID           string                                                                    `json:"id,required" format:"uuid"`
	Amount       float64                                                                   `json:"amount,required"`
	EndingBefore time.Time                                                                 `json:"ending_before,required" format:"date-time"`
	StartingAt   time.Time                                                                 `json:"starting_at,required" format:"date-time"`
	JSON         v1ContractListResponseDataAmendmentsCreditsAccessScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsCreditsAccessScheduleScheduleItem) UnmarshalJSON

type V1ContractListResponseDataAmendmentsCreditsContract

type V1ContractListResponseDataAmendmentsCreditsContract struct {
	ID   string                                                  `json:"id,required" format:"uuid"`
	JSON v1ContractListResponseDataAmendmentsCreditsContractJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsCreditsContract) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsCreditsLedger

type V1ContractListResponseDataAmendmentsCreditsLedger struct {
	Amount    float64                                               `json:"amount,required"`
	Timestamp time.Time                                             `json:"timestamp,required" format:"date-time"`
	Type      V1ContractListResponseDataAmendmentsCreditsLedgerType `json:"type,required"`
	InvoiceID string                                                `json:"invoice_id" format:"uuid"`
	Reason    string                                                `json:"reason"`
	SegmentID string                                                `json:"segment_id" format:"uuid"`
	JSON      v1ContractListResponseDataAmendmentsCreditsLedgerJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*V1ContractListResponseDataAmendmentsCreditsLedger) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsCreditsLedgerObject

type V1ContractListResponseDataAmendmentsCreditsLedgerObject struct {
	Amount    float64                                                     `json:"amount,required"`
	SegmentID string                                                      `json:"segment_id,required" format:"uuid"`
	Timestamp time.Time                                                   `json:"timestamp,required" format:"date-time"`
	Type      V1ContractListResponseDataAmendmentsCreditsLedgerObjectType `json:"type,required"`
	JSON      v1ContractListResponseDataAmendmentsCreditsLedgerObjectJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsCreditsLedgerObject) UnmarshalJSON

type V1ContractListResponseDataAmendmentsCreditsLedgerObjectType

type V1ContractListResponseDataAmendmentsCreditsLedgerObjectType string
const (
	V1ContractListResponseDataAmendmentsCreditsLedgerObjectTypeCreditSegmentStart V1ContractListResponseDataAmendmentsCreditsLedgerObjectType = "CREDIT_SEGMENT_START"
)

func (V1ContractListResponseDataAmendmentsCreditsLedgerObjectType) IsKnown

type V1ContractListResponseDataAmendmentsCreditsLedgerType

type V1ContractListResponseDataAmendmentsCreditsLedgerType string
const (
	V1ContractListResponseDataAmendmentsCreditsLedgerTypeCreditSegmentStart              V1ContractListResponseDataAmendmentsCreditsLedgerType = "CREDIT_SEGMENT_START"
	V1ContractListResponseDataAmendmentsCreditsLedgerTypeCreditAutomatedInvoiceDeduction V1ContractListResponseDataAmendmentsCreditsLedgerType = "CREDIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractListResponseDataAmendmentsCreditsLedgerTypeCreditExpiration                V1ContractListResponseDataAmendmentsCreditsLedgerType = "CREDIT_EXPIRATION"
	V1ContractListResponseDataAmendmentsCreditsLedgerTypeCreditCanceled                  V1ContractListResponseDataAmendmentsCreditsLedgerType = "CREDIT_CANCELED"
	V1ContractListResponseDataAmendmentsCreditsLedgerTypeCreditCredited                  V1ContractListResponseDataAmendmentsCreditsLedgerType = "CREDIT_CREDITED"
	V1ContractListResponseDataAmendmentsCreditsLedgerTypeCreditManual                    V1ContractListResponseDataAmendmentsCreditsLedgerType = "CREDIT_MANUAL"
)

func (V1ContractListResponseDataAmendmentsCreditsLedgerType) IsKnown

type V1ContractListResponseDataAmendmentsCreditsProduct

type V1ContractListResponseDataAmendmentsCreditsProduct struct {
	ID   string                                                 `json:"id,required" format:"uuid"`
	Name string                                                 `json:"name,required"`
	JSON v1ContractListResponseDataAmendmentsCreditsProductJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsCreditsProduct) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsCreditsRateType

type V1ContractListResponseDataAmendmentsCreditsRateType string
const (
	V1ContractListResponseDataAmendmentsCreditsRateTypeCommitRate V1ContractListResponseDataAmendmentsCreditsRateType = "COMMIT_RATE"
	V1ContractListResponseDataAmendmentsCreditsRateTypeListRate   V1ContractListResponseDataAmendmentsCreditsRateType = "LIST_RATE"
)

func (V1ContractListResponseDataAmendmentsCreditsRateType) IsKnown

type V1ContractListResponseDataAmendmentsCreditsSpecifier

type V1ContractListResponseDataAmendmentsCreditsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                                 `json:"product_tags"`
	JSON        v1ContractListResponseDataAmendmentsCreditsSpecifierJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsCreditsSpecifier) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsCreditsType

type V1ContractListResponseDataAmendmentsCreditsType string
const (
	V1ContractListResponseDataAmendmentsCreditsTypeCredit V1ContractListResponseDataAmendmentsCreditsType = "CREDIT"
)

func (V1ContractListResponseDataAmendmentsCreditsType) IsKnown

type V1ContractListResponseDataAmendmentsDiscount

type V1ContractListResponseDataAmendmentsDiscount struct {
	ID           string                                                `json:"id,required" format:"uuid"`
	Product      V1ContractListResponseDataAmendmentsDiscountsProduct  `json:"product,required"`
	Schedule     V1ContractListResponseDataAmendmentsDiscountsSchedule `json:"schedule,required"`
	CustomFields map[string]string                                     `json:"custom_fields"`
	Name         string                                                `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string                                           `json:"netsuite_sales_order_id"`
	JSON                 v1ContractListResponseDataAmendmentsDiscountJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsDiscount) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsDiscountsProduct

type V1ContractListResponseDataAmendmentsDiscountsProduct struct {
	ID   string                                                   `json:"id,required" format:"uuid"`
	Name string                                                   `json:"name,required"`
	JSON v1ContractListResponseDataAmendmentsDiscountsProductJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsDiscountsProduct) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsDiscountsSchedule

type V1ContractListResponseDataAmendmentsDiscountsSchedule struct {
	CreditType    V1ContractListResponseDataAmendmentsDiscountsScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractListResponseDataAmendmentsDiscountsScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractListResponseDataAmendmentsDiscountsScheduleJSON           `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsDiscountsSchedule) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsDiscountsScheduleCreditType

type V1ContractListResponseDataAmendmentsDiscountsScheduleCreditType struct {
	ID   string                                                              `json:"id,required" format:"uuid"`
	Name string                                                              `json:"name,required"`
	JSON v1ContractListResponseDataAmendmentsDiscountsScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsDiscountsScheduleCreditType) UnmarshalJSON

type V1ContractListResponseDataAmendmentsDiscountsScheduleScheduleItem

type V1ContractListResponseDataAmendmentsDiscountsScheduleScheduleItem struct {
	ID        string                                                                `json:"id,required" format:"uuid"`
	Amount    float64                                                               `json:"amount,required"`
	InvoiceID string                                                                `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                               `json:"quantity,required"`
	Timestamp time.Time                                                             `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                               `json:"unit_price,required"`
	JSON      v1ContractListResponseDataAmendmentsDiscountsScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsDiscountsScheduleScheduleItem) UnmarshalJSON

type V1ContractListResponseDataAmendmentsOverride

type V1ContractListResponseDataAmendmentsOverride struct {
	ID                    string                                                  `json:"id,required" format:"uuid"`
	StartingAt            time.Time                                               `json:"starting_at,required" format:"date-time"`
	ApplicableProductTags []string                                                `json:"applicable_product_tags"`
	CreditType            V1ContractListResponseDataAmendmentsOverridesCreditType `json:"credit_type"`
	EndingBefore          time.Time                                               `json:"ending_before" format:"date-time"`
	Entitled              bool                                                    `json:"entitled"`
	IsCommitSpecific      bool                                                    `json:"is_commit_specific"`
	// Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
	// set to true.
	IsProrated         bool                                                             `json:"is_prorated"`
	Multiplier         float64                                                          `json:"multiplier"`
	OverrideSpecifiers []V1ContractListResponseDataAmendmentsOverridesOverrideSpecifier `json:"override_specifiers"`
	OverrideTiers      []V1ContractListResponseDataAmendmentsOverridesOverrideTier      `json:"override_tiers"`
	OverwriteRate      V1ContractListResponseDataAmendmentsOverridesOverwriteRate       `json:"overwrite_rate"`
	// Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
	// this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
	Price    float64                                              `json:"price"`
	Priority float64                                              `json:"priority"`
	Product  V1ContractListResponseDataAmendmentsOverridesProduct `json:"product"`
	// Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
	Quantity float64                                               `json:"quantity"`
	RateType V1ContractListResponseDataAmendmentsOverridesRateType `json:"rate_type"`
	Target   V1ContractListResponseDataAmendmentsOverridesTarget   `json:"target"`
	// Only set for TIERED rate_type.
	Tiers []V1ContractListResponseDataAmendmentsOverridesTier `json:"tiers"`
	Type  V1ContractListResponseDataAmendmentsOverridesType   `json:"type"`
	// Only set for CUSTOM rate_type. This field is interpreted by custom rate
	// processors.
	Value map[string]interface{}                           `json:"value"`
	JSON  v1ContractListResponseDataAmendmentsOverrideJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsOverride) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsOverridesCreditType

type V1ContractListResponseDataAmendmentsOverridesCreditType struct {
	ID   string                                                      `json:"id,required" format:"uuid"`
	Name string                                                      `json:"name,required"`
	JSON v1ContractListResponseDataAmendmentsOverridesCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsOverridesCreditType) UnmarshalJSON

type V1ContractListResponseDataAmendmentsOverridesOverrideSpecifier

type V1ContractListResponseDataAmendmentsOverridesOverrideSpecifier struct {
	BillingFrequency        V1ContractListResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequency `json:"billing_frequency"`
	CommitIDs               []string                                                                        `json:"commit_ids"`
	PresentationGroupValues map[string]string                                                               `json:"presentation_group_values"`
	PricingGroupValues      map[string]string                                                               `json:"pricing_group_values"`
	ProductID               string                                                                          `json:"product_id" format:"uuid"`
	ProductTags             []string                                                                        `json:"product_tags"`
	RecurringCommitIDs      []string                                                                        `json:"recurring_commit_ids"`
	RecurringCreditIDs      []string                                                                        `json:"recurring_credit_ids"`
	JSON                    v1ContractListResponseDataAmendmentsOverridesOverrideSpecifierJSON              `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsOverridesOverrideSpecifier) UnmarshalJSON

type V1ContractListResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequency

type V1ContractListResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequency string
const (
	V1ContractListResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequencyMonthly   V1ContractListResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequency = "MONTHLY"
	V1ContractListResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequencyQuarterly V1ContractListResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequency = "QUARTERLY"
	V1ContractListResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequencyAnnual    V1ContractListResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequency = "ANNUAL"
	V1ContractListResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequencyWeekly    V1ContractListResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequency = "WEEKLY"
)

func (V1ContractListResponseDataAmendmentsOverridesOverrideSpecifiersBillingFrequency) IsKnown

type V1ContractListResponseDataAmendmentsOverridesOverrideTier

type V1ContractListResponseDataAmendmentsOverridesOverrideTier struct {
	Multiplier float64                                                       `json:"multiplier,required"`
	Size       float64                                                       `json:"size"`
	JSON       v1ContractListResponseDataAmendmentsOverridesOverrideTierJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsOverridesOverrideTier) UnmarshalJSON

type V1ContractListResponseDataAmendmentsOverridesOverwriteRate

type V1ContractListResponseDataAmendmentsOverridesOverwriteRate struct {
	RateType   V1ContractListResponseDataAmendmentsOverridesOverwriteRateRateType   `json:"rate_type,required"`
	CreditType V1ContractListResponseDataAmendmentsOverridesOverwriteRateCreditType `json:"credit_type"`
	// Only set for CUSTOM rate_type. This field is interpreted by custom rate
	// processors.
	CustomRate map[string]interface{} `json:"custom_rate"`
	// Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
	// set to true.
	IsProrated bool `json:"is_prorated"`
	// Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
	// this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
	Price float64 `json:"price"`
	// Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
	Quantity float64 `json:"quantity"`
	// Only set for TIERED rate_type.
	Tiers []V1ContractListResponseDataAmendmentsOverridesOverwriteRateTier `json:"tiers"`
	JSON  v1ContractListResponseDataAmendmentsOverridesOverwriteRateJSON   `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsOverridesOverwriteRate) UnmarshalJSON

type V1ContractListResponseDataAmendmentsOverridesOverwriteRateCreditType

type V1ContractListResponseDataAmendmentsOverridesOverwriteRateCreditType struct {
	ID   string                                                                   `json:"id,required" format:"uuid"`
	Name string                                                                   `json:"name,required"`
	JSON v1ContractListResponseDataAmendmentsOverridesOverwriteRateCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsOverridesOverwriteRateCreditType) UnmarshalJSON

type V1ContractListResponseDataAmendmentsOverridesOverwriteRateRateType

type V1ContractListResponseDataAmendmentsOverridesOverwriteRateRateType string
const (
	V1ContractListResponseDataAmendmentsOverridesOverwriteRateRateTypeFlat         V1ContractListResponseDataAmendmentsOverridesOverwriteRateRateType = "FLAT"
	V1ContractListResponseDataAmendmentsOverridesOverwriteRateRateTypePercentage   V1ContractListResponseDataAmendmentsOverridesOverwriteRateRateType = "PERCENTAGE"
	V1ContractListResponseDataAmendmentsOverridesOverwriteRateRateTypeSubscription V1ContractListResponseDataAmendmentsOverridesOverwriteRateRateType = "SUBSCRIPTION"
	V1ContractListResponseDataAmendmentsOverridesOverwriteRateRateTypeTiered       V1ContractListResponseDataAmendmentsOverridesOverwriteRateRateType = "TIERED"
	V1ContractListResponseDataAmendmentsOverridesOverwriteRateRateTypeCustom       V1ContractListResponseDataAmendmentsOverridesOverwriteRateRateType = "CUSTOM"
)

func (V1ContractListResponseDataAmendmentsOverridesOverwriteRateRateType) IsKnown

type V1ContractListResponseDataAmendmentsOverridesOverwriteRateTier

type V1ContractListResponseDataAmendmentsOverridesOverwriteRateTier struct {
	Price float64                                                            `json:"price,required"`
	Size  float64                                                            `json:"size"`
	JSON  v1ContractListResponseDataAmendmentsOverridesOverwriteRateTierJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsOverridesOverwriteRateTier) UnmarshalJSON

type V1ContractListResponseDataAmendmentsOverridesProduct

type V1ContractListResponseDataAmendmentsOverridesProduct struct {
	ID   string                                                   `json:"id,required" format:"uuid"`
	Name string                                                   `json:"name,required"`
	JSON v1ContractListResponseDataAmendmentsOverridesProductJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsOverridesProduct) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsOverridesRateType

type V1ContractListResponseDataAmendmentsOverridesRateType string
const (
	V1ContractListResponseDataAmendmentsOverridesRateTypeFlat         V1ContractListResponseDataAmendmentsOverridesRateType = "FLAT"
	V1ContractListResponseDataAmendmentsOverridesRateTypePercentage   V1ContractListResponseDataAmendmentsOverridesRateType = "PERCENTAGE"
	V1ContractListResponseDataAmendmentsOverridesRateTypeSubscription V1ContractListResponseDataAmendmentsOverridesRateType = "SUBSCRIPTION"
	V1ContractListResponseDataAmendmentsOverridesRateTypeTiered       V1ContractListResponseDataAmendmentsOverridesRateType = "TIERED"
	V1ContractListResponseDataAmendmentsOverridesRateTypeCustom       V1ContractListResponseDataAmendmentsOverridesRateType = "CUSTOM"
)

func (V1ContractListResponseDataAmendmentsOverridesRateType) IsKnown

type V1ContractListResponseDataAmendmentsOverridesTarget

type V1ContractListResponseDataAmendmentsOverridesTarget string
const (
	V1ContractListResponseDataAmendmentsOverridesTargetCommitRate V1ContractListResponseDataAmendmentsOverridesTarget = "COMMIT_RATE"
	V1ContractListResponseDataAmendmentsOverridesTargetListRate   V1ContractListResponseDataAmendmentsOverridesTarget = "LIST_RATE"
)

func (V1ContractListResponseDataAmendmentsOverridesTarget) IsKnown

type V1ContractListResponseDataAmendmentsOverridesTier

type V1ContractListResponseDataAmendmentsOverridesTier struct {
	Price float64                                               `json:"price,required"`
	Size  float64                                               `json:"size"`
	JSON  v1ContractListResponseDataAmendmentsOverridesTierJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsOverridesTier) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsOverridesType

type V1ContractListResponseDataAmendmentsOverridesType string
const (
	V1ContractListResponseDataAmendmentsOverridesTypeOverwrite  V1ContractListResponseDataAmendmentsOverridesType = "OVERWRITE"
	V1ContractListResponseDataAmendmentsOverridesTypeMultiplier V1ContractListResponseDataAmendmentsOverridesType = "MULTIPLIER"
	V1ContractListResponseDataAmendmentsOverridesTypeTiered     V1ContractListResponseDataAmendmentsOverridesType = "TIERED"
)

func (V1ContractListResponseDataAmendmentsOverridesType) IsKnown

type V1ContractListResponseDataAmendmentsProfessionalService

type V1ContractListResponseDataAmendmentsProfessionalService struct {
	ID string `json:"id,required" format:"uuid"`
	// Maximum amount for the term.
	MaxAmount float64 `json:"max_amount,required"`
	ProductID string  `json:"product_id,required" format:"uuid"`
	// Quantity for the charge. Will be multiplied by unit_price to determine the
	// amount.
	Quantity float64 `json:"quantity,required"`
	// Unit price for the charge. Will be multiplied by quantity to determine the
	// amount and must be specified.
	UnitPrice    float64           `json:"unit_price,required"`
	CustomFields map[string]string `json:"custom_fields"`
	Description  string            `json:"description"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string                                                      `json:"netsuite_sales_order_id"`
	JSON                 v1ContractListResponseDataAmendmentsProfessionalServiceJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsProfessionalService) UnmarshalJSON

type V1ContractListResponseDataAmendmentsResellerRoyaltiesResellerType

type V1ContractListResponseDataAmendmentsResellerRoyaltiesResellerType string
const (
	V1ContractListResponseDataAmendmentsResellerRoyaltiesResellerTypeAws           V1ContractListResponseDataAmendmentsResellerRoyaltiesResellerType = "AWS"
	V1ContractListResponseDataAmendmentsResellerRoyaltiesResellerTypeAwsProService V1ContractListResponseDataAmendmentsResellerRoyaltiesResellerType = "AWS_PRO_SERVICE"
	V1ContractListResponseDataAmendmentsResellerRoyaltiesResellerTypeGcp           V1ContractListResponseDataAmendmentsResellerRoyaltiesResellerType = "GCP"
	V1ContractListResponseDataAmendmentsResellerRoyaltiesResellerTypeGcpProService V1ContractListResponseDataAmendmentsResellerRoyaltiesResellerType = "GCP_PRO_SERVICE"
)

func (V1ContractListResponseDataAmendmentsResellerRoyaltiesResellerType) IsKnown

type V1ContractListResponseDataAmendmentsResellerRoyalty

type V1ContractListResponseDataAmendmentsResellerRoyalty struct {
	ResellerType          V1ContractListResponseDataAmendmentsResellerRoyaltiesResellerType `json:"reseller_type,required"`
	AwsAccountNumber      string                                                            `json:"aws_account_number"`
	AwsOfferID            string                                                            `json:"aws_offer_id"`
	AwsPayerReferenceID   string                                                            `json:"aws_payer_reference_id"`
	EndingBefore          time.Time                                                         `json:"ending_before,nullable" format:"date-time"`
	Fraction              float64                                                           `json:"fraction"`
	GcpAccountID          string                                                            `json:"gcp_account_id"`
	GcpOfferID            string                                                            `json:"gcp_offer_id"`
	NetsuiteResellerID    string                                                            `json:"netsuite_reseller_id"`
	ResellerContractValue float64                                                           `json:"reseller_contract_value"`
	StartingAt            time.Time                                                         `json:"starting_at" format:"date-time"`
	JSON                  v1ContractListResponseDataAmendmentsResellerRoyaltyJSON           `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsResellerRoyalty) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsScheduledCharge

type V1ContractListResponseDataAmendmentsScheduledCharge struct {
	ID           string                                                       `json:"id,required" format:"uuid"`
	Product      V1ContractListResponseDataAmendmentsScheduledChargesProduct  `json:"product,required"`
	Schedule     V1ContractListResponseDataAmendmentsScheduledChargesSchedule `json:"schedule,required"`
	ArchivedAt   time.Time                                                    `json:"archived_at" format:"date-time"`
	CustomFields map[string]string                                            `json:"custom_fields"`
	// displayed on invoices
	Name string `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string                                                  `json:"netsuite_sales_order_id"`
	JSON                 v1ContractListResponseDataAmendmentsScheduledChargeJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsScheduledCharge) UnmarshalJSON

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

type V1ContractListResponseDataAmendmentsScheduledChargesProduct

type V1ContractListResponseDataAmendmentsScheduledChargesProduct struct {
	ID   string                                                          `json:"id,required" format:"uuid"`
	Name string                                                          `json:"name,required"`
	JSON v1ContractListResponseDataAmendmentsScheduledChargesProductJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsScheduledChargesProduct) UnmarshalJSON

type V1ContractListResponseDataAmendmentsScheduledChargesSchedule

type V1ContractListResponseDataAmendmentsScheduledChargesSchedule struct {
	CreditType    V1ContractListResponseDataAmendmentsScheduledChargesScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractListResponseDataAmendmentsScheduledChargesScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractListResponseDataAmendmentsScheduledChargesScheduleJSON           `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsScheduledChargesSchedule) UnmarshalJSON

type V1ContractListResponseDataAmendmentsScheduledChargesScheduleCreditType

type V1ContractListResponseDataAmendmentsScheduledChargesScheduleCreditType struct {
	ID   string                                                                     `json:"id,required" format:"uuid"`
	Name string                                                                     `json:"name,required"`
	JSON v1ContractListResponseDataAmendmentsScheduledChargesScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsScheduledChargesScheduleCreditType) UnmarshalJSON

type V1ContractListResponseDataAmendmentsScheduledChargesScheduleScheduleItem

type V1ContractListResponseDataAmendmentsScheduledChargesScheduleScheduleItem struct {
	ID        string                                                                       `json:"id,required" format:"uuid"`
	Amount    float64                                                                      `json:"amount,required"`
	InvoiceID string                                                                       `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                                      `json:"quantity,required"`
	Timestamp time.Time                                                                    `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                                      `json:"unit_price,required"`
	JSON      v1ContractListResponseDataAmendmentsScheduledChargesScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractListResponseDataAmendmentsScheduledChargesScheduleScheduleItem) UnmarshalJSON

type V1ContractListResponseDataCurrent

type V1ContractListResponseDataCurrent struct {
	Commits                []V1ContractListResponseDataCurrentCommit               `json:"commits,required"`
	CreatedAt              time.Time                                               `json:"created_at,required" format:"date-time"`
	CreatedBy              string                                                  `json:"created_by,required"`
	Overrides              []V1ContractListResponseDataCurrentOverride             `json:"overrides,required"`
	ScheduledCharges       []V1ContractListResponseDataCurrentScheduledCharge      `json:"scheduled_charges,required"`
	StartingAt             time.Time                                               `json:"starting_at,required" format:"date-time"`
	Transitions            []V1ContractListResponseDataCurrentTransition           `json:"transitions,required"`
	UsageStatementSchedule V1ContractListResponseDataCurrentUsageStatementSchedule `json:"usage_statement_schedule,required"`
	Credits                []V1ContractListResponseDataCurrentCredit               `json:"credits"`
	// This field's availability is dependent on your client's configuration.
	Discounts           []V1ContractListResponseDataCurrentDiscount `json:"discounts"`
	EndingBefore        time.Time                                   `json:"ending_before" format:"date-time"`
	Name                string                                      `json:"name"`
	NetPaymentTermsDays float64                                     `json:"net_payment_terms_days"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID                 string                                                                `json:"netsuite_sales_order_id"`
	PrepaidBalanceThresholdConfiguration V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfiguration `json:"prepaid_balance_threshold_configuration"`
	// This field's availability is dependent on your client's configuration.
	ProfessionalServices []V1ContractListResponseDataCurrentProfessionalService `json:"professional_services"`
	RateCardID           string                                                 `json:"rate_card_id" format:"uuid"`
	RecurringCommits     []V1ContractListResponseDataCurrentRecurringCommit     `json:"recurring_commits"`
	RecurringCredits     []V1ContractListResponseDataCurrentRecurringCredit     `json:"recurring_credits"`
	// This field's availability is dependent on your client's configuration.
	ResellerRoyalties []V1ContractListResponseDataCurrentResellerRoyalty `json:"reseller_royalties"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// Determines which scheduled and commit charges to consolidate onto the Contract's
	// usage invoice. The charge's `timestamp` must match the usage invoice's
	// `ending_before` date for consolidation to occur. This field cannot be modified
	// after a Contract has been created. If this field is omitted, charges will appear
	// on a separate invoice from usage charges.
	ScheduledChargesOnUsageInvoices V1ContractListResponseDataCurrentScheduledChargesOnUsageInvoices `json:"scheduled_charges_on_usage_invoices"`
	SpendThresholdConfiguration     V1ContractListResponseDataCurrentSpendThresholdConfiguration     `json:"spend_threshold_configuration"`
	// This field's availability is dependent on your client's configuration.
	TotalContractValue float64                                      `json:"total_contract_value"`
	UsageFilter        V1ContractListResponseDataCurrentUsageFilter `json:"usage_filter"`
	JSON               v1ContractListResponseDataCurrentJSON        `json:"-"`
}

func (*V1ContractListResponseDataCurrent) UnmarshalJSON

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

type V1ContractListResponseDataCurrentCommit

type V1ContractListResponseDataCurrentCommit struct {
	ID      string                                          `json:"id,required" format:"uuid"`
	Product V1ContractListResponseDataCurrentCommitsProduct `json:"product,required"`
	Type    V1ContractListResponseDataCurrentCommitsType    `json:"type,required"`
	// The schedule that the customer will gain access to the credits purposed with
	// this commit.
	AccessSchedule V1ContractListResponseDataCurrentCommitsAccessSchedule `json:"access_schedule"`
	// (DEPRECATED) Use access_schedule + invoice_schedule instead.
	Amount                float64  `json:"amount"`
	ApplicableContractIDs []string `json:"applicable_contract_ids" format:"uuid"`
	ApplicableProductIDs  []string `json:"applicable_product_ids" format:"uuid"`
	ApplicableProductTags []string `json:"applicable_product_tags"`
	// RFC 3339 timestamp indicating when the commit was archived. If not provided, the
	// commit is not archived.
	ArchivedAt time.Time `json:"archived_at" format:"date-time"`
	// The current balance of the credit or commit. This balance reflects the amount of
	// credit or commit that the customer has access to use at this moment - thus,
	// expired and upcoming credit or commit segments contribute 0 to the balance. The
	// balance will match the sum of all ledger entries with the exception of the case
	// where the sum of negative manual ledger entries exceeds the positive amount
	// remaining on the credit or commit - in that case, the balance will be 0. All
	// manual ledger entries associated with active credit or commit segments are
	// included in the balance, including future-dated manual ledger entries.
	Balance      float64                                          `json:"balance"`
	Contract     V1ContractListResponseDataCurrentCommitsContract `json:"contract"`
	CustomFields map[string]string                                `json:"custom_fields"`
	Description  string                                           `json:"description"`
	// The contract that this commit will be billed on.
	InvoiceContract V1ContractListResponseDataCurrentCommitsInvoiceContract `json:"invoice_contract"`
	// The schedule that the customer will be invoiced for this commit.
	InvoiceSchedule V1ContractListResponseDataCurrentCommitsInvoiceSchedule `json:"invoice_schedule"`
	// A list of ordered events that impact the balance of a commit. For example, an
	// invoice deduction or a rollover.
	Ledger []V1ContractListResponseDataCurrentCommitsLedger `json:"ledger"`
	Name   string                                           `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// If multiple credits or commits are applicable, the one with the lower priority
	// will apply first.
	Priority         float64                                                `json:"priority"`
	RateType         V1ContractListResponseDataCurrentCommitsRateType       `json:"rate_type"`
	RolledOverFrom   V1ContractListResponseDataCurrentCommitsRolledOverFrom `json:"rolled_over_from"`
	RolloverFraction float64                                                `json:"rollover_fraction"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractListResponseDataCurrentCommitsSpecifier `json:"specifiers"`
	// Prevents the creation of duplicates. If a request to create a commit or credit
	// is made with a uniqueness key that was previously used to create a commit or
	// credit, a new record will not be created and the request will fail with a 409
	// error.
	UniquenessKey string                                      `json:"uniqueness_key"`
	JSON          v1ContractListResponseDataCurrentCommitJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentCommit) UnmarshalJSON

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

type V1ContractListResponseDataCurrentCommitsAccessSchedule

type V1ContractListResponseDataCurrentCommitsAccessSchedule struct {
	ScheduleItems []V1ContractListResponseDataCurrentCommitsAccessScheduleScheduleItem `json:"schedule_items,required"`
	CreditType    V1ContractListResponseDataCurrentCommitsAccessScheduleCreditType     `json:"credit_type"`
	JSON          v1ContractListResponseDataCurrentCommitsAccessScheduleJSON           `json:"-"`
}

The schedule that the customer will gain access to the credits purposed with this commit.

func (*V1ContractListResponseDataCurrentCommitsAccessSchedule) UnmarshalJSON

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

type V1ContractListResponseDataCurrentCommitsAccessScheduleCreditType

type V1ContractListResponseDataCurrentCommitsAccessScheduleCreditType struct {
	ID   string                                                               `json:"id,required" format:"uuid"`
	Name string                                                               `json:"name,required"`
	JSON v1ContractListResponseDataCurrentCommitsAccessScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentCommitsAccessScheduleCreditType) UnmarshalJSON

type V1ContractListResponseDataCurrentCommitsAccessScheduleScheduleItem

type V1ContractListResponseDataCurrentCommitsAccessScheduleScheduleItem struct {
	ID           string                                                                 `json:"id,required" format:"uuid"`
	Amount       float64                                                                `json:"amount,required"`
	EndingBefore time.Time                                                              `json:"ending_before,required" format:"date-time"`
	StartingAt   time.Time                                                              `json:"starting_at,required" format:"date-time"`
	JSON         v1ContractListResponseDataCurrentCommitsAccessScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentCommitsAccessScheduleScheduleItem) UnmarshalJSON

type V1ContractListResponseDataCurrentCommitsContract

type V1ContractListResponseDataCurrentCommitsContract struct {
	ID   string                                               `json:"id,required" format:"uuid"`
	JSON v1ContractListResponseDataCurrentCommitsContractJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentCommitsContract) UnmarshalJSON

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

type V1ContractListResponseDataCurrentCommitsInvoiceContract

type V1ContractListResponseDataCurrentCommitsInvoiceContract struct {
	ID   string                                                      `json:"id,required" format:"uuid"`
	JSON v1ContractListResponseDataCurrentCommitsInvoiceContractJSON `json:"-"`
}

The contract that this commit will be billed on.

func (*V1ContractListResponseDataCurrentCommitsInvoiceContract) UnmarshalJSON

type V1ContractListResponseDataCurrentCommitsInvoiceSchedule

type V1ContractListResponseDataCurrentCommitsInvoiceSchedule struct {
	CreditType    V1ContractListResponseDataCurrentCommitsInvoiceScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractListResponseDataCurrentCommitsInvoiceScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractListResponseDataCurrentCommitsInvoiceScheduleJSON           `json:"-"`
}

The schedule that the customer will be invoiced for this commit.

func (*V1ContractListResponseDataCurrentCommitsInvoiceSchedule) UnmarshalJSON

type V1ContractListResponseDataCurrentCommitsInvoiceScheduleCreditType

type V1ContractListResponseDataCurrentCommitsInvoiceScheduleCreditType struct {
	ID   string                                                                `json:"id,required" format:"uuid"`
	Name string                                                                `json:"name,required"`
	JSON v1ContractListResponseDataCurrentCommitsInvoiceScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentCommitsInvoiceScheduleCreditType) UnmarshalJSON

type V1ContractListResponseDataCurrentCommitsInvoiceScheduleScheduleItem

type V1ContractListResponseDataCurrentCommitsInvoiceScheduleScheduleItem struct {
	ID        string                                                                  `json:"id,required" format:"uuid"`
	Amount    float64                                                                 `json:"amount,required"`
	InvoiceID string                                                                  `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                                 `json:"quantity,required"`
	Timestamp time.Time                                                               `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                                 `json:"unit_price,required"`
	JSON      v1ContractListResponseDataCurrentCommitsInvoiceScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentCommitsInvoiceScheduleScheduleItem) UnmarshalJSON

type V1ContractListResponseDataCurrentCommitsLedger

type V1ContractListResponseDataCurrentCommitsLedger struct {
	Amount        float64                                            `json:"amount,required"`
	Timestamp     time.Time                                          `json:"timestamp,required" format:"date-time"`
	Type          V1ContractListResponseDataCurrentCommitsLedgerType `json:"type,required"`
	InvoiceID     string                                             `json:"invoice_id" format:"uuid"`
	NewContractID string                                             `json:"new_contract_id" format:"uuid"`
	Reason        string                                             `json:"reason"`
	SegmentID     string                                             `json:"segment_id" format:"uuid"`
	JSON          v1ContractListResponseDataCurrentCommitsLedgerJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*V1ContractListResponseDataCurrentCommitsLedger) UnmarshalJSON

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

type V1ContractListResponseDataCurrentCommitsLedgerObject

type V1ContractListResponseDataCurrentCommitsLedgerObject struct {
	Amount    float64                                                  `json:"amount,required"`
	SegmentID string                                                   `json:"segment_id,required" format:"uuid"`
	Timestamp time.Time                                                `json:"timestamp,required" format:"date-time"`
	Type      V1ContractListResponseDataCurrentCommitsLedgerObjectType `json:"type,required"`
	JSON      v1ContractListResponseDataCurrentCommitsLedgerObjectJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentCommitsLedgerObject) UnmarshalJSON

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

type V1ContractListResponseDataCurrentCommitsLedgerObjectType

type V1ContractListResponseDataCurrentCommitsLedgerObjectType string
const (
	V1ContractListResponseDataCurrentCommitsLedgerObjectTypePrepaidCommitSegmentStart V1ContractListResponseDataCurrentCommitsLedgerObjectType = "PREPAID_COMMIT_SEGMENT_START"
)

func (V1ContractListResponseDataCurrentCommitsLedgerObjectType) IsKnown

type V1ContractListResponseDataCurrentCommitsLedgerType

type V1ContractListResponseDataCurrentCommitsLedgerType string
const (
	V1ContractListResponseDataCurrentCommitsLedgerTypePrepaidCommitSegmentStart               V1ContractListResponseDataCurrentCommitsLedgerType = "PREPAID_COMMIT_SEGMENT_START"
	V1ContractListResponseDataCurrentCommitsLedgerTypePrepaidCommitAutomatedInvoiceDeduction  V1ContractListResponseDataCurrentCommitsLedgerType = "PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractListResponseDataCurrentCommitsLedgerTypePrepaidCommitRollover                   V1ContractListResponseDataCurrentCommitsLedgerType = "PREPAID_COMMIT_ROLLOVER"
	V1ContractListResponseDataCurrentCommitsLedgerTypePrepaidCommitExpiration                 V1ContractListResponseDataCurrentCommitsLedgerType = "PREPAID_COMMIT_EXPIRATION"
	V1ContractListResponseDataCurrentCommitsLedgerTypePrepaidCommitCanceled                   V1ContractListResponseDataCurrentCommitsLedgerType = "PREPAID_COMMIT_CANCELED"
	V1ContractListResponseDataCurrentCommitsLedgerTypePrepaidCommitCredited                   V1ContractListResponseDataCurrentCommitsLedgerType = "PREPAID_COMMIT_CREDITED"
	V1ContractListResponseDataCurrentCommitsLedgerTypePostpaidCommitInitialBalance            V1ContractListResponseDataCurrentCommitsLedgerType = "POSTPAID_COMMIT_INITIAL_BALANCE"
	V1ContractListResponseDataCurrentCommitsLedgerTypePostpaidCommitAutomatedInvoiceDeduction V1ContractListResponseDataCurrentCommitsLedgerType = "POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractListResponseDataCurrentCommitsLedgerTypePostpaidCommitRollover                  V1ContractListResponseDataCurrentCommitsLedgerType = "POSTPAID_COMMIT_ROLLOVER"
	V1ContractListResponseDataCurrentCommitsLedgerTypePostpaidCommitTrueup                    V1ContractListResponseDataCurrentCommitsLedgerType = "POSTPAID_COMMIT_TRUEUP"
	V1ContractListResponseDataCurrentCommitsLedgerTypePrepaidCommitManual                     V1ContractListResponseDataCurrentCommitsLedgerType = "PREPAID_COMMIT_MANUAL"
	V1ContractListResponseDataCurrentCommitsLedgerTypePostpaidCommitManual                    V1ContractListResponseDataCurrentCommitsLedgerType = "POSTPAID_COMMIT_MANUAL"
	V1ContractListResponseDataCurrentCommitsLedgerTypePostpaidCommitExpiration                V1ContractListResponseDataCurrentCommitsLedgerType = "POSTPAID_COMMIT_EXPIRATION"
)

func (V1ContractListResponseDataCurrentCommitsLedgerType) IsKnown

type V1ContractListResponseDataCurrentCommitsProduct

type V1ContractListResponseDataCurrentCommitsProduct struct {
	ID   string                                              `json:"id,required" format:"uuid"`
	Name string                                              `json:"name,required"`
	JSON v1ContractListResponseDataCurrentCommitsProductJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentCommitsProduct) UnmarshalJSON

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

type V1ContractListResponseDataCurrentCommitsRateType

type V1ContractListResponseDataCurrentCommitsRateType string
const (
	V1ContractListResponseDataCurrentCommitsRateTypeCommitRate V1ContractListResponseDataCurrentCommitsRateType = "COMMIT_RATE"
	V1ContractListResponseDataCurrentCommitsRateTypeListRate   V1ContractListResponseDataCurrentCommitsRateType = "LIST_RATE"
)

func (V1ContractListResponseDataCurrentCommitsRateType) IsKnown

type V1ContractListResponseDataCurrentCommitsRolledOverFrom

type V1ContractListResponseDataCurrentCommitsRolledOverFrom struct {
	CommitID   string                                                     `json:"commit_id,required" format:"uuid"`
	ContractID string                                                     `json:"contract_id,required" format:"uuid"`
	JSON       v1ContractListResponseDataCurrentCommitsRolledOverFromJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentCommitsRolledOverFrom) UnmarshalJSON

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

type V1ContractListResponseDataCurrentCommitsSpecifier

type V1ContractListResponseDataCurrentCommitsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                              `json:"product_tags"`
	JSON        v1ContractListResponseDataCurrentCommitsSpecifierJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentCommitsSpecifier) UnmarshalJSON

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

type V1ContractListResponseDataCurrentCommitsType

type V1ContractListResponseDataCurrentCommitsType string
const (
	V1ContractListResponseDataCurrentCommitsTypePrepaid  V1ContractListResponseDataCurrentCommitsType = "PREPAID"
	V1ContractListResponseDataCurrentCommitsTypePostpaid V1ContractListResponseDataCurrentCommitsType = "POSTPAID"
)

func (V1ContractListResponseDataCurrentCommitsType) IsKnown

type V1ContractListResponseDataCurrentCredit

type V1ContractListResponseDataCurrentCredit struct {
	ID      string                                          `json:"id,required" format:"uuid"`
	Product V1ContractListResponseDataCurrentCreditsProduct `json:"product,required"`
	Type    V1ContractListResponseDataCurrentCreditsType    `json:"type,required"`
	// The schedule that the customer will gain access to the credits.
	AccessSchedule        V1ContractListResponseDataCurrentCreditsAccessSchedule `json:"access_schedule"`
	ApplicableContractIDs []string                                               `json:"applicable_contract_ids" format:"uuid"`
	ApplicableProductIDs  []string                                               `json:"applicable_product_ids" format:"uuid"`
	ApplicableProductTags []string                                               `json:"applicable_product_tags"`
	// The current balance of the credit or commit. This balance reflects the amount of
	// credit or commit that the customer has access to use at this moment - thus,
	// expired and upcoming credit or commit segments contribute 0 to the balance. The
	// balance will match the sum of all ledger entries with the exception of the case
	// where the sum of negative manual ledger entries exceeds the positive amount
	// remaining on the credit or commit - in that case, the balance will be 0. All
	// manual ledger entries associated with active credit or commit segments are
	// included in the balance, including future-dated manual ledger entries.
	Balance      float64                                          `json:"balance"`
	Contract     V1ContractListResponseDataCurrentCreditsContract `json:"contract"`
	CustomFields map[string]string                                `json:"custom_fields"`
	Description  string                                           `json:"description"`
	// A list of ordered events that impact the balance of a credit. For example, an
	// invoice deduction or an expiration.
	Ledger []V1ContractListResponseDataCurrentCreditsLedger `json:"ledger"`
	Name   string                                           `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// If multiple credits or commits are applicable, the one with the lower priority
	// will apply first.
	Priority float64                                          `json:"priority"`
	RateType V1ContractListResponseDataCurrentCreditsRateType `json:"rate_type"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractListResponseDataCurrentCreditsSpecifier `json:"specifiers"`
	// Prevents the creation of duplicates. If a request to create a commit or credit
	// is made with a uniqueness key that was previously used to create a commit or
	// credit, a new record will not be created and the request will fail with a 409
	// error.
	UniquenessKey string                                      `json:"uniqueness_key"`
	JSON          v1ContractListResponseDataCurrentCreditJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentCredit) UnmarshalJSON

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

type V1ContractListResponseDataCurrentCreditsAccessSchedule

type V1ContractListResponseDataCurrentCreditsAccessSchedule struct {
	ScheduleItems []V1ContractListResponseDataCurrentCreditsAccessScheduleScheduleItem `json:"schedule_items,required"`
	CreditType    V1ContractListResponseDataCurrentCreditsAccessScheduleCreditType     `json:"credit_type"`
	JSON          v1ContractListResponseDataCurrentCreditsAccessScheduleJSON           `json:"-"`
}

The schedule that the customer will gain access to the credits.

func (*V1ContractListResponseDataCurrentCreditsAccessSchedule) UnmarshalJSON

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

type V1ContractListResponseDataCurrentCreditsAccessScheduleCreditType

type V1ContractListResponseDataCurrentCreditsAccessScheduleCreditType struct {
	ID   string                                                               `json:"id,required" format:"uuid"`
	Name string                                                               `json:"name,required"`
	JSON v1ContractListResponseDataCurrentCreditsAccessScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentCreditsAccessScheduleCreditType) UnmarshalJSON

type V1ContractListResponseDataCurrentCreditsAccessScheduleScheduleItem

type V1ContractListResponseDataCurrentCreditsAccessScheduleScheduleItem struct {
	ID           string                                                                 `json:"id,required" format:"uuid"`
	Amount       float64                                                                `json:"amount,required"`
	EndingBefore time.Time                                                              `json:"ending_before,required" format:"date-time"`
	StartingAt   time.Time                                                              `json:"starting_at,required" format:"date-time"`
	JSON         v1ContractListResponseDataCurrentCreditsAccessScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentCreditsAccessScheduleScheduleItem) UnmarshalJSON

type V1ContractListResponseDataCurrentCreditsContract

type V1ContractListResponseDataCurrentCreditsContract struct {
	ID   string                                               `json:"id,required" format:"uuid"`
	JSON v1ContractListResponseDataCurrentCreditsContractJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentCreditsContract) UnmarshalJSON

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

type V1ContractListResponseDataCurrentCreditsLedger

type V1ContractListResponseDataCurrentCreditsLedger struct {
	Amount    float64                                            `json:"amount,required"`
	Timestamp time.Time                                          `json:"timestamp,required" format:"date-time"`
	Type      V1ContractListResponseDataCurrentCreditsLedgerType `json:"type,required"`
	InvoiceID string                                             `json:"invoice_id" format:"uuid"`
	Reason    string                                             `json:"reason"`
	SegmentID string                                             `json:"segment_id" format:"uuid"`
	JSON      v1ContractListResponseDataCurrentCreditsLedgerJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*V1ContractListResponseDataCurrentCreditsLedger) UnmarshalJSON

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

type V1ContractListResponseDataCurrentCreditsLedgerObject

type V1ContractListResponseDataCurrentCreditsLedgerObject struct {
	Amount    float64                                                  `json:"amount,required"`
	SegmentID string                                                   `json:"segment_id,required" format:"uuid"`
	Timestamp time.Time                                                `json:"timestamp,required" format:"date-time"`
	Type      V1ContractListResponseDataCurrentCreditsLedgerObjectType `json:"type,required"`
	JSON      v1ContractListResponseDataCurrentCreditsLedgerObjectJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentCreditsLedgerObject) UnmarshalJSON

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

type V1ContractListResponseDataCurrentCreditsLedgerObjectType

type V1ContractListResponseDataCurrentCreditsLedgerObjectType string
const (
	V1ContractListResponseDataCurrentCreditsLedgerObjectTypeCreditSegmentStart V1ContractListResponseDataCurrentCreditsLedgerObjectType = "CREDIT_SEGMENT_START"
)

func (V1ContractListResponseDataCurrentCreditsLedgerObjectType) IsKnown

type V1ContractListResponseDataCurrentCreditsLedgerType

type V1ContractListResponseDataCurrentCreditsLedgerType string
const (
	V1ContractListResponseDataCurrentCreditsLedgerTypeCreditSegmentStart              V1ContractListResponseDataCurrentCreditsLedgerType = "CREDIT_SEGMENT_START"
	V1ContractListResponseDataCurrentCreditsLedgerTypeCreditAutomatedInvoiceDeduction V1ContractListResponseDataCurrentCreditsLedgerType = "CREDIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractListResponseDataCurrentCreditsLedgerTypeCreditExpiration                V1ContractListResponseDataCurrentCreditsLedgerType = "CREDIT_EXPIRATION"
	V1ContractListResponseDataCurrentCreditsLedgerTypeCreditCanceled                  V1ContractListResponseDataCurrentCreditsLedgerType = "CREDIT_CANCELED"
	V1ContractListResponseDataCurrentCreditsLedgerTypeCreditCredited                  V1ContractListResponseDataCurrentCreditsLedgerType = "CREDIT_CREDITED"
	V1ContractListResponseDataCurrentCreditsLedgerTypeCreditManual                    V1ContractListResponseDataCurrentCreditsLedgerType = "CREDIT_MANUAL"
)

func (V1ContractListResponseDataCurrentCreditsLedgerType) IsKnown

type V1ContractListResponseDataCurrentCreditsProduct

type V1ContractListResponseDataCurrentCreditsProduct struct {
	ID   string                                              `json:"id,required" format:"uuid"`
	Name string                                              `json:"name,required"`
	JSON v1ContractListResponseDataCurrentCreditsProductJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentCreditsProduct) UnmarshalJSON

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

type V1ContractListResponseDataCurrentCreditsRateType

type V1ContractListResponseDataCurrentCreditsRateType string
const (
	V1ContractListResponseDataCurrentCreditsRateTypeCommitRate V1ContractListResponseDataCurrentCreditsRateType = "COMMIT_RATE"
	V1ContractListResponseDataCurrentCreditsRateTypeListRate   V1ContractListResponseDataCurrentCreditsRateType = "LIST_RATE"
)

func (V1ContractListResponseDataCurrentCreditsRateType) IsKnown

type V1ContractListResponseDataCurrentCreditsSpecifier

type V1ContractListResponseDataCurrentCreditsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                              `json:"product_tags"`
	JSON        v1ContractListResponseDataCurrentCreditsSpecifierJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentCreditsSpecifier) UnmarshalJSON

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

type V1ContractListResponseDataCurrentCreditsType

type V1ContractListResponseDataCurrentCreditsType string
const (
	V1ContractListResponseDataCurrentCreditsTypeCredit V1ContractListResponseDataCurrentCreditsType = "CREDIT"
)

func (V1ContractListResponseDataCurrentCreditsType) IsKnown

type V1ContractListResponseDataCurrentDiscount

type V1ContractListResponseDataCurrentDiscount struct {
	ID           string                                             `json:"id,required" format:"uuid"`
	Product      V1ContractListResponseDataCurrentDiscountsProduct  `json:"product,required"`
	Schedule     V1ContractListResponseDataCurrentDiscountsSchedule `json:"schedule,required"`
	CustomFields map[string]string                                  `json:"custom_fields"`
	Name         string                                             `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string                                        `json:"netsuite_sales_order_id"`
	JSON                 v1ContractListResponseDataCurrentDiscountJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentDiscount) UnmarshalJSON

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

type V1ContractListResponseDataCurrentDiscountsProduct

type V1ContractListResponseDataCurrentDiscountsProduct struct {
	ID   string                                                `json:"id,required" format:"uuid"`
	Name string                                                `json:"name,required"`
	JSON v1ContractListResponseDataCurrentDiscountsProductJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentDiscountsProduct) UnmarshalJSON

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

type V1ContractListResponseDataCurrentDiscountsSchedule

type V1ContractListResponseDataCurrentDiscountsSchedule struct {
	CreditType    V1ContractListResponseDataCurrentDiscountsScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractListResponseDataCurrentDiscountsScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractListResponseDataCurrentDiscountsScheduleJSON           `json:"-"`
}

func (*V1ContractListResponseDataCurrentDiscountsSchedule) UnmarshalJSON

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

type V1ContractListResponseDataCurrentDiscountsScheduleCreditType

type V1ContractListResponseDataCurrentDiscountsScheduleCreditType struct {
	ID   string                                                           `json:"id,required" format:"uuid"`
	Name string                                                           `json:"name,required"`
	JSON v1ContractListResponseDataCurrentDiscountsScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentDiscountsScheduleCreditType) UnmarshalJSON

type V1ContractListResponseDataCurrentDiscountsScheduleScheduleItem

type V1ContractListResponseDataCurrentDiscountsScheduleScheduleItem struct {
	ID        string                                                             `json:"id,required" format:"uuid"`
	Amount    float64                                                            `json:"amount,required"`
	InvoiceID string                                                             `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                            `json:"quantity,required"`
	Timestamp time.Time                                                          `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                            `json:"unit_price,required"`
	JSON      v1ContractListResponseDataCurrentDiscountsScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentDiscountsScheduleScheduleItem) UnmarshalJSON

type V1ContractListResponseDataCurrentOverride

type V1ContractListResponseDataCurrentOverride struct {
	ID                    string                                               `json:"id,required" format:"uuid"`
	StartingAt            time.Time                                            `json:"starting_at,required" format:"date-time"`
	ApplicableProductTags []string                                             `json:"applicable_product_tags"`
	CreditType            V1ContractListResponseDataCurrentOverridesCreditType `json:"credit_type"`
	EndingBefore          time.Time                                            `json:"ending_before" format:"date-time"`
	Entitled              bool                                                 `json:"entitled"`
	IsCommitSpecific      bool                                                 `json:"is_commit_specific"`
	// Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
	// set to true.
	IsProrated         bool                                                          `json:"is_prorated"`
	Multiplier         float64                                                       `json:"multiplier"`
	OverrideSpecifiers []V1ContractListResponseDataCurrentOverridesOverrideSpecifier `json:"override_specifiers"`
	OverrideTiers      []V1ContractListResponseDataCurrentOverridesOverrideTier      `json:"override_tiers"`
	OverwriteRate      V1ContractListResponseDataCurrentOverridesOverwriteRate       `json:"overwrite_rate"`
	// Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
	// this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
	Price    float64                                           `json:"price"`
	Priority float64                                           `json:"priority"`
	Product  V1ContractListResponseDataCurrentOverridesProduct `json:"product"`
	// Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
	Quantity float64                                            `json:"quantity"`
	RateType V1ContractListResponseDataCurrentOverridesRateType `json:"rate_type"`
	Target   V1ContractListResponseDataCurrentOverridesTarget   `json:"target"`
	// Only set for TIERED rate_type.
	Tiers []V1ContractListResponseDataCurrentOverridesTier `json:"tiers"`
	Type  V1ContractListResponseDataCurrentOverridesType   `json:"type"`
	// Only set for CUSTOM rate_type. This field is interpreted by custom rate
	// processors.
	Value map[string]interface{}                        `json:"value"`
	JSON  v1ContractListResponseDataCurrentOverrideJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentOverride) UnmarshalJSON

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

type V1ContractListResponseDataCurrentOverridesCreditType

type V1ContractListResponseDataCurrentOverridesCreditType struct {
	ID   string                                                   `json:"id,required" format:"uuid"`
	Name string                                                   `json:"name,required"`
	JSON v1ContractListResponseDataCurrentOverridesCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentOverridesCreditType) UnmarshalJSON

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

type V1ContractListResponseDataCurrentOverridesOverrideSpecifier

type V1ContractListResponseDataCurrentOverridesOverrideSpecifier struct {
	BillingFrequency        V1ContractListResponseDataCurrentOverridesOverrideSpecifiersBillingFrequency `json:"billing_frequency"`
	CommitIDs               []string                                                                     `json:"commit_ids"`
	PresentationGroupValues map[string]string                                                            `json:"presentation_group_values"`
	PricingGroupValues      map[string]string                                                            `json:"pricing_group_values"`
	ProductID               string                                                                       `json:"product_id" format:"uuid"`
	ProductTags             []string                                                                     `json:"product_tags"`
	RecurringCommitIDs      []string                                                                     `json:"recurring_commit_ids"`
	RecurringCreditIDs      []string                                                                     `json:"recurring_credit_ids"`
	JSON                    v1ContractListResponseDataCurrentOverridesOverrideSpecifierJSON              `json:"-"`
}

func (*V1ContractListResponseDataCurrentOverridesOverrideSpecifier) UnmarshalJSON

type V1ContractListResponseDataCurrentOverridesOverrideSpecifiersBillingFrequency

type V1ContractListResponseDataCurrentOverridesOverrideSpecifiersBillingFrequency string
const (
	V1ContractListResponseDataCurrentOverridesOverrideSpecifiersBillingFrequencyMonthly   V1ContractListResponseDataCurrentOverridesOverrideSpecifiersBillingFrequency = "MONTHLY"
	V1ContractListResponseDataCurrentOverridesOverrideSpecifiersBillingFrequencyQuarterly V1ContractListResponseDataCurrentOverridesOverrideSpecifiersBillingFrequency = "QUARTERLY"
	V1ContractListResponseDataCurrentOverridesOverrideSpecifiersBillingFrequencyAnnual    V1ContractListResponseDataCurrentOverridesOverrideSpecifiersBillingFrequency = "ANNUAL"
	V1ContractListResponseDataCurrentOverridesOverrideSpecifiersBillingFrequencyWeekly    V1ContractListResponseDataCurrentOverridesOverrideSpecifiersBillingFrequency = "WEEKLY"
)

func (V1ContractListResponseDataCurrentOverridesOverrideSpecifiersBillingFrequency) IsKnown

type V1ContractListResponseDataCurrentOverridesOverrideTier

type V1ContractListResponseDataCurrentOverridesOverrideTier struct {
	Multiplier float64                                                    `json:"multiplier,required"`
	Size       float64                                                    `json:"size"`
	JSON       v1ContractListResponseDataCurrentOverridesOverrideTierJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentOverridesOverrideTier) UnmarshalJSON

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

type V1ContractListResponseDataCurrentOverridesOverwriteRate

type V1ContractListResponseDataCurrentOverridesOverwriteRate struct {
	RateType   V1ContractListResponseDataCurrentOverridesOverwriteRateRateType   `json:"rate_type,required"`
	CreditType V1ContractListResponseDataCurrentOverridesOverwriteRateCreditType `json:"credit_type"`
	// Only set for CUSTOM rate_type. This field is interpreted by custom rate
	// processors.
	CustomRate map[string]interface{} `json:"custom_rate"`
	// Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
	// set to true.
	IsProrated bool `json:"is_prorated"`
	// Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
	// this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
	Price float64 `json:"price"`
	// Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
	Quantity float64 `json:"quantity"`
	// Only set for TIERED rate_type.
	Tiers []V1ContractListResponseDataCurrentOverridesOverwriteRateTier `json:"tiers"`
	JSON  v1ContractListResponseDataCurrentOverridesOverwriteRateJSON   `json:"-"`
}

func (*V1ContractListResponseDataCurrentOverridesOverwriteRate) UnmarshalJSON

type V1ContractListResponseDataCurrentOverridesOverwriteRateCreditType

type V1ContractListResponseDataCurrentOverridesOverwriteRateCreditType struct {
	ID   string                                                                `json:"id,required" format:"uuid"`
	Name string                                                                `json:"name,required"`
	JSON v1ContractListResponseDataCurrentOverridesOverwriteRateCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentOverridesOverwriteRateCreditType) UnmarshalJSON

type V1ContractListResponseDataCurrentOverridesOverwriteRateRateType

type V1ContractListResponseDataCurrentOverridesOverwriteRateRateType string
const (
	V1ContractListResponseDataCurrentOverridesOverwriteRateRateTypeFlat         V1ContractListResponseDataCurrentOverridesOverwriteRateRateType = "FLAT"
	V1ContractListResponseDataCurrentOverridesOverwriteRateRateTypePercentage   V1ContractListResponseDataCurrentOverridesOverwriteRateRateType = "PERCENTAGE"
	V1ContractListResponseDataCurrentOverridesOverwriteRateRateTypeSubscription V1ContractListResponseDataCurrentOverridesOverwriteRateRateType = "SUBSCRIPTION"
	V1ContractListResponseDataCurrentOverridesOverwriteRateRateTypeTiered       V1ContractListResponseDataCurrentOverridesOverwriteRateRateType = "TIERED"
	V1ContractListResponseDataCurrentOverridesOverwriteRateRateTypeCustom       V1ContractListResponseDataCurrentOverridesOverwriteRateRateType = "CUSTOM"
)

func (V1ContractListResponseDataCurrentOverridesOverwriteRateRateType) IsKnown

type V1ContractListResponseDataCurrentOverridesOverwriteRateTier

type V1ContractListResponseDataCurrentOverridesOverwriteRateTier struct {
	Price float64                                                         `json:"price,required"`
	Size  float64                                                         `json:"size"`
	JSON  v1ContractListResponseDataCurrentOverridesOverwriteRateTierJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentOverridesOverwriteRateTier) UnmarshalJSON

type V1ContractListResponseDataCurrentOverridesProduct

type V1ContractListResponseDataCurrentOverridesProduct struct {
	ID   string                                                `json:"id,required" format:"uuid"`
	Name string                                                `json:"name,required"`
	JSON v1ContractListResponseDataCurrentOverridesProductJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentOverridesProduct) UnmarshalJSON

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

type V1ContractListResponseDataCurrentOverridesRateType

type V1ContractListResponseDataCurrentOverridesRateType string
const (
	V1ContractListResponseDataCurrentOverridesRateTypeFlat         V1ContractListResponseDataCurrentOverridesRateType = "FLAT"
	V1ContractListResponseDataCurrentOverridesRateTypePercentage   V1ContractListResponseDataCurrentOverridesRateType = "PERCENTAGE"
	V1ContractListResponseDataCurrentOverridesRateTypeSubscription V1ContractListResponseDataCurrentOverridesRateType = "SUBSCRIPTION"
	V1ContractListResponseDataCurrentOverridesRateTypeTiered       V1ContractListResponseDataCurrentOverridesRateType = "TIERED"
	V1ContractListResponseDataCurrentOverridesRateTypeCustom       V1ContractListResponseDataCurrentOverridesRateType = "CUSTOM"
)

func (V1ContractListResponseDataCurrentOverridesRateType) IsKnown

type V1ContractListResponseDataCurrentOverridesTarget

type V1ContractListResponseDataCurrentOverridesTarget string
const (
	V1ContractListResponseDataCurrentOverridesTargetCommitRate V1ContractListResponseDataCurrentOverridesTarget = "COMMIT_RATE"
	V1ContractListResponseDataCurrentOverridesTargetListRate   V1ContractListResponseDataCurrentOverridesTarget = "LIST_RATE"
)

func (V1ContractListResponseDataCurrentOverridesTarget) IsKnown

type V1ContractListResponseDataCurrentOverridesTier

type V1ContractListResponseDataCurrentOverridesTier struct {
	Price float64                                            `json:"price,required"`
	Size  float64                                            `json:"size"`
	JSON  v1ContractListResponseDataCurrentOverridesTierJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentOverridesTier) UnmarshalJSON

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

type V1ContractListResponseDataCurrentOverridesType

type V1ContractListResponseDataCurrentOverridesType string
const (
	V1ContractListResponseDataCurrentOverridesTypeOverwrite  V1ContractListResponseDataCurrentOverridesType = "OVERWRITE"
	V1ContractListResponseDataCurrentOverridesTypeMultiplier V1ContractListResponseDataCurrentOverridesType = "MULTIPLIER"
	V1ContractListResponseDataCurrentOverridesTypeTiered     V1ContractListResponseDataCurrentOverridesType = "TIERED"
)

func (V1ContractListResponseDataCurrentOverridesType) IsKnown

type V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfiguration

type V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfiguration struct {
	Commit V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationCommit `json:"commit,required"`
	// When set to false, the contract will not be evaluated against the
	// threshold_amount. Toggling to true will result an immediate evaluation,
	// regardless of prior state.
	IsEnabled         bool                                                                                   `json:"is_enabled,required"`
	PaymentGateConfig V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfig `json:"payment_gate_config,required"`
	// Specify the amount the balance should be recharged to.
	RechargeToAmount float64 `json:"recharge_to_amount,required"`
	// Specify the threshold amount for the contract. Each time the contract's prepaid
	// balance lowers to this amount, a threshold charge will be initiated.
	ThresholdAmount float64                                                                   `json:"threshold_amount,required"`
	JSON            v1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfiguration) UnmarshalJSON

type V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationCommit

type V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationCommit struct {
	// The commit product that will be used to generate the line item for commit
	// payment.
	ProductID string `json:"product_id,required"`
	// Which products the threshold commit applies to. If both applicable_product_ids
	// and applicable_product_tags are not provided, the commit applies to all
	// products.
	ApplicableProductIDs []string `json:"applicable_product_ids" format:"uuid"`
	// Which tags the threshold commit applies to. If both applicable_product_ids and
	// applicable_product_tags are not provided, the commit applies to all products.
	ApplicableProductTags []string `json:"applicable_product_tags"`
	Description           string   `json:"description"`
	// Specify the name of the line item for the threshold charge. If left blank, it
	// will default to the commit product name.
	Name string `json:"name"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown. This field cannot
	// be used together with `applicable_product_ids` or `applicable_product_tags`.
	Specifiers []V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationCommitSpecifier `json:"specifiers"`
	JSON       v1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationCommitJSON        `json:"-"`
}

func (*V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationCommit) UnmarshalJSON

type V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationCommitSpecifier

type V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationCommitSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                                                                 `json:"product_tags"`
	JSON        v1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationCommitSpecifierJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationCommitSpecifier) UnmarshalJSON

type V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfig

type V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfig struct {
	// Gate access to the commit balance based on successful collection of payment.
	// Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
	// facilitate payment using your own payment integration. Select NONE if you do not
	// wish to payment gate the commit balance.
	PaymentGateType V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType `json:"payment_gate_type,required"`
	// Only applicable if using Stripe as your payment gateway through Metronome.
	StripeConfig V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig `json:"stripe_config"`
	// Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
	// not wish Metronome to calculate tax on your behalf. Leaving this field blank
	// will default to NONE.
	TaxType V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType `json:"tax_type"`
	JSON    v1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigJSON    `json:"-"`
}

func (*V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfig) UnmarshalJSON

type V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType

type V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType string

Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance.

const (
	V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateTypeNone     V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType = "NONE"
	V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateTypeStripe   V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType = "STRIPE"
	V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateTypeExternal V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType = "EXTERNAL"
)

func (V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType) IsKnown

type V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig

type V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig struct {
	// If left blank, will default to INVOICE
	PaymentType V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType `json:"payment_type,required"`
	JSON        v1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigJSON        `json:"-"`
}

Only applicable if using Stripe as your payment gateway through Metronome.

func (*V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig) UnmarshalJSON

type V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType

type V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType string

If left blank, will default to INVOICE

const (
	V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypeInvoice       V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "INVOICE"
	V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypePaymentIntent V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "PAYMENT_INTENT"
)

func (V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType) IsKnown

type V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType

type V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType string

Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE.

const (
	V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxTypeNone   V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType = "NONE"
	V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxTypeStripe V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType = "STRIPE"
)

func (V1ContractListResponseDataCurrentPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType) IsKnown

type V1ContractListResponseDataCurrentProfessionalService

type V1ContractListResponseDataCurrentProfessionalService struct {
	ID string `json:"id,required" format:"uuid"`
	// Maximum amount for the term.
	MaxAmount float64 `json:"max_amount,required"`
	ProductID string  `json:"product_id,required" format:"uuid"`
	// Quantity for the charge. Will be multiplied by unit_price to determine the
	// amount.
	Quantity float64 `json:"quantity,required"`
	// Unit price for the charge. Will be multiplied by quantity to determine the
	// amount and must be specified.
	UnitPrice    float64           `json:"unit_price,required"`
	CustomFields map[string]string `json:"custom_fields"`
	Description  string            `json:"description"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string                                                   `json:"netsuite_sales_order_id"`
	JSON                 v1ContractListResponseDataCurrentProfessionalServiceJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentProfessionalService) UnmarshalJSON

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

type V1ContractListResponseDataCurrentRecurringCommit

type V1ContractListResponseDataCurrentRecurringCommit struct {
	ID string `json:"id,required" format:"uuid"`
	// The amount of commit to grant.
	AccessAmount V1ContractListResponseDataCurrentRecurringCommitsAccessAmount `json:"access_amount,required"`
	// The amount of time the created commits will be valid for
	CommitDuration V1ContractListResponseDataCurrentRecurringCommitsCommitDuration `json:"commit_duration,required"`
	// Will be passed down to the individual commits
	Priority float64                                                  `json:"priority,required"`
	Product  V1ContractListResponseDataCurrentRecurringCommitsProduct `json:"product,required"`
	// Whether the created commits will use the commit rate or list rate
	RateType V1ContractListResponseDataCurrentRecurringCommitsRateType `json:"rate_type,required"`
	// Determines the start time for the first commit
	StartingAt time.Time `json:"starting_at,required" format:"date-time"`
	// Will be passed down to the individual commits
	ApplicableProductIDs []string `json:"applicable_product_ids" format:"uuid"`
	// Will be passed down to the individual commits
	ApplicableProductTags []string                                                  `json:"applicable_product_tags"`
	Contract              V1ContractListResponseDataCurrentRecurringCommitsContract `json:"contract"`
	// Will be passed down to the individual commits
	Description string `json:"description"`
	// Determines when the contract will stop creating recurring commits. Optional
	EndingBefore time.Time `json:"ending_before" format:"date-time"`
	// The amount the customer should be billed for the commit. Not required.
	InvoiceAmount V1ContractListResponseDataCurrentRecurringCommitsInvoiceAmount `json:"invoice_amount"`
	// Displayed on invoices. Will be passed through to the individual commits
	Name string `json:"name"`
	// Will be passed down to the individual commits
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// Determines whether the first and last commit will be prorated. If not provided,
	// the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
	Proration V1ContractListResponseDataCurrentRecurringCommitsProration `json:"proration"`
	// The frequency at which the recurring commits will be created. If not provided: -
	// The commits will be created on the usage invoice frequency. If provided: - The
	// period defined in the duration will correspond to this frequency. - Commits will
	// be created aligned with the recurring commit's starting_at rather than the usage
	// invoice dates.
	RecurrenceFrequency V1ContractListResponseDataCurrentRecurringCommitsRecurrenceFrequency `json:"recurrence_frequency"`
	// Will be passed down to the individual commits. This controls how much of an
	// individual unexpired commit will roll over upon contract transition. Must be
	// between 0 and 1.
	RolloverFraction float64 `json:"rollover_fraction"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractListResponseDataCurrentRecurringCommitsSpecifier `json:"specifiers"`
	JSON       v1ContractListResponseDataCurrentRecurringCommitJSON         `json:"-"`
}

func (*V1ContractListResponseDataCurrentRecurringCommit) UnmarshalJSON

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

type V1ContractListResponseDataCurrentRecurringCommitsAccessAmount

type V1ContractListResponseDataCurrentRecurringCommitsAccessAmount struct {
	CreditTypeID string                                                            `json:"credit_type_id,required" format:"uuid"`
	Quantity     float64                                                           `json:"quantity,required"`
	UnitPrice    float64                                                           `json:"unit_price,required"`
	JSON         v1ContractListResponseDataCurrentRecurringCommitsAccessAmountJSON `json:"-"`
}

The amount of commit to grant.

func (*V1ContractListResponseDataCurrentRecurringCommitsAccessAmount) UnmarshalJSON

type V1ContractListResponseDataCurrentRecurringCommitsCommitDuration

type V1ContractListResponseDataCurrentRecurringCommitsCommitDuration struct {
	Value float64                                                             `json:"value,required"`
	Unit  V1ContractListResponseDataCurrentRecurringCommitsCommitDurationUnit `json:"unit"`
	JSON  v1ContractListResponseDataCurrentRecurringCommitsCommitDurationJSON `json:"-"`
}

The amount of time the created commits will be valid for

func (*V1ContractListResponseDataCurrentRecurringCommitsCommitDuration) UnmarshalJSON

type V1ContractListResponseDataCurrentRecurringCommitsCommitDurationUnit

type V1ContractListResponseDataCurrentRecurringCommitsCommitDurationUnit string
const (
	V1ContractListResponseDataCurrentRecurringCommitsCommitDurationUnitPeriods V1ContractListResponseDataCurrentRecurringCommitsCommitDurationUnit = "PERIODS"
)

func (V1ContractListResponseDataCurrentRecurringCommitsCommitDurationUnit) IsKnown

type V1ContractListResponseDataCurrentRecurringCommitsContract

type V1ContractListResponseDataCurrentRecurringCommitsContract struct {
	ID   string                                                        `json:"id,required" format:"uuid"`
	JSON v1ContractListResponseDataCurrentRecurringCommitsContractJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentRecurringCommitsContract) UnmarshalJSON

type V1ContractListResponseDataCurrentRecurringCommitsInvoiceAmount

type V1ContractListResponseDataCurrentRecurringCommitsInvoiceAmount struct {
	CreditTypeID string                                                             `json:"credit_type_id,required" format:"uuid"`
	Quantity     float64                                                            `json:"quantity,required"`
	UnitPrice    float64                                                            `json:"unit_price,required"`
	JSON         v1ContractListResponseDataCurrentRecurringCommitsInvoiceAmountJSON `json:"-"`
}

The amount the customer should be billed for the commit. Not required.

func (*V1ContractListResponseDataCurrentRecurringCommitsInvoiceAmount) UnmarshalJSON

type V1ContractListResponseDataCurrentRecurringCommitsProduct

type V1ContractListResponseDataCurrentRecurringCommitsProduct struct {
	ID   string                                                       `json:"id,required" format:"uuid"`
	Name string                                                       `json:"name,required"`
	JSON v1ContractListResponseDataCurrentRecurringCommitsProductJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentRecurringCommitsProduct) UnmarshalJSON

type V1ContractListResponseDataCurrentRecurringCommitsProration

type V1ContractListResponseDataCurrentRecurringCommitsProration string

Determines whether the first and last commit will be prorated. If not provided, the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).

const (
	V1ContractListResponseDataCurrentRecurringCommitsProrationNone         V1ContractListResponseDataCurrentRecurringCommitsProration = "NONE"
	V1ContractListResponseDataCurrentRecurringCommitsProrationFirst        V1ContractListResponseDataCurrentRecurringCommitsProration = "FIRST"
	V1ContractListResponseDataCurrentRecurringCommitsProrationLast         V1ContractListResponseDataCurrentRecurringCommitsProration = "LAST"
	V1ContractListResponseDataCurrentRecurringCommitsProrationFirstAndLast V1ContractListResponseDataCurrentRecurringCommitsProration = "FIRST_AND_LAST"
)

func (V1ContractListResponseDataCurrentRecurringCommitsProration) IsKnown

type V1ContractListResponseDataCurrentRecurringCommitsRateType

type V1ContractListResponseDataCurrentRecurringCommitsRateType string

Whether the created commits will use the commit rate or list rate

const (
	V1ContractListResponseDataCurrentRecurringCommitsRateTypeCommitRate V1ContractListResponseDataCurrentRecurringCommitsRateType = "COMMIT_RATE"
	V1ContractListResponseDataCurrentRecurringCommitsRateTypeListRate   V1ContractListResponseDataCurrentRecurringCommitsRateType = "LIST_RATE"
)

func (V1ContractListResponseDataCurrentRecurringCommitsRateType) IsKnown

type V1ContractListResponseDataCurrentRecurringCommitsRecurrenceFrequency

type V1ContractListResponseDataCurrentRecurringCommitsRecurrenceFrequency string

The frequency at which the recurring commits will be created. If not provided: - The commits will be created on the usage invoice frequency. If provided: - The period defined in the duration will correspond to this frequency. - Commits will be created aligned with the recurring commit's starting_at rather than the usage invoice dates.

const (
	V1ContractListResponseDataCurrentRecurringCommitsRecurrenceFrequencyMonthly   V1ContractListResponseDataCurrentRecurringCommitsRecurrenceFrequency = "MONTHLY"
	V1ContractListResponseDataCurrentRecurringCommitsRecurrenceFrequencyQuarterly V1ContractListResponseDataCurrentRecurringCommitsRecurrenceFrequency = "QUARTERLY"
	V1ContractListResponseDataCurrentRecurringCommitsRecurrenceFrequencyAnnual    V1ContractListResponseDataCurrentRecurringCommitsRecurrenceFrequency = "ANNUAL"
	V1ContractListResponseDataCurrentRecurringCommitsRecurrenceFrequencyWeekly    V1ContractListResponseDataCurrentRecurringCommitsRecurrenceFrequency = "WEEKLY"
)

func (V1ContractListResponseDataCurrentRecurringCommitsRecurrenceFrequency) IsKnown

type V1ContractListResponseDataCurrentRecurringCommitsSpecifier

type V1ContractListResponseDataCurrentRecurringCommitsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                                       `json:"product_tags"`
	JSON        v1ContractListResponseDataCurrentRecurringCommitsSpecifierJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentRecurringCommitsSpecifier) UnmarshalJSON

type V1ContractListResponseDataCurrentRecurringCredit

type V1ContractListResponseDataCurrentRecurringCredit struct {
	ID string `json:"id,required" format:"uuid"`
	// The amount of commit to grant.
	AccessAmount V1ContractListResponseDataCurrentRecurringCreditsAccessAmount `json:"access_amount,required"`
	// The amount of time the created commits will be valid for
	CommitDuration V1ContractListResponseDataCurrentRecurringCreditsCommitDuration `json:"commit_duration,required"`
	// Will be passed down to the individual commits
	Priority float64                                                  `json:"priority,required"`
	Product  V1ContractListResponseDataCurrentRecurringCreditsProduct `json:"product,required"`
	// Whether the created commits will use the commit rate or list rate
	RateType V1ContractListResponseDataCurrentRecurringCreditsRateType `json:"rate_type,required"`
	// Determines the start time for the first commit
	StartingAt time.Time `json:"starting_at,required" format:"date-time"`
	// Will be passed down to the individual commits
	ApplicableProductIDs []string `json:"applicable_product_ids" format:"uuid"`
	// Will be passed down to the individual commits
	ApplicableProductTags []string                                                  `json:"applicable_product_tags"`
	Contract              V1ContractListResponseDataCurrentRecurringCreditsContract `json:"contract"`
	// Will be passed down to the individual commits
	Description string `json:"description"`
	// Determines when the contract will stop creating recurring commits. Optional
	EndingBefore time.Time `json:"ending_before" format:"date-time"`
	// Displayed on invoices. Will be passed through to the individual commits
	Name string `json:"name"`
	// Will be passed down to the individual commits
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// Determines whether the first and last commit will be prorated. If not provided,
	// the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
	Proration V1ContractListResponseDataCurrentRecurringCreditsProration `json:"proration"`
	// The frequency at which the recurring commits will be created. If not provided: -
	// The commits will be created on the usage invoice frequency. If provided: - The
	// period defined in the duration will correspond to this frequency. - Commits will
	// be created aligned with the recurring commit's starting_at rather than the usage
	// invoice dates.
	RecurrenceFrequency V1ContractListResponseDataCurrentRecurringCreditsRecurrenceFrequency `json:"recurrence_frequency"`
	// Will be passed down to the individual commits. This controls how much of an
	// individual unexpired commit will roll over upon contract transition. Must be
	// between 0 and 1.
	RolloverFraction float64 `json:"rollover_fraction"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractListResponseDataCurrentRecurringCreditsSpecifier `json:"specifiers"`
	JSON       v1ContractListResponseDataCurrentRecurringCreditJSON         `json:"-"`
}

func (*V1ContractListResponseDataCurrentRecurringCredit) UnmarshalJSON

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

type V1ContractListResponseDataCurrentRecurringCreditsAccessAmount

type V1ContractListResponseDataCurrentRecurringCreditsAccessAmount struct {
	CreditTypeID string                                                            `json:"credit_type_id,required" format:"uuid"`
	Quantity     float64                                                           `json:"quantity,required"`
	UnitPrice    float64                                                           `json:"unit_price,required"`
	JSON         v1ContractListResponseDataCurrentRecurringCreditsAccessAmountJSON `json:"-"`
}

The amount of commit to grant.

func (*V1ContractListResponseDataCurrentRecurringCreditsAccessAmount) UnmarshalJSON

type V1ContractListResponseDataCurrentRecurringCreditsCommitDuration

type V1ContractListResponseDataCurrentRecurringCreditsCommitDuration struct {
	Value float64                                                             `json:"value,required"`
	Unit  V1ContractListResponseDataCurrentRecurringCreditsCommitDurationUnit `json:"unit"`
	JSON  v1ContractListResponseDataCurrentRecurringCreditsCommitDurationJSON `json:"-"`
}

The amount of time the created commits will be valid for

func (*V1ContractListResponseDataCurrentRecurringCreditsCommitDuration) UnmarshalJSON

type V1ContractListResponseDataCurrentRecurringCreditsCommitDurationUnit

type V1ContractListResponseDataCurrentRecurringCreditsCommitDurationUnit string
const (
	V1ContractListResponseDataCurrentRecurringCreditsCommitDurationUnitPeriods V1ContractListResponseDataCurrentRecurringCreditsCommitDurationUnit = "PERIODS"
)

func (V1ContractListResponseDataCurrentRecurringCreditsCommitDurationUnit) IsKnown

type V1ContractListResponseDataCurrentRecurringCreditsContract

type V1ContractListResponseDataCurrentRecurringCreditsContract struct {
	ID   string                                                        `json:"id,required" format:"uuid"`
	JSON v1ContractListResponseDataCurrentRecurringCreditsContractJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentRecurringCreditsContract) UnmarshalJSON

type V1ContractListResponseDataCurrentRecurringCreditsProduct

type V1ContractListResponseDataCurrentRecurringCreditsProduct struct {
	ID   string                                                       `json:"id,required" format:"uuid"`
	Name string                                                       `json:"name,required"`
	JSON v1ContractListResponseDataCurrentRecurringCreditsProductJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentRecurringCreditsProduct) UnmarshalJSON

type V1ContractListResponseDataCurrentRecurringCreditsProration

type V1ContractListResponseDataCurrentRecurringCreditsProration string

Determines whether the first and last commit will be prorated. If not provided, the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).

const (
	V1ContractListResponseDataCurrentRecurringCreditsProrationNone         V1ContractListResponseDataCurrentRecurringCreditsProration = "NONE"
	V1ContractListResponseDataCurrentRecurringCreditsProrationFirst        V1ContractListResponseDataCurrentRecurringCreditsProration = "FIRST"
	V1ContractListResponseDataCurrentRecurringCreditsProrationLast         V1ContractListResponseDataCurrentRecurringCreditsProration = "LAST"
	V1ContractListResponseDataCurrentRecurringCreditsProrationFirstAndLast V1ContractListResponseDataCurrentRecurringCreditsProration = "FIRST_AND_LAST"
)

func (V1ContractListResponseDataCurrentRecurringCreditsProration) IsKnown

type V1ContractListResponseDataCurrentRecurringCreditsRateType

type V1ContractListResponseDataCurrentRecurringCreditsRateType string

Whether the created commits will use the commit rate or list rate

const (
	V1ContractListResponseDataCurrentRecurringCreditsRateTypeCommitRate V1ContractListResponseDataCurrentRecurringCreditsRateType = "COMMIT_RATE"
	V1ContractListResponseDataCurrentRecurringCreditsRateTypeListRate   V1ContractListResponseDataCurrentRecurringCreditsRateType = "LIST_RATE"
)

func (V1ContractListResponseDataCurrentRecurringCreditsRateType) IsKnown

type V1ContractListResponseDataCurrentRecurringCreditsRecurrenceFrequency

type V1ContractListResponseDataCurrentRecurringCreditsRecurrenceFrequency string

The frequency at which the recurring commits will be created. If not provided: - The commits will be created on the usage invoice frequency. If provided: - The period defined in the duration will correspond to this frequency. - Commits will be created aligned with the recurring commit's starting_at rather than the usage invoice dates.

const (
	V1ContractListResponseDataCurrentRecurringCreditsRecurrenceFrequencyMonthly   V1ContractListResponseDataCurrentRecurringCreditsRecurrenceFrequency = "MONTHLY"
	V1ContractListResponseDataCurrentRecurringCreditsRecurrenceFrequencyQuarterly V1ContractListResponseDataCurrentRecurringCreditsRecurrenceFrequency = "QUARTERLY"
	V1ContractListResponseDataCurrentRecurringCreditsRecurrenceFrequencyAnnual    V1ContractListResponseDataCurrentRecurringCreditsRecurrenceFrequency = "ANNUAL"
	V1ContractListResponseDataCurrentRecurringCreditsRecurrenceFrequencyWeekly    V1ContractListResponseDataCurrentRecurringCreditsRecurrenceFrequency = "WEEKLY"
)

func (V1ContractListResponseDataCurrentRecurringCreditsRecurrenceFrequency) IsKnown

type V1ContractListResponseDataCurrentRecurringCreditsSpecifier

type V1ContractListResponseDataCurrentRecurringCreditsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                                       `json:"product_tags"`
	JSON        v1ContractListResponseDataCurrentRecurringCreditsSpecifierJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentRecurringCreditsSpecifier) UnmarshalJSON

type V1ContractListResponseDataCurrentResellerRoyaltiesResellerType

type V1ContractListResponseDataCurrentResellerRoyaltiesResellerType string
const (
	V1ContractListResponseDataCurrentResellerRoyaltiesResellerTypeAws           V1ContractListResponseDataCurrentResellerRoyaltiesResellerType = "AWS"
	V1ContractListResponseDataCurrentResellerRoyaltiesResellerTypeAwsProService V1ContractListResponseDataCurrentResellerRoyaltiesResellerType = "AWS_PRO_SERVICE"
	V1ContractListResponseDataCurrentResellerRoyaltiesResellerTypeGcp           V1ContractListResponseDataCurrentResellerRoyaltiesResellerType = "GCP"
	V1ContractListResponseDataCurrentResellerRoyaltiesResellerTypeGcpProService V1ContractListResponseDataCurrentResellerRoyaltiesResellerType = "GCP_PRO_SERVICE"
)

func (V1ContractListResponseDataCurrentResellerRoyaltiesResellerType) IsKnown

type V1ContractListResponseDataCurrentResellerRoyalty

type V1ContractListResponseDataCurrentResellerRoyalty struct {
	Fraction              float64                                                        `json:"fraction,required"`
	NetsuiteResellerID    string                                                         `json:"netsuite_reseller_id,required"`
	ResellerType          V1ContractListResponseDataCurrentResellerRoyaltiesResellerType `json:"reseller_type,required"`
	StartingAt            time.Time                                                      `json:"starting_at,required" format:"date-time"`
	ApplicableProductIDs  []string                                                       `json:"applicable_product_ids"`
	ApplicableProductTags []string                                                       `json:"applicable_product_tags"`
	AwsAccountNumber      string                                                         `json:"aws_account_number"`
	AwsOfferID            string                                                         `json:"aws_offer_id"`
	AwsPayerReferenceID   string                                                         `json:"aws_payer_reference_id"`
	EndingBefore          time.Time                                                      `json:"ending_before" format:"date-time"`
	GcpAccountID          string                                                         `json:"gcp_account_id"`
	GcpOfferID            string                                                         `json:"gcp_offer_id"`
	ResellerContractValue float64                                                        `json:"reseller_contract_value"`
	JSON                  v1ContractListResponseDataCurrentResellerRoyaltyJSON           `json:"-"`
}

func (*V1ContractListResponseDataCurrentResellerRoyalty) UnmarshalJSON

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

type V1ContractListResponseDataCurrentScheduledCharge

type V1ContractListResponseDataCurrentScheduledCharge struct {
	ID           string                                                    `json:"id,required" format:"uuid"`
	Product      V1ContractListResponseDataCurrentScheduledChargesProduct  `json:"product,required"`
	Schedule     V1ContractListResponseDataCurrentScheduledChargesSchedule `json:"schedule,required"`
	ArchivedAt   time.Time                                                 `json:"archived_at" format:"date-time"`
	CustomFields map[string]string                                         `json:"custom_fields"`
	// displayed on invoices
	Name string `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string                                               `json:"netsuite_sales_order_id"`
	JSON                 v1ContractListResponseDataCurrentScheduledChargeJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentScheduledCharge) UnmarshalJSON

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

type V1ContractListResponseDataCurrentScheduledChargesOnUsageInvoices

type V1ContractListResponseDataCurrentScheduledChargesOnUsageInvoices string

Determines which scheduled and commit charges to consolidate onto the Contract's usage invoice. The charge's `timestamp` must match the usage invoice's `ending_before` date for consolidation to occur. This field cannot be modified after a Contract has been created. If this field is omitted, charges will appear on a separate invoice from usage charges.

const (
	V1ContractListResponseDataCurrentScheduledChargesOnUsageInvoicesAll V1ContractListResponseDataCurrentScheduledChargesOnUsageInvoices = "ALL"
)

func (V1ContractListResponseDataCurrentScheduledChargesOnUsageInvoices) IsKnown

type V1ContractListResponseDataCurrentScheduledChargesProduct

type V1ContractListResponseDataCurrentScheduledChargesProduct struct {
	ID   string                                                       `json:"id,required" format:"uuid"`
	Name string                                                       `json:"name,required"`
	JSON v1ContractListResponseDataCurrentScheduledChargesProductJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentScheduledChargesProduct) UnmarshalJSON

type V1ContractListResponseDataCurrentScheduledChargesSchedule

type V1ContractListResponseDataCurrentScheduledChargesSchedule struct {
	CreditType    V1ContractListResponseDataCurrentScheduledChargesScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractListResponseDataCurrentScheduledChargesScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractListResponseDataCurrentScheduledChargesScheduleJSON           `json:"-"`
}

func (*V1ContractListResponseDataCurrentScheduledChargesSchedule) UnmarshalJSON

type V1ContractListResponseDataCurrentScheduledChargesScheduleCreditType

type V1ContractListResponseDataCurrentScheduledChargesScheduleCreditType struct {
	ID   string                                                                  `json:"id,required" format:"uuid"`
	Name string                                                                  `json:"name,required"`
	JSON v1ContractListResponseDataCurrentScheduledChargesScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentScheduledChargesScheduleCreditType) UnmarshalJSON

type V1ContractListResponseDataCurrentScheduledChargesScheduleScheduleItem

type V1ContractListResponseDataCurrentScheduledChargesScheduleScheduleItem struct {
	ID        string                                                                    `json:"id,required" format:"uuid"`
	Amount    float64                                                                   `json:"amount,required"`
	InvoiceID string                                                                    `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                                   `json:"quantity,required"`
	Timestamp time.Time                                                                 `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                                   `json:"unit_price,required"`
	JSON      v1ContractListResponseDataCurrentScheduledChargesScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentScheduledChargesScheduleScheduleItem) UnmarshalJSON

type V1ContractListResponseDataCurrentSpendThresholdConfiguration

type V1ContractListResponseDataCurrentSpendThresholdConfiguration struct {
	Commit V1ContractListResponseDataCurrentSpendThresholdConfigurationCommit `json:"commit,required"`
	// When set to false, the contract will not be evaluated against the
	// threshold_amount. Toggling to true will result an immediate evaluation,
	// regardless of prior state.
	IsEnabled         bool                                                                          `json:"is_enabled,required"`
	PaymentGateConfig V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfig `json:"payment_gate_config,required"`
	// Specify the threshold amount for the contract. Each time the contract's usage
	// hits this amount, a threshold charge will be initiated.
	ThresholdAmount float64                                                          `json:"threshold_amount,required"`
	JSON            v1ContractListResponseDataCurrentSpendThresholdConfigurationJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentSpendThresholdConfiguration) UnmarshalJSON

type V1ContractListResponseDataCurrentSpendThresholdConfigurationCommit

type V1ContractListResponseDataCurrentSpendThresholdConfigurationCommit struct {
	// The commit product that will be used to generate the line item for commit
	// payment.
	ProductID   string `json:"product_id,required"`
	Description string `json:"description"`
	// Specify the name of the line item for the threshold charge. If left blank, it
	// will default to the commit product name.
	Name string                                                                 `json:"name"`
	JSON v1ContractListResponseDataCurrentSpendThresholdConfigurationCommitJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentSpendThresholdConfigurationCommit) UnmarshalJSON

type V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfig

type V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfig struct {
	// Gate access to the commit balance based on successful collection of payment.
	// Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
	// facilitate payment using your own payment integration. Select NONE if you do not
	// wish to payment gate the commit balance.
	PaymentGateType V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateType `json:"payment_gate_type,required"`
	// Only applicable if using Stripe as your payment gateway through Metronome.
	StripeConfig V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfig `json:"stripe_config"`
	// Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
	// not wish Metronome to calculate tax on your behalf. Leaving this field blank
	// will default to NONE.
	TaxType V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigTaxType `json:"tax_type"`
	JSON    v1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigJSON    `json:"-"`
}

func (*V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfig) UnmarshalJSON

type V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateType

type V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateType string

Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance.

const (
	V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateTypeNone     V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateType = "NONE"
	V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateTypeStripe   V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateType = "STRIPE"
	V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateTypeExternal V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateType = "EXTERNAL"
)

func (V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigPaymentGateType) IsKnown

type V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfig

type V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfig struct {
	// If left blank, will default to INVOICE
	PaymentType V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType `json:"payment_type,required"`
	JSON        v1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfigJSON        `json:"-"`
}

Only applicable if using Stripe as your payment gateway through Metronome.

func (*V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfig) UnmarshalJSON

type V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType

type V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType string

If left blank, will default to INVOICE

const (
	V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypeInvoice       V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "INVOICE"
	V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypePaymentIntent V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "PAYMENT_INTENT"
)

func (V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType) IsKnown

type V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigTaxType

type V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigTaxType string

Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE.

const (
	V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigTaxTypeNone   V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigTaxType = "NONE"
	V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigTaxTypeStripe V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigTaxType = "STRIPE"
)

func (V1ContractListResponseDataCurrentSpendThresholdConfigurationPaymentGateConfigTaxType) IsKnown

type V1ContractListResponseDataCurrentTransition

type V1ContractListResponseDataCurrentTransition struct {
	FromContractID string                                           `json:"from_contract_id,required" format:"uuid"`
	ToContractID   string                                           `json:"to_contract_id,required" format:"uuid"`
	Type           V1ContractListResponseDataCurrentTransitionsType `json:"type,required"`
	JSON           v1ContractListResponseDataCurrentTransitionJSON  `json:"-"`
}

func (*V1ContractListResponseDataCurrentTransition) UnmarshalJSON

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

type V1ContractListResponseDataCurrentTransitionsType

type V1ContractListResponseDataCurrentTransitionsType string
const (
	V1ContractListResponseDataCurrentTransitionsTypeSupersede V1ContractListResponseDataCurrentTransitionsType = "SUPERSEDE"
	V1ContractListResponseDataCurrentTransitionsTypeRenewal   V1ContractListResponseDataCurrentTransitionsType = "RENEWAL"
)

func (V1ContractListResponseDataCurrentTransitionsType) IsKnown

type V1ContractListResponseDataCurrentUsageFilter

type V1ContractListResponseDataCurrentUsageFilter struct {
	Current V1ContractListResponseDataCurrentUsageFilterCurrent  `json:"current,required,nullable"`
	Initial V1ContractListResponseDataCurrentUsageFilterInitial  `json:"initial,required"`
	Updates []V1ContractListResponseDataCurrentUsageFilterUpdate `json:"updates,required"`
	JSON    v1ContractListResponseDataCurrentUsageFilterJSON     `json:"-"`
}

func (*V1ContractListResponseDataCurrentUsageFilter) UnmarshalJSON

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

type V1ContractListResponseDataCurrentUsageFilterCurrent

type V1ContractListResponseDataCurrentUsageFilterCurrent struct {
	GroupKey    string                                                  `json:"group_key,required"`
	GroupValues []string                                                `json:"group_values,required"`
	StartingAt  time.Time                                               `json:"starting_at" format:"date-time"`
	JSON        v1ContractListResponseDataCurrentUsageFilterCurrentJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentUsageFilterCurrent) UnmarshalJSON

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

type V1ContractListResponseDataCurrentUsageFilterInitial

type V1ContractListResponseDataCurrentUsageFilterInitial struct {
	GroupKey    string                                                  `json:"group_key,required"`
	GroupValues []string                                                `json:"group_values,required"`
	StartingAt  time.Time                                               `json:"starting_at" format:"date-time"`
	JSON        v1ContractListResponseDataCurrentUsageFilterInitialJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentUsageFilterInitial) UnmarshalJSON

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

type V1ContractListResponseDataCurrentUsageFilterUpdate

type V1ContractListResponseDataCurrentUsageFilterUpdate struct {
	GroupKey    string                                                 `json:"group_key,required"`
	GroupValues []string                                               `json:"group_values,required"`
	StartingAt  time.Time                                              `json:"starting_at,required" format:"date-time"`
	JSON        v1ContractListResponseDataCurrentUsageFilterUpdateJSON `json:"-"`
}

func (*V1ContractListResponseDataCurrentUsageFilterUpdate) UnmarshalJSON

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

type V1ContractListResponseDataCurrentUsageStatementSchedule

type V1ContractListResponseDataCurrentUsageStatementSchedule struct {
	// Contract usage statements follow a selected cadence based on this date.
	BillingAnchorDate time.Time                                                        `json:"billing_anchor_date,required" format:"date-time"`
	Frequency         V1ContractListResponseDataCurrentUsageStatementScheduleFrequency `json:"frequency,required"`
	JSON              v1ContractListResponseDataCurrentUsageStatementScheduleJSON      `json:"-"`
}

func (*V1ContractListResponseDataCurrentUsageStatementSchedule) UnmarshalJSON

type V1ContractListResponseDataCurrentUsageStatementScheduleFrequency

type V1ContractListResponseDataCurrentUsageStatementScheduleFrequency string
const (
	V1ContractListResponseDataCurrentUsageStatementScheduleFrequencyMonthly   V1ContractListResponseDataCurrentUsageStatementScheduleFrequency = "MONTHLY"
	V1ContractListResponseDataCurrentUsageStatementScheduleFrequencyQuarterly V1ContractListResponseDataCurrentUsageStatementScheduleFrequency = "QUARTERLY"
	V1ContractListResponseDataCurrentUsageStatementScheduleFrequencyAnnual    V1ContractListResponseDataCurrentUsageStatementScheduleFrequency = "ANNUAL"
	V1ContractListResponseDataCurrentUsageStatementScheduleFrequencyWeekly    V1ContractListResponseDataCurrentUsageStatementScheduleFrequency = "WEEKLY"
)

func (V1ContractListResponseDataCurrentUsageStatementScheduleFrequency) IsKnown

type V1ContractListResponseDataCustomerBillingProviderConfiguration

type V1ContractListResponseDataCustomerBillingProviderConfiguration struct {
	BillingProvider V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider `json:"billing_provider,required"`
	DeliveryMethod  V1ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethod  `json:"delivery_method,required"`
	ID              string                                                                        `json:"id" format:"uuid"`
	// Configuration for the billing provider. The structure of this object is specific
	// to the billing provider.
	Configuration map[string]interface{}                                             `json:"configuration"`
	JSON          v1ContractListResponseDataCustomerBillingProviderConfigurationJSON `json:"-"`
}

The billing provider configuration associated with a contract.

func (*V1ContractListResponseDataCustomerBillingProviderConfiguration) UnmarshalJSON

type V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider

type V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider string
const (
	V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderAwsMarketplace   V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider = "aws_marketplace"
	V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderStripe           V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider = "stripe"
	V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderNetsuite         V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider = "netsuite"
	V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderCustom           V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider = "custom"
	V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderAzureMarketplace V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider = "azure_marketplace"
	V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderQuickbooksOnline V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider = "quickbooks_online"
	V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderWorkday          V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider = "workday"
	V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderGcpMarketplace   V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider = "gcp_marketplace"
)

func (V1ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider) IsKnown

type V1ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethod

type V1ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethod string
const (
	V1ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethodDirectToBillingProvider V1ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethod = "direct_to_billing_provider"
	V1ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethodAwsSqs                  V1ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethod = "aws_sqs"
	V1ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethodTackle                  V1ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethod = "tackle"
	V1ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethodAwsSns                  V1ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethod = "aws_sns"
)

func (V1ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethod) IsKnown

type V1ContractListResponseDataInitial

type V1ContractListResponseDataInitial struct {
	Commits                []V1ContractListResponseDataInitialCommit               `json:"commits,required"`
	CreatedAt              time.Time                                               `json:"created_at,required" format:"date-time"`
	CreatedBy              string                                                  `json:"created_by,required"`
	Overrides              []V1ContractListResponseDataInitialOverride             `json:"overrides,required"`
	ScheduledCharges       []V1ContractListResponseDataInitialScheduledCharge      `json:"scheduled_charges,required"`
	StartingAt             time.Time                                               `json:"starting_at,required" format:"date-time"`
	Transitions            []V1ContractListResponseDataInitialTransition           `json:"transitions,required"`
	UsageStatementSchedule V1ContractListResponseDataInitialUsageStatementSchedule `json:"usage_statement_schedule,required"`
	Credits                []V1ContractListResponseDataInitialCredit               `json:"credits"`
	// This field's availability is dependent on your client's configuration.
	Discounts           []V1ContractListResponseDataInitialDiscount `json:"discounts"`
	EndingBefore        time.Time                                   `json:"ending_before" format:"date-time"`
	Name                string                                      `json:"name"`
	NetPaymentTermsDays float64                                     `json:"net_payment_terms_days"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID                 string                                                                `json:"netsuite_sales_order_id"`
	PrepaidBalanceThresholdConfiguration V1ContractListResponseDataInitialPrepaidBalanceThresholdConfiguration `json:"prepaid_balance_threshold_configuration"`
	// This field's availability is dependent on your client's configuration.
	ProfessionalServices []V1ContractListResponseDataInitialProfessionalService `json:"professional_services"`
	RateCardID           string                                                 `json:"rate_card_id" format:"uuid"`
	RecurringCommits     []V1ContractListResponseDataInitialRecurringCommit     `json:"recurring_commits"`
	RecurringCredits     []V1ContractListResponseDataInitialRecurringCredit     `json:"recurring_credits"`
	// This field's availability is dependent on your client's configuration.
	ResellerRoyalties []V1ContractListResponseDataInitialResellerRoyalty `json:"reseller_royalties"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// Determines which scheduled and commit charges to consolidate onto the Contract's
	// usage invoice. The charge's `timestamp` must match the usage invoice's
	// `ending_before` date for consolidation to occur. This field cannot be modified
	// after a Contract has been created. If this field is omitted, charges will appear
	// on a separate invoice from usage charges.
	ScheduledChargesOnUsageInvoices V1ContractListResponseDataInitialScheduledChargesOnUsageInvoices `json:"scheduled_charges_on_usage_invoices"`
	SpendThresholdConfiguration     V1ContractListResponseDataInitialSpendThresholdConfiguration     `json:"spend_threshold_configuration"`
	// This field's availability is dependent on your client's configuration.
	TotalContractValue float64                                      `json:"total_contract_value"`
	UsageFilter        V1ContractListResponseDataInitialUsageFilter `json:"usage_filter"`
	JSON               v1ContractListResponseDataInitialJSON        `json:"-"`
}

func (*V1ContractListResponseDataInitial) UnmarshalJSON

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

type V1ContractListResponseDataInitialCommit

type V1ContractListResponseDataInitialCommit struct {
	ID      string                                          `json:"id,required" format:"uuid"`
	Product V1ContractListResponseDataInitialCommitsProduct `json:"product,required"`
	Type    V1ContractListResponseDataInitialCommitsType    `json:"type,required"`
	// The schedule that the customer will gain access to the credits purposed with
	// this commit.
	AccessSchedule V1ContractListResponseDataInitialCommitsAccessSchedule `json:"access_schedule"`
	// (DEPRECATED) Use access_schedule + invoice_schedule instead.
	Amount                float64  `json:"amount"`
	ApplicableContractIDs []string `json:"applicable_contract_ids" format:"uuid"`
	ApplicableProductIDs  []string `json:"applicable_product_ids" format:"uuid"`
	ApplicableProductTags []string `json:"applicable_product_tags"`
	// RFC 3339 timestamp indicating when the commit was archived. If not provided, the
	// commit is not archived.
	ArchivedAt time.Time `json:"archived_at" format:"date-time"`
	// The current balance of the credit or commit. This balance reflects the amount of
	// credit or commit that the customer has access to use at this moment - thus,
	// expired and upcoming credit or commit segments contribute 0 to the balance. The
	// balance will match the sum of all ledger entries with the exception of the case
	// where the sum of negative manual ledger entries exceeds the positive amount
	// remaining on the credit or commit - in that case, the balance will be 0. All
	// manual ledger entries associated with active credit or commit segments are
	// included in the balance, including future-dated manual ledger entries.
	Balance      float64                                          `json:"balance"`
	Contract     V1ContractListResponseDataInitialCommitsContract `json:"contract"`
	CustomFields map[string]string                                `json:"custom_fields"`
	Description  string                                           `json:"description"`
	// The contract that this commit will be billed on.
	InvoiceContract V1ContractListResponseDataInitialCommitsInvoiceContract `json:"invoice_contract"`
	// The schedule that the customer will be invoiced for this commit.
	InvoiceSchedule V1ContractListResponseDataInitialCommitsInvoiceSchedule `json:"invoice_schedule"`
	// A list of ordered events that impact the balance of a commit. For example, an
	// invoice deduction or a rollover.
	Ledger []V1ContractListResponseDataInitialCommitsLedger `json:"ledger"`
	Name   string                                           `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// If multiple credits or commits are applicable, the one with the lower priority
	// will apply first.
	Priority         float64                                                `json:"priority"`
	RateType         V1ContractListResponseDataInitialCommitsRateType       `json:"rate_type"`
	RolledOverFrom   V1ContractListResponseDataInitialCommitsRolledOverFrom `json:"rolled_over_from"`
	RolloverFraction float64                                                `json:"rollover_fraction"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractListResponseDataInitialCommitsSpecifier `json:"specifiers"`
	// Prevents the creation of duplicates. If a request to create a commit or credit
	// is made with a uniqueness key that was previously used to create a commit or
	// credit, a new record will not be created and the request will fail with a 409
	// error.
	UniquenessKey string                                      `json:"uniqueness_key"`
	JSON          v1ContractListResponseDataInitialCommitJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialCommit) UnmarshalJSON

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

type V1ContractListResponseDataInitialCommitsAccessSchedule

type V1ContractListResponseDataInitialCommitsAccessSchedule struct {
	ScheduleItems []V1ContractListResponseDataInitialCommitsAccessScheduleScheduleItem `json:"schedule_items,required"`
	CreditType    V1ContractListResponseDataInitialCommitsAccessScheduleCreditType     `json:"credit_type"`
	JSON          v1ContractListResponseDataInitialCommitsAccessScheduleJSON           `json:"-"`
}

The schedule that the customer will gain access to the credits purposed with this commit.

func (*V1ContractListResponseDataInitialCommitsAccessSchedule) UnmarshalJSON

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

type V1ContractListResponseDataInitialCommitsAccessScheduleCreditType

type V1ContractListResponseDataInitialCommitsAccessScheduleCreditType struct {
	ID   string                                                               `json:"id,required" format:"uuid"`
	Name string                                                               `json:"name,required"`
	JSON v1ContractListResponseDataInitialCommitsAccessScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialCommitsAccessScheduleCreditType) UnmarshalJSON

type V1ContractListResponseDataInitialCommitsAccessScheduleScheduleItem

type V1ContractListResponseDataInitialCommitsAccessScheduleScheduleItem struct {
	ID           string                                                                 `json:"id,required" format:"uuid"`
	Amount       float64                                                                `json:"amount,required"`
	EndingBefore time.Time                                                              `json:"ending_before,required" format:"date-time"`
	StartingAt   time.Time                                                              `json:"starting_at,required" format:"date-time"`
	JSON         v1ContractListResponseDataInitialCommitsAccessScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialCommitsAccessScheduleScheduleItem) UnmarshalJSON

type V1ContractListResponseDataInitialCommitsContract

type V1ContractListResponseDataInitialCommitsContract struct {
	ID   string                                               `json:"id,required" format:"uuid"`
	JSON v1ContractListResponseDataInitialCommitsContractJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialCommitsContract) UnmarshalJSON

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

type V1ContractListResponseDataInitialCommitsInvoiceContract

type V1ContractListResponseDataInitialCommitsInvoiceContract struct {
	ID   string                                                      `json:"id,required" format:"uuid"`
	JSON v1ContractListResponseDataInitialCommitsInvoiceContractJSON `json:"-"`
}

The contract that this commit will be billed on.

func (*V1ContractListResponseDataInitialCommitsInvoiceContract) UnmarshalJSON

type V1ContractListResponseDataInitialCommitsInvoiceSchedule

type V1ContractListResponseDataInitialCommitsInvoiceSchedule struct {
	CreditType    V1ContractListResponseDataInitialCommitsInvoiceScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractListResponseDataInitialCommitsInvoiceScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractListResponseDataInitialCommitsInvoiceScheduleJSON           `json:"-"`
}

The schedule that the customer will be invoiced for this commit.

func (*V1ContractListResponseDataInitialCommitsInvoiceSchedule) UnmarshalJSON

type V1ContractListResponseDataInitialCommitsInvoiceScheduleCreditType

type V1ContractListResponseDataInitialCommitsInvoiceScheduleCreditType struct {
	ID   string                                                                `json:"id,required" format:"uuid"`
	Name string                                                                `json:"name,required"`
	JSON v1ContractListResponseDataInitialCommitsInvoiceScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialCommitsInvoiceScheduleCreditType) UnmarshalJSON

type V1ContractListResponseDataInitialCommitsInvoiceScheduleScheduleItem

type V1ContractListResponseDataInitialCommitsInvoiceScheduleScheduleItem struct {
	ID        string                                                                  `json:"id,required" format:"uuid"`
	Amount    float64                                                                 `json:"amount,required"`
	InvoiceID string                                                                  `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                                 `json:"quantity,required"`
	Timestamp time.Time                                                               `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                                 `json:"unit_price,required"`
	JSON      v1ContractListResponseDataInitialCommitsInvoiceScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialCommitsInvoiceScheduleScheduleItem) UnmarshalJSON

type V1ContractListResponseDataInitialCommitsLedger

type V1ContractListResponseDataInitialCommitsLedger struct {
	Amount        float64                                            `json:"amount,required"`
	Timestamp     time.Time                                          `json:"timestamp,required" format:"date-time"`
	Type          V1ContractListResponseDataInitialCommitsLedgerType `json:"type,required"`
	InvoiceID     string                                             `json:"invoice_id" format:"uuid"`
	NewContractID string                                             `json:"new_contract_id" format:"uuid"`
	Reason        string                                             `json:"reason"`
	SegmentID     string                                             `json:"segment_id" format:"uuid"`
	JSON          v1ContractListResponseDataInitialCommitsLedgerJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*V1ContractListResponseDataInitialCommitsLedger) UnmarshalJSON

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

type V1ContractListResponseDataInitialCommitsLedgerObject

type V1ContractListResponseDataInitialCommitsLedgerObject struct {
	Amount    float64                                                  `json:"amount,required"`
	SegmentID string                                                   `json:"segment_id,required" format:"uuid"`
	Timestamp time.Time                                                `json:"timestamp,required" format:"date-time"`
	Type      V1ContractListResponseDataInitialCommitsLedgerObjectType `json:"type,required"`
	JSON      v1ContractListResponseDataInitialCommitsLedgerObjectJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialCommitsLedgerObject) UnmarshalJSON

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

type V1ContractListResponseDataInitialCommitsLedgerObjectType

type V1ContractListResponseDataInitialCommitsLedgerObjectType string
const (
	V1ContractListResponseDataInitialCommitsLedgerObjectTypePrepaidCommitSegmentStart V1ContractListResponseDataInitialCommitsLedgerObjectType = "PREPAID_COMMIT_SEGMENT_START"
)

func (V1ContractListResponseDataInitialCommitsLedgerObjectType) IsKnown

type V1ContractListResponseDataInitialCommitsLedgerType

type V1ContractListResponseDataInitialCommitsLedgerType string
const (
	V1ContractListResponseDataInitialCommitsLedgerTypePrepaidCommitSegmentStart               V1ContractListResponseDataInitialCommitsLedgerType = "PREPAID_COMMIT_SEGMENT_START"
	V1ContractListResponseDataInitialCommitsLedgerTypePrepaidCommitAutomatedInvoiceDeduction  V1ContractListResponseDataInitialCommitsLedgerType = "PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractListResponseDataInitialCommitsLedgerTypePrepaidCommitRollover                   V1ContractListResponseDataInitialCommitsLedgerType = "PREPAID_COMMIT_ROLLOVER"
	V1ContractListResponseDataInitialCommitsLedgerTypePrepaidCommitExpiration                 V1ContractListResponseDataInitialCommitsLedgerType = "PREPAID_COMMIT_EXPIRATION"
	V1ContractListResponseDataInitialCommitsLedgerTypePrepaidCommitCanceled                   V1ContractListResponseDataInitialCommitsLedgerType = "PREPAID_COMMIT_CANCELED"
	V1ContractListResponseDataInitialCommitsLedgerTypePrepaidCommitCredited                   V1ContractListResponseDataInitialCommitsLedgerType = "PREPAID_COMMIT_CREDITED"
	V1ContractListResponseDataInitialCommitsLedgerTypePostpaidCommitInitialBalance            V1ContractListResponseDataInitialCommitsLedgerType = "POSTPAID_COMMIT_INITIAL_BALANCE"
	V1ContractListResponseDataInitialCommitsLedgerTypePostpaidCommitAutomatedInvoiceDeduction V1ContractListResponseDataInitialCommitsLedgerType = "POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractListResponseDataInitialCommitsLedgerTypePostpaidCommitRollover                  V1ContractListResponseDataInitialCommitsLedgerType = "POSTPAID_COMMIT_ROLLOVER"
	V1ContractListResponseDataInitialCommitsLedgerTypePostpaidCommitTrueup                    V1ContractListResponseDataInitialCommitsLedgerType = "POSTPAID_COMMIT_TRUEUP"
	V1ContractListResponseDataInitialCommitsLedgerTypePrepaidCommitManual                     V1ContractListResponseDataInitialCommitsLedgerType = "PREPAID_COMMIT_MANUAL"
	V1ContractListResponseDataInitialCommitsLedgerTypePostpaidCommitManual                    V1ContractListResponseDataInitialCommitsLedgerType = "POSTPAID_COMMIT_MANUAL"
	V1ContractListResponseDataInitialCommitsLedgerTypePostpaidCommitExpiration                V1ContractListResponseDataInitialCommitsLedgerType = "POSTPAID_COMMIT_EXPIRATION"
)

func (V1ContractListResponseDataInitialCommitsLedgerType) IsKnown

type V1ContractListResponseDataInitialCommitsProduct

type V1ContractListResponseDataInitialCommitsProduct struct {
	ID   string                                              `json:"id,required" format:"uuid"`
	Name string                                              `json:"name,required"`
	JSON v1ContractListResponseDataInitialCommitsProductJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialCommitsProduct) UnmarshalJSON

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

type V1ContractListResponseDataInitialCommitsRateType

type V1ContractListResponseDataInitialCommitsRateType string
const (
	V1ContractListResponseDataInitialCommitsRateTypeCommitRate V1ContractListResponseDataInitialCommitsRateType = "COMMIT_RATE"
	V1ContractListResponseDataInitialCommitsRateTypeListRate   V1ContractListResponseDataInitialCommitsRateType = "LIST_RATE"
)

func (V1ContractListResponseDataInitialCommitsRateType) IsKnown

type V1ContractListResponseDataInitialCommitsRolledOverFrom

type V1ContractListResponseDataInitialCommitsRolledOverFrom struct {
	CommitID   string                                                     `json:"commit_id,required" format:"uuid"`
	ContractID string                                                     `json:"contract_id,required" format:"uuid"`
	JSON       v1ContractListResponseDataInitialCommitsRolledOverFromJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialCommitsRolledOverFrom) UnmarshalJSON

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

type V1ContractListResponseDataInitialCommitsSpecifier

type V1ContractListResponseDataInitialCommitsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                              `json:"product_tags"`
	JSON        v1ContractListResponseDataInitialCommitsSpecifierJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialCommitsSpecifier) UnmarshalJSON

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

type V1ContractListResponseDataInitialCommitsType

type V1ContractListResponseDataInitialCommitsType string
const (
	V1ContractListResponseDataInitialCommitsTypePrepaid  V1ContractListResponseDataInitialCommitsType = "PREPAID"
	V1ContractListResponseDataInitialCommitsTypePostpaid V1ContractListResponseDataInitialCommitsType = "POSTPAID"
)

func (V1ContractListResponseDataInitialCommitsType) IsKnown

type V1ContractListResponseDataInitialCredit

type V1ContractListResponseDataInitialCredit struct {
	ID      string                                          `json:"id,required" format:"uuid"`
	Product V1ContractListResponseDataInitialCreditsProduct `json:"product,required"`
	Type    V1ContractListResponseDataInitialCreditsType    `json:"type,required"`
	// The schedule that the customer will gain access to the credits.
	AccessSchedule        V1ContractListResponseDataInitialCreditsAccessSchedule `json:"access_schedule"`
	ApplicableContractIDs []string                                               `json:"applicable_contract_ids" format:"uuid"`
	ApplicableProductIDs  []string                                               `json:"applicable_product_ids" format:"uuid"`
	ApplicableProductTags []string                                               `json:"applicable_product_tags"`
	// The current balance of the credit or commit. This balance reflects the amount of
	// credit or commit that the customer has access to use at this moment - thus,
	// expired and upcoming credit or commit segments contribute 0 to the balance. The
	// balance will match the sum of all ledger entries with the exception of the case
	// where the sum of negative manual ledger entries exceeds the positive amount
	// remaining on the credit or commit - in that case, the balance will be 0. All
	// manual ledger entries associated with active credit or commit segments are
	// included in the balance, including future-dated manual ledger entries.
	Balance      float64                                          `json:"balance"`
	Contract     V1ContractListResponseDataInitialCreditsContract `json:"contract"`
	CustomFields map[string]string                                `json:"custom_fields"`
	Description  string                                           `json:"description"`
	// A list of ordered events that impact the balance of a credit. For example, an
	// invoice deduction or an expiration.
	Ledger []V1ContractListResponseDataInitialCreditsLedger `json:"ledger"`
	Name   string                                           `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// If multiple credits or commits are applicable, the one with the lower priority
	// will apply first.
	Priority float64                                          `json:"priority"`
	RateType V1ContractListResponseDataInitialCreditsRateType `json:"rate_type"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractListResponseDataInitialCreditsSpecifier `json:"specifiers"`
	// Prevents the creation of duplicates. If a request to create a commit or credit
	// is made with a uniqueness key that was previously used to create a commit or
	// credit, a new record will not be created and the request will fail with a 409
	// error.
	UniquenessKey string                                      `json:"uniqueness_key"`
	JSON          v1ContractListResponseDataInitialCreditJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialCredit) UnmarshalJSON

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

type V1ContractListResponseDataInitialCreditsAccessSchedule

type V1ContractListResponseDataInitialCreditsAccessSchedule struct {
	ScheduleItems []V1ContractListResponseDataInitialCreditsAccessScheduleScheduleItem `json:"schedule_items,required"`
	CreditType    V1ContractListResponseDataInitialCreditsAccessScheduleCreditType     `json:"credit_type"`
	JSON          v1ContractListResponseDataInitialCreditsAccessScheduleJSON           `json:"-"`
}

The schedule that the customer will gain access to the credits.

func (*V1ContractListResponseDataInitialCreditsAccessSchedule) UnmarshalJSON

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

type V1ContractListResponseDataInitialCreditsAccessScheduleCreditType

type V1ContractListResponseDataInitialCreditsAccessScheduleCreditType struct {
	ID   string                                                               `json:"id,required" format:"uuid"`
	Name string                                                               `json:"name,required"`
	JSON v1ContractListResponseDataInitialCreditsAccessScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialCreditsAccessScheduleCreditType) UnmarshalJSON

type V1ContractListResponseDataInitialCreditsAccessScheduleScheduleItem

type V1ContractListResponseDataInitialCreditsAccessScheduleScheduleItem struct {
	ID           string                                                                 `json:"id,required" format:"uuid"`
	Amount       float64                                                                `json:"amount,required"`
	EndingBefore time.Time                                                              `json:"ending_before,required" format:"date-time"`
	StartingAt   time.Time                                                              `json:"starting_at,required" format:"date-time"`
	JSON         v1ContractListResponseDataInitialCreditsAccessScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialCreditsAccessScheduleScheduleItem) UnmarshalJSON

type V1ContractListResponseDataInitialCreditsContract

type V1ContractListResponseDataInitialCreditsContract struct {
	ID   string                                               `json:"id,required" format:"uuid"`
	JSON v1ContractListResponseDataInitialCreditsContractJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialCreditsContract) UnmarshalJSON

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

type V1ContractListResponseDataInitialCreditsLedger

type V1ContractListResponseDataInitialCreditsLedger struct {
	Amount    float64                                            `json:"amount,required"`
	Timestamp time.Time                                          `json:"timestamp,required" format:"date-time"`
	Type      V1ContractListResponseDataInitialCreditsLedgerType `json:"type,required"`
	InvoiceID string                                             `json:"invoice_id" format:"uuid"`
	Reason    string                                             `json:"reason"`
	SegmentID string                                             `json:"segment_id" format:"uuid"`
	JSON      v1ContractListResponseDataInitialCreditsLedgerJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*V1ContractListResponseDataInitialCreditsLedger) UnmarshalJSON

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

type V1ContractListResponseDataInitialCreditsLedgerObject

type V1ContractListResponseDataInitialCreditsLedgerObject struct {
	Amount    float64                                                  `json:"amount,required"`
	SegmentID string                                                   `json:"segment_id,required" format:"uuid"`
	Timestamp time.Time                                                `json:"timestamp,required" format:"date-time"`
	Type      V1ContractListResponseDataInitialCreditsLedgerObjectType `json:"type,required"`
	JSON      v1ContractListResponseDataInitialCreditsLedgerObjectJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialCreditsLedgerObject) UnmarshalJSON

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

type V1ContractListResponseDataInitialCreditsLedgerObjectType

type V1ContractListResponseDataInitialCreditsLedgerObjectType string
const (
	V1ContractListResponseDataInitialCreditsLedgerObjectTypeCreditSegmentStart V1ContractListResponseDataInitialCreditsLedgerObjectType = "CREDIT_SEGMENT_START"
)

func (V1ContractListResponseDataInitialCreditsLedgerObjectType) IsKnown

type V1ContractListResponseDataInitialCreditsLedgerType

type V1ContractListResponseDataInitialCreditsLedgerType string
const (
	V1ContractListResponseDataInitialCreditsLedgerTypeCreditSegmentStart              V1ContractListResponseDataInitialCreditsLedgerType = "CREDIT_SEGMENT_START"
	V1ContractListResponseDataInitialCreditsLedgerTypeCreditAutomatedInvoiceDeduction V1ContractListResponseDataInitialCreditsLedgerType = "CREDIT_AUTOMATED_INVOICE_DEDUCTION"
	V1ContractListResponseDataInitialCreditsLedgerTypeCreditExpiration                V1ContractListResponseDataInitialCreditsLedgerType = "CREDIT_EXPIRATION"
	V1ContractListResponseDataInitialCreditsLedgerTypeCreditCanceled                  V1ContractListResponseDataInitialCreditsLedgerType = "CREDIT_CANCELED"
	V1ContractListResponseDataInitialCreditsLedgerTypeCreditCredited                  V1ContractListResponseDataInitialCreditsLedgerType = "CREDIT_CREDITED"
	V1ContractListResponseDataInitialCreditsLedgerTypeCreditManual                    V1ContractListResponseDataInitialCreditsLedgerType = "CREDIT_MANUAL"
)

func (V1ContractListResponseDataInitialCreditsLedgerType) IsKnown

type V1ContractListResponseDataInitialCreditsProduct

type V1ContractListResponseDataInitialCreditsProduct struct {
	ID   string                                              `json:"id,required" format:"uuid"`
	Name string                                              `json:"name,required"`
	JSON v1ContractListResponseDataInitialCreditsProductJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialCreditsProduct) UnmarshalJSON

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

type V1ContractListResponseDataInitialCreditsRateType

type V1ContractListResponseDataInitialCreditsRateType string
const (
	V1ContractListResponseDataInitialCreditsRateTypeCommitRate V1ContractListResponseDataInitialCreditsRateType = "COMMIT_RATE"
	V1ContractListResponseDataInitialCreditsRateTypeListRate   V1ContractListResponseDataInitialCreditsRateType = "LIST_RATE"
)

func (V1ContractListResponseDataInitialCreditsRateType) IsKnown

type V1ContractListResponseDataInitialCreditsSpecifier

type V1ContractListResponseDataInitialCreditsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                              `json:"product_tags"`
	JSON        v1ContractListResponseDataInitialCreditsSpecifierJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialCreditsSpecifier) UnmarshalJSON

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

type V1ContractListResponseDataInitialCreditsType

type V1ContractListResponseDataInitialCreditsType string
const (
	V1ContractListResponseDataInitialCreditsTypeCredit V1ContractListResponseDataInitialCreditsType = "CREDIT"
)

func (V1ContractListResponseDataInitialCreditsType) IsKnown

type V1ContractListResponseDataInitialDiscount

type V1ContractListResponseDataInitialDiscount struct {
	ID           string                                             `json:"id,required" format:"uuid"`
	Product      V1ContractListResponseDataInitialDiscountsProduct  `json:"product,required"`
	Schedule     V1ContractListResponseDataInitialDiscountsSchedule `json:"schedule,required"`
	CustomFields map[string]string                                  `json:"custom_fields"`
	Name         string                                             `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string                                        `json:"netsuite_sales_order_id"`
	JSON                 v1ContractListResponseDataInitialDiscountJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialDiscount) UnmarshalJSON

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

type V1ContractListResponseDataInitialDiscountsProduct

type V1ContractListResponseDataInitialDiscountsProduct struct {
	ID   string                                                `json:"id,required" format:"uuid"`
	Name string                                                `json:"name,required"`
	JSON v1ContractListResponseDataInitialDiscountsProductJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialDiscountsProduct) UnmarshalJSON

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

type V1ContractListResponseDataInitialDiscountsSchedule

type V1ContractListResponseDataInitialDiscountsSchedule struct {
	CreditType    V1ContractListResponseDataInitialDiscountsScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractListResponseDataInitialDiscountsScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractListResponseDataInitialDiscountsScheduleJSON           `json:"-"`
}

func (*V1ContractListResponseDataInitialDiscountsSchedule) UnmarshalJSON

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

type V1ContractListResponseDataInitialDiscountsScheduleCreditType

type V1ContractListResponseDataInitialDiscountsScheduleCreditType struct {
	ID   string                                                           `json:"id,required" format:"uuid"`
	Name string                                                           `json:"name,required"`
	JSON v1ContractListResponseDataInitialDiscountsScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialDiscountsScheduleCreditType) UnmarshalJSON

type V1ContractListResponseDataInitialDiscountsScheduleScheduleItem

type V1ContractListResponseDataInitialDiscountsScheduleScheduleItem struct {
	ID        string                                                             `json:"id,required" format:"uuid"`
	Amount    float64                                                            `json:"amount,required"`
	InvoiceID string                                                             `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                            `json:"quantity,required"`
	Timestamp time.Time                                                          `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                            `json:"unit_price,required"`
	JSON      v1ContractListResponseDataInitialDiscountsScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialDiscountsScheduleScheduleItem) UnmarshalJSON

type V1ContractListResponseDataInitialOverride

type V1ContractListResponseDataInitialOverride struct {
	ID                    string                                               `json:"id,required" format:"uuid"`
	StartingAt            time.Time                                            `json:"starting_at,required" format:"date-time"`
	ApplicableProductTags []string                                             `json:"applicable_product_tags"`
	CreditType            V1ContractListResponseDataInitialOverridesCreditType `json:"credit_type"`
	EndingBefore          time.Time                                            `json:"ending_before" format:"date-time"`
	Entitled              bool                                                 `json:"entitled"`
	IsCommitSpecific      bool                                                 `json:"is_commit_specific"`
	// Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
	// set to true.
	IsProrated         bool                                                          `json:"is_prorated"`
	Multiplier         float64                                                       `json:"multiplier"`
	OverrideSpecifiers []V1ContractListResponseDataInitialOverridesOverrideSpecifier `json:"override_specifiers"`
	OverrideTiers      []V1ContractListResponseDataInitialOverridesOverrideTier      `json:"override_tiers"`
	OverwriteRate      V1ContractListResponseDataInitialOverridesOverwriteRate       `json:"overwrite_rate"`
	// Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
	// this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
	Price    float64                                           `json:"price"`
	Priority float64                                           `json:"priority"`
	Product  V1ContractListResponseDataInitialOverridesProduct `json:"product"`
	// Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
	Quantity float64                                            `json:"quantity"`
	RateType V1ContractListResponseDataInitialOverridesRateType `json:"rate_type"`
	Target   V1ContractListResponseDataInitialOverridesTarget   `json:"target"`
	// Only set for TIERED rate_type.
	Tiers []V1ContractListResponseDataInitialOverridesTier `json:"tiers"`
	Type  V1ContractListResponseDataInitialOverridesType   `json:"type"`
	// Only set for CUSTOM rate_type. This field is interpreted by custom rate
	// processors.
	Value map[string]interface{}                        `json:"value"`
	JSON  v1ContractListResponseDataInitialOverrideJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialOverride) UnmarshalJSON

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

type V1ContractListResponseDataInitialOverridesCreditType

type V1ContractListResponseDataInitialOverridesCreditType struct {
	ID   string                                                   `json:"id,required" format:"uuid"`
	Name string                                                   `json:"name,required"`
	JSON v1ContractListResponseDataInitialOverridesCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialOverridesCreditType) UnmarshalJSON

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

type V1ContractListResponseDataInitialOverridesOverrideSpecifier

type V1ContractListResponseDataInitialOverridesOverrideSpecifier struct {
	BillingFrequency        V1ContractListResponseDataInitialOverridesOverrideSpecifiersBillingFrequency `json:"billing_frequency"`
	CommitIDs               []string                                                                     `json:"commit_ids"`
	PresentationGroupValues map[string]string                                                            `json:"presentation_group_values"`
	PricingGroupValues      map[string]string                                                            `json:"pricing_group_values"`
	ProductID               string                                                                       `json:"product_id" format:"uuid"`
	ProductTags             []string                                                                     `json:"product_tags"`
	RecurringCommitIDs      []string                                                                     `json:"recurring_commit_ids"`
	RecurringCreditIDs      []string                                                                     `json:"recurring_credit_ids"`
	JSON                    v1ContractListResponseDataInitialOverridesOverrideSpecifierJSON              `json:"-"`
}

func (*V1ContractListResponseDataInitialOverridesOverrideSpecifier) UnmarshalJSON

type V1ContractListResponseDataInitialOverridesOverrideSpecifiersBillingFrequency

type V1ContractListResponseDataInitialOverridesOverrideSpecifiersBillingFrequency string
const (
	V1ContractListResponseDataInitialOverridesOverrideSpecifiersBillingFrequencyMonthly   V1ContractListResponseDataInitialOverridesOverrideSpecifiersBillingFrequency = "MONTHLY"
	V1ContractListResponseDataInitialOverridesOverrideSpecifiersBillingFrequencyQuarterly V1ContractListResponseDataInitialOverridesOverrideSpecifiersBillingFrequency = "QUARTERLY"
	V1ContractListResponseDataInitialOverridesOverrideSpecifiersBillingFrequencyAnnual    V1ContractListResponseDataInitialOverridesOverrideSpecifiersBillingFrequency = "ANNUAL"
	V1ContractListResponseDataInitialOverridesOverrideSpecifiersBillingFrequencyWeekly    V1ContractListResponseDataInitialOverridesOverrideSpecifiersBillingFrequency = "WEEKLY"
)

func (V1ContractListResponseDataInitialOverridesOverrideSpecifiersBillingFrequency) IsKnown

type V1ContractListResponseDataInitialOverridesOverrideTier

type V1ContractListResponseDataInitialOverridesOverrideTier struct {
	Multiplier float64                                                    `json:"multiplier,required"`
	Size       float64                                                    `json:"size"`
	JSON       v1ContractListResponseDataInitialOverridesOverrideTierJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialOverridesOverrideTier) UnmarshalJSON

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

type V1ContractListResponseDataInitialOverridesOverwriteRate

type V1ContractListResponseDataInitialOverridesOverwriteRate struct {
	RateType   V1ContractListResponseDataInitialOverridesOverwriteRateRateType   `json:"rate_type,required"`
	CreditType V1ContractListResponseDataInitialOverridesOverwriteRateCreditType `json:"credit_type"`
	// Only set for CUSTOM rate_type. This field is interpreted by custom rate
	// processors.
	CustomRate map[string]interface{} `json:"custom_rate"`
	// Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
	// set to true.
	IsProrated bool `json:"is_prorated"`
	// Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
	// this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
	Price float64 `json:"price"`
	// Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
	Quantity float64 `json:"quantity"`
	// Only set for TIERED rate_type.
	Tiers []V1ContractListResponseDataInitialOverridesOverwriteRateTier `json:"tiers"`
	JSON  v1ContractListResponseDataInitialOverridesOverwriteRateJSON   `json:"-"`
}

func (*V1ContractListResponseDataInitialOverridesOverwriteRate) UnmarshalJSON

type V1ContractListResponseDataInitialOverridesOverwriteRateCreditType

type V1ContractListResponseDataInitialOverridesOverwriteRateCreditType struct {
	ID   string                                                                `json:"id,required" format:"uuid"`
	Name string                                                                `json:"name,required"`
	JSON v1ContractListResponseDataInitialOverridesOverwriteRateCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialOverridesOverwriteRateCreditType) UnmarshalJSON

type V1ContractListResponseDataInitialOverridesOverwriteRateRateType

type V1ContractListResponseDataInitialOverridesOverwriteRateRateType string
const (
	V1ContractListResponseDataInitialOverridesOverwriteRateRateTypeFlat         V1ContractListResponseDataInitialOverridesOverwriteRateRateType = "FLAT"
	V1ContractListResponseDataInitialOverridesOverwriteRateRateTypePercentage   V1ContractListResponseDataInitialOverridesOverwriteRateRateType = "PERCENTAGE"
	V1ContractListResponseDataInitialOverridesOverwriteRateRateTypeSubscription V1ContractListResponseDataInitialOverridesOverwriteRateRateType = "SUBSCRIPTION"
	V1ContractListResponseDataInitialOverridesOverwriteRateRateTypeTiered       V1ContractListResponseDataInitialOverridesOverwriteRateRateType = "TIERED"
	V1ContractListResponseDataInitialOverridesOverwriteRateRateTypeCustom       V1ContractListResponseDataInitialOverridesOverwriteRateRateType = "CUSTOM"
)

func (V1ContractListResponseDataInitialOverridesOverwriteRateRateType) IsKnown

type V1ContractListResponseDataInitialOverridesOverwriteRateTier

type V1ContractListResponseDataInitialOverridesOverwriteRateTier struct {
	Price float64                                                         `json:"price,required"`
	Size  float64                                                         `json:"size"`
	JSON  v1ContractListResponseDataInitialOverridesOverwriteRateTierJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialOverridesOverwriteRateTier) UnmarshalJSON

type V1ContractListResponseDataInitialOverridesProduct

type V1ContractListResponseDataInitialOverridesProduct struct {
	ID   string                                                `json:"id,required" format:"uuid"`
	Name string                                                `json:"name,required"`
	JSON v1ContractListResponseDataInitialOverridesProductJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialOverridesProduct) UnmarshalJSON

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

type V1ContractListResponseDataInitialOverridesRateType

type V1ContractListResponseDataInitialOverridesRateType string
const (
	V1ContractListResponseDataInitialOverridesRateTypeFlat         V1ContractListResponseDataInitialOverridesRateType = "FLAT"
	V1ContractListResponseDataInitialOverridesRateTypePercentage   V1ContractListResponseDataInitialOverridesRateType = "PERCENTAGE"
	V1ContractListResponseDataInitialOverridesRateTypeSubscription V1ContractListResponseDataInitialOverridesRateType = "SUBSCRIPTION"
	V1ContractListResponseDataInitialOverridesRateTypeTiered       V1ContractListResponseDataInitialOverridesRateType = "TIERED"
	V1ContractListResponseDataInitialOverridesRateTypeCustom       V1ContractListResponseDataInitialOverridesRateType = "CUSTOM"
)

func (V1ContractListResponseDataInitialOverridesRateType) IsKnown

type V1ContractListResponseDataInitialOverridesTarget

type V1ContractListResponseDataInitialOverridesTarget string
const (
	V1ContractListResponseDataInitialOverridesTargetCommitRate V1ContractListResponseDataInitialOverridesTarget = "COMMIT_RATE"
	V1ContractListResponseDataInitialOverridesTargetListRate   V1ContractListResponseDataInitialOverridesTarget = "LIST_RATE"
)

func (V1ContractListResponseDataInitialOverridesTarget) IsKnown

type V1ContractListResponseDataInitialOverridesTier

type V1ContractListResponseDataInitialOverridesTier struct {
	Price float64                                            `json:"price,required"`
	Size  float64                                            `json:"size"`
	JSON  v1ContractListResponseDataInitialOverridesTierJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialOverridesTier) UnmarshalJSON

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

type V1ContractListResponseDataInitialOverridesType

type V1ContractListResponseDataInitialOverridesType string
const (
	V1ContractListResponseDataInitialOverridesTypeOverwrite  V1ContractListResponseDataInitialOverridesType = "OVERWRITE"
	V1ContractListResponseDataInitialOverridesTypeMultiplier V1ContractListResponseDataInitialOverridesType = "MULTIPLIER"
	V1ContractListResponseDataInitialOverridesTypeTiered     V1ContractListResponseDataInitialOverridesType = "TIERED"
)

func (V1ContractListResponseDataInitialOverridesType) IsKnown

type V1ContractListResponseDataInitialPrepaidBalanceThresholdConfiguration

type V1ContractListResponseDataInitialPrepaidBalanceThresholdConfiguration struct {
	Commit V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationCommit `json:"commit,required"`
	// When set to false, the contract will not be evaluated against the
	// threshold_amount. Toggling to true will result an immediate evaluation,
	// regardless of prior state.
	IsEnabled         bool                                                                                   `json:"is_enabled,required"`
	PaymentGateConfig V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfig `json:"payment_gate_config,required"`
	// Specify the amount the balance should be recharged to.
	RechargeToAmount float64 `json:"recharge_to_amount,required"`
	// Specify the threshold amount for the contract. Each time the contract's prepaid
	// balance lowers to this amount, a threshold charge will be initiated.
	ThresholdAmount float64                                                                   `json:"threshold_amount,required"`
	JSON            v1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialPrepaidBalanceThresholdConfiguration) UnmarshalJSON

type V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationCommit

type V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationCommit struct {
	// The commit product that will be used to generate the line item for commit
	// payment.
	ProductID string `json:"product_id,required"`
	// Which products the threshold commit applies to. If both applicable_product_ids
	// and applicable_product_tags are not provided, the commit applies to all
	// products.
	ApplicableProductIDs []string `json:"applicable_product_ids" format:"uuid"`
	// Which tags the threshold commit applies to. If both applicable_product_ids and
	// applicable_product_tags are not provided, the commit applies to all products.
	ApplicableProductTags []string `json:"applicable_product_tags"`
	Description           string   `json:"description"`
	// Specify the name of the line item for the threshold charge. If left blank, it
	// will default to the commit product name.
	Name string `json:"name"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown. This field cannot
	// be used together with `applicable_product_ids` or `applicable_product_tags`.
	Specifiers []V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationCommitSpecifier `json:"specifiers"`
	JSON       v1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationCommitJSON        `json:"-"`
}

func (*V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationCommit) UnmarshalJSON

type V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationCommitSpecifier

type V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationCommitSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                                                                 `json:"product_tags"`
	JSON        v1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationCommitSpecifierJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationCommitSpecifier) UnmarshalJSON

type V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfig

type V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfig struct {
	// Gate access to the commit balance based on successful collection of payment.
	// Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
	// facilitate payment using your own payment integration. Select NONE if you do not
	// wish to payment gate the commit balance.
	PaymentGateType V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType `json:"payment_gate_type,required"`
	// Only applicable if using Stripe as your payment gateway through Metronome.
	StripeConfig V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig `json:"stripe_config"`
	// Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
	// not wish Metronome to calculate tax on your behalf. Leaving this field blank
	// will default to NONE.
	TaxType V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType `json:"tax_type"`
	JSON    v1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigJSON    `json:"-"`
}

func (*V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfig) UnmarshalJSON

type V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType

type V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType string

Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance.

const (
	V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateTypeNone     V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType = "NONE"
	V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateTypeStripe   V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType = "STRIPE"
	V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateTypeExternal V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType = "EXTERNAL"
)

func (V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType) IsKnown

type V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig

type V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig struct {
	// If left blank, will default to INVOICE
	PaymentType V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType `json:"payment_type,required"`
	JSON        v1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigJSON        `json:"-"`
}

Only applicable if using Stripe as your payment gateway through Metronome.

func (*V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig) UnmarshalJSON

type V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType

type V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType string

If left blank, will default to INVOICE

const (
	V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypeInvoice       V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "INVOICE"
	V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypePaymentIntent V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "PAYMENT_INTENT"
)

func (V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType) IsKnown

type V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType

type V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType string

Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE.

const (
	V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxTypeNone   V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType = "NONE"
	V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxTypeStripe V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType = "STRIPE"
)

func (V1ContractListResponseDataInitialPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType) IsKnown

type V1ContractListResponseDataInitialProfessionalService

type V1ContractListResponseDataInitialProfessionalService struct {
	ID string `json:"id,required" format:"uuid"`
	// Maximum amount for the term.
	MaxAmount float64 `json:"max_amount,required"`
	ProductID string  `json:"product_id,required" format:"uuid"`
	// Quantity for the charge. Will be multiplied by unit_price to determine the
	// amount.
	Quantity float64 `json:"quantity,required"`
	// Unit price for the charge. Will be multiplied by quantity to determine the
	// amount and must be specified.
	UnitPrice    float64           `json:"unit_price,required"`
	CustomFields map[string]string `json:"custom_fields"`
	Description  string            `json:"description"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string                                                   `json:"netsuite_sales_order_id"`
	JSON                 v1ContractListResponseDataInitialProfessionalServiceJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialProfessionalService) UnmarshalJSON

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

type V1ContractListResponseDataInitialRecurringCommit

type V1ContractListResponseDataInitialRecurringCommit struct {
	ID string `json:"id,required" format:"uuid"`
	// The amount of commit to grant.
	AccessAmount V1ContractListResponseDataInitialRecurringCommitsAccessAmount `json:"access_amount,required"`
	// The amount of time the created commits will be valid for
	CommitDuration V1ContractListResponseDataInitialRecurringCommitsCommitDuration `json:"commit_duration,required"`
	// Will be passed down to the individual commits
	Priority float64                                                  `json:"priority,required"`
	Product  V1ContractListResponseDataInitialRecurringCommitsProduct `json:"product,required"`
	// Whether the created commits will use the commit rate or list rate
	RateType V1ContractListResponseDataInitialRecurringCommitsRateType `json:"rate_type,required"`
	// Determines the start time for the first commit
	StartingAt time.Time `json:"starting_at,required" format:"date-time"`
	// Will be passed down to the individual commits
	ApplicableProductIDs []string `json:"applicable_product_ids" format:"uuid"`
	// Will be passed down to the individual commits
	ApplicableProductTags []string                                                  `json:"applicable_product_tags"`
	Contract              V1ContractListResponseDataInitialRecurringCommitsContract `json:"contract"`
	// Will be passed down to the individual commits
	Description string `json:"description"`
	// Determines when the contract will stop creating recurring commits. Optional
	EndingBefore time.Time `json:"ending_before" format:"date-time"`
	// The amount the customer should be billed for the commit. Not required.
	InvoiceAmount V1ContractListResponseDataInitialRecurringCommitsInvoiceAmount `json:"invoice_amount"`
	// Displayed on invoices. Will be passed through to the individual commits
	Name string `json:"name"`
	// Will be passed down to the individual commits
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// Determines whether the first and last commit will be prorated. If not provided,
	// the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
	Proration V1ContractListResponseDataInitialRecurringCommitsProration `json:"proration"`
	// The frequency at which the recurring commits will be created. If not provided: -
	// The commits will be created on the usage invoice frequency. If provided: - The
	// period defined in the duration will correspond to this frequency. - Commits will
	// be created aligned with the recurring commit's starting_at rather than the usage
	// invoice dates.
	RecurrenceFrequency V1ContractListResponseDataInitialRecurringCommitsRecurrenceFrequency `json:"recurrence_frequency"`
	// Will be passed down to the individual commits. This controls how much of an
	// individual unexpired commit will roll over upon contract transition. Must be
	// between 0 and 1.
	RolloverFraction float64 `json:"rollover_fraction"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractListResponseDataInitialRecurringCommitsSpecifier `json:"specifiers"`
	JSON       v1ContractListResponseDataInitialRecurringCommitJSON         `json:"-"`
}

func (*V1ContractListResponseDataInitialRecurringCommit) UnmarshalJSON

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

type V1ContractListResponseDataInitialRecurringCommitsAccessAmount

type V1ContractListResponseDataInitialRecurringCommitsAccessAmount struct {
	CreditTypeID string                                                            `json:"credit_type_id,required" format:"uuid"`
	Quantity     float64                                                           `json:"quantity,required"`
	UnitPrice    float64                                                           `json:"unit_price,required"`
	JSON         v1ContractListResponseDataInitialRecurringCommitsAccessAmountJSON `json:"-"`
}

The amount of commit to grant.

func (*V1ContractListResponseDataInitialRecurringCommitsAccessAmount) UnmarshalJSON

type V1ContractListResponseDataInitialRecurringCommitsCommitDuration

type V1ContractListResponseDataInitialRecurringCommitsCommitDuration struct {
	Value float64                                                             `json:"value,required"`
	Unit  V1ContractListResponseDataInitialRecurringCommitsCommitDurationUnit `json:"unit"`
	JSON  v1ContractListResponseDataInitialRecurringCommitsCommitDurationJSON `json:"-"`
}

The amount of time the created commits will be valid for

func (*V1ContractListResponseDataInitialRecurringCommitsCommitDuration) UnmarshalJSON

type V1ContractListResponseDataInitialRecurringCommitsCommitDurationUnit

type V1ContractListResponseDataInitialRecurringCommitsCommitDurationUnit string
const (
	V1ContractListResponseDataInitialRecurringCommitsCommitDurationUnitPeriods V1ContractListResponseDataInitialRecurringCommitsCommitDurationUnit = "PERIODS"
)

func (V1ContractListResponseDataInitialRecurringCommitsCommitDurationUnit) IsKnown

type V1ContractListResponseDataInitialRecurringCommitsContract

type V1ContractListResponseDataInitialRecurringCommitsContract struct {
	ID   string                                                        `json:"id,required" format:"uuid"`
	JSON v1ContractListResponseDataInitialRecurringCommitsContractJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialRecurringCommitsContract) UnmarshalJSON

type V1ContractListResponseDataInitialRecurringCommitsInvoiceAmount

type V1ContractListResponseDataInitialRecurringCommitsInvoiceAmount struct {
	CreditTypeID string                                                             `json:"credit_type_id,required" format:"uuid"`
	Quantity     float64                                                            `json:"quantity,required"`
	UnitPrice    float64                                                            `json:"unit_price,required"`
	JSON         v1ContractListResponseDataInitialRecurringCommitsInvoiceAmountJSON `json:"-"`
}

The amount the customer should be billed for the commit. Not required.

func (*V1ContractListResponseDataInitialRecurringCommitsInvoiceAmount) UnmarshalJSON

type V1ContractListResponseDataInitialRecurringCommitsProduct

type V1ContractListResponseDataInitialRecurringCommitsProduct struct {
	ID   string                                                       `json:"id,required" format:"uuid"`
	Name string                                                       `json:"name,required"`
	JSON v1ContractListResponseDataInitialRecurringCommitsProductJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialRecurringCommitsProduct) UnmarshalJSON

type V1ContractListResponseDataInitialRecurringCommitsProration

type V1ContractListResponseDataInitialRecurringCommitsProration string

Determines whether the first and last commit will be prorated. If not provided, the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).

const (
	V1ContractListResponseDataInitialRecurringCommitsProrationNone         V1ContractListResponseDataInitialRecurringCommitsProration = "NONE"
	V1ContractListResponseDataInitialRecurringCommitsProrationFirst        V1ContractListResponseDataInitialRecurringCommitsProration = "FIRST"
	V1ContractListResponseDataInitialRecurringCommitsProrationLast         V1ContractListResponseDataInitialRecurringCommitsProration = "LAST"
	V1ContractListResponseDataInitialRecurringCommitsProrationFirstAndLast V1ContractListResponseDataInitialRecurringCommitsProration = "FIRST_AND_LAST"
)

func (V1ContractListResponseDataInitialRecurringCommitsProration) IsKnown

type V1ContractListResponseDataInitialRecurringCommitsRateType

type V1ContractListResponseDataInitialRecurringCommitsRateType string

Whether the created commits will use the commit rate or list rate

const (
	V1ContractListResponseDataInitialRecurringCommitsRateTypeCommitRate V1ContractListResponseDataInitialRecurringCommitsRateType = "COMMIT_RATE"
	V1ContractListResponseDataInitialRecurringCommitsRateTypeListRate   V1ContractListResponseDataInitialRecurringCommitsRateType = "LIST_RATE"
)

func (V1ContractListResponseDataInitialRecurringCommitsRateType) IsKnown

type V1ContractListResponseDataInitialRecurringCommitsRecurrenceFrequency

type V1ContractListResponseDataInitialRecurringCommitsRecurrenceFrequency string

The frequency at which the recurring commits will be created. If not provided: - The commits will be created on the usage invoice frequency. If provided: - The period defined in the duration will correspond to this frequency. - Commits will be created aligned with the recurring commit's starting_at rather than the usage invoice dates.

const (
	V1ContractListResponseDataInitialRecurringCommitsRecurrenceFrequencyMonthly   V1ContractListResponseDataInitialRecurringCommitsRecurrenceFrequency = "MONTHLY"
	V1ContractListResponseDataInitialRecurringCommitsRecurrenceFrequencyQuarterly V1ContractListResponseDataInitialRecurringCommitsRecurrenceFrequency = "QUARTERLY"
	V1ContractListResponseDataInitialRecurringCommitsRecurrenceFrequencyAnnual    V1ContractListResponseDataInitialRecurringCommitsRecurrenceFrequency = "ANNUAL"
	V1ContractListResponseDataInitialRecurringCommitsRecurrenceFrequencyWeekly    V1ContractListResponseDataInitialRecurringCommitsRecurrenceFrequency = "WEEKLY"
)

func (V1ContractListResponseDataInitialRecurringCommitsRecurrenceFrequency) IsKnown

type V1ContractListResponseDataInitialRecurringCommitsSpecifier

type V1ContractListResponseDataInitialRecurringCommitsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                                       `json:"product_tags"`
	JSON        v1ContractListResponseDataInitialRecurringCommitsSpecifierJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialRecurringCommitsSpecifier) UnmarshalJSON

type V1ContractListResponseDataInitialRecurringCredit

type V1ContractListResponseDataInitialRecurringCredit struct {
	ID string `json:"id,required" format:"uuid"`
	// The amount of commit to grant.
	AccessAmount V1ContractListResponseDataInitialRecurringCreditsAccessAmount `json:"access_amount,required"`
	// The amount of time the created commits will be valid for
	CommitDuration V1ContractListResponseDataInitialRecurringCreditsCommitDuration `json:"commit_duration,required"`
	// Will be passed down to the individual commits
	Priority float64                                                  `json:"priority,required"`
	Product  V1ContractListResponseDataInitialRecurringCreditsProduct `json:"product,required"`
	// Whether the created commits will use the commit rate or list rate
	RateType V1ContractListResponseDataInitialRecurringCreditsRateType `json:"rate_type,required"`
	// Determines the start time for the first commit
	StartingAt time.Time `json:"starting_at,required" format:"date-time"`
	// Will be passed down to the individual commits
	ApplicableProductIDs []string `json:"applicable_product_ids" format:"uuid"`
	// Will be passed down to the individual commits
	ApplicableProductTags []string                                                  `json:"applicable_product_tags"`
	Contract              V1ContractListResponseDataInitialRecurringCreditsContract `json:"contract"`
	// Will be passed down to the individual commits
	Description string `json:"description"`
	// Determines when the contract will stop creating recurring commits. Optional
	EndingBefore time.Time `json:"ending_before" format:"date-time"`
	// Displayed on invoices. Will be passed through to the individual commits
	Name string `json:"name"`
	// Will be passed down to the individual commits
	NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
	// Determines whether the first and last commit will be prorated. If not provided,
	// the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
	Proration V1ContractListResponseDataInitialRecurringCreditsProration `json:"proration"`
	// The frequency at which the recurring commits will be created. If not provided: -
	// The commits will be created on the usage invoice frequency. If provided: - The
	// period defined in the duration will correspond to this frequency. - Commits will
	// be created aligned with the recurring commit's starting_at rather than the usage
	// invoice dates.
	RecurrenceFrequency V1ContractListResponseDataInitialRecurringCreditsRecurrenceFrequency `json:"recurrence_frequency"`
	// Will be passed down to the individual commits. This controls how much of an
	// individual unexpired commit will roll over upon contract transition. Must be
	// between 0 and 1.
	RolloverFraction float64 `json:"rollover_fraction"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown.
	Specifiers []V1ContractListResponseDataInitialRecurringCreditsSpecifier `json:"specifiers"`
	JSON       v1ContractListResponseDataInitialRecurringCreditJSON         `json:"-"`
}

func (*V1ContractListResponseDataInitialRecurringCredit) UnmarshalJSON

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

type V1ContractListResponseDataInitialRecurringCreditsAccessAmount

type V1ContractListResponseDataInitialRecurringCreditsAccessAmount struct {
	CreditTypeID string                                                            `json:"credit_type_id,required" format:"uuid"`
	Quantity     float64                                                           `json:"quantity,required"`
	UnitPrice    float64                                                           `json:"unit_price,required"`
	JSON         v1ContractListResponseDataInitialRecurringCreditsAccessAmountJSON `json:"-"`
}

The amount of commit to grant.

func (*V1ContractListResponseDataInitialRecurringCreditsAccessAmount) UnmarshalJSON

type V1ContractListResponseDataInitialRecurringCreditsCommitDuration

type V1ContractListResponseDataInitialRecurringCreditsCommitDuration struct {
	Value float64                                                             `json:"value,required"`
	Unit  V1ContractListResponseDataInitialRecurringCreditsCommitDurationUnit `json:"unit"`
	JSON  v1ContractListResponseDataInitialRecurringCreditsCommitDurationJSON `json:"-"`
}

The amount of time the created commits will be valid for

func (*V1ContractListResponseDataInitialRecurringCreditsCommitDuration) UnmarshalJSON

type V1ContractListResponseDataInitialRecurringCreditsCommitDurationUnit

type V1ContractListResponseDataInitialRecurringCreditsCommitDurationUnit string
const (
	V1ContractListResponseDataInitialRecurringCreditsCommitDurationUnitPeriods V1ContractListResponseDataInitialRecurringCreditsCommitDurationUnit = "PERIODS"
)

func (V1ContractListResponseDataInitialRecurringCreditsCommitDurationUnit) IsKnown

type V1ContractListResponseDataInitialRecurringCreditsContract

type V1ContractListResponseDataInitialRecurringCreditsContract struct {
	ID   string                                                        `json:"id,required" format:"uuid"`
	JSON v1ContractListResponseDataInitialRecurringCreditsContractJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialRecurringCreditsContract) UnmarshalJSON

type V1ContractListResponseDataInitialRecurringCreditsProduct

type V1ContractListResponseDataInitialRecurringCreditsProduct struct {
	ID   string                                                       `json:"id,required" format:"uuid"`
	Name string                                                       `json:"name,required"`
	JSON v1ContractListResponseDataInitialRecurringCreditsProductJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialRecurringCreditsProduct) UnmarshalJSON

type V1ContractListResponseDataInitialRecurringCreditsProration

type V1ContractListResponseDataInitialRecurringCreditsProration string

Determines whether the first and last commit will be prorated. If not provided, the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).

const (
	V1ContractListResponseDataInitialRecurringCreditsProrationNone         V1ContractListResponseDataInitialRecurringCreditsProration = "NONE"
	V1ContractListResponseDataInitialRecurringCreditsProrationFirst        V1ContractListResponseDataInitialRecurringCreditsProration = "FIRST"
	V1ContractListResponseDataInitialRecurringCreditsProrationLast         V1ContractListResponseDataInitialRecurringCreditsProration = "LAST"
	V1ContractListResponseDataInitialRecurringCreditsProrationFirstAndLast V1ContractListResponseDataInitialRecurringCreditsProration = "FIRST_AND_LAST"
)

func (V1ContractListResponseDataInitialRecurringCreditsProration) IsKnown

type V1ContractListResponseDataInitialRecurringCreditsRateType

type V1ContractListResponseDataInitialRecurringCreditsRateType string

Whether the created commits will use the commit rate or list rate

const (
	V1ContractListResponseDataInitialRecurringCreditsRateTypeCommitRate V1ContractListResponseDataInitialRecurringCreditsRateType = "COMMIT_RATE"
	V1ContractListResponseDataInitialRecurringCreditsRateTypeListRate   V1ContractListResponseDataInitialRecurringCreditsRateType = "LIST_RATE"
)

func (V1ContractListResponseDataInitialRecurringCreditsRateType) IsKnown

type V1ContractListResponseDataInitialRecurringCreditsRecurrenceFrequency

type V1ContractListResponseDataInitialRecurringCreditsRecurrenceFrequency string

The frequency at which the recurring commits will be created. If not provided: - The commits will be created on the usage invoice frequency. If provided: - The period defined in the duration will correspond to this frequency. - Commits will be created aligned with the recurring commit's starting_at rather than the usage invoice dates.

const (
	V1ContractListResponseDataInitialRecurringCreditsRecurrenceFrequencyMonthly   V1ContractListResponseDataInitialRecurringCreditsRecurrenceFrequency = "MONTHLY"
	V1ContractListResponseDataInitialRecurringCreditsRecurrenceFrequencyQuarterly V1ContractListResponseDataInitialRecurringCreditsRecurrenceFrequency = "QUARTERLY"
	V1ContractListResponseDataInitialRecurringCreditsRecurrenceFrequencyAnnual    V1ContractListResponseDataInitialRecurringCreditsRecurrenceFrequency = "ANNUAL"
	V1ContractListResponseDataInitialRecurringCreditsRecurrenceFrequencyWeekly    V1ContractListResponseDataInitialRecurringCreditsRecurrenceFrequency = "WEEKLY"
)

func (V1ContractListResponseDataInitialRecurringCreditsRecurrenceFrequency) IsKnown

type V1ContractListResponseDataInitialRecurringCreditsSpecifier

type V1ContractListResponseDataInitialRecurringCreditsSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                                       `json:"product_tags"`
	JSON        v1ContractListResponseDataInitialRecurringCreditsSpecifierJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialRecurringCreditsSpecifier) UnmarshalJSON

type V1ContractListResponseDataInitialResellerRoyaltiesResellerType

type V1ContractListResponseDataInitialResellerRoyaltiesResellerType string
const (
	V1ContractListResponseDataInitialResellerRoyaltiesResellerTypeAws           V1ContractListResponseDataInitialResellerRoyaltiesResellerType = "AWS"
	V1ContractListResponseDataInitialResellerRoyaltiesResellerTypeAwsProService V1ContractListResponseDataInitialResellerRoyaltiesResellerType = "AWS_PRO_SERVICE"
	V1ContractListResponseDataInitialResellerRoyaltiesResellerTypeGcp           V1ContractListResponseDataInitialResellerRoyaltiesResellerType = "GCP"
	V1ContractListResponseDataInitialResellerRoyaltiesResellerTypeGcpProService V1ContractListResponseDataInitialResellerRoyaltiesResellerType = "GCP_PRO_SERVICE"
)

func (V1ContractListResponseDataInitialResellerRoyaltiesResellerType) IsKnown

type V1ContractListResponseDataInitialResellerRoyalty

type V1ContractListResponseDataInitialResellerRoyalty struct {
	Fraction              float64                                                        `json:"fraction,required"`
	NetsuiteResellerID    string                                                         `json:"netsuite_reseller_id,required"`
	ResellerType          V1ContractListResponseDataInitialResellerRoyaltiesResellerType `json:"reseller_type,required"`
	StartingAt            time.Time                                                      `json:"starting_at,required" format:"date-time"`
	ApplicableProductIDs  []string                                                       `json:"applicable_product_ids"`
	ApplicableProductTags []string                                                       `json:"applicable_product_tags"`
	AwsAccountNumber      string                                                         `json:"aws_account_number"`
	AwsOfferID            string                                                         `json:"aws_offer_id"`
	AwsPayerReferenceID   string                                                         `json:"aws_payer_reference_id"`
	EndingBefore          time.Time                                                      `json:"ending_before" format:"date-time"`
	GcpAccountID          string                                                         `json:"gcp_account_id"`
	GcpOfferID            string                                                         `json:"gcp_offer_id"`
	ResellerContractValue float64                                                        `json:"reseller_contract_value"`
	JSON                  v1ContractListResponseDataInitialResellerRoyaltyJSON           `json:"-"`
}

func (*V1ContractListResponseDataInitialResellerRoyalty) UnmarshalJSON

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

type V1ContractListResponseDataInitialScheduledCharge

type V1ContractListResponseDataInitialScheduledCharge struct {
	ID           string                                                    `json:"id,required" format:"uuid"`
	Product      V1ContractListResponseDataInitialScheduledChargesProduct  `json:"product,required"`
	Schedule     V1ContractListResponseDataInitialScheduledChargesSchedule `json:"schedule,required"`
	ArchivedAt   time.Time                                                 `json:"archived_at" format:"date-time"`
	CustomFields map[string]string                                         `json:"custom_fields"`
	// displayed on invoices
	Name string `json:"name"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string                                               `json:"netsuite_sales_order_id"`
	JSON                 v1ContractListResponseDataInitialScheduledChargeJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialScheduledCharge) UnmarshalJSON

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

type V1ContractListResponseDataInitialScheduledChargesOnUsageInvoices

type V1ContractListResponseDataInitialScheduledChargesOnUsageInvoices string

Determines which scheduled and commit charges to consolidate onto the Contract's usage invoice. The charge's `timestamp` must match the usage invoice's `ending_before` date for consolidation to occur. This field cannot be modified after a Contract has been created. If this field is omitted, charges will appear on a separate invoice from usage charges.

const (
	V1ContractListResponseDataInitialScheduledChargesOnUsageInvoicesAll V1ContractListResponseDataInitialScheduledChargesOnUsageInvoices = "ALL"
)

func (V1ContractListResponseDataInitialScheduledChargesOnUsageInvoices) IsKnown

type V1ContractListResponseDataInitialScheduledChargesProduct

type V1ContractListResponseDataInitialScheduledChargesProduct struct {
	ID   string                                                       `json:"id,required" format:"uuid"`
	Name string                                                       `json:"name,required"`
	JSON v1ContractListResponseDataInitialScheduledChargesProductJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialScheduledChargesProduct) UnmarshalJSON

type V1ContractListResponseDataInitialScheduledChargesSchedule

type V1ContractListResponseDataInitialScheduledChargesSchedule struct {
	CreditType    V1ContractListResponseDataInitialScheduledChargesScheduleCreditType     `json:"credit_type"`
	ScheduleItems []V1ContractListResponseDataInitialScheduledChargesScheduleScheduleItem `json:"schedule_items"`
	JSON          v1ContractListResponseDataInitialScheduledChargesScheduleJSON           `json:"-"`
}

func (*V1ContractListResponseDataInitialScheduledChargesSchedule) UnmarshalJSON

type V1ContractListResponseDataInitialScheduledChargesScheduleCreditType

type V1ContractListResponseDataInitialScheduledChargesScheduleCreditType struct {
	ID   string                                                                  `json:"id,required" format:"uuid"`
	Name string                                                                  `json:"name,required"`
	JSON v1ContractListResponseDataInitialScheduledChargesScheduleCreditTypeJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialScheduledChargesScheduleCreditType) UnmarshalJSON

type V1ContractListResponseDataInitialScheduledChargesScheduleScheduleItem

type V1ContractListResponseDataInitialScheduledChargesScheduleScheduleItem struct {
	ID        string                                                                    `json:"id,required" format:"uuid"`
	Amount    float64                                                                   `json:"amount,required"`
	InvoiceID string                                                                    `json:"invoice_id,required" format:"uuid"`
	Quantity  float64                                                                   `json:"quantity,required"`
	Timestamp time.Time                                                                 `json:"timestamp,required" format:"date-time"`
	UnitPrice float64                                                                   `json:"unit_price,required"`
	JSON      v1ContractListResponseDataInitialScheduledChargesScheduleScheduleItemJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialScheduledChargesScheduleScheduleItem) UnmarshalJSON

type V1ContractListResponseDataInitialSpendThresholdConfiguration

type V1ContractListResponseDataInitialSpendThresholdConfiguration struct {
	Commit V1ContractListResponseDataInitialSpendThresholdConfigurationCommit `json:"commit,required"`
	// When set to false, the contract will not be evaluated against the
	// threshold_amount. Toggling to true will result an immediate evaluation,
	// regardless of prior state.
	IsEnabled         bool                                                                          `json:"is_enabled,required"`
	PaymentGateConfig V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfig `json:"payment_gate_config,required"`
	// Specify the threshold amount for the contract. Each time the contract's usage
	// hits this amount, a threshold charge will be initiated.
	ThresholdAmount float64                                                          `json:"threshold_amount,required"`
	JSON            v1ContractListResponseDataInitialSpendThresholdConfigurationJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialSpendThresholdConfiguration) UnmarshalJSON

type V1ContractListResponseDataInitialSpendThresholdConfigurationCommit

type V1ContractListResponseDataInitialSpendThresholdConfigurationCommit struct {
	// The commit product that will be used to generate the line item for commit
	// payment.
	ProductID   string `json:"product_id,required"`
	Description string `json:"description"`
	// Specify the name of the line item for the threshold charge. If left blank, it
	// will default to the commit product name.
	Name string                                                                 `json:"name"`
	JSON v1ContractListResponseDataInitialSpendThresholdConfigurationCommitJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialSpendThresholdConfigurationCommit) UnmarshalJSON

type V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfig

type V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfig struct {
	// Gate access to the commit balance based on successful collection of payment.
	// Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
	// facilitate payment using your own payment integration. Select NONE if you do not
	// wish to payment gate the commit balance.
	PaymentGateType V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateType `json:"payment_gate_type,required"`
	// Only applicable if using Stripe as your payment gateway through Metronome.
	StripeConfig V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfig `json:"stripe_config"`
	// Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
	// not wish Metronome to calculate tax on your behalf. Leaving this field blank
	// will default to NONE.
	TaxType V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigTaxType `json:"tax_type"`
	JSON    v1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigJSON    `json:"-"`
}

func (*V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfig) UnmarshalJSON

type V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateType

type V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateType string

Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance.

const (
	V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateTypeNone     V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateType = "NONE"
	V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateTypeStripe   V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateType = "STRIPE"
	V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateTypeExternal V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateType = "EXTERNAL"
)

func (V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigPaymentGateType) IsKnown

type V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfig

type V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfig struct {
	// If left blank, will default to INVOICE
	PaymentType V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType `json:"payment_type,required"`
	JSON        v1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfigJSON        `json:"-"`
}

Only applicable if using Stripe as your payment gateway through Metronome.

func (*V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfig) UnmarshalJSON

type V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType

type V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType string

If left blank, will default to INVOICE

const (
	V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypeInvoice       V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "INVOICE"
	V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypePaymentIntent V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "PAYMENT_INTENT"
)

func (V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType) IsKnown

type V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigTaxType

type V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigTaxType string

Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE.

const (
	V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigTaxTypeNone   V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigTaxType = "NONE"
	V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigTaxTypeStripe V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigTaxType = "STRIPE"
)

func (V1ContractListResponseDataInitialSpendThresholdConfigurationPaymentGateConfigTaxType) IsKnown

type V1ContractListResponseDataInitialTransition

type V1ContractListResponseDataInitialTransition struct {
	FromContractID string                                           `json:"from_contract_id,required" format:"uuid"`
	ToContractID   string                                           `json:"to_contract_id,required" format:"uuid"`
	Type           V1ContractListResponseDataInitialTransitionsType `json:"type,required"`
	JSON           v1ContractListResponseDataInitialTransitionJSON  `json:"-"`
}

func (*V1ContractListResponseDataInitialTransition) UnmarshalJSON

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

type V1ContractListResponseDataInitialTransitionsType

type V1ContractListResponseDataInitialTransitionsType string
const (
	V1ContractListResponseDataInitialTransitionsTypeSupersede V1ContractListResponseDataInitialTransitionsType = "SUPERSEDE"
	V1ContractListResponseDataInitialTransitionsTypeRenewal   V1ContractListResponseDataInitialTransitionsType = "RENEWAL"
)

func (V1ContractListResponseDataInitialTransitionsType) IsKnown

type V1ContractListResponseDataInitialUsageFilter

type V1ContractListResponseDataInitialUsageFilter struct {
	Current V1ContractListResponseDataInitialUsageFilterCurrent  `json:"current,required,nullable"`
	Initial V1ContractListResponseDataInitialUsageFilterInitial  `json:"initial,required"`
	Updates []V1ContractListResponseDataInitialUsageFilterUpdate `json:"updates,required"`
	JSON    v1ContractListResponseDataInitialUsageFilterJSON     `json:"-"`
}

func (*V1ContractListResponseDataInitialUsageFilter) UnmarshalJSON

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

type V1ContractListResponseDataInitialUsageFilterCurrent

type V1ContractListResponseDataInitialUsageFilterCurrent struct {
	GroupKey    string                                                  `json:"group_key,required"`
	GroupValues []string                                                `json:"group_values,required"`
	StartingAt  time.Time                                               `json:"starting_at" format:"date-time"`
	JSON        v1ContractListResponseDataInitialUsageFilterCurrentJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialUsageFilterCurrent) UnmarshalJSON

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

type V1ContractListResponseDataInitialUsageFilterInitial

type V1ContractListResponseDataInitialUsageFilterInitial struct {
	GroupKey    string                                                  `json:"group_key,required"`
	GroupValues []string                                                `json:"group_values,required"`
	StartingAt  time.Time                                               `json:"starting_at" format:"date-time"`
	JSON        v1ContractListResponseDataInitialUsageFilterInitialJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialUsageFilterInitial) UnmarshalJSON

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

type V1ContractListResponseDataInitialUsageFilterUpdate

type V1ContractListResponseDataInitialUsageFilterUpdate struct {
	GroupKey    string                                                 `json:"group_key,required"`
	GroupValues []string                                               `json:"group_values,required"`
	StartingAt  time.Time                                              `json:"starting_at,required" format:"date-time"`
	JSON        v1ContractListResponseDataInitialUsageFilterUpdateJSON `json:"-"`
}

func (*V1ContractListResponseDataInitialUsageFilterUpdate) UnmarshalJSON

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

type V1ContractListResponseDataInitialUsageStatementSchedule

type V1ContractListResponseDataInitialUsageStatementSchedule struct {
	// Contract usage statements follow a selected cadence based on this date.
	BillingAnchorDate time.Time                                                        `json:"billing_anchor_date,required" format:"date-time"`
	Frequency         V1ContractListResponseDataInitialUsageStatementScheduleFrequency `json:"frequency,required"`
	JSON              v1ContractListResponseDataInitialUsageStatementScheduleJSON      `json:"-"`
}

func (*V1ContractListResponseDataInitialUsageStatementSchedule) UnmarshalJSON

type V1ContractListResponseDataInitialUsageStatementScheduleFrequency

type V1ContractListResponseDataInitialUsageStatementScheduleFrequency string
const (
	V1ContractListResponseDataInitialUsageStatementScheduleFrequencyMonthly   V1ContractListResponseDataInitialUsageStatementScheduleFrequency = "MONTHLY"
	V1ContractListResponseDataInitialUsageStatementScheduleFrequencyQuarterly V1ContractListResponseDataInitialUsageStatementScheduleFrequency = "QUARTERLY"
	V1ContractListResponseDataInitialUsageStatementScheduleFrequencyAnnual    V1ContractListResponseDataInitialUsageStatementScheduleFrequency = "ANNUAL"
	V1ContractListResponseDataInitialUsageStatementScheduleFrequencyWeekly    V1ContractListResponseDataInitialUsageStatementScheduleFrequency = "WEEKLY"
)

func (V1ContractListResponseDataInitialUsageStatementScheduleFrequency) IsKnown

type V1ContractListResponseDataPrepaidBalanceThresholdConfiguration

type V1ContractListResponseDataPrepaidBalanceThresholdConfiguration struct {
	Commit V1ContractListResponseDataPrepaidBalanceThresholdConfigurationCommit `json:"commit,required"`
	// When set to false, the contract will not be evaluated against the
	// threshold_amount. Toggling to true will result an immediate evaluation,
	// regardless of prior state.
	IsEnabled         bool                                                                            `json:"is_enabled,required"`
	PaymentGateConfig V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfig `json:"payment_gate_config,required"`
	// Specify the amount the balance should be recharged to.
	RechargeToAmount float64 `json:"recharge_to_amount,required"`
	// Specify the threshold amount for the contract. Each time the contract's prepaid
	// balance lowers to this amount, a threshold charge will be initiated.
	ThresholdAmount float64                                                            `json:"threshold_amount,required"`
	JSON            v1ContractListResponseDataPrepaidBalanceThresholdConfigurationJSON `json:"-"`
}

func (*V1ContractListResponseDataPrepaidBalanceThresholdConfiguration) UnmarshalJSON

type V1ContractListResponseDataPrepaidBalanceThresholdConfigurationCommit

type V1ContractListResponseDataPrepaidBalanceThresholdConfigurationCommit struct {
	// The commit product that will be used to generate the line item for commit
	// payment.
	ProductID string `json:"product_id,required"`
	// Which products the threshold commit applies to. If both applicable_product_ids
	// and applicable_product_tags are not provided, the commit applies to all
	// products.
	ApplicableProductIDs []string `json:"applicable_product_ids" format:"uuid"`
	// Which tags the threshold commit applies to. If both applicable_product_ids and
	// applicable_product_tags are not provided, the commit applies to all products.
	ApplicableProductTags []string `json:"applicable_product_tags"`
	Description           string   `json:"description"`
	// Specify the name of the line item for the threshold charge. If left blank, it
	// will default to the commit product name.
	Name string `json:"name"`
	// List of filters that determine what kind of customer usage draws down a commit
	// or credit. A customer's usage needs to meet the condition of at least one of the
	// specifiers to contribute to a commit's or credit's drawdown. This field cannot
	// be used together with `applicable_product_ids` or `applicable_product_tags`.
	Specifiers []V1ContractListResponseDataPrepaidBalanceThresholdConfigurationCommitSpecifier `json:"specifiers"`
	JSON       v1ContractListResponseDataPrepaidBalanceThresholdConfigurationCommitJSON        `json:"-"`
}

func (*V1ContractListResponseDataPrepaidBalanceThresholdConfigurationCommit) UnmarshalJSON

type V1ContractListResponseDataPrepaidBalanceThresholdConfigurationCommitSpecifier

type V1ContractListResponseDataPrepaidBalanceThresholdConfigurationCommitSpecifier struct {
	PresentationGroupValues map[string]string `json:"presentation_group_values"`
	PricingGroupValues      map[string]string `json:"pricing_group_values"`
	// If provided, the specifier will only apply to the product with the specified ID.
	ProductID string `json:"product_id" format:"uuid"`
	// If provided, the specifier will only apply to products with all the specified
	// tags.
	ProductTags []string                                                                          `json:"product_tags"`
	JSON        v1ContractListResponseDataPrepaidBalanceThresholdConfigurationCommitSpecifierJSON `json:"-"`
}

func (*V1ContractListResponseDataPrepaidBalanceThresholdConfigurationCommitSpecifier) UnmarshalJSON

type V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfig

type V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfig struct {
	// Gate access to the commit balance based on successful collection of payment.
	// Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
	// facilitate payment using your own payment integration. Select NONE if you do not
	// wish to payment gate the commit balance.
	PaymentGateType V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType `json:"payment_gate_type,required"`
	// Only applicable if using Stripe as your payment gateway through Metronome.
	StripeConfig V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig `json:"stripe_config"`
	// Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
	// not wish Metronome to calculate tax on your behalf. Leaving this field blank
	// will default to NONE.
	TaxType V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType `json:"tax_type"`
	JSON    v1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigJSON    `json:"-"`
}

func (*V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfig) UnmarshalJSON

type V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType

type V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType string

Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance.

const (
	V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateTypeNone     V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType = "NONE"
	V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateTypeStripe   V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType = "STRIPE"
	V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateTypeExternal V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType = "EXTERNAL"
)

func (V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigPaymentGateType) IsKnown

type V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig

type V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig struct {
	// If left blank, will default to INVOICE
	PaymentType V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType `json:"payment_type,required"`
	JSON        v1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigJSON        `json:"-"`
}

Only applicable if using Stripe as your payment gateway through Metronome.

func (*V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfig) UnmarshalJSON

type V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType

type V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType string

If left blank, will default to INVOICE

const (
	V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypeInvoice       V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "INVOICE"
	V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypePaymentIntent V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "PAYMENT_INTENT"
)

func (V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigStripeConfigPaymentType) IsKnown

type V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType

type V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType string

Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE.

const (
	V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxTypeNone   V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType = "NONE"
	V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxTypeStripe V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType = "STRIPE"
)

func (V1ContractListResponseDataPrepaidBalanceThresholdConfigurationPaymentGateConfigTaxType) IsKnown

type V1ContractListResponseDataScheduledChargesOnUsageInvoices

type V1ContractListResponseDataScheduledChargesOnUsageInvoices string

Determines which scheduled and commit charges to consolidate onto the Contract's usage invoice. The charge's `timestamp` must match the usage invoice's `ending_before` date for consolidation to occur. This field cannot be modified after a Contract has been created. If this field is omitted, charges will appear on a separate invoice from usage charges.

const (
	V1ContractListResponseDataScheduledChargesOnUsageInvoicesAll V1ContractListResponseDataScheduledChargesOnUsageInvoices = "ALL"
)

func (V1ContractListResponseDataScheduledChargesOnUsageInvoices) IsKnown

type V1ContractListResponseDataSpendThresholdConfiguration

type V1ContractListResponseDataSpendThresholdConfiguration struct {
	Commit V1ContractListResponseDataSpendThresholdConfigurationCommit `json:"commit,required"`
	// When set to false, the contract will not be evaluated against the
	// threshold_amount. Toggling to true will result an immediate evaluation,
	// regardless of prior state.
	IsEnabled         bool                                                                   `json:"is_enabled,required"`
	PaymentGateConfig V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfig `json:"payment_gate_config,required"`
	// Specify the threshold amount for the contract. Each time the contract's usage
	// hits this amount, a threshold charge will be initiated.
	ThresholdAmount float64                                                   `json:"threshold_amount,required"`
	JSON            v1ContractListResponseDataSpendThresholdConfigurationJSON `json:"-"`
}

func (*V1ContractListResponseDataSpendThresholdConfiguration) UnmarshalJSON

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

type V1ContractListResponseDataSpendThresholdConfigurationCommit

type V1ContractListResponseDataSpendThresholdConfigurationCommit struct {
	// The commit product that will be used to generate the line item for commit
	// payment.
	ProductID   string `json:"product_id,required"`
	Description string `json:"description"`
	// Specify the name of the line item for the threshold charge. If left blank, it
	// will default to the commit product name.
	Name string                                                          `json:"name"`
	JSON v1ContractListResponseDataSpendThresholdConfigurationCommitJSON `json:"-"`
}

func (*V1ContractListResponseDataSpendThresholdConfigurationCommit) UnmarshalJSON

type V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfig

type V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfig struct {
	// Gate access to the commit balance based on successful collection of payment.
	// Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
	// facilitate payment using your own payment integration. Select NONE if you do not
	// wish to payment gate the commit balance.
	PaymentGateType V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateType `json:"payment_gate_type,required"`
	// Only applicable if using Stripe as your payment gateway through Metronome.
	StripeConfig V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfig `json:"stripe_config"`
	// Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
	// not wish Metronome to calculate tax on your behalf. Leaving this field blank
	// will default to NONE.
	TaxType V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigTaxType `json:"tax_type"`
	JSON    v1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigJSON    `json:"-"`
}

func (*V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfig) UnmarshalJSON

type V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateType

type V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateType string

Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance.

const (
	V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateTypeNone     V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateType = "NONE"
	V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateTypeStripe   V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateType = "STRIPE"
	V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateTypeExternal V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateType = "EXTERNAL"
)

func (V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigPaymentGateType) IsKnown

type V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfig

type V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfig struct {
	// If left blank, will default to INVOICE
	PaymentType V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType `json:"payment_type,required"`
	JSON        v1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfigJSON        `json:"-"`
}

Only applicable if using Stripe as your payment gateway through Metronome.

func (*V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfig) UnmarshalJSON

type V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType

type V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType string

If left blank, will default to INVOICE

const (
	V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypeInvoice       V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "INVOICE"
	V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentTypePaymentIntent V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType = "PAYMENT_INTENT"
)

func (V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigStripeConfigPaymentType) IsKnown

type V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigTaxType

type V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigTaxType string

Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE.

const (
	V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigTaxTypeNone   V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigTaxType = "NONE"
	V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigTaxTypeStripe V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigTaxType = "STRIPE"
)

func (V1ContractListResponseDataSpendThresholdConfigurationPaymentGateConfigTaxType) IsKnown

type V1ContractListResponseDataSubscription

type V1ContractListResponseDataSubscription struct {
	CollectionSchedule V1ContractListResponseDataSubscriptionsCollectionSchedule `json:"collection_schedule,required"`
	Proration          V1ContractListResponseDataSubscriptionsProration          `json:"proration,required"`
	QuantitySchedule   []V1ContractListResponseDataSubscriptionsQuantitySchedule `json:"quantity_schedule,required"`
	StartingAt         time.Time                                                 `json:"starting_at,required" format:"date-time"`
	SubscriptionRate   V1ContractListResponseDataSubscriptionsSubscriptionRate   `json:"subscription_rate,required"`
	ID                 string                                                    `json:"id" format:"uuid"`
	CustomFields       map[string]string                                         `json:"custom_fields"`
	Description        string                                                    `json:"description"`
	EndingBefore       time.Time                                                 `json:"ending_before" format:"date-time"`
	FiatCreditTypeID   string                                                    `json:"fiat_credit_type_id" format:"uuid"`
	Name               string                                                    `json:"name"`
	JSON               v1ContractListResponseDataSubscriptionJSON                `json:"-"`
}

func (*V1ContractListResponseDataSubscription) UnmarshalJSON

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

type V1ContractListResponseDataSubscriptionsCollectionSchedule

type V1ContractListResponseDataSubscriptionsCollectionSchedule string
const (
	V1ContractListResponseDataSubscriptionsCollectionScheduleAdvance V1ContractListResponseDataSubscriptionsCollectionSchedule = "ADVANCE"
	V1ContractListResponseDataSubscriptionsCollectionScheduleArrears V1ContractListResponseDataSubscriptionsCollectionSchedule = "ARREARS"
)

func (V1ContractListResponseDataSubscriptionsCollectionSchedule) IsKnown

type V1ContractListResponseDataSubscriptionsProration

type V1ContractListResponseDataSubscriptionsProration struct {
	InvoiceBehavior V1ContractListResponseDataSubscriptionsProrationInvoiceBehavior `json:"invoice_behavior,required"`
	IsProrated      bool                                                            `json:"is_prorated,required"`
	JSON            v1ContractListResponseDataSubscriptionsProrationJSON            `json:"-"`
}

func (*V1ContractListResponseDataSubscriptionsProration) UnmarshalJSON

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

type V1ContractListResponseDataSubscriptionsProrationInvoiceBehavior

type V1ContractListResponseDataSubscriptionsProrationInvoiceBehavior string
const (
	V1ContractListResponseDataSubscriptionsProrationInvoiceBehaviorBillImmediately          V1ContractListResponseDataSubscriptionsProrationInvoiceBehavior = "BILL_IMMEDIATELY"
	V1ContractListResponseDataSubscriptionsProrationInvoiceBehaviorBillOnNextCollectionDate V1ContractListResponseDataSubscriptionsProrationInvoiceBehavior = "BILL_ON_NEXT_COLLECTION_DATE"
)

func (V1ContractListResponseDataSubscriptionsProrationInvoiceBehavior) IsKnown

type V1ContractListResponseDataSubscriptionsQuantitySchedule

type V1ContractListResponseDataSubscriptionsQuantitySchedule struct {
	Quantity     float64                                                     `json:"quantity,required"`
	StartingAt   time.Time                                                   `json:"starting_at,required" format:"date-time"`
	EndingBefore time.Time                                                   `json:"ending_before" format:"date-time"`
	JSON         v1ContractListResponseDataSubscriptionsQuantityScheduleJSON `json:"-"`
}

func (*V1ContractListResponseDataSubscriptionsQuantitySchedule) UnmarshalJSON

type V1ContractListResponseDataSubscriptionsSubscriptionRate

type V1ContractListResponseDataSubscriptionsSubscriptionRate struct {
	BillingFrequency V1ContractListResponseDataSubscriptionsSubscriptionRateBillingFrequency `json:"billing_frequency,required"`
	Product          V1ContractListResponseDataSubscriptionsSubscriptionRateProduct          `json:"product,required"`
	JSON             v1ContractListResponseDataSubscriptionsSubscriptionRateJSON             `json:"-"`
}

func (*V1ContractListResponseDataSubscriptionsSubscriptionRate) UnmarshalJSON

type V1ContractListResponseDataSubscriptionsSubscriptionRateBillingFrequency

type V1ContractListResponseDataSubscriptionsSubscriptionRateBillingFrequency string
const (
	V1ContractListResponseDataSubscriptionsSubscriptionRateBillingFrequencyMonthly   V1ContractListResponseDataSubscriptionsSubscriptionRateBillingFrequency = "MONTHLY"
	V1ContractListResponseDataSubscriptionsSubscriptionRateBillingFrequencyQuarterly V1ContractListResponseDataSubscriptionsSubscriptionRateBillingFrequency = "QUARTERLY"
	V1ContractListResponseDataSubscriptionsSubscriptionRateBillingFrequencyAnnual    V1ContractListResponseDataSubscriptionsSubscriptionRateBillingFrequency = "ANNUAL"
	V1ContractListResponseDataSubscriptionsSubscriptionRateBillingFrequencyWeekly    V1ContractListResponseDataSubscriptionsSubscriptionRateBillingFrequency = "WEEKLY"
)

func (V1ContractListResponseDataSubscriptionsSubscriptionRateBillingFrequency) IsKnown

type V1ContractListResponseDataSubscriptionsSubscriptionRateProduct

type V1ContractListResponseDataSubscriptionsSubscriptionRateProduct struct {
	ID   string                                                             `json:"id,required" format:"uuid"`
	Name string                                                             `json:"name,required"`
	JSON v1ContractListResponseDataSubscriptionsSubscriptionRateProductJSON `json:"-"`
}

func (*V1ContractListResponseDataSubscriptionsSubscriptionRateProduct) UnmarshalJSON

type V1ContractNamedScheduleGetParams

type V1ContractNamedScheduleGetParams struct {
	// ID of the rate card whose named schedule is to be retrieved
	RateCardID param.Field[string] `json:"rate_card_id,required" format:"uuid"`
	// The identifier for the schedule to be retrieved
	ScheduleName param.Field[string] `json:"schedule_name,required"`
	// If provided, at most one schedule segment will be returned (the one that covers
	// this date). If not provided, all segments will be returned.
	CoveringDate param.Field[time.Time] `json:"covering_date" format:"date-time"`
}

func (V1ContractNamedScheduleGetParams) MarshalJSON

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

type V1ContractNamedScheduleGetResponse

type V1ContractNamedScheduleGetResponse struct {
	Data []V1ContractNamedScheduleGetResponseData `json:"data,required"`
	JSON v1ContractNamedScheduleGetResponseJSON   `json:"-"`
}

func (*V1ContractNamedScheduleGetResponse) UnmarshalJSON

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

type V1ContractNamedScheduleGetResponseData

type V1ContractNamedScheduleGetResponseData struct {
	StartingAt   time.Time                                  `json:"starting_at,required" format:"date-time"`
	Value        interface{}                                `json:"value,required"`
	EndingBefore time.Time                                  `json:"ending_before" format:"date-time"`
	JSON         v1ContractNamedScheduleGetResponseDataJSON `json:"-"`
}

func (*V1ContractNamedScheduleGetResponseData) UnmarshalJSON

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

type V1ContractNamedScheduleService

type V1ContractNamedScheduleService struct {
	Options []option.RequestOption
}

V1ContractNamedScheduleService contains methods and other services that help with interacting with the metronome 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 NewV1ContractNamedScheduleService method instead.

func NewV1ContractNamedScheduleService

func NewV1ContractNamedScheduleService(opts ...option.RequestOption) (r *V1ContractNamedScheduleService)

NewV1ContractNamedScheduleService 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 (*V1ContractNamedScheduleService) Get

Get a named schedule for the given rate card. This endpoint's availability is dependent on your client's configuration.

func (*V1ContractNamedScheduleService) Update

Update a named schedule for the given rate card. This endpoint's availability is dependent on your client's configuration.

type V1ContractNamedScheduleUpdateParams

type V1ContractNamedScheduleUpdateParams struct {
	// ID of the rate card whose named schedule is to be updated
	RateCardID param.Field[string] `json:"rate_card_id,required" format:"uuid"`
	// The identifier for the schedule to be updated
	ScheduleName param.Field[string]    `json:"schedule_name,required"`
	StartingAt   param.Field[time.Time] `json:"starting_at,required" format:"date-time"`
	// The value to set for the named schedule. The structure of this object is
	// specific to the named schedule.
	Value        param.Field[interface{}] `json:"value,required"`
	EndingBefore param.Field[time.Time]   `json:"ending_before" format:"date-time"`
}

func (V1ContractNamedScheduleUpdateParams) MarshalJSON

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

type V1ContractNewHistoricalInvoicesParams

type V1ContractNewHistoricalInvoicesParams struct {
	Invoices param.Field[[]V1ContractNewHistoricalInvoicesParamsInvoice] `json:"invoices,required"`
	Preview  param.Field[bool]                                           `json:"preview,required"`
}

func (V1ContractNewHistoricalInvoicesParams) MarshalJSON

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

type V1ContractNewHistoricalInvoicesParamsInvoice

type V1ContractNewHistoricalInvoicesParamsInvoice struct {
	ContractID         param.Field[string]                                                       `json:"contract_id,required" format:"uuid"`
	CreditTypeID       param.Field[string]                                                       `json:"credit_type_id,required" format:"uuid"`
	CustomerID         param.Field[string]                                                       `json:"customer_id,required" format:"uuid"`
	ExclusiveEndDate   param.Field[time.Time]                                                    `json:"exclusive_end_date,required" format:"date-time"`
	InclusiveStartDate param.Field[time.Time]                                                    `json:"inclusive_start_date,required" format:"date-time"`
	IssueDate          param.Field[time.Time]                                                    `json:"issue_date,required" format:"date-time"`
	UsageLineItems     param.Field[[]V1ContractNewHistoricalInvoicesParamsInvoicesUsageLineItem] `json:"usage_line_items,required"`
	// This field's availability is dependent on your client's configuration.
	BillableStatus       param.Field[V1ContractNewHistoricalInvoicesParamsInvoicesBillableStatus]       `json:"billable_status"`
	BreakdownGranularity param.Field[V1ContractNewHistoricalInvoicesParamsInvoicesBreakdownGranularity] `json:"breakdown_granularity"`
	CustomFields         param.Field[map[string]string]                                                 `json:"custom_fields"`
}

func (V1ContractNewHistoricalInvoicesParamsInvoice) MarshalJSON

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

type V1ContractNewHistoricalInvoicesParamsInvoicesBillableStatus

type V1ContractNewHistoricalInvoicesParamsInvoicesBillableStatus string

This field's availability is dependent on your client's configuration.

const (
	V1ContractNewHistoricalInvoicesParamsInvoicesBillableStatusBillable   V1ContractNewHistoricalInvoicesParamsInvoicesBillableStatus = "billable"
	V1ContractNewHistoricalInvoicesParamsInvoicesBillableStatusUnbillable V1ContractNewHistoricalInvoicesParamsInvoicesBillableStatus = "unbillable"
)

func (V1ContractNewHistoricalInvoicesParamsInvoicesBillableStatus) IsKnown

type V1ContractNewHistoricalInvoicesParamsInvoicesBreakdownGranularity

type V1ContractNewHistoricalInvoicesParamsInvoicesBreakdownGranularity string
const (
	V1ContractNewHistoricalInvoicesParamsInvoicesBreakdownGranularityHour V1ContractNewHistoricalInvoicesParamsInvoicesBreakdownGranularity = "HOUR"
	V1ContractNewHistoricalInvoicesParamsInvoicesBreakdownGranularityDay  V1ContractNewHistoricalInvoicesParamsInvoicesBreakdownGranularity = "DAY"
)

func (V1ContractNewHistoricalInvoicesParamsInvoicesBreakdownGranularity) IsKnown

type V1ContractNewHistoricalInvoicesParamsInvoicesUsageLineItem

type V1ContractNewHistoricalInvoicesParamsInvoicesUsageLineItem struct {
	ExclusiveEndDate        param.Field[time.Time]                                                                          `json:"exclusive_end_date,required" format:"date-time"`
	InclusiveStartDate      param.Field[time.Time]                                                                          `json:"inclusive_start_date,required" format:"date-time"`
	ProductID               param.Field[string]                                                                             `json:"product_id,required" format:"uuid"`
	PresentationGroupValues param.Field[map[string]string]                                                                  `json:"presentation_group_values"`
	PricingGroupValues      param.Field[map[string]string]                                                                  `json:"pricing_group_values"`
	Quantity                param.Field[float64]                                                                            `json:"quantity"`
	SubtotalsWithQuantity   param.Field[[]V1ContractNewHistoricalInvoicesParamsInvoicesUsageLineItemsSubtotalsWithQuantity] `json:"subtotals_with_quantity"`
}

func (V1ContractNewHistoricalInvoicesParamsInvoicesUsageLineItem) MarshalJSON

type V1ContractNewHistoricalInvoicesParamsInvoicesUsageLineItemsSubtotalsWithQuantity

type V1ContractNewHistoricalInvoicesParamsInvoicesUsageLineItemsSubtotalsWithQuantity struct {
	ExclusiveEndDate   param.Field[time.Time] `json:"exclusive_end_date,required" format:"date-time"`
	InclusiveStartDate param.Field[time.Time] `json:"inclusive_start_date,required" format:"date-time"`
	Quantity           param.Field[float64]   `json:"quantity,required"`
}

func (V1ContractNewHistoricalInvoicesParamsInvoicesUsageLineItemsSubtotalsWithQuantity) MarshalJSON

type V1ContractNewHistoricalInvoicesResponse

type V1ContractNewHistoricalInvoicesResponse struct {
	Data []V1ContractNewHistoricalInvoicesResponseData `json:"data,required"`
	JSON v1ContractNewHistoricalInvoicesResponseJSON   `json:"-"`
}

func (*V1ContractNewHistoricalInvoicesResponse) UnmarshalJSON

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

type V1ContractNewHistoricalInvoicesResponseData

type V1ContractNewHistoricalInvoicesResponseData struct {
	ID          string                                                `json:"id,required" format:"uuid"`
	CreditType  V1ContractNewHistoricalInvoicesResponseDataCreditType `json:"credit_type,required"`
	CustomerID  string                                                `json:"customer_id,required" format:"uuid"`
	LineItems   []V1ContractNewHistoricalInvoicesResponseDataLineItem `json:"line_items,required"`
	Status      string                                                `json:"status,required"`
	Total       float64                                               `json:"total,required"`
	Type        string                                                `json:"type,required"`
	AmendmentID string                                                `json:"amendment_id" format:"uuid"`
	// This field's availability is dependent on your client's configuration.
	BillableStatus       V1ContractNewHistoricalInvoicesResponseDataBillableStatus   `json:"billable_status"`
	ContractCustomFields map[string]string                                           `json:"contract_custom_fields"`
	ContractID           string                                                      `json:"contract_id" format:"uuid"`
	CorrectionRecord     V1ContractNewHistoricalInvoicesResponseDataCorrectionRecord `json:"correction_record"`
	// When the invoice was created (UTC). This field is present for correction
	// invoices only.
	CreatedAt            time.Time              `json:"created_at" format:"date-time"`
	CustomFields         map[string]interface{} `json:"custom_fields"`
	CustomerCustomFields map[string]string      `json:"customer_custom_fields"`
	// End of the usage period this invoice covers (UTC)
	EndTimestamp       time.Time                                                      `json:"end_timestamp" format:"date-time"`
	ExternalInvoice    V1ContractNewHistoricalInvoicesResponseDataExternalInvoice     `json:"external_invoice,nullable"`
	InvoiceAdjustments []V1ContractNewHistoricalInvoicesResponseDataInvoiceAdjustment `json:"invoice_adjustments"`
	// When the invoice was issued (UTC)
	IssuedAt            time.Time `json:"issued_at" format:"date-time"`
	NetPaymentTermsDays float64   `json:"net_payment_terms_days"`
	// This field's availability is dependent on your client's configuration.
	NetsuiteSalesOrderID string            `json:"netsuite_sales_order_id"`
	PlanCustomFields     map[string]string `json:"plan_custom_fields"`
	PlanID               string            `json:"plan_id" format:"uuid"`
	PlanName             string            `json:"plan_name"`
	// Only present for contract invoices with reseller royalties.
	ResellerRoyalty V1ContractNewHistoricalInvoicesResponseDataResellerRoyalty `json:"reseller_royalty"`
	// This field's availability is dependent on your client's configuration.
	SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
	// Beginning of the usage period this invoice covers (UTC)
	StartTimestamp time.Time                                       `json:"start_timestamp" format:"date-time"`
	Subtotal       float64                                         `json:"subtotal"`
	JSON           v1ContractNewHistoricalInvoicesResponseDataJSON `json:"-"`
}

func (*V1ContractNewHistoricalInvoicesResponseData) UnmarshalJSON

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

type V1ContractNewHistoricalInvoicesResponseDataBillableStatus

type V1ContractNewHistoricalInvoicesResponseDataBillableStatus string

This field's availability is dependent on your client's configuration.

const (
	V1ContractNewHistoricalInvoicesResponseDataBillableStatusBillable   V1ContractNewHistoricalInvoicesResponseDataBillableStatus = "billable"
	V1ContractNewHistoricalInvoicesResponseDataBillableStatusUnbillable V1ContractNewHistoricalInvoicesResponseDataBillableStatus = "unbillable"
)

func (V1ContractNewHistoricalInvoicesResponseDataBillableStatus) IsKnown

type V1ContractNewHistoricalInvoicesResponseDataCorrectionRecord

type V1ContractNewHistoricalInvoicesResponseDataCorrectionRecord struct {
	CorrectedInvoiceID       string                                                                              `json:"corrected_invoice_id,required" format:"uuid"`
	Memo                     string                                                                              `json:"memo,required"`
	Reason                   string                                                                              `json:"reason,required"`
	CorrectedExternalInvoice V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoice `json:"corrected_external_invoice"`
	JSON                     v1ContractNewHistoricalInvoicesResponseDataCorrectionRecordJSON                     `json:"-"`
}

func (*V1ContractNewHistoricalInvoicesResponseDataCorrectionRecord) UnmarshalJSON

type V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoice

type V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoice struct {
	BillingProviderType V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderType `json:"billing_provider_type,required"`
	ExternalStatus      V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatus      `json:"external_status"`
	InvoiceID           string                                                                                                 `json:"invoice_id"`
	IssuedAtTimestamp   time.Time                                                                                              `json:"issued_at_timestamp" format:"date-time"`
	JSON                v1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceJSON                `json:"-"`
}

func (*V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoice) UnmarshalJSON

type V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderType

type V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderType string
const (
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderTypeAwsMarketplace   V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderType = "aws_marketplace"
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderTypeStripe           V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderType = "stripe"
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderTypeNetsuite         V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderType = "netsuite"
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderTypeCustom           V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderType = "custom"
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderTypeAzureMarketplace V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderType = "azure_marketplace"
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderTypeQuickbooksOnline V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderType = "quickbooks_online"
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderTypeWorkday          V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderType = "workday"
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderTypeGcpMarketplace   V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderType = "gcp_marketplace"
)

func (V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceBillingProviderType) IsKnown

type V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatus

type V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatus string
const (
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatusDraft               V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatus = "DRAFT"
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatusFinalized           V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatus = "FINALIZED"
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatusPaid                V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatus = "PAID"
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatusUncollectible       V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatus = "UNCOLLECTIBLE"
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatusVoid                V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatus = "VOID"
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatusDeleted             V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatus = "DELETED"
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatusPaymentFailed       V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatus = "PAYMENT_FAILED"
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatusInvalidRequestError V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatus = "INVALID_REQUEST_ERROR"
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatusSkipped             V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatus = "SKIPPED"
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatusSent                V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatus = "SENT"
	V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatusQueued              V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatus = "QUEUED"
)

func (V1ContractNewHistoricalInvoicesResponseDataCorrectionRecordCorrectedExternalInvoiceExternalStatus) IsKnown

type V1ContractNewHistoricalInvoicesResponseDataCreditType

type V1ContractNewHistoricalInvoicesResponseDataCreditType struct {
	ID   string                                                    `json:"id,required" format:"uuid"`
	Name string                                                    `json:"name,required"`
	JSON v1ContractNewHistoricalInvoicesResponseDataCreditTypeJSON `json:"-"`
}

func (*V1ContractNewHistoricalInvoicesResponseDataCreditType) UnmarshalJSON