File size: 3,253 Bytes
04f1444 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | // Code generated by @openmeter/typespec-go. DO NOT EDIT.
package openmeter
import "time"
// PlanAddon create request.
type CreatePlanAddonRequest struct {
// Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
// The add-on associated with the plan.
Addon AddonReference `json:"addon"`
// The key of the plan phase from which the add-on becomes available for purchase.
FromPlanPhase string `json:"from_plan_phase"`
// The maximum number of times the add-on can be purchased for the plan. For
// single-instance add-ons this field must be omitted. For multi-instance add-ons
// when omitted, unlimited quantity can be purchased.
MaxQuantity *int64 `json:"max_quantity,omitempty"`
}
// PlanAddon represents an association between a plan and an add-on, controlling
// which add-ons are available for purchase within a plan.
type PlanAddon struct {
ID string `json:"id"`
// Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
// An ISO-8601 timestamp representation of entity creation date.
CreatedAt time.Time `json:"created_at"`
// An ISO-8601 timestamp representation of entity last update date.
UpdatedAt time.Time `json:"updated_at"`
// An ISO-8601 timestamp representation of entity deletion date.
DeletedAt *time.Time `json:"deleted_at,omitempty"`
// The add-on associated with the plan.
Addon AddonReference `json:"addon"`
// The key of the plan phase from which the add-on becomes available for purchase.
FromPlanPhase string `json:"from_plan_phase"`
// The maximum number of times the add-on can be purchased for the plan. For
// single-instance add-ons this field must be omitted. For multi-instance add-ons
// when omitted, unlimited quantity can be purchased.
MaxQuantity *int64 `json:"max_quantity,omitempty"`
// List of validation errors.
ValidationErrors []ProductCatalogValidationError `json:"validation_errors,omitempty"`
}
// Page paginated response.
type PlanAddonPagePaginatedResponse struct {
Data []PlanAddon `json:"data"`
Meta PaginatedMeta `json:"meta"`
}
// PlanAddon upsert request.
type UpsertPlanAddonRequest struct {
// Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
// The key of the plan phase from which the add-on becomes available for purchase.
FromPlanPhase string `json:"from_plan_phase"`
// The maximum number of times the add-on can be purchased for the plan. For
// single-instance add-ons this field must be omitted. For multi-instance add-ons
// when omitted, unlimited quantity can be purchased.
MaxQuantity *int64 `json:"max_quantity,omitempty"`
}
|