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,268 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ module Customers
7
+ # @see Stigg::Resources::V1::Customers::Promotional#create
8
+ class PromotionalCreateResponse < Stigg::Internal::Type::BaseModel
9
+ # @!attribute data
10
+ #
11
+ # @return [Array<Stigg::Models::V1::Customers::PromotionalCreateResponse::Data>]
12
+ required :data,
13
+ -> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::Customers::PromotionalCreateResponse::Data] }
14
+
15
+ # @!method initialize(data:)
16
+ # @param data [Array<Stigg::Models::V1::Customers::PromotionalCreateResponse::Data>]
17
+
18
+ class Data < Stigg::Internal::Type::BaseModel
19
+ # @!attribute id
20
+ # Unique identifier for the entity
21
+ #
22
+ # @return [String]
23
+ required :id, String
24
+
25
+ # @!attribute created_at
26
+ # Timestamp of when the record was created
27
+ #
28
+ # @return [Time]
29
+ required :created_at, Time, api_name: :createdAt
30
+
31
+ # @!attribute description
32
+ # The description of the entitlement
33
+ #
34
+ # @return [String, nil]
35
+ required :description, String, nil?: true
36
+
37
+ # @!attribute end_date
38
+ # The end date of the promotional entitlement
39
+ #
40
+ # @return [Time, nil]
41
+ required :end_date, Time, api_name: :endDate, nil?: true
42
+
43
+ # @!attribute enum_values
44
+ # The enum values of the entitlement
45
+ #
46
+ # @return [Array<String>, nil]
47
+ required :enum_values, Stigg::Internal::Type::ArrayOf[String], api_name: :enumValues, nil?: true
48
+
49
+ # @!attribute environment_id
50
+ # The unique identifier for the environment
51
+ #
52
+ # @return [String]
53
+ required :environment_id, String, api_name: :environmentId
54
+
55
+ # @!attribute feature_group_ids
56
+ # Feature group IDs associated with this entitlement
57
+ #
58
+ # @return [Array<String>, nil]
59
+ required :feature_group_ids,
60
+ Stigg::Internal::Type::ArrayOf[String],
61
+ api_name: :featureGroupIds,
62
+ nil?: true
63
+
64
+ # @!attribute feature_id
65
+ # The unique identifier of the entitlement feature
66
+ #
67
+ # @return [String]
68
+ required :feature_id, String, api_name: :featureId
69
+
70
+ # @!attribute has_soft_limit
71
+ # Whether the entitlement has a soft limit
72
+ #
73
+ # @return [Boolean, nil]
74
+ required :has_soft_limit, Stigg::Internal::Type::Boolean, api_name: :hasSoftLimit, nil?: true
75
+
76
+ # @!attribute has_unlimited_usage
77
+ # Whether the entitlement has an unlimited usage
78
+ #
79
+ # @return [Boolean, nil]
80
+ required :has_unlimited_usage,
81
+ Stigg::Internal::Type::Boolean,
82
+ api_name: :hasUnlimitedUsage,
83
+ nil?: true
84
+
85
+ # @!attribute is_visible
86
+ # Whether the entitlement is visible
87
+ #
88
+ # @return [Boolean]
89
+ required :is_visible, Stigg::Internal::Type::Boolean, api_name: :isVisible
90
+
91
+ # @!attribute period
92
+ # The grant period of the promotional entitlement
93
+ #
94
+ # @return [Symbol, Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::Period]
95
+ required :period, enum: -> { Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::Period }
96
+
97
+ # @!attribute reset_period
98
+ # The reset period of the entitlement
99
+ #
100
+ # @return [Symbol, Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::ResetPeriod, nil]
101
+ required :reset_period,
102
+ enum: -> { Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::ResetPeriod },
103
+ api_name: :resetPeriod,
104
+ nil?: true
105
+
106
+ # @!attribute reset_period_configuration
107
+ # The reset period configuration of the entitlement
108
+ #
109
+ # @return [Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::ResetPeriodConfiguration::AccordingTo, nil]
110
+ required :reset_period_configuration,
111
+ union: -> { Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::ResetPeriodConfiguration },
112
+ api_name: :resetPeriodConfiguration,
113
+ nil?: true
114
+
115
+ # @!attribute start_date
116
+ # The start date of the entitlement
117
+ #
118
+ # @return [Time]
119
+ required :start_date, Time, api_name: :startDate
120
+
121
+ # @!attribute status
122
+ # The status of the entitlement
123
+ #
124
+ # @return [Symbol, Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::Status]
125
+ required :status, enum: -> { Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::Status }
126
+
127
+ # @!attribute updated_at
128
+ # Timestamp of when the record was last updated
129
+ #
130
+ # @return [Time]
131
+ required :updated_at, Time, api_name: :updatedAt
132
+
133
+ # @!attribute usage_limit
134
+ # The usage limit of the entitlement
135
+ #
136
+ # @return [Float, nil]
137
+ required :usage_limit, Float, api_name: :usageLimit, nil?: true
138
+
139
+ # @!method initialize(id:, created_at:, description:, end_date:, enum_values:, environment_id:, feature_group_ids:, feature_id:, has_soft_limit:, has_unlimited_usage:, is_visible:, period:, reset_period:, reset_period_configuration:, start_date:, status:, updated_at:, usage_limit:)
140
+ # @param id [String] Unique identifier for the entity
141
+ #
142
+ # @param created_at [Time] Timestamp of when the record was created
143
+ #
144
+ # @param description [String, nil] The description of the entitlement
145
+ #
146
+ # @param end_date [Time, nil] The end date of the promotional entitlement
147
+ #
148
+ # @param enum_values [Array<String>, nil] The enum values of the entitlement
149
+ #
150
+ # @param environment_id [String] The unique identifier for the environment
151
+ #
152
+ # @param feature_group_ids [Array<String>, nil] Feature group IDs associated with this entitlement
153
+ #
154
+ # @param feature_id [String] The unique identifier of the entitlement feature
155
+ #
156
+ # @param has_soft_limit [Boolean, nil] Whether the entitlement has a soft limit
157
+ #
158
+ # @param has_unlimited_usage [Boolean, nil] Whether the entitlement has an unlimited usage
159
+ #
160
+ # @param is_visible [Boolean] Whether the entitlement is visible
161
+ #
162
+ # @param period [Symbol, Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::Period] The grant period of the promotional entitlement
163
+ #
164
+ # @param reset_period [Symbol, Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::ResetPeriod, nil] The reset period of the entitlement
165
+ #
166
+ # @param reset_period_configuration [Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::ResetPeriodConfiguration::AccordingTo, nil] The reset period configuration of the entitlement
167
+ #
168
+ # @param start_date [Time] The start date of the entitlement
169
+ #
170
+ # @param status [Symbol, Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::Status] The status of the entitlement
171
+ #
172
+ # @param updated_at [Time] Timestamp of when the record was last updated
173
+ #
174
+ # @param usage_limit [Float, nil] The usage limit of the entitlement
175
+
176
+ # The grant period of the promotional entitlement
177
+ #
178
+ # @see Stigg::Models::V1::Customers::PromotionalCreateResponse::Data#period
179
+ module Period
180
+ extend Stigg::Internal::Type::Enum
181
+
182
+ PERIOD_1_WEEK = :"1 week"
183
+ PERIOD_1_MONTH = :"1 month"
184
+ PERIOD_6_MONTH = :"6 month"
185
+ PERIOD_1_YEAR = :"1 year"
186
+ LIFETIME = :lifetime
187
+ CUSTOM = :custom
188
+
189
+ # @!method self.values
190
+ # @return [Array<Symbol>]
191
+ end
192
+
193
+ # The reset period of the entitlement
194
+ #
195
+ # @see Stigg::Models::V1::Customers::PromotionalCreateResponse::Data#reset_period
196
+ module ResetPeriod
197
+ extend Stigg::Internal::Type::Enum
198
+
199
+ YEAR = :YEAR
200
+ MONTH = :MONTH
201
+ WEEK = :WEEK
202
+ DAY = :DAY
203
+ HOUR = :HOUR
204
+
205
+ # @!method self.values
206
+ # @return [Array<Symbol>]
207
+ end
208
+
209
+ # The reset period configuration of the entitlement
210
+ #
211
+ # @see Stigg::Models::V1::Customers::PromotionalCreateResponse::Data#reset_period_configuration
212
+ module ResetPeriodConfiguration
213
+ extend Stigg::Internal::Type::Union
214
+
215
+ variant -> { Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::ResetPeriodConfiguration::AccordingTo }
216
+
217
+ variant -> { Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::ResetPeriodConfiguration::AccordingTo }
218
+
219
+ variant -> { Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::ResetPeriodConfiguration::AccordingTo }
220
+
221
+ class AccordingTo < Stigg::Internal::Type::BaseModel
222
+ # @!attribute according_to
223
+ # Yearly reset period according to
224
+ #
225
+ # @return [Symbol, Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::ResetPeriodConfiguration::AccordingTo::AccordingTo]
226
+ required :according_to,
227
+ enum: -> { Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::ResetPeriodConfiguration::AccordingTo::AccordingTo },
228
+ api_name: :accordingTo
229
+
230
+ # @!method initialize(according_to:)
231
+ # @param according_to [Symbol, Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::ResetPeriodConfiguration::AccordingTo::AccordingTo] Yearly reset period according to
232
+
233
+ # Yearly reset period according to
234
+ #
235
+ # @see Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::ResetPeriodConfiguration::AccordingTo#according_to
236
+ module AccordingTo
237
+ extend Stigg::Internal::Type::Enum
238
+
239
+ SUBSCRIPTION_START = :SubscriptionStart
240
+
241
+ # @!method self.values
242
+ # @return [Array<Symbol>]
243
+ end
244
+ end
245
+
246
+ # @!method self.variants
247
+ # @return [Array(Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::ResetPeriodConfiguration::AccordingTo, Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::ResetPeriodConfiguration::AccordingTo, Stigg::Models::V1::Customers::PromotionalCreateResponse::Data::ResetPeriodConfiguration::AccordingTo)]
248
+ end
249
+
250
+ # The status of the entitlement
251
+ #
252
+ # @see Stigg::Models::V1::Customers::PromotionalCreateResponse::Data#status
253
+ module Status
254
+ extend Stigg::Internal::Type::Enum
255
+
256
+ ACTIVE = :Active
257
+ EXPIRED = :Expired
258
+ PAUSED = :Paused
259
+
260
+ # @!method self.values
261
+ # @return [Array<Symbol>]
262
+ end
263
+ end
264
+ end
265
+ end
266
+ end
267
+ end
268
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ module Customers
7
+ # @see Stigg::Resources::V1::Customers::Promotional#revoke
8
+ class PromotionalRevokeParams < Stigg::Internal::Type::BaseModel
9
+ extend Stigg::Internal::Type::RequestParameters::Converter
10
+ include Stigg::Internal::Type::RequestParameters
11
+
12
+ # @!attribute customer_id
13
+ #
14
+ # @return [String]
15
+ required :customer_id, String
16
+
17
+ # @!method initialize(customer_id:, request_options: {})
18
+ # @param customer_id [String]
19
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,268 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ module Customers
7
+ # @see Stigg::Resources::V1::Customers::Promotional#revoke
8
+ class PromotionalRevokeResponse < Stigg::Internal::Type::BaseModel
9
+ # @!attribute data
10
+ #
11
+ # @return [Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data]
12
+ required :data, -> { Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data }
13
+
14
+ # @!method initialize(data:)
15
+ # @param data [Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data]
16
+
17
+ # @see Stigg::Models::V1::Customers::PromotionalRevokeResponse#data
18
+ class Data < Stigg::Internal::Type::BaseModel
19
+ # @!attribute id
20
+ # Unique identifier for the entity
21
+ #
22
+ # @return [String]
23
+ required :id, String
24
+
25
+ # @!attribute created_at
26
+ # Timestamp of when the record was created
27
+ #
28
+ # @return [Time]
29
+ required :created_at, Time, api_name: :createdAt
30
+
31
+ # @!attribute description
32
+ # The description of the entitlement
33
+ #
34
+ # @return [String, nil]
35
+ required :description, String, nil?: true
36
+
37
+ # @!attribute end_date
38
+ # The end date of the promotional entitlement
39
+ #
40
+ # @return [Time, nil]
41
+ required :end_date, Time, api_name: :endDate, nil?: true
42
+
43
+ # @!attribute enum_values
44
+ # The enum values of the entitlement
45
+ #
46
+ # @return [Array<String>, nil]
47
+ required :enum_values, Stigg::Internal::Type::ArrayOf[String], api_name: :enumValues, nil?: true
48
+
49
+ # @!attribute environment_id
50
+ # The unique identifier for the environment
51
+ #
52
+ # @return [String]
53
+ required :environment_id, String, api_name: :environmentId
54
+
55
+ # @!attribute feature_group_ids
56
+ # Feature group IDs associated with this entitlement
57
+ #
58
+ # @return [Array<String>, nil]
59
+ required :feature_group_ids,
60
+ Stigg::Internal::Type::ArrayOf[String],
61
+ api_name: :featureGroupIds,
62
+ nil?: true
63
+
64
+ # @!attribute feature_id
65
+ # The unique identifier of the entitlement feature
66
+ #
67
+ # @return [String]
68
+ required :feature_id, String, api_name: :featureId
69
+
70
+ # @!attribute has_soft_limit
71
+ # Whether the entitlement has a soft limit
72
+ #
73
+ # @return [Boolean, nil]
74
+ required :has_soft_limit, Stigg::Internal::Type::Boolean, api_name: :hasSoftLimit, nil?: true
75
+
76
+ # @!attribute has_unlimited_usage
77
+ # Whether the entitlement has an unlimited usage
78
+ #
79
+ # @return [Boolean, nil]
80
+ required :has_unlimited_usage,
81
+ Stigg::Internal::Type::Boolean,
82
+ api_name: :hasUnlimitedUsage,
83
+ nil?: true
84
+
85
+ # @!attribute is_visible
86
+ # Whether the entitlement is visible
87
+ #
88
+ # @return [Boolean]
89
+ required :is_visible, Stigg::Internal::Type::Boolean, api_name: :isVisible
90
+
91
+ # @!attribute period
92
+ # The grant period of the promotional entitlement
93
+ #
94
+ # @return [Symbol, Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::Period]
95
+ required :period, enum: -> { Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::Period }
96
+
97
+ # @!attribute reset_period
98
+ # The reset period of the entitlement
99
+ #
100
+ # @return [Symbol, Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::ResetPeriod, nil]
101
+ required :reset_period,
102
+ enum: -> { Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::ResetPeriod },
103
+ api_name: :resetPeriod,
104
+ nil?: true
105
+
106
+ # @!attribute reset_period_configuration
107
+ # The reset period configuration of the entitlement
108
+ #
109
+ # @return [Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::ResetPeriodConfiguration::AccordingTo, nil]
110
+ required :reset_period_configuration,
111
+ union: -> { Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::ResetPeriodConfiguration },
112
+ api_name: :resetPeriodConfiguration,
113
+ nil?: true
114
+
115
+ # @!attribute start_date
116
+ # The start date of the entitlement
117
+ #
118
+ # @return [Time]
119
+ required :start_date, Time, api_name: :startDate
120
+
121
+ # @!attribute status
122
+ # The status of the entitlement
123
+ #
124
+ # @return [Symbol, Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::Status]
125
+ required :status, enum: -> { Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::Status }
126
+
127
+ # @!attribute updated_at
128
+ # Timestamp of when the record was last updated
129
+ #
130
+ # @return [Time]
131
+ required :updated_at, Time, api_name: :updatedAt
132
+
133
+ # @!attribute usage_limit
134
+ # The usage limit of the entitlement
135
+ #
136
+ # @return [Float, nil]
137
+ required :usage_limit, Float, api_name: :usageLimit, nil?: true
138
+
139
+ # @!method initialize(id:, created_at:, description:, end_date:, enum_values:, environment_id:, feature_group_ids:, feature_id:, has_soft_limit:, has_unlimited_usage:, is_visible:, period:, reset_period:, reset_period_configuration:, start_date:, status:, updated_at:, usage_limit:)
140
+ # @param id [String] Unique identifier for the entity
141
+ #
142
+ # @param created_at [Time] Timestamp of when the record was created
143
+ #
144
+ # @param description [String, nil] The description of the entitlement
145
+ #
146
+ # @param end_date [Time, nil] The end date of the promotional entitlement
147
+ #
148
+ # @param enum_values [Array<String>, nil] The enum values of the entitlement
149
+ #
150
+ # @param environment_id [String] The unique identifier for the environment
151
+ #
152
+ # @param feature_group_ids [Array<String>, nil] Feature group IDs associated with this entitlement
153
+ #
154
+ # @param feature_id [String] The unique identifier of the entitlement feature
155
+ #
156
+ # @param has_soft_limit [Boolean, nil] Whether the entitlement has a soft limit
157
+ #
158
+ # @param has_unlimited_usage [Boolean, nil] Whether the entitlement has an unlimited usage
159
+ #
160
+ # @param is_visible [Boolean] Whether the entitlement is visible
161
+ #
162
+ # @param period [Symbol, Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::Period] The grant period of the promotional entitlement
163
+ #
164
+ # @param reset_period [Symbol, Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::ResetPeriod, nil] The reset period of the entitlement
165
+ #
166
+ # @param reset_period_configuration [Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::ResetPeriodConfiguration::AccordingTo, nil] The reset period configuration of the entitlement
167
+ #
168
+ # @param start_date [Time] The start date of the entitlement
169
+ #
170
+ # @param status [Symbol, Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::Status] The status of the entitlement
171
+ #
172
+ # @param updated_at [Time] Timestamp of when the record was last updated
173
+ #
174
+ # @param usage_limit [Float, nil] The usage limit of the entitlement
175
+
176
+ # The grant period of the promotional entitlement
177
+ #
178
+ # @see Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data#period
179
+ module Period
180
+ extend Stigg::Internal::Type::Enum
181
+
182
+ PERIOD_1_WEEK = :"1 week"
183
+ PERIOD_1_MONTH = :"1 month"
184
+ PERIOD_6_MONTH = :"6 month"
185
+ PERIOD_1_YEAR = :"1 year"
186
+ LIFETIME = :lifetime
187
+ CUSTOM = :custom
188
+
189
+ # @!method self.values
190
+ # @return [Array<Symbol>]
191
+ end
192
+
193
+ # The reset period of the entitlement
194
+ #
195
+ # @see Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data#reset_period
196
+ module ResetPeriod
197
+ extend Stigg::Internal::Type::Enum
198
+
199
+ YEAR = :YEAR
200
+ MONTH = :MONTH
201
+ WEEK = :WEEK
202
+ DAY = :DAY
203
+ HOUR = :HOUR
204
+
205
+ # @!method self.values
206
+ # @return [Array<Symbol>]
207
+ end
208
+
209
+ # The reset period configuration of the entitlement
210
+ #
211
+ # @see Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data#reset_period_configuration
212
+ module ResetPeriodConfiguration
213
+ extend Stigg::Internal::Type::Union
214
+
215
+ variant -> { Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::ResetPeriodConfiguration::AccordingTo }
216
+
217
+ variant -> { Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::ResetPeriodConfiguration::AccordingTo }
218
+
219
+ variant -> { Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::ResetPeriodConfiguration::AccordingTo }
220
+
221
+ class AccordingTo < Stigg::Internal::Type::BaseModel
222
+ # @!attribute according_to
223
+ # Yearly reset period according to
224
+ #
225
+ # @return [Symbol, Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::ResetPeriodConfiguration::AccordingTo::AccordingTo]
226
+ required :according_to,
227
+ enum: -> { Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::ResetPeriodConfiguration::AccordingTo::AccordingTo },
228
+ api_name: :accordingTo
229
+
230
+ # @!method initialize(according_to:)
231
+ # @param according_to [Symbol, Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::ResetPeriodConfiguration::AccordingTo::AccordingTo] Yearly reset period according to
232
+
233
+ # Yearly reset period according to
234
+ #
235
+ # @see Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::ResetPeriodConfiguration::AccordingTo#according_to
236
+ module AccordingTo
237
+ extend Stigg::Internal::Type::Enum
238
+
239
+ SUBSCRIPTION_START = :SubscriptionStart
240
+
241
+ # @!method self.values
242
+ # @return [Array<Symbol>]
243
+ end
244
+ end
245
+
246
+ # @!method self.variants
247
+ # @return [Array(Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::ResetPeriodConfiguration::AccordingTo, Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::ResetPeriodConfiguration::AccordingTo, Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data::ResetPeriodConfiguration::AccordingTo)]
248
+ end
249
+
250
+ # The status of the entitlement
251
+ #
252
+ # @see Stigg::Models::V1::Customers::PromotionalRevokeResponse::Data#status
253
+ module Status
254
+ extend Stigg::Internal::Type::Enum
255
+
256
+ ACTIVE = :Active
257
+ EXPIRED = :Expired
258
+ PAUSED = :Paused
259
+
260
+ # @!method self.values
261
+ # @return [Array<Symbol>]
262
+ end
263
+ end
264
+ end
265
+ end
266
+ end
267
+ end
268
+ end
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ module Customers
7
+ # @see Stigg::Resources::V1::Customers::Usage#retrieve
8
+ class UsageRetrieveParams < Stigg::Internal::Type::BaseModel
9
+ extend Stigg::Internal::Type::RequestParameters::Converter
10
+ include Stigg::Internal::Type::RequestParameters
11
+
12
+ # @!attribute customer_id
13
+ #
14
+ # @return [String]
15
+ required :customer_id, String
16
+
17
+ # @!attribute start_date
18
+ # The start date of the range
19
+ #
20
+ # @return [Time]
21
+ required :start_date, Time
22
+
23
+ # @!attribute end_date
24
+ # The end date of the range
25
+ #
26
+ # @return [Time, nil]
27
+ optional :end_date, Time
28
+
29
+ # @!attribute group_by
30
+ #
31
+ # @return [String, nil]
32
+ optional :group_by, String
33
+
34
+ # @!attribute resource_id
35
+ # Resource id
36
+ #
37
+ # @return [String, nil]
38
+ optional :resource_id, String, nil?: true
39
+
40
+ # @!method initialize(customer_id:, start_date:, end_date: nil, group_by: nil, resource_id: nil, request_options: {})
41
+ # @param customer_id [String]
42
+ #
43
+ # @param start_date [Time] The start date of the range
44
+ #
45
+ # @param end_date [Time] The end date of the range
46
+ #
47
+ # @param group_by [String]
48
+ #
49
+ # @param resource_id [String, nil] Resource id
50
+ #
51
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end