Skip to content

Commit 3d10507

Browse files
feat(api): api update
1 parent a64eaa1 commit 3d10507

File tree

87 files changed

+31007
-1516
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+31007
-1516
lines changed

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 106
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-e8dad7eee5621fe2ba948dfd00dabf170d9d92ce615a9f04b0f546f4d8bf39ba.yml
3-
openapi_spec_hash: 3f6a98e3a1b3a47acebd67a960090ebf
4-
config_hash: f6da12790e8f46d93592def474d41c69
1+
configured_endpoints: 113
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-c697450a215fdbd1a854d26381ce137b222726c3e6669a93afb1c0c5669906ca.yml
3+
openapi_spec_hash: b8b5388292baa73b5f2c686d4904ae45
4+
config_hash: 0e33d6c596feab76cb4df5d64f28350b

api.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ Methods:
260260
- <code title="post /items">client.items.<a href="./src/orb/resources/items.py">create</a>(\*\*<a href="src/orb/types/item_create_params.py">params</a>) -> <a href="./src/orb/types/item.py">Item</a></code>
261261
- <code title="put /items/{item_id}">client.items.<a href="./src/orb/resources/items.py">update</a>(item_id, \*\*<a href="src/orb/types/item_update_params.py">params</a>) -> <a href="./src/orb/types/item.py">Item</a></code>
262262
- <code title="get /items">client.items.<a href="./src/orb/resources/items.py">list</a>(\*\*<a href="src/orb/types/item_list_params.py">params</a>) -> <a href="./src/orb/types/item.py">SyncPage[Item]</a></code>
263+
- <code title="post /items/{item_id}/archive">client.items.<a href="./src/orb/resources/items.py">archive</a>(item_id) -> <a href="./src/orb/types/item.py">Item</a></code>
263264
- <code title="get /items/{item_id}">client.items.<a href="./src/orb/resources/items.py">fetch</a>(item_id) -> <a href="./src/orb/types/item.py">Item</a></code>
264265

265266
# Metrics
@@ -291,13 +292,41 @@ Methods:
291292
- <code title="put /plans/{plan_id}">client.plans.<a href="./src/orb/resources/plans/plans.py">update</a>(plan_id, \*\*<a href="src/orb/types/plan_update_params.py">params</a>) -> <a href="./src/orb/types/plan.py">Plan</a></code>
292293
- <code title="get /plans">client.plans.<a href="./src/orb/resources/plans/plans.py">list</a>(\*\*<a href="src/orb/types/plan_list_params.py">params</a>) -> <a href="./src/orb/types/plan.py">SyncPage[Plan]</a></code>
293294
- <code title="get /plans/{plan_id}">client.plans.<a href="./src/orb/resources/plans/plans.py">fetch</a>(plan_id) -> <a href="./src/orb/types/plan.py">Plan</a></code>
295+
- <code title="post /plans/{plan_id}/set_default_version">client.plans.<a href="./src/orb/resources/plans/plans.py">set_default_version</a>(plan_id, \*\*<a href="src/orb/types/plan_set_default_version_params.py">params</a>) -> <a href="./src/orb/types/plan.py">Plan</a></code>
294296

295297
## ExternalPlanID
296298

297299
Methods:
298300

299-
- <code title="put /plans/external_plan_id/{external_plan_id}">client.plans.external_plan_id.<a href="./src/orb/resources/plans/external_plan_id.py">update</a>(other_external_plan_id, \*\*<a href="src/orb/types/plans/external_plan_id_update_params.py">params</a>) -> <a href="./src/orb/types/plan.py">Plan</a></code>
300-
- <code title="get /plans/external_plan_id/{external_plan_id}">client.plans.external_plan_id.<a href="./src/orb/resources/plans/external_plan_id.py">fetch</a>(external_plan_id) -> <a href="./src/orb/types/plan.py">Plan</a></code>
301+
- <code title="put /plans/external_plan_id/{external_plan_id}">client.plans.external_plan_id.<a href="./src/orb/resources/plans/external_plan_id/external_plan_id.py">update</a>(other_external_plan_id, \*\*<a href="src/orb/types/plans/external_plan_id_update_params.py">params</a>) -> <a href="./src/orb/types/plan.py">Plan</a></code>
302+
- <code title="get /plans/external_plan_id/{external_plan_id}">client.plans.external_plan_id.<a href="./src/orb/resources/plans/external_plan_id/external_plan_id.py">fetch</a>(external_plan_id) -> <a href="./src/orb/types/plan.py">Plan</a></code>
303+
- <code title="post /plans/external_plan_id/{external_plan_id}/set_default_version">client.plans.external_plan_id.<a href="./src/orb/resources/plans/external_plan_id/external_plan_id.py">set_default_version</a>(external_plan_id, \*\*<a href="src/orb/types/plans/external_plan_id_set_default_version_params.py">params</a>) -> <a href="./src/orb/types/plan.py">Plan</a></code>
304+
305+
### Versions
306+
307+
Types:
308+
309+
```python
310+
from orb.types.plans.external_plan_id import VersionCreateResponse, VersionRetrieveResponse
311+
```
312+
313+
Methods:
314+
315+
- <code title="post /plans/external_plan_id/{external_plan_id}/versions">client.plans.external_plan_id.versions.<a href="./src/orb/resources/plans/external_plan_id/versions.py">create</a>(external_plan_id, \*\*<a href="src/orb/types/plans/external_plan_id/version_create_params.py">params</a>) -> <a href="./src/orb/types/plans/external_plan_id/version_create_response.py">VersionCreateResponse</a></code>
316+
- <code title="get /plans/external_plan_id/{external_plan_id}/versions/{version}">client.plans.external_plan_id.versions.<a href="./src/orb/resources/plans/external_plan_id/versions.py">retrieve</a>(version, \*, external_plan_id) -> <a href="./src/orb/types/plans/external_plan_id/version_retrieve_response.py">VersionRetrieveResponse</a></code>
317+
318+
## Versions
319+
320+
Types:
321+
322+
```python
323+
from orb.types.plans import VersionCreateResponse, VersionRetrieveResponse
324+
```
325+
326+
Methods:
327+
328+
- <code title="post /plans/{plan_id}/versions">client.plans.versions.<a href="./src/orb/resources/plans/versions.py">create</a>(plan_id, \*\*<a href="src/orb/types/plans/version_create_params.py">params</a>) -> <a href="./src/orb/types/plans/version_create_response.py">VersionCreateResponse</a></code>
329+
- <code title="get /plans/{plan_id}/versions/{version}">client.plans.versions.<a href="./src/orb/resources/plans/versions.py">retrieve</a>(version, \*, plan_id) -> <a href="./src/orb/types/plans/version_retrieve_response.py">VersionRetrieveResponse</a></code>
301330

302331
# Prices
303332

@@ -312,7 +341,7 @@ Methods:
312341
- <code title="post /prices">client.prices.<a href="./src/orb/resources/prices/prices.py">create</a>(\*\*<a href="src/orb/types/price_create_params.py">params</a>) -> <a href="./src/orb/types/price.py">Price</a></code>
313342
- <code title="put /prices/{price_id}">client.prices.<a href="./src/orb/resources/prices/prices.py">update</a>(price_id, \*\*<a href="src/orb/types/price_update_params.py">params</a>) -> <a href="./src/orb/types/price.py">Price</a></code>
314343
- <code title="get /prices">client.prices.<a href="./src/orb/resources/prices/prices.py">list</a>(\*\*<a href="src/orb/types/price_list_params.py">params</a>) -> <a href="./src/orb/types/price.py">SyncPage[Price]</a></code>
315-
- <code title="post /prices/{price_id}/evaluate">client.prices.<a href="./src/orb/resources/prices/prices.py">evaluate</a>(price_id, \*\*<a href="src/orb/types/price_evaluate_params.py">params</a>) -> <a href="./src/orb/types/price_evaluate_response.py">PriceEvaluateResponse</a></code>
344+
- <code title="post /prices/evaluate">client.prices.<a href="./src/orb/resources/prices/prices.py">evaluate</a>(\*\*<a href="src/orb/types/price_evaluate_params.py">params</a>) -> <a href="./src/orb/types/price_evaluate_response.py">PriceEvaluateResponse</a></code>
316345
- <code title="get /prices/{price_id}">client.prices.<a href="./src/orb/resources/prices/prices.py">fetch</a>(price_id) -> <a href="./src/orb/types/price.py">Price</a></code>
317346

318347
## ExternalPriceID

src/orb/resources/credit_notes.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ def create(
4646
self,
4747
*,
4848
line_items: Iterable[credit_note_create_params.LineItem],
49+
reason: Literal["duplicate", "fraudulent", "order_change", "product_unsatisfactory"],
4950
memo: Optional[str] | NotGiven = NOT_GIVEN,
50-
reason: Optional[Literal["duplicate", "fraudulent", "order_change", "product_unsatisfactory"]]
51-
| NotGiven = NOT_GIVEN,
5251
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5352
# The extra values given here take precedence over values defined on the client or passed to this method.
5453
extra_headers: Headers | None = None,
@@ -62,10 +61,10 @@ def create(
6261
[`Credit Note`](/invoicing/credit-notes).
6362
6463
Args:
65-
memo: An optional memo to attach to the credit note.
66-
6764
reason: An optional reason for the credit note.
6865
66+
memo: An optional memo to attach to the credit note.
67+
6968
extra_headers: Send extra headers
7069
7170
extra_query: Add additional query parameters to the request
@@ -81,8 +80,8 @@ def create(
8180
body=maybe_transform(
8281
{
8382
"line_items": line_items,
84-
"memo": memo,
8583
"reason": reason,
84+
"memo": memo,
8685
},
8786
credit_note_create_params.CreditNoteCreateParams,
8887
),
@@ -214,9 +213,8 @@ async def create(
214213
self,
215214
*,
216215
line_items: Iterable[credit_note_create_params.LineItem],
216+
reason: Literal["duplicate", "fraudulent", "order_change", "product_unsatisfactory"],
217217
memo: Optional[str] | NotGiven = NOT_GIVEN,
218-
reason: Optional[Literal["duplicate", "fraudulent", "order_change", "product_unsatisfactory"]]
219-
| NotGiven = NOT_GIVEN,
220218
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
221219
# The extra values given here take precedence over values defined on the client or passed to this method.
222220
extra_headers: Headers | None = None,
@@ -230,10 +228,10 @@ async def create(
230228
[`Credit Note`](/invoicing/credit-notes).
231229
232230
Args:
233-
memo: An optional memo to attach to the credit note.
234-
235231
reason: An optional reason for the credit note.
236232
233+
memo: An optional memo to attach to the credit note.
234+
237235
extra_headers: Send extra headers
238236
239237
extra_query: Add additional query parameters to the request
@@ -249,8 +247,8 @@ async def create(
249247
body=await async_maybe_transform(
250248
{
251249
"line_items": line_items,
252-
"memo": memo,
253250
"reason": reason,
251+
"memo": memo,
254252
},
255253
credit_note_create_params.CreditNoteCreateParams,
256254
),

src/orb/resources/customers/balance_transactions.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,6 @@ def list(
137137
chronological order for a single customer, providing a complete audit trail of
138138
all adjustments and invoice applications.
139139
140-
## Eligibility
141-
142-
The customer balance can only be applied to invoices or adjusted manually if
143-
invoices are not synced to a separate invoicing provider. If a payment gateway
144-
such as Stripe is used, the balance will be applied to the invoice before
145-
forwarding payment to the gateway.
146-
147140
Args:
148141
cursor: Cursor for pagination. This can be populated by the `next_cursor` value returned
149142
from the initial request.
@@ -298,13 +291,6 @@ def list(
298291
chronological order for a single customer, providing a complete audit trail of
299292
all adjustments and invoice applications.
300293
301-
## Eligibility
302-
303-
The customer balance can only be applied to invoices or adjusted manually if
304-
invoices are not synced to a separate invoicing provider. If a payment gateway
305-
such as Stripe is used, the balance will be applied to the invoice before
306-
forwarding payment to the gateway.
307-
308294
Args:
309295
cursor: Cursor for pagination. This can be populated by the `next_cursor` value returned
310296
from the initial request.

src/orb/resources/customers/credits/top_ups.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def create(
9393
threshold, the top-up will be triggered.
9494
9595
active_from: The date from which the top-up is active. If unspecified, the top-up is active
96-
immediately.
96+
immediately. This should not be more than 10 days in the past.
9797
9898
expires_after: The number of days or months after which the top-up expires. If unspecified, it
9999
does not expire.
@@ -277,7 +277,7 @@ def create_by_external_id(
277277
threshold, the top-up will be triggered.
278278
279279
active_from: The date from which the top-up is active. If unspecified, the top-up is active
280-
immediately.
280+
immediately. This should not be more than 10 days in the past.
281281
282282
expires_after: The number of days or months after which the top-up expires. If unspecified, it
283283
does not expire.
@@ -488,7 +488,7 @@ async def create(
488488
threshold, the top-up will be triggered.
489489
490490
active_from: The date from which the top-up is active. If unspecified, the top-up is active
491-
immediately.
491+
immediately. This should not be more than 10 days in the past.
492492
493493
expires_after: The number of days or months after which the top-up expires. If unspecified, it
494494
does not expire.
@@ -672,7 +672,7 @@ async def create_by_external_id(
672672
threshold, the top-up will be triggered.
673673
674674
active_from: The date from which the top-up is active. If unspecified, the top-up is active
675-
immediately.
675+
immediately. This should not be more than 10 days in the past.
676676
677677
expires_after: The number of days or months after which the top-up expires. If unspecified, it
678678
does not expire.

src/orb/resources/customers/customers.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -628,10 +628,7 @@ def delete(
628628
**Note**: This operation happens asynchronously and can be expected to take a
629629
few minutes to propagate to related resources. However, querying for the
630630
customer on subsequent GET requests while deletion is in process will reflect
631-
its deletion with a `deleted: true` property. Once the customer deletion has
632-
been fully processed, the customer will not be returned in the API.
633-
634-
On successful processing, this returns an empty dictionary (`{}`) in the API.
631+
its deletion.
635632
636633
Args:
637634
extra_headers: Send extra headers
@@ -1634,10 +1631,7 @@ async def delete(
16341631
**Note**: This operation happens asynchronously and can be expected to take a
16351632
few minutes to propagate to related resources. However, querying for the
16361633
customer on subsequent GET requests while deletion is in process will reflect
1637-
its deletion with a `deleted: true` property. Once the customer deletion has
1638-
been fully processed, the customer will not be returned in the API.
1639-
1640-
On successful processing, this returns an empty dictionary (`{}`) in the API.
1634+
its deletion.
16411635
16421636
Args:
16431637
extra_headers: Send extra headers

src/orb/resources/dimensional_price_groups/dimensional_price_groups.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def create(
7676
For example, suppose we have a billable metric that measures the number of
7777
widgets used and we want to charge differently depending on the color of the
7878
widget. We can create a price group with a dimension "color" and two prices: one
79-
that charges $10 per red widget and one that charges $20 per blue widget.
79+
that charges \\$$10 per red widget and one that charges \\$$20 per blue widget.
8080
8181
Args:
8282
dimensions: The set of keys (in order) used to disambiguate prices in the group.
@@ -250,7 +250,7 @@ async def create(
250250
For example, suppose we have a billable metric that measures the number of
251251
widgets used and we want to charge differently depending on the color of the
252252
widget. We can create a price group with a dimension "color" and two prices: one
253-
that charges $10 per red widget and one that charges $20 per blue widget.
253+
that charges \\$$10 per red widget and one that charges \\$$20 per blue widget.
254254
255255
Args:
256256
dimensions: The set of keys (in order) used to disambiguate prices in the group.

0 commit comments

Comments
 (0)