stigg 0.1.0.pre.alpha.1

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