Skip to content

Commit a8fe88d

Browse files
feat(api): api update
1 parent c76b284 commit a8fe88d

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

.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%2Forb-3c7ee3ec9931aaeeb5e015a598812cde9edc09f114adb8759ef4c2054c90f7dc.yml
3-
openapi_spec_hash: a14720041156fe4f353449142edacf0d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-563cf1475c193333d5f8cab934fbf844e439db6218c5b9eccb089b5c1d797b4b.yml
3+
openapi_spec_hash: f2b06aac248aecb248e975af25f3911c
44
config_hash: 3279841440b02d4e8303c961d6983492

src/resources/customers/credits/ledger.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,12 @@ export class Ledger extends APIResource {
162162
* also generate a one-off invoice for the customer for the credits pre-purchase.
163163
* Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
164164
* on the invoice are calculated by multiplying the cost basis with the number of
165-
* credit units added. Additionally, Orb also enforces invoice generation when a
166-
* non-zero `per_unit_cost_basis` value is provided.
165+
* credit units added.
166+
*
167+
* - if `per_unit_cost_basis` is greater than zero, an invoice will be generated
168+
* and `invoice_settings` must be included
169+
* - if `invoice_settings` is passed, one of either `custom_due_date` or
170+
* `net_terms` is required to determine the due date
167171
*
168172
* ## Deducting Credits
169173
*
@@ -283,8 +287,12 @@ export class Ledger extends APIResource {
283287
* also generate a one-off invoice for the customer for the credits pre-purchase.
284288
* Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
285289
* on the invoice are calculated by multiplying the cost basis with the number of
286-
* credit units added. Additionally, Orb also enforces invoice generation when a
287-
* non-zero `per_unit_cost_basis` value is provided.
290+
* credit units added.
291+
*
292+
* - if `per_unit_cost_basis` is greater than zero, an invoice will be generated
293+
* and `invoice_settings` must be included
294+
* - if `invoice_settings` is passed, one of either `custom_due_date` or
295+
* `net_terms` is required to determine the due date
288296
*
289297
* ## Deducting Credits
290298
*
@@ -974,7 +982,8 @@ export declare namespace LedgerCreateEntryParams {
974982
* based on the invoice or issuance date, depending on the account's configured due
975983
* date calculation method. A value of '0' here represents that the invoice is due
976984
* on issue, whereas a value of '30' represents that the customer has 30 days to
977-
* pay the invoice. Do not set this field if you want to set a custom due date.
985+
* pay the invoice. You must set either `net_terms` or `custom_due_date`, but not
986+
* both.
978987
*/
979988
net_terms?: number | null;
980989

@@ -1277,7 +1286,8 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
12771286
* based on the invoice or issuance date, depending on the account's configured due
12781287
* date calculation method. A value of '0' here represents that the invoice is due
12791288
* on issue, whereas a value of '30' represents that the customer has 30 days to
1280-
* pay the invoice. Do not set this field if you want to set a custom due date.
1289+
* pay the invoice. You must set either `net_terms` or `custom_due_date`, but not
1290+
* both.
12811291
*/
12821292
net_terms?: number | null;
12831293

0 commit comments

Comments
 (0)