From b59296193d88c1356c61b505a9e2cdff7cf582c0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Jun 2025 23:58:41 +0000 Subject: [PATCH 01/23] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 645b4c0b..cb4778c1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 116 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-c2a4808c828c8288c5c8dfe2fdfa51d4d7c1bcc33cacc6b859d0cf4b35ce95cc.yml -openapi_spec_hash: a2b5a1bfabbd03dd1b411791576eb502 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d7b617958673f6e5b94781a63ed79caed27014e5ca8bbf7e5e31b8f4d135aecb.yml +openapi_spec_hash: 66e9c2cd22385eed3ed507ee60aed4f5 config_hash: 3c3524be9607afb24d2139ce26ce5389 From 1678c342b2abf1d2fc88e4e253b3c5ac7df4d9a0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:03:32 +0000 Subject: [PATCH 02/23] =?UTF-8?q?fix:=20publish=20script=20=E2=80=94=20han?= =?UTF-8?q?dle=20NPM=20errors=20correctly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/publish-npm | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/bin/publish-npm b/bin/publish-npm index 2505deca..fa2243d2 100644 --- a/bin/publish-npm +++ b/bin/publish-npm @@ -7,15 +7,35 @@ npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN" yarn build cd dist +# Get package name and version from package.json +PACKAGE_NAME="$(jq -r -e '.name' ./package.json)" +VERSION="$(jq -r -e '.version' ./package.json)" + # Get latest version from npm # -# If the package doesn't exist, yarn will return -# {"type":"error","data":"Received invalid response from npm."} -# where .data.version doesn't exist so LAST_VERSION will be an empty string. -LAST_VERSION="$(yarn info --json 2> /dev/null | jq -r '.data.version')" - -# Get current version from package.json -VERSION="$(node -p "require('./package.json').version")" +# If the package doesn't exist, npm will return: +# { +# "error": { +# "code": "E404", +# "summary": "Unpublished on 2025-06-05T09:54:53.528Z", +# "detail": "'the_package' is not in this registry..." +# } +# } +NPM_INFO="$(npm view "$PACKAGE_NAME" version --json 2>/dev/null || true)" + +# Check if we got an E404 error +if echo "$NPM_INFO" | jq -e '.error.code == "E404"' > /dev/null 2>&1; then + # Package doesn't exist yet, no last version + LAST_VERSION="" +elif echo "$NPM_INFO" | jq -e '.error' > /dev/null 2>&1; then + # Report other errors + echo "ERROR: npm returned unexpected data:" + echo "$NPM_INFO" + exit 1 +else + # Success - get the version + LAST_VERSION=$(echo "$NPM_INFO" | jq -r '.') # strip quotes +fi # Check if current version is pre-release (e.g. alpha / beta / rc) CURRENT_IS_PRERELEASE=false From 9a95185ee2c315169985d08e5696ef4dd38a3e2b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:54:07 +0000 Subject: [PATCH 03/23] chore(internal): make base APIResource abstract --- scripts/build | 2 +- src/resource.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build b/scripts/build index 1ada5a8a..00b0d511 100755 --- a/scripts/build +++ b/scripts/build @@ -28,7 +28,7 @@ fi node scripts/utils/make-dist-package-json.cjs > dist/package.json # build to .js/.mjs/.d.ts files -npm exec tsc-multi +./node_modules/.bin/tsc-multi # copy over handwritten .js/.mjs/.d.ts files cp src/_shims/*.{d.ts,js,mjs,md} dist/_shims cp src/_shims/auto/*.{d.ts,js,mjs} dist/_shims/auto diff --git a/src/resource.ts b/src/resource.ts index 42de2e41..63351db5 100644 --- a/src/resource.ts +++ b/src/resource.ts @@ -2,7 +2,7 @@ import type { Orb } from './index'; -export class APIResource { +export abstract class APIResource { protected _client: Orb; constructor(client: Orb) { From 0e61c325001e2ce26b26b2a5f70658d8e91a4458 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 18:27:50 +0000 Subject: [PATCH 04/23] feat(client): add support for endpoint-specific base URLs --- src/core.ts | 15 +++++++++++---- src/index.ts | 8 ++++++++ tests/index.test.ts | 22 ++++++++++++++++++++++ 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/src/core.ts b/src/core.ts index ef9b57bc..d11693ed 100644 --- a/src/core.ts +++ b/src/core.ts @@ -170,6 +170,7 @@ export class APIPromise extends Promise { export abstract class APIClient { baseURL: string; + #baseURLOverridden: boolean; maxRetries: number; timeout: number; httpAgent: Agent | undefined; @@ -179,18 +180,21 @@ export abstract class APIClient { constructor({ baseURL, + baseURLOverridden, maxRetries = 2, timeout = 60000, // 1 minute httpAgent, fetch: overriddenFetch, }: { baseURL: string; + baseURLOverridden: boolean; maxRetries?: number | undefined; timeout: number | undefined; httpAgent: Agent | undefined; fetch: Fetch | undefined; }) { this.baseURL = baseURL; + this.#baseURLOverridden = baseURLOverridden; this.maxRetries = validatePositiveInteger('maxRetries', maxRetries); this.timeout = validatePositiveInteger('timeout', timeout); this.httpAgent = httpAgent; @@ -300,7 +304,7 @@ export abstract class APIClient { { retryCount = 0 }: { retryCount?: number } = {}, ): { req: RequestInit; url: string; timeout: number } { const options = { ...inputOptions }; - const { method, path, query, headers: headers = {} } = options; + const { method, path, query, defaultBaseURL, headers: headers = {} } = options; const body = ArrayBuffer.isView(options.body) || (options.__binaryRequest && typeof options.body === 'string') ? @@ -310,7 +314,7 @@ export abstract class APIClient { : null; const contentLength = this.calculateContentLength(body); - const url = this.buildURL(path!, query); + const url = this.buildURL(path!, query, defaultBaseURL); if ('timeout' in options) validatePositiveInteger('timeout', options.timeout); options.timeout = options.timeout ?? this.timeout; const httpAgent = options.httpAgent ?? this.httpAgent ?? getDefaultAgent(url); @@ -503,11 +507,12 @@ export abstract class APIClient { return new PagePromise(this, request, Page); } - buildURL(path: string, query: Req | null | undefined): string { + buildURL(path: string, query: Req | null | undefined, defaultBaseURL?: string | undefined): string { + const baseURL = (!this.#baseURLOverridden && defaultBaseURL) || this.baseURL; const url = isAbsoluteURL(path) ? new URL(path) - : new URL(this.baseURL + (this.baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path)); + : new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path)); const defaultQuery = this.defaultQuery(); if (!isEmptyObj(defaultQuery)) { @@ -792,6 +797,7 @@ export type RequestOptions< query?: Req | undefined; body?: Req | null | undefined; headers?: Headers | undefined; + defaultBaseURL?: string | undefined; maxRetries?: number; stream?: boolean | undefined; @@ -813,6 +819,7 @@ const requestOptionsKeys: KeysEnum = { query: true, body: true, headers: true, + defaultBaseURL: true, maxRetries: true, stream: true, diff --git a/src/index.ts b/src/index.ts index 493e394a..35ffaa31 100644 --- a/src/index.ts +++ b/src/index.ts @@ -295,6 +295,7 @@ export class Orb extends Core.APIClient { super({ baseURL: options.baseURL!, + baseURLOverridden: baseURL ? baseURL !== 'https://api.withorb.com/v1' : false, timeout: options.timeout ?? 60000 /* 1 minute */, httpAgent: options.httpAgent, maxRetries: options.maxRetries, @@ -326,6 +327,13 @@ export class Orb extends Core.APIClient { dimensionalPriceGroups: API.DimensionalPriceGroups = new API.DimensionalPriceGroups(this); subscriptionChanges: API.SubscriptionChanges = new API.SubscriptionChanges(this); + /** + * Check whether the base URL is set to its default. + */ + #baseURLOverridden(): boolean { + return this.baseURL !== 'https://api.withorb.com/v1'; + } + protected override defaultQuery(): Core.DefaultQuery | undefined { return this._options.defaultQuery; } diff --git a/tests/index.test.ts b/tests/index.test.ts index 8041812b..83baf4b8 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -177,6 +177,28 @@ describe('instantiate client', () => { const client = new Orb({ apiKey: 'My API Key' }); expect(client.baseURL).toEqual('https://api.withorb.com/v1'); }); + + test('in request options', () => { + const client = new Orb({ apiKey: 'My API Key' }); + expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual( + 'http://localhost:5000/option/foo', + ); + }); + + test('in request options overridden by client options', () => { + const client = new Orb({ apiKey: 'My API Key', baseURL: 'http://localhost:5000/client' }); + expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual( + 'http://localhost:5000/client/foo', + ); + }); + + test('in request options overridden by env variable', () => { + process.env['ORB_BASE_URL'] = 'http://localhost:5000/env'; + const client = new Orb({ apiKey: 'My API Key' }); + expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual( + 'http://localhost:5000/env/foo', + ); + }); }); test('maxRetries option is correctly set', () => { From 77a5b1e22b94ce2c0a27bb2b4fb14359a4203ca4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 00:12:32 +0000 Subject: [PATCH 05/23] chore(ci): enable for pull requests --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ba3df23..949f02ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,10 @@ on: - 'integrated/**' - 'stl-preview-head/**' - 'stl-preview-base/**' + pull_request: + branches-ignore: + - 'stl-preview-head/**' + - 'stl-preview-base/**' jobs: lint: From 63e9ce18c1f8ed120cf360fcc58931f8ed9e7e7a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 01:03:45 +0000 Subject: [PATCH 06/23] feat(api): api update --- .stats.yml | 4 ++-- src/resources/invoice-line-items.ts | 3 +++ src/resources/invoices.ts | 3 +++ src/resources/shared.ts | 3 +++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index cb4778c1..67d4c73b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 116 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d7b617958673f6e5b94781a63ed79caed27014e5ca8bbf7e5e31b8f4d135aecb.yml -openapi_spec_hash: 66e9c2cd22385eed3ed507ee60aed4f5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d631cebb768659e659427b08c22243b7993936c24214eb1fc837e172c11012c2.yml +openapi_spec_hash: e025faa481e0ca183949cd81548197bf config_hash: 3c3524be9607afb24d2139ce26ce5389 diff --git a/src/resources/invoice-line-items.ts b/src/resources/invoice-line-items.ts index 6d0f452c..153faf70 100644 --- a/src/resources/invoice-line-items.ts +++ b/src/resources/invoice-line-items.ts @@ -53,6 +53,9 @@ export interface InvoiceLineItemCreateResponse { */ credits_applied: string; + /** + * @deprecated This field is deprecated in favor of `adjustments` + */ discount: Shared.Discount | null; /** diff --git a/src/resources/invoices.ts b/src/resources/invoices.ts index e1c83dfd..06d3eee2 100644 --- a/src/resources/invoices.ts +++ b/src/resources/invoices.ts @@ -575,6 +575,9 @@ export namespace InvoiceFetchUpcomingResponse { */ credits_applied: string; + /** + * @deprecated This field is deprecated in favor of `adjustments` + */ discount: Shared.Discount | null; /** diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 15dbe2e1..02a2f9d8 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -1224,6 +1224,9 @@ export namespace Invoice { */ credits_applied: string; + /** + * @deprecated This field is deprecated in favor of `adjustments` + */ discount: Shared.Discount | null; /** From 81496fc6baf0b872a705372289effad7992fb025 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 18:59:13 +0000 Subject: [PATCH 07/23] feat(api): api update --- .stats.yml | 4 +- src/resources/plans/plans.ts | 128 +++++++++---- src/resources/shared.ts | 168 ++++++++++++++++++ tests/api-resources/beta/beta.test.ts | 2 + .../beta/external-plan-id.test.ts | 2 + tests/api-resources/plans/plans.test.ts | 86 +++++---- 6 files changed, 324 insertions(+), 66 deletions(-) diff --git a/.stats.yml b/.stats.yml index 67d4c73b..ac025d8a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 116 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d631cebb768659e659427b08c22243b7993936c24214eb1fc837e172c11012c2.yml -openapi_spec_hash: e025faa481e0ca183949cd81548197bf +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-62651294c6bdd7c8d1c183fe4e5ba844a7ac29d80bef9e150739354a9c431ab4.yml +openapi_spec_hash: 46c5d7f541c0c2143b975be9725c9189 config_hash: 3c3524be9607afb24d2139ce26ce5389 diff --git a/src/resources/plans/plans.ts b/src/resources/plans/plans.ts index c80a6428..7de070dd 100644 --- a/src/resources/plans/plans.ts +++ b/src/resources/plans/plans.ts @@ -265,36 +265,13 @@ export interface PlanCreateParams { * Prices for this plan. If the plan has phases, this includes prices across all * phases of the plan. */ - prices: Array< - | Shared.NewPlanUnitPrice - | Shared.NewPlanPackagePrice - | Shared.NewPlanMatrixPrice - | Shared.NewPlanTieredPrice - | Shared.NewPlanTieredBPSPrice - | Shared.NewPlanBPSPrice - | Shared.NewPlanBulkBPSPrice - | Shared.NewPlanBulkPrice - | Shared.NewPlanThresholdTotalAmountPrice - | Shared.NewPlanTieredPackagePrice - | Shared.NewPlanTieredWithMinimumPrice - | Shared.NewPlanUnitWithPercentPrice - | Shared.NewPlanPackageWithAllocationPrice - | Shared.NewPlanTierWithProrationPrice - | Shared.NewPlanUnitWithProrationPrice - | Shared.NewPlanGroupedAllocationPrice - | Shared.NewPlanGroupedWithProratedMinimumPrice - | Shared.NewPlanGroupedWithMeteredMinimumPrice - | Shared.NewPlanMatrixWithDisplayNamePrice - | Shared.NewPlanBulkWithProrationPrice - | Shared.NewPlanGroupedTieredPackagePrice - | Shared.NewPlanMaxGroupTieredPackagePrice - | Shared.NewPlanScalableMatrixWithUnitPricingPrice - | Shared.NewPlanScalableMatrixWithTieredPricingPrice - | Shared.NewPlanCumulativeGroupedBulkPrice - | Shared.NewPlanTieredPackageWithMinimumPrice - | Shared.NewPlanMatrixWithAllocationPrice - | Shared.NewPlanGroupedTieredPrice - >; + prices: Array; + + /** + * Adjustments for this plan. If the plan has phases, this includes adjustments + * across all phases of the plan. + */ + adjustments?: Array | null; /** * Free-form text which is available on the invoice PDF and the Orb invoice portal. @@ -317,6 +294,12 @@ export interface PlanCreateParams { */ net_terms?: number | null; + /** + * Configuration of pre-defined phases, each with their own prices and adjustments. + * Leave unspecified for plans with a single phase. + */ + plan_phases?: Array | null; + /** * The status of the plan to create (either active or draft). If not specified, * this defaults to active. @@ -324,6 +307,91 @@ export interface PlanCreateParams { status?: 'active' | 'draft'; } +export namespace PlanCreateParams { + export interface Price { + /** + * The allocation price to add to the plan. + */ + allocation_price?: Shared.NewAllocationPrice | null; + + /** + * The phase to add this price to. + */ + plan_phase_order?: number | null; + + /** + * The price to add to the plan + */ + price?: + | Shared.NewPlanUnitPrice + | Shared.NewPlanPackagePrice + | Shared.NewPlanMatrixPrice + | Shared.NewPlanTieredPrice + | Shared.NewPlanTieredBPSPrice + | Shared.NewPlanBPSPrice + | Shared.NewPlanBulkBPSPrice + | Shared.NewPlanBulkPrice + | Shared.NewPlanThresholdTotalAmountPrice + | Shared.NewPlanTieredPackagePrice + | Shared.NewPlanTieredWithMinimumPrice + | Shared.NewPlanUnitWithPercentPrice + | Shared.NewPlanPackageWithAllocationPrice + | Shared.NewPlanTierWithProrationPrice + | Shared.NewPlanUnitWithProrationPrice + | Shared.NewPlanGroupedAllocationPrice + | Shared.NewPlanGroupedWithProratedMinimumPrice + | Shared.NewPlanGroupedWithMeteredMinimumPrice + | Shared.NewPlanMatrixWithDisplayNamePrice + | Shared.NewPlanBulkWithProrationPrice + | Shared.NewPlanGroupedTieredPackagePrice + | Shared.NewPlanMaxGroupTieredPackagePrice + | Shared.NewPlanScalableMatrixWithUnitPricingPrice + | Shared.NewPlanScalableMatrixWithTieredPricingPrice + | Shared.NewPlanCumulativeGroupedBulkPrice + | Shared.NewPlanTieredPackageWithMinimumPrice + | Shared.NewPlanMatrixWithAllocationPrice + | Shared.NewPlanGroupedTieredPrice + | null; + } + + export interface Adjustment { + /** + * The definition of a new adjustment to create and add to the plan. + */ + adjustment: + | Shared.NewPercentageDiscount + | Shared.NewUsageDiscount + | Shared.NewAmountDiscount + | Shared.NewMinimum + | Shared.NewMaximum; + + /** + * The phase to add this adjustment to. + */ + plan_phase_order?: number | null; + } + + export interface PlanPhase { + /** + * Determines the ordering of the phase in a plan's lifecycle. 1 = first phase. + */ + order: number; + + /** + * Align billing cycle day with phase start date. + */ + align_billing_with_phase_start_date?: boolean | null; + + /** + * How many terms of length `duration_unit` this phase is active for. If null, this + * phase is evergreen and active indefinitely + */ + duration?: number | null; + + duration_unit?: 'daily' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | null; + } +} + export interface PlanUpdateParams { /** * An optional user-defined ID for this plan resource, used throughout the system diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 02a2f9d8..f6b8406c 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -4511,6 +4511,12 @@ export interface NewPlanBPSPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanBulkBPSPrice { @@ -4600,6 +4606,12 @@ export interface NewPlanBulkBPSPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanBulkPrice { @@ -4689,6 +4701,12 @@ export interface NewPlanBulkPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanBulkWithProrationPrice { @@ -4778,6 +4796,12 @@ export interface NewPlanBulkWithProrationPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanCumulativeGroupedBulkPrice { @@ -4867,6 +4891,12 @@ export interface NewPlanCumulativeGroupedBulkPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanGroupedAllocationPrice { @@ -4956,6 +4986,12 @@ export interface NewPlanGroupedAllocationPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanGroupedTieredPackagePrice { @@ -5045,6 +5081,12 @@ export interface NewPlanGroupedTieredPackagePrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanGroupedTieredPrice { @@ -5134,6 +5176,12 @@ export interface NewPlanGroupedTieredPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanGroupedWithMeteredMinimumPrice { @@ -5223,6 +5271,12 @@ export interface NewPlanGroupedWithMeteredMinimumPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanGroupedWithProratedMinimumPrice { @@ -5312,6 +5366,12 @@ export interface NewPlanGroupedWithProratedMinimumPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanMatrixPrice { @@ -5401,6 +5461,12 @@ export interface NewPlanMatrixPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanMatrixWithAllocationPrice { @@ -5490,6 +5556,12 @@ export interface NewPlanMatrixWithAllocationPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanMatrixWithDisplayNamePrice { @@ -5579,6 +5651,12 @@ export interface NewPlanMatrixWithDisplayNamePrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanMaxGroupTieredPackagePrice { @@ -5668,6 +5746,12 @@ export interface NewPlanMaxGroupTieredPackagePrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanPackagePrice { @@ -5757,6 +5841,12 @@ export interface NewPlanPackagePrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanPackageWithAllocationPrice { @@ -5846,6 +5936,12 @@ export interface NewPlanPackageWithAllocationPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanScalableMatrixWithTieredPricingPrice { @@ -5935,6 +6031,12 @@ export interface NewPlanScalableMatrixWithTieredPricingPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanScalableMatrixWithUnitPricingPrice { @@ -6024,6 +6126,12 @@ export interface NewPlanScalableMatrixWithUnitPricingPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanThresholdTotalAmountPrice { @@ -6113,6 +6221,12 @@ export interface NewPlanThresholdTotalAmountPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanTierWithProrationPrice { @@ -6202,6 +6316,12 @@ export interface NewPlanTierWithProrationPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanTieredBPSPrice { @@ -6291,6 +6411,12 @@ export interface NewPlanTieredBPSPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanTieredPackagePrice { @@ -6380,6 +6506,12 @@ export interface NewPlanTieredPackagePrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanTieredPackageWithMinimumPrice { @@ -6469,6 +6601,12 @@ export interface NewPlanTieredPackageWithMinimumPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanTieredPrice { @@ -6558,6 +6696,12 @@ export interface NewPlanTieredPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanTieredWithMinimumPrice { @@ -6647,6 +6791,12 @@ export interface NewPlanTieredWithMinimumPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanUnitPrice { @@ -6736,6 +6886,12 @@ export interface NewPlanUnitPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanUnitWithPercentPrice { @@ -6825,6 +6981,12 @@ export interface NewPlanUnitWithPercentPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewPlanUnitWithProrationPrice { @@ -6914,6 +7076,12 @@ export interface NewPlanUnitWithProrationPrice { * by setting `metadata` to `null`. */ metadata?: Record | null; + + /** + * A transient ID that can be used to reference this price when adding adjustments + * in the same API call. + */ + reference_id?: string | null; } export interface NewUsageDiscount { diff --git a/tests/api-resources/beta/beta.test.ts b/tests/api-resources/beta/beta.test.ts index 3b257ca2..d4a8c772 100644 --- a/tests/api-resources/beta/beta.test.ts +++ b/tests/api-resources/beta/beta.test.ts @@ -74,6 +74,7 @@ describe('resource beta', () => { invoice_grouping_key: 'x', invoicing_cycle_configuration: { duration: 0, duration_unit: 'day' }, metadata: { foo: 'string' }, + reference_id: 'reference_id', }, }, ], @@ -132,6 +133,7 @@ describe('resource beta', () => { invoice_grouping_key: 'x', invoicing_cycle_configuration: { duration: 0, duration_unit: 'day' }, metadata: { foo: 'string' }, + reference_id: 'reference_id', }, }, ], diff --git a/tests/api-resources/beta/external-plan-id.test.ts b/tests/api-resources/beta/external-plan-id.test.ts index 1ccb0fed..a24646de 100644 --- a/tests/api-resources/beta/external-plan-id.test.ts +++ b/tests/api-resources/beta/external-plan-id.test.ts @@ -74,6 +74,7 @@ describe('resource externalPlanId', () => { invoice_grouping_key: 'x', invoicing_cycle_configuration: { duration: 0, duration_unit: 'day' }, metadata: { foo: 'string' }, + reference_id: 'reference_id', }, }, ], @@ -132,6 +133,7 @@ describe('resource externalPlanId', () => { invoice_grouping_key: 'x', invoicing_cycle_configuration: { duration: 0, duration_unit: 'day' }, metadata: { foo: 'string' }, + reference_id: 'reference_id', }, }, ], diff --git a/tests/api-resources/plans/plans.test.ts b/tests/api-resources/plans/plans.test.ts index 81624574..8e0a1d9e 100644 --- a/tests/api-resources/plans/plans.test.ts +++ b/tests/api-resources/plans/plans.test.ts @@ -10,19 +10,7 @@ const client = new Orb({ describe('resource plans', () => { test('create: only required params', async () => { - const responsePromise = client.plans.create({ - currency: 'currency', - name: 'name', - prices: [ - { - cadence: 'annual', - item_id: 'item_id', - model_type: 'unit', - name: 'Annual fee', - unit_config: { unit_amount: 'unit_amount' }, - }, - ], - }); + const responsePromise = client.plans.create({ currency: 'currency', name: 'name', prices: [{}] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -38,36 +26,66 @@ describe('resource plans', () => { name: 'name', prices: [ { - cadence: 'annual', - item_id: 'item_id', - model_type: 'unit', - name: 'Annual fee', - unit_config: { unit_amount: 'unit_amount' }, - billable_metric_id: 'billable_metric_id', - billed_in_advance: true, - billing_cycle_configuration: { duration: 0, duration_unit: 'day' }, - conversion_rate: 0, - conversion_rate_config: { - conversion_rate_type: 'unit', + allocation_price: { + amount: '10.00', + cadence: 'monthly', + currency: 'USD', + custom_expiration: { duration: 0, duration_unit: 'day' }, + expires_at_end_of_cadence: true, + }, + plan_phase_order: 0, + price: { + cadence: 'annual', + item_id: 'item_id', + model_type: 'unit', + name: 'Annual fee', unit_config: { unit_amount: 'unit_amount' }, + billable_metric_id: 'billable_metric_id', + billed_in_advance: true, + billing_cycle_configuration: { duration: 0, duration_unit: 'day' }, + conversion_rate: 0, + conversion_rate_config: { + conversion_rate_type: 'unit', + unit_config: { unit_amount: 'unit_amount' }, + }, + currency: 'currency', + dimensional_price_configuration: { + dimension_values: ['string'], + dimensional_price_group_id: 'dimensional_price_group_id', + external_dimensional_price_group_id: 'external_dimensional_price_group_id', + }, + external_price_id: 'external_price_id', + fixed_price_quantity: 0, + invoice_grouping_key: 'x', + invoicing_cycle_configuration: { duration: 0, duration_unit: 'day' }, + metadata: { foo: 'string' }, + reference_id: 'reference_id', }, - currency: 'currency', - dimensional_price_configuration: { - dimension_values: ['string'], - dimensional_price_group_id: 'dimensional_price_group_id', - external_dimensional_price_group_id: 'external_dimensional_price_group_id', + }, + ], + adjustments: [ + { + adjustment: { + adjustment_type: 'percentage_discount', + percentage_discount: 0, + applies_to_all: true, + applies_to_item_ids: ['item_1', 'item_2'], + applies_to_price_ids: ['price_1', 'price_2'], + currency: 'currency', + filters: [{ field: 'price_id', operator: 'includes', values: ['string'] }], + is_invoice_level: true, + price_type: 'usage', }, - external_price_id: 'external_price_id', - fixed_price_quantity: 0, - invoice_grouping_key: 'x', - invoicing_cycle_configuration: { duration: 0, duration_unit: 'day' }, - metadata: { foo: 'string' }, + plan_phase_order: 0, }, ], default_invoice_memo: 'default_invoice_memo', external_plan_id: 'external_plan_id', metadata: { foo: 'string' }, net_terms: 0, + plan_phases: [ + { order: 0, align_billing_with_phase_start_date: true, duration: 1, duration_unit: 'daily' }, + ], status: 'active', }); }); From 44d2c02d887d0e09c32d3a7738de8b31c8421b1c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 00:02:27 +0000 Subject: [PATCH 08/23] feat(api): api update --- .stats.yml | 4 ++-- src/resources/customers/credits/ledger.ts | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index ac025d8a..0834bdd5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 116 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-62651294c6bdd7c8d1c183fe4e5ba844a7ac29d80bef9e150739354a9c431ab4.yml -openapi_spec_hash: 46c5d7f541c0c2143b975be9725c9189 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-9d6e0a988df83c0e2baa559ef57ec96981669a7a294de2188adb2cd6bbc0be8a.yml +openapi_spec_hash: 7f5e7221872d7ee799141f546c394f48 config_hash: 3c3524be9607afb24d2139ce26ce5389 diff --git a/src/resources/customers/credits/ledger.ts b/src/resources/customers/credits/ledger.ts index 1a24ae4f..511bb127 100644 --- a/src/resources/customers/credits/ledger.ts +++ b/src/resources/customers/credits/ledger.ts @@ -948,11 +948,6 @@ export declare namespace LedgerCreateEntryParams { export interface AddExpirationChangeCreditLedgerEntryRequestParams { entry_type: 'expiration_change'; - /** - * An ISO 8601 format date that identifies the origination credit block to expire - */ - expiry_date: string | null; - /** * A future date (specified in YYYY-MM-DD format) used for expiration change, * denoting when credits transferred (as part of a partial block expiration) should @@ -985,6 +980,11 @@ export declare namespace LedgerCreateEntryParams { */ description?: string | null; + /** + * An ISO 8601 format date that identifies the origination credit block to expire + */ + expiry_date?: string | null; + /** * 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 @@ -1199,11 +1199,6 @@ export declare namespace LedgerCreateEntryByExternalIDParams { export interface AddExpirationChangeCreditLedgerEntryRequestParams { entry_type: 'expiration_change'; - /** - * An ISO 8601 format date that identifies the origination credit block to expire - */ - expiry_date: string | null; - /** * A future date (specified in YYYY-MM-DD format) used for expiration change, * denoting when credits transferred (as part of a partial block expiration) should @@ -1236,6 +1231,11 @@ export declare namespace LedgerCreateEntryByExternalIDParams { */ description?: string | null; + /** + * An ISO 8601 format date that identifies the origination credit block to expire + */ + expiry_date?: string | null; + /** * 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 From 509fcfb895402525e2d6ce1d6e8ca994ead496a8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 19:21:51 +0000 Subject: [PATCH 09/23] refactor(types): replace Record with mapped types --- src/resources/customers/credits/ledger.ts | 34 +-- src/resources/customers/customers.ts | 8 +- .../dimensional-price-groups.ts | 4 +- src/resources/events/events.ts | 6 +- src/resources/invoices.ts | 6 +- src/resources/items.ts | 6 +- src/resources/metrics.ts | 6 +- src/resources/plans/external-plan-id.ts | 2 +- src/resources/plans/plans.ts | 6 +- src/resources/prices/external-price-id.ts | 2 +- src/resources/prices/prices.ts | 98 +++--- src/resources/shared.ts | 284 +++++++++--------- src/resources/subscription-changes.ts | 2 +- src/resources/subscriptions.ts | 100 +++--- 14 files changed, 282 insertions(+), 282 deletions(-) diff --git a/src/resources/customers/credits/ledger.ts b/src/resources/customers/credits/ledger.ts index 511bb127..1d6c58ff 100644 --- a/src/resources/customers/credits/ledger.ts +++ b/src/resources/customers/credits/ledger.ts @@ -505,7 +505,7 @@ export interface AmendmentLedgerEntry { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; starting_balance: number; } @@ -539,7 +539,7 @@ export interface CreditBlockExpiryLedgerEntry { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; starting_balance: number; } @@ -573,7 +573,7 @@ export interface DecrementLedgerEntry { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; starting_balance: number; @@ -613,7 +613,7 @@ export interface ExpirationChangeLedgerEntry { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; new_block_expiry_date: string | null; @@ -649,7 +649,7 @@ export interface IncrementLedgerEntry { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; starting_balance: number; @@ -688,7 +688,7 @@ export interface VoidInitiatedLedgerEntry { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; new_block_expiry_date: string; @@ -728,7 +728,7 @@ export interface VoidLedgerEntry { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; starting_balance: number; @@ -872,7 +872,7 @@ export declare namespace LedgerCreateEntryParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * Can only be specified when entry_type=increment. How much, in the customer's @@ -942,7 +942,7 @@ export declare namespace LedgerCreateEntryParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface AddExpirationChangeCreditLedgerEntryRequestParams { @@ -990,7 +990,7 @@ export declare namespace LedgerCreateEntryParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface AddVoidCreditLedgerEntryRequestParams { @@ -1025,7 +1025,7 @@ export declare namespace LedgerCreateEntryParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * Can only be specified when `entry_type=void`. The reason for the void. @@ -1065,7 +1065,7 @@ export declare namespace LedgerCreateEntryParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } } @@ -1123,7 +1123,7 @@ export declare namespace LedgerCreateEntryByExternalIDParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * Can only be specified when entry_type=increment. How much, in the customer's @@ -1193,7 +1193,7 @@ export declare namespace LedgerCreateEntryByExternalIDParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface AddExpirationChangeCreditLedgerEntryRequestParams { @@ -1241,7 +1241,7 @@ export declare namespace LedgerCreateEntryByExternalIDParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface AddVoidCreditLedgerEntryRequestParams { @@ -1276,7 +1276,7 @@ export declare namespace LedgerCreateEntryByExternalIDParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * Can only be specified when `entry_type=void`. The reason for the void. @@ -1316,7 +1316,7 @@ export declare namespace LedgerCreateEntryByExternalIDParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } } diff --git a/src/resources/customers/customers.ts b/src/resources/customers/customers.ts index 8d6586a2..52309f77 100644 --- a/src/resources/customers/customers.ts +++ b/src/resources/customers/customers.ts @@ -273,7 +273,7 @@ export interface Customer { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * The full name of the customer @@ -546,7 +546,7 @@ export interface CustomerCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * This is used for creating charges or invoices in an external system via Orb. @@ -731,7 +731,7 @@ export interface CustomerUpdateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * The full name of the customer @@ -928,7 +928,7 @@ export interface CustomerUpdateByExternalIDParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * The full name of the customer diff --git a/src/resources/dimensional-price-groups/dimensional-price-groups.ts b/src/resources/dimensional-price-groups/dimensional-price-groups.ts index aca2e1fa..189d7c2c 100644 --- a/src/resources/dimensional-price-groups/dimensional-price-groups.ts +++ b/src/resources/dimensional-price-groups/dimensional-price-groups.ts @@ -94,7 +94,7 @@ export interface DimensionalPriceGroup { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * The name of the dimensional price group @@ -125,7 +125,7 @@ export interface DimensionalPriceGroupCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface DimensionalPriceGroupListParams extends PageParams {} diff --git a/src/resources/events/events.ts b/src/resources/events/events.ts index b1899870..1b9221b0 100644 --- a/src/resources/events/events.ts +++ b/src/resources/events/events.ts @@ -451,7 +451,7 @@ export namespace EventSearchResponse { * A dictionary of custom properties. Values in this dictionary must be numeric, * boolean, or strings. Nested dictionaries are disallowed. */ - properties: Record; + properties: { [key: string]: unknown }; /** * An ISO 8601 format date with no timezone offset (i.e. UTC). This should @@ -472,7 +472,7 @@ export interface EventUpdateParams { * A dictionary of custom properties. Values in this dictionary must be numeric, * boolean, or strings. Nested dictionaries are disallowed. */ - properties: Record; + properties: { [key: string]: unknown }; /** * An ISO 8601 format date with no timezone offset (i.e. UTC). This should @@ -530,7 +530,7 @@ export namespace EventIngestParams { * A dictionary of custom properties. Values in this dictionary must be numeric, * boolean, or strings. Nested dictionaries are disallowed. */ - properties: Record; + properties: { [key: string]: unknown }; /** * An ISO 8601 format date with no timezone offset (i.e. UTC). This should diff --git a/src/resources/invoices.ts b/src/resources/invoices.ts index 06d3eee2..e0eefaf4 100644 --- a/src/resources/invoices.ts +++ b/src/resources/invoices.ts @@ -358,7 +358,7 @@ export interface InvoiceFetchUpcomingResponse { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; minimum: Shared.Minimum | null; @@ -757,7 +757,7 @@ export interface InvoiceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * When true, this invoice will be submitted for issuance upon creation. When @@ -803,7 +803,7 @@ export interface InvoiceUpdateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface InvoiceListParams extends PageParams { diff --git a/src/resources/items.ts b/src/resources/items.ts index dd90085c..06a4eec7 100644 --- a/src/resources/items.ts +++ b/src/resources/items.ts @@ -71,7 +71,7 @@ export interface Item { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; name: string; } @@ -102,7 +102,7 @@ export interface ItemCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface ItemUpdateParams { @@ -113,7 +113,7 @@ export interface ItemUpdateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; name?: string | null; } diff --git a/src/resources/metrics.ts b/src/resources/metrics.ts index dae7856d..47662568 100644 --- a/src/resources/metrics.ts +++ b/src/resources/metrics.ts @@ -83,7 +83,7 @@ export interface BillableMetric { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; name: string; @@ -116,7 +116,7 @@ export interface MetricCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface MetricUpdateParams { @@ -125,7 +125,7 @@ export interface MetricUpdateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface MetricListParams extends PageParams { diff --git a/src/resources/plans/external-plan-id.ts b/src/resources/plans/external-plan-id.ts index 395a2044..e936d0f7 100644 --- a/src/resources/plans/external-plan-id.ts +++ b/src/resources/plans/external-plan-id.ts @@ -55,7 +55,7 @@ export interface ExternalPlanIDUpdateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export declare namespace ExternalPlanID { diff --git a/src/resources/plans/plans.ts b/src/resources/plans/plans.ts index 7de070dd..2c3c1c79 100644 --- a/src/resources/plans/plans.ts +++ b/src/resources/plans/plans.ts @@ -152,7 +152,7 @@ export interface Plan { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -285,7 +285,7 @@ export interface PlanCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * The net terms determines the difference between the invoice date and the issue @@ -405,7 +405,7 @@ export interface PlanUpdateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface PlanListParams extends PageParams { diff --git a/src/resources/prices/external-price-id.ts b/src/resources/prices/external-price-id.ts index e335203c..89246196 100644 --- a/src/resources/prices/external-price-id.ts +++ b/src/resources/prices/external-price-id.ts @@ -34,7 +34,7 @@ export interface ExternalPriceIDUpdateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export declare namespace ExternalPriceID { diff --git a/src/resources/prices/prices.ts b/src/resources/prices/prices.ts index be947d79..fd99b497 100644 --- a/src/resources/prices/prices.ts +++ b/src/resources/prices/prices.ts @@ -359,7 +359,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingPackagePrice { @@ -447,7 +447,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingMatrixPrice { @@ -535,7 +535,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingMatrixWithAllocationPrice { @@ -623,7 +623,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingTieredPrice { @@ -711,7 +711,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingTieredBPSPrice { @@ -799,7 +799,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingBPSPrice { @@ -887,7 +887,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingBulkBPSPrice { @@ -975,7 +975,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingBulkPrice { @@ -1063,7 +1063,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingThresholdTotalAmountPrice { @@ -1089,7 +1089,7 @@ export declare namespace PriceCreateParams { */ name: string; - threshold_total_amount_config: Record; + threshold_total_amount_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -1151,7 +1151,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingTieredPackagePrice { @@ -1177,7 +1177,7 @@ export declare namespace PriceCreateParams { */ name: string; - tiered_package_config: Record; + tiered_package_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -1239,7 +1239,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingGroupedTieredPrice { @@ -1253,7 +1253,7 @@ export declare namespace PriceCreateParams { */ currency: string; - grouped_tiered_config: Record; + grouped_tiered_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -1327,7 +1327,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingMaxGroupTieredPackagePrice { @@ -1346,7 +1346,7 @@ export declare namespace PriceCreateParams { */ item_id: string; - max_group_tiered_package_config: Record; + max_group_tiered_package_config: { [key: string]: unknown }; model_type: 'max_group_tiered_package'; @@ -1415,7 +1415,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingTieredWithMinimumPrice { @@ -1441,7 +1441,7 @@ export declare namespace PriceCreateParams { */ name: string; - tiered_with_minimum_config: Record; + tiered_with_minimum_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -1503,7 +1503,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingPackageWithAllocationPrice { @@ -1529,7 +1529,7 @@ export declare namespace PriceCreateParams { */ name: string; - package_with_allocation_config: Record; + package_with_allocation_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -1591,7 +1591,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingTieredPackageWithMinimumPrice { @@ -1617,7 +1617,7 @@ export declare namespace PriceCreateParams { */ name: string; - tiered_package_with_minimum_config: Record; + tiered_package_with_minimum_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -1679,7 +1679,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingUnitWithPercentPrice { @@ -1705,7 +1705,7 @@ export declare namespace PriceCreateParams { */ name: string; - unit_with_percent_config: Record; + unit_with_percent_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -1767,7 +1767,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingTieredWithProrationPrice { @@ -1793,7 +1793,7 @@ export declare namespace PriceCreateParams { */ name: string; - tiered_with_proration_config: Record; + tiered_with_proration_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -1855,7 +1855,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingUnitWithProrationPrice { @@ -1881,7 +1881,7 @@ export declare namespace PriceCreateParams { */ name: string; - unit_with_proration_config: Record; + unit_with_proration_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -1943,7 +1943,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingGroupedAllocationPrice { @@ -1957,7 +1957,7 @@ export declare namespace PriceCreateParams { */ currency: string; - grouped_allocation_config: Record; + grouped_allocation_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -2031,7 +2031,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingGroupedWithProratedMinimumPrice { @@ -2045,7 +2045,7 @@ export declare namespace PriceCreateParams { */ currency: string; - grouped_with_prorated_minimum_config: Record; + grouped_with_prorated_minimum_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -2119,7 +2119,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingGroupedWithMeteredMinimumPrice { @@ -2133,7 +2133,7 @@ export declare namespace PriceCreateParams { */ currency: string; - grouped_with_metered_minimum_config: Record; + grouped_with_metered_minimum_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -2207,7 +2207,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingMatrixWithDisplayNamePrice { @@ -2226,7 +2226,7 @@ export declare namespace PriceCreateParams { */ item_id: string; - matrix_with_display_name_config: Record; + matrix_with_display_name_config: { [key: string]: unknown }; model_type: 'matrix_with_display_name'; @@ -2295,11 +2295,11 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingBulkWithProrationPrice { - bulk_with_proration_config: Record; + bulk_with_proration_config: { [key: string]: unknown }; /** * The cadence to bill for this price on. @@ -2383,7 +2383,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingGroupedTieredPackagePrice { @@ -2397,7 +2397,7 @@ export declare namespace PriceCreateParams { */ currency: string; - grouped_tiered_package_config: Record; + grouped_tiered_package_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -2471,7 +2471,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingScalableMatrixWithUnitPricingPrice { @@ -2497,7 +2497,7 @@ export declare namespace PriceCreateParams { */ name: string; - scalable_matrix_with_unit_pricing_config: Record; + scalable_matrix_with_unit_pricing_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -2559,7 +2559,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingScalableMatrixWithTieredPricingPrice { @@ -2585,7 +2585,7 @@ export declare namespace PriceCreateParams { */ name: string; - scalable_matrix_with_tiered_pricing_config: Record; + scalable_matrix_with_tiered_pricing_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -2647,7 +2647,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingCumulativeGroupedBulkPrice { @@ -2656,7 +2656,7 @@ export declare namespace PriceCreateParams { */ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; - cumulative_grouped_bulk_config: Record; + cumulative_grouped_bulk_config: { [key: string]: unknown }; /** * An ISO 4217 currency string for which this price is billed in. @@ -2735,7 +2735,7 @@ export declare namespace PriceCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } } @@ -2745,7 +2745,7 @@ export interface PriceUpdateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface PriceListParams extends PageParams {} @@ -2914,7 +2914,7 @@ export namespace PriceEvaluatePreviewEventsParams { * A dictionary of custom properties. Values in this dictionary must be numeric, * boolean, or strings. Nested dictionaries are disallowed. */ - properties: Record; + properties: { [key: string]: unknown }; /** * An ISO 8601 format date with no timezone offset (i.e. UTC). This should diff --git a/src/resources/shared.ts b/src/resources/shared.ts index f6b8406c..69ea7616 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -1012,7 +1012,7 @@ export interface Invoice { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; minimum: Minimum | null; @@ -1914,7 +1914,7 @@ export interface NewFloatingBPSPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingBulkBPSPrice { @@ -2002,7 +2002,7 @@ export interface NewFloatingBulkBPSPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingBulkPrice { @@ -2090,11 +2090,11 @@ export interface NewFloatingBulkPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingBulkWithProrationPrice { - bulk_with_proration_config: Record; + bulk_with_proration_config: { [key: string]: unknown }; /** * The cadence to bill for this price on. @@ -2178,7 +2178,7 @@ export interface NewFloatingBulkWithProrationPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingCumulativeGroupedBulkPrice { @@ -2187,7 +2187,7 @@ export interface NewFloatingCumulativeGroupedBulkPrice { */ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; - cumulative_grouped_bulk_config: Record; + cumulative_grouped_bulk_config: { [key: string]: unknown }; /** * An ISO 4217 currency string for which this price is billed in. @@ -2266,7 +2266,7 @@ export interface NewFloatingCumulativeGroupedBulkPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingGroupedAllocationPrice { @@ -2280,7 +2280,7 @@ export interface NewFloatingGroupedAllocationPrice { */ currency: string; - grouped_allocation_config: Record; + grouped_allocation_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -2354,7 +2354,7 @@ export interface NewFloatingGroupedAllocationPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingGroupedTieredPackagePrice { @@ -2368,7 +2368,7 @@ export interface NewFloatingGroupedTieredPackagePrice { */ currency: string; - grouped_tiered_package_config: Record; + grouped_tiered_package_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -2442,7 +2442,7 @@ export interface NewFloatingGroupedTieredPackagePrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingGroupedTieredPrice { @@ -2456,7 +2456,7 @@ export interface NewFloatingGroupedTieredPrice { */ currency: string; - grouped_tiered_config: Record; + grouped_tiered_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -2530,7 +2530,7 @@ export interface NewFloatingGroupedTieredPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingGroupedWithMeteredMinimumPrice { @@ -2544,7 +2544,7 @@ export interface NewFloatingGroupedWithMeteredMinimumPrice { */ currency: string; - grouped_with_metered_minimum_config: Record; + grouped_with_metered_minimum_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -2618,7 +2618,7 @@ export interface NewFloatingGroupedWithMeteredMinimumPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingGroupedWithProratedMinimumPrice { @@ -2632,7 +2632,7 @@ export interface NewFloatingGroupedWithProratedMinimumPrice { */ currency: string; - grouped_with_prorated_minimum_config: Record; + grouped_with_prorated_minimum_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -2706,7 +2706,7 @@ export interface NewFloatingGroupedWithProratedMinimumPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingMatrixPrice { @@ -2794,7 +2794,7 @@ export interface NewFloatingMatrixPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingMatrixWithAllocationPrice { @@ -2882,7 +2882,7 @@ export interface NewFloatingMatrixWithAllocationPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingMatrixWithDisplayNamePrice { @@ -2901,7 +2901,7 @@ export interface NewFloatingMatrixWithDisplayNamePrice { */ item_id: string; - matrix_with_display_name_config: Record; + matrix_with_display_name_config: { [key: string]: unknown }; model_type: 'matrix_with_display_name'; @@ -2970,7 +2970,7 @@ export interface NewFloatingMatrixWithDisplayNamePrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingMaxGroupTieredPackagePrice { @@ -2989,7 +2989,7 @@ export interface NewFloatingMaxGroupTieredPackagePrice { */ item_id: string; - max_group_tiered_package_config: Record; + max_group_tiered_package_config: { [key: string]: unknown }; model_type: 'max_group_tiered_package'; @@ -3058,7 +3058,7 @@ export interface NewFloatingMaxGroupTieredPackagePrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingPackagePrice { @@ -3146,7 +3146,7 @@ export interface NewFloatingPackagePrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingPackageWithAllocationPrice { @@ -3172,7 +3172,7 @@ export interface NewFloatingPackageWithAllocationPrice { */ name: string; - package_with_allocation_config: Record; + package_with_allocation_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -3234,7 +3234,7 @@ export interface NewFloatingPackageWithAllocationPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingScalableMatrixWithTieredPricingPrice { @@ -3260,7 +3260,7 @@ export interface NewFloatingScalableMatrixWithTieredPricingPrice { */ name: string; - scalable_matrix_with_tiered_pricing_config: Record; + scalable_matrix_with_tiered_pricing_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -3322,7 +3322,7 @@ export interface NewFloatingScalableMatrixWithTieredPricingPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingScalableMatrixWithUnitPricingPrice { @@ -3348,7 +3348,7 @@ export interface NewFloatingScalableMatrixWithUnitPricingPrice { */ name: string; - scalable_matrix_with_unit_pricing_config: Record; + scalable_matrix_with_unit_pricing_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -3410,7 +3410,7 @@ export interface NewFloatingScalableMatrixWithUnitPricingPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingThresholdTotalAmountPrice { @@ -3436,7 +3436,7 @@ export interface NewFloatingThresholdTotalAmountPrice { */ name: string; - threshold_total_amount_config: Record; + threshold_total_amount_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -3498,7 +3498,7 @@ export interface NewFloatingThresholdTotalAmountPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingTieredBPSPrice { @@ -3586,7 +3586,7 @@ export interface NewFloatingTieredBPSPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingTieredPackagePrice { @@ -3612,7 +3612,7 @@ export interface NewFloatingTieredPackagePrice { */ name: string; - tiered_package_config: Record; + tiered_package_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -3674,7 +3674,7 @@ export interface NewFloatingTieredPackagePrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingTieredPackageWithMinimumPrice { @@ -3700,7 +3700,7 @@ export interface NewFloatingTieredPackageWithMinimumPrice { */ name: string; - tiered_package_with_minimum_config: Record; + tiered_package_with_minimum_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -3762,7 +3762,7 @@ export interface NewFloatingTieredPackageWithMinimumPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingTieredPrice { @@ -3850,7 +3850,7 @@ export interface NewFloatingTieredPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingTieredWithMinimumPrice { @@ -3876,7 +3876,7 @@ export interface NewFloatingTieredWithMinimumPrice { */ name: string; - tiered_with_minimum_config: Record; + tiered_with_minimum_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -3938,7 +3938,7 @@ export interface NewFloatingTieredWithMinimumPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingTieredWithProrationPrice { @@ -3964,7 +3964,7 @@ export interface NewFloatingTieredWithProrationPrice { */ name: string; - tiered_with_proration_config: Record; + tiered_with_proration_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -4026,7 +4026,7 @@ export interface NewFloatingTieredWithProrationPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingUnitPrice { @@ -4114,7 +4114,7 @@ export interface NewFloatingUnitPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingUnitWithPercentPrice { @@ -4140,7 +4140,7 @@ export interface NewFloatingUnitWithPercentPrice { */ name: string; - unit_with_percent_config: Record; + unit_with_percent_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -4202,7 +4202,7 @@ export interface NewFloatingUnitWithPercentPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewFloatingUnitWithProrationPrice { @@ -4228,7 +4228,7 @@ export interface NewFloatingUnitWithProrationPrice { */ name: string; - unit_with_proration_config: Record; + unit_with_proration_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -4290,7 +4290,7 @@ export interface NewFloatingUnitWithProrationPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; } export interface NewMaximum { @@ -4510,7 +4510,7 @@ export interface NewPlanBPSPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -4605,7 +4605,7 @@ export interface NewPlanBulkBPSPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -4700,7 +4700,7 @@ export interface NewPlanBulkPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -4710,7 +4710,7 @@ export interface NewPlanBulkPrice { } export interface NewPlanBulkWithProrationPrice { - bulk_with_proration_config: Record; + bulk_with_proration_config: { [key: string]: unknown }; /** * The cadence to bill for this price on. @@ -4795,7 +4795,7 @@ export interface NewPlanBulkWithProrationPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -4810,7 +4810,7 @@ export interface NewPlanCumulativeGroupedBulkPrice { */ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; - cumulative_grouped_bulk_config: Record; + cumulative_grouped_bulk_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -4890,7 +4890,7 @@ export interface NewPlanCumulativeGroupedBulkPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -4905,7 +4905,7 @@ export interface NewPlanGroupedAllocationPrice { */ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; - grouped_allocation_config: Record; + grouped_allocation_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -4985,7 +4985,7 @@ export interface NewPlanGroupedAllocationPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -5000,7 +5000,7 @@ export interface NewPlanGroupedTieredPackagePrice { */ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; - grouped_tiered_package_config: Record; + grouped_tiered_package_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -5080,7 +5080,7 @@ export interface NewPlanGroupedTieredPackagePrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -5095,7 +5095,7 @@ export interface NewPlanGroupedTieredPrice { */ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; - grouped_tiered_config: Record; + grouped_tiered_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -5175,7 +5175,7 @@ export interface NewPlanGroupedTieredPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -5190,7 +5190,7 @@ export interface NewPlanGroupedWithMeteredMinimumPrice { */ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; - grouped_with_metered_minimum_config: Record; + grouped_with_metered_minimum_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -5270,7 +5270,7 @@ export interface NewPlanGroupedWithMeteredMinimumPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -5285,7 +5285,7 @@ export interface NewPlanGroupedWithProratedMinimumPrice { */ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; - grouped_with_prorated_minimum_config: Record; + grouped_with_prorated_minimum_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -5365,7 +5365,7 @@ export interface NewPlanGroupedWithProratedMinimumPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -5460,7 +5460,7 @@ export interface NewPlanMatrixPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -5555,7 +5555,7 @@ export interface NewPlanMatrixWithAllocationPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -5575,7 +5575,7 @@ export interface NewPlanMatrixWithDisplayNamePrice { */ item_id: string; - matrix_with_display_name_config: Record; + matrix_with_display_name_config: { [key: string]: unknown }; model_type: 'matrix_with_display_name'; @@ -5650,7 +5650,7 @@ export interface NewPlanMatrixWithDisplayNamePrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -5670,7 +5670,7 @@ export interface NewPlanMaxGroupTieredPackagePrice { */ item_id: string; - max_group_tiered_package_config: Record; + max_group_tiered_package_config: { [key: string]: unknown }; model_type: 'max_group_tiered_package'; @@ -5745,7 +5745,7 @@ export interface NewPlanMaxGroupTieredPackagePrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -5840,7 +5840,7 @@ export interface NewPlanPackagePrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -5867,7 +5867,7 @@ export interface NewPlanPackageWithAllocationPrice { */ name: string; - package_with_allocation_config: Record; + package_with_allocation_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -5935,7 +5935,7 @@ export interface NewPlanPackageWithAllocationPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -5962,7 +5962,7 @@ export interface NewPlanScalableMatrixWithTieredPricingPrice { */ name: string; - scalable_matrix_with_tiered_pricing_config: Record; + scalable_matrix_with_tiered_pricing_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -6030,7 +6030,7 @@ export interface NewPlanScalableMatrixWithTieredPricingPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -6057,7 +6057,7 @@ export interface NewPlanScalableMatrixWithUnitPricingPrice { */ name: string; - scalable_matrix_with_unit_pricing_config: Record; + scalable_matrix_with_unit_pricing_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -6125,7 +6125,7 @@ export interface NewPlanScalableMatrixWithUnitPricingPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -6152,7 +6152,7 @@ export interface NewPlanThresholdTotalAmountPrice { */ name: string; - threshold_total_amount_config: Record; + threshold_total_amount_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -6220,7 +6220,7 @@ export interface NewPlanThresholdTotalAmountPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -6247,7 +6247,7 @@ export interface NewPlanTierWithProrationPrice { */ name: string; - tiered_with_proration_config: Record; + tiered_with_proration_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -6315,7 +6315,7 @@ export interface NewPlanTierWithProrationPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -6410,7 +6410,7 @@ export interface NewPlanTieredBPSPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -6437,7 +6437,7 @@ export interface NewPlanTieredPackagePrice { */ name: string; - tiered_package_config: Record; + tiered_package_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -6505,7 +6505,7 @@ export interface NewPlanTieredPackagePrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -6532,7 +6532,7 @@ export interface NewPlanTieredPackageWithMinimumPrice { */ name: string; - tiered_package_with_minimum_config: Record; + tiered_package_with_minimum_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -6600,7 +6600,7 @@ export interface NewPlanTieredPackageWithMinimumPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -6695,7 +6695,7 @@ export interface NewPlanTieredPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -6722,7 +6722,7 @@ export interface NewPlanTieredWithMinimumPrice { */ name: string; - tiered_with_minimum_config: Record; + tiered_with_minimum_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -6790,7 +6790,7 @@ export interface NewPlanTieredWithMinimumPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -6885,7 +6885,7 @@ export interface NewPlanUnitPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -6912,7 +6912,7 @@ export interface NewPlanUnitWithPercentPrice { */ name: string; - unit_with_percent_config: Record; + unit_with_percent_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -6980,7 +6980,7 @@ export interface NewPlanUnitWithPercentPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -7007,7 +7007,7 @@ export interface NewPlanUnitWithProrationPrice { */ name: string; - unit_with_proration_config: Record; + unit_with_proration_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -7075,7 +7075,7 @@ export interface NewPlanUnitWithProrationPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -7526,7 +7526,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -7599,7 +7599,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -7674,7 +7674,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -7745,7 +7745,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -7818,7 +7818,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -7893,7 +7893,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -7966,7 +7966,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -8039,7 +8039,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -8110,7 +8110,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -8130,7 +8130,7 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; - threshold_total_amount_config: Record; + threshold_total_amount_config: { [key: string]: unknown }; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -8183,7 +8183,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -8203,7 +8203,7 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; - tiered_package_config: Record; + tiered_package_config: { [key: string]: unknown }; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -8236,7 +8236,7 @@ export namespace Price { fixed_price_quantity: number | null; - grouped_tiered_config: Record; + grouped_tiered_config: { [key: string]: unknown }; invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null; @@ -8258,7 +8258,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -8329,7 +8329,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -8349,7 +8349,7 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; - tiered_with_minimum_config: Record; + tiered_with_minimum_config: { [key: string]: unknown }; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -8402,7 +8402,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -8422,7 +8422,7 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; - tiered_package_with_minimum_config: Record; + tiered_package_with_minimum_config: { [key: string]: unknown }; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -8475,7 +8475,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -8491,7 +8491,7 @@ export namespace Price { name: string; - package_with_allocation_config: Record; + package_with_allocation_config: { [key: string]: unknown }; plan_phase_order: number | null; @@ -8548,7 +8548,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -8568,7 +8568,7 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; - unit_with_percent_config: Record; + unit_with_percent_config: { [key: string]: unknown }; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -8623,7 +8623,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -8694,7 +8694,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -8714,7 +8714,7 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; - tiered_with_proration_config: Record; + tiered_with_proration_config: { [key: string]: unknown }; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -8767,7 +8767,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -8787,7 +8787,7 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; - unit_with_proration_config: Record; + unit_with_proration_config: { [key: string]: unknown }; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -8820,7 +8820,7 @@ export namespace Price { fixed_price_quantity: number | null; - grouped_allocation_config: Record; + grouped_allocation_config: { [key: string]: unknown }; invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null; @@ -8842,7 +8842,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -8893,7 +8893,7 @@ export namespace Price { fixed_price_quantity: number | null; - grouped_with_prorated_minimum_config: Record; + grouped_with_prorated_minimum_config: { [key: string]: unknown }; invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null; @@ -8915,7 +8915,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -8966,7 +8966,7 @@ export namespace Price { fixed_price_quantity: number | null; - grouped_with_metered_minimum_config: Record; + grouped_with_metered_minimum_config: { [key: string]: unknown }; invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null; @@ -8988,7 +8988,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -9043,7 +9043,7 @@ export namespace Price { item: Shared.ItemSlim; - matrix_with_display_name_config: Record; + matrix_with_display_name_config: { [key: string]: unknown }; /** * @deprecated @@ -9061,7 +9061,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -9091,7 +9091,7 @@ export namespace Price { billing_cycle_configuration: Shared.BillingCycleConfiguration; - bulk_with_proration_config: Record; + bulk_with_proration_config: { [key: string]: unknown }; cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom'; @@ -9134,7 +9134,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -9185,7 +9185,7 @@ export namespace Price { fixed_price_quantity: number | null; - grouped_tiered_package_config: Record; + grouped_tiered_package_config: { [key: string]: unknown }; invoicing_cycle_configuration: Shared.BillingCycleConfiguration | null; @@ -9207,7 +9207,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -9262,7 +9262,7 @@ export namespace Price { item: Shared.ItemSlim; - max_group_tiered_package_config: Record; + max_group_tiered_package_config: { [key: string]: unknown }; /** * @deprecated @@ -9280,7 +9280,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -9351,7 +9351,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -9371,7 +9371,7 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; - scalable_matrix_with_unit_pricing_config: Record; + scalable_matrix_with_unit_pricing_config: { [key: string]: unknown }; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -9424,7 +9424,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated @@ -9444,7 +9444,7 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; - scalable_matrix_with_tiered_pricing_config: Record; + scalable_matrix_with_tiered_pricing_config: { [key: string]: unknown }; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -9466,7 +9466,7 @@ export namespace Price { credit_allocation: Shared.Allocation | null; - cumulative_grouped_bulk_config: Record; + cumulative_grouped_bulk_config: { [key: string]: unknown }; currency: string; @@ -9499,7 +9499,7 @@ export namespace Price { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated diff --git a/src/resources/subscription-changes.ts b/src/resources/subscription-changes.ts index ced31e7e..d548924a 100644 --- a/src/resources/subscription-changes.ts +++ b/src/resources/subscription-changes.ts @@ -169,7 +169,7 @@ export interface MutatedSubscription { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated The minimum intervals for this subscription sorted by the diff --git a/src/resources/subscriptions.ts b/src/resources/subscriptions.ts index ed91bd8f..1662b103 100644 --- a/src/resources/subscriptions.ts +++ b/src/resources/subscriptions.ts @@ -1178,7 +1178,7 @@ export interface NewSubscriptionBPSPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -1273,7 +1273,7 @@ export interface NewSubscriptionBulkBPSPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -1368,7 +1368,7 @@ export interface NewSubscriptionBulkPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -1378,7 +1378,7 @@ export interface NewSubscriptionBulkPrice { } export interface NewSubscriptionBulkWithProrationPrice { - bulk_with_proration_config: Record; + bulk_with_proration_config: { [key: string]: unknown }; /** * The cadence to bill for this price on. @@ -1463,7 +1463,7 @@ export interface NewSubscriptionBulkWithProrationPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -1478,7 +1478,7 @@ export interface NewSubscriptionCumulativeGroupedBulkPrice { */ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; - cumulative_grouped_bulk_config: Record; + cumulative_grouped_bulk_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -1558,7 +1558,7 @@ export interface NewSubscriptionCumulativeGroupedBulkPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -1573,7 +1573,7 @@ export interface NewSubscriptionGroupedAllocationPrice { */ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; - grouped_allocation_config: Record; + grouped_allocation_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -1653,7 +1653,7 @@ export interface NewSubscriptionGroupedAllocationPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -1668,7 +1668,7 @@ export interface NewSubscriptionGroupedTieredPackagePrice { */ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; - grouped_tiered_package_config: Record; + grouped_tiered_package_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -1748,7 +1748,7 @@ export interface NewSubscriptionGroupedTieredPackagePrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -1763,7 +1763,7 @@ export interface NewSubscriptionGroupedTieredPrice { */ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; - grouped_tiered_config: Record; + grouped_tiered_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -1843,7 +1843,7 @@ export interface NewSubscriptionGroupedTieredPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -1858,7 +1858,7 @@ export interface NewSubscriptionGroupedWithMeteredMinimumPrice { */ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; - grouped_with_metered_minimum_config: Record; + grouped_with_metered_minimum_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -1938,7 +1938,7 @@ export interface NewSubscriptionGroupedWithMeteredMinimumPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -1953,7 +1953,7 @@ export interface NewSubscriptionGroupedWithProratedMinimumPrice { */ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; - grouped_with_prorated_minimum_config: Record; + grouped_with_prorated_minimum_config: { [key: string]: unknown }; /** * The id of the item the price will be associated with. @@ -2033,7 +2033,7 @@ export interface NewSubscriptionGroupedWithProratedMinimumPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -2128,7 +2128,7 @@ export interface NewSubscriptionMatrixPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -2223,7 +2223,7 @@ export interface NewSubscriptionMatrixWithAllocationPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -2243,7 +2243,7 @@ export interface NewSubscriptionMatrixWithDisplayNamePrice { */ item_id: string; - matrix_with_display_name_config: Record; + matrix_with_display_name_config: { [key: string]: unknown }; model_type: 'matrix_with_display_name'; @@ -2318,7 +2318,7 @@ export interface NewSubscriptionMatrixWithDisplayNamePrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -2338,7 +2338,7 @@ export interface NewSubscriptionMaxGroupTieredPackagePrice { */ item_id: string; - max_group_tiered_package_config: Record; + max_group_tiered_package_config: { [key: string]: unknown }; model_type: 'max_group_tiered_package'; @@ -2413,7 +2413,7 @@ export interface NewSubscriptionMaxGroupTieredPackagePrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -2508,7 +2508,7 @@ export interface NewSubscriptionPackagePrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -2535,7 +2535,7 @@ export interface NewSubscriptionPackageWithAllocationPrice { */ name: string; - package_with_allocation_config: Record; + package_with_allocation_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -2603,7 +2603,7 @@ export interface NewSubscriptionPackageWithAllocationPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -2630,7 +2630,7 @@ export interface NewSubscriptionScalableMatrixWithTieredPricingPrice { */ name: string; - scalable_matrix_with_tiered_pricing_config: Record; + scalable_matrix_with_tiered_pricing_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -2698,7 +2698,7 @@ export interface NewSubscriptionScalableMatrixWithTieredPricingPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -2725,7 +2725,7 @@ export interface NewSubscriptionScalableMatrixWithUnitPricingPrice { */ name: string; - scalable_matrix_with_unit_pricing_config: Record; + scalable_matrix_with_unit_pricing_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -2793,7 +2793,7 @@ export interface NewSubscriptionScalableMatrixWithUnitPricingPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -2820,7 +2820,7 @@ export interface NewSubscriptionThresholdTotalAmountPrice { */ name: string; - threshold_total_amount_config: Record; + threshold_total_amount_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -2888,7 +2888,7 @@ export interface NewSubscriptionThresholdTotalAmountPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -2915,7 +2915,7 @@ export interface NewSubscriptionTierWithProrationPrice { */ name: string; - tiered_with_proration_config: Record; + tiered_with_proration_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -2983,7 +2983,7 @@ export interface NewSubscriptionTierWithProrationPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -3078,7 +3078,7 @@ export interface NewSubscriptionTieredBPSPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -3105,7 +3105,7 @@ export interface NewSubscriptionTieredPackagePrice { */ name: string; - tiered_package_config: Record; + tiered_package_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -3173,7 +3173,7 @@ export interface NewSubscriptionTieredPackagePrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -3200,7 +3200,7 @@ export interface NewSubscriptionTieredPackageWithMinimumPrice { */ name: string; - tiered_package_with_minimum_config: Record; + tiered_package_with_minimum_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -3268,7 +3268,7 @@ export interface NewSubscriptionTieredPackageWithMinimumPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -3363,7 +3363,7 @@ export interface NewSubscriptionTieredPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -3390,7 +3390,7 @@ export interface NewSubscriptionTieredWithMinimumPrice { */ name: string; - tiered_with_minimum_config: Record; + tiered_with_minimum_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -3458,7 +3458,7 @@ export interface NewSubscriptionTieredWithMinimumPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -3553,7 +3553,7 @@ export interface NewSubscriptionUnitPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -3580,7 +3580,7 @@ export interface NewSubscriptionUnitWithPercentPrice { */ name: string; - unit_with_percent_config: Record; + unit_with_percent_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -3648,7 +3648,7 @@ export interface NewSubscriptionUnitWithPercentPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -3675,7 +3675,7 @@ export interface NewSubscriptionUnitWithProrationPrice { */ name: string; - unit_with_proration_config: Record; + unit_with_proration_config: { [key: string]: unknown }; /** * The id of the billable metric for the price. Only needed if the price is @@ -3743,7 +3743,7 @@ export interface NewSubscriptionUnitWithProrationPrice { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * A transient ID that can be used to reference this price when adding adjustments @@ -3878,7 +3878,7 @@ export interface Subscription { * `null`, and the entire metadata mapping can be cleared by setting `metadata` to * `null`. */ - metadata: Record; + metadata: { [key: string]: string }; /** * @deprecated The minimum intervals for this subscription sorted by the @@ -4140,7 +4140,7 @@ export interface SubscriptionCreateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * The name to use for the subscription. If not specified, the plan name will be @@ -4483,7 +4483,7 @@ export interface SubscriptionUpdateParams { * by setting the value to `null`, and the entire metadata mapping can be cleared * by setting `metadata` to `null`. */ - metadata?: Record | null; + metadata?: { [key: string]: string | null } | null; /** * Determines the difference between the invoice issue date for subscription From fc96b5bb78c87225c26e9d02fd42b473daf6cb8c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 00:54:43 +0000 Subject: [PATCH 10/23] feat(api): api update --- .stats.yml | 4 +- src/resources/shared.ts | 228 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 230 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0834bdd5..090c0e18 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 116 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-9d6e0a988df83c0e2baa559ef57ec96981669a7a294de2188adb2cd6bbc0be8a.yml -openapi_spec_hash: 7f5e7221872d7ee799141f546c394f48 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-ff68c7ee2669d61716781d01b93f34186fb7a19ff4ad6fc2c0b8f9f4d9c4a588.yml +openapi_spec_hash: 17bdc6b1ca2531dc884c6d156f404f0c config_hash: 3c3524be9607afb24d2139ce26ce5389 diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 69ea7616..1c91a302 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -1569,6 +1569,12 @@ export interface MonetaryAmountDiscountAdjustment { * The reason for the adjustment. */ reason: string | null; + + /** + * The adjustment id this adjustment replaces. This adjustment will take the place + * of the replaced adjustment in plan version migrations. + */ + replaces_adjustment_id: string | null; } export interface MonetaryMaximumAdjustment { @@ -1607,6 +1613,12 @@ export interface MonetaryMaximumAdjustment { * The reason for the adjustment. */ reason: string | null; + + /** + * The adjustment id this adjustment replaces. This adjustment will take the place + * of the replaced adjustment in plan version migrations. + */ + replaces_adjustment_id: string | null; } export interface MonetaryMinimumAdjustment { @@ -1650,6 +1662,12 @@ export interface MonetaryMinimumAdjustment { * The reason for the adjustment. */ reason: string | null; + + /** + * The adjustment id this adjustment replaces. This adjustment will take the place + * of the replaced adjustment in plan version migrations. + */ + replaces_adjustment_id: string | null; } export interface MonetaryPercentageDiscountAdjustment { @@ -1688,6 +1706,12 @@ export interface MonetaryPercentageDiscountAdjustment { * The reason for the adjustment. */ reason: string | null; + + /** + * The adjustment id this adjustment replaces. This adjustment will take the place + * of the replaced adjustment in plan version migrations. + */ + replaces_adjustment_id: string | null; } export interface MonetaryUsageDiscountAdjustment { @@ -1721,6 +1745,12 @@ export interface MonetaryUsageDiscountAdjustment { */ reason: string | null; + /** + * The adjustment id this adjustment replaces. This adjustment will take the place + * of the replaced adjustment in plan version migrations. + */ + replaces_adjustment_id: string | null; + /** * The number of usage units by which to discount the price this adjustment applies * to in a given billing period. @@ -7276,6 +7306,12 @@ export interface PlanPhaseAmountDiscountAdjustment { * The reason for the adjustment. */ reason: string | null; + + /** + * The adjustment id this adjustment replaces. This adjustment will take the place + * of the replaced adjustment in plan version migrations. + */ + replaces_adjustment_id: string | null; } export interface PlanPhaseMaximumAdjustment { @@ -7314,6 +7350,12 @@ export interface PlanPhaseMaximumAdjustment { * The reason for the adjustment. */ reason: string | null; + + /** + * The adjustment id this adjustment replaces. This adjustment will take the place + * of the replaced adjustment in plan version migrations. + */ + replaces_adjustment_id: string | null; } export interface PlanPhaseMinimumAdjustment { @@ -7357,6 +7399,12 @@ export interface PlanPhaseMinimumAdjustment { * The reason for the adjustment. */ reason: string | null; + + /** + * The adjustment id this adjustment replaces. This adjustment will take the place + * of the replaced adjustment in plan version migrations. + */ + replaces_adjustment_id: string | null; } export interface PlanPhasePercentageDiscountAdjustment { @@ -7395,6 +7443,12 @@ export interface PlanPhasePercentageDiscountAdjustment { * The reason for the adjustment. */ reason: string | null; + + /** + * The adjustment id this adjustment replaces. This adjustment will take the place + * of the replaced adjustment in plan version migrations. + */ + replaces_adjustment_id: string | null; } export interface PlanPhaseUsageDiscountAdjustment { @@ -7428,6 +7482,12 @@ export interface PlanPhaseUsageDiscountAdjustment { */ reason: string | null; + /** + * The adjustment id this adjustment replaces. This adjustment will take the place + * of the replaced adjustment in plan version migrations. + */ + replaces_adjustment_id: string | null; + /** * The number of usage units by which to discount the price this adjustment applies * to in a given billing period. @@ -7546,6 +7606,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + unit_config: Shared.UnitConfig; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; @@ -7621,6 +7687,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -7694,6 +7766,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -7765,6 +7843,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + tiered_config: Shared.TieredConfig; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; @@ -7838,6 +7922,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + tiered_bps_config: Shared.TieredBPSConfig; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; @@ -7913,6 +8003,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -7986,6 +8082,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -8059,6 +8161,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -8130,6 +8238,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + threshold_total_amount_config: { [key: string]: unknown }; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; @@ -8203,6 +8317,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + tiered_package_config: { [key: string]: unknown }; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; @@ -8278,6 +8398,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -8349,6 +8475,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + tiered_with_minimum_config: { [key: string]: unknown }; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; @@ -8422,6 +8554,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + tiered_package_with_minimum_config: { [key: string]: unknown }; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; @@ -8497,6 +8635,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -8568,6 +8712,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + unit_with_percent_config: { [key: string]: unknown }; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; @@ -8643,6 +8793,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -8714,6 +8870,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + tiered_with_proration_config: { [key: string]: unknown }; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; @@ -8787,6 +8949,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + unit_with_proration_config: { [key: string]: unknown }; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; @@ -8862,6 +9030,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -8935,6 +9109,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -9008,6 +9188,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -9081,6 +9267,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -9154,6 +9346,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -9227,6 +9425,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -9300,6 +9504,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } @@ -9371,6 +9581,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + scalable_matrix_with_unit_pricing_config: { [key: string]: unknown }; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; @@ -9444,6 +9660,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + scalable_matrix_with_tiered_pricing_config: { [key: string]: unknown }; dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; @@ -9519,6 +9741,12 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; + /** + * The price id this price replaces. This price will take the place of the replaced + * price in plan version migrations. + */ + replaces_price_id: string | null; + dimensional_price_configuration?: Shared.DimensionalPriceConfiguration | null; } } From d9bddc13b51bb6854ef04e86da16300dd9a86606 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 14:07:07 +0000 Subject: [PATCH 11/23] =?UTF-8?q?fix(ci):=20release-doctor=20=E2=80=94=20r?= =?UTF-8?q?eport=20correct=20token=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/check-release-environment | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/check-release-environment b/bin/check-release-environment index 0077335b..e4b6d58e 100644 --- a/bin/check-release-environment +++ b/bin/check-release-environment @@ -3,7 +3,7 @@ errors=() if [ -z "${NPM_TOKEN}" ]; then - errors+=("The ORB_NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets") + errors+=("The NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets") fi lenErrors=${#errors[@]} From 5b3d838882117c0c23284a0c9f9c2bb2c4add313 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 22:41:23 +0000 Subject: [PATCH 12/23] chore(ci): only run for pushes and fork pull requests --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 949f02ad..9a5af48e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,7 @@ jobs: timeout-minutes: 10 name: lint runs-on: ${{ github.repository == 'stainless-sdks/orb-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@v4 @@ -35,6 +36,7 @@ jobs: timeout-minutes: 5 name: build runs-on: ${{ github.repository == 'stainless-sdks/orb-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + if: github.event_name == 'push' || github.event.pull_request.head.repo.fork permissions: contents: read id-token: write @@ -70,6 +72,7 @@ jobs: timeout-minutes: 10 name: test runs-on: ${{ github.repository == 'stainless-sdks/orb-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@v4 From 132b90306594db72d0c447402ce231e287e7908e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 18:14:29 +0000 Subject: [PATCH 13/23] chore: mention unit type in timeout docs --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index 35ffaa31..36cbde95 100644 --- a/src/index.ts +++ b/src/index.ts @@ -208,6 +208,8 @@ export interface ClientOptions { * * Note that request timeouts are retried by default, so in a worst-case scenario you may wait * much longer than this timeout before the promise succeeds or fails. + * + * @unit milliseconds */ timeout?: number | undefined; From 33ba457255b066c8ee465be2e0fb63c3956de9cc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 22:05:01 +0000 Subject: [PATCH 14/23] fix(client): don't send `Content-Type` for bodyless methods --- src/core.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.ts b/src/core.ts index d11693ed..e33a2c27 100644 --- a/src/core.ts +++ b/src/core.ts @@ -217,7 +217,7 @@ export abstract class APIClient { protected defaultHeaders(opts: FinalRequestOptions): Headers { return { Accept: 'application/json', - 'Content-Type': 'application/json', + ...(['head', 'get'].includes(opts.method) ? {} : { 'Content-Type': 'application/json' }), 'User-Agent': this.getUserAgent(), ...getPlatformHeaders(), ...this.authHeaders(opts), From ecfef87e64aaaf582ee484eb6a55d3c016c33d49 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 4 Jul 2025 01:54:30 +0000 Subject: [PATCH 15/23] feat(api): api update --- .stats.yml | 4 ++-- src/resources/shared.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 090c0e18..4db8fd70 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 116 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-ff68c7ee2669d61716781d01b93f34186fb7a19ff4ad6fc2c0b8f9f4d9c4a588.yml -openapi_spec_hash: 17bdc6b1ca2531dc884c6d156f404f0c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d4db2933d3d6b8c855e3351dcce658777ec9a413eb78f176b2e63b1e99fddf68.yml +openapi_spec_hash: 858adc7f2e0c8c631ef733dfd8f9ea0a config_hash: 3c3524be9607afb24d2139ce26ce5389 diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 1c91a302..527dfde0 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -1767,7 +1767,7 @@ export interface NewAllocationPrice { /** * The cadence at which to allocate the amount to the customer. */ - cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom'; + cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual'; /** * An ISO 4217 currency string or a custom pricing unit identifier in which to bill From b4f8f973a593a4d09e46035dca03475ac39b834c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 05:25:49 +0000 Subject: [PATCH 16/23] feat(api): api update --- .stats.yml | 4 ++-- src/resources/customers/credits/ledger.ts | 14 ++++++++++++++ .../api-resources/customers/credits/ledger.test.ts | 2 ++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4db8fd70..31ac085d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 116 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d4db2933d3d6b8c855e3351dcce658777ec9a413eb78f176b2e63b1e99fddf68.yml -openapi_spec_hash: 858adc7f2e0c8c631ef733dfd8f9ea0a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-0db984d367f9ae04249fb6c72789b0a38ef1785d156b438fe03290fa4e262a7d.yml +openapi_spec_hash: c901c8b4fc2b0399a33b1346f8521850 config_hash: 3c3524be9607afb24d2139ce26ce5389 diff --git a/src/resources/customers/credits/ledger.ts b/src/resources/customers/credits/ledger.ts index 1d6c58ff..d8626b4e 100644 --- a/src/resources/customers/credits/ledger.ts +++ b/src/resources/customers/credits/ledger.ts @@ -902,6 +902,13 @@ export declare namespace LedgerCreateEntryParams { */ net_terms: number; + /** + * An ISO 8601 format date that denotes when this invoice should be dated in the + * customer's timezone. If not provided, the invoice date will default to the + * credit block's effective date. + */ + invoice_date?: (string & {}) | (string & {}) | null; + /** * An optional memo to display on the invoice. */ @@ -1153,6 +1160,13 @@ export declare namespace LedgerCreateEntryByExternalIDParams { */ net_terms: number; + /** + * An ISO 8601 format date that denotes when this invoice should be dated in the + * customer's timezone. If not provided, the invoice date will default to the + * credit block's effective date. + */ + invoice_date?: (string & {}) | (string & {}) | null; + /** * An optional memo to display on the invoice. */ diff --git a/tests/api-resources/customers/credits/ledger.test.ts b/tests/api-resources/customers/credits/ledger.test.ts index ac1b9e84..035945e5 100644 --- a/tests/api-resources/customers/credits/ledger.test.ts +++ b/tests/api-resources/customers/credits/ledger.test.ts @@ -74,6 +74,7 @@ describe('resource ledger', () => { invoice_settings: { auto_collection: true, net_terms: 0, + invoice_date: '2019-12-27', memo: 'memo', require_successful_payment: true, }, @@ -107,6 +108,7 @@ describe('resource ledger', () => { invoice_settings: { auto_collection: true, net_terms: 0, + invoice_date: '2019-12-27', memo: 'memo', require_successful_payment: true, }, From c7e0dab4ae701fa809d524fd9171d17359832fba Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 9 Jul 2025 21:20:35 +0000 Subject: [PATCH 17/23] chore: make some internal functions async --- src/core.ts | 8 +++++--- tests/index.test.ts | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/core.ts b/src/core.ts index e33a2c27..7a4f4852 100644 --- a/src/core.ts +++ b/src/core.ts @@ -299,10 +299,10 @@ export abstract class APIClient { return null; } - buildRequest( + async buildRequest( inputOptions: FinalRequestOptions, { retryCount = 0 }: { retryCount?: number } = {}, - ): { req: RequestInit; url: string; timeout: number } { + ): Promise<{ req: RequestInit; url: string; timeout: number }> { const options = { ...inputOptions }; const { method, path, query, defaultBaseURL, headers: headers = {} } = options; @@ -450,7 +450,9 @@ export abstract class APIClient { await this.prepareOptions(options); - const { req, url, timeout } = this.buildRequest(options, { retryCount: maxRetries - retriesRemaining }); + const { req, url, timeout } = await this.buildRequest(options, { + retryCount: maxRetries - retriesRemaining, + }); await this.prepareRequest(req, { url, options }); diff --git a/tests/index.test.ts b/tests/index.test.ts index 83baf4b8..50751dc5 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -26,13 +26,13 @@ describe('instantiate client', () => { apiKey: 'My API Key', }); - test('they are used in the request', () => { - const { req } = client.buildRequest({ path: '/foo', method: 'post' }); + test('they are used in the request', async () => { + const { req } = await client.buildRequest({ path: '/foo', method: 'post' }); expect((req.headers as Headers)['x-my-default-header']).toEqual('2'); }); - test('can ignore `undefined` and leave the default', () => { - const { req } = client.buildRequest({ + test('can ignore `undefined` and leave the default', async () => { + const { req } = await client.buildRequest({ path: '/foo', method: 'post', headers: { 'X-My-Default-Header': undefined }, @@ -40,8 +40,8 @@ describe('instantiate client', () => { expect((req.headers as Headers)['x-my-default-header']).toEqual('2'); }); - test('can be removed with `null`', () => { - const { req } = client.buildRequest({ + test('can be removed with `null`', async () => { + const { req } = await client.buildRequest({ path: '/foo', method: 'post', headers: { 'X-My-Default-Header': null }, @@ -239,20 +239,20 @@ describe('request building', () => { const client = new Orb({ apiKey: 'My API Key' }); describe('Content-Length', () => { - test('handles multi-byte characters', () => { - const { req } = client.buildRequest({ path: '/foo', method: 'post', body: { value: '—' } }); + test('handles multi-byte characters', async () => { + const { req } = await client.buildRequest({ path: '/foo', method: 'post', body: { value: '—' } }); expect((req.headers as Record)['content-length']).toEqual('20'); }); - test('handles standard characters', () => { - const { req } = client.buildRequest({ path: '/foo', method: 'post', body: { value: 'hello' } }); + test('handles standard characters', async () => { + const { req } = await client.buildRequest({ path: '/foo', method: 'post', body: { value: 'hello' } }); expect((req.headers as Record)['content-length']).toEqual('22'); }); }); describe('custom headers', () => { - test('handles undefined', () => { - const { req } = client.buildRequest({ + test('handles undefined', async () => { + const { req } = await client.buildRequest({ path: '/foo', method: 'post', body: { value: 'hello' }, From 54fb67f3f221e4d10f388540e2181bc3f2048780 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 04:52:28 +0000 Subject: [PATCH 18/23] feat(api): api update --- .stats.yml | 4 +- src/resources/credit-notes.ts | 58 +++++++++++++++++++++++ src/resources/customers/costs.ts | 32 ++++++------- src/resources/customers/credits/ledger.ts | 8 ++-- src/resources/events/backfills.ts | 4 +- src/resources/invoices.ts | 2 +- src/resources/prices/prices.ts | 20 ++++++++ src/resources/shared.ts | 10 ++++ src/resources/subscription-changes.ts | 6 +-- src/resources/subscriptions.ts | 16 +++---- tests/api-resources/credit-notes.test.ts | 11 ++++- tests/api-resources/prices/prices.test.ts | 2 + 12 files changed, 136 insertions(+), 37 deletions(-) diff --git a/.stats.yml b/.stats.yml index 31ac085d..d44c6fa9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 116 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-0db984d367f9ae04249fb6c72789b0a38ef1785d156b438fe03290fa4e262a7d.yml -openapi_spec_hash: c901c8b4fc2b0399a33b1346f8521850 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-612316c13276a207f56e2e2c7bbc68f4bb73de85e3661595a23f23d9ccc80276.yml +openapi_spec_hash: 6e125f05e40521ec485edf6e15beec2e config_hash: 3c3524be9607afb24d2139ce26ce5389 diff --git a/src/resources/credit-notes.ts b/src/resources/credit-notes.ts index bbbb2a17..1b2467ea 100644 --- a/src/resources/credit-notes.ts +++ b/src/resources/credit-notes.ts @@ -11,6 +11,31 @@ export class CreditNotes extends APIResource { /** * This endpoint is used to create a single * [`Credit Note`](/invoicing/credit-notes). + * + * The credit note service period configuration supports two explicit modes: + * + * 1. Global service periods: Specify start_date and end_date at the credit note + * level. These dates will be applied to all line items uniformly. + * + * 2. Individual service periods: Specify start_date and end_date for each line + * item. When using this mode, ALL line items must have individual periods + * specified. + * + * 3. Default behavior: If no service periods are specified (neither global nor + * individual), the original invoice line item service periods will be used. + * + * Note: Mixing global and individual service periods in the same request is not + * allowed to prevent confusion. + * + * Service period dates are normalized to the start of the day in the customer's + * timezone to ensure consistent handling across different timezones. + * + * Date Format: Use start_date and end_date with format "YYYY-MM-DD" (e.g., + * "2023-09-22") to match other Orb APIs like /v1/invoice_line_items. + * + * Note: Both start_date and end_date are inclusive - the service period will cover + * both the start date and end date completely (from start of start_date to end of + * end_date). */ create(body: CreditNoteCreateParams, options?: Core.RequestOptions): Core.APIPromise { return this._client.post('/credit_notes', { body, ...options }); @@ -53,10 +78,26 @@ export interface CreditNoteCreateParams { */ reason: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory'; + /** + * A date string to specify the global credit note service period end date in the + * customer's timezone. This will be applied to all line items that don't have + * their own individual service periods specified. If not provided, line items will + * use their original invoice line item service periods. This date is inclusive. + */ + end_date?: string | null; + /** * An optional memo to attach to the credit note. */ memo?: string | null; + + /** + * A date string to specify the global credit note service period start date in the + * customer's timezone. This will be applied to all line items that don't have + * their own individual service periods specified. If not provided, line items will + * use their original invoice line item service periods. This date is inclusive. + */ + start_date?: string | null; } export namespace CreditNoteCreateParams { @@ -70,6 +111,23 @@ export namespace CreditNoteCreateParams { * The ID of the line item to credit. */ invoice_line_item_id: string; + + /** + * A date string to specify this line item's credit note service period end date in + * the customer's timezone. If provided, this will be used for this specific line + * item. If not provided, will use the global end_date if available, otherwise + * defaults to the original invoice line item's end date. This date is inclusive. + */ + end_date?: string | null; + + /** + * A date string to specify this line item's credit note service period start date + * in the customer's timezone. If provided, this will be used for this specific + * line item. If not provided, will use the global start_date if available, + * otherwise defaults to the original invoice line item's start date. This date is + * inclusive. + */ + start_date?: string | null; } } diff --git a/src/resources/customers/costs.ts b/src/resources/customers/costs.ts index 0ab9e1a0..b7a76c00 100644 --- a/src/resources/customers/costs.ts +++ b/src/resources/customers/costs.ts @@ -60,17 +60,17 @@ export class Costs extends APIResource { * * A customer that uses a few API calls a day but has a minimum commitment might * exhibit the following pattern for their subtotal and total in the first few days - * of the month. Here, we assume that each API call is $2.50, the customer's plan - * has a monthly minimum of $50 for this price, and that the subscription's billing - * period bounds are aligned to the first of the month: + * of the month. Here, we assume that each API call is \$2.50, the customer's plan + * has a monthly minimum of \$50 for this price, and that the subscription's + * billing period bounds are aligned to the first of the month: * * | timeframe_start | timeframe_end | Cumulative usage | Subtotal | Total (incl. commitment) | * | --------------- | ------------- | ---------------- | -------- | ------------------------ | - * | 2023-02-01 | 2023-02-02 | 9 | $22.50 | $50.00 | - * | 2023-02-01 | 2023-02-03 | 19 | $47.50 | $50.00 | - * | 2023-02-01 | 2023-02-04 | 20 | $50.00 | $50.00 | - * | 2023-02-01 | 2023-02-05 | 28 | $70.00 | $70.00 | - * | 2023-02-01 | 2023-02-06 | 36 | $90.00 | $90.00 | + * | 2023-02-01 | 2023-02-02 | 9 | \$22.50 | \$50.00 | + * | 2023-02-01 | 2023-02-03 | 19 | \$47.50 | \$50.00 | + * | 2023-02-01 | 2023-02-04 | 20 | \$50.00 | \$50.00 | + * | 2023-02-01 | 2023-02-05 | 28 | \$70.00 | \$70.00 | + * | 2023-02-01 | 2023-02-06 | 36 | \$90.00 | \$90.00 | * * ### Periodic values * @@ -196,17 +196,17 @@ export class Costs extends APIResource { * * A customer that uses a few API calls a day but has a minimum commitment might * exhibit the following pattern for their subtotal and total in the first few days - * of the month. Here, we assume that each API call is $2.50, the customer's plan - * has a monthly minimum of $50 for this price, and that the subscription's billing - * period bounds are aligned to the first of the month: + * of the month. Here, we assume that each API call is \$2.50, the customer's plan + * has a monthly minimum of \$50 for this price, and that the subscription's + * billing period bounds are aligned to the first of the month: * * | timeframe_start | timeframe_end | Cumulative usage | Subtotal | Total (incl. commitment) | * | --------------- | ------------- | ---------------- | -------- | ------------------------ | - * | 2023-02-01 | 2023-02-02 | 9 | $22.50 | $50.00 | - * | 2023-02-01 | 2023-02-03 | 19 | $47.50 | $50.00 | - * | 2023-02-01 | 2023-02-04 | 20 | $50.00 | $50.00 | - * | 2023-02-01 | 2023-02-05 | 28 | $70.00 | $70.00 | - * | 2023-02-01 | 2023-02-06 | 36 | $90.00 | $90.00 | + * | 2023-02-01 | 2023-02-02 | 9 | \$22.50 | \$50.00 | + * | 2023-02-01 | 2023-02-03 | 19 | \$47.50 | \$50.00 | + * | 2023-02-01 | 2023-02-04 | 20 | \$50.00 | \$50.00 | + * | 2023-02-01 | 2023-02-05 | 28 | \$70.00 | \$70.00 | + * | 2023-02-01 | 2023-02-06 | 36 | \$90.00 | \$90.00 | * * ### Periodic values * diff --git a/src/resources/customers/credits/ledger.ts b/src/resources/customers/credits/ledger.ts index d8626b4e..d2dbc33e 100644 --- a/src/resources/customers/credits/ledger.ts +++ b/src/resources/customers/credits/ledger.ts @@ -46,8 +46,8 @@ export class Ledger extends APIResource { * deductions take place from a non-expiring credit block. * * If there are multiple blocks with the same expiration date, Orb will deduct from - * the block with the _lower cost basis_ first (e.g. trial credits with a $0 cost - * basis before paid credits with a $5.00 cost basis). + * the block with the _lower cost basis_ first (e.g. trial credits with a \$0 cost + * basis before paid credits with a \$5.00 cost basis). * * It's also possible for a single usage event's deduction to _span_ credit blocks. * In this case, Orb will deduct from the next block, ending at the credit block @@ -395,8 +395,8 @@ export class Ledger extends APIResource { * deductions take place from a non-expiring credit block. * * If there are multiple blocks with the same expiration date, Orb will deduct from - * the block with the _lower cost basis_ first (e.g. trial credits with a $0 cost - * basis before paid credits with a $5.00 cost basis). + * the block with the _lower cost basis_ first (e.g. trial credits with a \$0 cost + * basis before paid credits with a \$5.00 cost basis). * * It's also possible for a single usage event's deduction to _span_ credit blocks. * In this case, Orb will deduct from the next block, ending at the credit block diff --git a/src/resources/events/backfills.ts b/src/resources/events/backfills.ts index 77449333..7a6f6ed3 100644 --- a/src/resources/events/backfills.ts +++ b/src/resources/events/backfills.ts @@ -384,14 +384,14 @@ export interface BackfillRevertResponse { export interface BackfillCreateParams { /** * The (exclusive) end of the usage timeframe affected by this backfill. By - * default, Orb allows backfills up to 10 days in duration at a time. Reach out to + * default, Orb allows backfills up to 31 days in duration at a time. Reach out to * discuss extending this limit and your use case. */ timeframe_end: string; /** * The (inclusive) start of the usage timeframe affected by this backfill. By - * default, Orb allows backfills up to 10 days in duration at a time. Reach out to + * default, Orb allows backfills up to 31 days in duration at a time. Reach out to * discuss extending this limit and your use case. */ timeframe_start: string; diff --git a/src/resources/invoices.ts b/src/resources/invoices.ts index e0eefaf4..d0887ed8 100644 --- a/src/resources/invoices.ts +++ b/src/resources/invoices.ts @@ -131,7 +131,7 @@ export class Invoices extends APIResource { * * If the associated invoice has used the customer balance to change the amount * due, the customer balance operation will be reverted. For example, if the - * invoice used $10 of customer balance, that amount will be added back to the + * invoice used \$10 of customer balance, that amount will be added back to the * customer balance upon voiding. * * If the invoice was used to purchase a credit block, but the invoice is not yet diff --git a/src/resources/prices/prices.ts b/src/resources/prices/prices.ts index fd99b497..76f5e564 100644 --- a/src/resources/prices/prices.ts +++ b/src/resources/prices/prices.ts @@ -203,6 +203,11 @@ export namespace PriceEvaluateMultipleResponse { */ price_groups: Array; + /** + * The external ID of the price + */ + external_price_id?: string | null; + /** * The index of the inline price */ @@ -231,6 +236,11 @@ export namespace PriceEvaluatePreviewEventsResponse { */ price_groups: Array; + /** + * The external ID of the price + */ + external_price_id?: string | null; + /** * The index of the inline price */ @@ -2815,6 +2825,11 @@ export interface PriceEvaluateMultipleParams { export namespace PriceEvaluateMultipleParams { export interface PriceEvaluation { + /** + * The external ID of a price to evaluate that exists in your Orb account. + */ + external_price_id?: string | null; + /** * A boolean * [computed property](/extensibility/advanced-metrics#computed-properties) used to @@ -2936,6 +2951,11 @@ export namespace PriceEvaluatePreviewEventsParams { } export interface PriceEvaluation { + /** + * The external ID of a price to evaluate that exists in your Orb account. + */ + external_price_id?: string | null; + /** * A boolean * [computed property](/extensibility/advanced-metrics#computed-properties) used to diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 527dfde0..75c28477 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -412,6 +412,16 @@ export namespace CreditNote { * Any line item discounts from the invoice's line item. */ discounts?: Array; + + /** + * The end time of the service period for this credit note line item. + */ + end_time_exclusive?: string | null; + + /** + * The start time of the service period for this credit note line item. + */ + start_time_inclusive?: string | null; } export namespace LineItem { diff --git a/src/resources/subscription-changes.ts b/src/resources/subscription-changes.ts index d548924a..668da6a0 100644 --- a/src/resources/subscription-changes.ts +++ b/src/resources/subscription-changes.ts @@ -142,7 +142,7 @@ export interface MutatedSubscription { /** * @deprecated The discount intervals for this subscription sorted by the - * start_date. + * start_date. This field is deprecated in favor of `adjustment_intervals`. */ discount_intervals: Array< Shared.AmountDiscountInterval | Shared.PercentageDiscountInterval | Shared.UsageDiscountInterval @@ -159,7 +159,7 @@ export interface MutatedSubscription { /** * @deprecated The maximum intervals for this subscription sorted by the - * start_date. + * start_date. This field is deprecated in favor of `adjustment_intervals`. */ maximum_intervals: Array; @@ -173,7 +173,7 @@ export interface MutatedSubscription { /** * @deprecated The minimum intervals for this subscription sorted by the - * start_date. + * start_date. This field is deprecated in favor of `adjustment_intervals`. */ minimum_intervals: Array; diff --git a/src/resources/subscriptions.ts b/src/resources/subscriptions.ts index 1662b103..3059daa4 100644 --- a/src/resources/subscriptions.ts +++ b/src/resources/subscriptions.ts @@ -267,7 +267,7 @@ export class Subscriptions extends APIResource { * is hit. To enable threshold billing, pass in an `invoicing_threshold`, which is * specified in the subscription's invoicing currency, when creating a * subscription. E.g. pass in `10.00` to issue an invoice when usage amounts hit - * $10.00 for a subscription that invoices in USD. + * \$10.00 for a subscription that invoices in USD. */ create( body: SubscriptionCreateParams, @@ -3851,7 +3851,7 @@ export interface Subscription { /** * @deprecated The discount intervals for this subscription sorted by the - * start_date. + * start_date. This field is deprecated in favor of `adjustment_intervals`. */ discount_intervals: Array< Shared.AmountDiscountInterval | Shared.PercentageDiscountInterval | Shared.UsageDiscountInterval @@ -3868,7 +3868,7 @@ export interface Subscription { /** * @deprecated The maximum intervals for this subscription sorted by the - * start_date. + * start_date. This field is deprecated in favor of `adjustment_intervals`. */ maximum_intervals: Array; @@ -3882,7 +3882,7 @@ export interface Subscription { /** * @deprecated The minimum intervals for this subscription sorted by the - * start_date. + * start_date. This field is deprecated in favor of `adjustment_intervals`. */ minimum_intervals: Array; @@ -4832,8 +4832,8 @@ export namespace SubscriptionPriceIntervalsParams { billing_cycle_day?: number | null; /** - * The updated end date of this price interval. If not specified, the start date - * will not be updated. + * The updated end date of this price interval. If not specified, the end date will + * not be updated. */ end_date?: (string & {}) | Shared.BillingCycleRelativeDate | null; @@ -4890,8 +4890,8 @@ export namespace SubscriptionPriceIntervalsParams { adjustment_interval_id: string; /** - * The updated end date of this adjustment interval. If not specified, the start - * date will not be updated. + * The updated end date of this adjustment interval. If not specified, the end date + * will not be updated. */ end_date?: (string & {}) | Shared.BillingCycleRelativeDate | null; diff --git a/tests/api-resources/credit-notes.test.ts b/tests/api-resources/credit-notes.test.ts index 3bc948e5..7e54ca07 100644 --- a/tests/api-resources/credit-notes.test.ts +++ b/tests/api-resources/credit-notes.test.ts @@ -25,9 +25,18 @@ describe('resource creditNotes', () => { test('create: required and optional params', async () => { const response = await client.creditNotes.create({ - line_items: [{ amount: 'amount', invoice_line_item_id: '4khy3nwzktxv7' }], + line_items: [ + { + amount: 'amount', + invoice_line_item_id: '4khy3nwzktxv7', + end_date: '2023-09-22', + start_date: '2023-09-22', + }, + ], reason: 'duplicate', + end_date: '2023-09-22', memo: 'An optional memo for my credit note.', + start_date: '2023-09-22', }); }); diff --git a/tests/api-resources/prices/prices.test.ts b/tests/api-resources/prices/prices.test.ts index 3e5d0c53..1b457bc9 100644 --- a/tests/api-resources/prices/prices.test.ts +++ b/tests/api-resources/prices/prices.test.ts @@ -134,6 +134,7 @@ describe('resource prices', () => { external_customer_id: 'external_customer_id', price_evaluations: [ { + external_price_id: 'external_price_id', filter: "my_numeric_property > 100 AND my_other_property = 'bar'", grouping_keys: ["case when my_event_type = 'foo' then true else false end"], price: { @@ -199,6 +200,7 @@ describe('resource prices', () => { external_customer_id: 'external_customer_id', price_evaluations: [ { + external_price_id: 'external_price_id', filter: "my_numeric_property > 100 AND my_other_property = 'bar'", grouping_keys: ["case when my_event_type = 'foo' then true else false end"], price: { From 19397931ab0cfc5a7582995af8027117878047ea Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 20:03:41 +0000 Subject: [PATCH 19/23] feat(api): api update --- .stats.yml | 4 +-- src/resources/credit-notes.ts | 35 ++++++++++++------------ tests/api-resources/credit-notes.test.ts | 8 +++--- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.stats.yml b/.stats.yml index d44c6fa9..3888ba9f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 116 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-612316c13276a207f56e2e2c7bbc68f4bb73de85e3661595a23f23d9ccc80276.yml -openapi_spec_hash: 6e125f05e40521ec485edf6e15beec2e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-e79a36262fa3c577305a43717398fb70482bb2dca47cdb3e201cbb2a590c359c.yml +openapi_spec_hash: 1e04880dccbcc082ba451083e421a471 config_hash: 3c3524be9607afb24d2139ce26ce5389 diff --git a/src/resources/credit-notes.ts b/src/resources/credit-notes.ts index 1b2467ea..9f316fca 100644 --- a/src/resources/credit-notes.ts +++ b/src/resources/credit-notes.ts @@ -79,10 +79,10 @@ export interface CreditNoteCreateParams { reason: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory'; /** - * A date string to specify the global credit note service period end date in the - * customer's timezone. This will be applied to all line items that don't have - * their own individual service periods specified. If not provided, line items will - * use their original invoice line item service periods. This date is inclusive. + * An optional date string to specify the global credit note service period end + * date in the customer's timezone. This will be applied to all line items. If not + * provided, line items will use their original invoice line item service periods. + * This date is inclusive. */ end_date?: string | null; @@ -92,10 +92,10 @@ export interface CreditNoteCreateParams { memo?: string | null; /** - * A date string to specify the global credit note service period start date in the - * customer's timezone. This will be applied to all line items that don't have - * their own individual service periods specified. If not provided, line items will - * use their original invoice line item service periods. This date is inclusive. + * An optional date string to specify the global credit note service period end + * date in the customer's timezone. This will be applied to all line items. If not + * provided, line items will use their original invoice line item service periods. + * This date is inclusive. */ start_date?: string | null; } @@ -113,19 +113,20 @@ export namespace CreditNoteCreateParams { invoice_line_item_id: string; /** - * A date string to specify this line item's credit note service period end date in - * the customer's timezone. If provided, this will be used for this specific line - * item. If not provided, will use the global end_date if available, otherwise - * defaults to the original invoice line item's end date. This date is inclusive. + * An optional date string to specify this line item's credit note service period + * end date in the customer's timezone. If provided, this will be used for this + * specific line item. If not provided, will use the global end_date if available, + * otherwise defaults to the original invoice line item's end date. This date is + * inclusive. */ end_date?: string | null; /** - * A date string to specify this line item's credit note service period start date - * in the customer's timezone. If provided, this will be used for this specific - * line item. If not provided, will use the global start_date if available, - * otherwise defaults to the original invoice line item's start date. This date is - * inclusive. + * An optional date string to specify this line item's credit note service period + * start date in the customer's timezone. If provided, this will be used for this + * specific line item. If not provided, will use the global start_date if + * available, otherwise defaults to the original invoice line item's start date. + * This date is inclusive. */ start_date?: string | null; } diff --git a/tests/api-resources/credit-notes.test.ts b/tests/api-resources/credit-notes.test.ts index 7e54ca07..95873f35 100644 --- a/tests/api-resources/credit-notes.test.ts +++ b/tests/api-resources/credit-notes.test.ts @@ -29,14 +29,14 @@ describe('resource creditNotes', () => { { amount: 'amount', invoice_line_item_id: '4khy3nwzktxv7', - end_date: '2023-09-22', - start_date: '2023-09-22', + end_date: '2023-01-31', + start_date: '2023-01-01', }, ], reason: 'duplicate', - end_date: '2023-09-22', + end_date: '2023-01-31', memo: 'An optional memo for my credit note.', - start_date: '2023-09-22', + start_date: '2023-01-01', }); }); From 5f861b076256a7172ff83a2adee978632324665b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 22:58:54 +0000 Subject: [PATCH 20/23] feat(api): api update --- .stats.yml | 4 +-- src/resources/credit-notes.ts | 35 ++++++++++++------------ tests/api-resources/credit-notes.test.ts | 8 +++--- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3888ba9f..d44c6fa9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 116 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-e79a36262fa3c577305a43717398fb70482bb2dca47cdb3e201cbb2a590c359c.yml -openapi_spec_hash: 1e04880dccbcc082ba451083e421a471 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-612316c13276a207f56e2e2c7bbc68f4bb73de85e3661595a23f23d9ccc80276.yml +openapi_spec_hash: 6e125f05e40521ec485edf6e15beec2e config_hash: 3c3524be9607afb24d2139ce26ce5389 diff --git a/src/resources/credit-notes.ts b/src/resources/credit-notes.ts index 9f316fca..1b2467ea 100644 --- a/src/resources/credit-notes.ts +++ b/src/resources/credit-notes.ts @@ -79,10 +79,10 @@ export interface CreditNoteCreateParams { reason: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory'; /** - * An optional date string to specify the global credit note service period end - * date in the customer's timezone. This will be applied to all line items. If not - * provided, line items will use their original invoice line item service periods. - * This date is inclusive. + * A date string to specify the global credit note service period end date in the + * customer's timezone. This will be applied to all line items that don't have + * their own individual service periods specified. If not provided, line items will + * use their original invoice line item service periods. This date is inclusive. */ end_date?: string | null; @@ -92,10 +92,10 @@ export interface CreditNoteCreateParams { memo?: string | null; /** - * An optional date string to specify the global credit note service period end - * date in the customer's timezone. This will be applied to all line items. If not - * provided, line items will use their original invoice line item service periods. - * This date is inclusive. + * A date string to specify the global credit note service period start date in the + * customer's timezone. This will be applied to all line items that don't have + * their own individual service periods specified. If not provided, line items will + * use their original invoice line item service periods. This date is inclusive. */ start_date?: string | null; } @@ -113,20 +113,19 @@ export namespace CreditNoteCreateParams { invoice_line_item_id: string; /** - * An optional date string to specify this line item's credit note service period - * end date in the customer's timezone. If provided, this will be used for this - * specific line item. If not provided, will use the global end_date if available, - * otherwise defaults to the original invoice line item's end date. This date is - * inclusive. + * A date string to specify this line item's credit note service period end date in + * the customer's timezone. If provided, this will be used for this specific line + * item. If not provided, will use the global end_date if available, otherwise + * defaults to the original invoice line item's end date. This date is inclusive. */ end_date?: string | null; /** - * An optional date string to specify this line item's credit note service period - * start date in the customer's timezone. If provided, this will be used for this - * specific line item. If not provided, will use the global start_date if - * available, otherwise defaults to the original invoice line item's start date. - * This date is inclusive. + * A date string to specify this line item's credit note service period start date + * in the customer's timezone. If provided, this will be used for this specific + * line item. If not provided, will use the global start_date if available, + * otherwise defaults to the original invoice line item's start date. This date is + * inclusive. */ start_date?: string | null; } diff --git a/tests/api-resources/credit-notes.test.ts b/tests/api-resources/credit-notes.test.ts index 95873f35..7e54ca07 100644 --- a/tests/api-resources/credit-notes.test.ts +++ b/tests/api-resources/credit-notes.test.ts @@ -29,14 +29,14 @@ describe('resource creditNotes', () => { { amount: 'amount', invoice_line_item_id: '4khy3nwzktxv7', - end_date: '2023-01-31', - start_date: '2023-01-01', + end_date: '2023-09-22', + start_date: '2023-09-22', }, ], reason: 'duplicate', - end_date: '2023-01-31', + end_date: '2023-09-22', memo: 'An optional memo for my credit note.', - start_date: '2023-01-01', + start_date: '2023-09-22', }); }); From 36c02487b484d965451101320f7060a523b683d5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 22:17:46 +0000 Subject: [PATCH 21/23] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d44c6fa9..9450f45c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 116 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-612316c13276a207f56e2e2c7bbc68f4bb73de85e3661595a23f23d9ccc80276.yml openapi_spec_hash: 6e125f05e40521ec485edf6e15beec2e -config_hash: 3c3524be9607afb24d2139ce26ce5389 +config_hash: 8c9a47f104c777e2a1e8f3fad15c093b From d89af5103034c83a7b52b1a87f2bada06d118d66 Mon Sep 17 00:00:00 2001 From: Tomer Aberbach Date: Thu, 17 Jul 2025 18:23:50 -0400 Subject: [PATCH 22/23] chore(internal): bump test timeout --- scripts/test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test b/scripts/test index 2049e31b..15ab9e80 100755 --- a/scripts/test +++ b/scripts/test @@ -53,4 +53,4 @@ else fi echo "==> Running tests" -./node_modules/.bin/jest "$@" +./node_modules/.bin/jest --testTimeout=60000 "$@" From 06586f73ed177eb6318a7141571957309b87c5b8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 22:24:31 +0000 Subject: [PATCH 23/23] release: 5.1.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 39 +++++++++++++++++++++++++++++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 42 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 32dbe0e2..affd1ab3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "5.0.0" + ".": "5.1.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index a3021d0e..2cd1c7a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,44 @@ # Changelog +## 5.1.0 (2025-07-17) + +Full Changelog: [v5.0.0...v5.1.0](https://github.com/orbcorp/orb-node/compare/v5.0.0...v5.1.0) + +### Features + +* **api:** api update ([5f861b0](https://github.com/orbcorp/orb-node/commit/5f861b076256a7172ff83a2adee978632324665b)) +* **api:** api update ([1939793](https://github.com/orbcorp/orb-node/commit/19397931ab0cfc5a7582995af8027117878047ea)) +* **api:** api update ([54fb67f](https://github.com/orbcorp/orb-node/commit/54fb67f3f221e4d10f388540e2181bc3f2048780)) +* **api:** api update ([b4f8f97](https://github.com/orbcorp/orb-node/commit/b4f8f973a593a4d09e46035dca03475ac39b834c)) +* **api:** api update ([ecfef87](https://github.com/orbcorp/orb-node/commit/ecfef87e64aaaf582ee484eb6a55d3c016c33d49)) +* **api:** api update ([fc96b5b](https://github.com/orbcorp/orb-node/commit/fc96b5bb78c87225c26e9d02fd42b473daf6cb8c)) +* **api:** api update ([44d2c02](https://github.com/orbcorp/orb-node/commit/44d2c02d887d0e09c32d3a7738de8b31c8421b1c)) +* **api:** api update ([81496fc](https://github.com/orbcorp/orb-node/commit/81496fc6baf0b872a705372289effad7992fb025)) +* **api:** api update ([63e9ce1](https://github.com/orbcorp/orb-node/commit/63e9ce18c1f8ed120cf360fcc58931f8ed9e7e7a)) +* **client:** add support for endpoint-specific base URLs ([0e61c32](https://github.com/orbcorp/orb-node/commit/0e61c325001e2ce26b26b2a5f70658d8e91a4458)) + + +### Bug Fixes + +* **ci:** release-doctor — report correct token name ([d9bddc1](https://github.com/orbcorp/orb-node/commit/d9bddc13b51bb6854ef04e86da16300dd9a86606)) +* **client:** don't send `Content-Type` for bodyless methods ([33ba457](https://github.com/orbcorp/orb-node/commit/33ba457255b066c8ee465be2e0fb63c3956de9cc)) +* publish script — handle NPM errors correctly ([1678c34](https://github.com/orbcorp/orb-node/commit/1678c342b2abf1d2fc88e4e253b3c5ac7df4d9a0)) + + +### Chores + +* **ci:** enable for pull requests ([77a5b1e](https://github.com/orbcorp/orb-node/commit/77a5b1e22b94ce2c0a27bb2b4fb14359a4203ca4)) +* **ci:** only run for pushes and fork pull requests ([5b3d838](https://github.com/orbcorp/orb-node/commit/5b3d838882117c0c23284a0c9f9c2bb2c4add313)) +* **internal:** bump test timeout ([d89af51](https://github.com/orbcorp/orb-node/commit/d89af5103034c83a7b52b1a87f2bada06d118d66)) +* **internal:** make base APIResource abstract ([9a95185](https://github.com/orbcorp/orb-node/commit/9a95185ee2c315169985d08e5696ef4dd38a3e2b)) +* make some internal functions async ([c7e0dab](https://github.com/orbcorp/orb-node/commit/c7e0dab4ae701fa809d524fd9171d17359832fba)) +* mention unit type in timeout docs ([132b903](https://github.com/orbcorp/orb-node/commit/132b90306594db72d0c447402ce231e287e7908e)) + + +### Refactors + +* **types:** replace Record with mapped types ([509fcfb](https://github.com/orbcorp/orb-node/commit/509fcfb895402525e2d6ce1d6e8ca994ead496a8)) + ## 5.0.0 (2025-06-09) Full Changelog: [v4.74.0...v5.0.0](https://github.com/orbcorp/orb-node/compare/v4.74.0...v5.0.0) diff --git a/package.json b/package.json index 8ba0ddf9..2ddf281a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orb-billing", - "version": "5.0.0", + "version": "5.1.0", "description": "The official TypeScript library for the Orb API", "author": "Orb ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index e156b0ea..0d43855f 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '5.0.0'; // x-release-please-version +export const VERSION = '5.1.0'; // x-release-please-version