Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.53.0"
".": "4.54.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 103
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-8663e8fc543041d9694eddcd2f7e9784611369606700f99340e6dc80607b2dfa.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-0dbb8ba730f755468357ebda41332664e8396faf29a6a6a64ad37cf35cf70d0c.yml
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 4.54.0 (2025-02-04)

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

### Features

* **api:** api update ([#497](https://github.com/orbcorp/orb-node/issues/497)) ([9e9495b](https://github.com/orbcorp/orb-node/commit/9e9495bdf7a15da462953cfbf01a21388f258f60))


### Chores

* fix references to nested types ([#495](https://github.com/orbcorp/orb-node/issues/495)) ([c084727](https://github.com/orbcorp/orb-node/commit/c0847275be95bddf7408ab85d89474b632991c83))

## 4.53.0 (2025-01-30)

Full Changelog: [v4.52.0...v4.53.0](https://github.com/orbcorp/orb-node/compare/v4.52.0...v4.53.0)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "orb-billing",
"version": "4.53.0",
"version": "4.54.0",
"description": "The official TypeScript library for the Orb API",
"author": "Orb <team@withorb.com>",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/resources/customers/credits/ledger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2075,7 +2075,7 @@ export declare namespace LedgerCreateEntryParams {
* per_unit_cost_basis, as the calculation of the invoice total is done on that
* basis.
*/
invoice_settings?: LedgerCreateEntryParams.AddIncrementCreditLedgerEntryRequestParams.InvoiceSettings | null;
invoice_settings?: AddIncrementCreditLedgerEntryRequestParams.InvoiceSettings | null;

/**
* User-specified key/value pairs for the resource. Individual keys can be removed
Expand Down Expand Up @@ -2326,7 +2326,7 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
* per_unit_cost_basis, as the calculation of the invoice total is done on that
* basis.
*/
invoice_settings?: LedgerCreateEntryByExternalIDParams.AddIncrementCreditLedgerEntryRequestParams.InvoiceSettings | null;
invoice_settings?: AddIncrementCreditLedgerEntryRequestParams.InvoiceSettings | null;

/**
* User-specified key/value pairs for the resource. Individual keys can be removed
Expand Down
215 changes: 215 additions & 0 deletions src/resources/invoice-line-items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,33 @@ export interface InvoiceLineItemCreateResponse {
*/
id: string;

/**
* The line amount after any adjustments, before overage conversion, credits and
* partial invoicing.
*/
adjusted_subtotal: string;

/**
* All adjustments applied to the line item.
*/
adjustments: Array<
| InvoiceLineItemCreateResponse.AmountDiscountAdjustment
| InvoiceLineItemCreateResponse.PercentageDiscountAdjustment
| InvoiceLineItemCreateResponse.UsageDiscountAdjustment
| InvoiceLineItemCreateResponse.MinimumAdjustment
| InvoiceLineItemCreateResponse.MaximumAdjustment
>;

/**
* The final amount after any discounts or minimums.
*/
amount: string;

/**
* The number of credits used
*/
credits_applied: string;

discount: Shared.Discount | null;

/**
Expand All @@ -43,19 +65,36 @@ export interface InvoiceLineItemCreateResponse {
*/
grouping: string | null;

/**
* @deprecated This field is deprecated in favor of `adjustments`.
*/
maximum: InvoiceLineItemCreateResponse.Maximum | null;

/**
* @deprecated This field is deprecated in favor of `adjustments`.
*/
maximum_amount: string | null;

/**
* @deprecated This field is deprecated in favor of `adjustments`.
*/
minimum: InvoiceLineItemCreateResponse.Minimum | null;

/**
* @deprecated This field is deprecated in favor of `adjustments`.
*/
minimum_amount: string | null;

/**
* The name of the price associated with this line item.
*/
name: string;

/**
* Any amount applied from a partial invoice
*/
partially_invoiced_amount: string;

/**
* The Price resource represents a price that can be billed on a subscription,
* resulting in a charge on an invoice in the form of an invoice line item. Prices
Expand Down Expand Up @@ -100,6 +139,179 @@ export interface InvoiceLineItemCreateResponse {
}

export namespace InvoiceLineItemCreateResponse {
export interface AmountDiscountAdjustment {
id: string;

adjustment_type: 'amount_discount';

/**
* The amount by which to discount the prices this adjustment applies to in a given
* billing period.
*/
amount_discount: string;

/**
* The price IDs that this adjustment applies to.
*/
applies_to_price_ids: Array<string>;

/**
* True for adjustments that apply to an entire invocice, false for adjustments
* that apply to only one price.
*/
is_invoice_level: boolean;

/**
* The plan phase in which this adjustment is active.
*/
plan_phase_order: number | null;

/**
* The reason for the adjustment.
*/
reason: string | null;
}

export interface PercentageDiscountAdjustment {
id: string;

adjustment_type: 'percentage_discount';

/**
* The price IDs that this adjustment applies to.
*/
applies_to_price_ids: Array<string>;

/**
* True for adjustments that apply to an entire invocice, false for adjustments
* that apply to only one price.
*/
is_invoice_level: boolean;

/**
* The percentage (as a value between 0 and 1) by which to discount the price
* intervals this adjustment applies to in a given billing period.
*/
percentage_discount: number;

/**
* The plan phase in which this adjustment is active.
*/
plan_phase_order: number | null;

/**
* The reason for the adjustment.
*/
reason: string | null;
}

export interface UsageDiscountAdjustment {
id: string;

adjustment_type: 'usage_discount';

/**
* The price IDs that this adjustment applies to.
*/
applies_to_price_ids: Array<string>;

/**
* True for adjustments that apply to an entire invocice, false for adjustments
* that apply to only one price.
*/
is_invoice_level: boolean;

/**
* The plan phase in which this adjustment is active.
*/
plan_phase_order: number | null;

/**
* The reason for the adjustment.
*/
reason: string | null;

/**
* The number of usage units by which to discount the price this adjustment applies
* to in a given billing period.
*/
usage_discount: number;
}

export interface MinimumAdjustment {
id: string;

adjustment_type: 'minimum';

/**
* The price IDs that this adjustment applies to.
*/
applies_to_price_ids: Array<string>;

/**
* True for adjustments that apply to an entire invocice, false for adjustments
* that apply to only one price.
*/
is_invoice_level: boolean;

/**
* The item ID that revenue from this minimum will be attributed to.
*/
item_id: string;

/**
* The minimum amount to charge in a given billing period for the prices this
* adjustment applies to.
*/
minimum_amount: string;

/**
* The plan phase in which this adjustment is active.
*/
plan_phase_order: number | null;

/**
* The reason for the adjustment.
*/
reason: string | null;
}

export interface MaximumAdjustment {
id: string;

adjustment_type: 'maximum';

/**
* The price IDs that this adjustment applies to.
*/
applies_to_price_ids: Array<string>;

/**
* True for adjustments that apply to an entire invocice, false for adjustments
* that apply to only one price.
*/
is_invoice_level: boolean;

/**
* The maximum amount to charge in a given billing period for the prices this
* adjustment applies to.
*/
maximum_amount: string;

/**
* The plan phase in which this adjustment is active.
*/
plan_phase_order: number | null;

/**
* The reason for the adjustment.
*/
reason: string | null;
}

/**
* @deprecated This field is deprecated in favor of `adjustments`.
*/
export interface Maximum {
/**
* List of price_ids that this maximum amount applies to. For plan/plan phase
Expand All @@ -113,6 +325,9 @@ export namespace InvoiceLineItemCreateResponse {
maximum_amount: string;
}

/**
* @deprecated This field is deprecated in favor of `adjustments`.
*/
export interface Minimum {
/**
* List of price_ids that this minimum amount applies to. For plan/plan phase
Expand Down
Loading