Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.93.0"
".": "0.94.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 103
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-2824cb456b8e3a7ce1ea34aa37a2c8e63d5b70425a5863502ffe1e1b1ef7efaf.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-25409f3b13e6d1d003e351fc18d248ecf3c5821cfde5f409a1d356e4fc917d8c.yml
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.94.0 (2025-02-13)

Full Changelog: [v0.93.0...v0.94.0](https://github.com/orbcorp/orb-go/compare/v0.93.0...v0.94.0)

### Features

* **api:** api update ([#432](https://github.com/orbcorp/orb-go/issues/432)) ([bcc6243](https://github.com/orbcorp/orb-go/commit/bcc62437d40bf6ae5cd428606fa28141aada6dd2))

## 0.93.0 (2025-02-11)

Full Changelog: [v0.92.1...v0.93.0](https://github.com/orbcorp/orb-go/compare/v0.92.1...v0.93.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/orbcorp/orb-go@v0.93.0'
go get -u 'github.com/orbcorp/orb-go@v0.94.0'
```

<!-- x-release-please-end -->
Expand Down
28 changes: 8 additions & 20 deletions customercost.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,17 +345,10 @@ func (r customerCostListResponseDataJSON) RawJSON() string {
}

type CustomerCostListResponseDataPerPriceCost struct {
// The Price resource represents a price that can be billed on a subscription,
// resulting in a charge on an invoice in the form of an invoice line item. Prices
// take a quantity and determine an amount to bill.
//
// Orb supports a few different pricing models out of the box. Each of these models
// is serialized differently in a given Price object. The model_type field
// determines the key for the configuration object that is present.
//
// For more on the types of prices, see
// [the core concepts documentation](/core-concepts#plan-and-price)
// The price object
Price Price `json:"price,required"`
// The price the cost is associated with
PriceID string `json:"price_id,required"`
// Price's contributions for the timeframe, excluding any minimums and discounts.
Subtotal string `json:"subtotal,required"`
// Price's contributions for the timeframe, including minimums and discounts.
Expand All @@ -369,6 +362,7 @@ type CustomerCostListResponseDataPerPriceCost struct {
// struct [CustomerCostListResponseDataPerPriceCost]
type customerCostListResponseDataPerPriceCostJSON struct {
Price apijson.Field
PriceID apijson.Field
Subtotal apijson.Field
Total apijson.Field
Quantity apijson.Field
Expand Down Expand Up @@ -437,17 +431,10 @@ func (r customerCostListByExternalIDResponseDataJSON) RawJSON() string {
}

type CustomerCostListByExternalIDResponseDataPerPriceCost struct {
// The Price resource represents a price that can be billed on a subscription,
// resulting in a charge on an invoice in the form of an invoice line item. Prices
// take a quantity and determine an amount to bill.
//
// Orb supports a few different pricing models out of the box. Each of these models
// is serialized differently in a given Price object. The model_type field
// determines the key for the configuration object that is present.
//
// For more on the types of prices, see
// [the core concepts documentation](/core-concepts#plan-and-price)
// The price object
Price Price `json:"price,required"`
// The price the cost is associated with
PriceID string `json:"price_id,required"`
// Price's contributions for the timeframe, excluding any minimums and discounts.
Subtotal string `json:"subtotal,required"`
// Price's contributions for the timeframe, including minimums and discounts.
Expand All @@ -461,6 +448,7 @@ type CustomerCostListByExternalIDResponseDataPerPriceCost struct {
// metadata for the struct [CustomerCostListByExternalIDResponseDataPerPriceCost]
type customerCostListByExternalIDResponseDataPerPriceCostJSON struct {
Price apijson.Field
PriceID apijson.Field
Subtotal apijson.Field
Total apijson.Field
Quantity apijson.Field
Expand Down
2 changes: 1 addition & 1 deletion internal/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package internal

const PackageVersion = "0.93.0" // x-release-please-version
const PackageVersion = "0.94.0" // x-release-please-version
145 changes: 142 additions & 3 deletions plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,8 @@ type PlanNewParamsPrice struct {
BulkConfig param.Field[interface{}] `json:"bulk_config"`
BulkWithProrationConfig param.Field[interface{}] `json:"bulk_with_proration_config"`
// The per unit conversion rate of the price currency to the invoicing currency.
ConversionRate param.Field[float64] `json:"conversion_rate"`
ConversionRate param.Field[float64] `json:"conversion_rate"`
CumulativeGroupedBulkConfig param.Field[interface{}] `json:"cumulative_grouped_bulk_config"`
// An ISO 4217 currency string, or custom pricing unit identifier, in which this
// price is billed.
Currency param.Field[string] `json:"currency"`
Expand Down Expand Up @@ -1017,7 +1018,7 @@ func (r PlanNewParamsPrice) implementsPlanNewParamsPriceUnion() {}
// [PlanNewParamsPricesNewPlanMaxGroupTieredPackagePrice],
// [PlanNewParamsPricesNewPlanScalableMatrixWithUnitPricingPrice],
// [PlanNewParamsPricesNewPlanScalableMatrixWithTieredPricingPrice],
// [PlanNewParamsPrice].
// [PlanNewParamsPricesNewPlanCumulativeGroupedBulkPrice], [PlanNewParamsPrice].
type PlanNewParamsPriceUnion interface {
implementsPlanNewParamsPriceUnion()
}
Expand Down Expand Up @@ -4462,6 +4463,143 @@ func (r PlanNewParamsPricesNewPlanScalableMatrixWithTieredPricingPriceInvoicingC
return false
}

type PlanNewParamsPricesNewPlanCumulativeGroupedBulkPrice struct {
// The cadence to bill for this price on.
Cadence param.Field[PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadence] `json:"cadence,required"`
CumulativeGroupedBulkConfig param.Field[map[string]interface{}] `json:"cumulative_grouped_bulk_config,required"`
// The id of the item the plan will be associated with.
ItemID param.Field[string] `json:"item_id,required"`
ModelType param.Field[PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceModelType] `json:"model_type,required"`
// The name of the price.
Name param.Field[string] `json:"name,required"`
// The id of the billable metric for the price. Only needed if the price is
// usage-based.
BillableMetricID param.Field[string] `json:"billable_metric_id"`
// If the Price represents a fixed cost, the price will be billed in-advance if
// this is true, and in-arrears if this is false.
BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
// For custom cadence: specifies the duration of the billing period in days or
// months.
BillingCycleConfiguration param.Field[PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration] `json:"billing_cycle_configuration"`
// The per unit conversion rate of the price currency to the invoicing currency.
ConversionRate param.Field[float64] `json:"conversion_rate"`
// An ISO 4217 currency string, or custom pricing unit identifier, in which this
// price is billed.
Currency param.Field[string] `json:"currency"`
// An alias for the price.
ExternalPriceID param.Field[string] `json:"external_price_id"`
// If the Price represents a fixed cost, this represents the quantity of units
// applied.
FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
// The property used to group this price on an invoice
InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
// Within each billing cycle, specifies the cadence at which invoices are produced.
// If unspecified, a single invoice is produced per billing cycle.
InvoicingCycleConfiguration param.Field[PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration] `json:"invoicing_cycle_configuration"`
// User-specified key/value pairs for the resource. Individual keys can be removed
// by setting the value to `null`, and the entire metadata mapping can be cleared
// by setting `metadata` to `null`.
Metadata param.Field[map[string]string] `json:"metadata"`
}

func (r PlanNewParamsPricesNewPlanCumulativeGroupedBulkPrice) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}

func (r PlanNewParamsPricesNewPlanCumulativeGroupedBulkPrice) implementsPlanNewParamsPriceUnion() {}

// The cadence to bill for this price on.
type PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadence string

const (
PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadenceAnnual PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadence = "annual"
PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadenceSemiAnnual PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadence = "semi_annual"
PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadenceMonthly PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadence = "monthly"
PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadenceQuarterly PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadence = "quarterly"
PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadenceOneTime PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadence = "one_time"
PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadenceCustom PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadence = "custom"
)

func (r PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadence) IsKnown() bool {
switch r {
case PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadenceAnnual, PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadenceSemiAnnual, PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadenceMonthly, PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadenceQuarterly, PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadenceOneTime, PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceCadenceCustom:
return true
}
return false
}

type PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceModelType string

const (
PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceModelTypeCumulativeGroupedBulk PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceModelType = "cumulative_grouped_bulk"
)

func (r PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceModelType) IsKnown() bool {
switch r {
case PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceModelTypeCumulativeGroupedBulk:
return true
}
return false
}

// For custom cadence: specifies the duration of the billing period in days or
// months.
type PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration struct {
// The duration of the billing period.
Duration param.Field[int64] `json:"duration,required"`
// The unit of billing period duration.
DurationUnit param.Field[PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"`
}

func (r PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}

// The unit of billing period duration.
type PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceBillingCycleConfigurationDurationUnit string

const (
PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceBillingCycleConfigurationDurationUnit = "day"
PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceBillingCycleConfigurationDurationUnit = "month"
)

func (r PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceBillingCycleConfigurationDurationUnit) IsKnown() bool {
switch r {
case PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceBillingCycleConfigurationDurationUnitDay, PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceBillingCycleConfigurationDurationUnitMonth:
return true
}
return false
}

// Within each billing cycle, specifies the cadence at which invoices are produced.
// If unspecified, a single invoice is produced per billing cycle.
type PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration struct {
// The duration of the billing period.
Duration param.Field[int64] `json:"duration,required"`
// The unit of billing period duration.
DurationUnit param.Field[PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"`
}

func (r PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}

// The unit of billing period duration.
type PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfigurationDurationUnit string

const (
PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfigurationDurationUnit = "day"
PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfigurationDurationUnit = "month"
)

func (r PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool {
switch r {
case PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfigurationDurationUnitDay, PlanNewParamsPricesNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfigurationDurationUnitMonth:
return true
}
return false
}

// The cadence to bill for this price on.
type PlanNewParamsPricesCadence string

Expand Down Expand Up @@ -4509,11 +4647,12 @@ const (
PlanNewParamsPricesModelTypeMaxGroupTieredPackage PlanNewParamsPricesModelType = "max_group_tiered_package"
PlanNewParamsPricesModelTypeScalableMatrixWithUnitPricing PlanNewParamsPricesModelType = "scalable_matrix_with_unit_pricing"
PlanNewParamsPricesModelTypeScalableMatrixWithTieredPricing PlanNewParamsPricesModelType = "scalable_matrix_with_tiered_pricing"
PlanNewParamsPricesModelTypeCumulativeGroupedBulk PlanNewParamsPricesModelType = "cumulative_grouped_bulk"
)

func (r PlanNewParamsPricesModelType) IsKnown() bool {
switch r {
case PlanNewParamsPricesModelTypeUnit, PlanNewParamsPricesModelTypePackage, PlanNewParamsPricesModelTypeMatrix, PlanNewParamsPricesModelTypeTiered, PlanNewParamsPricesModelTypeTieredBps, PlanNewParamsPricesModelTypeBps, PlanNewParamsPricesModelTypeBulkBps, PlanNewParamsPricesModelTypeBulk, PlanNewParamsPricesModelTypeThresholdTotalAmount, PlanNewParamsPricesModelTypeTieredPackage, PlanNewParamsPricesModelTypeTieredWithMinimum, PlanNewParamsPricesModelTypeUnitWithPercent, PlanNewParamsPricesModelTypePackageWithAllocation, PlanNewParamsPricesModelTypeTieredWithProration, PlanNewParamsPricesModelTypeUnitWithProration, PlanNewParamsPricesModelTypeGroupedAllocation, PlanNewParamsPricesModelTypeGroupedWithProratedMinimum, PlanNewParamsPricesModelTypeGroupedWithMeteredMinimum, PlanNewParamsPricesModelTypeMatrixWithDisplayName, PlanNewParamsPricesModelTypeBulkWithProration, PlanNewParamsPricesModelTypeGroupedTieredPackage, PlanNewParamsPricesModelTypeMaxGroupTieredPackage, PlanNewParamsPricesModelTypeScalableMatrixWithUnitPricing, PlanNewParamsPricesModelTypeScalableMatrixWithTieredPricing:
case PlanNewParamsPricesModelTypeUnit, PlanNewParamsPricesModelTypePackage, PlanNewParamsPricesModelTypeMatrix, PlanNewParamsPricesModelTypeTiered, PlanNewParamsPricesModelTypeTieredBps, PlanNewParamsPricesModelTypeBps, PlanNewParamsPricesModelTypeBulkBps, PlanNewParamsPricesModelTypeBulk, PlanNewParamsPricesModelTypeThresholdTotalAmount, PlanNewParamsPricesModelTypeTieredPackage, PlanNewParamsPricesModelTypeTieredWithMinimum, PlanNewParamsPricesModelTypeUnitWithPercent, PlanNewParamsPricesModelTypePackageWithAllocation, PlanNewParamsPricesModelTypeTieredWithProration, PlanNewParamsPricesModelTypeUnitWithProration, PlanNewParamsPricesModelTypeGroupedAllocation, PlanNewParamsPricesModelTypeGroupedWithProratedMinimum, PlanNewParamsPricesModelTypeGroupedWithMeteredMinimum, PlanNewParamsPricesModelTypeMatrixWithDisplayName, PlanNewParamsPricesModelTypeBulkWithProration, PlanNewParamsPricesModelTypeGroupedTieredPackage, PlanNewParamsPricesModelTypeMaxGroupTieredPackage, PlanNewParamsPricesModelTypeScalableMatrixWithUnitPricing, PlanNewParamsPricesModelTypeScalableMatrixWithTieredPricing, PlanNewParamsPricesModelTypeCumulativeGroupedBulk:
return true
}
return false
Expand Down
Loading