metronome

package module
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 15 Imported by: 0

README

Go Reference rcard License

Metronome Go client

Go client for Metronome generated from its OpenAPI spec

This is not an official client, and was generated for personal use from their OpenAPI spec.

Installation

By using this client you'll avoid a lot of boilerplate code to perform all the marshalling and unmarshalling into objects when using Metronome HTTP APIs.

Install in your project to have it as a dependency in go.mod:

go get github.com/adilansari/metronome-go-client@latest

Usage

Authentication

Metronome requires all HTTP requests to include a authorization header for authentication:

GET /v1/... HTTP/1.1
Host: api.metronome.com
Authorization: Bearer MY_TOKEN

Instead of adding authorization header to every request when using this go client, you can simply register a callback as:

authProvider, err := securityprovider.NewSecurityProviderBearerToken("MY_TOKEN")
if err != nil {
	panic(err)
}

client, err := metronome.NewClient("https://api.metronome.com/v1", metronome.WithRequestEditorFn(authProvider.Intercept))
Create customer example

Following is a complete example you can try in your project. Replace the REPLACE_ME with your own token generated from Metronome account.

package main

import (
	"context"
	"fmt"
	"net/http"

	"github.com/deepmap/oapi-codegen/pkg/securityprovider"

	"github.com/adilansari/metronome-go-client"
)

func main() {
	// API key based authentication. Add your metronome auth token here.
	// Learn more about auth: https://docs.metronome.com/using-the-api/authorization/
	authProvider, err := securityprovider.NewSecurityProviderBearerToken("REPLACE_ME")
	if err != nil {
		panic(err)
	}

	// Client will be used to perform all operations on metronome.
	// Auth provider generated above will implicitly add an authorization token to all requests.
	client, err := metronome.NewClientWithResponses(
		"https://api.metronome.com/v1",
		metronome.WithRequestEditorFn(authProvider.Intercept),
	)
	if err != nil {
		panic(err)
	}

	// JSON request for CreateCustomer
	createCustomerBody := metronome.CreateCustomerJSONRequestBody{
		IngestAliases: &[]string{"my_customer_alias"},
		Name:          "my_customer_id",
	}

	// HTTP POST call to "/customers" endpoint
	resp, err := client.CreateCustomerWithResponse(context.TODO(), createCustomerBody)
	if err != nil {
		panic(err)
	}

	// Checking if request succeeded
	if resp.StatusCode() != http.StatusOK {
		panic(fmt.Errorf("metronome request failed: %s", resp.Body))
	}

	// Response available as a struct without explicit parsing
	customer := resp.JSON200.Data

	fmt.Printf("'id' of created customer: %s\n", customer.Id)
	fmt.Printf("'name' of created customer: %s\n", customer.Name)
	fmt.Printf("'aliases' for the created customer: %s\n", customer.IngestAliases)
}

// Sample output:
// 'id' of created customer: 1eeb3160-1d1a-40dc-9571-1a65fefbc975
// 'name' of created customer: my_customer_id
// 'aliases' for the created customer: [my_customer_alias]

Requesting updates

  • Since this is not official client, the API may be out of date
  • Please open an issue in the repo and I'll try to update the client to latest

Documentation

Overview

Package metronome provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerAuthScopes = "bearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func NewAddCustomFieldKeyRequest

func NewAddCustomFieldKeyRequest(server string, body AddCustomFieldKeyJSONRequestBody) (*http.Request, error)

NewAddCustomFieldKeyRequest calls the generic AddCustomFieldKey builder with application/json body

func NewAddCustomFieldKeyRequestWithBody

func NewAddCustomFieldKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewAddCustomFieldKeyRequestWithBody generates requests for AddCustomFieldKey with any type of body

func NewAddOneTimeChargeRequest added in v0.1.7

func NewAddOneTimeChargeRequest(server string, customerId openapi_types.UUID, body AddOneTimeChargeJSONRequestBody) (*http.Request, error)

NewAddOneTimeChargeRequest calls the generic AddOneTimeCharge builder with application/json body

func NewAddOneTimeChargeRequestWithBody added in v0.1.7

func NewAddOneTimeChargeRequestWithBody(server string, customerId openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error)

NewAddOneTimeChargeRequestWithBody generates requests for AddOneTimeCharge with any type of body

func NewAddPlanToCustomerRequest

func NewAddPlanToCustomerRequest(server string, customerId openapi_types.UUID, body AddPlanToCustomerJSONRequestBody) (*http.Request, error)

NewAddPlanToCustomerRequest calls the generic AddPlanToCustomer builder with application/json body

func NewAddPlanToCustomerRequestWithBody

func NewAddPlanToCustomerRequestWithBody(server string, customerId openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error)

NewAddPlanToCustomerRequestWithBody generates requests for AddPlanToCustomer with any type of body

func NewArchiveAlertRequest

func NewArchiveAlertRequest(server string, body ArchiveAlertJSONRequestBody) (*http.Request, error)

NewArchiveAlertRequest calls the generic ArchiveAlert builder with application/json body

func NewArchiveAlertRequestWithBody

func NewArchiveAlertRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewArchiveAlertRequestWithBody generates requests for ArchiveAlert with any type of body

func NewArchiveCustomerRequest added in v0.1.3

func NewArchiveCustomerRequest(server string, body ArchiveCustomerJSONRequestBody) (*http.Request, error)

NewArchiveCustomerRequest calls the generic ArchiveCustomer builder with application/json body

func NewArchiveCustomerRequestWithBody added in v0.1.3

func NewArchiveCustomerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewArchiveCustomerRequestWithBody generates requests for ArchiveCustomer with any type of body

func NewCreateAlertRequest

func NewCreateAlertRequest(server string, body CreateAlertJSONRequestBody) (*http.Request, error)

NewCreateAlertRequest calls the generic CreateAlert builder with application/json body

func NewCreateAlertRequestWithBody

func NewCreateAlertRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateAlertRequestWithBody generates requests for CreateAlert with any type of body

func NewCreateCustomerRequest

func NewCreateCustomerRequest(server string, body CreateCustomerJSONRequestBody) (*http.Request, error)

NewCreateCustomerRequest calls the generic CreateCustomer builder with application/json body

func NewCreateCustomerRequestWithBody

func NewCreateCustomerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateCustomerRequestWithBody generates requests for CreateCustomer with any type of body

func NewCreateGrantRequest

func NewCreateGrantRequest(server string, body CreateGrantJSONRequestBody) (*http.Request, error)

NewCreateGrantRequest calls the generic CreateGrant builder with application/json body

func NewCreateGrantRequestWithBody

func NewCreateGrantRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateGrantRequestWithBody generates requests for CreateGrant with any type of body

func NewDeleteBillingConfigForCustomerRequest

func NewDeleteBillingConfigForCustomerRequest(server string, customerId openapi_types.UUID, billingProviderType DeleteBillingConfigForCustomerParamsBillingProviderType) (*http.Request, error)

NewDeleteBillingConfigForCustomerRequest generates requests for DeleteBillingConfigForCustomer

func NewDeleteCustomFieldsRequest

func NewDeleteCustomFieldsRequest(server string, body DeleteCustomFieldsJSONRequestBody) (*http.Request, error)

NewDeleteCustomFieldsRequest calls the generic DeleteCustomFields builder with application/json body

func NewDeleteCustomFieldsRequestWithBody

func NewDeleteCustomFieldsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewDeleteCustomFieldsRequestWithBody generates requests for DeleteCustomFields with any type of body

func NewDisableCustomFieldKeyRequest

func NewDisableCustomFieldKeyRequest(server string, body DisableCustomFieldKeyJSONRequestBody) (*http.Request, error)

NewDisableCustomFieldKeyRequest calls the generic DisableCustomFieldKey builder with application/json body

func NewDisableCustomFieldKeyRequestWithBody

func NewDisableCustomFieldKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewDisableCustomFieldKeyRequestWithBody generates requests for DisableCustomFieldKey with any type of body

func NewEditGrantRequest added in v0.1.7

func NewEditGrantRequest(server string, body EditGrantJSONRequestBody) (*http.Request, error)

NewEditGrantRequest calls the generic EditGrant builder with application/json body

func NewEditGrantRequestWithBody added in v0.1.7

func NewEditGrantRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewEditGrantRequestWithBody generates requests for EditGrant with any type of body

func NewEmbeddableDashboardRequest

func NewEmbeddableDashboardRequest(server string, body EmbeddableDashboardJSONRequestBody) (*http.Request, error)

NewEmbeddableDashboardRequest calls the generic EmbeddableDashboard builder with application/json body

func NewEmbeddableDashboardRequestWithBody

func NewEmbeddableDashboardRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewEmbeddableDashboardRequestWithBody generates requests for EmbeddableDashboard with any type of body

func NewEndCustomerPlanRequest

func NewEndCustomerPlanRequest(server string, customerId openapi_types.UUID, customerPlanId openapi_types.UUID, body EndCustomerPlanJSONRequestBody) (*http.Request, error)

NewEndCustomerPlanRequest calls the generic EndCustomerPlan builder with application/json body

func NewEndCustomerPlanRequestWithBody

func NewEndCustomerPlanRequestWithBody(server string, customerId openapi_types.UUID, customerPlanId openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error)

NewEndCustomerPlanRequestWithBody generates requests for EndCustomerPlan with any type of body

func NewGetAuditLogsRequest added in v0.1.5

func NewGetAuditLogsRequest(server string, params *GetAuditLogsParams) (*http.Request, error)

NewGetAuditLogsRequest generates requests for GetAuditLogs

func NewGetBillingConfigRequest

func NewGetBillingConfigRequest(server string, customerId openapi_types.UUID, billingProviderType GetBillingConfigParamsBillingProviderType) (*http.Request, error)

NewGetBillingConfigRequest generates requests for GetBillingConfig

func NewGetCostsRequest

func NewGetCostsRequest(server string, customerId openapi_types.UUID, params *GetCostsParams) (*http.Request, error)

NewGetCostsRequest generates requests for GetCosts

func NewGetCustomerAlertRequest

func NewGetCustomerAlertRequest(server string, body GetCustomerAlertJSONRequestBody) (*http.Request, error)

NewGetCustomerAlertRequest calls the generic GetCustomerAlert builder with application/json body

func NewGetCustomerAlertRequestWithBody

func NewGetCustomerAlertRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewGetCustomerAlertRequestWithBody generates requests for GetCustomerAlert with any type of body

func NewGetCustomerRequest

func NewGetCustomerRequest(server string, customerId openapi_types.UUID) (*http.Request, error)

NewGetCustomerRequest generates requests for GetCustomer

func NewGetInvoiceRequest

func NewGetInvoiceRequest(server string, customerId openapi_types.UUID, invoiceId openapi_types.UUID) (*http.Request, error)

NewGetInvoiceRequest generates requests for GetInvoice

func NewGetPagedUsageRequest

func NewGetPagedUsageRequest(server string, params *GetPagedUsageParams, body GetPagedUsageJSONRequestBody) (*http.Request, error)

NewGetPagedUsageRequest calls the generic GetPagedUsage builder with application/json body

func NewGetPagedUsageRequestWithBody

func NewGetPagedUsageRequestWithBody(server string, params *GetPagedUsageParams, contentType string, body io.Reader) (*http.Request, error)

NewGetPagedUsageRequestWithBody generates requests for GetPagedUsage with any type of body

func NewGetPlanChargesRequest

func NewGetPlanChargesRequest(server string, planId openapi_types.UUID, params *GetPlanChargesParams) (*http.Request, error)

NewGetPlanChargesRequest generates requests for GetPlanCharges

func NewGetPlanCustomersRequest added in v0.1.7

func NewGetPlanCustomersRequest(server string, planId openapi_types.UUID, params *GetPlanCustomersParams) (*http.Request, error)

NewGetPlanCustomersRequest generates requests for GetPlanCustomers

func NewGetPlanDetailsRequest

func NewGetPlanDetailsRequest(server string, planId openapi_types.UUID) (*http.Request, error)

NewGetPlanDetailsRequest generates requests for GetPlanDetails

func NewGetPlanPriceAdjustmentsRequest

func NewGetPlanPriceAdjustmentsRequest(server string, customerId openapi_types.UUID, customerPlanId openapi_types.UUID, params *GetPlanPriceAdjustmentsParams) (*http.Request, error)

NewGetPlanPriceAdjustmentsRequest generates requests for GetPlanPriceAdjustments

func NewGetUsageBatchRequest

func NewGetUsageBatchRequest(server string, params *GetUsageBatchParams, body GetUsageBatchJSONRequestBody) (*http.Request, error)

NewGetUsageBatchRequest calls the generic GetUsageBatch builder with application/json body

func NewGetUsageBatchRequestWithBody

func NewGetUsageBatchRequestWithBody(server string, params *GetUsageBatchParams, contentType string, body io.Reader) (*http.Request, error)

NewGetUsageBatchRequestWithBody generates requests for GetUsageBatch with any type of body

func NewIngestRequest

func NewIngestRequest(server string, body IngestJSONRequestBody) (*http.Request, error)

NewIngestRequest calls the generic Ingest builder with application/json body

func NewIngestRequestWithBody

func NewIngestRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewIngestRequestWithBody generates requests for Ingest with any type of body

func NewListBillableMetricsRequest

func NewListBillableMetricsRequest(server string, customerId openapi_types.UUID, params *ListBillableMetricsParams) (*http.Request, error)

NewListBillableMetricsRequest generates requests for ListBillableMetrics

func NewListCreditLedgerEntriesRequest

func NewListCreditLedgerEntriesRequest(server string, params *ListCreditLedgerEntriesParams, body ListCreditLedgerEntriesJSONRequestBody) (*http.Request, error)

NewListCreditLedgerEntriesRequest calls the generic ListCreditLedgerEntries builder with application/json body

func NewListCreditLedgerEntriesRequestWithBody

func NewListCreditLedgerEntriesRequestWithBody(server string, params *ListCreditLedgerEntriesParams, contentType string, body io.Reader) (*http.Request, error)

NewListCreditLedgerEntriesRequestWithBody generates requests for ListCreditLedgerEntries with any type of body

func NewListCreditTypesRequest

func NewListCreditTypesRequest(server string, params *ListCreditTypesParams) (*http.Request, error)

NewListCreditTypesRequest generates requests for ListCreditTypes

func NewListCustomFieldKeysRequest

func NewListCustomFieldKeysRequest(server string, params *ListCustomFieldKeysParams, body ListCustomFieldKeysJSONRequestBody) (*http.Request, error)

NewListCustomFieldKeysRequest calls the generic ListCustomFieldKeys builder with application/json body

func NewListCustomFieldKeysRequestWithBody

func NewListCustomFieldKeysRequestWithBody(server string, params *ListCustomFieldKeysParams, contentType string, body io.Reader) (*http.Request, error)

NewListCustomFieldKeysRequestWithBody generates requests for ListCustomFieldKeys with any type of body

func NewListCustomerAlertsRequest

func NewListCustomerAlertsRequest(server string, params *ListCustomerAlertsParams, body ListCustomerAlertsJSONRequestBody) (*http.Request, error)

NewListCustomerAlertsRequest calls the generic ListCustomerAlerts builder with application/json body

func NewListCustomerAlertsRequestWithBody

func NewListCustomerAlertsRequestWithBody(server string, params *ListCustomerAlertsParams, contentType string, body io.Reader) (*http.Request, error)

NewListCustomerAlertsRequestWithBody generates requests for ListCustomerAlerts with any type of body

func NewListCustomerPlansRequest

func NewListCustomerPlansRequest(server string, customerId openapi_types.UUID, params *ListCustomerPlansParams) (*http.Request, error)

NewListCustomerPlansRequest generates requests for ListCustomerPlans

func NewListCustomersRequest

func NewListCustomersRequest(server string, params *ListCustomersParams) (*http.Request, error)

NewListCustomersRequest generates requests for ListCustomers

func NewListGrantsRequest

func NewListGrantsRequest(server string, params *ListGrantsParams, body ListGrantsJSONRequestBody) (*http.Request, error)

NewListGrantsRequest calls the generic ListGrants builder with application/json body

func NewListGrantsRequestWithBody

func NewListGrantsRequestWithBody(server string, params *ListGrantsParams, contentType string, body io.Reader) (*http.Request, error)

NewListGrantsRequestWithBody generates requests for ListGrants with any type of body

func NewListInvoicesRequest

func NewListInvoicesRequest(server string, customerId openapi_types.UUID, params *ListInvoicesParams) (*http.Request, error)

NewListInvoicesRequest generates requests for ListInvoices

func NewListPlansRequest

func NewListPlansRequest(server string, params *ListPlansParams) (*http.Request, error)

NewListPlansRequest generates requests for ListPlans

func NewSetBillingConfigForCustomerRequest

func NewSetBillingConfigForCustomerRequest(server string, customerId openapi_types.UUID, billingProviderType SetBillingConfigForCustomerParamsBillingProviderType, body SetBillingConfigForCustomerJSONRequestBody) (*http.Request, error)

NewSetBillingConfigForCustomerRequest calls the generic SetBillingConfigForCustomer builder with application/json body

func NewSetBillingConfigForCustomerRequestWithBody

func NewSetBillingConfigForCustomerRequestWithBody(server string, customerId openapi_types.UUID, billingProviderType SetBillingConfigForCustomerParamsBillingProviderType, contentType string, body io.Reader) (*http.Request, error)

NewSetBillingConfigForCustomerRequestWithBody generates requests for SetBillingConfigForCustomer with any type of body

func NewSetCustomFieldsRequest

func NewSetCustomFieldsRequest(server string, body SetCustomFieldsJSONRequestBody) (*http.Request, error)

NewSetCustomFieldsRequest calls the generic SetCustomFields builder with application/json body

func NewSetCustomFieldsRequestWithBody

func NewSetCustomFieldsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewSetCustomFieldsRequestWithBody generates requests for SetCustomFields with any type of body

func NewSetCustomerNameRequest

func NewSetCustomerNameRequest(server string, customerId openapi_types.UUID, body SetCustomerNameJSONRequestBody) (*http.Request, error)

NewSetCustomerNameRequest calls the generic SetCustomerName builder with application/json body

func NewSetCustomerNameRequestWithBody

func NewSetCustomerNameRequestWithBody(server string, customerId openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error)

NewSetCustomerNameRequestWithBody generates requests for SetCustomerName with any type of body

func NewSetIngestAliasesRequest

func NewSetIngestAliasesRequest(server string, customerId openapi_types.UUID, body SetIngestAliasesJSONRequestBody) (*http.Request, error)

NewSetIngestAliasesRequest calls the generic SetIngestAliases builder with application/json body

func NewSetIngestAliasesRequestWithBody

func NewSetIngestAliasesRequestWithBody(server string, customerId openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error)

NewSetIngestAliasesRequestWithBody generates requests for SetIngestAliases with any type of body

func NewUpdateCustomerConfigRequest

func NewUpdateCustomerConfigRequest(server string, customerId openapi_types.UUID, body UpdateCustomerConfigJSONRequestBody) (*http.Request, error)

NewUpdateCustomerConfigRequest calls the generic UpdateCustomerConfig builder with application/json body

func NewUpdateCustomerConfigRequestWithBody

func NewUpdateCustomerConfigRequestWithBody(server string, customerId openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error)

NewUpdateCustomerConfigRequestWithBody generates requests for UpdateCustomerConfig with any type of body

func NewVoidGrantRequest

func NewVoidGrantRequest(server string, body VoidGrantJSONRequestBody) (*http.Request, error)

NewVoidGrantRequest calls the generic VoidGrant builder with application/json body

func NewVoidGrantRequestWithBody

func NewVoidGrantRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewVoidGrantRequestWithBody generates requests for VoidGrant with any type of body

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type AddCustomFieldKeyJSONBody

type AddCustomFieldKeyJSONBody struct {
	EnforceUniqueness bool                            `json:"enforce_uniqueness"`
	Entity            AddCustomFieldKeyJSONBodyEntity `json:"entity"`
	Key               string                          `json:"key"`
}

AddCustomFieldKeyJSONBody defines parameters for AddCustomFieldKey.

type AddCustomFieldKeyJSONBodyEntity added in v0.1.7

type AddCustomFieldKeyJSONBodyEntity string

AddCustomFieldKeyJSONBodyEntity defines parameters for AddCustomFieldKey.

const (
	AddCustomFieldKeyJSONBodyEntityAlert               AddCustomFieldKeyJSONBodyEntity = "alert"
	AddCustomFieldKeyJSONBodyEntityBillableMetric      AddCustomFieldKeyJSONBodyEntity = "billable_metric"
	AddCustomFieldKeyJSONBodyEntityCharge              AddCustomFieldKeyJSONBodyEntity = "charge"
	AddCustomFieldKeyJSONBodyEntityCommit              AddCustomFieldKeyJSONBodyEntity = "commit"
	AddCustomFieldKeyJSONBodyEntityContract            AddCustomFieldKeyJSONBodyEntity = "contract"
	AddCustomFieldKeyJSONBodyEntityContractCredit      AddCustomFieldKeyJSONBodyEntity = "contract_credit"
	AddCustomFieldKeyJSONBodyEntityContractProduct     AddCustomFieldKeyJSONBodyEntity = "contract_product"
	AddCustomFieldKeyJSONBodyEntityCreditGrant         AddCustomFieldKeyJSONBodyEntity = "credit_grant"
	AddCustomFieldKeyJSONBodyEntityCustomer            AddCustomFieldKeyJSONBodyEntity = "customer"
	AddCustomFieldKeyJSONBodyEntityCustomerPlan        AddCustomFieldKeyJSONBodyEntity = "customer_plan"
	AddCustomFieldKeyJSONBodyEntityInvoice             AddCustomFieldKeyJSONBodyEntity = "invoice"
	AddCustomFieldKeyJSONBodyEntityPlan                AddCustomFieldKeyJSONBodyEntity = "plan"
	AddCustomFieldKeyJSONBodyEntityProduct             AddCustomFieldKeyJSONBodyEntity = "product"
	AddCustomFieldKeyJSONBodyEntityProfessionalService AddCustomFieldKeyJSONBodyEntity = "professional_service"
	AddCustomFieldKeyJSONBodyEntityRateCard            AddCustomFieldKeyJSONBodyEntity = "rate_card"
	AddCustomFieldKeyJSONBodyEntityScheduledCharge     AddCustomFieldKeyJSONBodyEntity = "scheduled_charge"
)

Defines values for AddCustomFieldKeyJSONBodyEntity.

type AddCustomFieldKeyJSONRequestBody

type AddCustomFieldKeyJSONRequestBody AddCustomFieldKeyJSONBody

AddCustomFieldKeyJSONRequestBody defines body for AddCustomFieldKey for application/json ContentType.

type AddCustomFieldKeyResponse

type AddCustomFieldKeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseAddCustomFieldKeyResponse

func ParseAddCustomFieldKeyResponse(rsp *http.Response) (*AddCustomFieldKeyResponse, error)

ParseAddCustomFieldKeyResponse parses an HTTP response from a AddCustomFieldKeyWithResponse call

func (AddCustomFieldKeyResponse) Status

func (r AddCustomFieldKeyResponse) Status() string

Status returns HTTPResponse.Status

func (AddCustomFieldKeyResponse) StatusCode

func (r AddCustomFieldKeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AddOneTimeChargeJSONBody added in v0.1.7

type AddOneTimeChargeJSONBody struct {
	// ChargeId The Metronome ID of the charge to add to the invoice. Note that the charge must be on a product that is not on the current plan, and the product must have only fixed charges.
	ChargeId openapi_types.UUID `json:"charge_id"`

	// CustomerPlanId The Metronome ID of the customer plan to add the charge to.
	CustomerPlanId openapi_types.UUID `json:"customer_plan_id"`
	Description    string             `json:"description"`

	// InvoiceStartTimestamp The start_timestamp of the invoice to add the charge to.
	InvoiceStartTimestamp time.Time `json:"invoice_start_timestamp"`

	// Price The price of the charge. This price will match the currency on the invoice, e.g. USD cents.
	Price    float32 `json:"price"`
	Quantity float32 `json:"quantity"`
}

AddOneTimeChargeJSONBody defines parameters for AddOneTimeCharge.

type AddOneTimeChargeJSONRequestBody added in v0.1.7

type AddOneTimeChargeJSONRequestBody AddOneTimeChargeJSONBody

AddOneTimeChargeJSONRequestBody defines body for AddOneTimeCharge for application/json ContentType.

type AddOneTimeChargeResponse added in v0.1.7

type AddOneTimeChargeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *map[string]interface{}
}

func ParseAddOneTimeChargeResponse added in v0.1.7

func ParseAddOneTimeChargeResponse(rsp *http.Response) (*AddOneTimeChargeResponse, error)

ParseAddOneTimeChargeResponse parses an HTTP response from a AddOneTimeChargeWithResponse call

func (AddOneTimeChargeResponse) Status added in v0.1.7

func (r AddOneTimeChargeResponse) Status() string

Status returns HTTPResponse.Status

func (AddOneTimeChargeResponse) StatusCode added in v0.1.7

func (r AddOneTimeChargeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AddPlanToCustomerJSONBody added in v0.1.7

type AddPlanToCustomerJSONBody struct {
	// EndingBefore RFC 3339 timestamp for when the plan ends (exclusive) for this customer. Must be at 0:00 UTC (midnight).
	EndingBefore *time.Time `json:"ending_before,omitempty"`

	// NetPaymentTermsDays Number of days after issuance of invoice after which the invoice is due (e.g. Net 30).
	NetPaymentTermsDays *float32           `json:"net_payment_terms_days,omitempty"`
	PlanId              openapi_types.UUID `json:"plan_id"`

	// PriceAdjustments A list of price adjustments can be applied on top of the pricing in the plans. See the [price adjustments documentation](https://docs.metronome.com/pricing/managing-plans/#price-adjustments) for details.
	PriceAdjustments *[]struct {
		AdjustmentType AddPlanToCustomerJSONBodyPriceAdjustmentsAdjustmentType `json:"adjustment_type"`
		ChargeId       openapi_types.UUID                                      `json:"charge_id"`

		// Quantity the overridden quantity for a fixed charge
		Quantity *float32 `json:"quantity,omitempty"`

		// StartPeriod Used in price ramps.  Indicates how many billing periods pass before the charge applies.
		StartPeriod float32 `json:"start_period"`

		// Tier Used in pricing tiers.  Indicates at what metric value the price applies.
		Tier *float32 `json:"tier,omitempty"`

		// Value The amount of change to a price. Percentage and fixed adjustments can be positive or negative. Percentage-based adjustments should be decimals, e.g. -0.05 for a 5% discount.
		Value *float32 `json:"value,omitempty"`
	} `json:"price_adjustments,omitempty"`

	// StartingOn RFC 3339 timestamp for when the plan becomes active for this customer. Must be at 0:00 UTC (midnight).
	StartingOn time.Time `json:"starting_on"`

	// TrialSpec A custom trial can be set for the customer's plan. See the [trial configuration documentation](https://docs.metronome.com/provisioning/configure-trials/) for details.
	TrialSpec *struct {
		// LengthInDays Length of the trial period in days.
		LengthInDays float32 `json:"length_in_days"`
		SpendingCap  *struct {
			// Amount The credit amount in the given denomination based on the credit type, e.g. US cents.
			Amount float32 `json:"amount"`

			// CreditTypeId The credit type ID for the spending cap.
			CreditTypeId string `json:"credit_type_id"`
		} `json:"spending_cap,omitempty"`
	} `json:"trial_spec,omitempty"`
}

AddPlanToCustomerJSONBody defines parameters for AddPlanToCustomer.

type AddPlanToCustomerJSONBodyPriceAdjustmentsAdjustmentType added in v0.1.7

type AddPlanToCustomerJSONBodyPriceAdjustmentsAdjustmentType string

AddPlanToCustomerJSONBodyPriceAdjustmentsAdjustmentType defines parameters for AddPlanToCustomer.

Defines values for AddPlanToCustomerJSONBodyPriceAdjustmentsAdjustmentType.

type AddPlanToCustomerJSONRequestBody

type AddPlanToCustomerJSONRequestBody AddPlanToCustomerJSONBody

AddPlanToCustomerJSONRequestBody defines body for AddPlanToCustomer for application/json ContentType.

type AddPlanToCustomerResponse

type AddPlanToCustomerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data struct {
			Id openapi_types.UUID `json:"id"`
		} `json:"data"`
	}
}

func ParseAddPlanToCustomerResponse

func ParseAddPlanToCustomerResponse(rsp *http.Response) (*AddPlanToCustomerResponse, error)

ParseAddPlanToCustomerResponse parses an HTTP response from a AddPlanToCustomerWithResponse call

func (AddPlanToCustomerResponse) Status

func (r AddPlanToCustomerResponse) Status() string

Status returns HTTPResponse.Status

func (AddPlanToCustomerResponse) StatusCode

func (r AddPlanToCustomerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ArchiveAlertJSONBody added in v0.1.7

type ArchiveAlertJSONBody struct {
	Id openapi_types.UUID `json:"id"`
}

ArchiveAlertJSONBody defines parameters for ArchiveAlert.

type ArchiveAlertJSONRequestBody

type ArchiveAlertJSONRequestBody ArchiveAlertJSONBody

ArchiveAlertJSONRequestBody defines body for ArchiveAlert for application/json ContentType.

type ArchiveAlertResponse

type ArchiveAlertResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data struct {
			Id openapi_types.UUID `json:"id"`
		} `json:"data"`
	}
	JSON404 *struct {
		Message string `json:"message"`
	}
}

func ParseArchiveAlertResponse

func ParseArchiveAlertResponse(rsp *http.Response) (*ArchiveAlertResponse, error)

ParseArchiveAlertResponse parses an HTTP response from a ArchiveAlertWithResponse call

func (ArchiveAlertResponse) Status

func (r ArchiveAlertResponse) Status() string

Status returns HTTPResponse.Status

func (ArchiveAlertResponse) StatusCode

func (r ArchiveAlertResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ArchiveCustomerJSONBody added in v0.1.7

type ArchiveCustomerJSONBody struct {
	Id openapi_types.UUID `json:"id"`
}

ArchiveCustomerJSONBody defines parameters for ArchiveCustomer.

type ArchiveCustomerJSONRequestBody added in v0.1.3

type ArchiveCustomerJSONRequestBody ArchiveCustomerJSONBody

ArchiveCustomerJSONRequestBody defines body for ArchiveCustomer for application/json ContentType.

type ArchiveCustomerResponse added in v0.1.3

type ArchiveCustomerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data struct {
			Id openapi_types.UUID `json:"id"`
		} `json:"data"`
	}
	JSON400 *struct {
		Message string `json:"message"`
	}
	JSON404 *struct {
		Message string `json:"message"`
	}
}

func ParseArchiveCustomerResponse added in v0.1.3

func ParseArchiveCustomerResponse(rsp *http.Response) (*ArchiveCustomerResponse, error)

ParseArchiveCustomerResponse parses an HTTP response from a ArchiveCustomerWithResponse call

func (ArchiveCustomerResponse) Status added in v0.1.3

func (r ArchiveCustomerResponse) Status() string

Status returns HTTPResponse.Status

func (ArchiveCustomerResponse) StatusCode added in v0.1.3

func (r ArchiveCustomerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) AddCustomFieldKey

func (c *Client) AddCustomFieldKey(ctx context.Context, body AddCustomFieldKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddCustomFieldKeyWithBody

func (c *Client) AddCustomFieldKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddOneTimeCharge added in v0.1.7

func (c *Client) AddOneTimeCharge(ctx context.Context, customerId openapi_types.UUID, body AddOneTimeChargeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddOneTimeChargeWithBody added in v0.1.7

func (c *Client) AddOneTimeChargeWithBody(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddPlanToCustomer

func (c *Client) AddPlanToCustomer(ctx context.Context, customerId openapi_types.UUID, body AddPlanToCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddPlanToCustomerWithBody

func (c *Client) AddPlanToCustomerWithBody(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ArchiveAlert

func (c *Client) ArchiveAlert(ctx context.Context, body ArchiveAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ArchiveAlertWithBody

func (c *Client) ArchiveAlertWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ArchiveCustomer added in v0.1.3

func (c *Client) ArchiveCustomer(ctx context.Context, body ArchiveCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ArchiveCustomerWithBody added in v0.1.3

func (c *Client) ArchiveCustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateAlert

func (c *Client) CreateAlert(ctx context.Context, body CreateAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateAlertWithBody

func (c *Client) CreateAlertWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateCustomer

func (c *Client) CreateCustomer(ctx context.Context, body CreateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateCustomerWithBody

func (c *Client) CreateCustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateGrant

func (c *Client) CreateGrant(ctx context.Context, body CreateGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateGrantWithBody

func (c *Client) CreateGrantWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteBillingConfigForCustomer

func (c *Client) DeleteBillingConfigForCustomer(ctx context.Context, customerId openapi_types.UUID, billingProviderType DeleteBillingConfigForCustomerParamsBillingProviderType, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteCustomFields

func (c *Client) DeleteCustomFields(ctx context.Context, body DeleteCustomFieldsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteCustomFieldsWithBody

func (c *Client) DeleteCustomFieldsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DisableCustomFieldKey

func (c *Client) DisableCustomFieldKey(ctx context.Context, body DisableCustomFieldKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DisableCustomFieldKeyWithBody

func (c *Client) DisableCustomFieldKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) EditGrant added in v0.1.7

func (c *Client) EditGrant(ctx context.Context, body EditGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) EditGrantWithBody added in v0.1.7

func (c *Client) EditGrantWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) EmbeddableDashboard

func (c *Client) EmbeddableDashboard(ctx context.Context, body EmbeddableDashboardJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) EmbeddableDashboardWithBody

func (c *Client) EmbeddableDashboardWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) EndCustomerPlan

func (c *Client) EndCustomerPlan(ctx context.Context, customerId openapi_types.UUID, customerPlanId openapi_types.UUID, body EndCustomerPlanJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) EndCustomerPlanWithBody

func (c *Client) EndCustomerPlanWithBody(ctx context.Context, customerId openapi_types.UUID, customerPlanId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetAuditLogs added in v0.1.5

func (c *Client) GetAuditLogs(ctx context.Context, params *GetAuditLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetBillingConfig

func (c *Client) GetBillingConfig(ctx context.Context, customerId openapi_types.UUID, billingProviderType GetBillingConfigParamsBillingProviderType, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCosts

func (c *Client) GetCosts(ctx context.Context, customerId openapi_types.UUID, params *GetCostsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCustomer

func (c *Client) GetCustomer(ctx context.Context, customerId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCustomerAlert

func (c *Client) GetCustomerAlert(ctx context.Context, body GetCustomerAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCustomerAlertWithBody

func (c *Client) GetCustomerAlertWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetInvoice

func (c *Client) GetInvoice(ctx context.Context, customerId openapi_types.UUID, invoiceId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPagedUsage

func (c *Client) GetPagedUsage(ctx context.Context, params *GetPagedUsageParams, body GetPagedUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPagedUsageWithBody

func (c *Client) GetPagedUsageWithBody(ctx context.Context, params *GetPagedUsageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPlanCharges

func (c *Client) GetPlanCharges(ctx context.Context, planId openapi_types.UUID, params *GetPlanChargesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPlanCustomers added in v0.1.7

func (c *Client) GetPlanCustomers(ctx context.Context, planId openapi_types.UUID, params *GetPlanCustomersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPlanDetails

func (c *Client) GetPlanDetails(ctx context.Context, planId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPlanPriceAdjustments

func (c *Client) GetPlanPriceAdjustments(ctx context.Context, customerId openapi_types.UUID, customerPlanId openapi_types.UUID, params *GetPlanPriceAdjustmentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetUsageBatch

func (c *Client) GetUsageBatch(ctx context.Context, params *GetUsageBatchParams, body GetUsageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetUsageBatchWithBody

func (c *Client) GetUsageBatchWithBody(ctx context.Context, params *GetUsageBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Ingest

func (c *Client) Ingest(ctx context.Context, body IngestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) IngestWithBody

func (c *Client) IngestWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListBillableMetrics

func (c *Client) ListBillableMetrics(ctx context.Context, customerId openapi_types.UUID, params *ListBillableMetricsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCreditLedgerEntries

func (c *Client) ListCreditLedgerEntries(ctx context.Context, params *ListCreditLedgerEntriesParams, body ListCreditLedgerEntriesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCreditLedgerEntriesWithBody

func (c *Client) ListCreditLedgerEntriesWithBody(ctx context.Context, params *ListCreditLedgerEntriesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCreditTypes

func (c *Client) ListCreditTypes(ctx context.Context, params *ListCreditTypesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCustomFieldKeys

func (c *Client) ListCustomFieldKeys(ctx context.Context, params *ListCustomFieldKeysParams, body ListCustomFieldKeysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCustomFieldKeysWithBody

func (c *Client) ListCustomFieldKeysWithBody(ctx context.Context, params *ListCustomFieldKeysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCustomerAlerts

func (c *Client) ListCustomerAlerts(ctx context.Context, params *ListCustomerAlertsParams, body ListCustomerAlertsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCustomerAlertsWithBody

func (c *Client) ListCustomerAlertsWithBody(ctx context.Context, params *ListCustomerAlertsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCustomerPlans

func (c *Client) ListCustomerPlans(ctx context.Context, customerId openapi_types.UUID, params *ListCustomerPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCustomers

func (c *Client) ListCustomers(ctx context.Context, params *ListCustomersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListGrants

func (c *Client) ListGrants(ctx context.Context, params *ListGrantsParams, body ListGrantsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListGrantsWithBody

func (c *Client) ListGrantsWithBody(ctx context.Context, params *ListGrantsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListInvoices

func (c *Client) ListInvoices(ctx context.Context, customerId openapi_types.UUID, params *ListInvoicesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListPlans

func (c *Client) ListPlans(ctx context.Context, params *ListPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetBillingConfigForCustomer

func (c *Client) SetBillingConfigForCustomer(ctx context.Context, customerId openapi_types.UUID, billingProviderType SetBillingConfigForCustomerParamsBillingProviderType, body SetBillingConfigForCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetBillingConfigForCustomerWithBody

func (c *Client) SetBillingConfigForCustomerWithBody(ctx context.Context, customerId openapi_types.UUID, billingProviderType SetBillingConfigForCustomerParamsBillingProviderType, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetCustomFields

func (c *Client) SetCustomFields(ctx context.Context, body SetCustomFieldsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetCustomFieldsWithBody

func (c *Client) SetCustomFieldsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetCustomerName

func (c *Client) SetCustomerName(ctx context.Context, customerId openapi_types.UUID, body SetCustomerNameJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetCustomerNameWithBody

func (c *Client) SetCustomerNameWithBody(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetIngestAliases

func (c *Client) SetIngestAliases(ctx context.Context, customerId openapi_types.UUID, body SetIngestAliasesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetIngestAliasesWithBody

func (c *Client) SetIngestAliasesWithBody(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateCustomerConfig

func (c *Client) UpdateCustomerConfig(ctx context.Context, customerId openapi_types.UUID, body UpdateCustomerConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateCustomerConfigWithBody

func (c *Client) UpdateCustomerConfigWithBody(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) VoidGrant

func (c *Client) VoidGrant(ctx context.Context, body VoidGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) VoidGrantWithBody

func (c *Client) VoidGrantWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// ArchiveAlertWithBody request with any body
	ArchiveAlertWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ArchiveAlert(ctx context.Context, body ArchiveAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateAlertWithBody request with any body
	CreateAlertWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateAlert(ctx context.Context, body CreateAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetAuditLogs request
	GetAuditLogs(ctx context.Context, params *GetAuditLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListCreditTypes request
	ListCreditTypes(ctx context.Context, params *ListCreditTypesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateGrantWithBody request with any body
	CreateGrantWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateGrant(ctx context.Context, body CreateGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// EditGrantWithBody request with any body
	EditGrantWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	EditGrant(ctx context.Context, body EditGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListCreditLedgerEntriesWithBody request with any body
	ListCreditLedgerEntriesWithBody(ctx context.Context, params *ListCreditLedgerEntriesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ListCreditLedgerEntries(ctx context.Context, params *ListCreditLedgerEntriesParams, body ListCreditLedgerEntriesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListGrantsWithBody request with any body
	ListGrantsWithBody(ctx context.Context, params *ListGrantsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ListGrants(ctx context.Context, params *ListGrantsParams, body ListGrantsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// VoidGrantWithBody request with any body
	VoidGrantWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	VoidGrant(ctx context.Context, body VoidGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AddCustomFieldKeyWithBody request with any body
	AddCustomFieldKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AddCustomFieldKey(ctx context.Context, body AddCustomFieldKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteCustomFieldsWithBody request with any body
	DeleteCustomFieldsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	DeleteCustomFields(ctx context.Context, body DeleteCustomFieldsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListCustomFieldKeysWithBody request with any body
	ListCustomFieldKeysWithBody(ctx context.Context, params *ListCustomFieldKeysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ListCustomFieldKeys(ctx context.Context, params *ListCustomFieldKeysParams, body ListCustomFieldKeysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DisableCustomFieldKeyWithBody request with any body
	DisableCustomFieldKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	DisableCustomFieldKey(ctx context.Context, body DisableCustomFieldKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SetCustomFieldsWithBody request with any body
	SetCustomFieldsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SetCustomFields(ctx context.Context, body SetCustomFieldsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCustomerAlertWithBody request with any body
	GetCustomerAlertWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	GetCustomerAlert(ctx context.Context, body GetCustomerAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListCustomerAlertsWithBody request with any body
	ListCustomerAlertsWithBody(ctx context.Context, params *ListCustomerAlertsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ListCustomerAlerts(ctx context.Context, params *ListCustomerAlertsParams, body ListCustomerAlertsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListCustomers request
	ListCustomers(ctx context.Context, params *ListCustomersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateCustomerWithBody request with any body
	CreateCustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateCustomer(ctx context.Context, body CreateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ArchiveCustomerWithBody request with any body
	ArchiveCustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ArchiveCustomer(ctx context.Context, body ArchiveCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCustomer request
	GetCustomer(ctx context.Context, customerId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AddOneTimeChargeWithBody request with any body
	AddOneTimeChargeWithBody(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AddOneTimeCharge(ctx context.Context, customerId openapi_types.UUID, body AddOneTimeChargeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListBillableMetrics request
	ListBillableMetrics(ctx context.Context, customerId openapi_types.UUID, params *ListBillableMetricsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteBillingConfigForCustomer request
	DeleteBillingConfigForCustomer(ctx context.Context, customerId openapi_types.UUID, billingProviderType DeleteBillingConfigForCustomerParamsBillingProviderType, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetBillingConfig request
	GetBillingConfig(ctx context.Context, customerId openapi_types.UUID, billingProviderType GetBillingConfigParamsBillingProviderType, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SetBillingConfigForCustomerWithBody request with any body
	SetBillingConfigForCustomerWithBody(ctx context.Context, customerId openapi_types.UUID, billingProviderType SetBillingConfigForCustomerParamsBillingProviderType, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SetBillingConfigForCustomer(ctx context.Context, customerId openapi_types.UUID, billingProviderType SetBillingConfigForCustomerParamsBillingProviderType, body SetBillingConfigForCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCosts request
	GetCosts(ctx context.Context, customerId openapi_types.UUID, params *GetCostsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListInvoices request
	ListInvoices(ctx context.Context, customerId openapi_types.UUID, params *ListInvoicesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetInvoice request
	GetInvoice(ctx context.Context, customerId openapi_types.UUID, invoiceId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListCustomerPlans request
	ListCustomerPlans(ctx context.Context, customerId openapi_types.UUID, params *ListCustomerPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AddPlanToCustomerWithBody request with any body
	AddPlanToCustomerWithBody(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AddPlanToCustomer(ctx context.Context, customerId openapi_types.UUID, body AddPlanToCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// EndCustomerPlanWithBody request with any body
	EndCustomerPlanWithBody(ctx context.Context, customerId openapi_types.UUID, customerPlanId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	EndCustomerPlan(ctx context.Context, customerId openapi_types.UUID, customerPlanId openapi_types.UUID, body EndCustomerPlanJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPlanPriceAdjustments request
	GetPlanPriceAdjustments(ctx context.Context, customerId openapi_types.UUID, customerPlanId openapi_types.UUID, params *GetPlanPriceAdjustmentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SetIngestAliasesWithBody request with any body
	SetIngestAliasesWithBody(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SetIngestAliases(ctx context.Context, customerId openapi_types.UUID, body SetIngestAliasesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SetCustomerNameWithBody request with any body
	SetCustomerNameWithBody(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SetCustomerName(ctx context.Context, customerId openapi_types.UUID, body SetCustomerNameJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateCustomerConfigWithBody request with any body
	UpdateCustomerConfigWithBody(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateCustomerConfig(ctx context.Context, customerId openapi_types.UUID, body UpdateCustomerConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// EmbeddableDashboardWithBody request with any body
	EmbeddableDashboardWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	EmbeddableDashboard(ctx context.Context, body EmbeddableDashboardJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// IngestWithBody request with any body
	IngestWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	Ingest(ctx context.Context, body IngestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPlanDetails request
	GetPlanDetails(ctx context.Context, planId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPlanCharges request
	GetPlanCharges(ctx context.Context, planId openapi_types.UUID, params *GetPlanChargesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPlanCustomers request
	GetPlanCustomers(ctx context.Context, planId openapi_types.UUID, params *GetPlanCustomersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListPlans request
	ListPlans(ctx context.Context, params *ListPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetUsageBatchWithBody request with any body
	GetUsageBatchWithBody(ctx context.Context, params *GetUsageBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	GetUsageBatch(ctx context.Context, params *GetUsageBatchParams, body GetUsageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPagedUsageWithBody request with any body
	GetPagedUsageWithBody(ctx context.Context, params *GetPagedUsageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	GetPagedUsage(ctx context.Context, params *GetPagedUsageParams, body GetPagedUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) AddCustomFieldKeyWithBodyWithResponse

func (c *ClientWithResponses) AddCustomFieldKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddCustomFieldKeyResponse, error)

AddCustomFieldKeyWithBodyWithResponse request with arbitrary body returning *AddCustomFieldKeyResponse

func (*ClientWithResponses) AddCustomFieldKeyWithResponse

func (c *ClientWithResponses) AddCustomFieldKeyWithResponse(ctx context.Context, body AddCustomFieldKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*AddCustomFieldKeyResponse, error)

func (*ClientWithResponses) AddOneTimeChargeWithBodyWithResponse added in v0.1.7

func (c *ClientWithResponses) AddOneTimeChargeWithBodyWithResponse(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddOneTimeChargeResponse, error)

AddOneTimeChargeWithBodyWithResponse request with arbitrary body returning *AddOneTimeChargeResponse

func (*ClientWithResponses) AddOneTimeChargeWithResponse added in v0.1.7

func (c *ClientWithResponses) AddOneTimeChargeWithResponse(ctx context.Context, customerId openapi_types.UUID, body AddOneTimeChargeJSONRequestBody, reqEditors ...RequestEditorFn) (*AddOneTimeChargeResponse, error)

func (*ClientWithResponses) AddPlanToCustomerWithBodyWithResponse

func (c *ClientWithResponses) AddPlanToCustomerWithBodyWithResponse(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddPlanToCustomerResponse, error)

AddPlanToCustomerWithBodyWithResponse request with arbitrary body returning *AddPlanToCustomerResponse

func (*ClientWithResponses) AddPlanToCustomerWithResponse

func (c *ClientWithResponses) AddPlanToCustomerWithResponse(ctx context.Context, customerId openapi_types.UUID, body AddPlanToCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*AddPlanToCustomerResponse, error)

func (*ClientWithResponses) ArchiveAlertWithBodyWithResponse

func (c *ClientWithResponses) ArchiveAlertWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ArchiveAlertResponse, error)

ArchiveAlertWithBodyWithResponse request with arbitrary body returning *ArchiveAlertResponse

func (*ClientWithResponses) ArchiveAlertWithResponse

func (c *ClientWithResponses) ArchiveAlertWithResponse(ctx context.Context, body ArchiveAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*ArchiveAlertResponse, error)

func (*ClientWithResponses) ArchiveCustomerWithBodyWithResponse added in v0.1.3

func (c *ClientWithResponses) ArchiveCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ArchiveCustomerResponse, error)

ArchiveCustomerWithBodyWithResponse request with arbitrary body returning *ArchiveCustomerResponse

func (*ClientWithResponses) ArchiveCustomerWithResponse added in v0.1.3

func (c *ClientWithResponses) ArchiveCustomerWithResponse(ctx context.Context, body ArchiveCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*ArchiveCustomerResponse, error)

func (*ClientWithResponses) CreateAlertWithBodyWithResponse

func (c *ClientWithResponses) CreateAlertWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAlertResponse, error)

CreateAlertWithBodyWithResponse request with arbitrary body returning *CreateAlertResponse

func (*ClientWithResponses) CreateAlertWithResponse

func (c *ClientWithResponses) CreateAlertWithResponse(ctx context.Context, body CreateAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAlertResponse, error)

func (*ClientWithResponses) CreateCustomerWithBodyWithResponse

func (c *ClientWithResponses) CreateCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCustomerResponse, error)

CreateCustomerWithBodyWithResponse request with arbitrary body returning *CreateCustomerResponse

func (*ClientWithResponses) CreateCustomerWithResponse

func (c *ClientWithResponses) CreateCustomerWithResponse(ctx context.Context, body CreateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCustomerResponse, error)

func (*ClientWithResponses) CreateGrantWithBodyWithResponse

func (c *ClientWithResponses) CreateGrantWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateGrantResponse, error)

CreateGrantWithBodyWithResponse request with arbitrary body returning *CreateGrantResponse

func (*ClientWithResponses) CreateGrantWithResponse

func (c *ClientWithResponses) CreateGrantWithResponse(ctx context.Context, body CreateGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateGrantResponse, error)

func (*ClientWithResponses) DeleteBillingConfigForCustomerWithResponse

func (c *ClientWithResponses) DeleteBillingConfigForCustomerWithResponse(ctx context.Context, customerId openapi_types.UUID, billingProviderType DeleteBillingConfigForCustomerParamsBillingProviderType, reqEditors ...RequestEditorFn) (*DeleteBillingConfigForCustomerResponse, error)

DeleteBillingConfigForCustomerWithResponse request returning *DeleteBillingConfigForCustomerResponse

func (*ClientWithResponses) DeleteCustomFieldsWithBodyWithResponse

func (c *ClientWithResponses) DeleteCustomFieldsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteCustomFieldsResponse, error)

DeleteCustomFieldsWithBodyWithResponse request with arbitrary body returning *DeleteCustomFieldsResponse

func (*ClientWithResponses) DeleteCustomFieldsWithResponse

func (c *ClientWithResponses) DeleteCustomFieldsWithResponse(ctx context.Context, body DeleteCustomFieldsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteCustomFieldsResponse, error)

func (*ClientWithResponses) DisableCustomFieldKeyWithBodyWithResponse

func (c *ClientWithResponses) DisableCustomFieldKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DisableCustomFieldKeyResponse, error)

DisableCustomFieldKeyWithBodyWithResponse request with arbitrary body returning *DisableCustomFieldKeyResponse

func (*ClientWithResponses) DisableCustomFieldKeyWithResponse

func (c *ClientWithResponses) DisableCustomFieldKeyWithResponse(ctx context.Context, body DisableCustomFieldKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*DisableCustomFieldKeyResponse, error)

func (*ClientWithResponses) EditGrantWithBodyWithResponse added in v0.1.7

func (c *ClientWithResponses) EditGrantWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EditGrantResponse, error)

EditGrantWithBodyWithResponse request with arbitrary body returning *EditGrantResponse

func (*ClientWithResponses) EditGrantWithResponse added in v0.1.7

func (c *ClientWithResponses) EditGrantWithResponse(ctx context.Context, body EditGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*EditGrantResponse, error)

func (*ClientWithResponses) EmbeddableDashboardWithBodyWithResponse

func (c *ClientWithResponses) EmbeddableDashboardWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmbeddableDashboardResponse, error)

EmbeddableDashboardWithBodyWithResponse request with arbitrary body returning *EmbeddableDashboardResponse

func (*ClientWithResponses) EmbeddableDashboardWithResponse

func (c *ClientWithResponses) EmbeddableDashboardWithResponse(ctx context.Context, body EmbeddableDashboardJSONRequestBody, reqEditors ...RequestEditorFn) (*EmbeddableDashboardResponse, error)

func (*ClientWithResponses) EndCustomerPlanWithBodyWithResponse

func (c *ClientWithResponses) EndCustomerPlanWithBodyWithResponse(ctx context.Context, customerId openapi_types.UUID, customerPlanId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EndCustomerPlanResponse, error)

EndCustomerPlanWithBodyWithResponse request with arbitrary body returning *EndCustomerPlanResponse

func (*ClientWithResponses) EndCustomerPlanWithResponse

func (c *ClientWithResponses) EndCustomerPlanWithResponse(ctx context.Context, customerId openapi_types.UUID, customerPlanId openapi_types.UUID, body EndCustomerPlanJSONRequestBody, reqEditors ...RequestEditorFn) (*EndCustomerPlanResponse, error)

func (*ClientWithResponses) GetAuditLogsWithResponse added in v0.1.5

func (c *ClientWithResponses) GetAuditLogsWithResponse(ctx context.Context, params *GetAuditLogsParams, reqEditors ...RequestEditorFn) (*GetAuditLogsResponse, error)

GetAuditLogsWithResponse request returning *GetAuditLogsResponse

func (*ClientWithResponses) GetBillingConfigWithResponse

func (c *ClientWithResponses) GetBillingConfigWithResponse(ctx context.Context, customerId openapi_types.UUID, billingProviderType GetBillingConfigParamsBillingProviderType, reqEditors ...RequestEditorFn) (*GetBillingConfigResponse, error)

GetBillingConfigWithResponse request returning *GetBillingConfigResponse

func (*ClientWithResponses) GetCostsWithResponse

func (c *ClientWithResponses) GetCostsWithResponse(ctx context.Context, customerId openapi_types.UUID, params *GetCostsParams, reqEditors ...RequestEditorFn) (*GetCostsResponse, error)

GetCostsWithResponse request returning *GetCostsResponse

func (*ClientWithResponses) GetCustomerAlertWithBodyWithResponse

func (c *ClientWithResponses) GetCustomerAlertWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetCustomerAlertResponse, error)

GetCustomerAlertWithBodyWithResponse request with arbitrary body returning *GetCustomerAlertResponse

func (*ClientWithResponses) GetCustomerAlertWithResponse

func (c *ClientWithResponses) GetCustomerAlertWithResponse(ctx context.Context, body GetCustomerAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*GetCustomerAlertResponse, error)

func (*ClientWithResponses) GetCustomerWithResponse

func (c *ClientWithResponses) GetCustomerWithResponse(ctx context.Context, customerId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetCustomerResponse, error)

GetCustomerWithResponse request returning *GetCustomerResponse

func (*ClientWithResponses) GetInvoiceWithResponse

func (c *ClientWithResponses) GetInvoiceWithResponse(ctx context.Context, customerId openapi_types.UUID, invoiceId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetInvoiceResponse, error)

GetInvoiceWithResponse request returning *GetInvoiceResponse

func (*ClientWithResponses) GetPagedUsageWithBodyWithResponse

func (c *ClientWithResponses) GetPagedUsageWithBodyWithResponse(ctx context.Context, params *GetPagedUsageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetPagedUsageResponse, error)

GetPagedUsageWithBodyWithResponse request with arbitrary body returning *GetPagedUsageResponse

func (*ClientWithResponses) GetPagedUsageWithResponse

func (c *ClientWithResponses) GetPagedUsageWithResponse(ctx context.Context, params *GetPagedUsageParams, body GetPagedUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*GetPagedUsageResponse, error)

func (*ClientWithResponses) GetPlanChargesWithResponse

func (c *ClientWithResponses) GetPlanChargesWithResponse(ctx context.Context, planId openapi_types.UUID, params *GetPlanChargesParams, reqEditors ...RequestEditorFn) (*GetPlanChargesResponse, error)

GetPlanChargesWithResponse request returning *GetPlanChargesResponse

func (*ClientWithResponses) GetPlanCustomersWithResponse added in v0.1.7

func (c *ClientWithResponses) GetPlanCustomersWithResponse(ctx context.Context, planId openapi_types.UUID, params *GetPlanCustomersParams, reqEditors ...RequestEditorFn) (*GetPlanCustomersResponse, error)

GetPlanCustomersWithResponse request returning *GetPlanCustomersResponse

func (*ClientWithResponses) GetPlanDetailsWithResponse

func (c *ClientWithResponses) GetPlanDetailsWithResponse(ctx context.Context, planId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetPlanDetailsResponse, error)

GetPlanDetailsWithResponse request returning *GetPlanDetailsResponse

func (*ClientWithResponses) GetPlanPriceAdjustmentsWithResponse

func (c *ClientWithResponses) GetPlanPriceAdjustmentsWithResponse(ctx context.Context, customerId openapi_types.UUID, customerPlanId openapi_types.UUID, params *GetPlanPriceAdjustmentsParams, reqEditors ...RequestEditorFn) (*GetPlanPriceAdjustmentsResponse, error)

GetPlanPriceAdjustmentsWithResponse request returning *GetPlanPriceAdjustmentsResponse

func (*ClientWithResponses) GetUsageBatchWithBodyWithResponse

func (c *ClientWithResponses) GetUsageBatchWithBodyWithResponse(ctx context.Context, params *GetUsageBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetUsageBatchResponse, error)

GetUsageBatchWithBodyWithResponse request with arbitrary body returning *GetUsageBatchResponse

func (*ClientWithResponses) GetUsageBatchWithResponse

func (c *ClientWithResponses) GetUsageBatchWithResponse(ctx context.Context, params *GetUsageBatchParams, body GetUsageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*GetUsageBatchResponse, error)

func (*ClientWithResponses) IngestWithBodyWithResponse

func (c *ClientWithResponses) IngestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IngestResponse, error)

IngestWithBodyWithResponse request with arbitrary body returning *IngestResponse

func (*ClientWithResponses) IngestWithResponse

func (c *ClientWithResponses) IngestWithResponse(ctx context.Context, body IngestJSONRequestBody, reqEditors ...RequestEditorFn) (*IngestResponse, error)

func (*ClientWithResponses) ListBillableMetricsWithResponse

func (c *ClientWithResponses) ListBillableMetricsWithResponse(ctx context.Context, customerId openapi_types.UUID, params *ListBillableMetricsParams, reqEditors ...RequestEditorFn) (*ListBillableMetricsResponse, error)

ListBillableMetricsWithResponse request returning *ListBillableMetricsResponse

func (*ClientWithResponses) ListCreditLedgerEntriesWithBodyWithResponse

func (c *ClientWithResponses) ListCreditLedgerEntriesWithBodyWithResponse(ctx context.Context, params *ListCreditLedgerEntriesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ListCreditLedgerEntriesResponse, error)

ListCreditLedgerEntriesWithBodyWithResponse request with arbitrary body returning *ListCreditLedgerEntriesResponse

func (*ClientWithResponses) ListCreditTypesWithResponse

func (c *ClientWithResponses) ListCreditTypesWithResponse(ctx context.Context, params *ListCreditTypesParams, reqEditors ...RequestEditorFn) (*ListCreditTypesResponse, error)

ListCreditTypesWithResponse request returning *ListCreditTypesResponse

func (*ClientWithResponses) ListCustomFieldKeysWithBodyWithResponse

func (c *ClientWithResponses) ListCustomFieldKeysWithBodyWithResponse(ctx context.Context, params *ListCustomFieldKeysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ListCustomFieldKeysResponse, error)

ListCustomFieldKeysWithBodyWithResponse request with arbitrary body returning *ListCustomFieldKeysResponse

func (*ClientWithResponses) ListCustomFieldKeysWithResponse

func (*ClientWithResponses) ListCustomerAlertsWithBodyWithResponse

func (c *ClientWithResponses) ListCustomerAlertsWithBodyWithResponse(ctx context.Context, params *ListCustomerAlertsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ListCustomerAlertsResponse, error)

ListCustomerAlertsWithBodyWithResponse request with arbitrary body returning *ListCustomerAlertsResponse

func (*ClientWithResponses) ListCustomerAlertsWithResponse

func (*ClientWithResponses) ListCustomerPlansWithResponse

func (c *ClientWithResponses) ListCustomerPlansWithResponse(ctx context.Context, customerId openapi_types.UUID, params *ListCustomerPlansParams, reqEditors ...RequestEditorFn) (*ListCustomerPlansResponse, error)

ListCustomerPlansWithResponse request returning *ListCustomerPlansResponse

func (*ClientWithResponses) ListCustomersWithResponse

func (c *ClientWithResponses) ListCustomersWithResponse(ctx context.Context, params *ListCustomersParams, reqEditors ...RequestEditorFn) (*ListCustomersResponse, error)

ListCustomersWithResponse request returning *ListCustomersResponse

func (*ClientWithResponses) ListGrantsWithBodyWithResponse

func (c *ClientWithResponses) ListGrantsWithBodyWithResponse(ctx context.Context, params *ListGrantsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ListGrantsResponse, error)

ListGrantsWithBodyWithResponse request with arbitrary body returning *ListGrantsResponse

func (*ClientWithResponses) ListGrantsWithResponse

func (c *ClientWithResponses) ListGrantsWithResponse(ctx context.Context, params *ListGrantsParams, body ListGrantsJSONRequestBody, reqEditors ...RequestEditorFn) (*ListGrantsResponse, error)

func (*ClientWithResponses) ListInvoicesWithResponse

func (c *ClientWithResponses) ListInvoicesWithResponse(ctx context.Context, customerId openapi_types.UUID, params *ListInvoicesParams, reqEditors ...RequestEditorFn) (*ListInvoicesResponse, error)

ListInvoicesWithResponse request returning *ListInvoicesResponse

func (*ClientWithResponses) ListPlansWithResponse

func (c *ClientWithResponses) ListPlansWithResponse(ctx context.Context, params *ListPlansParams, reqEditors ...RequestEditorFn) (*ListPlansResponse, error)

ListPlansWithResponse request returning *ListPlansResponse

func (*ClientWithResponses) SetBillingConfigForCustomerWithBodyWithResponse

func (c *ClientWithResponses) SetBillingConfigForCustomerWithBodyWithResponse(ctx context.Context, customerId openapi_types.UUID, billingProviderType SetBillingConfigForCustomerParamsBillingProviderType, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetBillingConfigForCustomerResponse, error)

SetBillingConfigForCustomerWithBodyWithResponse request with arbitrary body returning *SetBillingConfigForCustomerResponse

func (*ClientWithResponses) SetCustomFieldsWithBodyWithResponse

func (c *ClientWithResponses) SetCustomFieldsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetCustomFieldsResponse, error)

SetCustomFieldsWithBodyWithResponse request with arbitrary body returning *SetCustomFieldsResponse

func (*ClientWithResponses) SetCustomFieldsWithResponse

func (c *ClientWithResponses) SetCustomFieldsWithResponse(ctx context.Context, body SetCustomFieldsJSONRequestBody, reqEditors ...RequestEditorFn) (*SetCustomFieldsResponse, error)

func (*ClientWithResponses) SetCustomerNameWithBodyWithResponse

func (c *ClientWithResponses) SetCustomerNameWithBodyWithResponse(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetCustomerNameResponse, error)

SetCustomerNameWithBodyWithResponse request with arbitrary body returning *SetCustomerNameResponse

func (*ClientWithResponses) SetCustomerNameWithResponse

func (c *ClientWithResponses) SetCustomerNameWithResponse(ctx context.Context, customerId openapi_types.UUID, body SetCustomerNameJSONRequestBody, reqEditors ...RequestEditorFn) (*SetCustomerNameResponse, error)

func (*ClientWithResponses) SetIngestAliasesWithBodyWithResponse

func (c *ClientWithResponses) SetIngestAliasesWithBodyWithResponse(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetIngestAliasesResponse, error)

SetIngestAliasesWithBodyWithResponse request with arbitrary body returning *SetIngestAliasesResponse

func (*ClientWithResponses) SetIngestAliasesWithResponse

func (c *ClientWithResponses) SetIngestAliasesWithResponse(ctx context.Context, customerId openapi_types.UUID, body SetIngestAliasesJSONRequestBody, reqEditors ...RequestEditorFn) (*SetIngestAliasesResponse, error)

func (*ClientWithResponses) UpdateCustomerConfigWithBodyWithResponse

func (c *ClientWithResponses) UpdateCustomerConfigWithBodyWithResponse(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCustomerConfigResponse, error)

UpdateCustomerConfigWithBodyWithResponse request with arbitrary body returning *UpdateCustomerConfigResponse

func (*ClientWithResponses) UpdateCustomerConfigWithResponse

func (c *ClientWithResponses) UpdateCustomerConfigWithResponse(ctx context.Context, customerId openapi_types.UUID, body UpdateCustomerConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCustomerConfigResponse, error)

func (*ClientWithResponses) VoidGrantWithBodyWithResponse

func (c *ClientWithResponses) VoidGrantWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VoidGrantResponse, error)

VoidGrantWithBodyWithResponse request with arbitrary body returning *VoidGrantResponse

func (*ClientWithResponses) VoidGrantWithResponse

func (c *ClientWithResponses) VoidGrantWithResponse(ctx context.Context, body VoidGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*VoidGrantResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// ArchiveAlertWithBodyWithResponse request with any body
	ArchiveAlertWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ArchiveAlertResponse, error)

	ArchiveAlertWithResponse(ctx context.Context, body ArchiveAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*ArchiveAlertResponse, error)

	// CreateAlertWithBodyWithResponse request with any body
	CreateAlertWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAlertResponse, error)

	CreateAlertWithResponse(ctx context.Context, body CreateAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAlertResponse, error)

	// GetAuditLogsWithResponse request
	GetAuditLogsWithResponse(ctx context.Context, params *GetAuditLogsParams, reqEditors ...RequestEditorFn) (*GetAuditLogsResponse, error)

	// ListCreditTypesWithResponse request
	ListCreditTypesWithResponse(ctx context.Context, params *ListCreditTypesParams, reqEditors ...RequestEditorFn) (*ListCreditTypesResponse, error)

	// CreateGrantWithBodyWithResponse request with any body
	CreateGrantWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateGrantResponse, error)

	CreateGrantWithResponse(ctx context.Context, body CreateGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateGrantResponse, error)

	// EditGrantWithBodyWithResponse request with any body
	EditGrantWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EditGrantResponse, error)

	EditGrantWithResponse(ctx context.Context, body EditGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*EditGrantResponse, error)

	// ListCreditLedgerEntriesWithBodyWithResponse request with any body
	ListCreditLedgerEntriesWithBodyWithResponse(ctx context.Context, params *ListCreditLedgerEntriesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ListCreditLedgerEntriesResponse, error)

	ListCreditLedgerEntriesWithResponse(ctx context.Context, params *ListCreditLedgerEntriesParams, body ListCreditLedgerEntriesJSONRequestBody, reqEditors ...RequestEditorFn) (*ListCreditLedgerEntriesResponse, error)

	// ListGrantsWithBodyWithResponse request with any body
	ListGrantsWithBodyWithResponse(ctx context.Context, params *ListGrantsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ListGrantsResponse, error)

	ListGrantsWithResponse(ctx context.Context, params *ListGrantsParams, body ListGrantsJSONRequestBody, reqEditors ...RequestEditorFn) (*ListGrantsResponse, error)

	// VoidGrantWithBodyWithResponse request with any body
	VoidGrantWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VoidGrantResponse, error)

	VoidGrantWithResponse(ctx context.Context, body VoidGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*VoidGrantResponse, error)

	// AddCustomFieldKeyWithBodyWithResponse request with any body
	AddCustomFieldKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddCustomFieldKeyResponse, error)

	AddCustomFieldKeyWithResponse(ctx context.Context, body AddCustomFieldKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*AddCustomFieldKeyResponse, error)

	// DeleteCustomFieldsWithBodyWithResponse request with any body
	DeleteCustomFieldsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteCustomFieldsResponse, error)

	DeleteCustomFieldsWithResponse(ctx context.Context, body DeleteCustomFieldsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteCustomFieldsResponse, error)

	// ListCustomFieldKeysWithBodyWithResponse request with any body
	ListCustomFieldKeysWithBodyWithResponse(ctx context.Context, params *ListCustomFieldKeysParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ListCustomFieldKeysResponse, error)

	ListCustomFieldKeysWithResponse(ctx context.Context, params *ListCustomFieldKeysParams, body ListCustomFieldKeysJSONRequestBody, reqEditors ...RequestEditorFn) (*ListCustomFieldKeysResponse, error)

	// DisableCustomFieldKeyWithBodyWithResponse request with any body
	DisableCustomFieldKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DisableCustomFieldKeyResponse, error)

	DisableCustomFieldKeyWithResponse(ctx context.Context, body DisableCustomFieldKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*DisableCustomFieldKeyResponse, error)

	// SetCustomFieldsWithBodyWithResponse request with any body
	SetCustomFieldsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetCustomFieldsResponse, error)

	SetCustomFieldsWithResponse(ctx context.Context, body SetCustomFieldsJSONRequestBody, reqEditors ...RequestEditorFn) (*SetCustomFieldsResponse, error)

	// GetCustomerAlertWithBodyWithResponse request with any body
	GetCustomerAlertWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetCustomerAlertResponse, error)

	GetCustomerAlertWithResponse(ctx context.Context, body GetCustomerAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*GetCustomerAlertResponse, error)

	// ListCustomerAlertsWithBodyWithResponse request with any body
	ListCustomerAlertsWithBodyWithResponse(ctx context.Context, params *ListCustomerAlertsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ListCustomerAlertsResponse, error)

	ListCustomerAlertsWithResponse(ctx context.Context, params *ListCustomerAlertsParams, body ListCustomerAlertsJSONRequestBody, reqEditors ...RequestEditorFn) (*ListCustomerAlertsResponse, error)

	// ListCustomersWithResponse request
	ListCustomersWithResponse(ctx context.Context, params *ListCustomersParams, reqEditors ...RequestEditorFn) (*ListCustomersResponse, error)

	// CreateCustomerWithBodyWithResponse request with any body
	CreateCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCustomerResponse, error)

	CreateCustomerWithResponse(ctx context.Context, body CreateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCustomerResponse, error)

	// ArchiveCustomerWithBodyWithResponse request with any body
	ArchiveCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ArchiveCustomerResponse, error)

	ArchiveCustomerWithResponse(ctx context.Context, body ArchiveCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*ArchiveCustomerResponse, error)

	// GetCustomerWithResponse request
	GetCustomerWithResponse(ctx context.Context, customerId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetCustomerResponse, error)

	// AddOneTimeChargeWithBodyWithResponse request with any body
	AddOneTimeChargeWithBodyWithResponse(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddOneTimeChargeResponse, error)

	AddOneTimeChargeWithResponse(ctx context.Context, customerId openapi_types.UUID, body AddOneTimeChargeJSONRequestBody, reqEditors ...RequestEditorFn) (*AddOneTimeChargeResponse, error)

	// ListBillableMetricsWithResponse request
	ListBillableMetricsWithResponse(ctx context.Context, customerId openapi_types.UUID, params *ListBillableMetricsParams, reqEditors ...RequestEditorFn) (*ListBillableMetricsResponse, error)

	// DeleteBillingConfigForCustomerWithResponse request
	DeleteBillingConfigForCustomerWithResponse(ctx context.Context, customerId openapi_types.UUID, billingProviderType DeleteBillingConfigForCustomerParamsBillingProviderType, reqEditors ...RequestEditorFn) (*DeleteBillingConfigForCustomerResponse, error)

	// GetBillingConfigWithResponse request
	GetBillingConfigWithResponse(ctx context.Context, customerId openapi_types.UUID, billingProviderType GetBillingConfigParamsBillingProviderType, reqEditors ...RequestEditorFn) (*GetBillingConfigResponse, error)

	// SetBillingConfigForCustomerWithBodyWithResponse request with any body
	SetBillingConfigForCustomerWithBodyWithResponse(ctx context.Context, customerId openapi_types.UUID, billingProviderType SetBillingConfigForCustomerParamsBillingProviderType, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetBillingConfigForCustomerResponse, error)

	SetBillingConfigForCustomerWithResponse(ctx context.Context, customerId openapi_types.UUID, billingProviderType SetBillingConfigForCustomerParamsBillingProviderType, body SetBillingConfigForCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*SetBillingConfigForCustomerResponse, error)

	// GetCostsWithResponse request
	GetCostsWithResponse(ctx context.Context, customerId openapi_types.UUID, params *GetCostsParams, reqEditors ...RequestEditorFn) (*GetCostsResponse, error)

	// ListInvoicesWithResponse request
	ListInvoicesWithResponse(ctx context.Context, customerId openapi_types.UUID, params *ListInvoicesParams, reqEditors ...RequestEditorFn) (*ListInvoicesResponse, error)

	// GetInvoiceWithResponse request
	GetInvoiceWithResponse(ctx context.Context, customerId openapi_types.UUID, invoiceId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetInvoiceResponse, error)

	// ListCustomerPlansWithResponse request
	ListCustomerPlansWithResponse(ctx context.Context, customerId openapi_types.UUID, params *ListCustomerPlansParams, reqEditors ...RequestEditorFn) (*ListCustomerPlansResponse, error)

	// AddPlanToCustomerWithBodyWithResponse request with any body
	AddPlanToCustomerWithBodyWithResponse(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddPlanToCustomerResponse, error)

	AddPlanToCustomerWithResponse(ctx context.Context, customerId openapi_types.UUID, body AddPlanToCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*AddPlanToCustomerResponse, error)

	// EndCustomerPlanWithBodyWithResponse request with any body
	EndCustomerPlanWithBodyWithResponse(ctx context.Context, customerId openapi_types.UUID, customerPlanId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EndCustomerPlanResponse, error)

	EndCustomerPlanWithResponse(ctx context.Context, customerId openapi_types.UUID, customerPlanId openapi_types.UUID, body EndCustomerPlanJSONRequestBody, reqEditors ...RequestEditorFn) (*EndCustomerPlanResponse, error)

	// GetPlanPriceAdjustmentsWithResponse request
	GetPlanPriceAdjustmentsWithResponse(ctx context.Context, customerId openapi_types.UUID, customerPlanId openapi_types.UUID, params *GetPlanPriceAdjustmentsParams, reqEditors ...RequestEditorFn) (*GetPlanPriceAdjustmentsResponse, error)

	// SetIngestAliasesWithBodyWithResponse request with any body
	SetIngestAliasesWithBodyWithResponse(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetIngestAliasesResponse, error)

	SetIngestAliasesWithResponse(ctx context.Context, customerId openapi_types.UUID, body SetIngestAliasesJSONRequestBody, reqEditors ...RequestEditorFn) (*SetIngestAliasesResponse, error)

	// SetCustomerNameWithBodyWithResponse request with any body
	SetCustomerNameWithBodyWithResponse(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetCustomerNameResponse, error)

	SetCustomerNameWithResponse(ctx context.Context, customerId openapi_types.UUID, body SetCustomerNameJSONRequestBody, reqEditors ...RequestEditorFn) (*SetCustomerNameResponse, error)

	// UpdateCustomerConfigWithBodyWithResponse request with any body
	UpdateCustomerConfigWithBodyWithResponse(ctx context.Context, customerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCustomerConfigResponse, error)

	UpdateCustomerConfigWithResponse(ctx context.Context, customerId openapi_types.UUID, body UpdateCustomerConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCustomerConfigResponse, error)

	// EmbeddableDashboardWithBodyWithResponse request with any body
	EmbeddableDashboardWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmbeddableDashboardResponse, error)

	EmbeddableDashboardWithResponse(ctx context.Context, body EmbeddableDashboardJSONRequestBody, reqEditors ...RequestEditorFn) (*EmbeddableDashboardResponse, error)

	// IngestWithBodyWithResponse request with any body
	IngestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IngestResponse, error)

	IngestWithResponse(ctx context.Context, body IngestJSONRequestBody, reqEditors ...RequestEditorFn) (*IngestResponse, error)

	// GetPlanDetailsWithResponse request
	GetPlanDetailsWithResponse(ctx context.Context, planId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetPlanDetailsResponse, error)

	// GetPlanChargesWithResponse request
	GetPlanChargesWithResponse(ctx context.Context, planId openapi_types.UUID, params *GetPlanChargesParams, reqEditors ...RequestEditorFn) (*GetPlanChargesResponse, error)

	// GetPlanCustomersWithResponse request
	GetPlanCustomersWithResponse(ctx context.Context, planId openapi_types.UUID, params *GetPlanCustomersParams, reqEditors ...RequestEditorFn) (*GetPlanCustomersResponse, error)

	// ListPlansWithResponse request
	ListPlansWithResponse(ctx context.Context, params *ListPlansParams, reqEditors ...RequestEditorFn) (*ListPlansResponse, error)

	// GetUsageBatchWithBodyWithResponse request with any body
	GetUsageBatchWithBodyWithResponse(ctx context.Context, params *GetUsageBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetUsageBatchResponse, error)

	GetUsageBatchWithResponse(ctx context.Context, params *GetUsageBatchParams, body GetUsageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*GetUsageBatchResponse, error)

	// GetPagedUsageWithBodyWithResponse request with any body
	GetPagedUsageWithBodyWithResponse(ctx context.Context, params *GetPagedUsageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetPagedUsageResponse, error)

	GetPagedUsageWithResponse(ctx context.Context, params *GetPagedUsageParams, body GetPagedUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*GetPagedUsageResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateAlertJSONBody added in v0.1.7

type CreateAlertJSONBody struct {
	// AlertType Type of the alert
	AlertType CreateAlertJSONBodyAlertType `json:"alert_type"`

	// BillableMetricId For alerts of type `usage_threshold_reached`, specifies which billable metric to track the usage for.
	BillableMetricId *openapi_types.UUID `json:"billable_metric_id,omitempty"`
	CreditTypeId     *openapi_types.UUID `json:"credit_type_id,omitempty"`

	// CustomFieldFilters Only present for beta contract invoices. This field's availability is dependent on your client's configuration. A list of custom field filters for alert types that support advanced filtering
	CustomFieldFilters *[]struct {
		Entity CreateAlertJSONBodyCustomFieldFiltersEntity `json:"entity"`
		Key    string                                      `json:"key"`
		Value  string                                      `json:"value"`
	} `json:"custom_field_filters,omitempty"`

	// CustomerId If provided, will create this alert for this specific customer. To create an alert for all customers, do not specify `customer_id` or `plan_id`.
	CustomerId *openapi_types.UUID `json:"customer_id,omitempty"`

	// EvaluateOnCreate 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 *bool `json:"evaluate_on_create,omitempty"`

	// Name Name of the alert
	Name string `json:"name"`

	// PlanId If provided, will create this alert for this specific plan. To create an alert for all customers, do not specify `customer_id` or `plan_id`.
	PlanId *openapi_types.UUID `json:"plan_id,omitempty"`

	// Threshold Threshold value of the alert policy
	Threshold float32 `json:"threshold"`
}

CreateAlertJSONBody defines parameters for CreateAlert.

type CreateAlertJSONBodyAlertType added in v0.1.7

type CreateAlertJSONBodyAlertType string

CreateAlertJSONBodyAlertType defines parameters for CreateAlert.

const (
	LowCreditBalanceReached                         CreateAlertJSONBodyAlertType = "low_credit_balance_reached"
	LowRemainingCommitBalanceReached                CreateAlertJSONBodyAlertType = "low_remaining_commit_balance_reached"
	LowRemainingCommitPercentageReached             CreateAlertJSONBodyAlertType = "low_remaining_commit_percentage_reached"
	LowRemainingContractCreditBalanceReached        CreateAlertJSONBodyAlertType = "low_remaining_contract_credit_balance_reached"
	LowRemainingContractCreditPercentageReached     CreateAlertJSONBodyAlertType = "low_remaining_contract_credit_percentage_reached"
	LowRemainingCreditPercentageReached             CreateAlertJSONBodyAlertType = "low_remaining_credit_percentage_reached"
	LowRemainingDaysForCommitSegmentReached         CreateAlertJSONBodyAlertType = "low_remaining_days_for_commit_segment_reached"
	LowRemainingDaysForContractCreditSegmentReached CreateAlertJSONBodyAlertType = "low_remaining_days_for_contract_credit_segment_reached"
	LowRemainingDaysInPlanReached                   CreateAlertJSONBodyAlertType = "low_remaining_days_in_plan_reached"
	MonthlyInvoiceTotalSpendThresholdReached        CreateAlertJSONBodyAlertType = "monthly_invoice_total_spend_threshold_reached"
	SpendThresholdReached                           CreateAlertJSONBodyAlertType = "spend_threshold_reached"
	UsageThresholdReached                           CreateAlertJSONBodyAlertType = "usage_threshold_reached"
)

Defines values for CreateAlertJSONBodyAlertType.

type CreateAlertJSONBodyCustomFieldFiltersEntity added in v0.1.7

type CreateAlertJSONBodyCustomFieldFiltersEntity string

CreateAlertJSONBodyCustomFieldFiltersEntity defines parameters for CreateAlert.

const (
	CreateAlertJSONBodyCustomFieldFiltersEntityCommit         CreateAlertJSONBodyCustomFieldFiltersEntity = "Commit"
	CreateAlertJSONBodyCustomFieldFiltersEntityContract       CreateAlertJSONBodyCustomFieldFiltersEntity = "Contract"
	CreateAlertJSONBodyCustomFieldFiltersEntityContractCredit CreateAlertJSONBodyCustomFieldFiltersEntity = "ContractCredit"
)

Defines values for CreateAlertJSONBodyCustomFieldFiltersEntity.

type CreateAlertJSONRequestBody

type CreateAlertJSONRequestBody CreateAlertJSONBody

CreateAlertJSONRequestBody defines body for CreateAlert for application/json ContentType.

type CreateAlertResponse

type CreateAlertResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data struct {
			Id openapi_types.UUID `json:"id"`
		} `json:"data"`
	}
}

func ParseCreateAlertResponse

func ParseCreateAlertResponse(rsp *http.Response) (*CreateAlertResponse, error)

ParseCreateAlertResponse parses an HTTP response from a CreateAlertWithResponse call

func (CreateAlertResponse) Status

func (r CreateAlertResponse) Status() string

Status returns HTTPResponse.Status

func (CreateAlertResponse) StatusCode

func (r CreateAlertResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateCustomerJSONBody added in v0.1.7

type CreateCustomerJSONBody struct {
	BillingConfig *struct {
		AwsProductCode            *string                                                    `json:"aws_product_code,omitempty"`
		AwsRegion                 *CreateCustomerJSONBodyBillingConfigAwsRegion              `json:"aws_region,omitempty"`
		BillingProviderCustomerId string                                                     `json:"billing_provider_customer_id"`
		BillingProviderType       CreateCustomerJSONBodyBillingConfigBillingProviderType     `json:"billing_provider_type"`
		StripeCollectionMethod    *CreateCustomerJSONBodyBillingConfigStripeCollectionMethod `json:"stripe_collection_method,omitempty"`
	} `json:"billing_config,omitempty"`
	CustomFields *map[string]string `json:"custom_fields,omitempty"`

	// ExternalId (deprecated, use ingest_aliases instead) the first ID (Metronome ID or ingest alias) that can be used in usage events
	ExternalId *string `json:"external_id,omitempty"`

	// IngestAliases Aliases that can be used to refer to this customer in usage events
	IngestAliases *[]string `json:"ingest_aliases,omitempty"`
	Name          string    `json:"name"`
}

CreateCustomerJSONBody defines parameters for CreateCustomer.

type CreateCustomerJSONBodyBillingConfigAwsRegion added in v0.1.7

type CreateCustomerJSONBodyBillingConfigAwsRegion string

CreateCustomerJSONBodyBillingConfigAwsRegion defines parameters for CreateCustomer.

const (
	CreateCustomerJSONBodyBillingConfigAwsRegionAfSouth1     CreateCustomerJSONBodyBillingConfigAwsRegion = "af-south-1"
	CreateCustomerJSONBodyBillingConfigAwsRegionApEast1      CreateCustomerJSONBodyBillingConfigAwsRegion = "ap-east-1"
	CreateCustomerJSONBodyBillingConfigAwsRegionApNortheast1 CreateCustomerJSONBodyBillingConfigAwsRegion = "ap-northeast-1"
	CreateCustomerJSONBodyBillingConfigAwsRegionApNortheast2 CreateCustomerJSONBodyBillingConfigAwsRegion = "ap-northeast-2"
	CreateCustomerJSONBodyBillingConfigAwsRegionApNortheast3 CreateCustomerJSONBodyBillingConfigAwsRegion = "ap-northeast-3"
	CreateCustomerJSONBodyBillingConfigAwsRegionApSouth1     CreateCustomerJSONBodyBillingConfigAwsRegion = "ap-south-1"
	CreateCustomerJSONBodyBillingConfigAwsRegionApSoutheast1 CreateCustomerJSONBodyBillingConfigAwsRegion = "ap-southeast-1"
	CreateCustomerJSONBodyBillingConfigAwsRegionApSoutheast2 CreateCustomerJSONBodyBillingConfigAwsRegion = "ap-southeast-2"
	CreateCustomerJSONBodyBillingConfigAwsRegionCaCentral1   CreateCustomerJSONBodyBillingConfigAwsRegion = "ca-central-1"
	CreateCustomerJSONBodyBillingConfigAwsRegionCnNorth1     CreateCustomerJSONBodyBillingConfigAwsRegion = "cn-north-1"
	CreateCustomerJSONBodyBillingConfigAwsRegionCnNorthwest1 CreateCustomerJSONBodyBillingConfigAwsRegion = "cn-northwest-1"
	CreateCustomerJSONBodyBillingConfigAwsRegionEuCentral1   CreateCustomerJSONBodyBillingConfigAwsRegion = "eu-central-1"
	CreateCustomerJSONBodyBillingConfigAwsRegionEuNorth1     CreateCustomerJSONBodyBillingConfigAwsRegion = "eu-north-1"
	CreateCustomerJSONBodyBillingConfigAwsRegionEuSouth1     CreateCustomerJSONBodyBillingConfigAwsRegion = "eu-south-1"
	CreateCustomerJSONBodyBillingConfigAwsRegionEuWest1      CreateCustomerJSONBodyBillingConfigAwsRegion = "eu-west-1"
	CreateCustomerJSONBodyBillingConfigAwsRegionEuWest2      CreateCustomerJSONBodyBillingConfigAwsRegion = "eu-west-2"
	CreateCustomerJSONBodyBillingConfigAwsRegionEuWest3      CreateCustomerJSONBodyBillingConfigAwsRegion = "eu-west-3"
	CreateCustomerJSONBodyBillingConfigAwsRegionMeSouth1     CreateCustomerJSONBodyBillingConfigAwsRegion = "me-south-1"
	CreateCustomerJSONBodyBillingConfigAwsRegionSaEast1      CreateCustomerJSONBodyBillingConfigAwsRegion = "sa-east-1"
	CreateCustomerJSONBodyBillingConfigAwsRegionUsEast1      CreateCustomerJSONBodyBillingConfigAwsRegion = "us-east-1"
	CreateCustomerJSONBodyBillingConfigAwsRegionUsEast2      CreateCustomerJSONBodyBillingConfigAwsRegion = "us-east-2"
	CreateCustomerJSONBodyBillingConfigAwsRegionUsGovEast1   CreateCustomerJSONBodyBillingConfigAwsRegion = "us-gov-east-1"
	CreateCustomerJSONBodyBillingConfigAwsRegionUsGovWest1   CreateCustomerJSONBodyBillingConfigAwsRegion = "us-gov-west-1"
	CreateCustomerJSONBodyBillingConfigAwsRegionUsWest1      CreateCustomerJSONBodyBillingConfigAwsRegion = "us-west-1"
	CreateCustomerJSONBodyBillingConfigAwsRegionUsWest2      CreateCustomerJSONBodyBillingConfigAwsRegion = "us-west-2"
)

Defines values for CreateCustomerJSONBodyBillingConfigAwsRegion.

type CreateCustomerJSONBodyBillingConfigBillingProviderType added in v0.1.7

type CreateCustomerJSONBodyBillingConfigBillingProviderType string

CreateCustomerJSONBodyBillingConfigBillingProviderType defines parameters for CreateCustomer.

const (
	CreateCustomerJSONBodyBillingConfigBillingProviderTypeAwsMarketplace   CreateCustomerJSONBodyBillingConfigBillingProviderType = "aws_marketplace"
	CreateCustomerJSONBodyBillingConfigBillingProviderTypeAzureMarketplace CreateCustomerJSONBodyBillingConfigBillingProviderType = "azure_marketplace"
	CreateCustomerJSONBodyBillingConfigBillingProviderTypeCustom           CreateCustomerJSONBodyBillingConfigBillingProviderType = "custom"
	CreateCustomerJSONBodyBillingConfigBillingProviderTypeNetsuite         CreateCustomerJSONBodyBillingConfigBillingProviderType = "netsuite"
	CreateCustomerJSONBodyBillingConfigBillingProviderTypeQuickbooksOnline CreateCustomerJSONBodyBillingConfigBillingProviderType = "quickbooks_online"
	CreateCustomerJSONBodyBillingConfigBillingProviderTypeStripe           CreateCustomerJSONBodyBillingConfigBillingProviderType = "stripe"
	CreateCustomerJSONBodyBillingConfigBillingProviderTypeWorkday          CreateCustomerJSONBodyBillingConfigBillingProviderType = "workday"
)

Defines values for CreateCustomerJSONBodyBillingConfigBillingProviderType.

type CreateCustomerJSONBodyBillingConfigStripeCollectionMethod added in v0.1.7

type CreateCustomerJSONBodyBillingConfigStripeCollectionMethod string

CreateCustomerJSONBodyBillingConfigStripeCollectionMethod defines parameters for CreateCustomer.

const (
	CreateCustomerJSONBodyBillingConfigStripeCollectionMethodChargeAutomatically CreateCustomerJSONBodyBillingConfigStripeCollectionMethod = "charge_automatically"
	CreateCustomerJSONBodyBillingConfigStripeCollectionMethodSendInvoice         CreateCustomerJSONBodyBillingConfigStripeCollectionMethod = "send_invoice"
)

Defines values for CreateCustomerJSONBodyBillingConfigStripeCollectionMethod.

type CreateCustomerJSONRequestBody

type CreateCustomerJSONRequestBody CreateCustomerJSONBody

CreateCustomerJSONRequestBody defines body for CreateCustomer for application/json ContentType.

type CreateCustomerResponse

type CreateCustomerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data struct {
			CustomFields *map[string]string `json:"custom_fields,omitempty"`

			// ExternalId (deprecated, use ingest_aliases instead) the first ID (Metronome or ingest alias) that can be used in usage events
			ExternalId string `json:"external_id"`

			// Id the Metronome ID of the customer
			Id openapi_types.UUID `json:"id"`

			// IngestAliases aliases for this customer that can be used instead of the Metronome customer ID in usage events
			IngestAliases []string `json:"ingest_aliases"`
			Name          string   `json:"name"`
		} `json:"data"`
	}
	JSON409 *struct {
		Message *string `json:"message,omitempty"`
	}
}

func ParseCreateCustomerResponse

func ParseCreateCustomerResponse(rsp *http.Response) (*CreateCustomerResponse, error)

ParseCreateCustomerResponse parses an HTTP response from a CreateCustomerWithResponse call

func (CreateCustomerResponse) Status

func (r CreateCustomerResponse) Status() string

Status returns HTTPResponse.Status

func (CreateCustomerResponse) StatusCode

func (r CreateCustomerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateGrantJSONBody added in v0.1.7

type CreateGrantJSONBody struct {
	CreditGrantType *string `json:"credit_grant_type,omitempty"`

	// CustomerId the Metronome ID of the customer
	CustomerId openapi_types.UUID `json:"customer_id"`

	// EffectiveAt The credit grant will only apply to billing periods that end at or after this timestamp.
	EffectiveAt *time.Time `json:"effective_at,omitempty"`

	// ExpiresAt The credit grant will only apply to billing periods that end before this timestamp.
	ExpiresAt time.Time `json:"expires_at"`

	// GrantAmount the amount of credits granted
	GrantAmount struct {
		Amount       float32            `json:"amount"`
		CreditTypeId openapi_types.UUID `json:"credit_type_id"`
	} `json:"grant_amount"`

	// InvoiceDate The date to issue an invoice for the paid_amount.
	InvoiceDate *time.Time `json:"invoice_date,omitempty"`

	// Name the name of the credit grant as it will appear on invoices
	Name string `json:"name"`

	// PaidAmount the amount paid for this credit grant
	PaidAmount struct {
		Amount       float32            `json:"amount"`
		CreditTypeId openapi_types.UUID `json:"credit_type_id"`
	} `json:"paid_amount"`
	Priority float32 `json:"priority"`

	// ProductIds The product(s) which these credits will be applied to. (If unspecified, the credits will be applied to charges for all products.). The array ordering specified here will be used to determine the order in which credits will be applied to invoice line items
	ProductIds *[]openapi_types.UUID `json:"product_ids,omitempty"`
	Reason     *string               `json:"reason,omitempty"`

	// RolloverSettings Configure a rollover for this credit grant so if it expires it rolls over a configured amount to a new credit grant. This feature is currently opt-in only. Contact Metronome to be added to the beta.
	RolloverSettings *struct {
		// ExpiresAt The date to expire the rollover credits.
		ExpiresAt time.Time `json:"expires_at"`

		// Priority The priority to give the rollover credit grant that gets created when a rollover happens.
		Priority float32 `json:"priority"`

		// RolloverAmount Specify how much to rollover to the rollover credit grant
		RolloverAmount CreateGrantJSONBody_RolloverSettings_RolloverAmount `json:"rollover_amount"`
	} `json:"rollover_settings,omitempty"`

	// UniquenessKey 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,omitempty"`
}

CreateGrantJSONBody defines parameters for CreateGrant.

type CreateGrantJSONBodyRolloverSettingsRolloverAmount0 added in v0.1.7

type CreateGrantJSONBodyRolloverSettingsRolloverAmount0 struct {
	// Type Rollover up to a percentage of the original credit grant amount.
	Type CreateGrantJSONBodyRolloverSettingsRolloverAmount0Type `json:"type"`

	// Value The maximum percentage (0-1) of the original credit grant to rollover.
	Value float32 `json:"value"`
}

CreateGrantJSONBodyRolloverSettingsRolloverAmount0 defines parameters for CreateGrant.

type CreateGrantJSONBodyRolloverSettingsRolloverAmount1 added in v0.1.7

type CreateGrantJSONBodyRolloverSettingsRolloverAmount1 struct {
	// Type Rollover up to a fixed amount of the original credit grant amount.
	Type CreateGrantJSONBodyRolloverSettingsRolloverAmount1Type `json:"type"`

	// Value The maximum amount to rollover.
	Value float32 `json:"value"`
}

CreateGrantJSONBodyRolloverSettingsRolloverAmount1 defines parameters for CreateGrant.

type CreateGrantJSONBody_RolloverSettings_RolloverAmount added in v0.1.7

type CreateGrantJSONBody_RolloverSettings_RolloverAmount struct {
	// contains filtered or unexported fields
}

CreateGrantJSONBody_RolloverSettings_RolloverAmount defines parameters for CreateGrant.

type CreateGrantJSONRequestBody

type CreateGrantJSONRequestBody CreateGrantJSONBody

CreateGrantJSONRequestBody defines body for CreateGrant for application/json ContentType.

type CreateGrantResponse

type CreateGrantResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data struct {
			Id openapi_types.UUID `json:"id"`
		} `json:"data"`
	}
}

func ParseCreateGrantResponse

func ParseCreateGrantResponse(rsp *http.Response) (*CreateGrantResponse, error)

ParseCreateGrantResponse parses an HTTP response from a CreateGrantWithResponse call

func (CreateGrantResponse) Status

func (r CreateGrantResponse) Status() string

Status returns HTTPResponse.Status

func (CreateGrantResponse) StatusCode

func (r CreateGrantResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteBillingConfigForCustomerParamsBillingProviderType added in v0.1.7

type DeleteBillingConfigForCustomerParamsBillingProviderType string

DeleteBillingConfigForCustomerParamsBillingProviderType defines parameters for DeleteBillingConfigForCustomer.

const (
	DeleteBillingConfigForCustomerParamsBillingProviderTypeAwsMarketplace   DeleteBillingConfigForCustomerParamsBillingProviderType = "aws_marketplace"
	DeleteBillingConfigForCustomerParamsBillingProviderTypeAzureMarketplace DeleteBillingConfigForCustomerParamsBillingProviderType = "azure_marketplace"
	DeleteBillingConfigForCustomerParamsBillingProviderTypeCustom           DeleteBillingConfigForCustomerParamsBillingProviderType = "custom"
	DeleteBillingConfigForCustomerParamsBillingProviderTypeNetsuite         DeleteBillingConfigForCustomerParamsBillingProviderType = "netsuite"
	DeleteBillingConfigForCustomerParamsBillingProviderTypeQuickbooksOnline DeleteBillingConfigForCustomerParamsBillingProviderType = "quickbooks_online"
	DeleteBillingConfigForCustomerParamsBillingProviderTypeStripe           DeleteBillingConfigForCustomerParamsBillingProviderType = "stripe"
	DeleteBillingConfigForCustomerParamsBillingProviderTypeWorkday          DeleteBillingConfigForCustomerParamsBillingProviderType = "workday"
)

Defines values for DeleteBillingConfigForCustomerParamsBillingProviderType.

type DeleteBillingConfigForCustomerResponse

type DeleteBillingConfigForCustomerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON404      *struct {
		Message string `json:"message"`
	}
}

func ParseDeleteBillingConfigForCustomerResponse

func ParseDeleteBillingConfigForCustomerResponse(rsp *http.Response) (*DeleteBillingConfigForCustomerResponse, error)

ParseDeleteBillingConfigForCustomerResponse parses an HTTP response from a DeleteBillingConfigForCustomerWithResponse call

func (DeleteBillingConfigForCustomerResponse) Status

Status returns HTTPResponse.Status

func (DeleteBillingConfigForCustomerResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type DeleteCustomFieldsJSONBody

type DeleteCustomFieldsJSONBody struct {
	Entity   DeleteCustomFieldsJSONBodyEntity `json:"entity"`
	EntityId openapi_types.UUID               `json:"entity_id"`
	Keys     []string                         `json:"keys"`
}

DeleteCustomFieldsJSONBody defines parameters for DeleteCustomFields.

type DeleteCustomFieldsJSONBodyEntity added in v0.1.7

type DeleteCustomFieldsJSONBodyEntity string

DeleteCustomFieldsJSONBodyEntity defines parameters for DeleteCustomFields.

const (
	DeleteCustomFieldsJSONBodyEntityAlert               DeleteCustomFieldsJSONBodyEntity = "alert"
	DeleteCustomFieldsJSONBodyEntityBillableMetric      DeleteCustomFieldsJSONBodyEntity = "billable_metric"
	DeleteCustomFieldsJSONBodyEntityCharge              DeleteCustomFieldsJSONBodyEntity = "charge"
	DeleteCustomFieldsJSONBodyEntityCommit              DeleteCustomFieldsJSONBodyEntity = "commit"
	DeleteCustomFieldsJSONBodyEntityContract            DeleteCustomFieldsJSONBodyEntity = "contract"
	DeleteCustomFieldsJSONBodyEntityContractCredit      DeleteCustomFieldsJSONBodyEntity = "contract_credit"
	DeleteCustomFieldsJSONBodyEntityContractProduct     DeleteCustomFieldsJSONBodyEntity = "contract_product"
	DeleteCustomFieldsJSONBodyEntityCreditGrant         DeleteCustomFieldsJSONBodyEntity = "credit_grant"
	DeleteCustomFieldsJSONBodyEntityCustomer            DeleteCustomFieldsJSONBodyEntity = "customer"
	DeleteCustomFieldsJSONBodyEntityCustomerPlan        DeleteCustomFieldsJSONBodyEntity = "customer_plan"
	DeleteCustomFieldsJSONBodyEntityInvoice             DeleteCustomFieldsJSONBodyEntity = "invoice"
	DeleteCustomFieldsJSONBodyEntityPlan                DeleteCustomFieldsJSONBodyEntity = "plan"
	DeleteCustomFieldsJSONBodyEntityProduct             DeleteCustomFieldsJSONBodyEntity = "product"
	DeleteCustomFieldsJSONBodyEntityProfessionalService DeleteCustomFieldsJSONBodyEntity = "professional_service"
	DeleteCustomFieldsJSONBodyEntityRateCard            DeleteCustomFieldsJSONBodyEntity = "rate_card"
	DeleteCustomFieldsJSONBodyEntityScheduledCharge     DeleteCustomFieldsJSONBodyEntity = "scheduled_charge"
)

Defines values for DeleteCustomFieldsJSONBodyEntity.

type DeleteCustomFieldsJSONRequestBody

type DeleteCustomFieldsJSONRequestBody DeleteCustomFieldsJSONBody

DeleteCustomFieldsJSONRequestBody defines body for DeleteCustomFields for application/json ContentType.

type DeleteCustomFieldsResponse

type DeleteCustomFieldsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDeleteCustomFieldsResponse

func ParseDeleteCustomFieldsResponse(rsp *http.Response) (*DeleteCustomFieldsResponse, error)

ParseDeleteCustomFieldsResponse parses an HTTP response from a DeleteCustomFieldsWithResponse call

func (DeleteCustomFieldsResponse) Status

Status returns HTTPResponse.Status

func (DeleteCustomFieldsResponse) StatusCode

func (r DeleteCustomFieldsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DisableCustomFieldKeyJSONBody

type DisableCustomFieldKeyJSONBody struct {
	Entity DisableCustomFieldKeyJSONBodyEntity `json:"entity"`
	Key    string                              `json:"key"`
}

DisableCustomFieldKeyJSONBody defines parameters for DisableCustomFieldKey.

type DisableCustomFieldKeyJSONBodyEntity added in v0.1.7

type DisableCustomFieldKeyJSONBodyEntity string

DisableCustomFieldKeyJSONBodyEntity defines parameters for DisableCustomFieldKey.

const (
	DisableCustomFieldKeyJSONBodyEntityAlert               DisableCustomFieldKeyJSONBodyEntity = "alert"
	DisableCustomFieldKeyJSONBodyEntityBillableMetric      DisableCustomFieldKeyJSONBodyEntity = "billable_metric"
	DisableCustomFieldKeyJSONBodyEntityCharge              DisableCustomFieldKeyJSONBodyEntity = "charge"
	DisableCustomFieldKeyJSONBodyEntityCommit              DisableCustomFieldKeyJSONBodyEntity = "commit"
	DisableCustomFieldKeyJSONBodyEntityContract            DisableCustomFieldKeyJSONBodyEntity = "contract"
	DisableCustomFieldKeyJSONBodyEntityContractCredit      DisableCustomFieldKeyJSONBodyEntity = "contract_credit"
	DisableCustomFieldKeyJSONBodyEntityContractProduct     DisableCustomFieldKeyJSONBodyEntity = "contract_product"
	DisableCustomFieldKeyJSONBodyEntityCreditGrant         DisableCustomFieldKeyJSONBodyEntity = "credit_grant"
	DisableCustomFieldKeyJSONBodyEntityCustomer            DisableCustomFieldKeyJSONBodyEntity = "customer"
	DisableCustomFieldKeyJSONBodyEntityCustomerPlan        DisableCustomFieldKeyJSONBodyEntity = "customer_plan"
	DisableCustomFieldKeyJSONBodyEntityInvoice             DisableCustomFieldKeyJSONBodyEntity = "invoice"
	DisableCustomFieldKeyJSONBodyEntityPlan                DisableCustomFieldKeyJSONBodyEntity = "plan"
	DisableCustomFieldKeyJSONBodyEntityProduct             DisableCustomFieldKeyJSONBodyEntity = "product"
	DisableCustomFieldKeyJSONBodyEntityProfessionalService DisableCustomFieldKeyJSONBodyEntity = "professional_service"
	DisableCustomFieldKeyJSONBodyEntityRateCard            DisableCustomFieldKeyJSONBodyEntity = "rate_card"
	DisableCustomFieldKeyJSONBodyEntityScheduledCharge     DisableCustomFieldKeyJSONBodyEntity = "scheduled_charge"
)

Defines values for DisableCustomFieldKeyJSONBodyEntity.

type DisableCustomFieldKeyJSONRequestBody

type DisableCustomFieldKeyJSONRequestBody DisableCustomFieldKeyJSONBody

DisableCustomFieldKeyJSONRequestBody defines body for DisableCustomFieldKey for application/json ContentType.

type DisableCustomFieldKeyResponse

type DisableCustomFieldKeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDisableCustomFieldKeyResponse

func ParseDisableCustomFieldKeyResponse(rsp *http.Response) (*DisableCustomFieldKeyResponse, error)

ParseDisableCustomFieldKeyResponse parses an HTTP response from a DisableCustomFieldKeyWithResponse call

func (DisableCustomFieldKeyResponse) Status

Status returns HTTPResponse.Status

func (DisableCustomFieldKeyResponse) StatusCode

func (r DisableCustomFieldKeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type EditGrantJSONBody added in v0.1.7

type EditGrantJSONBody struct {
	// ExpiresAt the updated expiration date for the credit grant
	ExpiresAt *time.Time `json:"expires_at,omitempty"`

	// Id the ID of the credit grant
	Id openapi_types.UUID `json:"id"`

	// Name the updated name for the credit grant
	Name *string `json:"name,omitempty"`
}

EditGrantJSONBody defines parameters for EditGrant.

type EditGrantJSONRequestBody added in v0.1.7

type EditGrantJSONRequestBody EditGrantJSONBody

EditGrantJSONRequestBody defines body for EditGrant for application/json ContentType.

type EditGrantResponse added in v0.1.7

type EditGrantResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data struct {
			Id openapi_types.UUID `json:"id"`
		} `json:"data"`
	}
	JSON400 *struct {
		Message string `json:"message"`
	}
}

func ParseEditGrantResponse added in v0.1.7

func ParseEditGrantResponse(rsp *http.Response) (*EditGrantResponse, error)

ParseEditGrantResponse parses an HTTP response from a EditGrantWithResponse call

func (EditGrantResponse) Status added in v0.1.7

func (r EditGrantResponse) Status() string

Status returns HTTPResponse.Status

func (EditGrantResponse) StatusCode added in v0.1.7

func (r EditGrantResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type EmbeddableDashboardJSONBody added in v0.1.7

type EmbeddableDashboardJSONBody struct {
	// ColorOverrides Optional list of colors to override
	ColorOverrides *[]struct {
		// Name The color to override
		Name *EmbeddableDashboardJSONBodyColorOverridesName `json:"name,omitempty"`

		// Value Hex value representation of the color
		Value *string `json:"value,omitempty"`
	} `json:"color_overrides,omitempty"`
	CustomerId openapi_types.UUID `json:"customer_id"`

	// Dashboard The type of dashboard to retrieve.
	Dashboard EmbeddableDashboardJSONBodyDashboard `json:"dashboard"`

	// DashboardOptions Optional dashboard specific options
	DashboardOptions *[]struct {
		// Key The option key name
		Key string `json:"key"`

		// Value The option value
		Value string `json:"value"`
	} `json:"dashboard_options,omitempty"`
}

EmbeddableDashboardJSONBody defines parameters for EmbeddableDashboard.

type EmbeddableDashboardJSONBodyColorOverridesName added in v0.1.7

type EmbeddableDashboardJSONBodyColorOverridesName string

EmbeddableDashboardJSONBodyColorOverridesName defines parameters for EmbeddableDashboard.

Defines values for EmbeddableDashboardJSONBodyColorOverridesName.

type EmbeddableDashboardJSONBodyDashboard added in v0.1.7

type EmbeddableDashboardJSONBodyDashboard string

EmbeddableDashboardJSONBodyDashboard defines parameters for EmbeddableDashboard.

const (
	Credits  EmbeddableDashboardJSONBodyDashboard = "credits"
	Invoices EmbeddableDashboardJSONBodyDashboard = "invoices"
	Usage    EmbeddableDashboardJSONBodyDashboard = "usage"
)

Defines values for EmbeddableDashboardJSONBodyDashboard.

type EmbeddableDashboardJSONRequestBody

type EmbeddableDashboardJSONRequestBody EmbeddableDashboardJSONBody

EmbeddableDashboardJSONRequestBody defines body for EmbeddableDashboard for application/json ContentType.

type EmbeddableDashboardResponse

type EmbeddableDashboardResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data struct {
			Url *string `json:"url,omitempty"`
		} `json:"data"`
	}
	JSON400 *struct {
		Message string `json:"message"`
	}
}

func ParseEmbeddableDashboardResponse

func ParseEmbeddableDashboardResponse(rsp *http.Response) (*EmbeddableDashboardResponse, error)

ParseEmbeddableDashboardResponse parses an HTTP response from a EmbeddableDashboardWithResponse call

func (EmbeddableDashboardResponse) Status

Status returns HTTPResponse.Status

func (EmbeddableDashboardResponse) StatusCode

func (r EmbeddableDashboardResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type EndCustomerPlanJSONBody added in v0.1.7

type EndCustomerPlanJSONBody struct {
	// EndingBefore RFC 3339 timestamp for when the plan ends (exclusive) for this customer. Must be at 0:00 UTC (midnight). If not provided, the plan end date will be cleared.
	EndingBefore *time.Time `json:"ending_before,omitempty"`

	// VoidInvoices If true, plan end date can be before the last finalized invoice date. Any invoices generated after the plan end date will be voided.
	VoidInvoices *bool `json:"void_invoices,omitempty"`

	// VoidStripeInvoices Only applicable when void_invoices is set to true. If true, for every invoice that is voided we will also attempt to void/delete the stripe invoice (if any). Stripe invoices will be voided if finalized or deleted if still in draft state.
	VoidStripeInvoices *bool `json:"void_stripe_invoices,omitempty"`
}

EndCustomerPlanJSONBody defines parameters for EndCustomerPlan.

type EndCustomerPlanJSONRequestBody

type EndCustomerPlanJSONRequestBody EndCustomerPlanJSONBody

EndCustomerPlanJSONRequestBody defines body for EndCustomerPlan for application/json ContentType.

type EndCustomerPlanResponse

type EndCustomerPlanResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *map[string]interface{}
}

func ParseEndCustomerPlanResponse

func ParseEndCustomerPlanResponse(rsp *http.Response) (*EndCustomerPlanResponse, error)

ParseEndCustomerPlanResponse parses an HTTP response from a EndCustomerPlanWithResponse call

func (EndCustomerPlanResponse) Status

func (r EndCustomerPlanResponse) Status() string

Status returns HTTPResponse.Status

func (EndCustomerPlanResponse) StatusCode

func (r EndCustomerPlanResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetAuditLogsParams added in v0.1.5

type GetAuditLogsParams struct {
	// Limit Max number of results that should be returned
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *string `form:"next_page,omitempty" json:"next_page,omitempty"`

	// StartingOn RFC 3339 timestamp of the earliest audit log to return. Cannot be used with 'next_page'.
	StartingOn *time.Time `form:"starting_on,omitempty" json:"starting_on,omitempty"`

	// EndingBefore RFC 3339 timestamp (exclusive). Cannot be used with 'next_page'.
	EndingBefore *time.Time `form:"ending_before,omitempty" json:"ending_before,omitempty"`

	// ResourceId 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 *string `form:"resource_id,omitempty" json:"resource_id,omitempty"`

	// ResourceType 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 *string `form:"resource_type,omitempty" json:"resource_type,omitempty"`
}

GetAuditLogsParams defines parameters for GetAuditLogs.

type GetAuditLogsResponse added in v0.1.5

type GetAuditLogsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			Action *string `json:"action,omitempty"`
			Actor  *struct {
				Email *string `json:"email,omitempty"`
				Id    string  `json:"id"`
				Name  string  `json:"name"`
			} `json:"actor,omitempty"`
			Description  *string         `json:"description,omitempty"`
			Id           string          `json:"id"`
			ResourceId   *string         `json:"resource_id,omitempty"`
			ResourceType *string         `json:"resource_type,omitempty"`
			Status       *N200DataStatus `json:"status,omitempty"`
			Timestamp    time.Time       `json:"timestamp"`
		} `json:"data"`
		NextPage *string `json:"next_page"`
	}
}

func ParseGetAuditLogsResponse added in v0.1.5

func ParseGetAuditLogsResponse(rsp *http.Response) (*GetAuditLogsResponse, error)

ParseGetAuditLogsResponse parses an HTTP response from a GetAuditLogsWithResponse call

func (GetAuditLogsResponse) Status added in v0.1.5

func (r GetAuditLogsResponse) Status() string

Status returns HTTPResponse.Status

func (GetAuditLogsResponse) StatusCode added in v0.1.5

func (r GetAuditLogsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetBillingConfigParamsBillingProviderType added in v0.1.7

type GetBillingConfigParamsBillingProviderType string

GetBillingConfigParamsBillingProviderType defines parameters for GetBillingConfig.

const (
	GetBillingConfigParamsBillingProviderTypeAwsMarketplace   GetBillingConfigParamsBillingProviderType = "aws_marketplace"
	GetBillingConfigParamsBillingProviderTypeAzureMarketplace GetBillingConfigParamsBillingProviderType = "azure_marketplace"
	GetBillingConfigParamsBillingProviderTypeCustom           GetBillingConfigParamsBillingProviderType = "custom"
	GetBillingConfigParamsBillingProviderTypeNetsuite         GetBillingConfigParamsBillingProviderType = "netsuite"
	GetBillingConfigParamsBillingProviderTypeQuickbooksOnline GetBillingConfigParamsBillingProviderType = "quickbooks_online"
	GetBillingConfigParamsBillingProviderTypeStripe           GetBillingConfigParamsBillingProviderType = "stripe"
	GetBillingConfigParamsBillingProviderTypeWorkday          GetBillingConfigParamsBillingProviderType = "workday"
)

Defines values for GetBillingConfigParamsBillingProviderType.

type GetBillingConfigResponse

type GetBillingConfigResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data struct {
			// AwsExpirationDate Contract expiration date for the customer. The expected format is RFC 3339 and can be retrieved from AWS's GetEntitlements API. (See https://docs.aws.amazon.com/marketplaceentitlement/latest/APIReference/API_GetEntitlements.html.)
			AwsExpirationDate *time.Time         `json:"aws_expiration_date,omitempty"`
			AwsProductCode    *string            `json:"aws_product_code,omitempty"`
			AwsRegion         *N200DataAwsRegion `json:"aws_region,omitempty"`

			// AzureExpirationDate Subscription term start/end date for the customer. The expected format is RFC 3339 and can be retrieved from Azure's Get Subscription API. (See https://learn.microsoft.com/en-us/partner-center/marketplace/partner-center-portal/pc-saas-fulfillment-subscription-api#get-subscription.)
			AzureExpirationDate *time.Time          `json:"azure_expiration_date,omitempty"`
			AzurePlanId         *openapi_types.UUID `json:"azure_plan_id,omitempty"`

			// AzureStartDate Subscription term start/end date for the customer. The expected format is RFC 3339 and can be retrieved from Azure's Get Subscription API. (See https://learn.microsoft.com/en-us/partner-center/marketplace/partner-center-portal/pc-saas-fulfillment-subscription-api#get-subscription.)
			AzureStartDate            *time.Time                       `json:"azure_start_date,omitempty"`
			AzureSubscriptionStatus   *N200DataAzureSubscriptionStatus `json:"azure_subscription_status,omitempty"`
			BillingProviderCustomerId *string                          `json:"billing_provider_customer_id,omitempty"`
			StripeCollectionMethod    *N200DataStripeCollectionMethod  `json:"stripe_collection_method,omitempty"`
		} `json:"data"`
	}
	JSON404 *struct {
		Message string `json:"message"`
	}
}

func ParseGetBillingConfigResponse

func ParseGetBillingConfigResponse(rsp *http.Response) (*GetBillingConfigResponse, error)

ParseGetBillingConfigResponse parses an HTTP response from a GetBillingConfigWithResponse call

func (GetBillingConfigResponse) Status

func (r GetBillingConfigResponse) Status() string

Status returns HTTPResponse.Status

func (GetBillingConfigResponse) StatusCode

func (r GetBillingConfigResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCostsParams

type GetCostsParams struct {
	// StartingOn RFC 3339 timestamp (inclusive)
	StartingOn time.Time `form:"starting_on" json:"starting_on"`

	// EndingBefore RFC 3339 timestamp (exclusive)
	EndingBefore time.Time `form:"ending_before" json:"ending_before"`

	// Limit Max number of results that should be returned
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *string `form:"next_page,omitempty" json:"next_page,omitempty"`
}

GetCostsParams defines parameters for GetCosts.

type GetCostsResponse

type GetCostsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			CreditTypes map[string]struct {
				Cost              *float32 `json:"cost,omitempty"`
				LineItemBreakdown *[]struct {
					Cost       float32 `json:"cost"`
					GroupKey   *string `json:"group_key,omitempty"`
					GroupValue *string `json:"group_value"`
					Name       string  `json:"name"`
				} `json:"line_item_breakdown,omitempty"`
				Name *string `json:"name,omitempty"`
			} `json:"credit_types"`
			EndTimestamp   time.Time `json:"end_timestamp"`
			StartTimestamp time.Time `json:"start_timestamp"`
		} `json:"data"`
		NextPage *string `json:"next_page"`
	}
	JSON400 *struct {
		Message string `json:"message"`
	}
	JSON404 *struct {
		Message string `json:"message"`
	}
}

func ParseGetCostsResponse

func ParseGetCostsResponse(rsp *http.Response) (*GetCostsResponse, error)

ParseGetCostsResponse parses an HTTP response from a GetCostsWithResponse call

func (GetCostsResponse) Status

func (r GetCostsResponse) Status() string

Status returns HTTPResponse.Status

func (GetCostsResponse) StatusCode

func (r GetCostsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCustomerAlertJSONBody added in v0.1.7

type GetCustomerAlertJSONBody struct {
	// AlertId The Metronome ID of the alert
	AlertId openapi_types.UUID `json:"alert_id"`

	// CustomerId The Metronome ID of the customer
	CustomerId openapi_types.UUID `json:"customer_id"`
}

GetCustomerAlertJSONBody defines parameters for GetCustomerAlert.

type GetCustomerAlertJSONRequestBody

type GetCustomerAlertJSONRequestBody GetCustomerAlertJSONBody

GetCustomerAlertJSONRequestBody defines body for GetCustomerAlert for application/json ContentType.

type GetCustomerAlertResponse

type GetCustomerAlertResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data struct {
			Alert struct {
				CreditType *struct {
					Id   openapi_types.UUID `json:"id"`
					Name string             `json:"name"`
				} `json:"credit_type"`

				// CustomFieldFilters A list of custom field filters for alert types that support advanced filtering
				CustomFieldFilters *[]struct {
					Entity N200DataAlertCustomFieldFiltersEntity `json:"entity"`
					Key    string                                `json:"key"`
					Value  string                                `json:"value"`
				} `json:"custom_field_filters,omitempty"`

				// Id the Metronome ID of the alert
				Id string `json:"id"`

				// Name Name of the alert
				Name string `json:"name"`

				// Status Status of the alert
				Status N200DataAlertStatus `json:"status"`

				// Threshold Threshold value of the alert policy
				Threshold float32 `json:"threshold"`

				// Type Type of the alert
				Type N200DataAlertType `json:"type"`

				// UpdatedAt Timestamp for when the alert was last updated
				UpdatedAt time.Time `json:"updated_at"`
			} `json:"alert"`

			// CustomerStatus The status of the customer alert. If the alert is archived, null will be returned.
			CustomerStatus *N200DataCustomerStatus `json:"customer_status"`
		} `json:"data"`
	}
	JSON404 *struct {
		Message string `json:"message"`
	}
}

func ParseGetCustomerAlertResponse

func ParseGetCustomerAlertResponse(rsp *http.Response) (*GetCustomerAlertResponse, error)

ParseGetCustomerAlertResponse parses an HTTP response from a GetCustomerAlertWithResponse call

func (GetCustomerAlertResponse) Status

func (r GetCustomerAlertResponse) Status() string

Status returns HTTPResponse.Status

func (GetCustomerAlertResponse) StatusCode

func (r GetCustomerAlertResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCustomerResponse

type GetCustomerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data struct {
			CurrentBillableStatus struct {
				EffectiveAt *time.Time                         `json:"effective_at"`
				Value       N200DataCurrentBillableStatusValue `json:"value"`
			} `json:"current_billable_status"`
			CustomFields   map[string]string `json:"custom_fields"`
			CustomerConfig struct {
				// SalesforceAccountId The Salesforce account ID for the customer
				SalesforceAccountId *string `json:"salesforce_account_id"`
			} `json:"customer_config"`

			// ExternalId (deprecated, use ingest_aliases instead) the first ID (Metronome or ingest alias) that can be used in usage events
			ExternalId string `json:"external_id"`

			// Id the Metronome ID of the customer
			Id openapi_types.UUID `json:"id"`

			// IngestAliases aliases for this customer that can be used instead of the Metronome customer ID in usage events
			IngestAliases []string `json:"ingest_aliases"`
			Name          string   `json:"name"`
		} `json:"data"`
	}
}

func ParseGetCustomerResponse

func ParseGetCustomerResponse(rsp *http.Response) (*GetCustomerResponse, error)

ParseGetCustomerResponse parses an HTTP response from a GetCustomerWithResponse call

func (GetCustomerResponse) Status

func (r GetCustomerResponse) Status() string

Status returns HTTPResponse.Status

func (GetCustomerResponse) StatusCode

func (r GetCustomerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetInvoiceResponse

type GetInvoiceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data struct {
			AmendmentId          *openapi_types.UUID    `json:"amendment_id,omitempty"`
			BillableStatus       N200DataBillableStatus `json:"billable_status"`
			ContractCustomFields *map[string]string     `json:"contract_custom_fields,omitempty"`
			ContractId           *openapi_types.UUID    `json:"contract_id,omitempty"`
			CorrectionRecord     *struct {
				CorrectedExternalInvoice *struct {
					BillingProviderType N200DataCorrectionRecordCorrectedExternalInvoiceBillingProviderType `json:"billing_provider_type"`
					ExternalStatus      *N200DataCorrectionRecordCorrectedExternalInvoiceExternalStatus     `json:"external_status,omitempty"`
					InvoiceId           *string                                                             `json:"invoice_id,omitempty"`
					IssuedAtTimestamp   *time.Time                                                          `json:"issued_at_timestamp,omitempty"`
				} `json:"corrected_external_invoice,omitempty"`
				CorrectedInvoiceId openapi_types.UUID `json:"corrected_invoice_id"`
				Memo               string             `json:"memo"`
				Reason             string             `json:"reason"`
			} `json:"correction_record,omitempty"`
			CreditType struct {
				Id   openapi_types.UUID `json:"id"`
				Name string             `json:"name"`
			} `json:"credit_type"`
			CustomFields         *map[string]interface{} `json:"custom_fields,omitempty"`
			CustomerCustomFields *map[string]string      `json:"customer_custom_fields,omitempty"`
			CustomerId           openapi_types.UUID      `json:"customer_id"`

			// EndTimestamp End of the usage period this invoice covers (UTC)
			EndTimestamp    *time.Time `json:"end_timestamp,omitempty"`
			ExternalInvoice *struct {
				BillingProviderType N200DataExternalInvoiceBillingProviderType `json:"billing_provider_type"`
				ExternalStatus      *N200DataExternalInvoiceExternalStatus     `json:"external_status,omitempty"`
				InvoiceId           *string                                    `json:"invoice_id,omitempty"`
				IssuedAtTimestamp   *time.Time                                 `json:"issued_at_timestamp,omitempty"`
			} `json:"external_invoice"`
			Id                 openapi_types.UUID `json:"id"`
			InvoiceAdjustments *[]struct {
				CreditGrantId *string `json:"credit_grant_id,omitempty"`
				CreditType    struct {
					Id   openapi_types.UUID `json:"id"`
					Name string             `json:"name"`
				} `json:"credit_type"`
				Name  string  `json:"name"`
				Total float32 `json:"total"`
			} `json:"invoice_adjustments,omitempty"`

			// IssuedAt When the invoice was issued (UTC)
			IssuedAt  *time.Time `json:"issued_at,omitempty"`
			LineItems []struct {
				CommitCustomFields *map[string]string `json:"commit_custom_fields,omitempty"`

				// CommitId only present for beta contract invoices
				CommitId *openapi_types.UUID `json:"commit_id,omitempty"`

				// CommitNetsuiteItemId only present for beta contract invoices. This field's availability is dependent on your client's configuration.
				CommitNetsuiteItemId *string `json:"commit_netsuite_item_id,omitempty"`

				// CommitNetsuiteSalesOrderId only present for beta contract invoices. This field's availability is dependent on your client's configuration.
				CommitNetsuiteSalesOrderId *string `json:"commit_netsuite_sales_order_id,omitempty"`

				// CommitSegmentId only present for beta contract invoices
				CommitSegmentId *openapi_types.UUID `json:"commit_segment_id,omitempty"`

				// CommitType only present for beta contract invoices
				CommitType *string `json:"commit_type,omitempty"`
				CreditType struct {
					Id   openapi_types.UUID `json:"id"`
					Name string             `json:"name"`
				} `json:"credit_type"`
				CustomFields *map[string]string `json:"custom_fields,omitempty"`

				// EndingBefore only present for beta contract invoices
				EndingBefore *time.Time `json:"ending_before,omitempty"`
				GroupKey     *string    `json:"group_key,omitempty"`
				GroupValue   *string    `json:"group_value,omitempty"`

				// IsProrated only present for beta contract invoices
				IsProrated *bool   `json:"is_prorated,omitempty"`
				Metadata   *string `json:"metadata,omitempty"`
				Name       string  `json:"name"`

				// NetsuiteInvoiceBillingEnd The end date for the billing period on the invoice.
				NetsuiteInvoiceBillingEnd *time.Time `json:"netsuite_invoice_billing_end,omitempty"`

				// NetsuiteInvoiceBillingStart The start date for the billing period on the invoice.
				NetsuiteInvoiceBillingStart *time.Time `json:"netsuite_invoice_billing_start,omitempty"`

				// NetsuiteItemId only present for beta contract invoices. This field's availability is dependent on your client's configuration.
				NetsuiteItemId *string `json:"netsuite_item_id,omitempty"`

				// PostpaidCommit only present for beta contract invoices
				PostpaidCommit *struct {
					Id openapi_types.UUID `json:"id"`
				} `json:"postpaid_commit,omitempty"`

				// PresentationGroupValues if presentation groups are used, this will contain the values used to break down the line item
				PresentationGroupValues *map[string]string `json:"presentation_group_values,omitempty"`

				// PricingGroupValues if pricing groups are used, this will contain the values used to calculate the price
				PricingGroupValues              *map[string]string  `json:"pricing_group_values,omitempty"`
				ProductCustomFields             *map[string]string  `json:"product_custom_fields,omitempty"`
				ProductId                       *openapi_types.UUID `json:"product_id,omitempty"`
				ProfessionalServiceCustomFields *map[string]string  `json:"professional_service_custom_fields,omitempty"`

				// ProfessionalServiceId only present for beta contract invoices
				ProfessionalServiceId       *openapi_types.UUID            `json:"professional_service_id,omitempty"`
				Quantity                    *float32                       `json:"quantity,omitempty"`
				ResellerType                *N200DataLineItemsResellerType `json:"reseller_type,omitempty"`
				ScheduledChargeCustomFields *map[string]string             `json:"scheduled_charge_custom_fields,omitempty"`

				// ScheduledChargeId only present for beta contract invoices
				ScheduledChargeId *openapi_types.UUID `json:"scheduled_charge_id,omitempty"`

				// StartingAt only present for beta contract invoices
				StartingAt   *time.Time `json:"starting_at,omitempty"`
				SubLineItems *[]struct {
					ChargeId      *openapi_types.UUID `json:"charge_id,omitempty"`
					CreditGrantId *openapi_types.UUID `json:"credit_grant_id,omitempty"`
					CustomFields  map[string]string   `json:"custom_fields"`
					Name          string              `json:"name"`

					// Price the unit price for this charge, present only if the charge is not tiered and the quantity is nonzero
					Price    *float32 `json:"price,omitempty"`
					Quantity float32  `json:"quantity"`
					Subtotal float32  `json:"subtotal"`
					Tiers    *[]struct {
						Price    float32 `json:"price"`
						Quantity float32 `json:"quantity"`

						// StartingAt at what metric amount this tier begins
						StartingAt float32 `json:"starting_at"`
						Subtotal   float32 `json:"subtotal"`
					} `json:"tiers,omitempty"`
				} `json:"sub_line_items,omitempty"`
				Total float32 `json:"total"`

				// UnitPrice only present for beta contract invoices
				UnitPrice *float32 `json:"unit_price,omitempty"`
			} `json:"line_items"`
			NetPaymentTermsDays *float32 `json:"net_payment_terms_days,omitempty"`

			// NetsuiteSalesOrderId This field's availability is dependent on your client's configuration.
			NetsuiteSalesOrderId *string             `json:"netsuite_sales_order_id,omitempty"`
			PlanCustomFields     *map[string]string  `json:"plan_custom_fields,omitempty"`
			PlanId               *openapi_types.UUID `json:"plan_id,omitempty"`
			PlanName             *string             `json:"plan_name,omitempty"`

			// ResellerRoyalty only present for beta contract invoices with reseller royalties
			ResellerRoyalty *struct {
				AwsOptions *struct {
					AwsAccountNumber    *string `json:"aws_account_number,omitempty"`
					AwsOfferId          *string `json:"aws_offer_id,omitempty"`
					AwsPayerReferenceId *string `json:"aws_payer_reference_id,omitempty"`
				} `json:"aws_options,omitempty"`
				Fraction   string `json:"fraction"`
				GcpOptions *struct {
					GcpAccountId *string `json:"gcp_account_id,omitempty"`
					GcpOfferId   *string `json:"gcp_offer_id,omitempty"`
				} `json:"gcp_options,omitempty"`
				NetsuiteResellerId string                              `json:"netsuite_reseller_id"`
				ResellerType       N200DataResellerRoyaltyResellerType `json:"reseller_type"`
			} `json:"reseller_royalty,omitempty"`

			// SalesforceOpportunityId This field's availability is dependent on your client's configuration.
			SalesforceOpportunityId *string `json:"salesforce_opportunity_id,omitempty"`

			// StartTimestamp Beginning of the usage period this invoice covers (UTC)
			StartTimestamp *time.Time `json:"start_timestamp,omitempty"`
			Status         string     `json:"status"`
			Subtotal       *float32   `json:"subtotal,omitempty"`
			Total          float32    `json:"total"`
			Type           string     `json:"type"`
		} `json:"data"`
	}
	JSON404 *struct {
		Message string `json:"message"`
	}
}

func ParseGetInvoiceResponse

func ParseGetInvoiceResponse(rsp *http.Response) (*GetInvoiceResponse, error)

ParseGetInvoiceResponse parses an HTTP response from a GetInvoiceWithResponse call

func (GetInvoiceResponse) Status

func (r GetInvoiceResponse) Status() string

Status returns HTTPResponse.Status

func (GetInvoiceResponse) StatusCode

func (r GetInvoiceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPagedUsageJSONBody added in v0.1.7

type GetPagedUsageJSONBody struct {
	BillableMetricId openapi_types.UUID `json:"billable_metric_id"`

	// CurrentPeriod If true, will return the usage for the current billing period. Will return an error if the customer is currently uncontracted or starting_on and ending_before are specified when this is true.
	CurrentPeriod *bool              `json:"current_period,omitempty"`
	CustomerId    openapi_types.UUID `json:"customer_id"`
	EndingBefore  *time.Time         `json:"ending_before,omitempty"`
	GroupBy       *struct {
		// Key The name of the group_by key to use
		Key string `json:"key"`

		// Values Values of the group_by key to return in the query. Omit this if you'd like all values for the key returned.
		Values *[]string `json:"values,omitempty"`
	} `json:"group_by,omitempty"`
	StartingOn *time.Time `json:"starting_on,omitempty"`

	// WindowSize A window_size of "day" or "hour" will return the usage for the specified period segmented into daily or hourly aggregates. A window_size of "none" will return a single usage aggregate for the entirety of the specified period.
	WindowSize GetPagedUsageJSONBodyWindowSize `json:"window_size"`
}

GetPagedUsageJSONBody defines parameters for GetPagedUsage.

type GetPagedUsageJSONBodyWindowSize added in v0.1.7

type GetPagedUsageJSONBodyWindowSize string

GetPagedUsageJSONBodyWindowSize defines parameters for GetPagedUsage.

const (
	GetPagedUsageJSONBodyWindowSizeDAY   GetPagedUsageJSONBodyWindowSize = "DAY"
	GetPagedUsageJSONBodyWindowSizeDay   GetPagedUsageJSONBodyWindowSize = "day"
	GetPagedUsageJSONBodyWindowSizeDay1  GetPagedUsageJSONBodyWindowSize = "Day"
	GetPagedUsageJSONBodyWindowSizeHOUR  GetPagedUsageJSONBodyWindowSize = "HOUR"
	GetPagedUsageJSONBodyWindowSizeHour  GetPagedUsageJSONBodyWindowSize = "hour"
	GetPagedUsageJSONBodyWindowSizeHour1 GetPagedUsageJSONBodyWindowSize = "Hour"
	GetPagedUsageJSONBodyWindowSizeNONE  GetPagedUsageJSONBodyWindowSize = "NONE"
	GetPagedUsageJSONBodyWindowSizeNone  GetPagedUsageJSONBodyWindowSize = "none"
	GetPagedUsageJSONBodyWindowSizeNone1 GetPagedUsageJSONBodyWindowSize = "None"
)

Defines values for GetPagedUsageJSONBodyWindowSize.

type GetPagedUsageJSONRequestBody

type GetPagedUsageJSONRequestBody GetPagedUsageJSONBody

GetPagedUsageJSONRequestBody defines body for GetPagedUsage for application/json ContentType.

type GetPagedUsageParams

type GetPagedUsageParams struct {
	// Limit Max number of results that should be returned
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *string `form:"next_page,omitempty" json:"next_page,omitempty"`
}

GetPagedUsageParams defines parameters for GetPagedUsage.

type GetPagedUsageResponse

type GetPagedUsageResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			EndingBefore time.Time `json:"ending_before"`
			GroupKey     *string   `json:"group_key"`
			GroupValue   *string   `json:"group_value"`
			StartingOn   time.Time `json:"starting_on"`
			Value        *float32  `json:"value"`
		} `json:"data"`
		NextPage *string `json:"next_page"`
	}
}

func ParseGetPagedUsageResponse

func ParseGetPagedUsageResponse(rsp *http.Response) (*GetPagedUsageResponse, error)

ParseGetPagedUsageResponse parses an HTTP response from a GetPagedUsageWithResponse call

func (GetPagedUsageResponse) Status

func (r GetPagedUsageResponse) Status() string

Status returns HTTPResponse.Status

func (GetPagedUsageResponse) StatusCode

func (r GetPagedUsageResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPlanChargesParams

type GetPlanChargesParams struct {
	// Limit Max number of results that should be returned
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *string `form:"next_page,omitempty" json:"next_page,omitempty"`
}

GetPlanChargesParams defines parameters for GetPlanCharges.

type GetPlanChargesResponse

type GetPlanChargesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			ChargeType N200DataChargeType `json:"charge_type"`
			CreditType struct {
				Id   openapi_types.UUID `json:"id"`
				Name string             `json:"name"`
			} `json:"credit_type"`
			CustomFields map[string]string  `json:"custom_fields"`
			Id           openapi_types.UUID `json:"id"`
			Name         string             `json:"name"`
			Prices       []struct {
				CollectionInterval *float32 `json:"collection_interval,omitempty"`
				CollectionSchedule *string  `json:"collection_schedule,omitempty"`
				Quantity           *float32 `json:"quantity,omitempty"`

				// Tier Used in pricing tiers.  Indicates at what metric value the price applies.
				Tier  float32 `json:"tier"`
				Value float32 `json:"value"`
			} `json:"prices"`
			ProductId   string   `json:"product_id"`
			ProductName string   `json:"product_name"`
			Quantity    *float32 `json:"quantity,omitempty"`

			// StartPeriod Used in price ramps.  Indicates how many billing periods pass before the charge applies.
			StartPeriod *float32 `json:"start_period,omitempty"`

			// UnitConversion Specifies how quantities for usage based charges will be converted.
			UnitConversion *struct {
				// DivisionFactor The conversion factor
				DivisionFactor float32 `json:"division_factor"`

				// RoundingBehavior Whether usage should be rounded down or up to the nearest whole number. If null, quantity will be rounded to 20 decimal places.
				RoundingBehavior *N200DataUnitConversionRoundingBehavior `json:"rounding_behavior,omitempty"`
			} `json:"unit_conversion,omitempty"`
		} `json:"data"`
		NextPage *string `json:"next_page"`
	}
}

func ParseGetPlanChargesResponse

func ParseGetPlanChargesResponse(rsp *http.Response) (*GetPlanChargesResponse, error)

ParseGetPlanChargesResponse parses an HTTP response from a GetPlanChargesWithResponse call

func (GetPlanChargesResponse) Status

func (r GetPlanChargesResponse) Status() string

Status returns HTTPResponse.Status

func (GetPlanChargesResponse) StatusCode

func (r GetPlanChargesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPlanCustomersParams added in v0.1.7

type GetPlanCustomersParams struct {
	// Limit Max number of results that should be returned
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *string `form:"next_page,omitempty" json:"next_page,omitempty"`

	// Status Status of customers on a given plan. Defaults to `active`.
	//
	// * `all` - Return current, past, and upcoming customers of the plan.
	// * `active` - Return current customers of the plan.
	// * `ended` - Return past customers of the plan.
	// * `upcoming` - Return upcoming customers of the plan.
	//
	// Multiple statuses can be OR'd together using commas, e.g. `active,ended`.
	// **Note:** `ended,upcoming` combination is not yet supported.
	Status *GetPlanCustomersParamsStatus `form:"status,omitempty" json:"status,omitempty"`
}

GetPlanCustomersParams defines parameters for GetPlanCustomers.

type GetPlanCustomersParamsStatus added in v0.1.7

type GetPlanCustomersParamsStatus string

GetPlanCustomersParamsStatus defines parameters for GetPlanCustomers.

const (
	Active   GetPlanCustomersParamsStatus = "active"
	All      GetPlanCustomersParamsStatus = "all"
	Ended    GetPlanCustomersParamsStatus = "ended"
	Upcoming GetPlanCustomersParamsStatus = "upcoming"
)

Defines values for GetPlanCustomersParamsStatus.

type GetPlanCustomersResponse added in v0.1.7

type GetPlanCustomersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			CustomerDetails struct {
				CurrentBillableStatus struct {
					EffectiveAt *time.Time                                        `json:"effective_at"`
					Value       N200DataCustomerDetailsCurrentBillableStatusValue `json:"value"`
				} `json:"current_billable_status"`
				CustomFields   map[string]string `json:"custom_fields"`
				CustomerConfig struct {
					// SalesforceAccountId The Salesforce account ID for the customer
					SalesforceAccountId *string `json:"salesforce_account_id"`
				} `json:"customer_config"`

				// ExternalId (deprecated, use ingest_aliases instead) the first ID (Metronome or ingest alias) that can be used in usage events
				ExternalId string `json:"external_id"`

				// Id the Metronome ID of the customer
				Id openapi_types.UUID `json:"id"`

				// IngestAliases aliases for this customer that can be used instead of the Metronome customer ID in usage events
				IngestAliases []string `json:"ingest_aliases"`
				Name          string   `json:"name"`
			} `json:"customer_details"`
			PlanDetails struct {
				CustomFields   map[string]string  `json:"custom_fields"`
				CustomerPlanId openapi_types.UUID `json:"customer_plan_id"`

				// EndingBefore The end date of the plan
				EndingBefore *time.Time         `json:"ending_before"`
				Id           openapi_types.UUID `json:"id"`
				Name         string             `json:"name"`

				// StartingOn The start date of the plan
				StartingOn time.Time `json:"starting_on"`
			} `json:"plan_details"`
		} `json:"data"`
		NextPage *string `json:"next_page"`
	}
}

func ParseGetPlanCustomersResponse added in v0.1.7

func ParseGetPlanCustomersResponse(rsp *http.Response) (*GetPlanCustomersResponse, error)

ParseGetPlanCustomersResponse parses an HTTP response from a GetPlanCustomersWithResponse call

func (GetPlanCustomersResponse) Status added in v0.1.7

func (r GetPlanCustomersResponse) Status() string

Status returns HTTPResponse.Status

func (GetPlanCustomersResponse) StatusCode added in v0.1.7

func (r GetPlanCustomersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPlanDetailsResponse

type GetPlanDetailsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data struct {
			CreditGrants *[]struct {
				AmountGranted           float32 `json:"amount_granted"`
				AmountGrantedCreditType struct {
					Id   openapi_types.UUID `json:"id"`
					Name string             `json:"name"`
				} `json:"amount_granted_credit_type"`
				AmountPaid           float32 `json:"amount_paid"`
				AmountPaidCreditType struct {
					Id   openapi_types.UUID `json:"id"`
					Name string             `json:"name"`
				} `json:"amount_paid_credit_type"`
				EffectiveDuration  float32  `json:"effective_duration"`
				Name               string   `json:"name"`
				Priority           string   `json:"priority"`
				Reason             *string  `json:"reason,omitempty"`
				RecurrenceDuration *float32 `json:"recurrence_duration,omitempty"`
				RecurrenceInterval *float32 `json:"recurrence_interval,omitempty"`
				SendInvoice        bool     `json:"send_invoice"`
			} `json:"credit_grants,omitempty"`
			CustomFields map[string]string  `json:"custom_fields"`
			Description  *string            `json:"description,omitempty"`
			Id           openapi_types.UUID `json:"id"`
			Minimums     *[]struct {
				CreditType struct {
					Id   openapi_types.UUID `json:"id"`
					Name string             `json:"name"`
				} `json:"credit_type"`
				Name string `json:"name"`

				// StartPeriod Used in price ramps.  Indicates how many billing periods pass before the charge applies.
				StartPeriod float32 `json:"start_period"`
				Value       float32 `json:"value"`
			} `json:"minimums,omitempty"`
			Name         string `json:"name"`
			OverageRates *[]struct {
				CreditType struct {
					Id   openapi_types.UUID `json:"id"`
					Name string             `json:"name"`
				} `json:"credit_type"`
				FiatCreditType struct {
					Id   openapi_types.UUID `json:"id"`
					Name string             `json:"name"`
				} `json:"fiat_credit_type"`

				// StartPeriod Used in price ramps.  Indicates how many billing periods pass before the charge applies.
				StartPeriod            float32 `json:"start_period"`
				ToFiatConversionFactor float32 `json:"to_fiat_conversion_factor"`
			} `json:"overage_rates,omitempty"`
		} `json:"data"`
	}
}

func ParseGetPlanDetailsResponse

func ParseGetPlanDetailsResponse(rsp *http.Response) (*GetPlanDetailsResponse, error)

ParseGetPlanDetailsResponse parses an HTTP response from a GetPlanDetailsWithResponse call

func (GetPlanDetailsResponse) Status

func (r GetPlanDetailsResponse) Status() string

Status returns HTTPResponse.Status

func (GetPlanDetailsResponse) StatusCode

func (r GetPlanDetailsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPlanPriceAdjustmentsParams

type GetPlanPriceAdjustmentsParams struct {
	// Limit Max number of results that should be returned
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *string `form:"next_page,omitempty" json:"next_page,omitempty"`
}

GetPlanPriceAdjustmentsParams defines parameters for GetPlanPriceAdjustments.

type GetPlanPriceAdjustmentsResponse

type GetPlanPriceAdjustmentsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			ChargeId   openapi_types.UUID `json:"charge_id"`
			ChargeType N200DataChargeType `json:"charge_type"`
			Prices     []struct {
				// AdjustmentType Determines how the value will be applied.
				AdjustmentType N200DataPricesAdjustmentType `json:"adjustment_type"`

				// Tier Used in pricing tiers.  Indicates at what metric value the price applies.
				Tier  *float32 `json:"tier,omitempty"`
				Value *float32 `json:"value,omitempty"`
			} `json:"prices"`
			Quantity    *float32 `json:"quantity,omitempty"`
			StartPeriod float32  `json:"start_period"`
		} `json:"data"`
		NextPage *string `json:"next_page"`
	}
}

func ParseGetPlanPriceAdjustmentsResponse

func ParseGetPlanPriceAdjustmentsResponse(rsp *http.Response) (*GetPlanPriceAdjustmentsResponse, error)

ParseGetPlanPriceAdjustmentsResponse parses an HTTP response from a GetPlanPriceAdjustmentsWithResponse call

func (GetPlanPriceAdjustmentsResponse) Status

Status returns HTTPResponse.Status

func (GetPlanPriceAdjustmentsResponse) StatusCode

func (r GetPlanPriceAdjustmentsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetUsageBatchJSONBody added in v0.1.7

type GetUsageBatchJSONBody struct {
	// BillableMetrics A list of billable metrics to fetch usage for. If absent, all billable metrics will be returned.
	BillableMetrics *[]struct {
		GroupBy *struct {
			// Key The name of the group_by key to use
			Key string `json:"key"`

			// Values Values of the group_by key to return in the query. If this field is omitted, all available values will be returned, up to a maximum of 200.
			Values *[]string `json:"values,omitempty"`
		} `json:"group_by,omitempty"`
		Id openapi_types.UUID `json:"id"`
	} `json:"billable_metrics,omitempty"`

	// CustomerIds A list of Metronome customer IDs to fetch usage for. If absent, usage for all customers will be returned.
	CustomerIds  *[]openapi_types.UUID `json:"customer_ids,omitempty"`
	EndingBefore time.Time             `json:"ending_before"`
	StartingOn   time.Time             `json:"starting_on"`

	// WindowSize A window_size of "day" or "hour" will return the usage for the specified period segmented into daily or hourly aggregates. A window_size of "none" will return a single usage aggregate for the entirety of the specified period.
	WindowSize GetUsageBatchJSONBodyWindowSize `json:"window_size"`
}

GetUsageBatchJSONBody defines parameters for GetUsageBatch.

type GetUsageBatchJSONBodyWindowSize added in v0.1.7

type GetUsageBatchJSONBodyWindowSize string

GetUsageBatchJSONBodyWindowSize defines parameters for GetUsageBatch.

const (
	GetUsageBatchJSONBodyWindowSizeDAY   GetUsageBatchJSONBodyWindowSize = "DAY"
	GetUsageBatchJSONBodyWindowSizeDay   GetUsageBatchJSONBodyWindowSize = "day"
	GetUsageBatchJSONBodyWindowSizeDay1  GetUsageBatchJSONBodyWindowSize = "Day"
	GetUsageBatchJSONBodyWindowSizeHOUR  GetUsageBatchJSONBodyWindowSize = "HOUR"
	GetUsageBatchJSONBodyWindowSizeHour  GetUsageBatchJSONBodyWindowSize = "hour"
	GetUsageBatchJSONBodyWindowSizeHour1 GetUsageBatchJSONBodyWindowSize = "Hour"
	GetUsageBatchJSONBodyWindowSizeNONE  GetUsageBatchJSONBodyWindowSize = "NONE"
	GetUsageBatchJSONBodyWindowSizeNone  GetUsageBatchJSONBodyWindowSize = "none"
	GetUsageBatchJSONBodyWindowSizeNone1 GetUsageBatchJSONBodyWindowSize = "None"
)

Defines values for GetUsageBatchJSONBodyWindowSize.

type GetUsageBatchJSONRequestBody

type GetUsageBatchJSONRequestBody GetUsageBatchJSONBody

GetUsageBatchJSONRequestBody defines body for GetUsageBatch for application/json ContentType.

type GetUsageBatchParams

type GetUsageBatchParams struct {
	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *string `form:"next_page,omitempty" json:"next_page,omitempty"`
}

GetUsageBatchParams defines parameters for GetUsageBatch.

type GetUsageBatchResponse

type GetUsageBatchResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			BillableMetricId   openapi_types.UUID `json:"billable_metric_id"`
			BillableMetricName string             `json:"billable_metric_name"`
			CustomerId         openapi_types.UUID `json:"customer_id"`
			EndTimestamp       time.Time          `json:"end_timestamp"`

			// Groups Values will be either a number or null. Null indicates that there were no matches for the group_by value.
			Groups         *map[string]*float32 `json:"groups,omitempty"`
			StartTimestamp time.Time            `json:"start_timestamp"`
			Value          *float32             `json:"value"`
		} `json:"data"`
		NextPage *string `json:"next_page"`
	}
}

func ParseGetUsageBatchResponse

func ParseGetUsageBatchResponse(rsp *http.Response) (*GetUsageBatchResponse, error)

ParseGetUsageBatchResponse parses an HTTP response from a GetUsageBatchWithResponse call

func (GetUsageBatchResponse) Status

func (r GetUsageBatchResponse) Status() string

Status returns HTTPResponse.Status

func (GetUsageBatchResponse) StatusCode

func (r GetUsageBatchResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type IngestJSONBody

type IngestJSONBody = []struct {
	CustomerId string                  `json:"customer_id"`
	EventType  string                  `json:"event_type"`
	Properties *map[string]interface{} `json:"properties,omitempty"`

	// Timestamp RFC 3339 formatted
	Timestamp     string `json:"timestamp"`
	TransactionId string `json:"transaction_id"`
}

IngestJSONBody defines parameters for Ingest.

type IngestJSONRequestBody

type IngestJSONRequestBody = IngestJSONBody

IngestJSONRequestBody defines body for Ingest for application/json ContentType.

type IngestResponse

type IngestResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseIngestResponse

func ParseIngestResponse(rsp *http.Response) (*IngestResponse, error)

ParseIngestResponse parses an HTTP response from a IngestWithResponse call

func (IngestResponse) Status

func (r IngestResponse) Status() string

Status returns HTTPResponse.Status

func (IngestResponse) StatusCode

func (r IngestResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListBillableMetricsParams

type ListBillableMetricsParams struct {
	// Limit Max number of results that should be returned
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *string `form:"next_page,omitempty" json:"next_page,omitempty"`

	// OnCurrentPlan If true, the list of metrics will be filtered to just ones that are on the customer's current plan
	OnCurrentPlan *bool `form:"on_current_plan,omitempty" json:"on_current_plan,omitempty"`
}

ListBillableMetricsParams defines parameters for ListBillableMetrics.

type ListBillableMetricsResponse

type ListBillableMetricsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			GroupBy *[]string          `json:"group_by,omitempty"`
			Id      openapi_types.UUID `json:"id"`
			Name    string             `json:"name"`
		} `json:"data"`
		NextPage *string `json:"next_page"`
	}
}

func ParseListBillableMetricsResponse

func ParseListBillableMetricsResponse(rsp *http.Response) (*ListBillableMetricsResponse, error)

ParseListBillableMetricsResponse parses an HTTP response from a ListBillableMetricsWithResponse call

func (ListBillableMetricsResponse) Status

Status returns HTTPResponse.Status

func (ListBillableMetricsResponse) StatusCode

func (r ListBillableMetricsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListCreditLedgerEntriesJSONBody added in v0.1.7

type ListCreditLedgerEntriesJSONBody struct {
	// CreditTypeIds A list of Metronome credit type IDs to fetch ledger entries for. If absent, ledger entries for all credit types will be returned.
	CreditTypeIds *[]openapi_types.UUID `json:"credit_type_ids,omitempty"`

	// CustomerIds A list of Metronome customer IDs to fetch ledger entries for. If absent, ledger entries for all customers will be returned.
	CustomerIds *[]openapi_types.UUID `json:"customer_ids,omitempty"`

	// EndingBefore If supplied, ledger entries will only be returned with an effective_at before this time. This timestamp must not be in the future. If no timestamp is supplied, all entries up to the start of the customer's next billing period will be returned.
	EndingBefore *time.Time `json:"ending_before,omitempty"`

	// StartingOn If supplied, only ledger entries effective at or after this time will be returned.
	StartingOn *time.Time `json:"starting_on,omitempty"`
}

ListCreditLedgerEntriesJSONBody defines parameters for ListCreditLedgerEntries.

type ListCreditLedgerEntriesJSONRequestBody

type ListCreditLedgerEntriesJSONRequestBody ListCreditLedgerEntriesJSONBody

ListCreditLedgerEntriesJSONRequestBody defines body for ListCreditLedgerEntries for application/json ContentType.

type ListCreditLedgerEntriesParams

type ListCreditLedgerEntriesParams struct {
	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *string `form:"next_page,omitempty" json:"next_page,omitempty"`
}

ListCreditLedgerEntriesParams defines parameters for ListCreditLedgerEntries.

type ListCreditLedgerEntriesResponse

type ListCreditLedgerEntriesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			CustomerId openapi_types.UUID `json:"customer_id"`
			Ledgers    []struct {
				CreditType struct {
					Id   openapi_types.UUID `json:"id"`
					Name string             `json:"name"`
				} `json:"credit_type"`

				// EndingBalance the effective balances at the end of the specified time window
				EndingBalance struct {
					// EffectiveAt the ending_before request parameter (if supplied) or the current billing period's end date
					EffectiveAt time.Time `json:"effective_at"`

					// ExcludingPending the ending balance, including the balance of all grants that have not expired before the effective_at date and deductions that happened before the effective_at date
					ExcludingPending float32 `json:"excluding_pending"`

					// IncludingPending the excluding_pending balance plus any pending invoice deductions and expirations that will happen by the effective_at date
					IncludingPending float32 `json:"including_pending"`
				} `json:"ending_balance"`
				Entries []struct {
					// Amount an amount representing the change to the customer's credit balance
					Amount    float32 `json:"amount"`
					CreatedBy string  `json:"created_by"`

					// CreditGrantId the credit grant this entry is related to
					CreditGrantId openapi_types.UUID `json:"credit_grant_id"`
					EffectiveAt   time.Time          `json:"effective_at"`

					// InvoiceId if this entry is a deduction, the Metronome ID of the invoice where the credit deduction was consumed; if this entry is a grant, the Metronome ID of the invoice where the grant's paid_amount was charged
					InvoiceId *openapi_types.UUID `json:"invoice_id"`
					Reason    string              `json:"reason"`

					// RunningBalance the running balance for this credit type at the time of the ledger entry, including all preceding charges
					RunningBalance float32 `json:"running_balance"`
				} `json:"entries"`
				PendingEntries []struct {
					// Amount an amount representing the change to the customer's credit balance
					Amount    float32 `json:"amount"`
					CreatedBy string  `json:"created_by"`

					// CreditGrantId the credit grant this entry is related to
					CreditGrantId openapi_types.UUID `json:"credit_grant_id"`
					EffectiveAt   time.Time          `json:"effective_at"`

					// InvoiceId if this entry is a deduction, the Metronome ID of the invoice where the credit deduction was consumed; if this entry is a grant, the Metronome ID of the invoice where the grant's paid_amount was charged
					InvoiceId *openapi_types.UUID `json:"invoice_id"`
					Reason    string              `json:"reason"`

					// RunningBalance the running balance for this credit type at the time of the ledger entry, including all preceding charges
					RunningBalance float32 `json:"running_balance"`
				} `json:"pending_entries"`
				StartingBalance struct {
					// EffectiveAt the starting_on request parameter (if supplied) or the first credit grant's effective_at date
					EffectiveAt time.Time `json:"effective_at"`

					// ExcludingPending the starting balance, including all posted grants, deductions, and expirations that happened at or before the effective_at timestamp
					ExcludingPending float32 `json:"excluding_pending"`

					// IncludingPending the excluding_pending balance plus any pending activity that has not been posted at the time of the query
					IncludingPending float32 `json:"including_pending"`
				} `json:"starting_balance"`
			} `json:"ledgers"`
		} `json:"data"`
		NextPage *string `json:"next_page"`
	}
	JSON404 *struct {
		Message string `json:"message"`
	}
}

func ParseListCreditLedgerEntriesResponse

func ParseListCreditLedgerEntriesResponse(rsp *http.Response) (*ListCreditLedgerEntriesResponse, error)

ParseListCreditLedgerEntriesResponse parses an HTTP response from a ListCreditLedgerEntriesWithResponse call

func (ListCreditLedgerEntriesResponse) Status

Status returns HTTPResponse.Status

func (ListCreditLedgerEntriesResponse) StatusCode

func (r ListCreditLedgerEntriesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListCreditTypesParams

type ListCreditTypesParams struct {
	// Limit Max number of results that should be returned
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *string `form:"next_page,omitempty" json:"next_page,omitempty"`
}

ListCreditTypesParams defines parameters for ListCreditTypes.

type ListCreditTypesResponse

type ListCreditTypesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			Id         *openapi_types.UUID `json:"id,omitempty"`
			IsCurrency *bool               `json:"is_currency,omitempty"`
			Name       *string             `json:"name,omitempty"`
		} `json:"data"`
		NextPage *string `json:"next_page"`
	}
}

func ParseListCreditTypesResponse

func ParseListCreditTypesResponse(rsp *http.Response) (*ListCreditTypesResponse, error)

ParseListCreditTypesResponse parses an HTTP response from a ListCreditTypesWithResponse call

func (ListCreditTypesResponse) Status

func (r ListCreditTypesResponse) Status() string

Status returns HTTPResponse.Status

func (ListCreditTypesResponse) StatusCode

func (r ListCreditTypesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListCustomFieldKeysJSONBody

type ListCustomFieldKeysJSONBody struct {
	// Entities Optional list of entity types to return keys for
	Entities *[]ListCustomFieldKeysJSONBodyEntities `json:"entities,omitempty"`
}

ListCustomFieldKeysJSONBody defines parameters for ListCustomFieldKeys.

type ListCustomFieldKeysJSONBodyEntities added in v0.1.7

type ListCustomFieldKeysJSONBodyEntities string

ListCustomFieldKeysJSONBodyEntities defines parameters for ListCustomFieldKeys.

const (
	ListCustomFieldKeysJSONBodyEntitiesAlert               ListCustomFieldKeysJSONBodyEntities = "alert"
	ListCustomFieldKeysJSONBodyEntitiesBillableMetric      ListCustomFieldKeysJSONBodyEntities = "billable_metric"
	ListCustomFieldKeysJSONBodyEntitiesCharge              ListCustomFieldKeysJSONBodyEntities = "charge"
	ListCustomFieldKeysJSONBodyEntitiesCommit              ListCustomFieldKeysJSONBodyEntities = "commit"
	ListCustomFieldKeysJSONBodyEntitiesContract            ListCustomFieldKeysJSONBodyEntities = "contract"
	ListCustomFieldKeysJSONBodyEntitiesContractCredit      ListCustomFieldKeysJSONBodyEntities = "contract_credit"
	ListCustomFieldKeysJSONBodyEntitiesContractProduct     ListCustomFieldKeysJSONBodyEntities = "contract_product"
	ListCustomFieldKeysJSONBodyEntitiesCreditGrant         ListCustomFieldKeysJSONBodyEntities = "credit_grant"
	ListCustomFieldKeysJSONBodyEntitiesCustomer            ListCustomFieldKeysJSONBodyEntities = "customer"
	ListCustomFieldKeysJSONBodyEntitiesCustomerPlan        ListCustomFieldKeysJSONBodyEntities = "customer_plan"
	ListCustomFieldKeysJSONBodyEntitiesInvoice             ListCustomFieldKeysJSONBodyEntities = "invoice"
	ListCustomFieldKeysJSONBodyEntitiesPlan                ListCustomFieldKeysJSONBodyEntities = "plan"
	ListCustomFieldKeysJSONBodyEntitiesProduct             ListCustomFieldKeysJSONBodyEntities = "product"
	ListCustomFieldKeysJSONBodyEntitiesProfessionalService ListCustomFieldKeysJSONBodyEntities = "professional_service"
	ListCustomFieldKeysJSONBodyEntitiesRateCard            ListCustomFieldKeysJSONBodyEntities = "rate_card"
	ListCustomFieldKeysJSONBodyEntitiesScheduledCharge     ListCustomFieldKeysJSONBodyEntities = "scheduled_charge"
)

Defines values for ListCustomFieldKeysJSONBodyEntities.

type ListCustomFieldKeysJSONRequestBody

type ListCustomFieldKeysJSONRequestBody ListCustomFieldKeysJSONBody

ListCustomFieldKeysJSONRequestBody defines body for ListCustomFieldKeys for application/json ContentType.

type ListCustomFieldKeysParams added in v0.1.7

type ListCustomFieldKeysParams struct {
	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *string `form:"next_page,omitempty" json:"next_page,omitempty"`
}

ListCustomFieldKeysParams defines parameters for ListCustomFieldKeys.

type ListCustomFieldKeysResponse

type ListCustomFieldKeysResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			EnforceUniqueness bool           `json:"enforce_uniqueness"`
			Entity            N200DataEntity `json:"entity"`
			Key               string         `json:"key"`
		} `json:"data"`
		NextPage *string `json:"next_page"`
	}
}

func ParseListCustomFieldKeysResponse

func ParseListCustomFieldKeysResponse(rsp *http.Response) (*ListCustomFieldKeysResponse, error)

ParseListCustomFieldKeysResponse parses an HTTP response from a ListCustomFieldKeysWithResponse call

func (ListCustomFieldKeysResponse) Status

Status returns HTTPResponse.Status

func (ListCustomFieldKeysResponse) StatusCode

func (r ListCustomFieldKeysResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListCustomerAlertsJSONBody added in v0.1.7

type ListCustomerAlertsJSONBody struct {
	// AlertStatuses Optionally filter by alert status. If absent, only enabled alerts will be returned.
	AlertStatuses *[]ListCustomerAlertsJSONBodyAlertStatuses `json:"alert_statuses,omitempty"`

	// CustomerId The Metronome ID of the customer
	CustomerId openapi_types.UUID `json:"customer_id"`
}

ListCustomerAlertsJSONBody defines parameters for ListCustomerAlerts.

type ListCustomerAlertsJSONBodyAlertStatuses added in v0.1.7

type ListCustomerAlertsJSONBodyAlertStatuses string

ListCustomerAlertsJSONBodyAlertStatuses defines parameters for ListCustomerAlerts.

Defines values for ListCustomerAlertsJSONBodyAlertStatuses.

type ListCustomerAlertsJSONRequestBody

type ListCustomerAlertsJSONRequestBody ListCustomerAlertsJSONBody

ListCustomerAlertsJSONRequestBody defines body for ListCustomerAlerts for application/json ContentType.

type ListCustomerAlertsParams

type ListCustomerAlertsParams struct {
	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *string `form:"next_page,omitempty" json:"next_page,omitempty"`
}

ListCustomerAlertsParams defines parameters for ListCustomerAlerts.

type ListCustomerAlertsResponse

type ListCustomerAlertsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			Alert struct {
				CreditType *struct {
					Id   openapi_types.UUID `json:"id"`
					Name string             `json:"name"`
				} `json:"credit_type"`

				// CustomFieldFilters A list of custom field filters for alert types that support advanced filtering
				CustomFieldFilters *[]struct {
					Entity N200DataAlertCustomFieldFiltersEntity `json:"entity"`
					Key    string                                `json:"key"`
					Value  string                                `json:"value"`
				} `json:"custom_field_filters,omitempty"`

				// Id the Metronome ID of the alert
				Id string `json:"id"`

				// Name Name of the alert
				Name string `json:"name"`

				// Status Status of the alert
				Status N200DataAlertStatus `json:"status"`

				// Threshold Threshold value of the alert policy
				Threshold float32 `json:"threshold"`

				// Type Type of the alert
				Type N200DataAlertType `json:"type"`

				// UpdatedAt Timestamp for when the alert was last updated
				UpdatedAt time.Time `json:"updated_at"`
			} `json:"alert"`

			// CustomerStatus The status of the customer alert. If the alert is archived, null will be returned.
			CustomerStatus *N200DataCustomerStatus `json:"customer_status"`
		} `json:"data"`
		NextPage *string `json:"next_page"`
	}
}

func ParseListCustomerAlertsResponse

func ParseListCustomerAlertsResponse(rsp *http.Response) (*ListCustomerAlertsResponse, error)

ParseListCustomerAlertsResponse parses an HTTP response from a ListCustomerAlertsWithResponse call

func (ListCustomerAlertsResponse) Status

Status returns HTTPResponse.Status

func (ListCustomerAlertsResponse) StatusCode

func (r ListCustomerAlertsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListCustomerPlansParams

type ListCustomerPlansParams struct {
	// Limit Max number of results that should be returned
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *string `form:"next_page,omitempty" json:"next_page,omitempty"`
}

ListCustomerPlansParams defines parameters for ListCustomerPlans.

type ListCustomerPlansResponse

type ListCustomerPlansResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			CustomFields map[string]string `json:"custom_fields"`
			EndingBefore *time.Time        `json:"ending_before,omitempty"`

			// Id the ID of the customer plan
			Id                  openapi_types.UUID `json:"id"`
			NetPaymentTermsDays *float32           `json:"net_payment_terms_days,omitempty"`
			PlanDescription     string             `json:"plan_description"`

			// PlanId the ID of the plan
			PlanId     openapi_types.UUID `json:"plan_id"`
			PlanName   string             `json:"plan_name"`
			StartingOn time.Time          `json:"starting_on"`
			TrialInfo  *struct {
				EndingBefore time.Time `json:"ending_before"`
				SpendingCaps []struct {
					Amount          float32 `json:"amount"`
					AmountRemaining float32 `json:"amount_remaining"`
					CreditType      struct {
						Id   openapi_types.UUID `json:"id"`
						Name string             `json:"name"`
					} `json:"credit_type"`
				} `json:"spending_caps"`
			} `json:"trial_info,omitempty"`
		} `json:"data"`
		NextPage *string `json:"next_page"`
	}
}

func ParseListCustomerPlansResponse

func ParseListCustomerPlansResponse(rsp *http.Response) (*ListCustomerPlansResponse, error)

ParseListCustomerPlansResponse parses an HTTP response from a ListCustomerPlansWithResponse call

func (ListCustomerPlansResponse) Status

func (r ListCustomerPlansResponse) Status() string

Status returns HTTPResponse.Status

func (ListCustomerPlansResponse) StatusCode

func (r ListCustomerPlansResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListCustomersParams

type ListCustomersParams struct {
	// Limit Max number of results that should be returned
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *string `form:"next_page,omitempty" json:"next_page,omitempty"`

	// IngestAlias Filter the customer list by ingest_alias
	IngestAlias *string `form:"ingest_alias,omitempty" json:"ingest_alias,omitempty"`

	// CustomerIds Filter the customer list by customer_id.  Up to 100 ids can be provided.
	CustomerIds *[]string `form:"customer_ids,omitempty" json:"customer_ids,omitempty"`

	// OnlyArchived Filter the customer list by only archived customers.
	OnlyArchived *bool `form:"only_archived,omitempty" json:"only_archived,omitempty"`

	// SalesforceAccountIds Filter the customer list by salesforce_account_id.  Up to 100 ids can be provided.
	SalesforceAccountIds *[]string `form:"salesforce_account_ids,omitempty" json:"salesforce_account_ids,omitempty"`
}

ListCustomersParams defines parameters for ListCustomers.

type ListCustomersResponse

type ListCustomersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			CurrentBillableStatus struct {
				EffectiveAt *time.Time                         `json:"effective_at"`
				Value       N200DataCurrentBillableStatusValue `json:"value"`
			} `json:"current_billable_status"`
			CustomFields   map[string]string `json:"custom_fields"`
			CustomerConfig struct {
				// SalesforceAccountId The Salesforce account ID for the customer
				SalesforceAccountId *string `json:"salesforce_account_id"`
			} `json:"customer_config"`

			// ExternalId (deprecated, use ingest_aliases instead) the first ID (Metronome or ingest alias) that can be used in usage events
			ExternalId string `json:"external_id"`

			// Id the Metronome ID of the customer
			Id openapi_types.UUID `json:"id"`

			// IngestAliases aliases for this customer that can be used instead of the Metronome customer ID in usage events
			IngestAliases []string `json:"ingest_aliases"`
			Name          string   `json:"name"`
		} `json:"data"`
		NextPage *string `json:"next_page"`
	}
}

func ParseListCustomersResponse

func ParseListCustomersResponse(rsp *http.Response) (*ListCustomersResponse, error)

ParseListCustomersResponse parses an HTTP response from a ListCustomersWithResponse call

func (ListCustomersResponse) Status

func (r ListCustomersResponse) Status() string

Status returns HTTPResponse.Status

func (ListCustomersResponse) StatusCode

func (r ListCustomersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListGrantsJSONBody added in v0.1.7

type ListGrantsJSONBody struct {
	// CreditGrantIds An array of credit grant IDs. If this is specified, neither credit_type_ids nor customer_ids may be specified.
	CreditGrantIds *[]openapi_types.UUID `json:"credit_grant_ids,omitempty"`

	// CreditTypeIds An array of credit type IDs. This must not be specified if credit_grant_ids is specified.
	CreditTypeIds *[]openapi_types.UUID `json:"credit_type_ids,omitempty"`

	// CustomerIds An array of Metronome customer IDs. This must not be specified if credit_grant_ids is specified.
	CustomerIds *[]openapi_types.UUID `json:"customer_ids,omitempty"`

	// EffectiveBefore Only return credit grants that are effective before this timestamp (exclusive).
	EffectiveBefore *time.Time `json:"effective_before,omitempty"`

	// NotExpiringBefore Only return credit grants that expire at or after this timestamp.
	NotExpiringBefore *time.Time `json:"not_expiring_before,omitempty"`
}

ListGrantsJSONBody defines parameters for ListGrants.

type ListGrantsJSONRequestBody

type ListGrantsJSONRequestBody ListGrantsJSONBody

ListGrantsJSONRequestBody defines body for ListGrants for application/json ContentType.

type ListGrantsParams

type ListGrantsParams struct {
	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *string `form:"next_page,omitempty" json:"next_page,omitempty"`
}

ListGrantsParams defines parameters for ListGrants.

type ListGrantsResponse

type ListGrantsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			// Balance The effective balance of the grant as of the end of the customer's current billing period. Expiration deductions will be included only if the grant expires before the end of the current billing period.
			Balance struct {
				// EffectiveAt The end_date of the customer's current billing period.
				EffectiveAt time.Time `json:"effective_at"`

				// ExcludingPending The grant's current balance including all posted deductions. If the grant has expired, this amount will be 0.
				ExcludingPending float32 `json:"excluding_pending"`

				// IncludingPending The grant's current balance including all posted and pending deductions. If the grant expires before the end of the customer's current billing period, this amount will be 0.
				IncludingPending float32 `json:"including_pending"`
			} `json:"balance"`
			CreditGrantType *string           `json:"credit_grant_type"`
			CustomFields    map[string]string `json:"custom_fields"`

			// CustomerId the Metronome ID of the customer
			CustomerId openapi_types.UUID `json:"customer_id"`
			Deductions []struct {
				// Amount an amount representing the change to the customer's credit balance
				Amount    float32 `json:"amount"`
				CreatedBy string  `json:"created_by"`

				// CreditGrantId the credit grant this entry is related to
				CreditGrantId openapi_types.UUID `json:"credit_grant_id"`
				EffectiveAt   time.Time          `json:"effective_at"`

				// InvoiceId if this entry is a deduction, the Metronome ID of the invoice where the credit deduction was consumed; if this entry is a grant, the Metronome ID of the invoice where the grant's paid_amount was charged
				InvoiceId *openapi_types.UUID `json:"invoice_id"`
				Reason    string              `json:"reason"`

				// RunningBalance the running balance for this credit type at the time of the ledger entry, including all preceding charges
				RunningBalance float32 `json:"running_balance"`
			} `json:"deductions"`
			EffectiveAt time.Time `json:"effective_at"`
			ExpiresAt   time.Time `json:"expires_at"`

			// GrantAmount the amount of credits initially granted
			GrantAmount struct {
				Amount float32 `json:"amount"`

				// CreditType the credit type for the amount granted
				CreditType struct {
					Id   openapi_types.UUID `json:"id"`
					Name string             `json:"name"`
				} `json:"credit_type"`
			} `json:"grant_amount"`

			// Id the Metronome ID of the credit grant
			Id openapi_types.UUID `json:"id"`

			// InvoiceId the Metronome ID of the invoice with the purchase charge for this credit grant, if applicable
			InvoiceId *openapi_types.UUID `json:"invoice_id"`
			Name      string              `json:"name"`

			// PaidAmount the amount paid for this credit grant
			PaidAmount struct {
				Amount float32 `json:"amount"`

				// CreditType the credit type for the amount paid
				CreditType struct {
					Id   openapi_types.UUID `json:"id"`
					Name string             `json:"name"`
				} `json:"credit_type"`
			} `json:"paid_amount"`
			PendingDeductions []struct {
				// Amount an amount representing the change to the customer's credit balance
				Amount    float32 `json:"amount"`
				CreatedBy string  `json:"created_by"`

				// CreditGrantId the credit grant this entry is related to
				CreditGrantId openapi_types.UUID `json:"credit_grant_id"`
				EffectiveAt   time.Time          `json:"effective_at"`

				// InvoiceId if this entry is a deduction, the Metronome ID of the invoice where the credit deduction was consumed; if this entry is a grant, the Metronome ID of the invoice where the grant's paid_amount was charged
				InvoiceId *openapi_types.UUID `json:"invoice_id"`
				Reason    string              `json:"reason"`

				// RunningBalance the running balance for this credit type at the time of the ledger entry, including all preceding charges
				RunningBalance float32 `json:"running_balance"`
			} `json:"pending_deductions"`
			Priority float32 `json:"priority"`

			// Products The products which these credits will be applied to. (If unspecified, the credits will be applied to charges for all products.)
			Products *[]struct {
				Id   string `json:"id"`
				Name string `json:"name"`
			} `json:"products,omitempty"`
			Reason *string `json:"reason"`

			// UniquenessKey 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:"data"`
		NextPage *string `json:"next_page"`
	}
}

func ParseListGrantsResponse

func ParseListGrantsResponse(rsp *http.Response) (*ListGrantsResponse, error)

ParseListGrantsResponse parses an HTTP response from a ListGrantsWithResponse call

func (ListGrantsResponse) Status

func (r ListGrantsResponse) Status() string

Status returns HTTPResponse.Status

func (ListGrantsResponse) StatusCode

func (r ListGrantsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListInvoicesParams

type ListInvoicesParams struct {
	// Limit Max number of results that should be returned
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *string `form:"next_page,omitempty" json:"next_page,omitempty"`

	// Status Invoice status, e.g. DRAFT, FINALIZED, or VOID
	Status *string `form:"status,omitempty" json:"status,omitempty"`

	// Sort Invoice sort order by issued_at, e.g. date_asc or date_desc.  Defaults to date_asc.
	Sort *ListInvoicesParamsSort `form:"sort,omitempty" json:"sort,omitempty"`

	// CreditTypeId Only return invoices for the specified credit type
	CreditTypeId *string `form:"credit_type_id,omitempty" json:"credit_type_id,omitempty"`

	// StartingOn RFC 3339 timestamp (inclusive). Invoices will only be returned for billing periods that start at or after this time.
	StartingOn *time.Time `form:"starting_on,omitempty" json:"starting_on,omitempty"`

	// EndingBefore RFC 3339 timestamp (exclusive). Invoices will only be returned for billing periods that end before this time.
	EndingBefore *time.Time `form:"ending_before,omitempty" json:"ending_before,omitempty"`
}

ListInvoicesParams defines parameters for ListInvoices.

type ListInvoicesParamsSort added in v0.1.7

type ListInvoicesParamsSort string

ListInvoicesParamsSort defines parameters for ListInvoices.

const (
	DateAsc  ListInvoicesParamsSort = "date_asc"
	DateDesc ListInvoicesParamsSort = "date_desc"
)

Defines values for ListInvoicesParamsSort.

type ListInvoicesResponse

type ListInvoicesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			AmendmentId          *openapi_types.UUID    `json:"amendment_id,omitempty"`
			BillableStatus       N200DataBillableStatus `json:"billable_status"`
			ContractCustomFields *map[string]string     `json:"contract_custom_fields,omitempty"`
			ContractId           *openapi_types.UUID    `json:"contract_id,omitempty"`
			CorrectionRecord     *struct {
				CorrectedExternalInvoice *struct {
					BillingProviderType N200DataCorrectionRecordCorrectedExternalInvoiceBillingProviderType `json:"billing_provider_type"`
					ExternalStatus      *N200DataCorrectionRecordCorrectedExternalInvoiceExternalStatus     `json:"external_status,omitempty"`
					InvoiceId           *string                                                             `json:"invoice_id,omitempty"`
					IssuedAtTimestamp   *time.Time                                                          `json:"issued_at_timestamp,omitempty"`
				} `json:"corrected_external_invoice,omitempty"`
				CorrectedInvoiceId openapi_types.UUID `json:"corrected_invoice_id"`
				Memo               string             `json:"memo"`
				Reason             string             `json:"reason"`
			} `json:"correction_record,omitempty"`
			CreditType struct {
				Id   openapi_types.UUID `json:"id"`
				Name string             `json:"name"`
			} `json:"credit_type"`
			CustomFields         *map[string]interface{} `json:"custom_fields,omitempty"`
			CustomerCustomFields *map[string]string      `json:"customer_custom_fields,omitempty"`
			CustomerId           openapi_types.UUID      `json:"customer_id"`

			// EndTimestamp End of the usage period this invoice covers (UTC)
			EndTimestamp    *time.Time `json:"end_timestamp,omitempty"`
			ExternalInvoice *struct {
				BillingProviderType N200DataExternalInvoiceBillingProviderType `json:"billing_provider_type"`
				ExternalStatus      *N200DataExternalInvoiceExternalStatus     `json:"external_status,omitempty"`
				InvoiceId           *string                                    `json:"invoice_id,omitempty"`
				IssuedAtTimestamp   *time.Time                                 `json:"issued_at_timestamp,omitempty"`
			} `json:"external_invoice"`
			Id                 openapi_types.UUID `json:"id"`
			InvoiceAdjustments *[]struct {
				CreditGrantId *string `json:"credit_grant_id,omitempty"`
				CreditType    struct {
					Id   openapi_types.UUID `json:"id"`
					Name string             `json:"name"`
				} `json:"credit_type"`
				Name  string  `json:"name"`
				Total float32 `json:"total"`
			} `json:"invoice_adjustments,omitempty"`

			// IssuedAt When the invoice was issued (UTC)
			IssuedAt  *time.Time `json:"issued_at,omitempty"`
			LineItems []struct {
				CommitCustomFields *map[string]string `json:"commit_custom_fields,omitempty"`

				// CommitId only present for beta contract invoices
				CommitId *openapi_types.UUID `json:"commit_id,omitempty"`

				// CommitNetsuiteItemId only present for beta contract invoices. This field's availability is dependent on your client's configuration.
				CommitNetsuiteItemId *string `json:"commit_netsuite_item_id,omitempty"`

				// CommitNetsuiteSalesOrderId only present for beta contract invoices. This field's availability is dependent on your client's configuration.
				CommitNetsuiteSalesOrderId *string `json:"commit_netsuite_sales_order_id,omitempty"`

				// CommitSegmentId only present for beta contract invoices
				CommitSegmentId *openapi_types.UUID `json:"commit_segment_id,omitempty"`

				// CommitType only present for beta contract invoices
				CommitType *string `json:"commit_type,omitempty"`
				CreditType struct {
					Id   openapi_types.UUID `json:"id"`
					Name string             `json:"name"`
				} `json:"credit_type"`
				CustomFields *map[string]string `json:"custom_fields,omitempty"`

				// EndingBefore only present for beta contract invoices
				EndingBefore *time.Time `json:"ending_before,omitempty"`
				GroupKey     *string    `json:"group_key,omitempty"`
				GroupValue   *string    `json:"group_value,omitempty"`

				// IsProrated only present for beta contract invoices
				IsProrated *bool   `json:"is_prorated,omitempty"`
				Metadata   *string `json:"metadata,omitempty"`
				Name       string  `json:"name"`

				// NetsuiteInvoiceBillingEnd The end date for the billing period on the invoice.
				NetsuiteInvoiceBillingEnd *time.Time `json:"netsuite_invoice_billing_end,omitempty"`

				// NetsuiteInvoiceBillingStart The start date for the billing period on the invoice.
				NetsuiteInvoiceBillingStart *time.Time `json:"netsuite_invoice_billing_start,omitempty"`

				// NetsuiteItemId only present for beta contract invoices. This field's availability is dependent on your client's configuration.
				NetsuiteItemId *string `json:"netsuite_item_id,omitempty"`

				// PostpaidCommit only present for beta contract invoices
				PostpaidCommit *struct {
					Id openapi_types.UUID `json:"id"`
				} `json:"postpaid_commit,omitempty"`

				// PresentationGroupValues if presentation groups are used, this will contain the values used to break down the line item
				PresentationGroupValues *map[string]string `json:"presentation_group_values,omitempty"`

				// PricingGroupValues if pricing groups are used, this will contain the values used to calculate the price
				PricingGroupValues              *map[string]string  `json:"pricing_group_values,omitempty"`
				ProductCustomFields             *map[string]string  `json:"product_custom_fields,omitempty"`
				ProductId                       *openapi_types.UUID `json:"product_id,omitempty"`
				ProfessionalServiceCustomFields *map[string]string  `json:"professional_service_custom_fields,omitempty"`

				// ProfessionalServiceId only present for beta contract invoices
				ProfessionalServiceId       *openapi_types.UUID            `json:"professional_service_id,omitempty"`
				Quantity                    *float32                       `json:"quantity,omitempty"`
				ResellerType                *N200DataLineItemsResellerType `json:"reseller_type,omitempty"`
				ScheduledChargeCustomFields *map[string]string             `json:"scheduled_charge_custom_fields,omitempty"`

				// ScheduledChargeId only present for beta contract invoices
				ScheduledChargeId *openapi_types.UUID `json:"scheduled_charge_id,omitempty"`

				// StartingAt only present for beta contract invoices
				StartingAt   *time.Time `json:"starting_at,omitempty"`
				SubLineItems *[]struct {
					ChargeId      *openapi_types.UUID `json:"charge_id,omitempty"`
					CreditGrantId *openapi_types.UUID `json:"credit_grant_id,omitempty"`
					CustomFields  map[string]string   `json:"custom_fields"`
					Name          string              `json:"name"`

					// Price the unit price for this charge, present only if the charge is not tiered and the quantity is nonzero
					Price    *float32 `json:"price,omitempty"`
					Quantity float32  `json:"quantity"`
					Subtotal float32  `json:"subtotal"`
					Tiers    *[]struct {
						Price    float32 `json:"price"`
						Quantity float32 `json:"quantity"`

						// StartingAt at what metric amount this tier begins
						StartingAt float32 `json:"starting_at"`
						Subtotal   float32 `json:"subtotal"`
					} `json:"tiers,omitempty"`
				} `json:"sub_line_items,omitempty"`
				Total float32 `json:"total"`

				// UnitPrice only present for beta contract invoices
				UnitPrice *float32 `json:"unit_price,omitempty"`
			} `json:"line_items"`
			NetPaymentTermsDays *float32 `json:"net_payment_terms_days,omitempty"`

			// NetsuiteSalesOrderId This field's availability is dependent on your client's configuration.
			NetsuiteSalesOrderId *string             `json:"netsuite_sales_order_id,omitempty"`
			PlanCustomFields     *map[string]string  `json:"plan_custom_fields,omitempty"`
			PlanId               *openapi_types.UUID `json:"plan_id,omitempty"`
			PlanName             *string             `json:"plan_name,omitempty"`

			// ResellerRoyalty only present for beta contract invoices with reseller royalties
			ResellerRoyalty *struct {
				AwsOptions *struct {
					AwsAccountNumber    *string `json:"aws_account_number,omitempty"`
					AwsOfferId          *string `json:"aws_offer_id,omitempty"`
					AwsPayerReferenceId *string `json:"aws_payer_reference_id,omitempty"`
				} `json:"aws_options,omitempty"`
				Fraction   string `json:"fraction"`
				GcpOptions *struct {
					GcpAccountId *string `json:"gcp_account_id,omitempty"`
					GcpOfferId   *string `json:"gcp_offer_id,omitempty"`
				} `json:"gcp_options,omitempty"`
				NetsuiteResellerId string                              `json:"netsuite_reseller_id"`
				ResellerType       N200DataResellerRoyaltyResellerType `json:"reseller_type"`
			} `json:"reseller_royalty,omitempty"`

			// SalesforceOpportunityId This field's availability is dependent on your client's configuration.
			SalesforceOpportunityId *string `json:"salesforce_opportunity_id,omitempty"`

			// StartTimestamp Beginning of the usage period this invoice covers (UTC)
			StartTimestamp *time.Time `json:"start_timestamp,omitempty"`
			Status         string     `json:"status"`
			Subtotal       *float32   `json:"subtotal,omitempty"`
			Total          float32    `json:"total"`
			Type           string     `json:"type"`
		} `json:"data"`
		NextPage *string `json:"next_page"`
	}
	JSON404 *struct {
		Message string `json:"message"`
	}
}

func ParseListInvoicesResponse

func ParseListInvoicesResponse(rsp *http.Response) (*ListInvoicesResponse, error)

ParseListInvoicesResponse parses an HTTP response from a ListInvoicesWithResponse call

func (ListInvoicesResponse) Status

func (r ListInvoicesResponse) Status() string

Status returns HTTPResponse.Status

func (ListInvoicesResponse) StatusCode

func (r ListInvoicesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListPlansParams

type ListPlansParams struct {
	// Limit Max number of results that should be returned
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *string `form:"next_page,omitempty" json:"next_page,omitempty"`
}

ListPlansParams defines parameters for ListPlans.

type ListPlansResponse

type ListPlansResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			CustomFields *map[string]string `json:"custom_fields,omitempty"`
			Description  string             `json:"description"`
			Id           openapi_types.UUID `json:"id"`
			Name         string             `json:"name"`
		} `json:"data"`
		NextPage *string `json:"next_page"`
	}
}

func ParseListPlansResponse

func ParseListPlansResponse(rsp *http.Response) (*ListPlansResponse, error)

ParseListPlansResponse parses an HTTP response from a ListPlansWithResponse call

func (ListPlansResponse) Status

func (r ListPlansResponse) Status() string

Status returns HTTPResponse.Status

func (ListPlansResponse) StatusCode

func (r ListPlansResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type SetBillingConfigForCustomerJSONBody

type SetBillingConfigForCustomerJSONBody struct {
	AwsProductCode *string                                       `json:"aws_product_code,omitempty"`
	AwsRegion      *SetBillingConfigForCustomerJSONBodyAwsRegion `json:"aws_region,omitempty"`

	// BillingProviderCustomerId The customer ID in the billing provider's system. For Azure, this is the subscription ID.
	BillingProviderCustomerId string                                                     `json:"billing_provider_customer_id"`
	StripeCollectionMethod    *SetBillingConfigForCustomerJSONBodyStripeCollectionMethod `json:"stripe_collection_method,omitempty"`
}

SetBillingConfigForCustomerJSONBody defines parameters for SetBillingConfigForCustomer.

type SetBillingConfigForCustomerJSONBodyAwsRegion added in v0.1.7

type SetBillingConfigForCustomerJSONBodyAwsRegion string

SetBillingConfigForCustomerJSONBodyAwsRegion defines parameters for SetBillingConfigForCustomer.

const (
	SetBillingConfigForCustomerJSONBodyAwsRegionAfSouth1     SetBillingConfigForCustomerJSONBodyAwsRegion = "af-south-1"
	SetBillingConfigForCustomerJSONBodyAwsRegionApEast1      SetBillingConfigForCustomerJSONBodyAwsRegion = "ap-east-1"
	SetBillingConfigForCustomerJSONBodyAwsRegionApNortheast1 SetBillingConfigForCustomerJSONBodyAwsRegion = "ap-northeast-1"
	SetBillingConfigForCustomerJSONBodyAwsRegionApNortheast2 SetBillingConfigForCustomerJSONBodyAwsRegion = "ap-northeast-2"
	SetBillingConfigForCustomerJSONBodyAwsRegionApNortheast3 SetBillingConfigForCustomerJSONBodyAwsRegion = "ap-northeast-3"
	SetBillingConfigForCustomerJSONBodyAwsRegionApSouth1     SetBillingConfigForCustomerJSONBodyAwsRegion = "ap-south-1"
	SetBillingConfigForCustomerJSONBodyAwsRegionApSoutheast1 SetBillingConfigForCustomerJSONBodyAwsRegion = "ap-southeast-1"
	SetBillingConfigForCustomerJSONBodyAwsRegionApSoutheast2 SetBillingConfigForCustomerJSONBodyAwsRegion = "ap-southeast-2"
	SetBillingConfigForCustomerJSONBodyAwsRegionCaCentral1   SetBillingConfigForCustomerJSONBodyAwsRegion = "ca-central-1"
	SetBillingConfigForCustomerJSONBodyAwsRegionCnNorth1     SetBillingConfigForCustomerJSONBodyAwsRegion = "cn-north-1"
	SetBillingConfigForCustomerJSONBodyAwsRegionCnNorthwest1 SetBillingConfigForCustomerJSONBodyAwsRegion = "cn-northwest-1"
	SetBillingConfigForCustomerJSONBodyAwsRegionEuCentral1   SetBillingConfigForCustomerJSONBodyAwsRegion = "eu-central-1"
	SetBillingConfigForCustomerJSONBodyAwsRegionEuNorth1     SetBillingConfigForCustomerJSONBodyAwsRegion = "eu-north-1"
	SetBillingConfigForCustomerJSONBodyAwsRegionEuSouth1     SetBillingConfigForCustomerJSONBodyAwsRegion = "eu-south-1"
	SetBillingConfigForCustomerJSONBodyAwsRegionEuWest1      SetBillingConfigForCustomerJSONBodyAwsRegion = "eu-west-1"
	SetBillingConfigForCustomerJSONBodyAwsRegionEuWest2      SetBillingConfigForCustomerJSONBodyAwsRegion = "eu-west-2"
	SetBillingConfigForCustomerJSONBodyAwsRegionEuWest3      SetBillingConfigForCustomerJSONBodyAwsRegion = "eu-west-3"
	SetBillingConfigForCustomerJSONBodyAwsRegionMeSouth1     SetBillingConfigForCustomerJSONBodyAwsRegion = "me-south-1"
	SetBillingConfigForCustomerJSONBodyAwsRegionSaEast1      SetBillingConfigForCustomerJSONBodyAwsRegion = "sa-east-1"
	SetBillingConfigForCustomerJSONBodyAwsRegionUsEast1      SetBillingConfigForCustomerJSONBodyAwsRegion = "us-east-1"
	SetBillingConfigForCustomerJSONBodyAwsRegionUsEast2      SetBillingConfigForCustomerJSONBodyAwsRegion = "us-east-2"
	SetBillingConfigForCustomerJSONBodyAwsRegionUsGovEast1   SetBillingConfigForCustomerJSONBodyAwsRegion = "us-gov-east-1"
	SetBillingConfigForCustomerJSONBodyAwsRegionUsGovWest1   SetBillingConfigForCustomerJSONBodyAwsRegion = "us-gov-west-1"
	SetBillingConfigForCustomerJSONBodyAwsRegionUsWest1      SetBillingConfigForCustomerJSONBodyAwsRegion = "us-west-1"
	SetBillingConfigForCustomerJSONBodyAwsRegionUsWest2      SetBillingConfigForCustomerJSONBodyAwsRegion = "us-west-2"
)

Defines values for SetBillingConfigForCustomerJSONBodyAwsRegion.

type SetBillingConfigForCustomerJSONBodyStripeCollectionMethod added in v0.1.7

type SetBillingConfigForCustomerJSONBodyStripeCollectionMethod string

SetBillingConfigForCustomerJSONBodyStripeCollectionMethod defines parameters for SetBillingConfigForCustomer.

const (
	SetBillingConfigForCustomerJSONBodyStripeCollectionMethodChargeAutomatically SetBillingConfigForCustomerJSONBodyStripeCollectionMethod = "charge_automatically"
	SetBillingConfigForCustomerJSONBodyStripeCollectionMethodSendInvoice         SetBillingConfigForCustomerJSONBodyStripeCollectionMethod = "send_invoice"
)

Defines values for SetBillingConfigForCustomerJSONBodyStripeCollectionMethod.

type SetBillingConfigForCustomerJSONRequestBody

type SetBillingConfigForCustomerJSONRequestBody SetBillingConfigForCustomerJSONBody

SetBillingConfigForCustomerJSONRequestBody defines body for SetBillingConfigForCustomer for application/json ContentType.

type SetBillingConfigForCustomerParamsBillingProviderType added in v0.1.7

type SetBillingConfigForCustomerParamsBillingProviderType string

SetBillingConfigForCustomerParamsBillingProviderType defines parameters for SetBillingConfigForCustomer.

const (
	SetBillingConfigForCustomerParamsBillingProviderTypeAwsMarketplace   SetBillingConfigForCustomerParamsBillingProviderType = "aws_marketplace"
	SetBillingConfigForCustomerParamsBillingProviderTypeAzureMarketplace SetBillingConfigForCustomerParamsBillingProviderType = "azure_marketplace"
	SetBillingConfigForCustomerParamsBillingProviderTypeCustom           SetBillingConfigForCustomerParamsBillingProviderType = "custom"
	SetBillingConfigForCustomerParamsBillingProviderTypeNetsuite         SetBillingConfigForCustomerParamsBillingProviderType = "netsuite"
	SetBillingConfigForCustomerParamsBillingProviderTypeQuickbooksOnline SetBillingConfigForCustomerParamsBillingProviderType = "quickbooks_online"
	SetBillingConfigForCustomerParamsBillingProviderTypeStripe           SetBillingConfigForCustomerParamsBillingProviderType = "stripe"
	SetBillingConfigForCustomerParamsBillingProviderTypeWorkday          SetBillingConfigForCustomerParamsBillingProviderType = "workday"
)

Defines values for SetBillingConfigForCustomerParamsBillingProviderType.

type SetBillingConfigForCustomerResponse

type SetBillingConfigForCustomerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *struct {
		Message string `json:"message"`
	}
	JSON404 *struct {
		Message string `json:"message"`
	}
}

func ParseSetBillingConfigForCustomerResponse

func ParseSetBillingConfigForCustomerResponse(rsp *http.Response) (*SetBillingConfigForCustomerResponse, error)

ParseSetBillingConfigForCustomerResponse parses an HTTP response from a SetBillingConfigForCustomerWithResponse call

func (SetBillingConfigForCustomerResponse) Status

Status returns HTTPResponse.Status

func (SetBillingConfigForCustomerResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type SetCustomFieldsJSONBody

type SetCustomFieldsJSONBody struct {
	CustomFields map[string]string             `json:"custom_fields"`
	Entity       SetCustomFieldsJSONBodyEntity `json:"entity"`
	EntityId     openapi_types.UUID            `json:"entity_id"`
}

SetCustomFieldsJSONBody defines parameters for SetCustomFields.

type SetCustomFieldsJSONBodyEntity added in v0.1.7

type SetCustomFieldsJSONBodyEntity string

SetCustomFieldsJSONBodyEntity defines parameters for SetCustomFields.

const (
	SetCustomFieldsJSONBodyEntityAlert               SetCustomFieldsJSONBodyEntity = "alert"
	SetCustomFieldsJSONBodyEntityBillableMetric      SetCustomFieldsJSONBodyEntity = "billable_metric"
	SetCustomFieldsJSONBodyEntityCharge              SetCustomFieldsJSONBodyEntity = "charge"
	SetCustomFieldsJSONBodyEntityCommit              SetCustomFieldsJSONBodyEntity = "commit"
	SetCustomFieldsJSONBodyEntityContract            SetCustomFieldsJSONBodyEntity = "contract"
	SetCustomFieldsJSONBodyEntityContractCredit      SetCustomFieldsJSONBodyEntity = "contract_credit"
	SetCustomFieldsJSONBodyEntityContractProduct     SetCustomFieldsJSONBodyEntity = "contract_product"
	SetCustomFieldsJSONBodyEntityCreditGrant         SetCustomFieldsJSONBodyEntity = "credit_grant"
	SetCustomFieldsJSONBodyEntityCustomer            SetCustomFieldsJSONBodyEntity = "customer"
	SetCustomFieldsJSONBodyEntityCustomerPlan        SetCustomFieldsJSONBodyEntity = "customer_plan"
	SetCustomFieldsJSONBodyEntityInvoice             SetCustomFieldsJSONBodyEntity = "invoice"
	SetCustomFieldsJSONBodyEntityPlan                SetCustomFieldsJSONBodyEntity = "plan"
	SetCustomFieldsJSONBodyEntityProduct             SetCustomFieldsJSONBodyEntity = "product"
	SetCustomFieldsJSONBodyEntityProfessionalService SetCustomFieldsJSONBodyEntity = "professional_service"
	SetCustomFieldsJSONBodyEntityRateCard            SetCustomFieldsJSONBodyEntity = "rate_card"
	SetCustomFieldsJSONBodyEntityScheduledCharge     SetCustomFieldsJSONBodyEntity = "scheduled_charge"
)

Defines values for SetCustomFieldsJSONBodyEntity.

type SetCustomFieldsJSONRequestBody

type SetCustomFieldsJSONRequestBody SetCustomFieldsJSONBody

SetCustomFieldsJSONRequestBody defines body for SetCustomFields for application/json ContentType.

type SetCustomFieldsResponse

type SetCustomFieldsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseSetCustomFieldsResponse

func ParseSetCustomFieldsResponse(rsp *http.Response) (*SetCustomFieldsResponse, error)

ParseSetCustomFieldsResponse parses an HTTP response from a SetCustomFieldsWithResponse call

func (SetCustomFieldsResponse) Status

func (r SetCustomFieldsResponse) Status() string

Status returns HTTPResponse.Status

func (SetCustomFieldsResponse) StatusCode

func (r SetCustomFieldsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SetCustomerNameJSONBody added in v0.1.7

type SetCustomerNameJSONBody struct {
	// Name The new name for the customer
	Name string `json:"name"`
}

SetCustomerNameJSONBody defines parameters for SetCustomerName.

type SetCustomerNameJSONRequestBody

type SetCustomerNameJSONRequestBody SetCustomerNameJSONBody

SetCustomerNameJSONRequestBody defines body for SetCustomerName for application/json ContentType.

type SetCustomerNameResponse

type SetCustomerNameResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data struct {
			CustomFields *map[string]string `json:"custom_fields,omitempty"`

			// ExternalId (deprecated, use ingest_aliases instead) the first ID (Metronome or ingest alias) that can be used in usage events
			ExternalId string `json:"external_id"`

			// Id the Metronome ID of the customer
			Id openapi_types.UUID `json:"id"`

			// IngestAliases aliases for this customer that can be used instead of the Metronome customer ID in usage events
			IngestAliases []string `json:"ingest_aliases"`
			Name          string   `json:"name"`
		} `json:"data"`
	}
}

func ParseSetCustomerNameResponse

func ParseSetCustomerNameResponse(rsp *http.Response) (*SetCustomerNameResponse, error)

ParseSetCustomerNameResponse parses an HTTP response from a SetCustomerNameWithResponse call

func (SetCustomerNameResponse) Status

func (r SetCustomerNameResponse) Status() string

Status returns HTTPResponse.Status

func (SetCustomerNameResponse) StatusCode

func (r SetCustomerNameResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SetIngestAliasesJSONBody added in v0.1.7

type SetIngestAliasesJSONBody struct {
	IngestAliases []string `json:"ingest_aliases"`
}

SetIngestAliasesJSONBody defines parameters for SetIngestAliases.

type SetIngestAliasesJSONRequestBody

type SetIngestAliasesJSONRequestBody SetIngestAliasesJSONBody

SetIngestAliasesJSONRequestBody defines body for SetIngestAliases for application/json ContentType.

type SetIngestAliasesResponse

type SetIngestAliasesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseSetIngestAliasesResponse

func ParseSetIngestAliasesResponse(rsp *http.Response) (*SetIngestAliasesResponse, error)

ParseSetIngestAliasesResponse parses an HTTP response from a SetIngestAliasesWithResponse call

func (SetIngestAliasesResponse) Status

func (r SetIngestAliasesResponse) Status() string

Status returns HTTPResponse.Status

func (SetIngestAliasesResponse) StatusCode

func (r SetIngestAliasesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateCustomerConfigJSONBody added in v0.1.7

type UpdateCustomerConfigJSONBody struct {
	// LeaveStripeInvoicesInDraft Leave in draft or set to auto-advance on invoices sent to Stripe. Falls back to the client-level config if unset, which defaults to true if unset.
	LeaveStripeInvoicesInDraft *bool `json:"leave_stripe_invoices_in_draft"`

	// SalesforceAccountId The Salesforce account ID for the customer
	SalesforceAccountId *string `json:"salesforce_account_id"`
}

UpdateCustomerConfigJSONBody defines parameters for UpdateCustomerConfig.

type UpdateCustomerConfigJSONRequestBody

type UpdateCustomerConfigJSONRequestBody UpdateCustomerConfigJSONBody

UpdateCustomerConfigJSONRequestBody defines body for UpdateCustomerConfig for application/json ContentType.

type UpdateCustomerConfigResponse

type UpdateCustomerConfigResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *struct {
		Message string `json:"message"`
	}
	JSON404 *struct {
		Message string `json:"message"`
	}
}

func ParseUpdateCustomerConfigResponse

func ParseUpdateCustomerConfigResponse(rsp *http.Response) (*UpdateCustomerConfigResponse, error)

ParseUpdateCustomerConfigResponse parses an HTTP response from a UpdateCustomerConfigWithResponse call

func (UpdateCustomerConfigResponse) Status

Status returns HTTPResponse.Status

func (UpdateCustomerConfigResponse) StatusCode

func (r UpdateCustomerConfigResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type VoidGrantJSONBody added in v0.1.7

type VoidGrantJSONBody struct {
	Id openapi_types.UUID `json:"id"`

	// VoidCreditPurchaseInvoice If true, void the purchase invoice associated with the grant
	VoidCreditPurchaseInvoice *bool `json:"void_credit_purchase_invoice,omitempty"`
}

VoidGrantJSONBody defines parameters for VoidGrant.

type VoidGrantJSONRequestBody

type VoidGrantJSONRequestBody VoidGrantJSONBody

VoidGrantJSONRequestBody defines body for VoidGrant for application/json ContentType.

type VoidGrantResponse

type VoidGrantResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data struct {
			Id openapi_types.UUID `json:"id"`
		} `json:"data"`
	}
	JSON400 *struct {
		Message string `json:"message"`
	}
}

func ParseVoidGrantResponse

func ParseVoidGrantResponse(rsp *http.Response) (*VoidGrantResponse, error)

ParseVoidGrantResponse parses an HTTP response from a VoidGrantWithResponse call

func (VoidGrantResponse) Status

func (r VoidGrantResponse) Status() string

Status returns HTTPResponse.Status

func (VoidGrantResponse) StatusCode

func (r VoidGrantResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL