Skip to content

Commit 19af3f7

Browse files
feat(api): api update
1 parent 3686dc6 commit 19af3f7

File tree

4 files changed

+126
-46
lines changed

4 files changed

+126
-46
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/orb/resources/customers/credits/ledger.py

Lines changed: 120 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,12 @@ def create_entry(
286286
also generate a one-off invoice for the customer for the credits pre-purchase.
287287
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
288288
on the invoice are calculated by multiplying the cost basis with the number of
289-
credit units added. Additionally, Orb also enforces invoice generation when a
290-
non-zero `per_unit_cost_basis` value is provided.
289+
credit units added.
290+
291+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
292+
and `invoice_settings` must be included
293+
- if `invoice_settings` is passed, one of either `custom_due_date` or
294+
`net_terms` is required to determine the due date
291295
292296
## Deducting Credits
293297
@@ -460,8 +464,12 @@ def create_entry(
460464
also generate a one-off invoice for the customer for the credits pre-purchase.
461465
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
462466
on the invoice are calculated by multiplying the cost basis with the number of
463-
credit units added. Additionally, Orb also enforces invoice generation when a
464-
non-zero `per_unit_cost_basis` value is provided.
467+
credit units added.
468+
469+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
470+
and `invoice_settings` must be included
471+
- if `invoice_settings` is passed, one of either `custom_due_date` or
472+
`net_terms` is required to determine the due date
465473
466474
## Deducting Credits
467475
@@ -621,8 +629,12 @@ def create_entry(
621629
also generate a one-off invoice for the customer for the credits pre-purchase.
622630
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
623631
on the invoice are calculated by multiplying the cost basis with the number of
624-
credit units added. Additionally, Orb also enforces invoice generation when a
625-
non-zero `per_unit_cost_basis` value is provided.
632+
credit units added.
633+
634+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
635+
and `invoice_settings` must be included
636+
- if `invoice_settings` is passed, one of either `custom_due_date` or
637+
`net_terms` is required to determine the due date
626638
627639
## Deducting Credits
628640
@@ -790,8 +802,12 @@ def create_entry(
790802
also generate a one-off invoice for the customer for the credits pre-purchase.
791803
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
792804
on the invoice are calculated by multiplying the cost basis with the number of
793-
credit units added. Additionally, Orb also enforces invoice generation when a
794-
non-zero `per_unit_cost_basis` value is provided.
805+
credit units added.
806+
807+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
808+
and `invoice_settings` must be included
809+
- if `invoice_settings` is passed, one of either `custom_due_date` or
810+
`net_terms` is required to determine the due date
795811
796812
## Deducting Credits
797813
@@ -953,8 +969,12 @@ def create_entry(
953969
also generate a one-off invoice for the customer for the credits pre-purchase.
954970
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
955971
on the invoice are calculated by multiplying the cost basis with the number of
956-
credit units added. Additionally, Orb also enforces invoice generation when a
957-
non-zero `per_unit_cost_basis` value is provided.
972+
credit units added.
973+
974+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
975+
and `invoice_settings` must be included
976+
- if `invoice_settings` is passed, one of either `custom_due_date` or
977+
`net_terms` is required to determine the due date
958978
959979
## Deducting Credits
960980
@@ -1193,8 +1213,12 @@ def create_entry_by_external_id(
11931213
also generate a one-off invoice for the customer for the credits pre-purchase.
11941214
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
11951215
on the invoice are calculated by multiplying the cost basis with the number of
1196-
credit units added. Additionally, Orb also enforces invoice generation when a
1197-
non-zero `per_unit_cost_basis` value is provided.
1216+
credit units added.
1217+
1218+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
1219+
and `invoice_settings` must be included
1220+
- if `invoice_settings` is passed, one of either `custom_due_date` or
1221+
`net_terms` is required to determine the due date
11981222
11991223
## Deducting Credits
12001224
@@ -1367,8 +1391,12 @@ def create_entry_by_external_id(
13671391
also generate a one-off invoice for the customer for the credits pre-purchase.
13681392
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
13691393
on the invoice are calculated by multiplying the cost basis with the number of
1370-
credit units added. Additionally, Orb also enforces invoice generation when a
1371-
non-zero `per_unit_cost_basis` value is provided.
1394+
credit units added.
1395+
1396+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
1397+
and `invoice_settings` must be included
1398+
- if `invoice_settings` is passed, one of either `custom_due_date` or
1399+
`net_terms` is required to determine the due date
13721400
13731401
## Deducting Credits
13741402
@@ -1528,8 +1556,12 @@ def create_entry_by_external_id(
15281556
also generate a one-off invoice for the customer for the credits pre-purchase.
15291557
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
15301558
on the invoice are calculated by multiplying the cost basis with the number of
1531-
credit units added. Additionally, Orb also enforces invoice generation when a
1532-
non-zero `per_unit_cost_basis` value is provided.
1559+
credit units added.
1560+
1561+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
1562+
and `invoice_settings` must be included
1563+
- if `invoice_settings` is passed, one of either `custom_due_date` or
1564+
`net_terms` is required to determine the due date
15331565
15341566
## Deducting Credits
15351567
@@ -1697,8 +1729,12 @@ def create_entry_by_external_id(
16971729
also generate a one-off invoice for the customer for the credits pre-purchase.
16981730
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
16991731
on the invoice are calculated by multiplying the cost basis with the number of
1700-
credit units added. Additionally, Orb also enforces invoice generation when a
1701-
non-zero `per_unit_cost_basis` value is provided.
1732+
credit units added.
1733+
1734+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
1735+
and `invoice_settings` must be included
1736+
- if `invoice_settings` is passed, one of either `custom_due_date` or
1737+
`net_terms` is required to determine the due date
17021738
17031739
## Deducting Credits
17041740
@@ -1860,8 +1896,12 @@ def create_entry_by_external_id(
18601896
also generate a one-off invoice for the customer for the credits pre-purchase.
18611897
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
18621898
on the invoice are calculated by multiplying the cost basis with the number of
1863-
credit units added. Additionally, Orb also enforces invoice generation when a
1864-
non-zero `per_unit_cost_basis` value is provided.
1899+
credit units added.
1900+
1901+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
1902+
and `invoice_settings` must be included
1903+
- if `invoice_settings` is passed, one of either `custom_due_date` or
1904+
`net_terms` is required to determine the due date
18651905
18661906
## Deducting Credits
18671907
@@ -2443,8 +2483,12 @@ async def create_entry(
24432483
also generate a one-off invoice for the customer for the credits pre-purchase.
24442484
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
24452485
on the invoice are calculated by multiplying the cost basis with the number of
2446-
credit units added. Additionally, Orb also enforces invoice generation when a
2447-
non-zero `per_unit_cost_basis` value is provided.
2486+
credit units added.
2487+
2488+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
2489+
and `invoice_settings` must be included
2490+
- if `invoice_settings` is passed, one of either `custom_due_date` or
2491+
`net_terms` is required to determine the due date
24482492
24492493
## Deducting Credits
24502494
@@ -2617,8 +2661,12 @@ async def create_entry(
26172661
also generate a one-off invoice for the customer for the credits pre-purchase.
26182662
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
26192663
on the invoice are calculated by multiplying the cost basis with the number of
2620-
credit units added. Additionally, Orb also enforces invoice generation when a
2621-
non-zero `per_unit_cost_basis` value is provided.
2664+
credit units added.
2665+
2666+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
2667+
and `invoice_settings` must be included
2668+
- if `invoice_settings` is passed, one of either `custom_due_date` or
2669+
`net_terms` is required to determine the due date
26222670
26232671
## Deducting Credits
26242672
@@ -2778,8 +2826,12 @@ async def create_entry(
27782826
also generate a one-off invoice for the customer for the credits pre-purchase.
27792827
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
27802828
on the invoice are calculated by multiplying the cost basis with the number of
2781-
credit units added. Additionally, Orb also enforces invoice generation when a
2782-
non-zero `per_unit_cost_basis` value is provided.
2829+
credit units added.
2830+
2831+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
2832+
and `invoice_settings` must be included
2833+
- if `invoice_settings` is passed, one of either `custom_due_date` or
2834+
`net_terms` is required to determine the due date
27832835
27842836
## Deducting Credits
27852837
@@ -2947,8 +2999,12 @@ async def create_entry(
29472999
also generate a one-off invoice for the customer for the credits pre-purchase.
29483000
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
29493001
on the invoice are calculated by multiplying the cost basis with the number of
2950-
credit units added. Additionally, Orb also enforces invoice generation when a
2951-
non-zero `per_unit_cost_basis` value is provided.
3002+
credit units added.
3003+
3004+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
3005+
and `invoice_settings` must be included
3006+
- if `invoice_settings` is passed, one of either `custom_due_date` or
3007+
`net_terms` is required to determine the due date
29523008
29533009
## Deducting Credits
29543010
@@ -3110,8 +3166,12 @@ async def create_entry(
31103166
also generate a one-off invoice for the customer for the credits pre-purchase.
31113167
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
31123168
on the invoice are calculated by multiplying the cost basis with the number of
3113-
credit units added. Additionally, Orb also enforces invoice generation when a
3114-
non-zero `per_unit_cost_basis` value is provided.
3169+
credit units added.
3170+
3171+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
3172+
and `invoice_settings` must be included
3173+
- if `invoice_settings` is passed, one of either `custom_due_date` or
3174+
`net_terms` is required to determine the due date
31153175
31163176
## Deducting Credits
31173177
@@ -3350,8 +3410,12 @@ async def create_entry_by_external_id(
33503410
also generate a one-off invoice for the customer for the credits pre-purchase.
33513411
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
33523412
on the invoice are calculated by multiplying the cost basis with the number of
3353-
credit units added. Additionally, Orb also enforces invoice generation when a
3354-
non-zero `per_unit_cost_basis` value is provided.
3413+
credit units added.
3414+
3415+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
3416+
and `invoice_settings` must be included
3417+
- if `invoice_settings` is passed, one of either `custom_due_date` or
3418+
`net_terms` is required to determine the due date
33553419
33563420
## Deducting Credits
33573421
@@ -3524,8 +3588,12 @@ async def create_entry_by_external_id(
35243588
also generate a one-off invoice for the customer for the credits pre-purchase.
35253589
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
35263590
on the invoice are calculated by multiplying the cost basis with the number of
3527-
credit units added. Additionally, Orb also enforces invoice generation when a
3528-
non-zero `per_unit_cost_basis` value is provided.
3591+
credit units added.
3592+
3593+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
3594+
and `invoice_settings` must be included
3595+
- if `invoice_settings` is passed, one of either `custom_due_date` or
3596+
`net_terms` is required to determine the due date
35293597
35303598
## Deducting Credits
35313599
@@ -3685,8 +3753,12 @@ async def create_entry_by_external_id(
36853753
also generate a one-off invoice for the customer for the credits pre-purchase.
36863754
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
36873755
on the invoice are calculated by multiplying the cost basis with the number of
3688-
credit units added. Additionally, Orb also enforces invoice generation when a
3689-
non-zero `per_unit_cost_basis` value is provided.
3756+
credit units added.
3757+
3758+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
3759+
and `invoice_settings` must be included
3760+
- if `invoice_settings` is passed, one of either `custom_due_date` or
3761+
`net_terms` is required to determine the due date
36903762
36913763
## Deducting Credits
36923764
@@ -3854,8 +3926,12 @@ async def create_entry_by_external_id(
38543926
also generate a one-off invoice for the customer for the credits pre-purchase.
38553927
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
38563928
on the invoice are calculated by multiplying the cost basis with the number of
3857-
credit units added. Additionally, Orb also enforces invoice generation when a
3858-
non-zero `per_unit_cost_basis` value is provided.
3929+
credit units added.
3930+
3931+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
3932+
and `invoice_settings` must be included
3933+
- if `invoice_settings` is passed, one of either `custom_due_date` or
3934+
`net_terms` is required to determine the due date
38593935
38603936
## Deducting Credits
38613937
@@ -4017,8 +4093,12 @@ async def create_entry_by_external_id(
40174093
also generate a one-off invoice for the customer for the credits pre-purchase.
40184094
Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
40194095
on the invoice are calculated by multiplying the cost basis with the number of
4020-
credit units added. Additionally, Orb also enforces invoice generation when a
4021-
non-zero `per_unit_cost_basis` value is provided.
4096+
credit units added.
4097+
4098+
- if `per_unit_cost_basis` is greater than zero, an invoice will be generated
4099+
and `invoice_settings` must be included
4100+
- if `invoice_settings` is passed, one of either `custom_due_date` or
4101+
`net_terms` is required to determine the due date
40224102
40234103
## Deducting Credits
40244104

src/orb/types/customers/credits/ledger_create_entry_by_external_id_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ class AddIncrementCreditLedgerEntryRequestParamsInvoiceSettings(TypedDict, total
137137
Due date is calculated based on the invoice or issuance date, depending on the
138138
account's configured due date calculation method. A value of '0' here represents
139139
that the invoice is due on issue, whereas a value of '30' represents that the
140-
customer has 30 days to pay the invoice. Do not set this field if you want to
141-
set a custom due date.
140+
customer has 30 days to pay the invoice. You must set either `net_terms` or
141+
`custom_due_date`, but not both.
142142
"""
143143

144144
require_successful_payment: bool

src/orb/types/customers/credits/ledger_create_entry_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ class AddIncrementCreditLedgerEntryRequestParamsInvoiceSettings(TypedDict, total
137137
Due date is calculated based on the invoice or issuance date, depending on the
138138
account's configured due date calculation method. A value of '0' here represents
139139
that the invoice is due on issue, whereas a value of '30' represents that the
140-
customer has 30 days to pay the invoice. Do not set this field if you want to
141-
set a custom due date.
140+
customer has 30 days to pay the invoice. You must set either `net_terms` or
141+
`custom_due_date`, but not both.
142142
"""
143143

144144
require_successful_payment: bool

0 commit comments

Comments
 (0)