Skip to content

Commit 4c257a6

Browse files
feat(api): api update
1 parent 591ca2a commit 4c257a6

13 files changed

+2264
-233
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: 118
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-ee9adb19e1aafbee7edb5b95348a1629c1de6ca9625f3b49f6064ae10d863bfc.yml
3-
openapi_spec_hash: 42006f5fb95364855be09dc4432073c0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d0eaf664d43e26c42ebf8740ff1b6ee34c4d424c7048a7f04df994cb65627f89.yml
3+
openapi_spec_hash: 4d7622040380d5c7bd2e5a5ec9b86783
44
config_hash: 1f73a949b649ecfe6ec68ba1bb459dc2

src/orb/resources/prices/prices.py

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,102 @@ def create(
357357
"""
358358
...
359359

360+
@overload
361+
def create(
362+
self,
363+
*,
364+
bulk_with_filters_config: price_create_params.NewFloatingBulkWithFiltersPriceBulkWithFiltersConfig,
365+
cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"],
366+
currency: str,
367+
item_id: str,
368+
model_type: Literal["bulk_with_filters"],
369+
name: str,
370+
billable_metric_id: Optional[str] | Omit = omit,
371+
billed_in_advance: Optional[bool] | Omit = omit,
372+
billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | Omit = omit,
373+
conversion_rate: Optional[float] | Omit = omit,
374+
conversion_rate_config: Optional[price_create_params.NewFloatingBulkWithFiltersPriceConversionRateConfig]
375+
| Omit = omit,
376+
dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | Omit = omit,
377+
external_price_id: Optional[str] | Omit = omit,
378+
fixed_price_quantity: Optional[float] | Omit = omit,
379+
invoice_grouping_key: Optional[str] | Omit = omit,
380+
invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | Omit = omit,
381+
metadata: Optional[Dict[str, Optional[str]]] | Omit = omit,
382+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
383+
# The extra values given here take precedence over values defined on the client or passed to this method.
384+
extra_headers: Headers | None = None,
385+
extra_query: Query | None = None,
386+
extra_body: Body | None = None,
387+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
388+
idempotency_key: str | None = None,
389+
) -> Price:
390+
"""
391+
This endpoint is used to create a [price](/product-catalog/price-configuration).
392+
A price created using this endpoint is always an add-on, meaning that it's not
393+
associated with a specific plan and can instead be individually added to
394+
subscriptions, including subscriptions on different plans.
395+
396+
An `external_price_id` can be optionally specified as an alias to allow
397+
ergonomic interaction with prices in the Orb API.
398+
399+
See the [Price resource](/product-catalog/price-configuration) for the
400+
specification of different price model configurations possible in this endpoint.
401+
402+
Args:
403+
bulk_with_filters_config: Configuration for bulk_with_filters pricing
404+
405+
cadence: The cadence to bill for this price on.
406+
407+
currency: An ISO 4217 currency string for which this price is billed in.
408+
409+
item_id: The id of the item the price will be associated with.
410+
411+
model_type: The pricing model type
412+
413+
name: The name of the price.
414+
415+
billable_metric_id: The id of the billable metric for the price. Only needed if the price is
416+
usage-based.
417+
418+
billed_in_advance: If the Price represents a fixed cost, the price will be billed in-advance if
419+
this is true, and in-arrears if this is false.
420+
421+
billing_cycle_configuration: For custom cadence: specifies the duration of the billing period in days or
422+
months.
423+
424+
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
425+
426+
conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
427+
428+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
429+
430+
external_price_id: An alias for the price.
431+
432+
fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units
433+
applied.
434+
435+
invoice_grouping_key: The property used to group this price on an invoice
436+
437+
invoicing_cycle_configuration: Within each billing cycle, specifies the cadence at which invoices are produced.
438+
If unspecified, a single invoice is produced per billing cycle.
439+
440+
metadata: User-specified key/value pairs for the resource. Individual keys can be removed
441+
by setting the value to `null`, and the entire metadata mapping can be cleared
442+
by setting `metadata` to `null`.
443+
444+
extra_headers: Send extra headers
445+
446+
extra_query: Add additional query parameters to the request
447+
448+
extra_body: Add additional JSON properties to the request
449+
450+
timeout: Override the client-level default timeout for this request, in seconds
451+
452+
idempotency_key: Specify a custom idempotency key for this request
453+
"""
454+
...
455+
360456
@overload
361457
def create(
362458
self,
@@ -2867,6 +2963,7 @@ def create(
28672963
["cadence", "currency", "item_id", "model_type", "name", "unit_config"],
28682964
["cadence", "currency", "item_id", "model_type", "name", "tiered_config"],
28692965
["bulk_config", "cadence", "currency", "item_id", "model_type", "name"],
2966+
["bulk_with_filters_config", "cadence", "currency", "item_id", "model_type", "name"],
28702967
["cadence", "currency", "item_id", "model_type", "name", "package_config"],
28712968
["cadence", "currency", "item_id", "matrix_config", "model_type", "name"],
28722969
["cadence", "currency", "item_id", "model_type", "name", "threshold_total_amount_config"],
@@ -2903,6 +3000,7 @@ def create(
29033000
model_type: Literal["unit"]
29043001
| Literal["tiered"]
29053002
| Literal["bulk"]
3003+
| Literal["bulk_with_filters"]
29063004
| Literal["package"]
29073005
| Literal["matrix"]
29083006
| Literal["threshold_total_amount"]
@@ -2938,6 +3036,7 @@ def create(
29383036
conversion_rate_config: Optional[price_create_params.NewFloatingUnitPriceConversionRateConfig]
29393037
| Optional[price_create_params.NewFloatingTieredPriceConversionRateConfig]
29403038
| Optional[price_create_params.NewFloatingBulkPriceConversionRateConfig]
3039+
| Optional[price_create_params.NewFloatingBulkWithFiltersPriceConversionRateConfig]
29413040
| Optional[price_create_params.NewFloatingPackagePriceConversionRateConfig]
29423041
| Optional[price_create_params.NewFloatingMatrixPriceConversionRateConfig]
29433042
| Optional[price_create_params.NewFloatingThresholdTotalAmountPriceConversionRateConfig]
@@ -2973,6 +3072,8 @@ def create(
29733072
metadata: Optional[Dict[str, Optional[str]]] | Omit = omit,
29743073
tiered_config: TieredConfig | Omit = omit,
29753074
bulk_config: BulkConfig | Omit = omit,
3075+
bulk_with_filters_config: price_create_params.NewFloatingBulkWithFiltersPriceBulkWithFiltersConfig
3076+
| Omit = omit,
29763077
package_config: PackageConfig | Omit = omit,
29773078
matrix_config: MatrixConfig | Omit = omit,
29783079
threshold_total_amount_config: price_create_params.NewFloatingThresholdTotalAmountPriceThresholdTotalAmountConfig
@@ -3050,6 +3151,7 @@ def create(
30503151
"metadata": metadata,
30513152
"tiered_config": tiered_config,
30523153
"bulk_config": bulk_config,
3154+
"bulk_with_filters_config": bulk_with_filters_config,
30533155
"package_config": package_config,
30543156
"matrix_config": matrix_config,
30553157
"threshold_total_amount_config": threshold_total_amount_config,
@@ -3807,6 +3909,102 @@ async def create(
38073909
"""
38083910
...
38093911

3912+
@overload
3913+
async def create(
3914+
self,
3915+
*,
3916+
bulk_with_filters_config: price_create_params.NewFloatingBulkWithFiltersPriceBulkWithFiltersConfig,
3917+
cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"],
3918+
currency: str,
3919+
item_id: str,
3920+
model_type: Literal["bulk_with_filters"],
3921+
name: str,
3922+
billable_metric_id: Optional[str] | Omit = omit,
3923+
billed_in_advance: Optional[bool] | Omit = omit,
3924+
billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | Omit = omit,
3925+
conversion_rate: Optional[float] | Omit = omit,
3926+
conversion_rate_config: Optional[price_create_params.NewFloatingBulkWithFiltersPriceConversionRateConfig]
3927+
| Omit = omit,
3928+
dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | Omit = omit,
3929+
external_price_id: Optional[str] | Omit = omit,
3930+
fixed_price_quantity: Optional[float] | Omit = omit,
3931+
invoice_grouping_key: Optional[str] | Omit = omit,
3932+
invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | Omit = omit,
3933+
metadata: Optional[Dict[str, Optional[str]]] | Omit = omit,
3934+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
3935+
# The extra values given here take precedence over values defined on the client or passed to this method.
3936+
extra_headers: Headers | None = None,
3937+
extra_query: Query | None = None,
3938+
extra_body: Body | None = None,
3939+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
3940+
idempotency_key: str | None = None,
3941+
) -> Price:
3942+
"""
3943+
This endpoint is used to create a [price](/product-catalog/price-configuration).
3944+
A price created using this endpoint is always an add-on, meaning that it's not
3945+
associated with a specific plan and can instead be individually added to
3946+
subscriptions, including subscriptions on different plans.
3947+
3948+
An `external_price_id` can be optionally specified as an alias to allow
3949+
ergonomic interaction with prices in the Orb API.
3950+
3951+
See the [Price resource](/product-catalog/price-configuration) for the
3952+
specification of different price model configurations possible in this endpoint.
3953+
3954+
Args:
3955+
bulk_with_filters_config: Configuration for bulk_with_filters pricing
3956+
3957+
cadence: The cadence to bill for this price on.
3958+
3959+
currency: An ISO 4217 currency string for which this price is billed in.
3960+
3961+
item_id: The id of the item the price will be associated with.
3962+
3963+
model_type: The pricing model type
3964+
3965+
name: The name of the price.
3966+
3967+
billable_metric_id: The id of the billable metric for the price. Only needed if the price is
3968+
usage-based.
3969+
3970+
billed_in_advance: If the Price represents a fixed cost, the price will be billed in-advance if
3971+
this is true, and in-arrears if this is false.
3972+
3973+
billing_cycle_configuration: For custom cadence: specifies the duration of the billing period in days or
3974+
months.
3975+
3976+
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
3977+
3978+
conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
3979+
3980+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
3981+
3982+
external_price_id: An alias for the price.
3983+
3984+
fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units
3985+
applied.
3986+
3987+
invoice_grouping_key: The property used to group this price on an invoice
3988+
3989+
invoicing_cycle_configuration: Within each billing cycle, specifies the cadence at which invoices are produced.
3990+
If unspecified, a single invoice is produced per billing cycle.
3991+
3992+
metadata: User-specified key/value pairs for the resource. Individual keys can be removed
3993+
by setting the value to `null`, and the entire metadata mapping can be cleared
3994+
by setting `metadata` to `null`.
3995+
3996+
extra_headers: Send extra headers
3997+
3998+
extra_query: Add additional query parameters to the request
3999+
4000+
extra_body: Add additional JSON properties to the request
4001+
4002+
timeout: Override the client-level default timeout for this request, in seconds
4003+
4004+
idempotency_key: Specify a custom idempotency key for this request
4005+
"""
4006+
...
4007+
38104008
@overload
38114009
async def create(
38124010
self,
@@ -6317,6 +6515,7 @@ async def create(
63176515
["cadence", "currency", "item_id", "model_type", "name", "unit_config"],
63186516
["cadence", "currency", "item_id", "model_type", "name", "tiered_config"],
63196517
["bulk_config", "cadence", "currency", "item_id", "model_type", "name"],
6518+
["bulk_with_filters_config", "cadence", "currency", "item_id", "model_type", "name"],
63206519
["cadence", "currency", "item_id", "model_type", "name", "package_config"],
63216520
["cadence", "currency", "item_id", "matrix_config", "model_type", "name"],
63226521
["cadence", "currency", "item_id", "model_type", "name", "threshold_total_amount_config"],
@@ -6353,6 +6552,7 @@ async def create(
63536552
model_type: Literal["unit"]
63546553
| Literal["tiered"]
63556554
| Literal["bulk"]
6555+
| Literal["bulk_with_filters"]
63566556
| Literal["package"]
63576557
| Literal["matrix"]
63586558
| Literal["threshold_total_amount"]
@@ -6388,6 +6588,7 @@ async def create(
63886588
conversion_rate_config: Optional[price_create_params.NewFloatingUnitPriceConversionRateConfig]
63896589
| Optional[price_create_params.NewFloatingTieredPriceConversionRateConfig]
63906590
| Optional[price_create_params.NewFloatingBulkPriceConversionRateConfig]
6591+
| Optional[price_create_params.NewFloatingBulkWithFiltersPriceConversionRateConfig]
63916592
| Optional[price_create_params.NewFloatingPackagePriceConversionRateConfig]
63926593
| Optional[price_create_params.NewFloatingMatrixPriceConversionRateConfig]
63936594
| Optional[price_create_params.NewFloatingThresholdTotalAmountPriceConversionRateConfig]
@@ -6423,6 +6624,8 @@ async def create(
64236624
metadata: Optional[Dict[str, Optional[str]]] | Omit = omit,
64246625
tiered_config: TieredConfig | Omit = omit,
64256626
bulk_config: BulkConfig | Omit = omit,
6627+
bulk_with_filters_config: price_create_params.NewFloatingBulkWithFiltersPriceBulkWithFiltersConfig
6628+
| Omit = omit,
64266629
package_config: PackageConfig | Omit = omit,
64276630
matrix_config: MatrixConfig | Omit = omit,
64286631
threshold_total_amount_config: price_create_params.NewFloatingThresholdTotalAmountPriceThresholdTotalAmountConfig
@@ -6500,6 +6703,7 @@ async def create(
65006703
"metadata": metadata,
65016704
"tiered_config": tiered_config,
65026705
"bulk_config": bulk_config,
6706+
"bulk_with_filters_config": bulk_with_filters_config,
65036707
"package_config": package_config,
65046708
"matrix_config": matrix_config,
65056709
"threshold_total_amount_config": threshold_total_amount_config,

0 commit comments

Comments
 (0)