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.106.0"
".": "0.107.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-48084a007f009b4358484f09a3a7b74a990c402669f9d15adfbb60e4f835f951.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-6797b438a8e6a6856e28f4304a5a3c81bb67e74fa2d6fcc20e734880c725295a.yml
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.107.0 (2025-03-07)

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

### Features

* add VerifySignatureWithParams() that allows to set timestamp tolerance ([68b53a9](https://github.com/orbcorp/orb-go/commit/68b53a9eb2b00640c95fe07d8fbb0826d88b2bcd))
* **api:** api update ([#481](https://github.com/orbcorp/orb-go/issues/481)) ([a02fe9e](https://github.com/orbcorp/orb-go/commit/a02fe9e5d4868103ccfb3494abde506e39b7d290))
* **api:** api update ([#482](https://github.com/orbcorp/orb-go/issues/482)) ([0334e3f](https://github.com/orbcorp/orb-go/commit/0334e3f90f171788eeff76626f4ec17deaa52bca))

## 0.106.0 (2025-03-05)

Full Changelog: [v0.105.0...v0.106.0](https://github.com/orbcorp/orb-go/compare/v0.105.0...v0.106.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.106.0'
go get -u 'github.com/orbcorp/orb-go@v0.107.0'
```

<!-- x-release-please-end -->
Expand Down
23 changes: 8 additions & 15 deletions alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,16 +371,16 @@ func (r alertThresholdJSON) RawJSON() string {
type AlertType string

const (
AlertTypeUsageExceeded AlertType = "usage_exceeded"
AlertTypeCostExceeded AlertType = "cost_exceeded"
AlertTypeCreditBalanceDepleted AlertType = "credit_balance_depleted"
AlertTypeCreditBalanceDropped AlertType = "credit_balance_dropped"
AlertTypeCreditBalanceRecovered AlertType = "credit_balance_recovered"
AlertTypeUsageExceeded AlertType = "usage_exceeded"
AlertTypeCostExceeded AlertType = "cost_exceeded"
)

func (r AlertType) IsKnown() bool {
switch r {
case AlertTypeUsageExceeded, AlertTypeCostExceeded, AlertTypeCreditBalanceDepleted, AlertTypeCreditBalanceDropped, AlertTypeCreditBalanceRecovered:
case AlertTypeCreditBalanceDepleted, AlertTypeCreditBalanceDropped, AlertTypeCreditBalanceRecovered, AlertTypeUsageExceeded, AlertTypeCostExceeded:
return true
}
return false
Expand Down Expand Up @@ -451,16 +451,14 @@ func (r AlertNewForCustomerParams) MarshalJSON() (data []byte, err error) {
type AlertNewForCustomerParamsType string

const (
AlertNewForCustomerParamsTypeUsageExceeded AlertNewForCustomerParamsType = "usage_exceeded"
AlertNewForCustomerParamsTypeCostExceeded AlertNewForCustomerParamsType = "cost_exceeded"
AlertNewForCustomerParamsTypeCreditBalanceDepleted AlertNewForCustomerParamsType = "credit_balance_depleted"
AlertNewForCustomerParamsTypeCreditBalanceDropped AlertNewForCustomerParamsType = "credit_balance_dropped"
AlertNewForCustomerParamsTypeCreditBalanceRecovered AlertNewForCustomerParamsType = "credit_balance_recovered"
)

func (r AlertNewForCustomerParamsType) IsKnown() bool {
switch r {
case AlertNewForCustomerParamsTypeUsageExceeded, AlertNewForCustomerParamsTypeCostExceeded, AlertNewForCustomerParamsTypeCreditBalanceDepleted, AlertNewForCustomerParamsTypeCreditBalanceDropped, AlertNewForCustomerParamsTypeCreditBalanceRecovered:
case AlertNewForCustomerParamsTypeCreditBalanceDepleted, AlertNewForCustomerParamsTypeCreditBalanceDropped, AlertNewForCustomerParamsTypeCreditBalanceRecovered:
return true
}
return false
Expand Down Expand Up @@ -496,16 +494,14 @@ func (r AlertNewForExternalCustomerParams) MarshalJSON() (data []byte, err error
type AlertNewForExternalCustomerParamsType string

const (
AlertNewForExternalCustomerParamsTypeUsageExceeded AlertNewForExternalCustomerParamsType = "usage_exceeded"
AlertNewForExternalCustomerParamsTypeCostExceeded AlertNewForExternalCustomerParamsType = "cost_exceeded"
AlertNewForExternalCustomerParamsTypeCreditBalanceDepleted AlertNewForExternalCustomerParamsType = "credit_balance_depleted"
AlertNewForExternalCustomerParamsTypeCreditBalanceDropped AlertNewForExternalCustomerParamsType = "credit_balance_dropped"
AlertNewForExternalCustomerParamsTypeCreditBalanceRecovered AlertNewForExternalCustomerParamsType = "credit_balance_recovered"
)

func (r AlertNewForExternalCustomerParamsType) IsKnown() bool {
switch r {
case AlertNewForExternalCustomerParamsTypeUsageExceeded, AlertNewForExternalCustomerParamsTypeCostExceeded, AlertNewForExternalCustomerParamsTypeCreditBalanceDepleted, AlertNewForExternalCustomerParamsTypeCreditBalanceDropped, AlertNewForExternalCustomerParamsTypeCreditBalanceRecovered:
case AlertNewForExternalCustomerParamsTypeCreditBalanceDepleted, AlertNewForExternalCustomerParamsTypeCreditBalanceDropped, AlertNewForExternalCustomerParamsTypeCreditBalanceRecovered:
return true
}
return false
Expand Down Expand Up @@ -554,16 +550,13 @@ func (r AlertNewForSubscriptionParamsThreshold) MarshalJSON() (data []byte, err
type AlertNewForSubscriptionParamsType string

const (
AlertNewForSubscriptionParamsTypeUsageExceeded AlertNewForSubscriptionParamsType = "usage_exceeded"
AlertNewForSubscriptionParamsTypeCostExceeded AlertNewForSubscriptionParamsType = "cost_exceeded"
AlertNewForSubscriptionParamsTypeCreditBalanceDepleted AlertNewForSubscriptionParamsType = "credit_balance_depleted"
AlertNewForSubscriptionParamsTypeCreditBalanceDropped AlertNewForSubscriptionParamsType = "credit_balance_dropped"
AlertNewForSubscriptionParamsTypeCreditBalanceRecovered AlertNewForSubscriptionParamsType = "credit_balance_recovered"
AlertNewForSubscriptionParamsTypeUsageExceeded AlertNewForSubscriptionParamsType = "usage_exceeded"
AlertNewForSubscriptionParamsTypeCostExceeded AlertNewForSubscriptionParamsType = "cost_exceeded"
)

func (r AlertNewForSubscriptionParamsType) IsKnown() bool {
switch r {
case AlertNewForSubscriptionParamsTypeUsageExceeded, AlertNewForSubscriptionParamsTypeCostExceeded, AlertNewForSubscriptionParamsTypeCreditBalanceDepleted, AlertNewForSubscriptionParamsTypeCreditBalanceDropped, AlertNewForSubscriptionParamsTypeCreditBalanceRecovered:
case AlertNewForSubscriptionParamsTypeUsageExceeded, AlertNewForSubscriptionParamsTypeCostExceeded:
return true
}
return false
Expand Down
4 changes: 2 additions & 2 deletions alert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func TestAlertNewForCustomerWithOptionalParams(t *testing.T) {
"customer_id",
orb.AlertNewForCustomerParams{
Currency: orb.F("currency"),
Type: orb.F(orb.AlertNewForCustomerParamsTypeUsageExceeded),
Type: orb.F(orb.AlertNewForCustomerParamsTypeCreditBalanceDepleted),
Thresholds: orb.F([]orb.AlertNewForCustomerParamsThreshold{{
Value: orb.F(0.000000),
}}),
Expand Down Expand Up @@ -148,7 +148,7 @@ func TestAlertNewForExternalCustomerWithOptionalParams(t *testing.T) {
"external_customer_id",
orb.AlertNewForExternalCustomerParams{
Currency: orb.F("currency"),
Type: orb.F(orb.AlertNewForExternalCustomerParamsTypeUsageExceeded),
Type: orb.F(orb.AlertNewForExternalCustomerParamsTypeCreditBalanceDepleted),
Thresholds: orb.F([]orb.AlertNewForExternalCustomerParamsThreshold{{
Value: orb.F(0.000000),
}}),
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.106.0" // x-release-please-version
const PackageVersion = "0.107.0" // x-release-please-version
8 changes: 6 additions & 2 deletions invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,9 @@ type InvoiceLineItem struct {
// The line amount after any adjustments and before overage conversion, credits and
// partial invoicing.
AdjustedSubtotal string `json:"adjusted_subtotal,required"`
// All adjustments (ie. maximums, minimums, discounts) applied to the line item.
// All adjustments applied to the line item in the order they were applied based on
// invoice calculations (ie. usage discounts -> amount discounts -> percentage
// discounts -> minimums -> maximums).
Adjustments []InvoiceLineItemsAdjustment `json:"adjustments,required"`
// The final amount for a line item after all adjustments and pre paid credits have
// been applied.
Expand Down Expand Up @@ -3036,7 +3038,9 @@ type InvoiceFetchUpcomingResponseLineItem struct {
// The line amount after any adjustments and before overage conversion, credits and
// partial invoicing.
AdjustedSubtotal string `json:"adjusted_subtotal,required"`
// All adjustments (ie. maximums, minimums, discounts) applied to the line item.
// All adjustments applied to the line item in the order they were applied based on
// invoice calculations (ie. usage discounts -> amount discounts -> percentage
// discounts -> minimums -> maximums).
Adjustments []InvoiceFetchUpcomingResponseLineItemsAdjustment `json:"adjustments,required"`
// The final amount for a line item after all adjustments and pre paid credits have
// been applied.
Expand Down
4 changes: 3 additions & 1 deletion invoicelineitem.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ type InvoiceLineItemNewResponse struct {
// The line amount after any adjustments and before overage conversion, credits and
// partial invoicing.
AdjustedSubtotal string `json:"adjusted_subtotal,required"`
// All adjustments (ie. maximums, minimums, discounts) applied to the line item.
// All adjustments applied to the line item in the order they were applied based on
// invoice calculations (ie. usage discounts -> amount discounts -> percentage
// discounts -> minimums -> maximums).
Adjustments []InvoiceLineItemNewResponseAdjustment `json:"adjustments,required"`
// The final amount for a line item after all adjustments and pre paid credits have
// been applied.
Expand Down
Loading