stigg 0.1.0.pre.alpha.34 → 0.1.0.pre.beta.2

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 (161) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +1 -1
  4. data/lib/stigg/models/v1/addon_list_params.rb +14 -3
  5. data/lib/stigg/models/v1/coupon_list_params.rb +13 -3
  6. data/lib/stigg/models/v1/credit_get_usage_params.rb +84 -0
  7. data/lib/stigg/models/v1/credit_get_usage_response.rb +149 -0
  8. data/lib/stigg/models/v1/credit_list_ledger_params.rb +64 -0
  9. data/lib/stigg/models/v1/credit_list_ledger_response.rb +105 -0
  10. data/lib/stigg/models/v1/{events/credit_get_auto_recharge_params.rb → credits/auto_recharge_get_auto_recharge_params.rb} +3 -3
  11. data/lib/stigg/models/v1/{events/credit_get_auto_recharge_response.rb → credits/auto_recharge_get_auto_recharge_response.rb} +15 -15
  12. data/lib/stigg/models/v1/{events/credits/grant_list_response.rb → credits/credit_grant_response.rb} +52 -37
  13. data/lib/stigg/models/v1/credits/custom_currency.rb +123 -0
  14. data/lib/stigg/models/v1/credits/custom_currency_archive_params.rb +24 -0
  15. data/lib/stigg/models/v1/credits/custom_currency_create_params.rb +92 -0
  16. data/lib/stigg/models/v1/credits/custom_currency_list_associated_entities_params.rb +24 -0
  17. data/lib/stigg/models/v1/credits/custom_currency_list_associated_entities_response.rb +52 -0
  18. data/lib/stigg/models/v1/credits/custom_currency_list_params.rb +65 -0
  19. data/lib/stigg/models/v1/credits/custom_currency_list_response.rb +109 -0
  20. data/lib/stigg/models/v1/credits/custom_currency_unarchive_params.rb +24 -0
  21. data/lib/stigg/models/v1/credits/custom_currency_update_params.rb +92 -0
  22. data/lib/stigg/models/v1/credits/grant_create_params.rb +404 -0
  23. data/lib/stigg/models/v1/credits/grant_list_params.rb +114 -0
  24. data/lib/stigg/models/v1/credits/grant_list_response.rb +431 -0
  25. data/lib/stigg/models/v1/credits/grant_void_params.rb +24 -0
  26. data/lib/stigg/models/v1/customers/integration_list_params.rb +22 -3
  27. data/lib/stigg/models/v1/customers/promotional_entitlement_list_params.rb +15 -3
  28. data/lib/stigg/models/v1/feature_list_features_params.rb +45 -9
  29. data/lib/stigg/models/v1/plan_list_params.rb +14 -3
  30. data/lib/stigg/models/v1/product_list_products_params.rb +14 -3
  31. data/lib/stigg/models/v1/subscription_list_params.rb +32 -6
  32. data/lib/stigg/resources/v1/addons.rb +1 -1
  33. data/lib/stigg/resources/v1/coupons.rb +1 -1
  34. data/lib/stigg/resources/v1/credits/auto_recharge.rb +44 -0
  35. data/lib/stigg/resources/v1/credits/custom_currencies.rb +188 -0
  36. data/lib/stigg/resources/v1/credits/grants.rb +135 -0
  37. data/lib/stigg/resources/v1/credits.rb +112 -0
  38. data/lib/stigg/resources/v1/customers/integrations.rb +1 -1
  39. data/lib/stigg/resources/v1/customers/promotional_entitlements.rb +1 -1
  40. data/lib/stigg/resources/v1/events.rb +0 -4
  41. data/lib/stigg/resources/v1/features.rb +3 -3
  42. data/lib/stigg/resources/v1/plans.rb +1 -1
  43. data/lib/stigg/resources/v1/products.rb +1 -1
  44. data/lib/stigg/resources/v1/subscriptions.rb +2 -2
  45. data/lib/stigg/resources/v1.rb +4 -0
  46. data/lib/stigg/version.rb +1 -1
  47. data/lib/stigg.rb +24 -13
  48. data/rbi/stigg/models/v1/addon_list_params.rbi +35 -4
  49. data/rbi/stigg/models/v1/coupon_list_params.rbi +33 -4
  50. data/rbi/stigg/models/v1/credit_get_usage_params.rbi +155 -0
  51. data/rbi/stigg/models/v1/credit_get_usage_response.rbi +298 -0
  52. data/rbi/stigg/models/v1/credit_list_ledger_params.rbi +100 -0
  53. data/rbi/stigg/models/v1/credit_list_ledger_response.rbi +173 -0
  54. data/rbi/stigg/models/v1/{events/credit_get_auto_recharge_params.rbi → credits/auto_recharge_get_auto_recharge_params.rbi} +3 -3
  55. data/rbi/stigg/models/v1/{events/credit_get_auto_recharge_response.rbi → credits/auto_recharge_get_auto_recharge_response.rbi} +22 -22
  56. data/rbi/stigg/models/v1/{events/credits/grant_list_response.rbi → credits/credit_grant_response.rbi} +106 -70
  57. data/rbi/stigg/models/v1/credits/custom_currency.rbi +205 -0
  58. data/rbi/stigg/models/v1/credits/custom_currency_archive_params.rbi +42 -0
  59. data/rbi/stigg/models/v1/credits/custom_currency_create_params.rbi +149 -0
  60. data/rbi/stigg/models/v1/credits/custom_currency_list_associated_entities_params.rbi +42 -0
  61. data/rbi/stigg/models/v1/credits/custom_currency_list_associated_entities_response.rbi +99 -0
  62. data/rbi/stigg/models/v1/credits/custom_currency_list_params.rbi +143 -0
  63. data/rbi/stigg/models/v1/credits/custom_currency_list_response.rbi +172 -0
  64. data/rbi/stigg/models/v1/credits/custom_currency_unarchive_params.rbi +42 -0
  65. data/rbi/stigg/models/v1/credits/custom_currency_update_params.rbi +143 -0
  66. data/rbi/stigg/models/v1/credits/grant_create_params.rbi +1123 -0
  67. data/rbi/stigg/models/v1/credits/grant_list_params.rbi +185 -0
  68. data/rbi/stigg/models/v1/credits/grant_list_response.rbi +719 -0
  69. data/rbi/stigg/models/v1/credits/grant_void_params.rbi +42 -0
  70. data/rbi/stigg/models/v1/customers/integration_list_params.rbi +99 -4
  71. data/rbi/stigg/models/v1/customers/promotional_entitlement_list_params.rbi +64 -4
  72. data/rbi/stigg/models/v1/feature_list_features_params.rbi +177 -12
  73. data/rbi/stigg/models/v1/plan_list_params.rbi +34 -4
  74. data/rbi/stigg/models/v1/product_list_products_params.rbi +50 -4
  75. data/rbi/stigg/models/v1/subscription_list_params.rbi +123 -8
  76. data/rbi/stigg/resources/v1/addons.rbi +1 -1
  77. data/rbi/stigg/resources/v1/coupons.rbi +1 -1
  78. data/rbi/stigg/resources/v1/credits/auto_recharge.rbi +36 -0
  79. data/rbi/stigg/resources/v1/credits/custom_currencies.rbi +161 -0
  80. data/rbi/stigg/resources/v1/credits/grants.rbi +129 -0
  81. data/rbi/stigg/resources/v1/credits.rbi +91 -0
  82. data/rbi/stigg/resources/v1/customers/integrations.rbi +4 -1
  83. data/rbi/stigg/resources/v1/customers/promotional_entitlements.rbi +4 -1
  84. data/rbi/stigg/resources/v1/events.rbi +0 -3
  85. data/rbi/stigg/resources/v1/features.rbi +10 -3
  86. data/rbi/stigg/resources/v1/plans.rbi +1 -1
  87. data/rbi/stigg/resources/v1/products.rbi +2 -1
  88. data/rbi/stigg/resources/v1/subscriptions.rbi +6 -2
  89. data/rbi/stigg/resources/v1.rbi +3 -0
  90. data/sig/stigg/models/v1/addon_list_params.rbs +19 -5
  91. data/sig/stigg/models/v1/coupon_list_params.rbs +18 -5
  92. data/sig/stigg/models/v1/credit_get_usage_params.rbs +78 -0
  93. data/sig/stigg/models/v1/credit_get_usage_response.rbs +123 -0
  94. data/sig/stigg/models/v1/credit_list_ledger_params.rbs +63 -0
  95. data/sig/stigg/models/v1/credit_list_ledger_response.rbs +85 -0
  96. data/sig/stigg/models/v1/{events/credit_get_auto_recharge_params.rbs → credits/auto_recharge_get_auto_recharge_params.rbs} +3 -3
  97. data/sig/stigg/models/v1/{events/credit_get_auto_recharge_response.rbs → credits/auto_recharge_get_auto_recharge_response.rbs} +17 -17
  98. data/sig/stigg/models/v1/{events/credits/grant_list_response.rbs → credits/credit_grant_response.rbs} +57 -42
  99. data/sig/stigg/models/v1/credits/custom_currency.rbs +89 -0
  100. data/sig/stigg/models/v1/credits/custom_currency_archive_params.rbs +27 -0
  101. data/sig/stigg/models/v1/credits/custom_currency_create_params.rbs +77 -0
  102. data/sig/stigg/models/v1/credits/custom_currency_list_associated_entities_params.rbs +27 -0
  103. data/sig/stigg/models/v1/credits/custom_currency_list_associated_entities_response.rbs +42 -0
  104. data/sig/stigg/models/v1/credits/custom_currency_list_params.rbs +66 -0
  105. data/sig/stigg/models/v1/credits/custom_currency_list_response.rbs +76 -0
  106. data/sig/stigg/models/v1/credits/custom_currency_unarchive_params.rbs +27 -0
  107. data/sig/stigg/models/v1/credits/custom_currency_update_params.rbs +73 -0
  108. data/sig/stigg/models/v1/credits/grant_create_params.rbs +501 -0
  109. data/sig/stigg/models/v1/{events/credit_list_ledger_params.rbs → credits/grant_list_params.rbs} +41 -3
  110. data/sig/stigg/models/v1/credits/grant_list_response.rbs +300 -0
  111. data/sig/stigg/models/v1/credits/grant_void_params.rbs +24 -0
  112. data/sig/stigg/models/v1/customers/integration_list_params.rbs +36 -5
  113. data/sig/stigg/models/v1/customers/promotional_entitlement_list_params.rbs +19 -5
  114. data/sig/stigg/models/v1/feature_list_features_params.rbs +57 -15
  115. data/sig/stigg/models/v1/plan_list_params.rbs +19 -5
  116. data/sig/stigg/models/v1/product_list_products_params.rbs +18 -5
  117. data/sig/stigg/models/v1/subscription_list_params.rbs +47 -10
  118. data/sig/stigg/resources/v1/addons.rbs +1 -1
  119. data/sig/stigg/resources/v1/coupons.rbs +1 -1
  120. data/sig/stigg/resources/v1/credits/auto_recharge.rbs +17 -0
  121. data/sig/stigg/resources/v1/credits/custom_currencies.rbs +54 -0
  122. data/sig/stigg/resources/v1/credits/grants.rbs +46 -0
  123. data/sig/stigg/resources/v1/credits.rbs +35 -0
  124. data/sig/stigg/resources/v1/customers/integrations.rbs +1 -1
  125. data/sig/stigg/resources/v1/customers/promotional_entitlements.rbs +1 -1
  126. data/sig/stigg/resources/v1/events.rbs +0 -2
  127. data/sig/stigg/resources/v1/features.rbs +3 -3
  128. data/sig/stigg/resources/v1/plans.rbs +1 -1
  129. data/sig/stigg/resources/v1/products.rbs +1 -1
  130. data/sig/stigg/resources/v1/subscriptions.rbs +2 -2
  131. data/sig/stigg/resources/v1.rbs +2 -0
  132. metadata +74 -41
  133. data/lib/stigg/models/v1/events/credit_get_usage_params.rb +0 -86
  134. data/lib/stigg/models/v1/events/credit_get_usage_response.rb +0 -151
  135. data/lib/stigg/models/v1/events/credit_list_ledger_params.rb +0 -66
  136. data/lib/stigg/models/v1/events/credit_list_ledger_response.rb +0 -107
  137. data/lib/stigg/models/v1/events/credits/credit_grant_response.rb +0 -452
  138. data/lib/stigg/models/v1/events/credits/grant_create_params.rb +0 -406
  139. data/lib/stigg/models/v1/events/credits/grant_list_params.rb +0 -116
  140. data/lib/stigg/models/v1/events/credits/grant_void_params.rb +0 -26
  141. data/lib/stigg/resources/v1/events/credits/grants.rb +0 -137
  142. data/lib/stigg/resources/v1/events/credits.rb +0 -131
  143. data/rbi/stigg/models/v1/events/credit_get_usage_params.rbi +0 -170
  144. data/rbi/stigg/models/v1/events/credit_get_usage_response.rbi +0 -308
  145. data/rbi/stigg/models/v1/events/credit_list_ledger_params.rbi +0 -105
  146. data/rbi/stigg/models/v1/events/credit_list_ledger_response.rbi +0 -175
  147. data/rbi/stigg/models/v1/events/credits/credit_grant_response.rbi +0 -777
  148. data/rbi/stigg/models/v1/events/credits/grant_create_params.rbi +0 -1134
  149. data/rbi/stigg/models/v1/events/credits/grant_list_params.rbi +0 -193
  150. data/rbi/stigg/models/v1/events/credits/grant_void_params.rbi +0 -44
  151. data/rbi/stigg/resources/v1/events/credits/grants.rbi +0 -132
  152. data/rbi/stigg/resources/v1/events/credits.rbi +0 -105
  153. data/sig/stigg/models/v1/events/credit_get_usage_params.rbs +0 -80
  154. data/sig/stigg/models/v1/events/credit_get_usage_response.rbs +0 -125
  155. data/sig/stigg/models/v1/events/credit_list_ledger_response.rbs +0 -87
  156. data/sig/stigg/models/v1/events/credits/credit_grant_response.rbs +0 -319
  157. data/sig/stigg/models/v1/events/credits/grant_create_params.rbs +0 -503
  158. data/sig/stigg/models/v1/events/credits/grant_list_params.rbs +0 -105
  159. data/sig/stigg/models/v1/events/credits/grant_void_params.rbs +0 -29
  160. data/sig/stigg/resources/v1/events/credits/grants.rbs +0 -48
  161. data/sig/stigg/resources/v1/events/credits.rbs +0 -39
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 396050cde3ffe9c15a9acdebe0d5d2d524262f13a843a639d86d8d44c6e95b83
4
- data.tar.gz: f0dd38b57f86f2043a72169ba93e40b64a429c378d8c61c47883cd7e0a2241ec
3
+ metadata.gz: f109db145e987e2dc684f7073b27fcf0ce28bb1a7ba6f5f39335ad9fe6d2c856
4
+ data.tar.gz: cdc9fd0dfa42be023387a44a4109f04ff3c776d0d4c12ceaca2893be9636a5ba
5
5
  SHA512:
6
- metadata.gz: 8533daa2298fa08fe01c5268e31a5158f51cb06ed36bd51975f9b6d93dce9ec6221e13169f9d48911ff723a0df0cd789dca1b22ee2303c5edd1cd8f857f8e945
7
- data.tar.gz: b1bd1ad3dcbf2a6a35d7b38f3d9318e6ea34244f9701ddee79c414598c8ca1228c8eb5d6e4f5cbe6794a3a44267dee9527b0af1bac7ab03b0060e34b7651a961
6
+ metadata.gz: 750b15519abb891d606b37d98efe08a0d776311794fc4576466e52ac29f2eccc66634bd460ece86fbad9d3601b3e2b8c1f0aa2745612a1095fa09e3625f95d4c
7
+ data.tar.gz: 35673538aca99642bda1c7e0b01c75eac3fae3adcb1b9329e34efd19bb7b6584eceb8463739e62563b694b97465938428e6a6be31081b932a36f9d5b133ccf4c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-beta.2 (2026-05-12)
4
+
5
+ Full Changelog: [v0.1.0-beta.1...v0.1.0-beta.2](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.1...v0.1.0-beta.2)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([bea3fe9](https://github.com/stiggio/stigg-ruby/commit/bea3fe9cac5c38bf47b741a0fc9ef879f6668180))
10
+
11
+ ## 0.1.0-beta.1 (2026-05-12)
12
+
13
+ Full Changelog: [v0.1.0-alpha.34...v0.1.0-beta.1](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-alpha.34...v0.1.0-beta.1)
14
+
15
+ ### Features
16
+
17
+ * **api:** add custom_currencies resource to events/credits ([6999605](https://github.com/stiggio/stigg-ruby/commit/699960512734576197f4000f0dd069506bf47448))
18
+
19
+
20
+ ### Chores
21
+
22
+ * **internal:** regenerate SDK with no functional changes ([e07191b](https://github.com/stiggio/stigg-ruby/commit/e07191b4ead698186c7d2b8c665d3eca17debe7e))
23
+
3
24
  ## 0.1.0-alpha.34 (2026-05-11)
4
25
 
5
26
  Full Changelog: [v0.1.0-alpha.33...v0.1.0-alpha.34](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-alpha.33...v0.1.0-alpha.34)
data/README.md CHANGED
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "stigg", "~> 0.1.0.pre.alpha.34"
27
+ gem "stigg", "~> 0.1.0.pre.beta.2"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -41,8 +41,8 @@ module Stigg
41
41
  # @!attribute status
42
42
  # Filter by status. Supports comma-separated values for multiple statuses
43
43
  #
44
- # @return [String, nil]
45
- optional :status, String
44
+ # @return [Array<Symbol, Stigg::Models::V1::AddonListParams::Status>, nil]
45
+ optional :status, -> { Stigg::Internal::Type::ArrayOf[enum: Stigg::V1::AddonListParams::Status] }
46
46
 
47
47
  # @!method initialize(after: nil, before: nil, created_at: nil, limit: nil, product_id: nil, status: nil, request_options: {})
48
48
  # @param after [String] Return items that come after this cursor
@@ -55,7 +55,7 @@ module Stigg
55
55
  #
56
56
  # @param product_id [String] Filter by product ID
57
57
  #
58
- # @param status [String] Filter by status. Supports comma-separated values for multiple statuses
58
+ # @param status [Array<Symbol, Stigg::Models::V1::AddonListParams::Status>] Filter by status. Supports comma-separated values for multiple statuses
59
59
  #
60
60
  # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
61
61
 
@@ -95,6 +95,17 @@ module Stigg
95
95
  #
96
96
  # @param lte [Time] Less than or equal to the specified createdAt value
97
97
  end
98
+
99
+ module Status
100
+ extend Stigg::Internal::Type::Enum
101
+
102
+ DRAFT = :DRAFT
103
+ PUBLISHED = :PUBLISHED
104
+ ARCHIVED = :ARCHIVED
105
+
106
+ # @!method self.values
107
+ # @return [Array<Symbol>]
108
+ end
98
109
  end
99
110
  end
100
111
  end
@@ -41,8 +41,8 @@ module Stigg
41
41
  # @!attribute status
42
42
  # Filter by coupon status. Supports comma-separated values for multiple statuses
43
43
  #
44
- # @return [String, nil]
45
- optional :status, String
44
+ # @return [Array<Symbol, Stigg::Models::V1::CouponListParams::Status>, nil]
45
+ optional :status, -> { Stigg::Internal::Type::ArrayOf[enum: Stigg::V1::CouponListParams::Status] }
46
46
 
47
47
  # @!attribute type
48
48
  # Filter by coupon type (FIXED or PERCENTAGE)
@@ -61,7 +61,7 @@ module Stigg
61
61
  #
62
62
  # @param limit [Integer] Maximum number of items to return
63
63
  #
64
- # @param status [String] Filter by coupon status. Supports comma-separated values for multiple statuses
64
+ # @param status [Array<Symbol, Stigg::Models::V1::CouponListParams::Status>] Filter by coupon status. Supports comma-separated values for multiple statuses
65
65
  #
66
66
  # @param type [Symbol, Stigg::Models::V1::CouponListParams::Type] Filter by coupon type (FIXED or PERCENTAGE)
67
67
  #
@@ -104,6 +104,16 @@ module Stigg
104
104
  # @param lte [Time] Less than or equal to the specified createdAt value
105
105
  end
106
106
 
107
+ module Status
108
+ extend Stigg::Internal::Type::Enum
109
+
110
+ ACTIVE = :ACTIVE
111
+ ARCHIVED = :ARCHIVED
112
+
113
+ # @!method self.values
114
+ # @return [Array<Symbol>]
115
+ end
116
+
107
117
  # Filter by coupon type (FIXED or PERCENTAGE)
108
118
  module Type
109
119
  extend Stigg::Internal::Type::Enum
@@ -0,0 +1,84 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ # @see Stigg::Resources::V1::Credits#get_usage
7
+ class CreditGetUsageParams < Stigg::Internal::Type::BaseModel
8
+ extend Stigg::Internal::Type::RequestParameters::Converter
9
+ include Stigg::Internal::Type::RequestParameters
10
+
11
+ # @!attribute customer_id
12
+ # Filter by customer ID (required)
13
+ #
14
+ # @return [String]
15
+ required :customer_id, String
16
+
17
+ # @!attribute currency_id
18
+ # Filter by currency ID
19
+ #
20
+ # @return [String, nil]
21
+ optional :currency_id, String
22
+
23
+ # @!attribute end_date
24
+ # End date for the credit usage time range (ISO 8601). Defaults to now when
25
+ # startDate is provided
26
+ #
27
+ # @return [Time, nil]
28
+ optional :end_date, Time
29
+
30
+ # @!attribute resource_id
31
+ # Filter by resource ID
32
+ #
33
+ # @return [String, nil]
34
+ optional :resource_id, String
35
+
36
+ # @!attribute start_date
37
+ # Start date for the credit usage time range (ISO 8601). Takes precedence over
38
+ # timeRange when provided
39
+ #
40
+ # @return [Time, nil]
41
+ optional :start_date, Time
42
+
43
+ # @!attribute time_range
44
+ # Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_YEAR). Defaults
45
+ # to LAST_MONTH
46
+ #
47
+ # @return [Symbol, Stigg::Models::V1::CreditGetUsageParams::TimeRange, nil]
48
+ optional :time_range, enum: -> { Stigg::V1::CreditGetUsageParams::TimeRange }
49
+
50
+ # @!method initialize(customer_id:, currency_id: nil, end_date: nil, resource_id: nil, start_date: nil, time_range: nil, request_options: {})
51
+ # Some parameter documentations has been truncated, see
52
+ # {Stigg::Models::V1::CreditGetUsageParams} for more details.
53
+ #
54
+ # @param customer_id [String] Filter by customer ID (required)
55
+ #
56
+ # @param currency_id [String] Filter by currency ID
57
+ #
58
+ # @param end_date [Time] End date for the credit usage time range (ISO 8601). Defaults to now when startD
59
+ #
60
+ # @param resource_id [String] Filter by resource ID
61
+ #
62
+ # @param start_date [Time] Start date for the credit usage time range (ISO 8601). Takes precedence over tim
63
+ #
64
+ # @param time_range [Symbol, Stigg::Models::V1::CreditGetUsageParams::TimeRange] Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_YEAR). Defaults
65
+ #
66
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
67
+
68
+ # Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_YEAR). Defaults
69
+ # to LAST_MONTH
70
+ module TimeRange
71
+ extend Stigg::Internal::Type::Enum
72
+
73
+ LAST_DAY = :LAST_DAY
74
+ LAST_WEEK = :LAST_WEEK
75
+ LAST_MONTH = :LAST_MONTH
76
+ LAST_YEAR = :LAST_YEAR
77
+
78
+ # @!method self.values
79
+ # @return [Array<Symbol>]
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,149 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ # @see Stigg::Resources::V1::Credits#get_usage
7
+ class CreditGetUsageResponse < Stigg::Internal::Type::BaseModel
8
+ # @!attribute data
9
+ # Credit usage data grouped by feature with time-series points
10
+ #
11
+ # @return [Stigg::Models::V1::CreditGetUsageResponse::Data]
12
+ required :data, -> { Stigg::Models::V1::CreditGetUsageResponse::Data }
13
+
14
+ # @!method initialize(data:)
15
+ # Response object
16
+ #
17
+ # @param data [Stigg::Models::V1::CreditGetUsageResponse::Data] Credit usage data grouped by feature with time-series points
18
+
19
+ # @see Stigg::Models::V1::CreditGetUsageResponse#data
20
+ class Data < Stigg::Internal::Type::BaseModel
21
+ # @!attribute currency
22
+ # The custom currency used for credit measurement
23
+ #
24
+ # @return [Stigg::Models::V1::CreditGetUsageResponse::Data::Currency, nil]
25
+ required :currency, -> { Stigg::Models::V1::CreditGetUsageResponse::Data::Currency }, nil?: true
26
+
27
+ # @!attribute series
28
+ # Credit usage series grouped by feature
29
+ #
30
+ # @return [Array<Stigg::Models::V1::CreditGetUsageResponse::Data::Series>]
31
+ required :series,
32
+ -> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::CreditGetUsageResponse::Data::Series] }
33
+
34
+ # @!method initialize(currency:, series:)
35
+ # Credit usage data grouped by feature with time-series points
36
+ #
37
+ # @param currency [Stigg::Models::V1::CreditGetUsageResponse::Data::Currency, nil] The custom currency used for credit measurement
38
+ #
39
+ # @param series [Array<Stigg::Models::V1::CreditGetUsageResponse::Data::Series>] Credit usage series grouped by feature
40
+
41
+ # @see Stigg::Models::V1::CreditGetUsageResponse::Data#currency
42
+ class Currency < Stigg::Internal::Type::BaseModel
43
+ # @!attribute currency_id
44
+ # The currency identifier
45
+ #
46
+ # @return [String]
47
+ required :currency_id, String, api_name: :currencyId
48
+
49
+ # @!attribute display_name
50
+ # The display name of the currency
51
+ #
52
+ # @return [String]
53
+ required :display_name, String, api_name: :displayName
54
+
55
+ # @!attribute plural
56
+ # Plural unit label
57
+ #
58
+ # @return [String, nil]
59
+ required :plural, String, nil?: true
60
+
61
+ # @!attribute singular
62
+ # Singular unit label
63
+ #
64
+ # @return [String, nil]
65
+ required :singular, String, nil?: true
66
+
67
+ # @!attribute symbol
68
+ # The currency symbol
69
+ #
70
+ # @return [String, nil]
71
+ required :symbol, String, nil?: true
72
+
73
+ # @!method initialize(currency_id:, display_name:, plural:, singular:, symbol:)
74
+ # The custom currency used for credit measurement
75
+ #
76
+ # @param currency_id [String] The currency identifier
77
+ #
78
+ # @param display_name [String] The display name of the currency
79
+ #
80
+ # @param plural [String, nil] Plural unit label
81
+ #
82
+ # @param singular [String, nil] Singular unit label
83
+ #
84
+ # @param symbol [String, nil] The currency symbol
85
+ end
86
+
87
+ class Series < Stigg::Internal::Type::BaseModel
88
+ # @!attribute feature_id
89
+ # The feature ID
90
+ #
91
+ # @return [String]
92
+ required :feature_id, String, api_name: :featureId
93
+
94
+ # @!attribute feature_name
95
+ # The display name of the feature
96
+ #
97
+ # @return [String]
98
+ required :feature_name, String, api_name: :featureName
99
+
100
+ # @!attribute points
101
+ # Time-series data points for this feature
102
+ #
103
+ # @return [Array<Stigg::Models::V1::CreditGetUsageResponse::Data::Series::Point>]
104
+ required :points,
105
+ -> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::CreditGetUsageResponse::Data::Series::Point] }
106
+
107
+ # @!attribute total_credits
108
+ # Total credits consumed by this feature in the time range
109
+ #
110
+ # @return [Float]
111
+ required :total_credits, Float, api_name: :totalCredits
112
+
113
+ # @!method initialize(feature_id:, feature_name:, points:, total_credits:)
114
+ # Credit usage data for a single feature
115
+ #
116
+ # @param feature_id [String] The feature ID
117
+ #
118
+ # @param feature_name [String] The display name of the feature
119
+ #
120
+ # @param points [Array<Stigg::Models::V1::CreditGetUsageResponse::Data::Series::Point>] Time-series data points for this feature
121
+ #
122
+ # @param total_credits [Float] Total credits consumed by this feature in the time range
123
+
124
+ class Point < Stigg::Internal::Type::BaseModel
125
+ # @!attribute timestamp
126
+ # The timestamp of the data point
127
+ #
128
+ # @return [Time]
129
+ required :timestamp, Time
130
+
131
+ # @!attribute value
132
+ # The credit usage value at this point
133
+ #
134
+ # @return [Float]
135
+ required :value, Float
136
+
137
+ # @!method initialize(timestamp:, value:)
138
+ # A single data point in the credit usage time series
139
+ #
140
+ # @param timestamp [Time] The timestamp of the data point
141
+ #
142
+ # @param value [Float] The credit usage value at this point
143
+ end
144
+ end
145
+ end
146
+ end
147
+ end
148
+ end
149
+ end
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ # @see Stigg::Resources::V1::Credits#list_ledger
7
+ class CreditListLedgerParams < Stigg::Internal::Type::BaseModel
8
+ extend Stigg::Internal::Type::RequestParameters::Converter
9
+ include Stigg::Internal::Type::RequestParameters
10
+
11
+ # @!attribute customer_id
12
+ # Filter by customer ID (required)
13
+ #
14
+ # @return [String]
15
+ required :customer_id, String
16
+
17
+ # @!attribute after
18
+ # Return items that come after this cursor
19
+ #
20
+ # @return [String, nil]
21
+ optional :after, String
22
+
23
+ # @!attribute before
24
+ # Return items that come before this cursor
25
+ #
26
+ # @return [String, nil]
27
+ optional :before, String
28
+
29
+ # @!attribute currency_id
30
+ # Filter by currency ID
31
+ #
32
+ # @return [String, nil]
33
+ optional :currency_id, String
34
+
35
+ # @!attribute limit
36
+ # Maximum number of items to return
37
+ #
38
+ # @return [Integer, nil]
39
+ optional :limit, Integer
40
+
41
+ # @!attribute resource_id
42
+ # Filter by resource ID
43
+ #
44
+ # @return [String, nil]
45
+ optional :resource_id, String
46
+
47
+ # @!method initialize(customer_id:, after: nil, before: nil, currency_id: nil, limit: nil, resource_id: nil, request_options: {})
48
+ # @param customer_id [String] Filter by customer ID (required)
49
+ #
50
+ # @param after [String] Return items that come after this cursor
51
+ #
52
+ # @param before [String] Return items that come before this cursor
53
+ #
54
+ # @param currency_id [String] Filter by currency ID
55
+ #
56
+ # @param limit [Integer] Maximum number of items to return
57
+ #
58
+ # @param resource_id [String] Filter by resource ID
59
+ #
60
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,105 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ # @see Stigg::Resources::V1::Credits#list_ledger
7
+ class CreditListLedgerResponse < Stigg::Internal::Type::BaseModel
8
+ # @!attribute amount
9
+ # The credit amount for this event
10
+ #
11
+ # @return [Float]
12
+ required :amount, Float
13
+
14
+ # @!attribute credit_currency_id
15
+ # The credit currency ID
16
+ #
17
+ # @return [String]
18
+ required :credit_currency_id, String, api_name: :creditCurrencyId
19
+
20
+ # @!attribute credit_grant_id
21
+ # The credit grant ID associated with this event
22
+ #
23
+ # @return [String]
24
+ required :credit_grant_id, String, api_name: :creditGrantId
25
+
26
+ # @!attribute customer_id
27
+ # The customer ID this event belongs to
28
+ #
29
+ # @return [String]
30
+ required :customer_id, String, api_name: :customerId
31
+
32
+ # @!attribute event_id
33
+ # The unique event identifier
34
+ #
35
+ # @return [String, nil]
36
+ required :event_id, String, api_name: :eventId, nil?: true
37
+
38
+ # @!attribute event_type
39
+ # The type of credit event
40
+ #
41
+ # @return [Symbol, Stigg::Models::V1::CreditListLedgerResponse::EventType]
42
+ required :event_type,
43
+ enum: -> { Stigg::Models::V1::CreditListLedgerResponse::EventType },
44
+ api_name: :eventType
45
+
46
+ # @!attribute feature_id
47
+ # The feature ID associated with this event
48
+ #
49
+ # @return [String, nil]
50
+ required :feature_id, String, api_name: :featureId, nil?: true
51
+
52
+ # @!attribute resource_id
53
+ # The resource ID this event is scoped to
54
+ #
55
+ # @return [String, nil]
56
+ required :resource_id, String, api_name: :resourceId, nil?: true
57
+
58
+ # @!attribute timestamp
59
+ # The timestamp when the event occurred
60
+ #
61
+ # @return [Time]
62
+ required :timestamp, Time
63
+
64
+ # @!method initialize(amount:, credit_currency_id:, credit_grant_id:, customer_id:, event_id:, event_type:, feature_id:, resource_id:, timestamp:)
65
+ # A credit ledger event representing a change to credit balance
66
+ #
67
+ # @param amount [Float] The credit amount for this event
68
+ #
69
+ # @param credit_currency_id [String] The credit currency ID
70
+ #
71
+ # @param credit_grant_id [String] The credit grant ID associated with this event
72
+ #
73
+ # @param customer_id [String] The customer ID this event belongs to
74
+ #
75
+ # @param event_id [String, nil] The unique event identifier
76
+ #
77
+ # @param event_type [Symbol, Stigg::Models::V1::CreditListLedgerResponse::EventType] The type of credit event
78
+ #
79
+ # @param feature_id [String, nil] The feature ID associated with this event
80
+ #
81
+ # @param resource_id [String, nil] The resource ID this event is scoped to
82
+ #
83
+ # @param timestamp [Time] The timestamp when the event occurred
84
+
85
+ # The type of credit event
86
+ #
87
+ # @see Stigg::Models::V1::CreditListLedgerResponse#event_type
88
+ module EventType
89
+ extend Stigg::Internal::Type::Enum
90
+
91
+ CREDITS_GRANTED = :CREDITS_GRANTED
92
+ CREDITS_EXPIRED = :CREDITS_EXPIRED
93
+ CREDITS_CONSUMED = :CREDITS_CONSUMED
94
+ CREDITS_VOIDED = :CREDITS_VOIDED
95
+ CREDITS_UPDATED = :CREDITS_UPDATED
96
+ CREDITS_CONSUMPTION_TRANSFER_SOURCE = :CREDITS_CONSUMPTION_TRANSFER_SOURCE
97
+ CREDITS_CONSUMPTION_TRANSFER_TARGET = :CREDITS_CONSUMPTION_TRANSFER_TARGET
98
+
99
+ # @!method self.values
100
+ # @return [Array<Symbol>]
101
+ end
102
+ end
103
+ end
104
+ end
105
+ end
@@ -3,9 +3,9 @@
3
3
  module Stigg
4
4
  module Models
5
5
  module V1
6
- module Events
7
- # @see Stigg::Resources::V1::Events::Credits#get_auto_recharge
8
- class CreditGetAutoRechargeParams < Stigg::Internal::Type::BaseModel
6
+ module Credits
7
+ # @see Stigg::Resources::V1::Credits::AutoRecharge#get_auto_recharge
8
+ class AutoRechargeGetAutoRechargeParams < Stigg::Internal::Type::BaseModel
9
9
  extend Stigg::Internal::Type::RequestParameters::Converter
10
10
  include Stigg::Internal::Type::RequestParameters
11
11
 
@@ -3,21 +3,21 @@
3
3
  module Stigg
4
4
  module Models
5
5
  module V1
6
- module Events
7
- # @see Stigg::Resources::V1::Events::Credits#get_auto_recharge
8
- class CreditGetAutoRechargeResponse < Stigg::Internal::Type::BaseModel
6
+ module Credits
7
+ # @see Stigg::Resources::V1::Credits::AutoRecharge#get_auto_recharge
8
+ class AutoRechargeGetAutoRechargeResponse < Stigg::Internal::Type::BaseModel
9
9
  # @!attribute data
10
10
  # Automatic recharge configuration for a customer and currency
11
11
  #
12
- # @return [Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data]
13
- required :data, -> { Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data }
12
+ # @return [Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data]
13
+ required :data, -> { Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data }
14
14
 
15
15
  # @!method initialize(data:)
16
16
  # Response object
17
17
  #
18
- # @param data [Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data] Automatic recharge configuration for a customer and currency
18
+ # @param data [Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data] Automatic recharge configuration for a customer and currency
19
19
 
20
- # @see Stigg::Models::V1::Events::CreditGetAutoRechargeResponse#data
20
+ # @see Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse#data
21
21
  class Data < Stigg::Internal::Type::BaseModel
22
22
  # @!attribute id
23
23
  # The unique configuration ID
@@ -46,9 +46,9 @@ module Stigg
46
46
  # @!attribute grant_expiration_period
47
47
  # Expiration period for auto-recharge grants (1_MONTH or 1_YEAR)
48
48
  #
49
- # @return [Symbol, Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data::GrantExpirationPeriod]
49
+ # @return [Symbol, Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data::GrantExpirationPeriod]
50
50
  required :grant_expiration_period,
51
- enum: -> { Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data::GrantExpirationPeriod },
51
+ enum: -> { Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data::GrantExpirationPeriod },
52
52
  api_name: :grantExpirationPeriod
53
53
 
54
54
  # @!attribute is_enabled
@@ -72,9 +72,9 @@ module Stigg
72
72
  # @!attribute threshold_type
73
73
  # The threshold type (CREDIT_AMOUNT or DOLLAR_AMOUNT)
74
74
  #
75
- # @return [Symbol, Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data::ThresholdType]
75
+ # @return [Symbol, Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data::ThresholdType]
76
76
  required :threshold_type,
77
- enum: -> { Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data::ThresholdType },
77
+ enum: -> { Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data::ThresholdType },
78
78
  api_name: :thresholdType
79
79
 
80
80
  # @!attribute threshold_value
@@ -100,7 +100,7 @@ module Stigg
100
100
  #
101
101
  # @param customer_id [String] The customer ID this configuration belongs to
102
102
  #
103
- # @param grant_expiration_period [Symbol, Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data::GrantExpirationPeriod] Expiration period for auto-recharge grants (1_MONTH or 1_YEAR)
103
+ # @param grant_expiration_period [Symbol, Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data::GrantExpirationPeriod] Expiration period for auto-recharge grants (1_MONTH or 1_YEAR)
104
104
  #
105
105
  # @param is_enabled [Boolean] Whether automatic recharge is enabled
106
106
  #
@@ -108,7 +108,7 @@ module Stigg
108
108
  #
109
109
  # @param target_balance [Float] The target credit balance to recharge to
110
110
  #
111
- # @param threshold_type [Symbol, Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data::ThresholdType] The threshold type (CREDIT_AMOUNT or DOLLAR_AMOUNT)
111
+ # @param threshold_type [Symbol, Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data::ThresholdType] The threshold type (CREDIT_AMOUNT or DOLLAR_AMOUNT)
112
112
  #
113
113
  # @param threshold_value [Float] The threshold value that triggers a recharge
114
114
  #
@@ -116,7 +116,7 @@ module Stigg
116
116
 
117
117
  # Expiration period for auto-recharge grants (1_MONTH or 1_YEAR)
118
118
  #
119
- # @see Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data#grant_expiration_period
119
+ # @see Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data#grant_expiration_period
120
120
  module GrantExpirationPeriod
121
121
  extend Stigg::Internal::Type::Enum
122
122
 
@@ -129,7 +129,7 @@ module Stigg
129
129
 
130
130
  # The threshold type (CREDIT_AMOUNT or DOLLAR_AMOUNT)
131
131
  #
132
- # @see Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data#threshold_type
132
+ # @see Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data#threshold_type
133
133
  module ThresholdType
134
134
  extend Stigg::Internal::Type::Enum
135
135