Skip to content

Commit a9e8d7c

Browse files
feat(api): api update
1 parent 72265aa commit a9e8d7c

27 files changed

Lines changed: 70473 additions & 29891 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 139
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-71d1ace393e7a2ded73e3c2ef9778c3dfefa88b0d4975f14f6c6d4cfd044e087.yml
3-
openapi_spec_hash: a5c295712ca7eef32912a1ec1dfd4019
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-45297c0f1067cd444a30371110c69f876accf55f303a3dce9a4f74863b59f18f.yml
3+
openapi_spec_hash: cd2f638b98c6e89342397fef860166b7
44
config_hash: c01c1191b1cd696c7ca855ff6d28a8df

orb-java-core/src/main/kotlin/com/withorb/api/models/BetaCreatePlanVersionParams.kt

Lines changed: 13629 additions & 8087 deletions
Large diffs are not rendered by default.

orb-java-core/src/main/kotlin/com/withorb/api/models/BetaExternalPlanIdCreatePlanVersionParams.kt

Lines changed: 13629 additions & 8087 deletions
Large diffs are not rendered by default.

orb-java-core/src/main/kotlin/com/withorb/api/models/ChangedSubscriptionResources.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5430,6 +5430,13 @@ private constructor(
54305430
fun price(matrixWithAllocation: Price.MatrixWithAllocation) =
54315431
price(Price.ofMatrixWithAllocation(matrixWithAllocation))
54325432

5433+
/**
5434+
* Alias for calling [price] with
5435+
* `Price.ofMatrixWithThresholdDiscounts(matrixWithThresholdDiscounts)`.
5436+
*/
5437+
fun price(matrixWithThresholdDiscounts: Price.MatrixWithThresholdDiscounts) =
5438+
price(Price.ofMatrixWithThresholdDiscounts(matrixWithThresholdDiscounts))
5439+
54335440
/**
54345441
* Alias for calling [price] with
54355442
* `Price.ofTieredWithProration(tieredWithProration)`.

orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditLedgerCreateEntryByExternalIdParams.kt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,18 @@ import kotlin.jvm.optionals.getOrNull
8787
* determine the due date
8888
*
8989
* ## Deducting Credits
90-
* Orb allows you to deduct credits from a customer by creating an entry of type `decrement`. Orb
91-
* matches the algorithm for automatic deductions for determining which credit blocks to decrement
92-
* from. In the case that the deduction leads to multiple ledger entries, the response from this
93-
* endpoint will be the final deduction. Orb also optionally allows specifying a description to
94-
* assist with auditing.
90+
* Orb allows you to deduct credits from a customer by creating an entry of type `decrement`. A
91+
* `decrement` entry records credits as usage and immediately recognizes revenue at the block's
92+
* `per_unit_cost_basis`.
93+
*
94+
* For most credit removals, use `void` (no revenue impact) or `expiration_change` (revenue
95+
* recognized on expiration) instead. Only use `decrement` when credits were genuinely consumed
96+
* outside of normal event ingestion.
97+
*
98+
* Orb matches the algorithm for automatic deductions for determining which credit blocks to
99+
* decrement from. In the case that the deduction leads to multiple ledger entries, the response
100+
* from this endpoint will be the final deduction. Orb also optionally allows specifying a
101+
* description to assist with auditing.
95102
*
96103
* The following snippet illustrates a sample request body to decrement credits.
97104
*

orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditLedgerCreateEntryParams.kt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,18 @@ import kotlin.jvm.optionals.getOrNull
8787
* determine the due date
8888
*
8989
* ## Deducting Credits
90-
* Orb allows you to deduct credits from a customer by creating an entry of type `decrement`. Orb
91-
* matches the algorithm for automatic deductions for determining which credit blocks to decrement
92-
* from. In the case that the deduction leads to multiple ledger entries, the response from this
93-
* endpoint will be the final deduction. Orb also optionally allows specifying a description to
94-
* assist with auditing.
90+
* Orb allows you to deduct credits from a customer by creating an entry of type `decrement`. A
91+
* `decrement` entry records credits as usage and immediately recognizes revenue at the block's
92+
* `per_unit_cost_basis`.
93+
*
94+
* For most credit removals, use `void` (no revenue impact) or `expiration_change` (revenue
95+
* recognized on expiration) instead. Only use `decrement` when credits were genuinely consumed
96+
* outside of normal event ingestion.
97+
*
98+
* Orb matches the algorithm for automatic deductions for determining which credit blocks to
99+
* decrement from. In the case that the deduction leads to multiple ledger entries, the response
100+
* from this endpoint will be the final deduction. Orb also optionally allows specifying a
101+
* description to assist with auditing.
95102
*
96103
* The following snippet illustrates a sample request body to decrement credits.
97104
*

orb-java-core/src/main/kotlin/com/withorb/api/models/Invoice.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4896,6 +4896,13 @@ private constructor(
48964896
fun price(matrixWithAllocation: Price.MatrixWithAllocation) =
48974897
price(Price.ofMatrixWithAllocation(matrixWithAllocation))
48984898

4899+
/**
4900+
* Alias for calling [price] with
4901+
* `Price.ofMatrixWithThresholdDiscounts(matrixWithThresholdDiscounts)`.
4902+
*/
4903+
fun price(matrixWithThresholdDiscounts: Price.MatrixWithThresholdDiscounts) =
4904+
price(Price.ofMatrixWithThresholdDiscounts(matrixWithThresholdDiscounts))
4905+
48994906
/**
49004907
* Alias for calling [price] with `Price.ofTieredWithProration(tieredWithProration)`.
49014908
*/

orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceFetchUpcomingResponse.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4890,6 +4890,13 @@ private constructor(
48904890
fun price(matrixWithAllocation: Price.MatrixWithAllocation) =
48914891
price(Price.ofMatrixWithAllocation(matrixWithAllocation))
48924892

4893+
/**
4894+
* Alias for calling [price] with
4895+
* `Price.ofMatrixWithThresholdDiscounts(matrixWithThresholdDiscounts)`.
4896+
*/
4897+
fun price(matrixWithThresholdDiscounts: Price.MatrixWithThresholdDiscounts) =
4898+
price(Price.ofMatrixWithThresholdDiscounts(matrixWithThresholdDiscounts))
4899+
48934900
/**
48944901
* Alias for calling [price] with `Price.ofTieredWithProration(tieredWithProration)`.
48954902
*/

orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceLineItemCreateResponse.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,13 @@ private constructor(
746746
fun price(matrixWithAllocation: Price.MatrixWithAllocation) =
747747
price(Price.ofMatrixWithAllocation(matrixWithAllocation))
748748

749+
/**
750+
* Alias for calling [price] with
751+
* `Price.ofMatrixWithThresholdDiscounts(matrixWithThresholdDiscounts)`.
752+
*/
753+
fun price(matrixWithThresholdDiscounts: Price.MatrixWithThresholdDiscounts) =
754+
price(Price.ofMatrixWithThresholdDiscounts(matrixWithThresholdDiscounts))
755+
749756
/** Alias for calling [price] with `Price.ofTieredWithProration(tieredWithProration)`. */
750757
fun price(tieredWithProration: Price.TieredWithProration) =
751758
price(Price.ofTieredWithProration(tieredWithProration))

orb-java-core/src/main/kotlin/com/withorb/api/models/PerPriceCost.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,13 @@ private constructor(
225225
fun price(matrixWithAllocation: Price.MatrixWithAllocation) =
226226
price(Price.ofMatrixWithAllocation(matrixWithAllocation))
227227

228+
/**
229+
* Alias for calling [price] with
230+
* `Price.ofMatrixWithThresholdDiscounts(matrixWithThresholdDiscounts)`.
231+
*/
232+
fun price(matrixWithThresholdDiscounts: Price.MatrixWithThresholdDiscounts) =
233+
price(Price.ofMatrixWithThresholdDiscounts(matrixWithThresholdDiscounts))
234+
228235
/** Alias for calling [price] with `Price.ofTieredWithProration(tieredWithProration)`. */
229236
fun price(tieredWithProration: Price.TieredWithProration) =
230237
price(Price.ofTieredWithProration(tieredWithProration))

0 commit comments

Comments
 (0)