|
5 | 5 | from typing import Dict, Union, Iterable, Optional |
6 | 6 | from typing_extensions import Literal, Required, TypeAlias, TypedDict |
7 | 7 |
|
| 8 | +from ..._types import SequenceNotStr |
8 | 9 | from ..shared_params.new_maximum import NewMaximum |
9 | 10 | from ..shared_params.new_minimum import NewMinimum |
10 | 11 | from ..shared_params.unit_config import UnitConfig |
|
68 | 69 | "AddPricePriceNewPlanCumulativeGroupedAllocationPrice", |
69 | 70 | "AddPricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", |
70 | 71 | "AddPricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig", |
| 72 | + "AddPricePriceNewPlanDailyCreditAllowancePrice", |
| 73 | + "AddPricePriceNewPlanDailyCreditAllowancePriceDailyCreditAllowanceConfig", |
| 74 | + "AddPricePriceNewPlanDailyCreditAllowancePriceDailyCreditAllowanceConfigMatrixValue", |
| 75 | + "AddPricePriceNewPlanDailyCreditAllowancePriceConversionRateConfig", |
71 | 76 | "AddPricePriceNewPlanPercentCompositePrice", |
72 | 77 | "AddPricePriceNewPlanPercentCompositePricePercentConfig", |
73 | 78 | "AddPricePriceNewPlanPercentCompositePriceConversionRateConfig", |
|
98 | 103 | "ReplacePricePriceNewPlanCumulativeGroupedAllocationPrice", |
99 | 104 | "ReplacePricePriceNewPlanCumulativeGroupedAllocationPriceCumulativeGroupedAllocationConfig", |
100 | 105 | "ReplacePricePriceNewPlanCumulativeGroupedAllocationPriceConversionRateConfig", |
| 106 | + "ReplacePricePriceNewPlanDailyCreditAllowancePrice", |
| 107 | + "ReplacePricePriceNewPlanDailyCreditAllowancePriceDailyCreditAllowanceConfig", |
| 108 | + "ReplacePricePriceNewPlanDailyCreditAllowancePriceDailyCreditAllowanceConfigMatrixValue", |
| 109 | + "ReplacePricePriceNewPlanDailyCreditAllowancePriceConversionRateConfig", |
101 | 110 | "ReplacePricePriceNewPlanPercentCompositePrice", |
102 | 111 | "ReplacePricePriceNewPlanPercentCompositePricePercentConfig", |
103 | 112 | "ReplacePricePriceNewPlanPercentCompositePriceConversionRateConfig", |
@@ -697,6 +706,137 @@ class AddPricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total=Fals |
697 | 706 | """ |
698 | 707 |
|
699 | 708 |
|
| 709 | +class AddPricePriceNewPlanDailyCreditAllowancePriceDailyCreditAllowanceConfigMatrixValue(TypedDict, total=False): |
| 710 | + """Per-dimension credit price for the daily credit allowance model.""" |
| 711 | + |
| 712 | + dimension_values: Required[SequenceNotStr[Optional[str]]] |
| 713 | + """One or two matrix keys to filter usage to this value by. |
| 714 | +
|
| 715 | + For example, ["model"] could be used to apply a different credit rate to each AI |
| 716 | + model. |
| 717 | + """ |
| 718 | + |
| 719 | + unit_amount: Required[str] |
| 720 | + """Credits charged per unit of usage matching the specified dimension_values""" |
| 721 | + |
| 722 | + |
| 723 | +class AddPricePriceNewPlanDailyCreditAllowancePriceDailyCreditAllowanceConfig(TypedDict, total=False): |
| 724 | + """Configuration for daily_credit_allowance pricing""" |
| 725 | + |
| 726 | + daily_allowance: Required[str] |
| 727 | + """Credits granted per day. Lose-it-or-use-it; does not roll over.""" |
| 728 | + |
| 729 | + default_unit_amount: Required[str] |
| 730 | + """ |
| 731 | + Default per-unit credit rate for any usage not bucketed into a specified |
| 732 | + matrix_value |
| 733 | + """ |
| 734 | + |
| 735 | + dimensions: Required[SequenceNotStr[Optional[str]]] |
| 736 | + """One or two event property values to evaluate matrix groups by""" |
| 737 | + |
| 738 | + event_day_property: Required[str] |
| 739 | + """Event property whose value identifies the day bucket the event belongs to (e.g. |
| 740 | +
|
| 741 | + 'event_day' set to an ISO date string in the customer's timezone). The allowance |
| 742 | + resets per distinct value of this property. |
| 743 | + """ |
| 744 | + |
| 745 | + matrix_values: Required[ |
| 746 | + Iterable[AddPricePriceNewPlanDailyCreditAllowancePriceDailyCreditAllowanceConfigMatrixValue] |
| 747 | + ] |
| 748 | + """Per-dimension credit rates""" |
| 749 | + |
| 750 | + |
| 751 | +AddPricePriceNewPlanDailyCreditAllowancePriceConversionRateConfig: TypeAlias = Union[ |
| 752 | + UnitConversionRateConfig, TieredConversionRateConfig |
| 753 | +] |
| 754 | + |
| 755 | + |
| 756 | +class AddPricePriceNewPlanDailyCreditAllowancePrice(TypedDict, total=False): |
| 757 | + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] |
| 758 | + """The cadence to bill for this price on.""" |
| 759 | + |
| 760 | + daily_credit_allowance_config: Required[AddPricePriceNewPlanDailyCreditAllowancePriceDailyCreditAllowanceConfig] |
| 761 | + """Configuration for daily_credit_allowance pricing""" |
| 762 | + |
| 763 | + item_id: Required[str] |
| 764 | + """The id of the item the price will be associated with.""" |
| 765 | + |
| 766 | + model_type: Required[Literal["daily_credit_allowance"]] |
| 767 | + """The pricing model type""" |
| 768 | + |
| 769 | + name: Required[str] |
| 770 | + """The name of the price.""" |
| 771 | + |
| 772 | + billable_metric_id: Optional[str] |
| 773 | + """The id of the billable metric for the price. |
| 774 | +
|
| 775 | + Only needed if the price is usage-based. |
| 776 | + """ |
| 777 | + |
| 778 | + billed_in_advance: Optional[bool] |
| 779 | + """ |
| 780 | + If the Price represents a fixed cost, the price will be billed in-advance if |
| 781 | + this is true, and in-arrears if this is false. |
| 782 | + """ |
| 783 | + |
| 784 | + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] |
| 785 | + """ |
| 786 | + For custom cadence: specifies the duration of the billing period in days or |
| 787 | + months. |
| 788 | + """ |
| 789 | + |
| 790 | + conversion_rate: Optional[float] |
| 791 | + """The per unit conversion rate of the price currency to the invoicing currency.""" |
| 792 | + |
| 793 | + conversion_rate_config: Optional[AddPricePriceNewPlanDailyCreditAllowancePriceConversionRateConfig] |
| 794 | + """The configuration for the rate of the price currency to the invoicing currency.""" |
| 795 | + |
| 796 | + currency: Optional[str] |
| 797 | + """ |
| 798 | + An ISO 4217 currency string, or custom pricing unit identifier, in which this |
| 799 | + price is billed. |
| 800 | + """ |
| 801 | + |
| 802 | + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] |
| 803 | + """For dimensional price: specifies a price group and dimension values""" |
| 804 | + |
| 805 | + external_price_id: Optional[str] |
| 806 | + """An alias for the price.""" |
| 807 | + |
| 808 | + fixed_price_quantity: Optional[float] |
| 809 | + """ |
| 810 | + If the Price represents a fixed cost, this represents the quantity of units |
| 811 | + applied. |
| 812 | + """ |
| 813 | + |
| 814 | + invoice_grouping_key: Optional[str] |
| 815 | + """The property used to group this price on an invoice""" |
| 816 | + |
| 817 | + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] |
| 818 | + """Within each billing cycle, specifies the cadence at which invoices are produced. |
| 819 | +
|
| 820 | + If unspecified, a single invoice is produced per billing cycle. |
| 821 | + """ |
| 822 | + |
| 823 | + license_type_id: Optional[str] |
| 824 | + """The ID of the license type to associate with this price.""" |
| 825 | + |
| 826 | + metadata: Optional[Dict[str, Optional[str]]] |
| 827 | + """User-specified key/value pairs for the resource. |
| 828 | +
|
| 829 | + Individual keys can be removed by setting the value to `null`, and the entire |
| 830 | + metadata mapping can be cleared by setting `metadata` to `null`. |
| 831 | + """ |
| 832 | + |
| 833 | + reference_id: Optional[str] |
| 834 | + """ |
| 835 | + A transient ID that can be used to reference this price when adding adjustments |
| 836 | + in the same API call. |
| 837 | + """ |
| 838 | + |
| 839 | + |
700 | 840 | class AddPricePriceNewPlanPercentCompositePricePercentConfig(TypedDict, total=False): |
701 | 841 | """Configuration for percent pricing""" |
702 | 842 |
|
@@ -931,6 +1071,7 @@ class AddPricePriceNewPlanEventOutputPrice(TypedDict, total=False): |
931 | 1071 | NewPlanScalableMatrixWithTieredPricingPrice, |
932 | 1072 | NewPlanCumulativeGroupedBulkPrice, |
933 | 1073 | AddPricePriceNewPlanCumulativeGroupedAllocationPrice, |
| 1074 | + AddPricePriceNewPlanDailyCreditAllowancePrice, |
934 | 1075 | NewPlanMinimumCompositePrice, |
935 | 1076 | AddPricePriceNewPlanPercentCompositePrice, |
936 | 1077 | AddPricePriceNewPlanEventOutputPrice, |
@@ -1534,6 +1675,137 @@ class ReplacePricePriceNewPlanCumulativeGroupedAllocationPrice(TypedDict, total= |
1534 | 1675 | """ |
1535 | 1676 |
|
1536 | 1677 |
|
| 1678 | +class ReplacePricePriceNewPlanDailyCreditAllowancePriceDailyCreditAllowanceConfigMatrixValue(TypedDict, total=False): |
| 1679 | + """Per-dimension credit price for the daily credit allowance model.""" |
| 1680 | + |
| 1681 | + dimension_values: Required[SequenceNotStr[Optional[str]]] |
| 1682 | + """One or two matrix keys to filter usage to this value by. |
| 1683 | +
|
| 1684 | + For example, ["model"] could be used to apply a different credit rate to each AI |
| 1685 | + model. |
| 1686 | + """ |
| 1687 | + |
| 1688 | + unit_amount: Required[str] |
| 1689 | + """Credits charged per unit of usage matching the specified dimension_values""" |
| 1690 | + |
| 1691 | + |
| 1692 | +class ReplacePricePriceNewPlanDailyCreditAllowancePriceDailyCreditAllowanceConfig(TypedDict, total=False): |
| 1693 | + """Configuration for daily_credit_allowance pricing""" |
| 1694 | + |
| 1695 | + daily_allowance: Required[str] |
| 1696 | + """Credits granted per day. Lose-it-or-use-it; does not roll over.""" |
| 1697 | + |
| 1698 | + default_unit_amount: Required[str] |
| 1699 | + """ |
| 1700 | + Default per-unit credit rate for any usage not bucketed into a specified |
| 1701 | + matrix_value |
| 1702 | + """ |
| 1703 | + |
| 1704 | + dimensions: Required[SequenceNotStr[Optional[str]]] |
| 1705 | + """One or two event property values to evaluate matrix groups by""" |
| 1706 | + |
| 1707 | + event_day_property: Required[str] |
| 1708 | + """Event property whose value identifies the day bucket the event belongs to (e.g. |
| 1709 | +
|
| 1710 | + 'event_day' set to an ISO date string in the customer's timezone). The allowance |
| 1711 | + resets per distinct value of this property. |
| 1712 | + """ |
| 1713 | + |
| 1714 | + matrix_values: Required[ |
| 1715 | + Iterable[ReplacePricePriceNewPlanDailyCreditAllowancePriceDailyCreditAllowanceConfigMatrixValue] |
| 1716 | + ] |
| 1717 | + """Per-dimension credit rates""" |
| 1718 | + |
| 1719 | + |
| 1720 | +ReplacePricePriceNewPlanDailyCreditAllowancePriceConversionRateConfig: TypeAlias = Union[ |
| 1721 | + UnitConversionRateConfig, TieredConversionRateConfig |
| 1722 | +] |
| 1723 | + |
| 1724 | + |
| 1725 | +class ReplacePricePriceNewPlanDailyCreditAllowancePrice(TypedDict, total=False): |
| 1726 | + cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]] |
| 1727 | + """The cadence to bill for this price on.""" |
| 1728 | + |
| 1729 | + daily_credit_allowance_config: Required[ReplacePricePriceNewPlanDailyCreditAllowancePriceDailyCreditAllowanceConfig] |
| 1730 | + """Configuration for daily_credit_allowance pricing""" |
| 1731 | + |
| 1732 | + item_id: Required[str] |
| 1733 | + """The id of the item the price will be associated with.""" |
| 1734 | + |
| 1735 | + model_type: Required[Literal["daily_credit_allowance"]] |
| 1736 | + """The pricing model type""" |
| 1737 | + |
| 1738 | + name: Required[str] |
| 1739 | + """The name of the price.""" |
| 1740 | + |
| 1741 | + billable_metric_id: Optional[str] |
| 1742 | + """The id of the billable metric for the price. |
| 1743 | +
|
| 1744 | + Only needed if the price is usage-based. |
| 1745 | + """ |
| 1746 | + |
| 1747 | + billed_in_advance: Optional[bool] |
| 1748 | + """ |
| 1749 | + If the Price represents a fixed cost, the price will be billed in-advance if |
| 1750 | + this is true, and in-arrears if this is false. |
| 1751 | + """ |
| 1752 | + |
| 1753 | + billing_cycle_configuration: Optional[NewBillingCycleConfiguration] |
| 1754 | + """ |
| 1755 | + For custom cadence: specifies the duration of the billing period in days or |
| 1756 | + months. |
| 1757 | + """ |
| 1758 | + |
| 1759 | + conversion_rate: Optional[float] |
| 1760 | + """The per unit conversion rate of the price currency to the invoicing currency.""" |
| 1761 | + |
| 1762 | + conversion_rate_config: Optional[ReplacePricePriceNewPlanDailyCreditAllowancePriceConversionRateConfig] |
| 1763 | + """The configuration for the rate of the price currency to the invoicing currency.""" |
| 1764 | + |
| 1765 | + currency: Optional[str] |
| 1766 | + """ |
| 1767 | + An ISO 4217 currency string, or custom pricing unit identifier, in which this |
| 1768 | + price is billed. |
| 1769 | + """ |
| 1770 | + |
| 1771 | + dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] |
| 1772 | + """For dimensional price: specifies a price group and dimension values""" |
| 1773 | + |
| 1774 | + external_price_id: Optional[str] |
| 1775 | + """An alias for the price.""" |
| 1776 | + |
| 1777 | + fixed_price_quantity: Optional[float] |
| 1778 | + """ |
| 1779 | + If the Price represents a fixed cost, this represents the quantity of units |
| 1780 | + applied. |
| 1781 | + """ |
| 1782 | + |
| 1783 | + invoice_grouping_key: Optional[str] |
| 1784 | + """The property used to group this price on an invoice""" |
| 1785 | + |
| 1786 | + invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] |
| 1787 | + """Within each billing cycle, specifies the cadence at which invoices are produced. |
| 1788 | +
|
| 1789 | + If unspecified, a single invoice is produced per billing cycle. |
| 1790 | + """ |
| 1791 | + |
| 1792 | + license_type_id: Optional[str] |
| 1793 | + """The ID of the license type to associate with this price.""" |
| 1794 | + |
| 1795 | + metadata: Optional[Dict[str, Optional[str]]] |
| 1796 | + """User-specified key/value pairs for the resource. |
| 1797 | +
|
| 1798 | + Individual keys can be removed by setting the value to `null`, and the entire |
| 1799 | + metadata mapping can be cleared by setting `metadata` to `null`. |
| 1800 | + """ |
| 1801 | + |
| 1802 | + reference_id: Optional[str] |
| 1803 | + """ |
| 1804 | + A transient ID that can be used to reference this price when adding adjustments |
| 1805 | + in the same API call. |
| 1806 | + """ |
| 1807 | + |
| 1808 | + |
1537 | 1809 | class ReplacePricePriceNewPlanPercentCompositePricePercentConfig(TypedDict, total=False): |
1538 | 1810 | """Configuration for percent pricing""" |
1539 | 1811 |
|
@@ -1768,6 +2040,7 @@ class ReplacePricePriceNewPlanEventOutputPrice(TypedDict, total=False): |
1768 | 2040 | NewPlanScalableMatrixWithTieredPricingPrice, |
1769 | 2041 | NewPlanCumulativeGroupedBulkPrice, |
1770 | 2042 | ReplacePricePriceNewPlanCumulativeGroupedAllocationPrice, |
| 2043 | + ReplacePricePriceNewPlanDailyCreditAllowancePrice, |
1771 | 2044 | NewPlanMinimumCompositePrice, |
1772 | 2045 | ReplacePricePriceNewPlanPercentCompositePrice, |
1773 | 2046 | ReplacePricePriceNewPlanEventOutputPrice, |
|
0 commit comments