orb-billing 0.5.4 → 0.6.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 (211) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +1 -1
  4. data/lib/orb/internal/type/base_model.rb +2 -2
  5. data/lib/orb/internal/type/union.rb +6 -6
  6. data/lib/orb/internal/util.rb +5 -1
  7. data/lib/orb/models/alert.rb +33 -1
  8. data/lib/orb/models/amount_discount.rb +10 -10
  9. data/lib/orb/models/credit_note_create_params.rb +9 -9
  10. data/lib/orb/models/customer_create_params.rb +21 -3
  11. data/lib/orb/models/customer_update_by_external_id_params.rb +21 -3
  12. data/lib/orb/models/customer_update_params.rb +21 -3
  13. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +9 -1
  14. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +9 -1
  15. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +9 -1
  16. data/lib/orb/models/customers/credits/ledger_list_response.rb +9 -1
  17. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +1 -1
  18. data/lib/orb/models/customers/credits/top_up_create_params.rb +1 -1
  19. data/lib/orb/models/invoice.rb +626 -9
  20. data/lib/orb/models/invoice_fetch_upcoming_response.rb +624 -9
  21. data/lib/orb/models/invoice_line_item_create_response.rb +486 -7
  22. data/lib/orb/models/item.rb +18 -1
  23. data/lib/orb/models/item_archive_params.rb +14 -0
  24. data/lib/orb/models/item_create_params.rb +14 -1
  25. data/lib/orb/models/item_update_params.rb +16 -1
  26. data/lib/orb/models/percentage_discount.rb +10 -10
  27. data/lib/orb/models/plan.rb +618 -9
  28. data/lib/orb/models/plan_create_params.rb +2066 -30
  29. data/lib/orb/models/plan_set_default_version_params.rb +22 -0
  30. data/lib/orb/models/plans/external_plan_id/version_create_params.rb +17948 -0
  31. data/lib/orb/models/plans/external_plan_id/version_create_response.rb +819 -0
  32. data/lib/orb/models/plans/external_plan_id/version_retrieve_params.rb +24 -0
  33. data/lib/orb/models/plans/external_plan_id/version_retrieve_response.rb +819 -0
  34. data/lib/orb/models/plans/external_plan_id_set_default_version_params.rb +24 -0
  35. data/lib/orb/models/plans/version_create_params.rb +17794 -0
  36. data/lib/orb/models/plans/version_create_response.rb +814 -0
  37. data/lib/orb/models/plans/version_retrieve_params.rb +22 -0
  38. data/lib/orb/models/plans/version_retrieve_response.rb +814 -0
  39. data/lib/orb/models/price.rb +4124 -70
  40. data/lib/orb/models/price_create_params.rb +45 -1
  41. data/lib/orb/models/price_evaluate_params.rb +8529 -21
  42. data/lib/orb/models/price_evaluate_response.rb +38 -3
  43. data/lib/orb/models/subscription.rb +730 -54
  44. data/lib/orb/models/subscription_cancel_response.rb +706 -54
  45. data/lib/orb/models/subscription_change_apply_response.rb +728 -54
  46. data/lib/orb/models/subscription_change_cancel_response.rb +728 -54
  47. data/lib/orb/models/subscription_change_retrieve_response.rb +728 -54
  48. data/lib/orb/models/subscription_create_params.rb +5992 -1698
  49. data/lib/orb/models/subscription_create_response.rb +706 -54
  50. data/lib/orb/models/subscription_fetch_schedule_response.rb +3 -3
  51. data/lib/orb/models/subscription_price_intervals_params.rb +1392 -76
  52. data/lib/orb/models/subscription_price_intervals_response.rb +712 -54
  53. data/lib/orb/models/subscription_schedule_plan_change_params.rb +6005 -1723
  54. data/lib/orb/models/subscription_schedule_plan_change_response.rb +716 -54
  55. data/lib/orb/models/subscription_trigger_phase_response.rb +708 -54
  56. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +720 -54
  57. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +728 -54
  58. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +728 -54
  59. data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +1 -1
  60. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +720 -54
  61. data/lib/orb/models/subscription_update_trial_response.rb +706 -54
  62. data/lib/orb/models/trial_discount.rb +10 -10
  63. data/lib/orb/models/usage_discount.rb +10 -10
  64. data/lib/orb/models.rb +4 -0
  65. data/lib/orb/resources/credit_notes.rb +3 -3
  66. data/lib/orb/resources/customers/balance_transactions.rb +0 -7
  67. data/lib/orb/resources/customers.rb +4 -7
  68. data/lib/orb/resources/dimensional_price_groups.rb +1 -1
  69. data/lib/orb/resources/items.rb +34 -2
  70. data/lib/orb/resources/plans/external_plan_id/versions.rb +88 -0
  71. data/lib/orb/resources/plans/external_plan_id.rb +32 -1
  72. data/lib/orb/resources/plans/versions.rb +86 -0
  73. data/lib/orb/resources/plans.rb +33 -2
  74. data/lib/orb/resources/prices.rb +23 -17
  75. data/lib/orb/resources/subscriptions.rb +5 -1
  76. data/lib/orb/version.rb +1 -1
  77. data/lib/orb.rb +16 -1
  78. data/rbi/orb/models/alert.rbi +50 -3
  79. data/rbi/orb/models/amount_discount.rbi +8 -8
  80. data/rbi/orb/models/credit_note_create_params.rbi +8 -8
  81. data/rbi/orb/models/customer_create_params.rbi +38 -4
  82. data/rbi/orb/models/customer_update_by_external_id_params.rbi +38 -4
  83. data/rbi/orb/models/customer_update_params.rbi +38 -4
  84. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +9 -1
  85. data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +9 -1
  86. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +9 -1
  87. data/rbi/orb/models/customers/credits/ledger_list_response.rbi +9 -1
  88. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +2 -2
  89. data/rbi/orb/models/customers/credits/top_up_create_params.rbi +2 -2
  90. data/rbi/orb/models/invoice.rbi +1451 -35
  91. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +1524 -4
  92. data/rbi/orb/models/invoice_line_item_create_response.rbi +1184 -2
  93. data/rbi/orb/models/item.rbi +20 -1
  94. data/rbi/orb/models/item_archive_params.rbi +25 -0
  95. data/rbi/orb/models/item_create_params.rbi +18 -1
  96. data/rbi/orb/models/item_update_params.rbi +17 -1
  97. data/rbi/orb/models/percentage_discount.rbi +10 -10
  98. data/rbi/orb/models/plan.rbi +1339 -4
  99. data/rbi/orb/models/plan_create_params.rbi +3833 -29
  100. data/rbi/orb/models/plan_set_default_version_params.rbi +40 -0
  101. data/rbi/orb/models/plans/external_plan_id/version_create_params.rbi +32668 -0
  102. data/rbi/orb/models/plans/external_plan_id/version_create_response.rbi +1562 -0
  103. data/rbi/orb/models/plans/external_plan_id/version_retrieve_params.rbi +42 -0
  104. data/rbi/orb/models/plans/external_plan_id/version_retrieve_response.rbi +1562 -0
  105. data/rbi/orb/models/plans/external_plan_id_set_default_version_params.rbi +45 -0
  106. data/rbi/orb/models/plans/version_create_params.rbi +32607 -0
  107. data/rbi/orb/models/plans/version_create_response.rbi +1556 -0
  108. data/rbi/orb/models/plans/version_retrieve_params.rbi +37 -0
  109. data/rbi/orb/models/plans/version_retrieve_response.rbi +1558 -0
  110. data/rbi/orb/models/price.rbi +9447 -441
  111. data/rbi/orb/models/price_create_params.rbi +80 -0
  112. data/rbi/orb/models/price_evaluate_params.rbi +15684 -25
  113. data/rbi/orb/models/price_evaluate_response.rbi +68 -5
  114. data/rbi/orb/models/subscription.rbi +1654 -44
  115. data/rbi/orb/models/subscription_cancel_response.rbi +1692 -44
  116. data/rbi/orb/models/subscription_change_apply_response.rbi +1692 -44
  117. data/rbi/orb/models/subscription_change_cancel_response.rbi +1692 -44
  118. data/rbi/orb/models/subscription_change_retrieve_response.rbi +1692 -44
  119. data/rbi/orb/models/subscription_create_params.rbi +10400 -2710
  120. data/rbi/orb/models/subscription_create_response.rbi +1692 -44
  121. data/rbi/orb/models/subscription_fetch_schedule_response.rbi +13 -4
  122. data/rbi/orb/models/subscription_price_intervals_params.rbi +2401 -49
  123. data/rbi/orb/models/subscription_price_intervals_response.rbi +1692 -44
  124. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +10423 -2753
  125. data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +1692 -44
  126. data/rbi/orb/models/subscription_trigger_phase_response.rbi +1692 -44
  127. data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +1692 -44
  128. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +1692 -44
  129. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +1692 -44
  130. data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +2 -2
  131. data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +1692 -44
  132. data/rbi/orb/models/subscription_update_trial_response.rbi +1692 -44
  133. data/rbi/orb/models/trial_discount.rbi +8 -8
  134. data/rbi/orb/models/usage_discount.rbi +10 -10
  135. data/rbi/orb/models.rbi +4 -0
  136. data/rbi/orb/resources/credit_notes.rbi +3 -3
  137. data/rbi/orb/resources/customers/balance_transactions.rbi +0 -7
  138. data/rbi/orb/resources/customers/credits/top_ups.rbi +2 -2
  139. data/rbi/orb/resources/customers.rbi +7 -7
  140. data/rbi/orb/resources/dimensional_price_groups.rbi +1 -1
  141. data/rbi/orb/resources/items.rbi +20 -0
  142. data/rbi/orb/resources/plans/external_plan_id/versions.rbi +103 -0
  143. data/rbi/orb/resources/plans/external_plan_id.rbi +23 -1
  144. data/rbi/orb/resources/plans/versions.rbi +91 -0
  145. data/rbi/orb/resources/plans.rbi +27 -2
  146. data/rbi/orb/resources/prices.rbi +27 -17
  147. data/rbi/orb/resources/subscriptions.rbi +9 -1
  148. data/sig/orb/models/alert.rbs +20 -3
  149. data/sig/orb/models/amount_discount.rbs +5 -5
  150. data/sig/orb/models/credit_note_create_params.rbs +6 -6
  151. data/sig/orb/models/customer_create_params.rbs +13 -0
  152. data/sig/orb/models/customer_update_by_external_id_params.rbs +13 -0
  153. data/sig/orb/models/customer_update_params.rbs +13 -0
  154. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +7 -2
  155. data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +7 -2
  156. data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +7 -2
  157. data/sig/orb/models/customers/credits/ledger_list_response.rbs +7 -2
  158. data/sig/orb/models/invoice.rbs +558 -4
  159. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +558 -4
  160. data/sig/orb/models/invoice_line_item_create_response.rbs +414 -2
  161. data/sig/orb/models/item.rbs +5 -0
  162. data/sig/orb/models/item_archive_params.rbs +14 -0
  163. data/sig/orb/models/item_create_params.rbs +10 -2
  164. data/sig/orb/models/item_update_params.rbs +5 -0
  165. data/sig/orb/models/percentage_discount.rbs +5 -5
  166. data/sig/orb/models/plan.rbs +538 -4
  167. data/sig/orb/models/plan_create_params.rbs +1460 -3
  168. data/sig/orb/models/plan_set_default_version_params.rbs +20 -0
  169. data/sig/orb/models/plans/external_plan_id/version_create_params.rbs +12923 -0
  170. data/sig/orb/models/plans/external_plan_id/version_create_response.rbs +664 -0
  171. data/sig/orb/models/plans/external_plan_id/version_retrieve_params.rbs +27 -0
  172. data/sig/orb/models/plans/external_plan_id/version_retrieve_response.rbs +664 -0
  173. data/sig/orb/models/plans/external_plan_id_set_default_version_params.rbs +25 -0
  174. data/sig/orb/models/plans/version_create_params.rbs +12898 -0
  175. data/sig/orb/models/plans/version_create_response.rbs +662 -0
  176. data/sig/orb/models/plans/version_retrieve_params.rbs +25 -0
  177. data/sig/orb/models/plans/version_retrieve_response.rbs +662 -0
  178. data/sig/orb/models/price.rbs +3512 -96
  179. data/sig/orb/models/price_create_params.rbs +32 -0
  180. data/sig/orb/models/price_evaluate_params.rbs +6187 -10
  181. data/sig/orb/models/price_evaluate_response.rbs +41 -4
  182. data/sig/orb/models/subscription.rbs +609 -29
  183. data/sig/orb/models/subscription_cancel_response.rbs +609 -29
  184. data/sig/orb/models/subscription_change_apply_response.rbs +621 -29
  185. data/sig/orb/models/subscription_change_cancel_response.rbs +621 -29
  186. data/sig/orb/models/subscription_change_retrieve_response.rbs +621 -29
  187. data/sig/orb/models/subscription_create_params.rbs +4450 -1466
  188. data/sig/orb/models/subscription_create_response.rbs +609 -29
  189. data/sig/orb/models/subscription_fetch_schedule_response.rbs +4 -4
  190. data/sig/orb/models/subscription_price_intervals_params.rbs +920 -24
  191. data/sig/orb/models/subscription_price_intervals_response.rbs +609 -29
  192. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +4440 -1466
  193. data/sig/orb/models/subscription_schedule_plan_change_response.rbs +609 -29
  194. data/sig/orb/models/subscription_trigger_phase_response.rbs +609 -29
  195. data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +609 -29
  196. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +609 -29
  197. data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +609 -29
  198. data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +609 -29
  199. data/sig/orb/models/subscription_update_trial_response.rbs +609 -29
  200. data/sig/orb/models/trial_discount.rbs +5 -5
  201. data/sig/orb/models/usage_discount.rbs +5 -5
  202. data/sig/orb/models.rbs +4 -0
  203. data/sig/orb/resources/credit_notes.rbs +1 -1
  204. data/sig/orb/resources/items.rbs +7 -0
  205. data/sig/orb/resources/plans/external_plan_id/versions.rbs +30 -0
  206. data/sig/orb/resources/plans/external_plan_id.rbs +8 -0
  207. data/sig/orb/resources/plans/versions.rbs +28 -0
  208. data/sig/orb/resources/plans.rbs +8 -0
  209. data/sig/orb/resources/prices.rbs +3 -3
  210. data/sig/orb/resources/subscriptions.rbs +2 -0
  211. metadata +41 -2
@@ -0,0 +1,1562 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ module Plans
6
+ module ExternalPlanID
7
+ class VersionCreateResponse < Orb::Internal::Type::BaseModel
8
+ OrHash =
9
+ T.type_alias do
10
+ T.any(
11
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse,
12
+ Orb::Internal::AnyHash
13
+ )
14
+ end
15
+
16
+ # Adjustments for this plan. If the plan has phases, this includes adjustments
17
+ # across all phases of the plan.
18
+ sig do
19
+ returns(
20
+ T::Array[
21
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Variants
22
+ ]
23
+ )
24
+ end
25
+ attr_accessor :adjustments
26
+
27
+ sig { returns(Time) }
28
+ attr_accessor :created_at
29
+
30
+ sig do
31
+ returns(
32
+ T.nilable(
33
+ T::Array[
34
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::PlanPhase
35
+ ]
36
+ )
37
+ )
38
+ end
39
+ attr_accessor :plan_phases
40
+
41
+ # Prices for this plan. If the plan has phases, this includes prices across all
42
+ # phases of the plan.
43
+ sig { returns(T::Array[Orb::Price::Variants]) }
44
+ attr_accessor :prices
45
+
46
+ sig { returns(Integer) }
47
+ attr_accessor :version
48
+
49
+ # The PlanVersion resource represents the prices and adjustments present on a
50
+ # specific version of a plan.
51
+ sig do
52
+ params(
53
+ adjustments:
54
+ T::Array[
55
+ T.any(
56
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::OrHash,
57
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::OrHash,
58
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::OrHash,
59
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::OrHash,
60
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::OrHash
61
+ )
62
+ ],
63
+ created_at: Time,
64
+ plan_phases:
65
+ T.nilable(
66
+ T::Array[
67
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::PlanPhase::OrHash
68
+ ]
69
+ ),
70
+ prices:
71
+ T::Array[
72
+ T.any(
73
+ Orb::Price::Unit::OrHash,
74
+ Orb::Price::Package::OrHash,
75
+ Orb::Price::Matrix::OrHash,
76
+ Orb::Price::Tiered::OrHash,
77
+ Orb::Price::TieredBps::OrHash,
78
+ Orb::Price::Bps::OrHash,
79
+ Orb::Price::BulkBps::OrHash,
80
+ Orb::Price::Bulk::OrHash,
81
+ Orb::Price::ThresholdTotalAmount::OrHash,
82
+ Orb::Price::TieredPackage::OrHash,
83
+ Orb::Price::GroupedTiered::OrHash,
84
+ Orb::Price::TieredWithMinimum::OrHash,
85
+ Orb::Price::TieredPackageWithMinimum::OrHash,
86
+ Orb::Price::PackageWithAllocation::OrHash,
87
+ Orb::Price::UnitWithPercent::OrHash,
88
+ Orb::Price::MatrixWithAllocation::OrHash,
89
+ Orb::Price::TieredWithProration::OrHash,
90
+ Orb::Price::UnitWithProration::OrHash,
91
+ Orb::Price::GroupedAllocation::OrHash,
92
+ Orb::Price::GroupedWithProratedMinimum::OrHash,
93
+ Orb::Price::GroupedWithMeteredMinimum::OrHash,
94
+ Orb::Price::MatrixWithDisplayName::OrHash,
95
+ Orb::Price::BulkWithProration::OrHash,
96
+ Orb::Price::GroupedTieredPackage::OrHash,
97
+ Orb::Price::MaxGroupTieredPackage::OrHash,
98
+ Orb::Price::ScalableMatrixWithUnitPricing::OrHash,
99
+ Orb::Price::ScalableMatrixWithTieredPricing::OrHash,
100
+ Orb::Price::CumulativeGroupedBulk::OrHash
101
+ )
102
+ ],
103
+ version: Integer
104
+ ).returns(T.attached_class)
105
+ end
106
+ def self.new(
107
+ # Adjustments for this plan. If the plan has phases, this includes adjustments
108
+ # across all phases of the plan.
109
+ adjustments:,
110
+ created_at:,
111
+ plan_phases:,
112
+ # Prices for this plan. If the plan has phases, this includes prices across all
113
+ # phases of the plan.
114
+ prices:,
115
+ version:
116
+ )
117
+ end
118
+
119
+ sig do
120
+ override.returns(
121
+ {
122
+ adjustments:
123
+ T::Array[
124
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Variants
125
+ ],
126
+ created_at: Time,
127
+ plan_phases:
128
+ T.nilable(
129
+ T::Array[
130
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::PlanPhase
131
+ ]
132
+ ),
133
+ prices: T::Array[Orb::Price::Variants],
134
+ version: Integer
135
+ }
136
+ )
137
+ end
138
+ def to_hash
139
+ end
140
+
141
+ module Adjustment
142
+ extend Orb::Internal::Type::Union
143
+
144
+ Variants =
145
+ T.type_alias do
146
+ T.any(
147
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount,
148
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount,
149
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount,
150
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum,
151
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum
152
+ )
153
+ end
154
+
155
+ class UsageDiscount < Orb::Internal::Type::BaseModel
156
+ OrHash =
157
+ T.type_alias do
158
+ T.any(
159
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount,
160
+ Orb::Internal::AnyHash
161
+ )
162
+ end
163
+
164
+ sig { returns(String) }
165
+ attr_accessor :id
166
+
167
+ sig { returns(Symbol) }
168
+ attr_accessor :adjustment_type
169
+
170
+ # The price IDs that this adjustment applies to.
171
+ sig { returns(T::Array[String]) }
172
+ attr_accessor :applies_to_price_ids
173
+
174
+ # The filters that determine which prices to apply this adjustment to.
175
+ sig do
176
+ returns(
177
+ T::Array[
178
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter
179
+ ]
180
+ )
181
+ end
182
+ attr_accessor :filters
183
+
184
+ # True for adjustments that apply to an entire invocice, false for adjustments
185
+ # that apply to only one price.
186
+ sig { returns(T::Boolean) }
187
+ attr_accessor :is_invoice_level
188
+
189
+ # The plan phase in which this adjustment is active.
190
+ sig { returns(T.nilable(Integer)) }
191
+ attr_accessor :plan_phase_order
192
+
193
+ # The reason for the adjustment.
194
+ sig { returns(T.nilable(String)) }
195
+ attr_accessor :reason
196
+
197
+ # The number of usage units by which to discount the price this adjustment applies
198
+ # to in a given billing period.
199
+ sig { returns(Float) }
200
+ attr_accessor :usage_discount
201
+
202
+ sig do
203
+ params(
204
+ id: String,
205
+ applies_to_price_ids: T::Array[String],
206
+ filters:
207
+ T::Array[
208
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter::OrHash
209
+ ],
210
+ is_invoice_level: T::Boolean,
211
+ plan_phase_order: T.nilable(Integer),
212
+ reason: T.nilable(String),
213
+ usage_discount: Float,
214
+ adjustment_type: Symbol
215
+ ).returns(T.attached_class)
216
+ end
217
+ def self.new(
218
+ id:,
219
+ # The price IDs that this adjustment applies to.
220
+ applies_to_price_ids:,
221
+ # The filters that determine which prices to apply this adjustment to.
222
+ filters:,
223
+ # True for adjustments that apply to an entire invocice, false for adjustments
224
+ # that apply to only one price.
225
+ is_invoice_level:,
226
+ # The plan phase in which this adjustment is active.
227
+ plan_phase_order:,
228
+ # The reason for the adjustment.
229
+ reason:,
230
+ # The number of usage units by which to discount the price this adjustment applies
231
+ # to in a given billing period.
232
+ usage_discount:,
233
+ adjustment_type: :usage_discount
234
+ )
235
+ end
236
+
237
+ sig do
238
+ override.returns(
239
+ {
240
+ id: String,
241
+ adjustment_type: Symbol,
242
+ applies_to_price_ids: T::Array[String],
243
+ filters:
244
+ T::Array[
245
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter
246
+ ],
247
+ is_invoice_level: T::Boolean,
248
+ plan_phase_order: T.nilable(Integer),
249
+ reason: T.nilable(String),
250
+ usage_discount: Float
251
+ }
252
+ )
253
+ end
254
+ def to_hash
255
+ end
256
+
257
+ class Filter < Orb::Internal::Type::BaseModel
258
+ OrHash =
259
+ T.type_alias do
260
+ T.any(
261
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter,
262
+ Orb::Internal::AnyHash
263
+ )
264
+ end
265
+
266
+ # The property of the price to filter on.
267
+ sig do
268
+ returns(
269
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
270
+ )
271
+ end
272
+ attr_accessor :field
273
+
274
+ # Should prices that match the filter be included or excluded.
275
+ sig do
276
+ returns(
277
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
278
+ )
279
+ end
280
+ attr_accessor :operator
281
+
282
+ # The IDs or values that match this filter.
283
+ sig { returns(T::Array[String]) }
284
+ attr_accessor :values
285
+
286
+ sig do
287
+ params(
288
+ field:
289
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter::Field::OrSymbol,
290
+ operator:
291
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter::Operator::OrSymbol,
292
+ values: T::Array[String]
293
+ ).returns(T.attached_class)
294
+ end
295
+ def self.new(
296
+ # The property of the price to filter on.
297
+ field:,
298
+ # Should prices that match the filter be included or excluded.
299
+ operator:,
300
+ # The IDs or values that match this filter.
301
+ values:
302
+ )
303
+ end
304
+
305
+ sig do
306
+ override.returns(
307
+ {
308
+ field:
309
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol,
310
+ operator:
311
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol,
312
+ values: T::Array[String]
313
+ }
314
+ )
315
+ end
316
+ def to_hash
317
+ end
318
+
319
+ # The property of the price to filter on.
320
+ module Field
321
+ extend Orb::Internal::Type::Enum
322
+
323
+ TaggedSymbol =
324
+ T.type_alias do
325
+ T.all(
326
+ Symbol,
327
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter::Field
328
+ )
329
+ end
330
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
331
+
332
+ PRICE_ID =
333
+ T.let(
334
+ :price_id,
335
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
336
+ )
337
+ ITEM_ID =
338
+ T.let(
339
+ :item_id,
340
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
341
+ )
342
+ PRICE_TYPE =
343
+ T.let(
344
+ :price_type,
345
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
346
+ )
347
+ CURRENCY =
348
+ T.let(
349
+ :currency,
350
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
351
+ )
352
+ PRICING_UNIT_ID =
353
+ T.let(
354
+ :pricing_unit_id,
355
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
356
+ )
357
+
358
+ sig do
359
+ override.returns(
360
+ T::Array[
361
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
362
+ ]
363
+ )
364
+ end
365
+ def self.values
366
+ end
367
+ end
368
+
369
+ # Should prices that match the filter be included or excluded.
370
+ module Operator
371
+ extend Orb::Internal::Type::Enum
372
+
373
+ TaggedSymbol =
374
+ T.type_alias do
375
+ T.all(
376
+ Symbol,
377
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter::Operator
378
+ )
379
+ end
380
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
381
+
382
+ INCLUDES =
383
+ T.let(
384
+ :includes,
385
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
386
+ )
387
+ EXCLUDES =
388
+ T.let(
389
+ :excludes,
390
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
391
+ )
392
+
393
+ sig do
394
+ override.returns(
395
+ T::Array[
396
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
397
+ ]
398
+ )
399
+ end
400
+ def self.values
401
+ end
402
+ end
403
+ end
404
+ end
405
+
406
+ class AmountDiscount < Orb::Internal::Type::BaseModel
407
+ OrHash =
408
+ T.type_alias do
409
+ T.any(
410
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount,
411
+ Orb::Internal::AnyHash
412
+ )
413
+ end
414
+
415
+ sig { returns(String) }
416
+ attr_accessor :id
417
+
418
+ sig { returns(Symbol) }
419
+ attr_accessor :adjustment_type
420
+
421
+ # The amount by which to discount the prices this adjustment applies to in a given
422
+ # billing period.
423
+ sig { returns(String) }
424
+ attr_accessor :amount_discount
425
+
426
+ # The price IDs that this adjustment applies to.
427
+ sig { returns(T::Array[String]) }
428
+ attr_accessor :applies_to_price_ids
429
+
430
+ # The filters that determine which prices to apply this adjustment to.
431
+ sig do
432
+ returns(
433
+ T::Array[
434
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter
435
+ ]
436
+ )
437
+ end
438
+ attr_accessor :filters
439
+
440
+ # True for adjustments that apply to an entire invocice, false for adjustments
441
+ # that apply to only one price.
442
+ sig { returns(T::Boolean) }
443
+ attr_accessor :is_invoice_level
444
+
445
+ # The plan phase in which this adjustment is active.
446
+ sig { returns(T.nilable(Integer)) }
447
+ attr_accessor :plan_phase_order
448
+
449
+ # The reason for the adjustment.
450
+ sig { returns(T.nilable(String)) }
451
+ attr_accessor :reason
452
+
453
+ sig do
454
+ params(
455
+ id: String,
456
+ amount_discount: String,
457
+ applies_to_price_ids: T::Array[String],
458
+ filters:
459
+ T::Array[
460
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter::OrHash
461
+ ],
462
+ is_invoice_level: T::Boolean,
463
+ plan_phase_order: T.nilable(Integer),
464
+ reason: T.nilable(String),
465
+ adjustment_type: Symbol
466
+ ).returns(T.attached_class)
467
+ end
468
+ def self.new(
469
+ id:,
470
+ # The amount by which to discount the prices this adjustment applies to in a given
471
+ # billing period.
472
+ amount_discount:,
473
+ # The price IDs that this adjustment applies to.
474
+ applies_to_price_ids:,
475
+ # The filters that determine which prices to apply this adjustment to.
476
+ filters:,
477
+ # True for adjustments that apply to an entire invocice, false for adjustments
478
+ # that apply to only one price.
479
+ is_invoice_level:,
480
+ # The plan phase in which this adjustment is active.
481
+ plan_phase_order:,
482
+ # The reason for the adjustment.
483
+ reason:,
484
+ adjustment_type: :amount_discount
485
+ )
486
+ end
487
+
488
+ sig do
489
+ override.returns(
490
+ {
491
+ id: String,
492
+ adjustment_type: Symbol,
493
+ amount_discount: String,
494
+ applies_to_price_ids: T::Array[String],
495
+ filters:
496
+ T::Array[
497
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter
498
+ ],
499
+ is_invoice_level: T::Boolean,
500
+ plan_phase_order: T.nilable(Integer),
501
+ reason: T.nilable(String)
502
+ }
503
+ )
504
+ end
505
+ def to_hash
506
+ end
507
+
508
+ class Filter < Orb::Internal::Type::BaseModel
509
+ OrHash =
510
+ T.type_alias do
511
+ T.any(
512
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter,
513
+ Orb::Internal::AnyHash
514
+ )
515
+ end
516
+
517
+ # The property of the price to filter on.
518
+ sig do
519
+ returns(
520
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
521
+ )
522
+ end
523
+ attr_accessor :field
524
+
525
+ # Should prices that match the filter be included or excluded.
526
+ sig do
527
+ returns(
528
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
529
+ )
530
+ end
531
+ attr_accessor :operator
532
+
533
+ # The IDs or values that match this filter.
534
+ sig { returns(T::Array[String]) }
535
+ attr_accessor :values
536
+
537
+ sig do
538
+ params(
539
+ field:
540
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter::Field::OrSymbol,
541
+ operator:
542
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter::Operator::OrSymbol,
543
+ values: T::Array[String]
544
+ ).returns(T.attached_class)
545
+ end
546
+ def self.new(
547
+ # The property of the price to filter on.
548
+ field:,
549
+ # Should prices that match the filter be included or excluded.
550
+ operator:,
551
+ # The IDs or values that match this filter.
552
+ values:
553
+ )
554
+ end
555
+
556
+ sig do
557
+ override.returns(
558
+ {
559
+ field:
560
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol,
561
+ operator:
562
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol,
563
+ values: T::Array[String]
564
+ }
565
+ )
566
+ end
567
+ def to_hash
568
+ end
569
+
570
+ # The property of the price to filter on.
571
+ module Field
572
+ extend Orb::Internal::Type::Enum
573
+
574
+ TaggedSymbol =
575
+ T.type_alias do
576
+ T.all(
577
+ Symbol,
578
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter::Field
579
+ )
580
+ end
581
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
582
+
583
+ PRICE_ID =
584
+ T.let(
585
+ :price_id,
586
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
587
+ )
588
+ ITEM_ID =
589
+ T.let(
590
+ :item_id,
591
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
592
+ )
593
+ PRICE_TYPE =
594
+ T.let(
595
+ :price_type,
596
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
597
+ )
598
+ CURRENCY =
599
+ T.let(
600
+ :currency,
601
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
602
+ )
603
+ PRICING_UNIT_ID =
604
+ T.let(
605
+ :pricing_unit_id,
606
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
607
+ )
608
+
609
+ sig do
610
+ override.returns(
611
+ T::Array[
612
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
613
+ ]
614
+ )
615
+ end
616
+ def self.values
617
+ end
618
+ end
619
+
620
+ # Should prices that match the filter be included or excluded.
621
+ module Operator
622
+ extend Orb::Internal::Type::Enum
623
+
624
+ TaggedSymbol =
625
+ T.type_alias do
626
+ T.all(
627
+ Symbol,
628
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter::Operator
629
+ )
630
+ end
631
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
632
+
633
+ INCLUDES =
634
+ T.let(
635
+ :includes,
636
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
637
+ )
638
+ EXCLUDES =
639
+ T.let(
640
+ :excludes,
641
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
642
+ )
643
+
644
+ sig do
645
+ override.returns(
646
+ T::Array[
647
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
648
+ ]
649
+ )
650
+ end
651
+ def self.values
652
+ end
653
+ end
654
+ end
655
+ end
656
+
657
+ class PercentageDiscount < Orb::Internal::Type::BaseModel
658
+ OrHash =
659
+ T.type_alias do
660
+ T.any(
661
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount,
662
+ Orb::Internal::AnyHash
663
+ )
664
+ end
665
+
666
+ sig { returns(String) }
667
+ attr_accessor :id
668
+
669
+ sig { returns(Symbol) }
670
+ attr_accessor :adjustment_type
671
+
672
+ # The price IDs that this adjustment applies to.
673
+ sig { returns(T::Array[String]) }
674
+ attr_accessor :applies_to_price_ids
675
+
676
+ # The filters that determine which prices to apply this adjustment to.
677
+ sig do
678
+ returns(
679
+ T::Array[
680
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter
681
+ ]
682
+ )
683
+ end
684
+ attr_accessor :filters
685
+
686
+ # True for adjustments that apply to an entire invocice, false for adjustments
687
+ # that apply to only one price.
688
+ sig { returns(T::Boolean) }
689
+ attr_accessor :is_invoice_level
690
+
691
+ # The percentage (as a value between 0 and 1) by which to discount the price
692
+ # intervals this adjustment applies to in a given billing period.
693
+ sig { returns(Float) }
694
+ attr_accessor :percentage_discount
695
+
696
+ # The plan phase in which this adjustment is active.
697
+ sig { returns(T.nilable(Integer)) }
698
+ attr_accessor :plan_phase_order
699
+
700
+ # The reason for the adjustment.
701
+ sig { returns(T.nilable(String)) }
702
+ attr_accessor :reason
703
+
704
+ sig do
705
+ params(
706
+ id: String,
707
+ applies_to_price_ids: T::Array[String],
708
+ filters:
709
+ T::Array[
710
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter::OrHash
711
+ ],
712
+ is_invoice_level: T::Boolean,
713
+ percentage_discount: Float,
714
+ plan_phase_order: T.nilable(Integer),
715
+ reason: T.nilable(String),
716
+ adjustment_type: Symbol
717
+ ).returns(T.attached_class)
718
+ end
719
+ def self.new(
720
+ id:,
721
+ # The price IDs that this adjustment applies to.
722
+ applies_to_price_ids:,
723
+ # The filters that determine which prices to apply this adjustment to.
724
+ filters:,
725
+ # True for adjustments that apply to an entire invocice, false for adjustments
726
+ # that apply to only one price.
727
+ is_invoice_level:,
728
+ # The percentage (as a value between 0 and 1) by which to discount the price
729
+ # intervals this adjustment applies to in a given billing period.
730
+ percentage_discount:,
731
+ # The plan phase in which this adjustment is active.
732
+ plan_phase_order:,
733
+ # The reason for the adjustment.
734
+ reason:,
735
+ adjustment_type: :percentage_discount
736
+ )
737
+ end
738
+
739
+ sig do
740
+ override.returns(
741
+ {
742
+ id: String,
743
+ adjustment_type: Symbol,
744
+ applies_to_price_ids: T::Array[String],
745
+ filters:
746
+ T::Array[
747
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter
748
+ ],
749
+ is_invoice_level: T::Boolean,
750
+ percentage_discount: Float,
751
+ plan_phase_order: T.nilable(Integer),
752
+ reason: T.nilable(String)
753
+ }
754
+ )
755
+ end
756
+ def to_hash
757
+ end
758
+
759
+ class Filter < Orb::Internal::Type::BaseModel
760
+ OrHash =
761
+ T.type_alias do
762
+ T.any(
763
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter,
764
+ Orb::Internal::AnyHash
765
+ )
766
+ end
767
+
768
+ # The property of the price to filter on.
769
+ sig do
770
+ returns(
771
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
772
+ )
773
+ end
774
+ attr_accessor :field
775
+
776
+ # Should prices that match the filter be included or excluded.
777
+ sig do
778
+ returns(
779
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
780
+ )
781
+ end
782
+ attr_accessor :operator
783
+
784
+ # The IDs or values that match this filter.
785
+ sig { returns(T::Array[String]) }
786
+ attr_accessor :values
787
+
788
+ sig do
789
+ params(
790
+ field:
791
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter::Field::OrSymbol,
792
+ operator:
793
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter::Operator::OrSymbol,
794
+ values: T::Array[String]
795
+ ).returns(T.attached_class)
796
+ end
797
+ def self.new(
798
+ # The property of the price to filter on.
799
+ field:,
800
+ # Should prices that match the filter be included or excluded.
801
+ operator:,
802
+ # The IDs or values that match this filter.
803
+ values:
804
+ )
805
+ end
806
+
807
+ sig do
808
+ override.returns(
809
+ {
810
+ field:
811
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol,
812
+ operator:
813
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol,
814
+ values: T::Array[String]
815
+ }
816
+ )
817
+ end
818
+ def to_hash
819
+ end
820
+
821
+ # The property of the price to filter on.
822
+ module Field
823
+ extend Orb::Internal::Type::Enum
824
+
825
+ TaggedSymbol =
826
+ T.type_alias do
827
+ T.all(
828
+ Symbol,
829
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter::Field
830
+ )
831
+ end
832
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
833
+
834
+ PRICE_ID =
835
+ T.let(
836
+ :price_id,
837
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
838
+ )
839
+ ITEM_ID =
840
+ T.let(
841
+ :item_id,
842
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
843
+ )
844
+ PRICE_TYPE =
845
+ T.let(
846
+ :price_type,
847
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
848
+ )
849
+ CURRENCY =
850
+ T.let(
851
+ :currency,
852
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
853
+ )
854
+ PRICING_UNIT_ID =
855
+ T.let(
856
+ :pricing_unit_id,
857
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
858
+ )
859
+
860
+ sig do
861
+ override.returns(
862
+ T::Array[
863
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
864
+ ]
865
+ )
866
+ end
867
+ def self.values
868
+ end
869
+ end
870
+
871
+ # Should prices that match the filter be included or excluded.
872
+ module Operator
873
+ extend Orb::Internal::Type::Enum
874
+
875
+ TaggedSymbol =
876
+ T.type_alias do
877
+ T.all(
878
+ Symbol,
879
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter::Operator
880
+ )
881
+ end
882
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
883
+
884
+ INCLUDES =
885
+ T.let(
886
+ :includes,
887
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
888
+ )
889
+ EXCLUDES =
890
+ T.let(
891
+ :excludes,
892
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
893
+ )
894
+
895
+ sig do
896
+ override.returns(
897
+ T::Array[
898
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
899
+ ]
900
+ )
901
+ end
902
+ def self.values
903
+ end
904
+ end
905
+ end
906
+ end
907
+
908
+ class Minimum < Orb::Internal::Type::BaseModel
909
+ OrHash =
910
+ T.type_alias do
911
+ T.any(
912
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum,
913
+ Orb::Internal::AnyHash
914
+ )
915
+ end
916
+
917
+ sig { returns(String) }
918
+ attr_accessor :id
919
+
920
+ sig { returns(Symbol) }
921
+ attr_accessor :adjustment_type
922
+
923
+ # The price IDs that this adjustment applies to.
924
+ sig { returns(T::Array[String]) }
925
+ attr_accessor :applies_to_price_ids
926
+
927
+ # The filters that determine which prices to apply this adjustment to.
928
+ sig do
929
+ returns(
930
+ T::Array[
931
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter
932
+ ]
933
+ )
934
+ end
935
+ attr_accessor :filters
936
+
937
+ # True for adjustments that apply to an entire invocice, false for adjustments
938
+ # that apply to only one price.
939
+ sig { returns(T::Boolean) }
940
+ attr_accessor :is_invoice_level
941
+
942
+ # The item ID that revenue from this minimum will be attributed to.
943
+ sig { returns(String) }
944
+ attr_accessor :item_id
945
+
946
+ # The minimum amount to charge in a given billing period for the prices this
947
+ # adjustment applies to.
948
+ sig { returns(String) }
949
+ attr_accessor :minimum_amount
950
+
951
+ # The plan phase in which this adjustment is active.
952
+ sig { returns(T.nilable(Integer)) }
953
+ attr_accessor :plan_phase_order
954
+
955
+ # The reason for the adjustment.
956
+ sig { returns(T.nilable(String)) }
957
+ attr_accessor :reason
958
+
959
+ sig do
960
+ params(
961
+ id: String,
962
+ applies_to_price_ids: T::Array[String],
963
+ filters:
964
+ T::Array[
965
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter::OrHash
966
+ ],
967
+ is_invoice_level: T::Boolean,
968
+ item_id: String,
969
+ minimum_amount: String,
970
+ plan_phase_order: T.nilable(Integer),
971
+ reason: T.nilable(String),
972
+ adjustment_type: Symbol
973
+ ).returns(T.attached_class)
974
+ end
975
+ def self.new(
976
+ id:,
977
+ # The price IDs that this adjustment applies to.
978
+ applies_to_price_ids:,
979
+ # The filters that determine which prices to apply this adjustment to.
980
+ filters:,
981
+ # True for adjustments that apply to an entire invocice, false for adjustments
982
+ # that apply to only one price.
983
+ is_invoice_level:,
984
+ # The item ID that revenue from this minimum will be attributed to.
985
+ item_id:,
986
+ # The minimum amount to charge in a given billing period for the prices this
987
+ # adjustment applies to.
988
+ minimum_amount:,
989
+ # The plan phase in which this adjustment is active.
990
+ plan_phase_order:,
991
+ # The reason for the adjustment.
992
+ reason:,
993
+ adjustment_type: :minimum
994
+ )
995
+ end
996
+
997
+ sig do
998
+ override.returns(
999
+ {
1000
+ id: String,
1001
+ adjustment_type: Symbol,
1002
+ applies_to_price_ids: T::Array[String],
1003
+ filters:
1004
+ T::Array[
1005
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter
1006
+ ],
1007
+ is_invoice_level: T::Boolean,
1008
+ item_id: String,
1009
+ minimum_amount: String,
1010
+ plan_phase_order: T.nilable(Integer),
1011
+ reason: T.nilable(String)
1012
+ }
1013
+ )
1014
+ end
1015
+ def to_hash
1016
+ end
1017
+
1018
+ class Filter < Orb::Internal::Type::BaseModel
1019
+ OrHash =
1020
+ T.type_alias do
1021
+ T.any(
1022
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter,
1023
+ Orb::Internal::AnyHash
1024
+ )
1025
+ end
1026
+
1027
+ # The property of the price to filter on.
1028
+ sig do
1029
+ returns(
1030
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
1031
+ )
1032
+ end
1033
+ attr_accessor :field
1034
+
1035
+ # Should prices that match the filter be included or excluded.
1036
+ sig do
1037
+ returns(
1038
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter::Operator::TaggedSymbol
1039
+ )
1040
+ end
1041
+ attr_accessor :operator
1042
+
1043
+ # The IDs or values that match this filter.
1044
+ sig { returns(T::Array[String]) }
1045
+ attr_accessor :values
1046
+
1047
+ sig do
1048
+ params(
1049
+ field:
1050
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter::Field::OrSymbol,
1051
+ operator:
1052
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter::Operator::OrSymbol,
1053
+ values: T::Array[String]
1054
+ ).returns(T.attached_class)
1055
+ end
1056
+ def self.new(
1057
+ # The property of the price to filter on.
1058
+ field:,
1059
+ # Should prices that match the filter be included or excluded.
1060
+ operator:,
1061
+ # The IDs or values that match this filter.
1062
+ values:
1063
+ )
1064
+ end
1065
+
1066
+ sig do
1067
+ override.returns(
1068
+ {
1069
+ field:
1070
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol,
1071
+ operator:
1072
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter::Operator::TaggedSymbol,
1073
+ values: T::Array[String]
1074
+ }
1075
+ )
1076
+ end
1077
+ def to_hash
1078
+ end
1079
+
1080
+ # The property of the price to filter on.
1081
+ module Field
1082
+ extend Orb::Internal::Type::Enum
1083
+
1084
+ TaggedSymbol =
1085
+ T.type_alias do
1086
+ T.all(
1087
+ Symbol,
1088
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter::Field
1089
+ )
1090
+ end
1091
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1092
+
1093
+ PRICE_ID =
1094
+ T.let(
1095
+ :price_id,
1096
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
1097
+ )
1098
+ ITEM_ID =
1099
+ T.let(
1100
+ :item_id,
1101
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
1102
+ )
1103
+ PRICE_TYPE =
1104
+ T.let(
1105
+ :price_type,
1106
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
1107
+ )
1108
+ CURRENCY =
1109
+ T.let(
1110
+ :currency,
1111
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
1112
+ )
1113
+ PRICING_UNIT_ID =
1114
+ T.let(
1115
+ :pricing_unit_id,
1116
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
1117
+ )
1118
+
1119
+ sig do
1120
+ override.returns(
1121
+ T::Array[
1122
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter::Field::TaggedSymbol
1123
+ ]
1124
+ )
1125
+ end
1126
+ def self.values
1127
+ end
1128
+ end
1129
+
1130
+ # Should prices that match the filter be included or excluded.
1131
+ module Operator
1132
+ extend Orb::Internal::Type::Enum
1133
+
1134
+ TaggedSymbol =
1135
+ T.type_alias do
1136
+ T.all(
1137
+ Symbol,
1138
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter::Operator
1139
+ )
1140
+ end
1141
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1142
+
1143
+ INCLUDES =
1144
+ T.let(
1145
+ :includes,
1146
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter::Operator::TaggedSymbol
1147
+ )
1148
+ EXCLUDES =
1149
+ T.let(
1150
+ :excludes,
1151
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter::Operator::TaggedSymbol
1152
+ )
1153
+
1154
+ sig do
1155
+ override.returns(
1156
+ T::Array[
1157
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Minimum::Filter::Operator::TaggedSymbol
1158
+ ]
1159
+ )
1160
+ end
1161
+ def self.values
1162
+ end
1163
+ end
1164
+ end
1165
+ end
1166
+
1167
+ class Maximum < Orb::Internal::Type::BaseModel
1168
+ OrHash =
1169
+ T.type_alias do
1170
+ T.any(
1171
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum,
1172
+ Orb::Internal::AnyHash
1173
+ )
1174
+ end
1175
+
1176
+ sig { returns(String) }
1177
+ attr_accessor :id
1178
+
1179
+ sig { returns(Symbol) }
1180
+ attr_accessor :adjustment_type
1181
+
1182
+ # The price IDs that this adjustment applies to.
1183
+ sig { returns(T::Array[String]) }
1184
+ attr_accessor :applies_to_price_ids
1185
+
1186
+ # The filters that determine which prices to apply this adjustment to.
1187
+ sig do
1188
+ returns(
1189
+ T::Array[
1190
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter
1191
+ ]
1192
+ )
1193
+ end
1194
+ attr_accessor :filters
1195
+
1196
+ # True for adjustments that apply to an entire invocice, false for adjustments
1197
+ # that apply to only one price.
1198
+ sig { returns(T::Boolean) }
1199
+ attr_accessor :is_invoice_level
1200
+
1201
+ # The maximum amount to charge in a given billing period for the prices this
1202
+ # adjustment applies to.
1203
+ sig { returns(String) }
1204
+ attr_accessor :maximum_amount
1205
+
1206
+ # The plan phase in which this adjustment is active.
1207
+ sig { returns(T.nilable(Integer)) }
1208
+ attr_accessor :plan_phase_order
1209
+
1210
+ # The reason for the adjustment.
1211
+ sig { returns(T.nilable(String)) }
1212
+ attr_accessor :reason
1213
+
1214
+ sig do
1215
+ params(
1216
+ id: String,
1217
+ applies_to_price_ids: T::Array[String],
1218
+ filters:
1219
+ T::Array[
1220
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter::OrHash
1221
+ ],
1222
+ is_invoice_level: T::Boolean,
1223
+ maximum_amount: String,
1224
+ plan_phase_order: T.nilable(Integer),
1225
+ reason: T.nilable(String),
1226
+ adjustment_type: Symbol
1227
+ ).returns(T.attached_class)
1228
+ end
1229
+ def self.new(
1230
+ id:,
1231
+ # The price IDs that this adjustment applies to.
1232
+ applies_to_price_ids:,
1233
+ # The filters that determine which prices to apply this adjustment to.
1234
+ filters:,
1235
+ # True for adjustments that apply to an entire invocice, false for adjustments
1236
+ # that apply to only one price.
1237
+ is_invoice_level:,
1238
+ # The maximum amount to charge in a given billing period for the prices this
1239
+ # adjustment applies to.
1240
+ maximum_amount:,
1241
+ # The plan phase in which this adjustment is active.
1242
+ plan_phase_order:,
1243
+ # The reason for the adjustment.
1244
+ reason:,
1245
+ adjustment_type: :maximum
1246
+ )
1247
+ end
1248
+
1249
+ sig do
1250
+ override.returns(
1251
+ {
1252
+ id: String,
1253
+ adjustment_type: Symbol,
1254
+ applies_to_price_ids: T::Array[String],
1255
+ filters:
1256
+ T::Array[
1257
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter
1258
+ ],
1259
+ is_invoice_level: T::Boolean,
1260
+ maximum_amount: String,
1261
+ plan_phase_order: T.nilable(Integer),
1262
+ reason: T.nilable(String)
1263
+ }
1264
+ )
1265
+ end
1266
+ def to_hash
1267
+ end
1268
+
1269
+ class Filter < Orb::Internal::Type::BaseModel
1270
+ OrHash =
1271
+ T.type_alias do
1272
+ T.any(
1273
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter,
1274
+ Orb::Internal::AnyHash
1275
+ )
1276
+ end
1277
+
1278
+ # The property of the price to filter on.
1279
+ sig do
1280
+ returns(
1281
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
1282
+ )
1283
+ end
1284
+ attr_accessor :field
1285
+
1286
+ # Should prices that match the filter be included or excluded.
1287
+ sig do
1288
+ returns(
1289
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter::Operator::TaggedSymbol
1290
+ )
1291
+ end
1292
+ attr_accessor :operator
1293
+
1294
+ # The IDs or values that match this filter.
1295
+ sig { returns(T::Array[String]) }
1296
+ attr_accessor :values
1297
+
1298
+ sig do
1299
+ params(
1300
+ field:
1301
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter::Field::OrSymbol,
1302
+ operator:
1303
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter::Operator::OrSymbol,
1304
+ values: T::Array[String]
1305
+ ).returns(T.attached_class)
1306
+ end
1307
+ def self.new(
1308
+ # The property of the price to filter on.
1309
+ field:,
1310
+ # Should prices that match the filter be included or excluded.
1311
+ operator:,
1312
+ # The IDs or values that match this filter.
1313
+ values:
1314
+ )
1315
+ end
1316
+
1317
+ sig do
1318
+ override.returns(
1319
+ {
1320
+ field:
1321
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol,
1322
+ operator:
1323
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter::Operator::TaggedSymbol,
1324
+ values: T::Array[String]
1325
+ }
1326
+ )
1327
+ end
1328
+ def to_hash
1329
+ end
1330
+
1331
+ # The property of the price to filter on.
1332
+ module Field
1333
+ extend Orb::Internal::Type::Enum
1334
+
1335
+ TaggedSymbol =
1336
+ T.type_alias do
1337
+ T.all(
1338
+ Symbol,
1339
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter::Field
1340
+ )
1341
+ end
1342
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1343
+
1344
+ PRICE_ID =
1345
+ T.let(
1346
+ :price_id,
1347
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
1348
+ )
1349
+ ITEM_ID =
1350
+ T.let(
1351
+ :item_id,
1352
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
1353
+ )
1354
+ PRICE_TYPE =
1355
+ T.let(
1356
+ :price_type,
1357
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
1358
+ )
1359
+ CURRENCY =
1360
+ T.let(
1361
+ :currency,
1362
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
1363
+ )
1364
+ PRICING_UNIT_ID =
1365
+ T.let(
1366
+ :pricing_unit_id,
1367
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
1368
+ )
1369
+
1370
+ sig do
1371
+ override.returns(
1372
+ T::Array[
1373
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter::Field::TaggedSymbol
1374
+ ]
1375
+ )
1376
+ end
1377
+ def self.values
1378
+ end
1379
+ end
1380
+
1381
+ # Should prices that match the filter be included or excluded.
1382
+ module Operator
1383
+ extend Orb::Internal::Type::Enum
1384
+
1385
+ TaggedSymbol =
1386
+ T.type_alias do
1387
+ T.all(
1388
+ Symbol,
1389
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter::Operator
1390
+ )
1391
+ end
1392
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1393
+
1394
+ INCLUDES =
1395
+ T.let(
1396
+ :includes,
1397
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter::Operator::TaggedSymbol
1398
+ )
1399
+ EXCLUDES =
1400
+ T.let(
1401
+ :excludes,
1402
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter::Operator::TaggedSymbol
1403
+ )
1404
+
1405
+ sig do
1406
+ override.returns(
1407
+ T::Array[
1408
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Maximum::Filter::Operator::TaggedSymbol
1409
+ ]
1410
+ )
1411
+ end
1412
+ def self.values
1413
+ end
1414
+ end
1415
+ end
1416
+ end
1417
+
1418
+ sig do
1419
+ override.returns(
1420
+ T::Array[
1421
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::Adjustment::Variants
1422
+ ]
1423
+ )
1424
+ end
1425
+ def self.variants
1426
+ end
1427
+ end
1428
+
1429
+ class PlanPhase < Orb::Internal::Type::BaseModel
1430
+ OrHash =
1431
+ T.type_alias do
1432
+ T.any(
1433
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::PlanPhase,
1434
+ Orb::Internal::AnyHash
1435
+ )
1436
+ end
1437
+
1438
+ sig { returns(String) }
1439
+ attr_accessor :id
1440
+
1441
+ sig { returns(T.nilable(String)) }
1442
+ attr_accessor :description
1443
+
1444
+ # How many terms of length `duration_unit` this phase is active for. If null, this
1445
+ # phase is evergreen and active indefinitely
1446
+ sig { returns(T.nilable(Integer)) }
1447
+ attr_accessor :duration
1448
+
1449
+ sig do
1450
+ returns(
1451
+ T.nilable(
1452
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::PlanPhase::DurationUnit::TaggedSymbol
1453
+ )
1454
+ )
1455
+ end
1456
+ attr_accessor :duration_unit
1457
+
1458
+ sig { returns(String) }
1459
+ attr_accessor :name
1460
+
1461
+ # Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
1462
+ sig { returns(Integer) }
1463
+ attr_accessor :order
1464
+
1465
+ sig do
1466
+ params(
1467
+ id: String,
1468
+ description: T.nilable(String),
1469
+ duration: T.nilable(Integer),
1470
+ duration_unit:
1471
+ T.nilable(
1472
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::PlanPhase::DurationUnit::OrSymbol
1473
+ ),
1474
+ name: String,
1475
+ order: Integer
1476
+ ).returns(T.attached_class)
1477
+ end
1478
+ def self.new(
1479
+ id:,
1480
+ description:,
1481
+ # How many terms of length `duration_unit` this phase is active for. If null, this
1482
+ # phase is evergreen and active indefinitely
1483
+ duration:,
1484
+ duration_unit:,
1485
+ name:,
1486
+ # Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
1487
+ order:
1488
+ )
1489
+ end
1490
+
1491
+ sig do
1492
+ override.returns(
1493
+ {
1494
+ id: String,
1495
+ description: T.nilable(String),
1496
+ duration: T.nilable(Integer),
1497
+ duration_unit:
1498
+ T.nilable(
1499
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::PlanPhase::DurationUnit::TaggedSymbol
1500
+ ),
1501
+ name: String,
1502
+ order: Integer
1503
+ }
1504
+ )
1505
+ end
1506
+ def to_hash
1507
+ end
1508
+
1509
+ module DurationUnit
1510
+ extend Orb::Internal::Type::Enum
1511
+
1512
+ TaggedSymbol =
1513
+ T.type_alias do
1514
+ T.all(
1515
+ Symbol,
1516
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::PlanPhase::DurationUnit
1517
+ )
1518
+ end
1519
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1520
+
1521
+ DAILY =
1522
+ T.let(
1523
+ :daily,
1524
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::PlanPhase::DurationUnit::TaggedSymbol
1525
+ )
1526
+ MONTHLY =
1527
+ T.let(
1528
+ :monthly,
1529
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::PlanPhase::DurationUnit::TaggedSymbol
1530
+ )
1531
+ QUARTERLY =
1532
+ T.let(
1533
+ :quarterly,
1534
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::PlanPhase::DurationUnit::TaggedSymbol
1535
+ )
1536
+ SEMI_ANNUAL =
1537
+ T.let(
1538
+ :semi_annual,
1539
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::PlanPhase::DurationUnit::TaggedSymbol
1540
+ )
1541
+ ANNUAL =
1542
+ T.let(
1543
+ :annual,
1544
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::PlanPhase::DurationUnit::TaggedSymbol
1545
+ )
1546
+
1547
+ sig do
1548
+ override.returns(
1549
+ T::Array[
1550
+ Orb::Models::Plans::ExternalPlanID::VersionCreateResponse::PlanPhase::DurationUnit::TaggedSymbol
1551
+ ]
1552
+ )
1553
+ end
1554
+ def self.values
1555
+ end
1556
+ end
1557
+ end
1558
+ end
1559
+ end
1560
+ end
1561
+ end
1562
+ end