stigg 0.1.0.pre.alpha.2 → 0.1.0.pre.alpha.3

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 (132) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/stigg/internal/type/base_model.rb +2 -2
  5. data/lib/stigg/models/v1/{coupon_create_response.rb → coupon.rb} +24 -24
  6. data/lib/stigg/models/v1/customer_import_params.rb +75 -0
  7. data/lib/stigg/models/v1/customer_import_response.rb +35 -0
  8. data/lib/stigg/models/v1/{customer_create_params.rb → customer_provision_params.rb} +16 -16
  9. data/lib/stigg/models/v1/customer_response.rb +1 -1
  10. data/lib/stigg/models/v1/customers/promotional_entitlement_grant_params.rb +296 -0
  11. data/lib/stigg/models/v1/customers/promotional_entitlement_grant_response.rb +341 -0
  12. data/lib/stigg/models/v1/customers/promotional_entitlement_revoke_params.rb +24 -0
  13. data/lib/stigg/models/v1/customers/promotional_entitlement_revoke_response.rb +342 -0
  14. data/lib/stigg/models/v1/event_report_params.rb +91 -0
  15. data/lib/stigg/models/v1/event_report_response.rb +25 -0
  16. data/lib/stigg/models/v1/{subscription_retrieve_response.rb → subscription.rb} +30 -29
  17. data/lib/stigg/models/v1/subscription_cancel_params.rb +75 -0
  18. data/lib/stigg/models/v1/subscription_import_params.rb +92 -0
  19. data/lib/stigg/models/v1/subscription_import_response.rb +32 -0
  20. data/lib/stigg/models/v1/{subscription_create_params.rb → subscription_provision_params.rb} +118 -118
  21. data/lib/stigg/models/v1/{subscription_create_response.rb → subscription_provision_response.rb} +76 -75
  22. data/lib/stigg/models/v1/subscription_update_params.rb +1114 -0
  23. data/lib/stigg/models/v1/subscriptions/{future_update_cancel_pending_payment_response.rb → cancel_subscription.rb} +7 -5
  24. data/lib/stigg/models/v1/usage_history_params.rb +54 -0
  25. data/lib/stigg/models/v1/usage_history_response.rb +155 -0
  26. data/lib/stigg/models/v1/usage_report_params.rb +114 -0
  27. data/lib/stigg/models/v1/usage_report_response.rb +120 -0
  28. data/lib/stigg/models.rb +0 -4
  29. data/lib/stigg/resources/v1/coupons.rb +4 -4
  30. data/lib/stigg/resources/v1/customers/promotional_entitlements.rb +69 -0
  31. data/lib/stigg/resources/v1/customers.rb +59 -37
  32. data/lib/stigg/resources/v1/events.rb +38 -0
  33. data/lib/stigg/resources/v1/subscriptions/future_update.rb +4 -4
  34. data/lib/stigg/resources/v1/subscriptions.rb +166 -64
  35. data/lib/stigg/resources/v1/usage.rb +79 -0
  36. data/lib/stigg/resources/v1.rb +6 -42
  37. data/lib/stigg/version.rb +1 -1
  38. data/lib/stigg.rb +25 -16
  39. data/rbi/stigg/models/v1/{coupon_create_response.rbi → coupon.rbi} +156 -252
  40. data/rbi/stigg/models/v1/customer_import_params.rbi +130 -0
  41. data/rbi/stigg/models/v1/customer_import_response.rbi +76 -0
  42. data/rbi/stigg/models/v1/{customer_create_params.rbi → customer_provision_params.rbi} +35 -35
  43. data/rbi/stigg/models/v1/customers/promotional_entitlement_grant_params.rbi +640 -0
  44. data/rbi/stigg/models/v1/customers/promotional_entitlement_grant_response.rbi +690 -0
  45. data/rbi/stigg/models/v1/customers/promotional_entitlement_revoke_params.rbi +42 -0
  46. data/rbi/stigg/models/v1/customers/promotional_entitlement_revoke_response.rbi +696 -0
  47. data/rbi/stigg/models/v1/event_report_params.rbi +168 -0
  48. data/rbi/stigg/models/v1/event_report_response.rbi +35 -0
  49. data/rbi/stigg/models/v1/{subscription_migrate_response.rbi → subscription.rbi} +66 -117
  50. data/rbi/stigg/models/v1/subscription_cancel_params.rbi +182 -0
  51. data/rbi/stigg/models/v1/subscription_import_params.rbi +148 -0
  52. data/rbi/stigg/models/v1/subscription_import_response.rbi +69 -0
  53. data/rbi/stigg/models/v1/{subscription_create_params.rbi → subscription_provision_params.rbi} +794 -773
  54. data/rbi/stigg/models/v1/{subscription_create_response.rbi → subscription_provision_response.rbi} +481 -481
  55. data/rbi/stigg/models/v1/subscription_update_params.rbi +3578 -0
  56. data/rbi/stigg/models/v1/subscriptions/{future_update_cancel_schedule_response.rbi → cancel_subscription.rbi} +9 -16
  57. data/rbi/stigg/models/v1/usage_history_params.rbi +79 -0
  58. data/rbi/stigg/models/v1/usage_history_response.rbi +347 -0
  59. data/rbi/stigg/models/v1/usage_report_params.rbi +227 -0
  60. data/rbi/stigg/models/v1/usage_report_response.rbi +162 -0
  61. data/rbi/stigg/models.rbi +0 -4
  62. data/rbi/stigg/resources/v1/coupons.rbi +2 -2
  63. data/rbi/stigg/resources/v1/customers/promotional_entitlements.rbi +57 -0
  64. data/rbi/stigg/resources/v1/customers.rbi +53 -36
  65. data/rbi/stigg/resources/v1/events.rbi +28 -0
  66. data/rbi/stigg/resources/v1/subscriptions/future_update.rbi +2 -6
  67. data/rbi/stigg/resources/v1/subscriptions.rbi +179 -74
  68. data/rbi/stigg/resources/v1/usage.rbi +57 -0
  69. data/rbi/stigg/resources/v1.rbi +4 -26
  70. data/sig/stigg/models/v1/{coupon_create_response.rbs → coupon.rbs} +29 -32
  71. data/sig/stigg/models/v1/customer_import_params.rbs +74 -0
  72. data/sig/stigg/models/v1/customer_import_response.rbs +30 -0
  73. data/sig/stigg/models/v1/{customer_create_params.rbs → customer_provision_params.rbs} +22 -22
  74. data/sig/stigg/models/v1/customers/promotional_entitlement_grant_params.rbs +234 -0
  75. data/sig/stigg/models/v1/customers/promotional_entitlement_grant_response.rbs +281 -0
  76. data/sig/stigg/models/v1/customers/promotional_entitlement_revoke_params.rbs +27 -0
  77. data/sig/stigg/models/v1/customers/promotional_entitlement_revoke_response.rbs +281 -0
  78. data/sig/stigg/models/v1/event_report_params.rbs +82 -0
  79. data/sig/stigg/models/v1/event_report_response.rbs +15 -0
  80. data/sig/stigg/models/v1/{subscription_retrieve_response.rbs → subscription.rbs} +36 -41
  81. data/sig/stigg/models/v1/subscription_cancel_params.rbs +79 -0
  82. data/sig/stigg/models/v1/subscription_import_params.rbs +84 -0
  83. data/sig/stigg/models/v1/subscription_import_response.rbs +30 -0
  84. data/sig/stigg/models/v1/{subscription_create_params.rbs → subscription_provision_params.rbs} +200 -200
  85. data/sig/stigg/models/v1/{subscription_create_response.rbs → subscription_provision_response.rbs} +106 -106
  86. data/sig/stigg/models/v1/subscription_update_params.rbs +1544 -0
  87. data/sig/stigg/models/v1/subscriptions/cancel_subscription.rbs +34 -0
  88. data/sig/stigg/models/v1/usage_history_params.rbs +52 -0
  89. data/sig/stigg/models/v1/usage_history_response.rbs +129 -0
  90. data/sig/stigg/models/v1/usage_report_params.rbs +102 -0
  91. data/sig/stigg/models/v1/usage_report_response.rbs +87 -0
  92. data/sig/stigg/models.rbs +0 -4
  93. data/sig/stigg/resources/v1/coupons.rbs +2 -2
  94. data/sig/stigg/resources/v1/customers/promotional_entitlements.rbs +23 -0
  95. data/sig/stigg/resources/v1/customers.rbs +17 -12
  96. data/sig/stigg/resources/v1/events.rbs +14 -0
  97. data/sig/stigg/resources/v1/subscriptions/future_update.rbs +2 -2
  98. data/sig/stigg/resources/v1/subscriptions.rbs +65 -32
  99. data/sig/stigg/resources/v1/usage.rbs +24 -0
  100. data/sig/stigg/resources/v1.rbs +2 -8
  101. metadata +77 -50
  102. data/lib/stigg/models/v1/coupon_retrieve_response.rb +0 -322
  103. data/lib/stigg/models/v1/subscription_delegate_response.rb +0 -314
  104. data/lib/stigg/models/v1/subscription_migrate_response.rb +0 -314
  105. data/lib/stigg/models/v1/subscription_transfer_response.rb +0 -314
  106. data/lib/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rb +0 -34
  107. data/lib/stigg/models/v1_create_event_params.rb +0 -89
  108. data/lib/stigg/models/v1_create_event_response.rb +0 -23
  109. data/lib/stigg/models/v1_create_usage_params.rb +0 -112
  110. data/lib/stigg/models/v1_create_usage_response.rb +0 -118
  111. data/lib/stigg/resources/v1/customers/usage.rb +0 -18
  112. data/rbi/stigg/models/v1/coupon_retrieve_response.rbi +0 -987
  113. data/rbi/stigg/models/v1/subscription_delegate_response.rbi +0 -618
  114. data/rbi/stigg/models/v1/subscription_retrieve_response.rbi +0 -618
  115. data/rbi/stigg/models/v1/subscription_transfer_response.rbi +0 -618
  116. data/rbi/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbi +0 -80
  117. data/rbi/stigg/models/v1_create_event_params.rbi +0 -161
  118. data/rbi/stigg/models/v1_create_event_response.rbi +0 -30
  119. data/rbi/stigg/models/v1_create_usage_params.rbi +0 -217
  120. data/rbi/stigg/models/v1_create_usage_response.rbi +0 -157
  121. data/rbi/stigg/resources/v1/customers/usage.rbi +0 -16
  122. data/sig/stigg/models/v1/coupon_retrieve_response.rbs +0 -394
  123. data/sig/stigg/models/v1/subscription_delegate_response.rbs +0 -255
  124. data/sig/stigg/models/v1/subscription_migrate_response.rbs +0 -255
  125. data/sig/stigg/models/v1/subscription_transfer_response.rbs +0 -255
  126. data/sig/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbs +0 -34
  127. data/sig/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rbs +0 -34
  128. data/sig/stigg/models/v1_create_event_params.rbs +0 -80
  129. data/sig/stigg/models/v1_create_event_response.rbs +0 -13
  130. data/sig/stigg/models/v1_create_usage_params.rbs +0 -100
  131. data/sig/stigg/models/v1_create_usage_response.rbs +0 -85
  132. data/sig/stigg/resources/v1/customers/usage.rbs +0 -11
@@ -0,0 +1,640 @@
1
+ # typed: strong
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ module Customers
7
+ class PromotionalEntitlementGrantParams < Stigg::Internal::Type::BaseModel
8
+ extend Stigg::Internal::Type::RequestParameters::Converter
9
+ include Stigg::Internal::Type::RequestParameters
10
+
11
+ OrHash =
12
+ T.type_alias do
13
+ T.any(
14
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams,
15
+ Stigg::Internal::AnyHash
16
+ )
17
+ end
18
+
19
+ # Promotional entitlements to grant
20
+ sig do
21
+ returns(
22
+ T::Array[
23
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement
24
+ ]
25
+ )
26
+ end
27
+ attr_accessor :promotional_entitlements
28
+
29
+ sig do
30
+ params(
31
+ promotional_entitlements:
32
+ T::Array[
33
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::OrHash
34
+ ],
35
+ request_options: Stigg::RequestOptions::OrHash
36
+ ).returns(T.attached_class)
37
+ end
38
+ def self.new(
39
+ # Promotional entitlements to grant
40
+ promotional_entitlements:,
41
+ request_options: {}
42
+ )
43
+ end
44
+
45
+ sig do
46
+ override.returns(
47
+ {
48
+ promotional_entitlements:
49
+ T::Array[
50
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement
51
+ ],
52
+ request_options: Stigg::RequestOptions
53
+ }
54
+ )
55
+ end
56
+ def to_hash
57
+ end
58
+
59
+ class PromotionalEntitlement < Stigg::Internal::Type::BaseModel
60
+ OrHash =
61
+ T.type_alias do
62
+ T.any(
63
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement,
64
+ Stigg::Internal::AnyHash
65
+ )
66
+ end
67
+
68
+ # The custom end date of the promotional entitlement
69
+ sig { returns(T.nilable(Time)) }
70
+ attr_accessor :custom_end_date
71
+
72
+ # The enum values of the entitlement
73
+ sig { returns(T.nilable(T::Array[String])) }
74
+ attr_accessor :enum_values
75
+
76
+ # The unique identifier of the entitlement feature
77
+ sig { returns(String) }
78
+ attr_accessor :feature_id
79
+
80
+ # Whether the entitlement has a soft limit
81
+ sig { returns(T.nilable(T::Boolean)) }
82
+ attr_accessor :has_soft_limit
83
+
84
+ # Whether the entitlement has an unlimited usage
85
+ sig { returns(T.nilable(T::Boolean)) }
86
+ attr_accessor :has_unlimited_usage
87
+
88
+ # Whether the entitlement is visible
89
+ sig { returns(T.nilable(T::Boolean)) }
90
+ attr_accessor :is_visible
91
+
92
+ # The monthly reset period configuration of the entitlement, defined when reset
93
+ # period is monthly
94
+ sig do
95
+ returns(
96
+ T.nilable(
97
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::MonthlyResetPeriodConfiguration
98
+ )
99
+ )
100
+ end
101
+ attr_reader :monthly_reset_period_configuration
102
+
103
+ sig do
104
+ params(
105
+ monthly_reset_period_configuration:
106
+ T.nilable(
107
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::MonthlyResetPeriodConfiguration::OrHash
108
+ )
109
+ ).void
110
+ end
111
+ attr_writer :monthly_reset_period_configuration
112
+
113
+ # The grant period of the promotional entitlement
114
+ sig do
115
+ returns(
116
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::Period::OrSymbol
117
+ )
118
+ end
119
+ attr_accessor :period
120
+
121
+ # The reset period of the entitlement
122
+ sig do
123
+ returns(
124
+ T.nilable(
125
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::ResetPeriod::OrSymbol
126
+ )
127
+ )
128
+ end
129
+ attr_accessor :reset_period
130
+
131
+ # The usage limit of the entitlement
132
+ sig { returns(T.nilable(Integer)) }
133
+ attr_accessor :usage_limit
134
+
135
+ # The weekly reset period configuration of the entitlement, defined when reset
136
+ # period is weekly
137
+ sig do
138
+ returns(
139
+ T.nilable(
140
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::WeeklyResetPeriodConfiguration
141
+ )
142
+ )
143
+ end
144
+ attr_reader :weekly_reset_period_configuration
145
+
146
+ sig do
147
+ params(
148
+ weekly_reset_period_configuration:
149
+ T.nilable(
150
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::WeeklyResetPeriodConfiguration::OrHash
151
+ )
152
+ ).void
153
+ end
154
+ attr_writer :weekly_reset_period_configuration
155
+
156
+ # The yearly reset period configuration of the entitlement, defined when reset
157
+ # period is yearly
158
+ sig do
159
+ returns(
160
+ T.nilable(
161
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::YearlyResetPeriodConfiguration
162
+ )
163
+ )
164
+ end
165
+ attr_reader :yearly_reset_period_configuration
166
+
167
+ sig do
168
+ params(
169
+ yearly_reset_period_configuration:
170
+ T.nilable(
171
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::YearlyResetPeriodConfiguration::OrHash
172
+ )
173
+ ).void
174
+ end
175
+ attr_writer :yearly_reset_period_configuration
176
+
177
+ # Single entitlement grant config
178
+ sig do
179
+ params(
180
+ custom_end_date: T.nilable(Time),
181
+ enum_values: T.nilable(T::Array[String]),
182
+ feature_id: String,
183
+ has_soft_limit: T.nilable(T::Boolean),
184
+ has_unlimited_usage: T.nilable(T::Boolean),
185
+ is_visible: T.nilable(T::Boolean),
186
+ monthly_reset_period_configuration:
187
+ T.nilable(
188
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::MonthlyResetPeriodConfiguration::OrHash
189
+ ),
190
+ period:
191
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::Period::OrSymbol,
192
+ reset_period:
193
+ T.nilable(
194
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::ResetPeriod::OrSymbol
195
+ ),
196
+ usage_limit: T.nilable(Integer),
197
+ weekly_reset_period_configuration:
198
+ T.nilable(
199
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::WeeklyResetPeriodConfiguration::OrHash
200
+ ),
201
+ yearly_reset_period_configuration:
202
+ T.nilable(
203
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::YearlyResetPeriodConfiguration::OrHash
204
+ )
205
+ ).returns(T.attached_class)
206
+ end
207
+ def self.new(
208
+ # The custom end date of the promotional entitlement
209
+ custom_end_date:,
210
+ # The enum values of the entitlement
211
+ enum_values:,
212
+ # The unique identifier of the entitlement feature
213
+ feature_id:,
214
+ # Whether the entitlement has a soft limit
215
+ has_soft_limit:,
216
+ # Whether the entitlement has an unlimited usage
217
+ has_unlimited_usage:,
218
+ # Whether the entitlement is visible
219
+ is_visible:,
220
+ # The monthly reset period configuration of the entitlement, defined when reset
221
+ # period is monthly
222
+ monthly_reset_period_configuration:,
223
+ # The grant period of the promotional entitlement
224
+ period:,
225
+ # The reset period of the entitlement
226
+ reset_period:,
227
+ # The usage limit of the entitlement
228
+ usage_limit:,
229
+ # The weekly reset period configuration of the entitlement, defined when reset
230
+ # period is weekly
231
+ weekly_reset_period_configuration:,
232
+ # The yearly reset period configuration of the entitlement, defined when reset
233
+ # period is yearly
234
+ yearly_reset_period_configuration:
235
+ )
236
+ end
237
+
238
+ sig do
239
+ override.returns(
240
+ {
241
+ custom_end_date: T.nilable(Time),
242
+ enum_values: T.nilable(T::Array[String]),
243
+ feature_id: String,
244
+ has_soft_limit: T.nilable(T::Boolean),
245
+ has_unlimited_usage: T.nilable(T::Boolean),
246
+ is_visible: T.nilable(T::Boolean),
247
+ monthly_reset_period_configuration:
248
+ T.nilable(
249
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::MonthlyResetPeriodConfiguration
250
+ ),
251
+ period:
252
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::Period::OrSymbol,
253
+ reset_period:
254
+ T.nilable(
255
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::ResetPeriod::OrSymbol
256
+ ),
257
+ usage_limit: T.nilable(Integer),
258
+ weekly_reset_period_configuration:
259
+ T.nilable(
260
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::WeeklyResetPeriodConfiguration
261
+ ),
262
+ yearly_reset_period_configuration:
263
+ T.nilable(
264
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::YearlyResetPeriodConfiguration
265
+ )
266
+ }
267
+ )
268
+ end
269
+ def to_hash
270
+ end
271
+
272
+ class MonthlyResetPeriodConfiguration < Stigg::Internal::Type::BaseModel
273
+ OrHash =
274
+ T.type_alias do
275
+ T.any(
276
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::MonthlyResetPeriodConfiguration,
277
+ Stigg::Internal::AnyHash
278
+ )
279
+ end
280
+
281
+ # Reset anchor (SubscriptionStart or StartOfTheMonth)
282
+ sig do
283
+ returns(
284
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::MonthlyResetPeriodConfiguration::AccordingTo::OrSymbol
285
+ )
286
+ end
287
+ attr_accessor :according_to
288
+
289
+ # The monthly reset period configuration of the entitlement, defined when reset
290
+ # period is monthly
291
+ sig do
292
+ params(
293
+ according_to:
294
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::MonthlyResetPeriodConfiguration::AccordingTo::OrSymbol
295
+ ).returns(T.attached_class)
296
+ end
297
+ def self.new(
298
+ # Reset anchor (SubscriptionStart or StartOfTheMonth)
299
+ according_to:
300
+ )
301
+ end
302
+
303
+ sig do
304
+ override.returns(
305
+ {
306
+ according_to:
307
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::MonthlyResetPeriodConfiguration::AccordingTo::OrSymbol
308
+ }
309
+ )
310
+ end
311
+ def to_hash
312
+ end
313
+
314
+ # Reset anchor (SubscriptionStart or StartOfTheMonth)
315
+ module AccordingTo
316
+ extend Stigg::Internal::Type::Enum
317
+
318
+ TaggedSymbol =
319
+ T.type_alias do
320
+ T.all(
321
+ Symbol,
322
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::MonthlyResetPeriodConfiguration::AccordingTo
323
+ )
324
+ end
325
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
326
+
327
+ SUBSCRIPTION_START =
328
+ T.let(
329
+ :SubscriptionStart,
330
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::MonthlyResetPeriodConfiguration::AccordingTo::TaggedSymbol
331
+ )
332
+ START_OF_THE_MONTH =
333
+ T.let(
334
+ :StartOfTheMonth,
335
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::MonthlyResetPeriodConfiguration::AccordingTo::TaggedSymbol
336
+ )
337
+
338
+ sig do
339
+ override.returns(
340
+ T::Array[
341
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::MonthlyResetPeriodConfiguration::AccordingTo::TaggedSymbol
342
+ ]
343
+ )
344
+ end
345
+ def self.values
346
+ end
347
+ end
348
+ end
349
+
350
+ # The grant period of the promotional entitlement
351
+ module Period
352
+ extend Stigg::Internal::Type::Enum
353
+
354
+ TaggedSymbol =
355
+ T.type_alias do
356
+ T.all(
357
+ Symbol,
358
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::Period
359
+ )
360
+ end
361
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
362
+
363
+ PERIOD_1_WEEK =
364
+ T.let(
365
+ :"1 week",
366
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::Period::TaggedSymbol
367
+ )
368
+ PERIOD_1_MONTH =
369
+ T.let(
370
+ :"1 month",
371
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::Period::TaggedSymbol
372
+ )
373
+ PERIOD_6_MONTH =
374
+ T.let(
375
+ :"6 month",
376
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::Period::TaggedSymbol
377
+ )
378
+ PERIOD_1_YEAR =
379
+ T.let(
380
+ :"1 year",
381
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::Period::TaggedSymbol
382
+ )
383
+ LIFETIME =
384
+ T.let(
385
+ :lifetime,
386
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::Period::TaggedSymbol
387
+ )
388
+ CUSTOM =
389
+ T.let(
390
+ :custom,
391
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::Period::TaggedSymbol
392
+ )
393
+
394
+ sig do
395
+ override.returns(
396
+ T::Array[
397
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::Period::TaggedSymbol
398
+ ]
399
+ )
400
+ end
401
+ def self.values
402
+ end
403
+ end
404
+
405
+ # The reset period of the entitlement
406
+ module ResetPeriod
407
+ extend Stigg::Internal::Type::Enum
408
+
409
+ TaggedSymbol =
410
+ T.type_alias do
411
+ T.all(
412
+ Symbol,
413
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::ResetPeriod
414
+ )
415
+ end
416
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
417
+
418
+ YEAR =
419
+ T.let(
420
+ :YEAR,
421
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::ResetPeriod::TaggedSymbol
422
+ )
423
+ MONTH =
424
+ T.let(
425
+ :MONTH,
426
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::ResetPeriod::TaggedSymbol
427
+ )
428
+ WEEK =
429
+ T.let(
430
+ :WEEK,
431
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::ResetPeriod::TaggedSymbol
432
+ )
433
+ DAY =
434
+ T.let(
435
+ :DAY,
436
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::ResetPeriod::TaggedSymbol
437
+ )
438
+ HOUR =
439
+ T.let(
440
+ :HOUR,
441
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::ResetPeriod::TaggedSymbol
442
+ )
443
+
444
+ sig do
445
+ override.returns(
446
+ T::Array[
447
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::ResetPeriod::TaggedSymbol
448
+ ]
449
+ )
450
+ end
451
+ def self.values
452
+ end
453
+ end
454
+
455
+ class WeeklyResetPeriodConfiguration < Stigg::Internal::Type::BaseModel
456
+ OrHash =
457
+ T.type_alias do
458
+ T.any(
459
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::WeeklyResetPeriodConfiguration,
460
+ Stigg::Internal::AnyHash
461
+ )
462
+ end
463
+
464
+ # Reset anchor (SubscriptionStart or specific day)
465
+ sig do
466
+ returns(
467
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::WeeklyResetPeriodConfiguration::AccordingTo::OrSymbol
468
+ )
469
+ end
470
+ attr_accessor :according_to
471
+
472
+ # The weekly reset period configuration of the entitlement, defined when reset
473
+ # period is weekly
474
+ sig do
475
+ params(
476
+ according_to:
477
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::WeeklyResetPeriodConfiguration::AccordingTo::OrSymbol
478
+ ).returns(T.attached_class)
479
+ end
480
+ def self.new(
481
+ # Reset anchor (SubscriptionStart or specific day)
482
+ according_to:
483
+ )
484
+ end
485
+
486
+ sig do
487
+ override.returns(
488
+ {
489
+ according_to:
490
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::WeeklyResetPeriodConfiguration::AccordingTo::OrSymbol
491
+ }
492
+ )
493
+ end
494
+ def to_hash
495
+ end
496
+
497
+ # Reset anchor (SubscriptionStart or specific day)
498
+ module AccordingTo
499
+ extend Stigg::Internal::Type::Enum
500
+
501
+ TaggedSymbol =
502
+ T.type_alias do
503
+ T.all(
504
+ Symbol,
505
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::WeeklyResetPeriodConfiguration::AccordingTo
506
+ )
507
+ end
508
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
509
+
510
+ SUBSCRIPTION_START =
511
+ T.let(
512
+ :SubscriptionStart,
513
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::WeeklyResetPeriodConfiguration::AccordingTo::TaggedSymbol
514
+ )
515
+ EVERY_SUNDAY =
516
+ T.let(
517
+ :EverySunday,
518
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::WeeklyResetPeriodConfiguration::AccordingTo::TaggedSymbol
519
+ )
520
+ EVERY_MONDAY =
521
+ T.let(
522
+ :EveryMonday,
523
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::WeeklyResetPeriodConfiguration::AccordingTo::TaggedSymbol
524
+ )
525
+ EVERY_TUESDAY =
526
+ T.let(
527
+ :EveryTuesday,
528
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::WeeklyResetPeriodConfiguration::AccordingTo::TaggedSymbol
529
+ )
530
+ EVERY_WEDNESDAY =
531
+ T.let(
532
+ :EveryWednesday,
533
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::WeeklyResetPeriodConfiguration::AccordingTo::TaggedSymbol
534
+ )
535
+ EVERY_THURSDAY =
536
+ T.let(
537
+ :EveryThursday,
538
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::WeeklyResetPeriodConfiguration::AccordingTo::TaggedSymbol
539
+ )
540
+ EVERY_FRIDAY =
541
+ T.let(
542
+ :EveryFriday,
543
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::WeeklyResetPeriodConfiguration::AccordingTo::TaggedSymbol
544
+ )
545
+ EVERY_SATURDAY =
546
+ T.let(
547
+ :EverySaturday,
548
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::WeeklyResetPeriodConfiguration::AccordingTo::TaggedSymbol
549
+ )
550
+
551
+ sig do
552
+ override.returns(
553
+ T::Array[
554
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::WeeklyResetPeriodConfiguration::AccordingTo::TaggedSymbol
555
+ ]
556
+ )
557
+ end
558
+ def self.values
559
+ end
560
+ end
561
+ end
562
+
563
+ class YearlyResetPeriodConfiguration < Stigg::Internal::Type::BaseModel
564
+ OrHash =
565
+ T.type_alias do
566
+ T.any(
567
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::YearlyResetPeriodConfiguration,
568
+ Stigg::Internal::AnyHash
569
+ )
570
+ end
571
+
572
+ # Reset anchor (SubscriptionStart)
573
+ sig do
574
+ returns(
575
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::YearlyResetPeriodConfiguration::AccordingTo::OrSymbol
576
+ )
577
+ end
578
+ attr_accessor :according_to
579
+
580
+ # The yearly reset period configuration of the entitlement, defined when reset
581
+ # period is yearly
582
+ sig do
583
+ params(
584
+ according_to:
585
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::YearlyResetPeriodConfiguration::AccordingTo::OrSymbol
586
+ ).returns(T.attached_class)
587
+ end
588
+ def self.new(
589
+ # Reset anchor (SubscriptionStart)
590
+ according_to:
591
+ )
592
+ end
593
+
594
+ sig do
595
+ override.returns(
596
+ {
597
+ according_to:
598
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::YearlyResetPeriodConfiguration::AccordingTo::OrSymbol
599
+ }
600
+ )
601
+ end
602
+ def to_hash
603
+ end
604
+
605
+ # Reset anchor (SubscriptionStart)
606
+ module AccordingTo
607
+ extend Stigg::Internal::Type::Enum
608
+
609
+ TaggedSymbol =
610
+ T.type_alias do
611
+ T.all(
612
+ Symbol,
613
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::YearlyResetPeriodConfiguration::AccordingTo
614
+ )
615
+ end
616
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
617
+
618
+ SUBSCRIPTION_START =
619
+ T.let(
620
+ :SubscriptionStart,
621
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::YearlyResetPeriodConfiguration::AccordingTo::TaggedSymbol
622
+ )
623
+
624
+ sig do
625
+ override.returns(
626
+ T::Array[
627
+ Stigg::V1::Customers::PromotionalEntitlementGrantParams::PromotionalEntitlement::YearlyResetPeriodConfiguration::AccordingTo::TaggedSymbol
628
+ ]
629
+ )
630
+ end
631
+ def self.values
632
+ end
633
+ end
634
+ end
635
+ end
636
+ end
637
+ end
638
+ end
639
+ end
640
+ end