orb-billing 1.30.0 → 1.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +566 -6
  5. data/lib/orb/models/beta_create_plan_version_params.rb +566 -6
  6. data/lib/orb/models/changed_subscription_resources.rb +3 -2
  7. data/lib/orb/models/customers/balance_transaction_create_response.rb +1 -0
  8. data/lib/orb/models/customers/balance_transaction_list_response.rb +1 -0
  9. data/lib/orb/models/invoice.rb +3 -2
  10. data/lib/orb/models/invoice_fetch_upcoming_response.rb +3 -2
  11. data/lib/orb/models/invoice_issue_summary_response.rb +1 -0
  12. data/lib/orb/models/invoice_line_item_create_response.rb +2 -2
  13. data/lib/orb/models/invoice_list_summary_response.rb +1 -0
  14. data/lib/orb/models/per_price_cost.rb +2 -2
  15. data/lib/orb/models/plan.rb +2 -2
  16. data/lib/orb/models/plan_create_params.rb +278 -3
  17. data/lib/orb/models/plan_version.rb +2 -2
  18. data/lib/orb/models/price.rb +450 -1
  19. data/lib/orb/models/price_create_params.rb +263 -3
  20. data/lib/orb/models/price_evaluate_multiple_params.rb +273 -3
  21. data/lib/orb/models/price_evaluate_preview_events_params.rb +273 -3
  22. data/lib/orb/models/price_interval.rb +2 -2
  23. data/lib/orb/models/subscription_create_params.rb +566 -6
  24. data/lib/orb/models/subscription_price_intervals_params.rb +273 -3
  25. data/lib/orb/models/subscription_schedule_plan_change_params.rb +566 -6
  26. data/lib/orb/resources/prices/external_price_id.rb +2 -2
  27. data/lib/orb/resources/prices.rb +5 -5
  28. data/lib/orb/version.rb +1 -1
  29. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +2737 -1811
  30. data/rbi/orb/models/beta_create_plan_version_params.rbi +2745 -1819
  31. data/rbi/orb/models/changed_subscription_resources.rbi +6 -0
  32. data/rbi/orb/models/customers/balance_transaction_create_response.rbi +5 -0
  33. data/rbi/orb/models/customers/balance_transaction_list_response.rbi +5 -0
  34. data/rbi/orb/models/invoice.rbi +6 -0
  35. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +6 -0
  36. data/rbi/orb/models/invoice_issue_summary_response.rbi +5 -0
  37. data/rbi/orb/models/invoice_line_item_create_response.rbi +1 -0
  38. data/rbi/orb/models/invoice_list_summary_response.rbi +5 -0
  39. data/rbi/orb/models/per_price_cost.rbi +1 -0
  40. data/rbi/orb/models/plan.rbi +1 -0
  41. data/rbi/orb/models/plan_create_params.rbi +463 -0
  42. data/rbi/orb/models/plan_version.rbi +1 -0
  43. data/rbi/orb/models/price.rbi +805 -0
  44. data/rbi/orb/models/price_create_params.rbi +451 -0
  45. data/rbi/orb/models/price_evaluate_multiple_params.rbi +451 -0
  46. data/rbi/orb/models/price_evaluate_preview_events_params.rbi +451 -0
  47. data/rbi/orb/models/price_interval.rbi +1 -0
  48. data/rbi/orb/models/subscription_create_params.rbi +2660 -1734
  49. data/rbi/orb/models/subscription_price_intervals_params.rbi +451 -0
  50. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +2660 -1734
  51. data/rbi/orb/resources/prices.rbi +1 -0
  52. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +376 -0
  53. data/sig/orb/models/beta_create_plan_version_params.rbs +376 -0
  54. data/sig/orb/models/changed_subscription_resources.rbs +2 -0
  55. data/sig/orb/models/customers/balance_transaction_create_response.rbs +2 -0
  56. data/sig/orb/models/customers/balance_transaction_list_response.rbs +2 -0
  57. data/sig/orb/models/invoice.rbs +2 -0
  58. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +2 -0
  59. data/sig/orb/models/invoice_issue_summary_response.rbs +2 -0
  60. data/sig/orb/models/invoice_list_summary_response.rbs +2 -0
  61. data/sig/orb/models/plan_create_params.rbs +188 -0
  62. data/sig/orb/models/price.rbs +332 -0
  63. data/sig/orb/models/price_create_params.rbs +178 -0
  64. data/sig/orb/models/price_evaluate_multiple_params.rbs +183 -0
  65. data/sig/orb/models/price_evaluate_preview_events_params.rbs +183 -0
  66. data/sig/orb/models/subscription_create_params.rbs +376 -0
  67. data/sig/orb/models/subscription_price_intervals_params.rbs +183 -0
  68. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +376 -0
  69. metadata +1 -1
@@ -265,6 +265,7 @@ module Orb
265
265
  Orb::NewFloatingPackageWithAllocationPrice,
266
266
  Orb::NewFloatingUnitWithPercentPrice,
267
267
  Orb::NewFloatingMatrixWithAllocationPrice,
268
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation,
268
269
  Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts,
269
270
  Orb::NewFloatingTieredWithProrationPrice,
270
271
  Orb::NewFloatingUnitWithProrationPrice,
@@ -350,6 +351,7 @@ module Orb
350
351
  Orb::NewFloatingPackageWithAllocationPrice::OrHash,
351
352
  Orb::NewFloatingUnitWithPercentPrice::OrHash,
352
353
  Orb::NewFloatingMatrixWithAllocationPrice::OrHash,
354
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::OrHash,
353
355
  Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::OrHash,
354
356
  Orb::NewFloatingTieredWithProrationPrice::OrHash,
355
357
  Orb::NewFloatingUnitWithProrationPrice::OrHash,
@@ -471,6 +473,7 @@ module Orb
471
473
  Orb::NewFloatingPackageWithAllocationPrice,
472
474
  Orb::NewFloatingUnitWithPercentPrice,
473
475
  Orb::NewFloatingMatrixWithAllocationPrice,
476
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation,
474
477
  Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts,
475
478
  Orb::NewFloatingTieredWithProrationPrice,
476
479
  Orb::NewFloatingUnitWithProrationPrice,
@@ -736,6 +739,7 @@ module Orb
736
739
  Orb::NewFloatingPackageWithAllocationPrice,
737
740
  Orb::NewFloatingUnitWithPercentPrice,
738
741
  Orb::NewFloatingMatrixWithAllocationPrice,
742
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation,
739
743
  Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts,
740
744
  Orb::NewFloatingTieredWithProrationPrice,
741
745
  Orb::NewFloatingUnitWithProrationPrice,
@@ -1662,6 +1666,453 @@ module Orb
1662
1666
  end
1663
1667
  end
1664
1668
 
1669
+ class TieredMatrixWithAllocation < Orb::Internal::Type::BaseModel
1670
+ OrHash =
1671
+ T.type_alias do
1672
+ T.any(
1673
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation,
1674
+ Orb::Internal::AnyHash
1675
+ )
1676
+ end
1677
+
1678
+ # The cadence to bill for this price on.
1679
+ sig do
1680
+ returns(
1681
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::Cadence::OrSymbol
1682
+ )
1683
+ end
1684
+ attr_accessor :cadence
1685
+
1686
+ # An ISO 4217 currency string for which this price is billed in.
1687
+ sig { returns(String) }
1688
+ attr_accessor :currency
1689
+
1690
+ # The id of the item the price will be associated with.
1691
+ sig { returns(String) }
1692
+ attr_accessor :item_id
1693
+
1694
+ # The pricing model type
1695
+ sig { returns(Symbol) }
1696
+ attr_accessor :model_type
1697
+
1698
+ # The name of the price.
1699
+ sig { returns(String) }
1700
+ attr_accessor :name
1701
+
1702
+ # Configuration for tiered_matrix_with_allocation pricing
1703
+ sig do
1704
+ returns(
1705
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig
1706
+ )
1707
+ end
1708
+ attr_reader :tiered_matrix_with_allocation_config
1709
+
1710
+ sig do
1711
+ params(
1712
+ tiered_matrix_with_allocation_config:
1713
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::OrHash
1714
+ ).void
1715
+ end
1716
+ attr_writer :tiered_matrix_with_allocation_config
1717
+
1718
+ # The id of the billable metric for the price. Only needed if the price is
1719
+ # usage-based.
1720
+ sig { returns(T.nilable(String)) }
1721
+ attr_accessor :billable_metric_id
1722
+
1723
+ # If the Price represents a fixed cost, the price will be billed in-advance if
1724
+ # this is true, and in-arrears if this is false.
1725
+ sig { returns(T.nilable(T::Boolean)) }
1726
+ attr_accessor :billed_in_advance
1727
+
1728
+ # For custom cadence: specifies the duration of the billing period in days or
1729
+ # months.
1730
+ sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
1731
+ attr_reader :billing_cycle_configuration
1732
+
1733
+ sig do
1734
+ params(
1735
+ billing_cycle_configuration:
1736
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
1737
+ ).void
1738
+ end
1739
+ attr_writer :billing_cycle_configuration
1740
+
1741
+ # The per unit conversion rate of the price currency to the invoicing currency.
1742
+ sig { returns(T.nilable(Float)) }
1743
+ attr_accessor :conversion_rate
1744
+
1745
+ # The configuration for the rate of the price currency to the invoicing currency.
1746
+ sig do
1747
+ returns(
1748
+ T.nilable(
1749
+ T.any(
1750
+ Orb::UnitConversionRateConfig,
1751
+ Orb::TieredConversionRateConfig
1752
+ )
1753
+ )
1754
+ )
1755
+ end
1756
+ attr_accessor :conversion_rate_config
1757
+
1758
+ # For dimensional price: specifies a price group and dimension values
1759
+ sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
1760
+ attr_reader :dimensional_price_configuration
1761
+
1762
+ sig do
1763
+ params(
1764
+ dimensional_price_configuration:
1765
+ T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
1766
+ ).void
1767
+ end
1768
+ attr_writer :dimensional_price_configuration
1769
+
1770
+ # An alias for the price.
1771
+ sig { returns(T.nilable(String)) }
1772
+ attr_accessor :external_price_id
1773
+
1774
+ # If the Price represents a fixed cost, this represents the quantity of units
1775
+ # applied.
1776
+ sig { returns(T.nilable(Float)) }
1777
+ attr_accessor :fixed_price_quantity
1778
+
1779
+ # The property used to group this price on an invoice
1780
+ sig { returns(T.nilable(String)) }
1781
+ attr_accessor :invoice_grouping_key
1782
+
1783
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
1784
+ # If unspecified, a single invoice is produced per billing cycle.
1785
+ sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
1786
+ attr_reader :invoicing_cycle_configuration
1787
+
1788
+ sig do
1789
+ params(
1790
+ invoicing_cycle_configuration:
1791
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
1792
+ ).void
1793
+ end
1794
+ attr_writer :invoicing_cycle_configuration
1795
+
1796
+ # The ID of the license type to associate with this price. On a usage price this
1797
+ # also marks the price as eligible to draw down from that license type's
1798
+ # allocation; a usage price created without it is billed normally. Usage prices
1799
+ # with a license type must use the `unit` model, and only draw down when their
1800
+ # currency matches the allocation's.
1801
+ sig { returns(T.nilable(String)) }
1802
+ attr_accessor :license_type_id
1803
+
1804
+ # User-specified key/value pairs for the resource. Individual keys can be removed
1805
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
1806
+ # by setting `metadata` to `null`.
1807
+ sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
1808
+ attr_accessor :metadata
1809
+
1810
+ sig do
1811
+ params(
1812
+ cadence:
1813
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::Cadence::OrSymbol,
1814
+ currency: String,
1815
+ item_id: String,
1816
+ name: String,
1817
+ tiered_matrix_with_allocation_config:
1818
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::OrHash,
1819
+ billable_metric_id: T.nilable(String),
1820
+ billed_in_advance: T.nilable(T::Boolean),
1821
+ billing_cycle_configuration:
1822
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
1823
+ conversion_rate: T.nilable(Float),
1824
+ conversion_rate_config:
1825
+ T.nilable(
1826
+ T.any(
1827
+ Orb::UnitConversionRateConfig::OrHash,
1828
+ Orb::TieredConversionRateConfig::OrHash
1829
+ )
1830
+ ),
1831
+ dimensional_price_configuration:
1832
+ T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
1833
+ external_price_id: T.nilable(String),
1834
+ fixed_price_quantity: T.nilable(Float),
1835
+ invoice_grouping_key: T.nilable(String),
1836
+ invoicing_cycle_configuration:
1837
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
1838
+ license_type_id: T.nilable(String),
1839
+ metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
1840
+ model_type: Symbol
1841
+ ).returns(T.attached_class)
1842
+ end
1843
+ def self.new(
1844
+ # The cadence to bill for this price on.
1845
+ cadence:,
1846
+ # An ISO 4217 currency string for which this price is billed in.
1847
+ currency:,
1848
+ # The id of the item the price will be associated with.
1849
+ item_id:,
1850
+ # The name of the price.
1851
+ name:,
1852
+ # Configuration for tiered_matrix_with_allocation pricing
1853
+ tiered_matrix_with_allocation_config:,
1854
+ # The id of the billable metric for the price. Only needed if the price is
1855
+ # usage-based.
1856
+ billable_metric_id: nil,
1857
+ # If the Price represents a fixed cost, the price will be billed in-advance if
1858
+ # this is true, and in-arrears if this is false.
1859
+ billed_in_advance: nil,
1860
+ # For custom cadence: specifies the duration of the billing period in days or
1861
+ # months.
1862
+ billing_cycle_configuration: nil,
1863
+ # The per unit conversion rate of the price currency to the invoicing currency.
1864
+ conversion_rate: nil,
1865
+ # The configuration for the rate of the price currency to the invoicing currency.
1866
+ conversion_rate_config: nil,
1867
+ # For dimensional price: specifies a price group and dimension values
1868
+ dimensional_price_configuration: nil,
1869
+ # An alias for the price.
1870
+ external_price_id: nil,
1871
+ # If the Price represents a fixed cost, this represents the quantity of units
1872
+ # applied.
1873
+ fixed_price_quantity: nil,
1874
+ # The property used to group this price on an invoice
1875
+ invoice_grouping_key: nil,
1876
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
1877
+ # If unspecified, a single invoice is produced per billing cycle.
1878
+ invoicing_cycle_configuration: nil,
1879
+ # The ID of the license type to associate with this price. On a usage price this
1880
+ # also marks the price as eligible to draw down from that license type's
1881
+ # allocation; a usage price created without it is billed normally. Usage prices
1882
+ # with a license type must use the `unit` model, and only draw down when their
1883
+ # currency matches the allocation's.
1884
+ license_type_id: nil,
1885
+ # User-specified key/value pairs for the resource. Individual keys can be removed
1886
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
1887
+ # by setting `metadata` to `null`.
1888
+ metadata: nil,
1889
+ # The pricing model type
1890
+ model_type: :tiered_matrix_with_allocation
1891
+ )
1892
+ end
1893
+
1894
+ sig do
1895
+ override.returns(
1896
+ {
1897
+ cadence:
1898
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::Cadence::OrSymbol,
1899
+ currency: String,
1900
+ item_id: String,
1901
+ model_type: Symbol,
1902
+ name: String,
1903
+ tiered_matrix_with_allocation_config:
1904
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
1905
+ billable_metric_id: T.nilable(String),
1906
+ billed_in_advance: T.nilable(T::Boolean),
1907
+ billing_cycle_configuration:
1908
+ T.nilable(Orb::NewBillingCycleConfiguration),
1909
+ conversion_rate: T.nilable(Float),
1910
+ conversion_rate_config:
1911
+ T.nilable(
1912
+ T.any(
1913
+ Orb::UnitConversionRateConfig,
1914
+ Orb::TieredConversionRateConfig
1915
+ )
1916
+ ),
1917
+ dimensional_price_configuration:
1918
+ T.nilable(Orb::NewDimensionalPriceConfiguration),
1919
+ external_price_id: T.nilable(String),
1920
+ fixed_price_quantity: T.nilable(Float),
1921
+ invoice_grouping_key: T.nilable(String),
1922
+ invoicing_cycle_configuration:
1923
+ T.nilable(Orb::NewBillingCycleConfiguration),
1924
+ license_type_id: T.nilable(String),
1925
+ metadata: T.nilable(T::Hash[Symbol, T.nilable(String)])
1926
+ }
1927
+ )
1928
+ end
1929
+ def to_hash
1930
+ end
1931
+
1932
+ # The cadence to bill for this price on.
1933
+ module Cadence
1934
+ extend Orb::Internal::Type::Enum
1935
+
1936
+ TaggedSymbol =
1937
+ T.type_alias do
1938
+ T.all(
1939
+ Symbol,
1940
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::Cadence
1941
+ )
1942
+ end
1943
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1944
+
1945
+ ANNUAL =
1946
+ T.let(
1947
+ :annual,
1948
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
1949
+ )
1950
+ SEMI_ANNUAL =
1951
+ T.let(
1952
+ :semi_annual,
1953
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
1954
+ )
1955
+ MONTHLY =
1956
+ T.let(
1957
+ :monthly,
1958
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
1959
+ )
1960
+ QUARTERLY =
1961
+ T.let(
1962
+ :quarterly,
1963
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
1964
+ )
1965
+ ONE_TIME =
1966
+ T.let(
1967
+ :one_time,
1968
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
1969
+ )
1970
+ CUSTOM =
1971
+ T.let(
1972
+ :custom,
1973
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
1974
+ )
1975
+
1976
+ sig do
1977
+ override.returns(
1978
+ T::Array[
1979
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
1980
+ ]
1981
+ )
1982
+ end
1983
+ def self.values
1984
+ end
1985
+ end
1986
+
1987
+ class TieredMatrixWithAllocationConfig < Orb::Internal::Type::BaseModel
1988
+ OrHash =
1989
+ T.type_alias do
1990
+ T.any(
1991
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
1992
+ Orb::Internal::AnyHash
1993
+ )
1994
+ end
1995
+
1996
+ # Usage allocation, pooled across all matrix cells
1997
+ sig { returns(String) }
1998
+ attr_accessor :allocation
1999
+
2000
+ # Per unit rate for usage whose matrix cell has no configured tiers
2001
+ sig { returns(String) }
2002
+ attr_accessor :default_unit_amount
2003
+
2004
+ # One or two event property values to evaluate matrix cells by
2005
+ sig { returns(T::Array[String]) }
2006
+ attr_accessor :dimensions
2007
+
2008
+ # Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
2009
+ # own rows
2010
+ sig do
2011
+ returns(
2012
+ T::Array[
2013
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier
2014
+ ]
2015
+ )
2016
+ end
2017
+ attr_accessor :tiers
2018
+
2019
+ # Configuration for tiered_matrix_with_allocation pricing
2020
+ sig do
2021
+ params(
2022
+ allocation: String,
2023
+ default_unit_amount: String,
2024
+ dimensions: T::Array[String],
2025
+ tiers:
2026
+ T::Array[
2027
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier::OrHash
2028
+ ]
2029
+ ).returns(T.attached_class)
2030
+ end
2031
+ def self.new(
2032
+ # Usage allocation, pooled across all matrix cells
2033
+ allocation:,
2034
+ # Per unit rate for usage whose matrix cell has no configured tiers
2035
+ default_unit_amount:,
2036
+ # One or two event property values to evaluate matrix cells by
2037
+ dimensions:,
2038
+ # Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
2039
+ # own rows
2040
+ tiers:
2041
+ )
2042
+ end
2043
+
2044
+ sig do
2045
+ override.returns(
2046
+ {
2047
+ allocation: String,
2048
+ default_unit_amount: String,
2049
+ dimensions: T::Array[String],
2050
+ tiers:
2051
+ T::Array[
2052
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier
2053
+ ]
2054
+ }
2055
+ )
2056
+ end
2057
+ def to_hash
2058
+ end
2059
+
2060
+ class Tier < Orb::Internal::Type::BaseModel
2061
+ OrHash =
2062
+ T.type_alias do
2063
+ T.any(
2064
+ Orb::SubscriptionPriceIntervalsParams::Add::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier,
2065
+ Orb::Internal::AnyHash
2066
+ )
2067
+ end
2068
+
2069
+ # The matrix cell this tier applies to, as one or two dimension values
2070
+ sig { returns(T::Array[String]) }
2071
+ attr_accessor :dimension_values
2072
+
2073
+ # Exclusive tier starting value. The tier runs up to and including the next bound
2074
+ # configured for the same matrix cell.
2075
+ sig { returns(String) }
2076
+ attr_accessor :tier_lower_bound
2077
+
2078
+ # Per unit amount
2079
+ sig { returns(String) }
2080
+ attr_accessor :unit_amount
2081
+
2082
+ # Configuration for a single tier scoped to one matrix cell
2083
+ sig do
2084
+ params(
2085
+ dimension_values: T::Array[String],
2086
+ tier_lower_bound: String,
2087
+ unit_amount: String
2088
+ ).returns(T.attached_class)
2089
+ end
2090
+ def self.new(
2091
+ # The matrix cell this tier applies to, as one or two dimension values
2092
+ dimension_values:,
2093
+ # Exclusive tier starting value. The tier runs up to and including the next bound
2094
+ # configured for the same matrix cell.
2095
+ tier_lower_bound:,
2096
+ # Per unit amount
2097
+ unit_amount:
2098
+ )
2099
+ end
2100
+
2101
+ sig do
2102
+ override.returns(
2103
+ {
2104
+ dimension_values: T::Array[String],
2105
+ tier_lower_bound: String,
2106
+ unit_amount: String
2107
+ }
2108
+ )
2109
+ end
2110
+ def to_hash
2111
+ end
2112
+ end
2113
+ end
2114
+ end
2115
+
1665
2116
  class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
1666
2117
  OrHash =
1667
2118
  T.type_alias do