stigg 0.1.0.pre.beta.2 → 0.1.0.pre.beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/stigg/internal/transport/base_client.rb +2 -0
  5. data/lib/stigg/models/v1/{credits/auto_recharge_get_auto_recharge_params.rb → events/credit_get_auto_recharge_params.rb} +3 -3
  6. data/lib/stigg/models/v1/{credits/auto_recharge_get_auto_recharge_response.rb → events/credit_get_auto_recharge_response.rb} +15 -15
  7. data/lib/stigg/models/v1/events/credit_get_usage_params.rb +86 -0
  8. data/lib/stigg/models/v1/events/credit_get_usage_response.rb +151 -0
  9. data/lib/stigg/models/v1/events/credit_list_ledger_params.rb +66 -0
  10. data/lib/stigg/models/v1/events/credit_list_ledger_response.rb +107 -0
  11. data/lib/stigg/models/v1/events/credits/credit_grant_response.rb +452 -0
  12. data/lib/stigg/models/v1/events/credits/custom_currency_archive_params.rb +26 -0
  13. data/lib/stigg/models/v1/events/credits/custom_currency_archive_response.rb +127 -0
  14. data/lib/stigg/models/v1/events/credits/custom_currency_create_params.rb +95 -0
  15. data/lib/stigg/models/v1/events/credits/custom_currency_create_response.rb +127 -0
  16. data/lib/stigg/models/v1/events/credits/custom_currency_list_associated_entities_params.rb +26 -0
  17. data/lib/stigg/models/v1/events/credits/custom_currency_list_associated_entities_response.rb +54 -0
  18. data/lib/stigg/models/v1/events/credits/custom_currency_list_params.rb +67 -0
  19. data/lib/stigg/models/v1/{credits/custom_currency.rb → events/credits/custom_currency_list_response.rb} +8 -20
  20. data/lib/stigg/models/v1/events/credits/custom_currency_unarchive_params.rb +26 -0
  21. data/lib/stigg/models/v1/events/credits/custom_currency_unarchive_response.rb +127 -0
  22. data/lib/stigg/models/v1/events/credits/custom_currency_update_params.rb +95 -0
  23. data/lib/stigg/models/v1/events/credits/custom_currency_update_response.rb +127 -0
  24. data/lib/stigg/models/v1/events/credits/grant_create_params.rb +406 -0
  25. data/lib/stigg/models/v1/events/credits/grant_list_params.rb +116 -0
  26. data/lib/stigg/models/v1/{credits/credit_grant_response.rb → events/credits/grant_list_response.rb} +37 -52
  27. data/lib/stigg/models/v1/events/credits/grant_void_params.rb +26 -0
  28. data/lib/stigg/models/v1/subscription_import_params.rb +2 -2
  29. data/lib/stigg/models/v1/subscription_preview_params.rb +6 -6
  30. data/lib/stigg/models/v1/subscription_provision_params.rb +4 -4
  31. data/lib/stigg/resources/v1/events/credits/custom_currencies.rb +192 -0
  32. data/lib/stigg/resources/v1/events/credits/grants.rb +137 -0
  33. data/lib/stigg/resources/v1/events/credits.rb +136 -0
  34. data/lib/stigg/resources/v1/events.rb +4 -0
  35. data/lib/stigg/resources/v1/subscriptions.rb +2 -2
  36. data/lib/stigg/resources/v1.rb +0 -4
  37. data/lib/stigg/version.rb +1 -1
  38. data/lib/stigg.rb +26 -24
  39. data/rbi/stigg/models/v1/{credits/auto_recharge_get_auto_recharge_params.rbi → events/credit_get_auto_recharge_params.rbi} +3 -3
  40. data/rbi/stigg/models/v1/{credits/auto_recharge_get_auto_recharge_response.rbi → events/credit_get_auto_recharge_response.rbi} +22 -22
  41. data/rbi/stigg/models/v1/events/credit_get_usage_params.rbi +170 -0
  42. data/rbi/stigg/models/v1/events/credit_get_usage_response.rbi +308 -0
  43. data/rbi/stigg/models/v1/events/credit_list_ledger_params.rbi +105 -0
  44. data/rbi/stigg/models/v1/events/credit_list_ledger_response.rbi +175 -0
  45. data/rbi/stigg/models/v1/events/credits/credit_grant_response.rbi +777 -0
  46. data/rbi/stigg/models/v1/events/credits/custom_currency_archive_params.rbi +44 -0
  47. data/rbi/stigg/models/v1/events/credits/custom_currency_archive_response.rbi +224 -0
  48. data/rbi/stigg/models/v1/events/credits/custom_currency_create_params.rbi +156 -0
  49. data/rbi/stigg/models/v1/events/credits/custom_currency_create_response.rbi +224 -0
  50. data/rbi/stigg/models/v1/events/credits/custom_currency_list_associated_entities_params.rbi +44 -0
  51. data/rbi/stigg/models/v1/events/credits/custom_currency_list_associated_entities_response.rbi +101 -0
  52. data/rbi/stigg/models/v1/events/credits/custom_currency_list_params.rbi +145 -0
  53. data/rbi/stigg/models/v1/{credits/custom_currency.rbi → events/credits/custom_currency_list_response.rbi} +13 -44
  54. data/rbi/stigg/models/v1/events/credits/custom_currency_unarchive_params.rbi +44 -0
  55. data/rbi/stigg/models/v1/events/credits/custom_currency_unarchive_response.rbi +224 -0
  56. data/rbi/stigg/models/v1/events/credits/custom_currency_update_params.rbi +150 -0
  57. data/rbi/stigg/models/v1/events/credits/custom_currency_update_response.rbi +224 -0
  58. data/rbi/stigg/models/v1/events/credits/grant_create_params.rbi +1134 -0
  59. data/rbi/stigg/models/v1/events/credits/grant_list_params.rbi +193 -0
  60. data/rbi/stigg/models/v1/{credits/credit_grant_response.rbi → events/credits/grant_list_response.rbi} +70 -106
  61. data/rbi/stigg/models/v1/events/credits/grant_void_params.rbi +44 -0
  62. data/rbi/stigg/models/v1/subscription_import_params.rbi +2 -2
  63. data/rbi/stigg/models/v1/subscription_preview_params.rbi +6 -6
  64. data/rbi/stigg/models/v1/subscription_provision_params.rbi +4 -4
  65. data/rbi/stigg/resources/v1/events/credits/custom_currencies.rbi +171 -0
  66. data/rbi/stigg/resources/v1/events/credits/grants.rbi +132 -0
  67. data/rbi/stigg/resources/v1/events/credits.rbi +111 -0
  68. data/rbi/stigg/resources/v1/events.rbi +3 -0
  69. data/rbi/stigg/resources/v1/subscriptions.rbi +2 -2
  70. data/rbi/stigg/resources/v1.rbi +0 -3
  71. data/sig/stigg/models/v1/{credits/auto_recharge_get_auto_recharge_params.rbs → events/credit_get_auto_recharge_params.rbs} +3 -3
  72. data/sig/stigg/models/v1/{credits/auto_recharge_get_auto_recharge_response.rbs → events/credit_get_auto_recharge_response.rbs} +17 -17
  73. data/sig/stigg/models/v1/events/credit_get_usage_params.rbs +80 -0
  74. data/sig/stigg/models/v1/events/credit_get_usage_response.rbs +125 -0
  75. data/sig/stigg/models/v1/{credits/grant_list_params.rbs → events/credit_list_ledger_params.rbs} +3 -41
  76. data/sig/stigg/models/v1/events/credit_list_ledger_response.rbs +87 -0
  77. data/sig/stigg/models/v1/events/credits/credit_grant_response.rbs +319 -0
  78. data/sig/stigg/models/v1/events/credits/custom_currency_archive_params.rbs +29 -0
  79. data/sig/stigg/models/v1/events/credits/custom_currency_archive_response.rbs +95 -0
  80. data/sig/stigg/models/v1/events/credits/custom_currency_create_params.rbs +79 -0
  81. data/sig/stigg/models/v1/events/credits/custom_currency_create_response.rbs +95 -0
  82. data/sig/stigg/models/v1/events/credits/custom_currency_list_associated_entities_params.rbs +29 -0
  83. data/sig/stigg/models/v1/events/credits/custom_currency_list_associated_entities_response.rbs +44 -0
  84. data/sig/stigg/models/v1/events/credits/custom_currency_list_params.rbs +68 -0
  85. data/sig/stigg/models/v1/{credits/custom_currency.rbs → events/credits/custom_currency_list_response.rbs} +8 -19
  86. data/sig/stigg/models/v1/events/credits/custom_currency_unarchive_params.rbs +29 -0
  87. data/sig/stigg/models/v1/events/credits/custom_currency_unarchive_response.rbs +95 -0
  88. data/sig/stigg/models/v1/events/credits/custom_currency_update_params.rbs +75 -0
  89. data/sig/stigg/models/v1/events/credits/custom_currency_update_response.rbs +95 -0
  90. data/sig/stigg/models/v1/events/credits/grant_create_params.rbs +503 -0
  91. data/sig/stigg/models/v1/events/credits/grant_list_params.rbs +105 -0
  92. data/sig/stigg/models/v1/{credits/credit_grant_response.rbs → events/credits/grant_list_response.rbs} +42 -57
  93. data/sig/stigg/models/v1/events/credits/grant_void_params.rbs +29 -0
  94. data/sig/stigg/resources/v1/events/credits/custom_currencies.rbs +56 -0
  95. data/sig/stigg/resources/v1/events/credits/grants.rbs +48 -0
  96. data/sig/stigg/resources/v1/events/credits.rbs +41 -0
  97. data/sig/stigg/resources/v1/events.rbs +2 -0
  98. data/sig/stigg/resources/v1.rbs +0 -2
  99. metadata +80 -74
  100. data/lib/stigg/models/v1/credit_get_usage_params.rb +0 -84
  101. data/lib/stigg/models/v1/credit_get_usage_response.rb +0 -149
  102. data/lib/stigg/models/v1/credit_list_ledger_params.rb +0 -64
  103. data/lib/stigg/models/v1/credit_list_ledger_response.rb +0 -105
  104. data/lib/stigg/models/v1/credits/custom_currency_archive_params.rb +0 -24
  105. data/lib/stigg/models/v1/credits/custom_currency_create_params.rb +0 -92
  106. data/lib/stigg/models/v1/credits/custom_currency_list_associated_entities_params.rb +0 -24
  107. data/lib/stigg/models/v1/credits/custom_currency_list_associated_entities_response.rb +0 -52
  108. data/lib/stigg/models/v1/credits/custom_currency_list_params.rb +0 -65
  109. data/lib/stigg/models/v1/credits/custom_currency_list_response.rb +0 -109
  110. data/lib/stigg/models/v1/credits/custom_currency_unarchive_params.rb +0 -24
  111. data/lib/stigg/models/v1/credits/custom_currency_update_params.rb +0 -92
  112. data/lib/stigg/models/v1/credits/grant_create_params.rb +0 -404
  113. data/lib/stigg/models/v1/credits/grant_list_params.rb +0 -114
  114. data/lib/stigg/models/v1/credits/grant_list_response.rb +0 -431
  115. data/lib/stigg/models/v1/credits/grant_void_params.rb +0 -24
  116. data/lib/stigg/resources/v1/credits/auto_recharge.rb +0 -44
  117. data/lib/stigg/resources/v1/credits/custom_currencies.rb +0 -188
  118. data/lib/stigg/resources/v1/credits/grants.rb +0 -135
  119. data/lib/stigg/resources/v1/credits.rb +0 -112
  120. data/rbi/stigg/models/v1/credit_get_usage_params.rbi +0 -155
  121. data/rbi/stigg/models/v1/credit_get_usage_response.rbi +0 -298
  122. data/rbi/stigg/models/v1/credit_list_ledger_params.rbi +0 -100
  123. data/rbi/stigg/models/v1/credit_list_ledger_response.rbi +0 -173
  124. data/rbi/stigg/models/v1/credits/custom_currency_archive_params.rbi +0 -42
  125. data/rbi/stigg/models/v1/credits/custom_currency_create_params.rbi +0 -149
  126. data/rbi/stigg/models/v1/credits/custom_currency_list_associated_entities_params.rbi +0 -42
  127. data/rbi/stigg/models/v1/credits/custom_currency_list_associated_entities_response.rbi +0 -99
  128. data/rbi/stigg/models/v1/credits/custom_currency_list_params.rbi +0 -143
  129. data/rbi/stigg/models/v1/credits/custom_currency_list_response.rbi +0 -172
  130. data/rbi/stigg/models/v1/credits/custom_currency_unarchive_params.rbi +0 -42
  131. data/rbi/stigg/models/v1/credits/custom_currency_update_params.rbi +0 -143
  132. data/rbi/stigg/models/v1/credits/grant_create_params.rbi +0 -1123
  133. data/rbi/stigg/models/v1/credits/grant_list_params.rbi +0 -185
  134. data/rbi/stigg/models/v1/credits/grant_list_response.rbi +0 -719
  135. data/rbi/stigg/models/v1/credits/grant_void_params.rbi +0 -42
  136. data/rbi/stigg/resources/v1/credits/auto_recharge.rbi +0 -36
  137. data/rbi/stigg/resources/v1/credits/custom_currencies.rbi +0 -161
  138. data/rbi/stigg/resources/v1/credits/grants.rbi +0 -129
  139. data/rbi/stigg/resources/v1/credits.rbi +0 -91
  140. data/sig/stigg/models/v1/credit_get_usage_params.rbs +0 -78
  141. data/sig/stigg/models/v1/credit_get_usage_response.rbs +0 -123
  142. data/sig/stigg/models/v1/credit_list_ledger_params.rbs +0 -63
  143. data/sig/stigg/models/v1/credit_list_ledger_response.rbs +0 -85
  144. data/sig/stigg/models/v1/credits/custom_currency_archive_params.rbs +0 -27
  145. data/sig/stigg/models/v1/credits/custom_currency_create_params.rbs +0 -77
  146. data/sig/stigg/models/v1/credits/custom_currency_list_associated_entities_params.rbs +0 -27
  147. data/sig/stigg/models/v1/credits/custom_currency_list_associated_entities_response.rbs +0 -42
  148. data/sig/stigg/models/v1/credits/custom_currency_list_params.rbs +0 -66
  149. data/sig/stigg/models/v1/credits/custom_currency_list_response.rbs +0 -76
  150. data/sig/stigg/models/v1/credits/custom_currency_unarchive_params.rbs +0 -27
  151. data/sig/stigg/models/v1/credits/custom_currency_update_params.rbs +0 -73
  152. data/sig/stigg/models/v1/credits/grant_create_params.rbs +0 -501
  153. data/sig/stigg/models/v1/credits/grant_list_response.rbs +0 -300
  154. data/sig/stigg/models/v1/credits/grant_void_params.rbs +0 -24
  155. data/sig/stigg/resources/v1/credits/auto_recharge.rbs +0 -17
  156. data/sig/stigg/resources/v1/credits/custom_currencies.rbs +0 -54
  157. data/sig/stigg/resources/v1/credits/grants.rbs +0 -46
  158. data/sig/stigg/resources/v1/credits.rbs +0 -35
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f109db145e987e2dc684f7073b27fcf0ce28bb1a7ba6f5f39335ad9fe6d2c856
4
- data.tar.gz: cdc9fd0dfa42be023387a44a4109f04ff3c776d0d4c12ceaca2893be9636a5ba
3
+ metadata.gz: 0a9018feb4a42e29030a5acfc1c38ff14dce1df6d68e235ef1af2ee6581dea67
4
+ data.tar.gz: 317a978899157b0d635f80406376a1eaf788509e27602f04f7cef5a26bb8972d
5
5
  SHA512:
6
- metadata.gz: 750b15519abb891d606b37d98efe08a0d776311794fc4576466e52ac29f2eccc66634bd460ece86fbad9d3601b3e2b8c1f0aa2745612a1095fa09e3625f95d4c
7
- data.tar.gz: 35673538aca99642bda1c7e0b01c75eac3fae3adcb1b9329e34efd19bb7b6584eceb8463739e62563b694b97465938428e6a6be31081b932a36f9d5b133ccf4c
6
+ metadata.gz: 39b6e6026cbc71e0cef0ffb17c44efe89d782d1808fe34c5ef98bd926caf7c996b65ae23baa732ad14dc551873091e9107314f0774484fe380bc0a6c46022e61
7
+ data.tar.gz: a4262482c24f49bb078901c1021b86b0c54e3cf93e5fc50d847f775eddf3369cd3b6ee2d44a01c682d2dfc56842eaaecab5252524549f228690677ca1e278e6e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-beta.3 (2026-05-14)
4
+
5
+ Full Changelog: [v0.1.0-beta.2...v0.1.0-beta.3](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.2...v0.1.0-beta.3)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **client:** elide content type header on requests without body ([7cf5869](https://github.com/stiggio/stigg-ruby/commit/7cf58699e5967da519c0756dc677ce68b53e964b))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **internal:** regenerate SDK with no functional changes ([251a55c](https://github.com/stiggio/stigg-ruby/commit/251a55c685da67aa5332afa5784cc55d35b6c326))
15
+
3
16
  ## 0.1.0-beta.2 (2026-05-12)
4
17
 
5
18
  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)
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.beta.2"
27
+ gem "stigg", "~> 0.1.0.pre.beta.3"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -306,6 +306,8 @@ module Stigg
306
306
  Stigg::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
307
307
  end
308
308
 
309
+ headers.delete("content-type") if body.nil?
310
+
309
311
  url = Stigg::Internal::Util.join_parsed_uri(@base_url_components, {**req, path: path, query: query})
310
312
  headers, encoded = Stigg::Internal::Util.encode_content(headers, body)
311
313
  {
@@ -3,9 +3,9 @@
3
3
  module Stigg
4
4
  module Models
5
5
  module V1
6
- module Credits
7
- # @see Stigg::Resources::V1::Credits::AutoRecharge#get_auto_recharge
8
- class AutoRechargeGetAutoRechargeParams < Stigg::Internal::Type::BaseModel
6
+ module Events
7
+ # @see Stigg::Resources::V1::Events::Credits#get_auto_recharge
8
+ class CreditGetAutoRechargeParams < 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 Credits
7
- # @see Stigg::Resources::V1::Credits::AutoRecharge#get_auto_recharge
8
- class AutoRechargeGetAutoRechargeResponse < Stigg::Internal::Type::BaseModel
6
+ module Events
7
+ # @see Stigg::Resources::V1::Events::Credits#get_auto_recharge
8
+ class CreditGetAutoRechargeResponse < 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::Credits::AutoRechargeGetAutoRechargeResponse::Data]
13
- required :data, -> { Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data }
12
+ # @return [Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data]
13
+ required :data, -> { Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data }
14
14
 
15
15
  # @!method initialize(data:)
16
16
  # Response object
17
17
  #
18
- # @param data [Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data] Automatic recharge configuration for a customer and currency
18
+ # @param data [Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data] Automatic recharge configuration for a customer and currency
19
19
 
20
- # @see Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse#data
20
+ # @see Stigg::Models::V1::Events::CreditGetAutoRechargeResponse#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::Credits::AutoRechargeGetAutoRechargeResponse::Data::GrantExpirationPeriod]
49
+ # @return [Symbol, Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data::GrantExpirationPeriod]
50
50
  required :grant_expiration_period,
51
- enum: -> { Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data::GrantExpirationPeriod },
51
+ enum: -> { Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::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::Credits::AutoRechargeGetAutoRechargeResponse::Data::ThresholdType]
75
+ # @return [Symbol, Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data::ThresholdType]
76
76
  required :threshold_type,
77
- enum: -> { Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data::ThresholdType },
77
+ enum: -> { Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::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::Credits::AutoRechargeGetAutoRechargeResponse::Data::GrantExpirationPeriod] Expiration period for auto-recharge grants (1_MONTH or 1_YEAR)
103
+ # @param grant_expiration_period [Symbol, Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::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::Credits::AutoRechargeGetAutoRechargeResponse::Data::ThresholdType] The threshold type (CREDIT_AMOUNT or DOLLAR_AMOUNT)
111
+ # @param threshold_type [Symbol, Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::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::Credits::AutoRechargeGetAutoRechargeResponse::Data#grant_expiration_period
119
+ # @see Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::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::Credits::AutoRechargeGetAutoRechargeResponse::Data#threshold_type
132
+ # @see Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data#threshold_type
133
133
  module ThresholdType
134
134
  extend Stigg::Internal::Type::Enum
135
135
 
@@ -0,0 +1,86 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ module Events
7
+ # @see Stigg::Resources::V1::Events::Credits#get_usage
8
+ class CreditGetUsageParams < Stigg::Internal::Type::BaseModel
9
+ extend Stigg::Internal::Type::RequestParameters::Converter
10
+ include Stigg::Internal::Type::RequestParameters
11
+
12
+ # @!attribute customer_id
13
+ # Filter by customer ID (required)
14
+ #
15
+ # @return [String]
16
+ required :customer_id, String
17
+
18
+ # @!attribute currency_id
19
+ # Filter by currency ID
20
+ #
21
+ # @return [String, nil]
22
+ optional :currency_id, String
23
+
24
+ # @!attribute end_date
25
+ # End date for the credit usage time range (ISO 8601). Defaults to now when
26
+ # startDate is provided
27
+ #
28
+ # @return [Time, nil]
29
+ optional :end_date, Time
30
+
31
+ # @!attribute resource_id
32
+ # Filter by resource ID
33
+ #
34
+ # @return [String, nil]
35
+ optional :resource_id, String
36
+
37
+ # @!attribute start_date
38
+ # Start date for the credit usage time range (ISO 8601). Takes precedence over
39
+ # timeRange when provided
40
+ #
41
+ # @return [Time, nil]
42
+ optional :start_date, Time
43
+
44
+ # @!attribute time_range
45
+ # Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_YEAR). Defaults
46
+ # to LAST_MONTH
47
+ #
48
+ # @return [Symbol, Stigg::Models::V1::Events::CreditGetUsageParams::TimeRange, nil]
49
+ optional :time_range, enum: -> { Stigg::V1::Events::CreditGetUsageParams::TimeRange }
50
+
51
+ # @!method initialize(customer_id:, currency_id: nil, end_date: nil, resource_id: nil, start_date: nil, time_range: nil, request_options: {})
52
+ # Some parameter documentations has been truncated, see
53
+ # {Stigg::Models::V1::Events::CreditGetUsageParams} for more details.
54
+ #
55
+ # @param customer_id [String] Filter by customer ID (required)
56
+ #
57
+ # @param currency_id [String] Filter by currency ID
58
+ #
59
+ # @param end_date [Time] End date for the credit usage time range (ISO 8601). Defaults to now when startD
60
+ #
61
+ # @param resource_id [String] Filter by resource ID
62
+ #
63
+ # @param start_date [Time] Start date for the credit usage time range (ISO 8601). Takes precedence over tim
64
+ #
65
+ # @param time_range [Symbol, Stigg::Models::V1::Events::CreditGetUsageParams::TimeRange] Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_YEAR). Defaults
66
+ #
67
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
68
+
69
+ # Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_YEAR). Defaults
70
+ # to LAST_MONTH
71
+ module TimeRange
72
+ extend Stigg::Internal::Type::Enum
73
+
74
+ LAST_DAY = :LAST_DAY
75
+ LAST_WEEK = :LAST_WEEK
76
+ LAST_MONTH = :LAST_MONTH
77
+ LAST_YEAR = :LAST_YEAR
78
+
79
+ # @!method self.values
80
+ # @return [Array<Symbol>]
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,151 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ module Events
7
+ # @see Stigg::Resources::V1::Events::Credits#get_usage
8
+ class CreditGetUsageResponse < Stigg::Internal::Type::BaseModel
9
+ # @!attribute data
10
+ # Credit usage data grouped by feature with time-series points
11
+ #
12
+ # @return [Stigg::Models::V1::Events::CreditGetUsageResponse::Data]
13
+ required :data, -> { Stigg::Models::V1::Events::CreditGetUsageResponse::Data }
14
+
15
+ # @!method initialize(data:)
16
+ # Response object
17
+ #
18
+ # @param data [Stigg::Models::V1::Events::CreditGetUsageResponse::Data] Credit usage data grouped by feature with time-series points
19
+
20
+ # @see Stigg::Models::V1::Events::CreditGetUsageResponse#data
21
+ class Data < Stigg::Internal::Type::BaseModel
22
+ # @!attribute currency
23
+ # The custom currency used for credit measurement
24
+ #
25
+ # @return [Stigg::Models::V1::Events::CreditGetUsageResponse::Data::Currency, nil]
26
+ required :currency, -> { Stigg::Models::V1::Events::CreditGetUsageResponse::Data::Currency }, nil?: true
27
+
28
+ # @!attribute series
29
+ # Credit usage series grouped by feature
30
+ #
31
+ # @return [Array<Stigg::Models::V1::Events::CreditGetUsageResponse::Data::Series>]
32
+ required :series,
33
+ -> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::Events::CreditGetUsageResponse::Data::Series] }
34
+
35
+ # @!method initialize(currency:, series:)
36
+ # Credit usage data grouped by feature with time-series points
37
+ #
38
+ # @param currency [Stigg::Models::V1::Events::CreditGetUsageResponse::Data::Currency, nil] The custom currency used for credit measurement
39
+ #
40
+ # @param series [Array<Stigg::Models::V1::Events::CreditGetUsageResponse::Data::Series>] Credit usage series grouped by feature
41
+
42
+ # @see Stigg::Models::V1::Events::CreditGetUsageResponse::Data#currency
43
+ class Currency < Stigg::Internal::Type::BaseModel
44
+ # @!attribute currency_id
45
+ # The currency identifier
46
+ #
47
+ # @return [String]
48
+ required :currency_id, String, api_name: :currencyId
49
+
50
+ # @!attribute display_name
51
+ # The display name of the currency
52
+ #
53
+ # @return [String]
54
+ required :display_name, String, api_name: :displayName
55
+
56
+ # @!attribute plural
57
+ # Plural unit label
58
+ #
59
+ # @return [String, nil]
60
+ required :plural, String, nil?: true
61
+
62
+ # @!attribute singular
63
+ # Singular unit label
64
+ #
65
+ # @return [String, nil]
66
+ required :singular, String, nil?: true
67
+
68
+ # @!attribute symbol
69
+ # The currency symbol
70
+ #
71
+ # @return [String, nil]
72
+ required :symbol, String, nil?: true
73
+
74
+ # @!method initialize(currency_id:, display_name:, plural:, singular:, symbol:)
75
+ # The custom currency used for credit measurement
76
+ #
77
+ # @param currency_id [String] The currency identifier
78
+ #
79
+ # @param display_name [String] The display name of the currency
80
+ #
81
+ # @param plural [String, nil] Plural unit label
82
+ #
83
+ # @param singular [String, nil] Singular unit label
84
+ #
85
+ # @param symbol [String, nil] The currency symbol
86
+ end
87
+
88
+ class Series < Stigg::Internal::Type::BaseModel
89
+ # @!attribute feature_id
90
+ # The feature ID
91
+ #
92
+ # @return [String]
93
+ required :feature_id, String, api_name: :featureId
94
+
95
+ # @!attribute feature_name
96
+ # The display name of the feature
97
+ #
98
+ # @return [String]
99
+ required :feature_name, String, api_name: :featureName
100
+
101
+ # @!attribute points
102
+ # Time-series data points for this feature
103
+ #
104
+ # @return [Array<Stigg::Models::V1::Events::CreditGetUsageResponse::Data::Series::Point>]
105
+ required :points,
106
+ -> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::Events::CreditGetUsageResponse::Data::Series::Point] }
107
+
108
+ # @!attribute total_credits
109
+ # Total credits consumed by this feature in the time range
110
+ #
111
+ # @return [Float]
112
+ required :total_credits, Float, api_name: :totalCredits
113
+
114
+ # @!method initialize(feature_id:, feature_name:, points:, total_credits:)
115
+ # Credit usage data for a single feature
116
+ #
117
+ # @param feature_id [String] The feature ID
118
+ #
119
+ # @param feature_name [String] The display name of the feature
120
+ #
121
+ # @param points [Array<Stigg::Models::V1::Events::CreditGetUsageResponse::Data::Series::Point>] Time-series data points for this feature
122
+ #
123
+ # @param total_credits [Float] Total credits consumed by this feature in the time range
124
+
125
+ class Point < Stigg::Internal::Type::BaseModel
126
+ # @!attribute timestamp
127
+ # The timestamp of the data point
128
+ #
129
+ # @return [Time]
130
+ required :timestamp, Time
131
+
132
+ # @!attribute value
133
+ # The credit usage value at this point
134
+ #
135
+ # @return [Float]
136
+ required :value, Float
137
+
138
+ # @!method initialize(timestamp:, value:)
139
+ # A single data point in the credit usage time series
140
+ #
141
+ # @param timestamp [Time] The timestamp of the data point
142
+ #
143
+ # @param value [Float] The credit usage value at this point
144
+ end
145
+ end
146
+ end
147
+ end
148
+ end
149
+ end
150
+ end
151
+ end
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ module Events
7
+ # @see Stigg::Resources::V1::Events::Credits#list_ledger
8
+ class CreditListLedgerParams < Stigg::Internal::Type::BaseModel
9
+ extend Stigg::Internal::Type::RequestParameters::Converter
10
+ include Stigg::Internal::Type::RequestParameters
11
+
12
+ # @!attribute customer_id
13
+ # Filter by customer ID (required)
14
+ #
15
+ # @return [String]
16
+ required :customer_id, String
17
+
18
+ # @!attribute after
19
+ # Return items that come after this cursor
20
+ #
21
+ # @return [String, nil]
22
+ optional :after, String
23
+
24
+ # @!attribute before
25
+ # Return items that come before this cursor
26
+ #
27
+ # @return [String, nil]
28
+ optional :before, String
29
+
30
+ # @!attribute currency_id
31
+ # Filter by currency ID
32
+ #
33
+ # @return [String, nil]
34
+ optional :currency_id, String
35
+
36
+ # @!attribute limit
37
+ # Maximum number of items to return
38
+ #
39
+ # @return [Integer, nil]
40
+ optional :limit, Integer
41
+
42
+ # @!attribute resource_id
43
+ # Filter by resource ID
44
+ #
45
+ # @return [String, nil]
46
+ optional :resource_id, String
47
+
48
+ # @!method initialize(customer_id:, after: nil, before: nil, currency_id: nil, limit: nil, resource_id: nil, request_options: {})
49
+ # @param customer_id [String] Filter by customer ID (required)
50
+ #
51
+ # @param after [String] Return items that come after this cursor
52
+ #
53
+ # @param before [String] Return items that come before this cursor
54
+ #
55
+ # @param currency_id [String] Filter by currency ID
56
+ #
57
+ # @param limit [Integer] Maximum number of items to return
58
+ #
59
+ # @param resource_id [String] Filter by resource ID
60
+ #
61
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,107 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ module Events
7
+ # @see Stigg::Resources::V1::Events::Credits#list_ledger
8
+ class CreditListLedgerResponse < Stigg::Internal::Type::BaseModel
9
+ # @!attribute amount
10
+ # The credit amount for this event
11
+ #
12
+ # @return [Float]
13
+ required :amount, Float
14
+
15
+ # @!attribute credit_currency_id
16
+ # The credit currency ID
17
+ #
18
+ # @return [String]
19
+ required :credit_currency_id, String, api_name: :creditCurrencyId
20
+
21
+ # @!attribute credit_grant_id
22
+ # The credit grant ID associated with this event
23
+ #
24
+ # @return [String]
25
+ required :credit_grant_id, String, api_name: :creditGrantId
26
+
27
+ # @!attribute customer_id
28
+ # The customer ID this event belongs to
29
+ #
30
+ # @return [String]
31
+ required :customer_id, String, api_name: :customerId
32
+
33
+ # @!attribute event_id
34
+ # The unique event identifier
35
+ #
36
+ # @return [String, nil]
37
+ required :event_id, String, api_name: :eventId, nil?: true
38
+
39
+ # @!attribute event_type
40
+ # The type of credit event
41
+ #
42
+ # @return [Symbol, Stigg::Models::V1::Events::CreditListLedgerResponse::EventType]
43
+ required :event_type,
44
+ enum: -> { Stigg::Models::V1::Events::CreditListLedgerResponse::EventType },
45
+ api_name: :eventType
46
+
47
+ # @!attribute feature_id
48
+ # The feature ID associated with this event
49
+ #
50
+ # @return [String, nil]
51
+ required :feature_id, String, api_name: :featureId, nil?: true
52
+
53
+ # @!attribute resource_id
54
+ # The resource ID this event is scoped to
55
+ #
56
+ # @return [String, nil]
57
+ required :resource_id, String, api_name: :resourceId, nil?: true
58
+
59
+ # @!attribute timestamp
60
+ # The timestamp when the event occurred
61
+ #
62
+ # @return [Time]
63
+ required :timestamp, Time
64
+
65
+ # @!method initialize(amount:, credit_currency_id:, credit_grant_id:, customer_id:, event_id:, event_type:, feature_id:, resource_id:, timestamp:)
66
+ # A credit ledger event representing a change to credit balance
67
+ #
68
+ # @param amount [Float] The credit amount for this event
69
+ #
70
+ # @param credit_currency_id [String] The credit currency ID
71
+ #
72
+ # @param credit_grant_id [String] The credit grant ID associated with this event
73
+ #
74
+ # @param customer_id [String] The customer ID this event belongs to
75
+ #
76
+ # @param event_id [String, nil] The unique event identifier
77
+ #
78
+ # @param event_type [Symbol, Stigg::Models::V1::Events::CreditListLedgerResponse::EventType] The type of credit event
79
+ #
80
+ # @param feature_id [String, nil] The feature ID associated with this event
81
+ #
82
+ # @param resource_id [String, nil] The resource ID this event is scoped to
83
+ #
84
+ # @param timestamp [Time] The timestamp when the event occurred
85
+
86
+ # The type of credit event
87
+ #
88
+ # @see Stigg::Models::V1::Events::CreditListLedgerResponse#event_type
89
+ module EventType
90
+ extend Stigg::Internal::Type::Enum
91
+
92
+ CREDITS_GRANTED = :CREDITS_GRANTED
93
+ CREDITS_EXPIRED = :CREDITS_EXPIRED
94
+ CREDITS_CONSUMED = :CREDITS_CONSUMED
95
+ CREDITS_VOIDED = :CREDITS_VOIDED
96
+ CREDITS_UPDATED = :CREDITS_UPDATED
97
+ CREDITS_CONSUMPTION_TRANSFER_SOURCE = :CREDITS_CONSUMPTION_TRANSFER_SOURCE
98
+ CREDITS_CONSUMPTION_TRANSFER_TARGET = :CREDITS_CONSUMPTION_TRANSFER_TARGET
99
+
100
+ # @!method self.values
101
+ # @return [Array<Symbol>]
102
+ end
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end