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 @@
{
".": "1.22.0"
".": "1.23.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 118
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-b6ec9a6bf40b74575d917ab145b2413bc61dcd6989bb9d1aa41624bf3437599e.yml
openapi_spec_hash: 53cf9363c3bd9649e0af5f713abdcba7
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-b330498c2bfb80605f4c406e8b228c0a4ece85247b21f62f93273a00abb53d35.yml
openapi_spec_hash: 16a82d0eb23b68218d584e385bee43da
config_hash: 1f73a949b649ecfe6ec68ba1bb459dc2
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.23.0 (2025-10-03)

Full Changelog: [v1.22.0...v1.23.0](https://github.com/orbcorp/orb-go/compare/v1.22.0...v1.23.0)

### Features

* **api:** api update ([911fefc](https://github.com/orbcorp/orb-go/commit/911fefcc0b70ea4d3478da4ebcfa5e94091b15e4))

## 1.22.0 (2025-09-30)

Full Changelog: [v1.21.0...v1.22.0](https://github.com/orbcorp/orb-go/compare/v1.21.0...v1.22.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@v1.22.0'
go get -u 'github.com/orbcorp/orb-go@v1.23.0'
```

<!-- x-release-please-end -->
Expand Down
6 changes: 2 additions & 4 deletions beta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ func TestBetaNewPlanVersionWithOptionalParams(t *testing.T) {
ModelType: orb.F(shared.NewPlanUnitPriceModelTypeUnit),
Name: orb.F("Annual fee"),
UnitConfig: orb.F(shared.UnitConfigParam{
UnitAmount: orb.F("unit_amount"),
ScalingFactor: orb.F(0.000000),
UnitAmount: orb.F("unit_amount"),
}),
BillableMetricID: orb.F("billable_metric_id"),
BilledInAdvance: orb.F(true),
Expand Down Expand Up @@ -148,8 +147,7 @@ func TestBetaNewPlanVersionWithOptionalParams(t *testing.T) {
ModelType: orb.F(shared.NewPlanUnitPriceModelTypeUnit),
Name: orb.F("Annual fee"),
UnitConfig: orb.F(shared.UnitConfigParam{
UnitAmount: orb.F("unit_amount"),
ScalingFactor: orb.F(0.000000),
UnitAmount: orb.F("unit_amount"),
}),
BillableMetricID: orb.F("billable_metric_id"),
BilledInAdvance: orb.F(true),
Expand Down
6 changes: 2 additions & 4 deletions betaexternalplanid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ func TestBetaExternalPlanIDNewPlanVersionWithOptionalParams(t *testing.T) {
ModelType: orb.F(shared.NewPlanUnitPriceModelTypeUnit),
Name: orb.F("Annual fee"),
UnitConfig: orb.F(shared.UnitConfigParam{
UnitAmount: orb.F("unit_amount"),
ScalingFactor: orb.F(0.000000),
UnitAmount: orb.F("unit_amount"),
}),
BillableMetricID: orb.F("billable_metric_id"),
BilledInAdvance: orb.F(true),
Expand Down Expand Up @@ -148,8 +147,7 @@ func TestBetaExternalPlanIDNewPlanVersionWithOptionalParams(t *testing.T) {
ModelType: orb.F(shared.NewPlanUnitPriceModelTypeUnit),
Name: orb.F("Annual fee"),
UnitConfig: orb.F(shared.UnitConfigParam{
UnitAmount: orb.F("unit_amount"),
ScalingFactor: orb.F(0.000000),
UnitAmount: orb.F("unit_amount"),
}),
BillableMetricID: orb.F("billable_metric_id"),
BilledInAdvance: orb.F(true),
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 = "1.22.0" // x-release-please-version
const PackageVersion = "1.23.0" // x-release-please-version
3 changes: 1 addition & 2 deletions invoice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ func TestInvoiceNewWithOptionalParams(t *testing.T) {
Quantity: orb.F(1.000000),
StartDate: orb.F(time.Now()),
UnitConfig: orb.F(shared.UnitConfigParam{
UnitAmount: orb.F("unit_amount"),
ScalingFactor: orb.F(0.000000),
UnitAmount: orb.F("unit_amount"),
}),
}}),
CustomerID: orb.F("4khy3nwzktxv7"),
Expand Down
3 changes: 1 addition & 2 deletions plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ func TestPlanNewWithOptionalParams(t *testing.T) {
ModelType: orb.F(shared.NewPlanUnitPriceModelTypeUnit),
Name: orb.F("Annual fee"),
UnitConfig: orb.F(shared.UnitConfigParam{
UnitAmount: orb.F("unit_amount"),
ScalingFactor: orb.F(0.000000),
UnitAmount: orb.F("unit_amount"),
}),
BillableMetricID: orb.F("billable_metric_id"),
BilledInAdvance: orb.F(true),
Expand Down
9 changes: 3 additions & 6 deletions price_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ func TestPriceNewWithOptionalParams(t *testing.T) {
ModelType: orb.F(orb.PriceNewParamsNewFloatingUnitPriceModelTypeUnit),
Name: orb.F("Annual fee"),
UnitConfig: orb.F(shared.UnitConfigParam{
UnitAmount: orb.F("unit_amount"),
ScalingFactor: orb.F(0.000000),
UnitAmount: orb.F("unit_amount"),
}),
BillableMetricID: orb.F("billable_metric_id"),
BilledInAdvance: orb.F(true),
Expand Down Expand Up @@ -191,8 +190,7 @@ func TestPriceEvaluateMultipleWithOptionalParams(t *testing.T) {
ModelType: orb.F(shared.NewFloatingUnitPriceModelTypeUnit),
Name: orb.F("Annual fee"),
UnitConfig: orb.F(shared.UnitConfigParam{
UnitAmount: orb.F("unit_amount"),
ScalingFactor: orb.F(0.000000),
UnitAmount: orb.F("unit_amount"),
}),
BillableMetricID: orb.F("billable_metric_id"),
BilledInAdvance: orb.F(true),
Expand Down Expand Up @@ -272,8 +270,7 @@ func TestPriceEvaluatePreviewEventsWithOptionalParams(t *testing.T) {
ModelType: orb.F(shared.NewFloatingUnitPriceModelTypeUnit),
Name: orb.F("Annual fee"),
UnitConfig: orb.F(shared.UnitConfigParam{
UnitAmount: orb.F("unit_amount"),
ScalingFactor: orb.F(0.000000),
UnitAmount: orb.F("unit_amount"),
}),
BillableMetricID: orb.F("billable_metric_id"),
BilledInAdvance: orb.F(true),
Expand Down
15 changes: 5 additions & 10 deletions shared/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -22247,18 +22247,15 @@ func (r TrialDiscountParam) ImplementsDiscountUnionParam() {}
// Configuration for unit pricing
type UnitConfig struct {
// Rate per unit of usage
UnitAmount string `json:"unit_amount,required"`
// Multiplier to scale rated quantity by
ScalingFactor float64 `json:"scaling_factor,nullable"`
JSON unitConfigJSON `json:"-"`
UnitAmount string `json:"unit_amount,required"`
JSON unitConfigJSON `json:"-"`
}

// unitConfigJSON contains the JSON metadata for the struct [UnitConfig]
type unitConfigJSON struct {
UnitAmount apijson.Field
ScalingFactor apijson.Field
raw string
ExtraFields map[string]apijson.Field
UnitAmount apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

func (r *UnitConfig) UnmarshalJSON(data []byte) (err error) {
Expand All @@ -22273,8 +22270,6 @@ func (r unitConfigJSON) RawJSON() string {
type UnitConfigParam struct {
// Rate per unit of usage
UnitAmount param.Field[string] `json:"unit_amount,required"`
// Multiplier to scale rated quantity by
ScalingFactor param.Field[float64] `json:"scaling_factor"`
}

func (r UnitConfigParam) MarshalJSON() (data []byte, err error) {
Expand Down
15 changes: 5 additions & 10 deletions subscription_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ func TestSubscriptionNewWithOptionalParams(t *testing.T) {
ModelType: orb.F(orb.NewSubscriptionUnitPriceModelTypeUnit),
Name: orb.F("Annual fee"),
UnitConfig: orb.F(shared.UnitConfigParam{
UnitAmount: orb.F("unit_amount"),
ScalingFactor: orb.F(0.000000),
UnitAmount: orb.F("unit_amount"),
}),
BillableMetricID: orb.F("billable_metric_id"),
BilledInAdvance: orb.F(true),
Expand Down Expand Up @@ -196,8 +195,7 @@ func TestSubscriptionNewWithOptionalParams(t *testing.T) {
ModelType: orb.F(orb.NewSubscriptionUnitPriceModelTypeUnit),
Name: orb.F("Annual fee"),
UnitConfig: orb.F(shared.UnitConfigParam{
UnitAmount: orb.F("unit_amount"),
ScalingFactor: orb.F(0.000000),
UnitAmount: orb.F("unit_amount"),
}),
BillableMetricID: orb.F("billable_metric_id"),
BilledInAdvance: orb.F(true),
Expand Down Expand Up @@ -516,8 +514,7 @@ func TestSubscriptionPriceIntervalsWithOptionalParams(t *testing.T) {
ModelType: orb.F(shared.NewFloatingUnitPriceModelTypeUnit),
Name: orb.F("Annual fee"),
UnitConfig: orb.F(shared.UnitConfigParam{
UnitAmount: orb.F("unit_amount"),
ScalingFactor: orb.F(0.000000),
UnitAmount: orb.F("unit_amount"),
}),
BillableMetricID: orb.F("billable_metric_id"),
BilledInAdvance: orb.F(true),
Expand Down Expand Up @@ -697,8 +694,7 @@ func TestSubscriptionSchedulePlanChangeWithOptionalParams(t *testing.T) {
ModelType: orb.F(orb.NewSubscriptionUnitPriceModelTypeUnit),
Name: orb.F("Annual fee"),
UnitConfig: orb.F(shared.UnitConfigParam{
UnitAmount: orb.F("unit_amount"),
ScalingFactor: orb.F(0.000000),
UnitAmount: orb.F("unit_amount"),
}),
BillableMetricID: orb.F("billable_metric_id"),
BilledInAdvance: orb.F(true),
Expand Down Expand Up @@ -808,8 +804,7 @@ func TestSubscriptionSchedulePlanChangeWithOptionalParams(t *testing.T) {
ModelType: orb.F(orb.NewSubscriptionUnitPriceModelTypeUnit),
Name: orb.F("Annual fee"),
UnitConfig: orb.F(shared.UnitConfigParam{
UnitAmount: orb.F("unit_amount"),
ScalingFactor: orb.F(0.000000),
UnitAmount: orb.F("unit_amount"),
}),
BillableMetricID: orb.F("billable_metric_id"),
BilledInAdvance: orb.F(true),
Expand Down