@@ -1766,6 +1766,98 @@ def create(
1766
1766
"""
1767
1767
...
1768
1768
1769
+ @overload
1770
+ def create (
1771
+ self ,
1772
+ * ,
1773
+ cadence : Literal ["annual" , "semi_annual" , "monthly" , "quarterly" , "one_time" , "custom" ],
1774
+ currency : str ,
1775
+ grouped_with_prorated_minimum_config : Dict [str , object ],
1776
+ item_id : str ,
1777
+ model_type : Literal ["grouped_with_prorated_minimum" ],
1778
+ name : str ,
1779
+ billable_metric_id : Optional [str ] | NotGiven = NOT_GIVEN ,
1780
+ billed_in_advance : Optional [bool ] | NotGiven = NOT_GIVEN ,
1781
+ billing_cycle_configuration : Optional [
1782
+ price_create_params .NewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration
1783
+ ]
1784
+ | NotGiven = NOT_GIVEN ,
1785
+ conversion_rate : Optional [float ] | NotGiven = NOT_GIVEN ,
1786
+ external_price_id : Optional [str ] | NotGiven = NOT_GIVEN ,
1787
+ fixed_price_quantity : Optional [float ] | NotGiven = NOT_GIVEN ,
1788
+ invoice_grouping_key : Optional [str ] | NotGiven = NOT_GIVEN ,
1789
+ invoicing_cycle_configuration : Optional [
1790
+ price_create_params .NewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration
1791
+ ]
1792
+ | NotGiven = NOT_GIVEN ,
1793
+ metadata : Optional [Dict [str , Optional [str ]]] | NotGiven = NOT_GIVEN ,
1794
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1795
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1796
+ extra_headers : Headers | None = None ,
1797
+ extra_query : Query | None = None ,
1798
+ extra_body : Body | None = None ,
1799
+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1800
+ idempotency_key : str | None = None ,
1801
+ ) -> Price :
1802
+ """This endpoint is used to create a [price](../reference/price).
1803
+
1804
+ A price created
1805
+ using this endpoint is always an add-on, meaning that it’s not associated with a
1806
+ specific plan and can instead be individually added to subscriptions, including
1807
+ subscriptions on different plans.
1808
+
1809
+ An `external_price_id` can be optionally specified as an alias to allow
1810
+ ergonomic interaction with prices in the Orb API.
1811
+
1812
+ See the [Price resource](../reference/price) for the specification of different
1813
+ price model configurations possible in this endpoint.
1814
+
1815
+ Args:
1816
+ cadence: The cadence to bill for this price on.
1817
+
1818
+ currency: An ISO 4217 currency string for which this price is billed in.
1819
+
1820
+ item_id: The id of the item the plan will be associated with.
1821
+
1822
+ name: The name of the price.
1823
+
1824
+ billable_metric_id: The id of the billable metric for the price. Only needed if the price is
1825
+ usage-based.
1826
+
1827
+ billed_in_advance: If the Price represents a fixed cost, the price will be billed in-advance if
1828
+ this is true, and in-arrears if this is false.
1829
+
1830
+ billing_cycle_configuration: For custom cadence: specifies the duration of the billing period in days or
1831
+ months.
1832
+
1833
+ conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
1834
+
1835
+ external_price_id: An alias for the price.
1836
+
1837
+ fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units
1838
+ applied.
1839
+
1840
+ invoice_grouping_key: The property used to group this price on an invoice
1841
+
1842
+ invoicing_cycle_configuration: Within each billing cycle, specifies the cadence at which invoices are produced.
1843
+ If unspecified, a single invoice is produced per billing cycle.
1844
+
1845
+ metadata: User-specified key/value pairs for the resource. Individual keys can be removed
1846
+ by setting the value to `null`, and the entire metadata mapping can be cleared
1847
+ by setting `metadata` to `null`.
1848
+
1849
+ extra_headers: Send extra headers
1850
+
1851
+ extra_query: Add additional query parameters to the request
1852
+
1853
+ extra_body: Add additional JSON properties to the request
1854
+
1855
+ timeout: Override the client-level default timeout for this request, in seconds
1856
+
1857
+ idempotency_key: Specify a custom idempotency key for this request
1858
+ """
1859
+ ...
1860
+
1769
1861
@overload
1770
1862
def create (
1771
1863
self ,
@@ -1878,6 +1970,7 @@ def create(
1878
1970
["cadence" , "currency" , "item_id" , "model_type" , "name" , "tiered_with_proration_config" ],
1879
1971
["cadence" , "currency" , "item_id" , "model_type" , "name" , "unit_with_proration_config" ],
1880
1972
["cadence" , "currency" , "grouped_allocation_config" , "item_id" , "model_type" , "name" ],
1973
+ ["cadence" , "currency" , "grouped_with_prorated_minimum_config" , "item_id" , "model_type" , "name" ],
1881
1974
["bulk_with_proration_config" , "cadence" , "currency" , "item_id" , "model_type" , "name" ],
1882
1975
)
1883
1976
def create (
@@ -1905,6 +1998,7 @@ def create(
1905
1998
| Literal ["tiered_with_proration" ]
1906
1999
| Literal ["unit_with_proration" ]
1907
2000
| Literal ["grouped_allocation" ]
2001
+ | Literal ["grouped_with_prorated_minimum" ]
1908
2002
| Literal ["bulk_with_proration" ],
1909
2003
name : str ,
1910
2004
unit_config : price_create_params .NewFloatingUnitPriceUnitConfig | NotGiven = NOT_GIVEN ,
@@ -1938,6 +2032,7 @@ def create(
1938
2032
tiered_with_proration_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
1939
2033
unit_with_proration_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
1940
2034
grouped_allocation_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
2035
+ grouped_with_prorated_minimum_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
1941
2036
bulk_with_proration_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
1942
2037
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1943
2038
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1986,6 +2081,7 @@ def create(
1986
2081
"tiered_with_proration_config" : tiered_with_proration_config ,
1987
2082
"unit_with_proration_config" : unit_with_proration_config ,
1988
2083
"grouped_allocation_config" : grouped_allocation_config ,
2084
+ "grouped_with_prorated_minimum_config" : grouped_with_prorated_minimum_config ,
1989
2085
"bulk_with_proration_config" : bulk_with_proration_config ,
1990
2086
},
1991
2087
price_create_params .PriceCreateParams ,
@@ -3963,6 +4059,98 @@ async def create(
3963
4059
"""
3964
4060
...
3965
4061
4062
+ @overload
4063
+ async def create (
4064
+ self ,
4065
+ * ,
4066
+ cadence : Literal ["annual" , "semi_annual" , "monthly" , "quarterly" , "one_time" , "custom" ],
4067
+ currency : str ,
4068
+ grouped_with_prorated_minimum_config : Dict [str , object ],
4069
+ item_id : str ,
4070
+ model_type : Literal ["grouped_with_prorated_minimum" ],
4071
+ name : str ,
4072
+ billable_metric_id : Optional [str ] | NotGiven = NOT_GIVEN ,
4073
+ billed_in_advance : Optional [bool ] | NotGiven = NOT_GIVEN ,
4074
+ billing_cycle_configuration : Optional [
4075
+ price_create_params .NewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration
4076
+ ]
4077
+ | NotGiven = NOT_GIVEN ,
4078
+ conversion_rate : Optional [float ] | NotGiven = NOT_GIVEN ,
4079
+ external_price_id : Optional [str ] | NotGiven = NOT_GIVEN ,
4080
+ fixed_price_quantity : Optional [float ] | NotGiven = NOT_GIVEN ,
4081
+ invoice_grouping_key : Optional [str ] | NotGiven = NOT_GIVEN ,
4082
+ invoicing_cycle_configuration : Optional [
4083
+ price_create_params .NewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration
4084
+ ]
4085
+ | NotGiven = NOT_GIVEN ,
4086
+ metadata : Optional [Dict [str , Optional [str ]]] | NotGiven = NOT_GIVEN ,
4087
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
4088
+ # The extra values given here take precedence over values defined on the client or passed to this method.
4089
+ extra_headers : Headers | None = None ,
4090
+ extra_query : Query | None = None ,
4091
+ extra_body : Body | None = None ,
4092
+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
4093
+ idempotency_key : str | None = None ,
4094
+ ) -> Price :
4095
+ """This endpoint is used to create a [price](../reference/price).
4096
+
4097
+ A price created
4098
+ using this endpoint is always an add-on, meaning that it’s not associated with a
4099
+ specific plan and can instead be individually added to subscriptions, including
4100
+ subscriptions on different plans.
4101
+
4102
+ An `external_price_id` can be optionally specified as an alias to allow
4103
+ ergonomic interaction with prices in the Orb API.
4104
+
4105
+ See the [Price resource](../reference/price) for the specification of different
4106
+ price model configurations possible in this endpoint.
4107
+
4108
+ Args:
4109
+ cadence: The cadence to bill for this price on.
4110
+
4111
+ currency: An ISO 4217 currency string for which this price is billed in.
4112
+
4113
+ item_id: The id of the item the plan will be associated with.
4114
+
4115
+ name: The name of the price.
4116
+
4117
+ billable_metric_id: The id of the billable metric for the price. Only needed if the price is
4118
+ usage-based.
4119
+
4120
+ billed_in_advance: If the Price represents a fixed cost, the price will be billed in-advance if
4121
+ this is true, and in-arrears if this is false.
4122
+
4123
+ billing_cycle_configuration: For custom cadence: specifies the duration of the billing period in days or
4124
+ months.
4125
+
4126
+ conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
4127
+
4128
+ external_price_id: An alias for the price.
4129
+
4130
+ fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units
4131
+ applied.
4132
+
4133
+ invoice_grouping_key: The property used to group this price on an invoice
4134
+
4135
+ invoicing_cycle_configuration: Within each billing cycle, specifies the cadence at which invoices are produced.
4136
+ If unspecified, a single invoice is produced per billing cycle.
4137
+
4138
+ metadata: User-specified key/value pairs for the resource. Individual keys can be removed
4139
+ by setting the value to `null`, and the entire metadata mapping can be cleared
4140
+ by setting `metadata` to `null`.
4141
+
4142
+ extra_headers: Send extra headers
4143
+
4144
+ extra_query: Add additional query parameters to the request
4145
+
4146
+ extra_body: Add additional JSON properties to the request
4147
+
4148
+ timeout: Override the client-level default timeout for this request, in seconds
4149
+
4150
+ idempotency_key: Specify a custom idempotency key for this request
4151
+ """
4152
+ ...
4153
+
3966
4154
@overload
3967
4155
async def create (
3968
4156
self ,
@@ -4075,6 +4263,7 @@ async def create(
4075
4263
["cadence" , "currency" , "item_id" , "model_type" , "name" , "tiered_with_proration_config" ],
4076
4264
["cadence" , "currency" , "item_id" , "model_type" , "name" , "unit_with_proration_config" ],
4077
4265
["cadence" , "currency" , "grouped_allocation_config" , "item_id" , "model_type" , "name" ],
4266
+ ["cadence" , "currency" , "grouped_with_prorated_minimum_config" , "item_id" , "model_type" , "name" ],
4078
4267
["bulk_with_proration_config" , "cadence" , "currency" , "item_id" , "model_type" , "name" ],
4079
4268
)
4080
4269
async def create (
@@ -4102,6 +4291,7 @@ async def create(
4102
4291
| Literal ["tiered_with_proration" ]
4103
4292
| Literal ["unit_with_proration" ]
4104
4293
| Literal ["grouped_allocation" ]
4294
+ | Literal ["grouped_with_prorated_minimum" ]
4105
4295
| Literal ["bulk_with_proration" ],
4106
4296
name : str ,
4107
4297
unit_config : price_create_params .NewFloatingUnitPriceUnitConfig | NotGiven = NOT_GIVEN ,
@@ -4135,6 +4325,7 @@ async def create(
4135
4325
tiered_with_proration_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
4136
4326
unit_with_proration_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
4137
4327
grouped_allocation_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
4328
+ grouped_with_prorated_minimum_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
4138
4329
bulk_with_proration_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
4139
4330
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
4140
4331
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -4183,6 +4374,7 @@ async def create(
4183
4374
"tiered_with_proration_config" : tiered_with_proration_config ,
4184
4375
"unit_with_proration_config" : unit_with_proration_config ,
4185
4376
"grouped_allocation_config" : grouped_allocation_config ,
4377
+ "grouped_with_prorated_minimum_config" : grouped_with_prorated_minimum_config ,
4186
4378
"bulk_with_proration_config" : bulk_with_proration_config ,
4187
4379
},
4188
4380
price_create_params .PriceCreateParams ,
0 commit comments