Skip to content

Commit 1bb4db8

Browse files
chore(docs): add missing descriptions
1 parent a2da977 commit 1bb4db8

27 files changed

+1324
-0
lines changed

src/orb/_client.py

Lines changed: 486 additions & 0 deletions
Large diffs are not rendered by default.

src/orb/resources/alerts.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@
3232

3333

3434
class Alerts(SyncAPIResource):
35+
"""
36+
[Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
37+
usage, or credit balance and trigger webhooks when a threshold is exceeded.
38+
39+
Alerts created through the API can be scoped to either customers or subscriptions.
40+
"""
41+
3542
@cached_property
3643
def with_raw_response(self) -> AlertsWithRawResponse:
3744
"""
@@ -507,6 +514,13 @@ def enable(
507514

508515

509516
class AsyncAlerts(AsyncAPIResource):
517+
"""
518+
[Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
519+
usage, or credit balance and trigger webhooks when a threshold is exceeded.
520+
521+
Alerts created through the API can be scoped to either customers or subscriptions.
522+
"""
523+
510524
@cached_property
511525
def with_raw_response(self) -> AsyncAlertsWithRawResponse:
512526
"""

src/orb/resources/beta/beta.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,19 @@
2929

3030

3131
class Beta(SyncAPIResource):
32+
"""
33+
The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
34+
customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
35+
in the [Price resource](/reference/price).
36+
"""
37+
3238
@cached_property
3339
def external_plan_id(self) -> ExternalPlanID:
40+
"""
41+
The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
42+
customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
43+
in the [Price resource](/reference/price).
44+
"""
3445
return ExternalPlanID(self._client)
3546

3647
@cached_property
@@ -215,8 +226,19 @@ def set_default_plan_version(
215226

216227

217228
class AsyncBeta(AsyncAPIResource):
229+
"""
230+
The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
231+
customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
232+
in the [Price resource](/reference/price).
233+
"""
234+
218235
@cached_property
219236
def external_plan_id(self) -> AsyncExternalPlanID:
237+
"""
238+
The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
239+
customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
240+
in the [Price resource](/reference/price).
241+
"""
220242
return AsyncExternalPlanID(self._client)
221243

222244
@cached_property
@@ -416,6 +438,11 @@ def __init__(self, beta: Beta) -> None:
416438

417439
@cached_property
418440
def external_plan_id(self) -> ExternalPlanIDWithRawResponse:
441+
"""
442+
The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
443+
customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
444+
in the [Price resource](/reference/price).
445+
"""
419446
return ExternalPlanIDWithRawResponse(self._beta.external_plan_id)
420447

421448

@@ -435,6 +462,11 @@ def __init__(self, beta: AsyncBeta) -> None:
435462

436463
@cached_property
437464
def external_plan_id(self) -> AsyncExternalPlanIDWithRawResponse:
465+
"""
466+
The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
467+
customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
468+
in the [Price resource](/reference/price).
469+
"""
438470
return AsyncExternalPlanIDWithRawResponse(self._beta.external_plan_id)
439471

440472

@@ -454,6 +486,11 @@ def __init__(self, beta: Beta) -> None:
454486

455487
@cached_property
456488
def external_plan_id(self) -> ExternalPlanIDWithStreamingResponse:
489+
"""
490+
The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
491+
customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
492+
in the [Price resource](/reference/price).
493+
"""
457494
return ExternalPlanIDWithStreamingResponse(self._beta.external_plan_id)
458495

459496

@@ -473,4 +510,9 @@ def __init__(self, beta: AsyncBeta) -> None:
473510

474511
@cached_property
475512
def external_plan_id(self) -> AsyncExternalPlanIDWithStreamingResponse:
513+
"""
514+
The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
515+
customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
516+
in the [Price resource](/reference/price).
517+
"""
476518
return AsyncExternalPlanIDWithStreamingResponse(self._beta.external_plan_id)

src/orb/resources/beta/external_plan_id.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121

2222

2323
class ExternalPlanID(SyncAPIResource):
24+
"""
25+
The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
26+
customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
27+
in the [Price resource](/reference/price).
28+
"""
29+
2430
@cached_property
2531
def with_raw_response(self) -> ExternalPlanIDWithRawResponse:
2632
"""
@@ -206,6 +212,12 @@ def set_default_plan_version(
206212

207213

208214
class AsyncExternalPlanID(AsyncAPIResource):
215+
"""
216+
The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
217+
customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
218+
in the [Price resource](/reference/price).
219+
"""
220+
209221
@cached_property
210222
def with_raw_response(self) -> AsyncExternalPlanIDWithRawResponse:
211223
"""

src/orb/resources/coupons/coupons.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,15 @@
2929

3030

3131
class Coupons(SyncAPIResource):
32+
"""
33+
A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users.
34+
"""
35+
3236
@cached_property
3337
def subscriptions(self) -> Subscriptions:
38+
"""
39+
A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users.
40+
"""
3441
return Subscriptions(self._client)
3542

3643
@cached_property
@@ -254,8 +261,15 @@ def fetch(
254261

255262

256263
class AsyncCoupons(AsyncAPIResource):
264+
"""
265+
A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users.
266+
"""
267+
257268
@cached_property
258269
def subscriptions(self) -> AsyncSubscriptions:
270+
"""
271+
A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users.
272+
"""
259273
return AsyncSubscriptions(self._client)
260274

261275
@cached_property
@@ -497,6 +511,9 @@ def __init__(self, coupons: Coupons) -> None:
497511

498512
@cached_property
499513
def subscriptions(self) -> SubscriptionsWithRawResponse:
514+
"""
515+
A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users.
516+
"""
500517
return SubscriptionsWithRawResponse(self._coupons.subscriptions)
501518

502519

@@ -519,6 +536,9 @@ def __init__(self, coupons: AsyncCoupons) -> None:
519536

520537
@cached_property
521538
def subscriptions(self) -> AsyncSubscriptionsWithRawResponse:
539+
"""
540+
A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users.
541+
"""
522542
return AsyncSubscriptionsWithRawResponse(self._coupons.subscriptions)
523543

524544

@@ -541,6 +561,9 @@ def __init__(self, coupons: Coupons) -> None:
541561

542562
@cached_property
543563
def subscriptions(self) -> SubscriptionsWithStreamingResponse:
564+
"""
565+
A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users.
566+
"""
544567
return SubscriptionsWithStreamingResponse(self._coupons.subscriptions)
545568

546569

@@ -563,4 +586,7 @@ def __init__(self, coupons: AsyncCoupons) -> None:
563586

564587
@cached_property
565588
def subscriptions(self) -> AsyncSubscriptionsWithStreamingResponse:
589+
"""
590+
A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users.
591+
"""
566592
return AsyncSubscriptionsWithStreamingResponse(self._coupons.subscriptions)

src/orb/resources/coupons/subscriptions.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121

2222

2323
class Subscriptions(SyncAPIResource):
24+
"""
25+
A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users.
26+
"""
27+
2428
@cached_property
2529
def with_raw_response(self) -> SubscriptionsWithRawResponse:
2630
"""
@@ -96,6 +100,10 @@ def list(
96100

97101

98102
class AsyncSubscriptions(AsyncAPIResource):
103+
"""
104+
A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users.
105+
"""
106+
99107
@cached_property
100108
def with_raw_response(self) -> AsyncSubscriptionsWithRawResponse:
101109
"""

src/orb/resources/credit_blocks.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717

1818

1919
class CreditBlocks(SyncAPIResource):
20+
"""
21+
The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.
22+
"""
23+
2024
@cached_property
2125
def with_raw_response(self) -> CreditBlocksWithRawResponse:
2226
"""
@@ -172,6 +176,10 @@ def list_invoices(
172176

173177

174178
class AsyncCreditBlocks(AsyncAPIResource):
179+
"""
180+
The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.
181+
"""
182+
175183
@cached_property
176184
def with_raw_response(self) -> AsyncCreditBlocksWithRawResponse:
177185
"""

src/orb/resources/credit_notes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323

2424

2525
class CreditNotes(SyncAPIResource):
26+
"""
27+
The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a
28+
particular invoice.
29+
"""
30+
2631
@cached_property
2732
def with_raw_response(self) -> CreditNotesWithRawResponse:
2833
"""
@@ -229,6 +234,11 @@ def fetch(
229234

230235

231236
class AsyncCreditNotes(AsyncAPIResource):
237+
"""
238+
The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a
239+
particular invoice.
240+
"""
241+
232242
@cached_property
233243
def with_raw_response(self) -> AsyncCreditNotesWithRawResponse:
234244
"""

src/orb/resources/customers/balance_transactions.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,23 @@
2424

2525

2626
class BalanceTransactions(SyncAPIResource):
27+
"""
28+
A customer is a buyer of your products, and the other party to the billing relationship.
29+
30+
In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these
31+
match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an
32+
`external_customer_id` with your own identifier. See
33+
[Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these
34+
aliases work in Orb.
35+
36+
In addition to having an identifier in your system, a customer may exist in a payment provider solution like
37+
Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping.
38+
39+
A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which
40+
defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for
41+
information on what this timezone parameter influences within Orb.
42+
"""
43+
2744
@cached_property
2845
def with_raw_response(self) -> BalanceTransactionsWithRawResponse:
2946
"""
@@ -178,6 +195,23 @@ def list(
178195

179196

180197
class AsyncBalanceTransactions(AsyncAPIResource):
198+
"""
199+
A customer is a buyer of your products, and the other party to the billing relationship.
200+
201+
In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these
202+
match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an
203+
`external_customer_id` with your own identifier. See
204+
[Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these
205+
aliases work in Orb.
206+
207+
In addition to having an identifier in your system, a customer may exist in a payment provider solution like
208+
Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping.
209+
210+
A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which
211+
defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for
212+
information on what this timezone parameter influences within Orb.
213+
"""
214+
181215
@cached_property
182216
def with_raw_response(self) -> AsyncBalanceTransactionsWithRawResponse:
183217
"""

src/orb/resources/customers/costs.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,23 @@
2323

2424

2525
class Costs(SyncAPIResource):
26+
"""
27+
A customer is a buyer of your products, and the other party to the billing relationship.
28+
29+
In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these
30+
match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an
31+
`external_customer_id` with your own identifier. See
32+
[Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these
33+
aliases work in Orb.
34+
35+
In addition to having an identifier in your system, a customer may exist in a payment provider solution like
36+
Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping.
37+
38+
A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which
39+
defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for
40+
information on what this timezone parameter influences within Orb.
41+
"""
42+
2643
@cached_property
2744
def with_raw_response(self) -> CostsWithRawResponse:
2845
"""
@@ -398,6 +415,23 @@ def list_by_external_id(
398415

399416

400417
class AsyncCosts(AsyncAPIResource):
418+
"""
419+
A customer is a buyer of your products, and the other party to the billing relationship.
420+
421+
In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these
422+
match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an
423+
`external_customer_id` with your own identifier. See
424+
[Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these
425+
aliases work in Orb.
426+
427+
In addition to having an identifier in your system, a customer may exist in a payment provider solution like
428+
Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping.
429+
430+
A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which
431+
defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for
432+
information on what this timezone parameter influences within Orb.
433+
"""
434+
401435
@cached_property
402436
def with_raw_response(self) -> AsyncCostsWithRawResponse:
403437
"""

0 commit comments

Comments
 (0)