Skip to content

Commit 073bfcb

Browse files
chore: add missing docstrings
1 parent d68a102 commit 073bfcb

File tree

165 files changed

+1275
-0
lines changed

Some content is hidden

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

165 files changed

+1275
-0
lines changed

src/orb/types/alert.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@
1313

1414

1515
class Metric(BaseModel):
16+
"""The metric the alert applies to."""
17+
1618
id: str
1719

1820

1921
class Plan(BaseModel):
22+
"""The plan the alert applies to."""
23+
2024
id: Optional[str] = None
2125

2226
external_plan_id: Optional[str] = None
@@ -32,6 +36,8 @@ class Plan(BaseModel):
3236

3337

3438
class BalanceAlertStatus(BaseModel):
39+
"""Alert status is used to determine if an alert is currently in-alert or not."""
40+
3541
in_alert: bool
3642
"""Whether the alert is currently in-alert or not."""
3743

@@ -40,6 +46,13 @@ class BalanceAlertStatus(BaseModel):
4046

4147

4248
class Alert(BaseModel):
49+
"""
50+
[Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
51+
usage, or credit balance and trigger webhooks when a threshold is exceeded.
52+
53+
Alerts created through the API can be scoped to either customers or subscriptions.
54+
"""
55+
4356
id: str
4457
"""Also referred to as alert_id in this documentation."""
4558

src/orb/types/beta/external_plan_id_create_plan_version_params.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ class AddAdjustment(TypedDict, total=False):
140140

141141

142142
class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter(TypedDict, total=False):
143+
"""Configuration for a single property filter"""
144+
143145
property_key: Required[str]
144146
"""Event property key to filter on"""
145147

@@ -148,6 +150,8 @@ class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter(TypedD
148150

149151

150152
class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigTier(TypedDict, total=False):
153+
"""Configuration for a single bulk pricing tier"""
154+
151155
unit_amount: Required[str]
152156
"""Amount per unit"""
153157

@@ -156,6 +160,8 @@ class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigTier(TypedDic
156160

157161

158162
class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfig(TypedDict, total=False):
163+
"""Configuration for bulk_with_filters pricing"""
164+
159165
filters: Required[Iterable[AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter]]
160166
"""Property filters to apply (all must match)"""
161167

@@ -250,6 +256,8 @@ class AddPricePriceNewPlanBulkWithFiltersPrice(TypedDict, total=False):
250256

251257

252258
class AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier(TypedDict, total=False):
259+
"""Configuration for a single tiered with proration tier"""
260+
253261
tier_lower_bound: Required[str]
254262
"""Inclusive tier starting value"""
255263

@@ -258,6 +266,8 @@ class AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier(
258266

259267

260268
class AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfig(TypedDict, total=False):
269+
"""Configuration for tiered_with_proration pricing"""
270+
261271
tiers: Required[Iterable[AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier]]
262272
"""
263273
Tiers for rating based on total usage quantities into the specified tier with
@@ -352,6 +362,8 @@ class AddPricePriceNewPlanTieredWithProrationPrice(TypedDict, total=False):
352362

353363

354364
class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig(TypedDict, total=False):
365+
"""Configuration for grouped_with_min_max_thresholds pricing"""
366+
355367
grouping_key: Required[str]
356368
"""The event property used to group before applying thresholds"""
357369

@@ -454,6 +466,8 @@ class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total=Fals
454466

455467

456468
class AddPricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig(TypedDict, total=False):
469+
"""Configuration for cumulative_grouped_allocation pricing"""
470+
457471
cumulative_allocation: Required[str]
458472
"""The overall allocation across all groups"""
459473

@@ -556,6 +570,8 @@ class AddPricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total=Fals
556570

557571

558572
class AddPricePriceNewPlanPercentCompositePricePercentConfig(TypedDict, total=False):
573+
"""Configuration for percent pricing"""
574+
559575
percent: Required[float]
560576
"""What percent of the component subtotals to charge"""
561577

@@ -647,6 +663,8 @@ class AddPricePriceNewPlanPercentCompositePrice(TypedDict, total=False):
647663

648664

649665
class AddPricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total=False):
666+
"""Configuration for event_output pricing"""
667+
650668
unit_rating_key: Required[str]
651669
"""The key in the event data to extract the unit rate from."""
652670

@@ -829,6 +847,8 @@ class ReplaceAdjustment(TypedDict, total=False):
829847

830848

831849
class ReplacePricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter(TypedDict, total=False):
850+
"""Configuration for a single property filter"""
851+
832852
property_key: Required[str]
833853
"""Event property key to filter on"""
834854

@@ -837,6 +857,8 @@ class ReplacePricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter(Ty
837857

838858

839859
class ReplacePricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigTier(TypedDict, total=False):
860+
"""Configuration for a single bulk pricing tier"""
861+
840862
unit_amount: Required[str]
841863
"""Amount per unit"""
842864

@@ -845,6 +867,8 @@ class ReplacePricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigTier(Type
845867

846868

847869
class ReplacePricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfig(TypedDict, total=False):
870+
"""Configuration for bulk_with_filters pricing"""
871+
848872
filters: Required[Iterable[ReplacePricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter]]
849873
"""Property filters to apply (all must match)"""
850874

@@ -939,6 +963,8 @@ class ReplacePricePriceNewPlanBulkWithFiltersPrice(TypedDict, total=False):
939963

940964

941965
class ReplacePricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier(TypedDict, total=False):
966+
"""Configuration for a single tiered with proration tier"""
967+
942968
tier_lower_bound: Required[str]
943969
"""Inclusive tier starting value"""
944970

@@ -947,6 +973,8 @@ class ReplacePricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigT
947973

948974

949975
class ReplacePricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfig(TypedDict, total=False):
976+
"""Configuration for tiered_with_proration pricing"""
977+
950978
tiers: Required[Iterable[ReplacePricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier]]
951979
"""
952980
Tiers for rating based on total usage quantities into the specified tier with
@@ -1041,6 +1069,8 @@ class ReplacePricePriceNewPlanTieredWithProrationPrice(TypedDict, total=False):
10411069

10421070

10431071
class ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig(TypedDict, total=False):
1072+
"""Configuration for grouped_with_min_max_thresholds pricing"""
1073+
10441074
grouping_key: Required[str]
10451075
"""The event property used to group before applying thresholds"""
10461076

@@ -1143,6 +1173,8 @@ class ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total=
11431173

11441174

11451175
class ReplacePricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig(TypedDict, total=False):
1176+
"""Configuration for cumulative_grouped_allocation pricing"""
1177+
11461178
cumulative_allocation: Required[str]
11471179
"""The overall allocation across all groups"""
11481180

@@ -1245,6 +1277,8 @@ class ReplacePricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total=
12451277

12461278

12471279
class ReplacePricePriceNewPlanPercentCompositePricePercentConfig(TypedDict, total=False):
1280+
"""Configuration for percent pricing"""
1281+
12481282
percent: Required[float]
12491283
"""What percent of the component subtotals to charge"""
12501284

@@ -1336,6 +1370,8 @@ class ReplacePricePriceNewPlanPercentCompositePrice(TypedDict, total=False):
13361370

13371371

13381372
class ReplacePricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total=False):
1373+
"""Configuration for event_output pricing"""
1374+
13391375
unit_rating_key: Required[str]
13401376
"""The key in the event data to extract the unit rate from."""
13411377

src/orb/types/beta_create_plan_version_params.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ class AddAdjustment(TypedDict, total=False):
140140

141141

142142
class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter(TypedDict, total=False):
143+
"""Configuration for a single property filter"""
144+
143145
property_key: Required[str]
144146
"""Event property key to filter on"""
145147

@@ -148,6 +150,8 @@ class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter(TypedD
148150

149151

150152
class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigTier(TypedDict, total=False):
153+
"""Configuration for a single bulk pricing tier"""
154+
151155
unit_amount: Required[str]
152156
"""Amount per unit"""
153157

@@ -156,6 +160,8 @@ class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigTier(TypedDic
156160

157161

158162
class AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfig(TypedDict, total=False):
163+
"""Configuration for bulk_with_filters pricing"""
164+
159165
filters: Required[Iterable[AddPricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter]]
160166
"""Property filters to apply (all must match)"""
161167

@@ -250,6 +256,8 @@ class AddPricePriceNewPlanBulkWithFiltersPrice(TypedDict, total=False):
250256

251257

252258
class AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier(TypedDict, total=False):
259+
"""Configuration for a single tiered with proration tier"""
260+
253261
tier_lower_bound: Required[str]
254262
"""Inclusive tier starting value"""
255263

@@ -258,6 +266,8 @@ class AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier(
258266

259267

260268
class AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfig(TypedDict, total=False):
269+
"""Configuration for tiered_with_proration pricing"""
270+
261271
tiers: Required[Iterable[AddPricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier]]
262272
"""
263273
Tiers for rating based on total usage quantities into the specified tier with
@@ -352,6 +362,8 @@ class AddPricePriceNewPlanTieredWithProrationPrice(TypedDict, total=False):
352362

353363

354364
class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig(TypedDict, total=False):
365+
"""Configuration for grouped_with_min_max_thresholds pricing"""
366+
355367
grouping_key: Required[str]
356368
"""The event property used to group before applying thresholds"""
357369

@@ -454,6 +466,8 @@ class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total=Fals
454466

455467

456468
class AddPricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig(TypedDict, total=False):
469+
"""Configuration for cumulative_grouped_allocation pricing"""
470+
457471
cumulative_allocation: Required[str]
458472
"""The overall allocation across all groups"""
459473

@@ -556,6 +570,8 @@ class AddPricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total=Fals
556570

557571

558572
class AddPricePriceNewPlanPercentCompositePricePercentConfig(TypedDict, total=False):
573+
"""Configuration for percent pricing"""
574+
559575
percent: Required[float]
560576
"""What percent of the component subtotals to charge"""
561577

@@ -647,6 +663,8 @@ class AddPricePriceNewPlanPercentCompositePrice(TypedDict, total=False):
647663

648664

649665
class AddPricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total=False):
666+
"""Configuration for event_output pricing"""
667+
650668
unit_rating_key: Required[str]
651669
"""The key in the event data to extract the unit rate from."""
652670

@@ -829,6 +847,8 @@ class ReplaceAdjustment(TypedDict, total=False):
829847

830848

831849
class ReplacePricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter(TypedDict, total=False):
850+
"""Configuration for a single property filter"""
851+
832852
property_key: Required[str]
833853
"""Event property key to filter on"""
834854

@@ -837,6 +857,8 @@ class ReplacePricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter(Ty
837857

838858

839859
class ReplacePricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigTier(TypedDict, total=False):
860+
"""Configuration for a single bulk pricing tier"""
861+
840862
unit_amount: Required[str]
841863
"""Amount per unit"""
842864

@@ -845,6 +867,8 @@ class ReplacePricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigTier(Type
845867

846868

847869
class ReplacePricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfig(TypedDict, total=False):
870+
"""Configuration for bulk_with_filters pricing"""
871+
848872
filters: Required[Iterable[ReplacePricePriceNewPlanBulkWithFiltersPriceBulkWithFiltersConfigFilter]]
849873
"""Property filters to apply (all must match)"""
850874

@@ -939,6 +963,8 @@ class ReplacePricePriceNewPlanBulkWithFiltersPrice(TypedDict, total=False):
939963

940964

941965
class ReplacePricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier(TypedDict, total=False):
966+
"""Configuration for a single tiered with proration tier"""
967+
942968
tier_lower_bound: Required[str]
943969
"""Inclusive tier starting value"""
944970

@@ -947,6 +973,8 @@ class ReplacePricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigT
947973

948974

949975
class ReplacePricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfig(TypedDict, total=False):
976+
"""Configuration for tiered_with_proration pricing"""
977+
950978
tiers: Required[Iterable[ReplacePricePriceNewPlanTieredWithProrationPriceTieredWithProrationConfigTier]]
951979
"""
952980
Tiers for rating based on total usage quantities into the specified tier with
@@ -1041,6 +1069,8 @@ class ReplacePricePriceNewPlanTieredWithProrationPrice(TypedDict, total=False):
10411069

10421070

10431071
class ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPriceGroupedWithMinMaxThresholdsConfig(TypedDict, total=False):
1072+
"""Configuration for grouped_with_min_max_thresholds pricing"""
1073+
10441074
grouping_key: Required[str]
10451075
"""The event property used to group before applying thresholds"""
10461076

@@ -1143,6 +1173,8 @@ class ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total=
11431173

11441174

11451175
class ReplacePricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig(TypedDict, total=False):
1176+
"""Configuration for cumulative_grouped_allocation pricing"""
1177+
11461178
cumulative_allocation: Required[str]
11471179
"""The overall allocation across all groups"""
11481180

@@ -1245,6 +1277,8 @@ class ReplacePricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total=
12451277

12461278

12471279
class ReplacePricePriceNewPlanPercentCompositePricePercentConfig(TypedDict, total=False):
1280+
"""Configuration for percent pricing"""
1281+
12481282
percent: Required[float]
12491283
"""What percent of the component subtotals to charge"""
12501284

@@ -1336,6 +1370,8 @@ class ReplacePricePriceNewPlanPercentCompositePrice(TypedDict, total=False):
13361370

13371371

13381372
class ReplacePricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total=False):
1373+
"""Configuration for event_output pricing"""
1374+
13391375
unit_rating_key: Required[str]
13401376
"""The key in the event data to extract the unit rate from."""
13411377

src/orb/types/billable_metric.py

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

1111

1212
class BillableMetric(BaseModel):
13+
"""
14+
The Metric resource represents a calculation of a quantity based on events.
15+
Metrics are defined by the query that transforms raw usage events into meaningful values for your customers.
16+
"""
17+
1318
id: str
1419

1520
description: Optional[str] = None

src/orb/types/coupon.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515

1616

1717
class Coupon(BaseModel):
18+
"""
19+
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.
20+
"""
21+
1822
id: str
1923
"""Also referred to as coupon_id in this documentation."""
2024

0 commit comments

Comments
 (0)