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 @@
{
".": "4.36.0"
".": "4.37.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: 97
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-bf3e71b33372f4a9307f4b6cb689ea46b3cf583ecc5d79eee9601cd0b0467c9a.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-0f43f737c6520ed2a2407628511350362959997f89a868c50aa38d47d5791171.yml
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 4.37.0 (2024-11-25)

Full Changelog: [v4.36.0...v4.37.0](https://github.com/orbcorp/orb-node/compare/v4.36.0...v4.37.0)

### Features

* **api:** api update ([#400](https://github.com/orbcorp/orb-node/issues/400)) ([51f7af8](https://github.com/orbcorp/orb-node/commit/51f7af8d42168b2b6a48cc2cba2023c036bed26d))


### Chores

* rebuild project due to codegen change ([#397](https://github.com/orbcorp/orb-node/issues/397)) ([1dbe63e](https://github.com/orbcorp/orb-node/commit/1dbe63e53509b3ad4b3a24cc2095d255259dec4c))


### Documentation

* remove suggestion to use `npm` call out ([#399](https://github.com/orbcorp/orb-node/issues/399)) ([d329ab8](https://github.com/orbcorp/orb-node/commit/d329ab81a84693cb7e8890bf9726e04f531c9328))

## 4.36.0 (2024-11-15)

Full Changelog: [v4.35.0...v4.36.0](https://github.com/orbcorp/orb-node/compare/v4.35.0...v4.36.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ The following runtimes are supported:

- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)
- Node.js 18 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
- Deno v1.28.0 or higher, using `import Orb from "npm:orb-billing"`.
- Deno v1.28.0 or higher.
- Bun 1.0 or later.
- Cloudflare Workers.
- Vercel Edge Runtime.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "orb-billing",
"version": "4.36.0",
"version": "4.37.0",
"description": "The official TypeScript library for the Orb API",
"author": "Orb <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
25 changes: 25 additions & 0 deletions src/resources/subscriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18360,6 +18360,8 @@ export interface SubscriptionSchedulePlanChangeParams {
*/
billing_cycle_alignment?: 'unchanged' | 'plan_change_date' | 'start_of_month' | null;

billing_cycle_anchor_configuration?: SubscriptionSchedulePlanChangeParams.BillingCycleAnchorConfiguration | null;

/**
* The date that the plan change should take effect. This parameter can only be
* passed if the `change_option` is `requested_date`.
Expand Down Expand Up @@ -20946,6 +20948,29 @@ export namespace SubscriptionSchedulePlanChangeParams {
}
}

export interface BillingCycleAnchorConfiguration {
/**
* The day of the month on which the billing cycle is anchored. If the maximum
* number of days in a month is greater than this value, the last day of the month
* is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
* period begins on the 30th.
*/
day: number;

/**
* The month on which the billing cycle is anchored (e.g. a quarterly price
* anchored in February would have cycles starting February, May, August, and
* November).
*/
month?: number | null;

/**
* The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
* anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
*/
year?: number | null;
}

export interface RemoveAdjustment {
/**
* The id of the adjustment to remove on the subscription.
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '4.36.0'; // x-release-please-version
export const VERSION = '4.37.0'; // x-release-please-version
16 changes: 6 additions & 10 deletions tests/api-resources/alerts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ describe('resource alerts', () => {
});

test('update: only required params', async () => {
const responsePromise = client.alerts.update('alert_configuration_id', {
thresholds: [{ value: 0 }, { value: 0 }, { value: 0 }],
});
const responsePromise = client.alerts.update('alert_configuration_id', { thresholds: [{ value: 0 }] });
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
Expand All @@ -41,9 +39,7 @@ describe('resource alerts', () => {
});

test('update: required and optional params', async () => {
const response = await client.alerts.update('alert_configuration_id', {
thresholds: [{ value: 0 }, { value: 0 }, { value: 0 }],
});
const response = await client.alerts.update('alert_configuration_id', { thresholds: [{ value: 0 }] });
});

// plan_version=0 breaks Prism
Expand Down Expand Up @@ -103,7 +99,7 @@ describe('resource alerts', () => {
const response = await client.alerts.createForCustomer('customer_id', {
currency: 'currency',
type: 'usage_exceeded',
thresholds: [{ value: 0 }, { value: 0 }, { value: 0 }],
thresholds: [{ value: 0 }],
});
});

Expand All @@ -125,13 +121,13 @@ describe('resource alerts', () => {
const response = await client.alerts.createForExternalCustomer('external_customer_id', {
currency: 'currency',
type: 'usage_exceeded',
thresholds: [{ value: 0 }, { value: 0 }, { value: 0 }],
thresholds: [{ value: 0 }],
});
});

test('createForSubscription: only required params', async () => {
const responsePromise = client.alerts.createForSubscription('subscription_id', {
thresholds: [{ value: 0 }, { value: 0 }, { value: 0 }],
thresholds: [{ value: 0 }],
type: 'usage_exceeded',
});
const rawResponse = await responsePromise.asResponse();
Expand All @@ -145,7 +141,7 @@ describe('resource alerts', () => {

test('createForSubscription: required and optional params', async () => {
const response = await client.alerts.createForSubscription('subscription_id', {
thresholds: [{ value: 0 }, { value: 0 }, { value: 0 }],
thresholds: [{ value: 0 }],
type: 'usage_exceeded',
metric_id: 'metric_id',
});
Expand Down
4 changes: 1 addition & 3 deletions tests/api-resources/customers/customers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ describe('resource customers', () => {
accounting_sync_configuration: {
accounting_providers: [
{ external_provider_id: 'external_provider_id', provider_type: 'provider_type' },
{ external_provider_id: 'external_provider_id', provider_type: 'provider_type' },
{ external_provider_id: 'external_provider_id', provider_type: 'provider_type' },
],
excluded: true,
},
additional_emails: ['string', 'string', 'string'],
additional_emails: ['string'],
auto_collection: true,
billing_address: {
city: 'city',
Expand Down
28 changes: 0 additions & 28 deletions tests/api-resources/events/events.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,6 @@ describe('resource events', () => {
properties: {},
timestamp: '2020-12-09T16:09:53Z',
},
{
event_name: 'event_name',
idempotency_key: 'idempotency_key',
properties: {},
timestamp: '2020-12-09T16:09:53Z',
},
{
event_name: 'event_name',
idempotency_key: 'idempotency_key',
properties: {},
timestamp: '2020-12-09T16:09:53Z',
},
],
});
const rawResponse = await responsePromise.asResponse();
Expand All @@ -95,22 +83,6 @@ describe('resource events', () => {
customer_id: 'customer_id',
external_customer_id: 'external_customer_id',
},
{
event_name: 'event_name',
idempotency_key: 'idempotency_key',
properties: {},
timestamp: '2020-12-09T16:09:53Z',
customer_id: 'customer_id',
external_customer_id: 'external_customer_id',
},
{
event_name: 'event_name',
idempotency_key: 'idempotency_key',
properties: {},
timestamp: '2020-12-09T16:09:53Z',
customer_id: 'customer_id',
external_customer_id: 'external_customer_id',
},
],
backfill_id: 'backfill_id',
debug: true,
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/invoices.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ describe('resource invoices', () => {
'invoice_date[lte]': '2019-12-27T18:11:19.117Z',
is_recurring: true,
limit: 1,
status: ['draft', 'issued', 'paid'],
status: ['draft'],
subscription_id: 'subscription_id',
},
{ path: '/_stainless_unknown_path' },
Expand Down
Loading
Loading