Skip to content

Commit fe2fcb7

Browse files
feat(api): api update
1 parent 7679cad commit fe2fcb7

12 files changed

+53
-37
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: 116
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-a44cccd16bb58080f7cc0669999403f6ed3f77287fad901caa6fd2523f2fbafd.yml
3-
openapi_spec_hash: af6444648d0b2a70b7f7ad234bd37541
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-1aabbd8715a871e993abf67f0bf9c1d6793b4f197c4b2f11fc7a76453590cd6c.yml
3+
openapi_spec_hash: 3e5878f87e74881d882a69e1ccdc25a3
44
config_hash: 1f535c1fa222aacf28b636eed21bec72

src/orb/resources/customers/costs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def list(
177177
`grouping_value` and `secondary_grouping_value` available.
178178
179179
Args:
180-
currency: The currency to use.
180+
currency: The currency or custom pricing unit to use.
181181
182182
timeframe_end: Costs returned are exclusive of `timeframe_end`.
183183
@@ -353,7 +353,7 @@ def list_by_external_id(
353353
`grouping_value` and `secondary_grouping_value` available.
354354
355355
Args:
356-
currency: The currency to use.
356+
currency: The currency or custom pricing unit to use.
357357
358358
timeframe_end: Costs returned are exclusive of `timeframe_end`.
359359
@@ -552,7 +552,7 @@ async def list(
552552
`grouping_value` and `secondary_grouping_value` available.
553553
554554
Args:
555-
currency: The currency to use.
555+
currency: The currency or custom pricing unit to use.
556556
557557
timeframe_end: Costs returned are exclusive of `timeframe_end`.
558558
@@ -728,7 +728,7 @@ async def list_by_external_id(
728728
`grouping_value` and `secondary_grouping_value` available.
729729
730730
Args:
731-
currency: The currency to use.
731+
currency: The currency or custom pricing unit to use.
732732
733733
timeframe_end: Costs returned are exclusive of `timeframe_end`.
734734

src/orb/resources/customers/customers.py

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,11 @@ def update(
371371
372372
email: A valid customer email, to be used for invoicing and notifications.
373373
374-
external_customer_id: The external customer ID. This can only be set if empty and the customer has no
375-
past or current subscriptions.
374+
external_customer_id: The external customer ID. This can only be set if the customer has no existing
375+
external customer ID. Since this action may change usage quantities for all
376+
existing subscriptions, it is disallowed if the customer has issued invoices
377+
with usage line items and subject to the same restrictions as backdated
378+
subscription creation.
376379
377380
hierarchy: The hierarchical relationships for this customer.
378381
@@ -880,8 +883,11 @@ def update_by_external_id(
880883
881884
email: A valid customer email, to be used for invoicing and notifications.
882885
883-
external_customer_id: The external customer ID. This can only be set if empty and the customer has no
884-
past or current subscriptions.
886+
external_customer_id: The external customer ID. This can only be set if the customer has no existing
887+
external customer ID. Since this action may change usage quantities for all
888+
existing subscriptions, it is disallowed if the customer has issued invoices
889+
with usage line items and subject to the same restrictions as backdated
890+
subscription creation.
885891
886892
hierarchy: The hierarchical relationships for this customer.
887893
@@ -1370,8 +1376,11 @@ async def update(
13701376
13711377
email: A valid customer email, to be used for invoicing and notifications.
13721378
1373-
external_customer_id: The external customer ID. This can only be set if empty and the customer has no
1374-
past or current subscriptions.
1379+
external_customer_id: The external customer ID. This can only be set if the customer has no existing
1380+
external customer ID. Since this action may change usage quantities for all
1381+
existing subscriptions, it is disallowed if the customer has issued invoices
1382+
with usage line items and subject to the same restrictions as backdated
1383+
subscription creation.
13751384
13761385
hierarchy: The hierarchical relationships for this customer.
13771386
@@ -1879,8 +1888,11 @@ async def update_by_external_id(
18791888
18801889
email: A valid customer email, to be used for invoicing and notifications.
18811890
1882-
external_customer_id: The external customer ID. This can only be set if empty and the customer has no
1883-
past or current subscriptions.
1891+
external_customer_id: The external customer ID. This can only be set if the customer has no existing
1892+
external customer ID. Since this action may change usage quantities for all
1893+
existing subscriptions, it is disallowed if the customer has issued invoices
1894+
with usage line items and subject to the same restrictions as backdated
1895+
subscription creation.
18841896
18851897
hierarchy: The hierarchical relationships for this customer.
18861898

src/orb/resources/invoices.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,13 @@ def update(
155155
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
156156
idempotency_key: str | None = None,
157157
) -> Invoice:
158-
"""This endpoint allows you to update the `metadata` property on an invoice.
159-
160-
If you
161-
pass null for the metadata value, it will clear any existing metadata for that
162-
invoice.
158+
"""
159+
This endpoint allows you to update the `metadata`, `net_terms`, and `due_date`
160+
properties on an invoice. If you pass null for the metadata value, it will clear
161+
any existing metadata for that invoice.
163162
164-
`metadata` can be modified regardless of invoice state.
163+
`metadata` can be modified regardless of invoice state. `net_terms` and
164+
`due_date` can only be modified if the invoice is in a `draft` state.
165165
166166
Args:
167167
metadata: User-specified key/value pairs for the resource. Individual keys can be removed
@@ -695,13 +695,13 @@ async def update(
695695
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
696696
idempotency_key: str | None = None,
697697
) -> Invoice:
698-
"""This endpoint allows you to update the `metadata` property on an invoice.
699-
700-
If you
701-
pass null for the metadata value, it will clear any existing metadata for that
702-
invoice.
698+
"""
699+
This endpoint allows you to update the `metadata`, `net_terms`, and `due_date`
700+
properties on an invoice. If you pass null for the metadata value, it will clear
701+
any existing metadata for that invoice.
703702
704-
`metadata` can be modified regardless of invoice state.
703+
`metadata` can be modified regardless of invoice state. `net_terms` and
704+
`due_date` can only be modified if the invoice is in a `draft` state.
705705
706706
Args:
707707
metadata: User-specified key/value pairs for the resource. Individual keys can be removed

src/orb/resources/subscriptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ def fetch_costs(
833833
same day).
834834
835835
Args:
836-
currency: The currency to use.
836+
currency: The currency or custom pricing unit to use.
837837
838838
timeframe_end: Costs returned are exclusive of `timeframe_end`.
839839
@@ -2919,7 +2919,7 @@ async def fetch_costs(
29192919
same day).
29202920
29212921
Args:
2922-
currency: The currency to use.
2922+
currency: The currency or custom pricing unit to use.
29232923
29242924
timeframe_end: Costs returned are exclusive of `timeframe_end`.
29252925

src/orb/types/customer_update_by_external_id_params.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ class CustomerUpdateByExternalIDParams(TypedDict, total=False):
4949
external_customer_id: Optional[str]
5050
"""The external customer ID.
5151
52-
This can only be set if empty and the customer has no past or current
53-
subscriptions.
52+
This can only be set if the customer has no existing external customer ID. Since
53+
this action may change usage quantities for all existing subscriptions, it is
54+
disallowed if the customer has issued invoices with usage line items and subject
55+
to the same restrictions as backdated subscription creation.
5456
"""
5557

5658
hierarchy: Optional[CustomerHierarchyConfigParam]

src/orb/types/customer_update_params.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ class CustomerUpdateParams(TypedDict, total=False):
4949
external_customer_id: Optional[str]
5050
"""The external customer ID.
5151
52-
This can only be set if empty and the customer has no past or current
53-
subscriptions.
52+
This can only be set if the customer has no existing external customer ID. Since
53+
this action may change usage quantities for all existing subscriptions, it is
54+
disallowed if the customer has issued invoices with usage line items and subject
55+
to the same restrictions as backdated subscription creation.
5456
"""
5557

5658
hierarchy: Optional[CustomerHierarchyConfigParam]

src/orb/types/customers/cost_list_by_external_id_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
class CostListByExternalIDParams(TypedDict, total=False):
1515
currency: Optional[str]
16-
"""The currency to use."""
16+
"""The currency or custom pricing unit to use."""
1717

1818
timeframe_end: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
1919
"""Costs returned are exclusive of `timeframe_end`."""

src/orb/types/customers/cost_list_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
class CostListParams(TypedDict, total=False):
1515
currency: Optional[str]
16-
"""The currency to use."""
16+
"""The currency or custom pricing unit to use."""
1717

1818
timeframe_end: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
1919
"""Costs returned are exclusive of `timeframe_end`."""

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class AddIncrementCreditLedgerEntryRequestParamsInvoiceSettings(TypedDict, total
8181
saved payment method.
8282
"""
8383

84-
net_terms: Required[int]
84+
net_terms: Required[Optional[int]]
8585
"""
8686
The net terms determines the difference between the invoice date and the issue
8787
date for the invoice. If you intend the invoice to be due on issue, set this

0 commit comments

Comments
 (0)