diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1ee5dee..6d2723c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.44.1" + ".": "1.45.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 9e11ba2..9629af6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 118 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-e639b12e0daebce74f42d1f31f675bda4287b9c749dd7d4620a1e96a83343ec4.yml -openapi_spec_hash: 51eb3d47b25e299de670b2d52f5e9017 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-0ab0946487d1ee971683d894554494d9940010403874c0be724ffc3a82d696db.yml +openapi_spec_hash: 66b792328a4faee3c7659185accc3f0e config_hash: e6db17547fe854b1c240407cf4c6dc9e diff --git a/CHANGELOG.md b/CHANGELOG.md index 16366af..d0948e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.45.0 (2025-11-25) + +Full Changelog: [v1.44.1...v1.45.0](https://github.com/orbcorp/orb-go/compare/v1.44.1...v1.45.0) + +### Features + +* **api:** api update ([02f53e9](https://github.com/orbcorp/orb-go/commit/02f53e972b4c2069a01ad7d72e686e729d1c2b38)) + ## 1.44.1 (2025-11-21) Full Changelog: [v1.44.0...v1.44.1](https://github.com/orbcorp/orb-go/compare/v1.44.0...v1.44.1) diff --git a/README.md b/README.md index 97ac493..bd13c79 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Or to pin the version: ```sh -go get -u 'github.com/orbcorp/orb-go@v1.44.1' +go get -u 'github.com/orbcorp/orb-go@v1.45.0' ``` diff --git a/beta_test.go b/beta_test.go index 7c9a105..31c07b1 100644 --- a/beta_test.go +++ b/beta_test.go @@ -64,6 +64,8 @@ func TestBetaNewPlanVersionWithOptionalParams(t *testing.T) { Operator: orb.F(shared.NewAllocationPriceFiltersOperatorIncludes), Values: orb.F([]string{"string"}), }}), + ItemID: orb.F("item_id"), + PerUnitCostBasis: orb.F("per_unit_cost_basis"), }), PlanPhaseOrder: orb.F(int64(0)), Price: orb.F[orb.BetaNewPlanVersionParamsAddPricesPriceUnion](shared.NewPlanUnitPriceParam{ @@ -150,6 +152,8 @@ func TestBetaNewPlanVersionWithOptionalParams(t *testing.T) { Operator: orb.F(shared.NewAllocationPriceFiltersOperatorIncludes), Values: orb.F([]string{"string"}), }}), + ItemID: orb.F("item_id"), + PerUnitCostBasis: orb.F("per_unit_cost_basis"), }), PlanPhaseOrder: orb.F(int64(0)), Price: orb.F[orb.BetaNewPlanVersionParamsReplacePricesPriceUnion](shared.NewPlanUnitPriceParam{ diff --git a/betaexternalplanid_test.go b/betaexternalplanid_test.go index b60badb..c502fae 100644 --- a/betaexternalplanid_test.go +++ b/betaexternalplanid_test.go @@ -64,6 +64,8 @@ func TestBetaExternalPlanIDNewPlanVersionWithOptionalParams(t *testing.T) { Operator: orb.F(shared.NewAllocationPriceFiltersOperatorIncludes), Values: orb.F([]string{"string"}), }}), + ItemID: orb.F("item_id"), + PerUnitCostBasis: orb.F("per_unit_cost_basis"), }), PlanPhaseOrder: orb.F(int64(0)), Price: orb.F[orb.BetaExternalPlanIDNewPlanVersionParamsAddPricesPriceUnion](shared.NewPlanUnitPriceParam{ @@ -150,6 +152,8 @@ func TestBetaExternalPlanIDNewPlanVersionWithOptionalParams(t *testing.T) { Operator: orb.F(shared.NewAllocationPriceFiltersOperatorIncludes), Values: orb.F([]string{"string"}), }}), + ItemID: orb.F("item_id"), + PerUnitCostBasis: orb.F("per_unit_cost_basis"), }), PlanPhaseOrder: orb.F(int64(0)), Price: orb.F[orb.BetaExternalPlanIDNewPlanVersionParamsReplacePricesPriceUnion](shared.NewPlanUnitPriceParam{ diff --git a/internal/version.go b/internal/version.go index e51f27d..cb71b0b 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "1.44.1" // x-release-please-version +const PackageVersion = "1.45.0" // x-release-please-version diff --git a/plan_test.go b/plan_test.go index 18e281f..b2055d3 100644 --- a/plan_test.go +++ b/plan_test.go @@ -45,6 +45,8 @@ func TestPlanNewWithOptionalParams(t *testing.T) { Operator: orb.F(shared.NewAllocationPriceFiltersOperatorIncludes), Values: orb.F([]string{"string"}), }}), + ItemID: orb.F("item_id"), + PerUnitCostBasis: orb.F("per_unit_cost_basis"), }), PlanPhaseOrder: orb.F(int64(0)), Price: orb.F[orb.PlanNewParamsPricesPriceUnion](shared.NewPlanUnitPriceParam{ diff --git a/shared/shared.go b/shared/shared.go index 9a29e7d..079bdd4 100644 --- a/shared/shared.go +++ b/shared/shared.go @@ -5382,6 +5382,14 @@ type NewAllocationPriceParam struct { ExpiresAtEndOfCadence param.Field[bool] `json:"expires_at_end_of_cadence"` // The filters that determine which items the allocation applies to. Filters param.Field[[]NewAllocationPriceFilterParam] `json:"filters"` + // The item ID that line items representing charges for this allocation will be + // associated with. If not provided, the default allocation item for the currency + // will be used (e.g. 'Included Allocation (USD)'). + ItemID param.Field[string] `json:"item_id"` + // The (per-unit) cost basis of each created block. If non-zero, a customer will be + // invoiced according to the quantity and per unit cost basis specified for the + // allocation each cadence. + PerUnitCostBasis param.Field[string] `json:"per_unit_cost_basis"` } func (r NewAllocationPriceParam) MarshalJSON() (data []byte, err error) { diff --git a/subscription.go b/subscription.go index 6b565bf..5be1982 100644 --- a/subscription.go +++ b/subscription.go @@ -8423,9 +8423,8 @@ type SubscriptionPriceIntervalsParams struct { // credit note. Consider using this as a safety mechanism if you do not expect // existing invoices to be changed. AllowInvoiceCreditOrVoid param.Field[bool] `json:"allow_invoice_credit_or_void"` - // If true, ending an in-arrears price interval mid-cycle will defer billing the - // final line itemuntil the next scheduled invoice. If false, it will be billed on - // its end date. If not provided, behaviorwill follow account default. + // If set, the default value to use for added/edited price intervals with an + // end_date set. CanDeferBilling param.Field[bool] `json:"can_defer_billing"` // A list of price intervals to edit on the subscription. Edit param.Field[[]SubscriptionPriceIntervalsParamsEdit] `json:"edit"` @@ -8443,6 +8442,10 @@ type SubscriptionPriceIntervalsParamsAdd struct { StartDate param.Field[SubscriptionPriceIntervalsParamsAddStartDateUnion] `json:"start_date,required" format:"date-time"` // The definition of a new allocation price to create and add to the subscription. AllocationPrice param.Field[shared.NewAllocationPriceParam] `json:"allocation_price"` + // If true, an in-arrears price interval ending mid-cycle will defer billing the + // final line item until the next scheduled invoice. If false, it will be billed on + // its end date. + CanDeferBilling param.Field[bool] `json:"can_defer_billing"` // A list of discounts to initialize on the price interval. Discounts param.Field[[]SubscriptionPriceIntervalsParamsAddDiscountUnion] `json:"discounts"` // The end date of the price interval. This is the date that the price will stop @@ -9661,9 +9664,9 @@ type SubscriptionPriceIntervalsParamsEdit struct { // billing cycle day will not be updated. Note that overlapping price intervals // must have the same billing cycle day. BillingCycleDay param.Field[int64] `json:"billing_cycle_day"` - // If true, ending an in-arrears price interval mid-cycle will defer billing the + // If true, an in-arrears price interval ending mid-cycle will defer billing the // final line item until the next scheduled invoice. If false, it will be billed on - // its end date. If not provided, behavior will follow account default. + // its end date. CanDeferBilling param.Field[bool] `json:"can_defer_billing"` // The updated end date of this price interval. If not specified, the end date will // not be updated. diff --git a/subscription_test.go b/subscription_test.go index 83daae9..2c41234 100644 --- a/subscription_test.go +++ b/subscription_test.go @@ -63,6 +63,8 @@ func TestSubscriptionNewWithOptionalParams(t *testing.T) { Operator: orb.F(shared.NewAllocationPriceFiltersOperatorIncludes), Values: orb.F([]string{"string"}), }}), + ItemID: orb.F("item_id"), + PerUnitCostBasis: orb.F("per_unit_cost_basis"), }), Discounts: orb.F([]orb.DiscountOverrideParam{{ DiscountType: orb.F(orb.DiscountOverrideDiscountTypePercentage), @@ -189,6 +191,8 @@ func TestSubscriptionNewWithOptionalParams(t *testing.T) { Operator: orb.F(shared.NewAllocationPriceFiltersOperatorIncludes), Values: orb.F([]string{"string"}), }}), + ItemID: orb.F("item_id"), + PerUnitCostBasis: orb.F("per_unit_cost_basis"), }), Discounts: orb.F([]orb.DiscountOverrideParam{{ DiscountType: orb.F(orb.DiscountOverrideDiscountTypePercentage), @@ -510,7 +514,10 @@ func TestSubscriptionPriceIntervalsWithOptionalParams(t *testing.T) { Operator: orb.F(shared.NewAllocationPriceFiltersOperatorIncludes), Values: orb.F([]string{"string"}), }}), + ItemID: orb.F("item_id"), + PerUnitCostBasis: orb.F("per_unit_cost_basis"), }), + CanDeferBilling: orb.F(true), Discounts: orb.F([]orb.SubscriptionPriceIntervalsParamsAddDiscountUnion{orb.SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParams{ AmountDiscount: orb.F(0.000000), DiscountType: orb.F(orb.SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParamsDiscountTypeAmount), @@ -701,6 +708,8 @@ func TestSubscriptionSchedulePlanChangeWithOptionalParams(t *testing.T) { Operator: orb.F(shared.NewAllocationPriceFiltersOperatorIncludes), Values: orb.F([]string{"string"}), }}), + ItemID: orb.F("item_id"), + PerUnitCostBasis: orb.F("per_unit_cost_basis"), }), Discounts: orb.F([]orb.DiscountOverrideParam{{ DiscountType: orb.F(orb.DiscountOverrideDiscountTypePercentage), @@ -818,6 +827,8 @@ func TestSubscriptionSchedulePlanChangeWithOptionalParams(t *testing.T) { Operator: orb.F(shared.NewAllocationPriceFiltersOperatorIncludes), Values: orb.F([]string{"string"}), }}), + ItemID: orb.F("item_id"), + PerUnitCostBasis: orb.F("per_unit_cost_basis"), }), Discounts: orb.F([]orb.DiscountOverrideParam{{ DiscountType: orb.F(orb.DiscountOverrideDiscountTypePercentage),