stigg 0.1.0.pre.beta.1 → 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 (149) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/stigg/models/v1/credit_get_usage_params.rb +84 -0
  5. data/lib/stigg/models/v1/credit_get_usage_response.rb +149 -0
  6. data/lib/stigg/models/v1/credit_list_ledger_params.rb +64 -0
  7. data/lib/stigg/models/v1/credit_list_ledger_response.rb +105 -0
  8. data/lib/stigg/models/v1/{events/credit_get_auto_recharge_params.rb → credits/auto_recharge_get_auto_recharge_params.rb} +3 -3
  9. data/lib/stigg/models/v1/{events/credit_get_auto_recharge_response.rb → credits/auto_recharge_get_auto_recharge_response.rb} +15 -15
  10. data/lib/stigg/models/v1/{events/credits/grant_list_response.rb → credits/credit_grant_response.rb} +52 -37
  11. data/lib/stigg/models/v1/{events/credits/custom_currency_list_response.rb → credits/custom_currency.rb} +20 -8
  12. data/lib/stigg/models/v1/credits/custom_currency_archive_params.rb +24 -0
  13. data/lib/stigg/models/v1/credits/custom_currency_create_params.rb +92 -0
  14. data/lib/stigg/models/v1/credits/custom_currency_list_associated_entities_params.rb +24 -0
  15. data/lib/stigg/models/v1/credits/custom_currency_list_associated_entities_response.rb +52 -0
  16. data/lib/stigg/models/v1/credits/custom_currency_list_params.rb +65 -0
  17. data/lib/stigg/models/v1/credits/custom_currency_list_response.rb +109 -0
  18. data/lib/stigg/models/v1/credits/custom_currency_unarchive_params.rb +24 -0
  19. data/lib/stigg/models/v1/credits/custom_currency_update_params.rb +92 -0
  20. data/lib/stigg/models/v1/credits/grant_create_params.rb +404 -0
  21. data/lib/stigg/models/v1/credits/grant_list_params.rb +114 -0
  22. data/lib/stigg/models/v1/credits/grant_list_response.rb +431 -0
  23. data/lib/stigg/models/v1/credits/grant_void_params.rb +24 -0
  24. data/lib/stigg/resources/v1/credits/auto_recharge.rb +44 -0
  25. data/lib/stigg/resources/v1/credits/custom_currencies.rb +188 -0
  26. data/lib/stigg/resources/v1/credits/grants.rb +135 -0
  27. data/lib/stigg/resources/v1/credits.rb +112 -0
  28. data/lib/stigg/resources/v1/events.rb +0 -4
  29. data/lib/stigg/resources/v1.rb +4 -0
  30. data/lib/stigg/version.rb +1 -1
  31. data/lib/stigg.rb +24 -26
  32. data/rbi/stigg/models/v1/credit_get_usage_params.rbi +155 -0
  33. data/rbi/stigg/models/v1/credit_get_usage_response.rbi +298 -0
  34. data/rbi/stigg/models/v1/credit_list_ledger_params.rbi +100 -0
  35. data/rbi/stigg/models/v1/credit_list_ledger_response.rbi +173 -0
  36. data/rbi/stigg/models/v1/{events/credit_get_auto_recharge_params.rbi → credits/auto_recharge_get_auto_recharge_params.rbi} +3 -3
  37. data/rbi/stigg/models/v1/{events/credit_get_auto_recharge_response.rbi → credits/auto_recharge_get_auto_recharge_response.rbi} +22 -22
  38. data/rbi/stigg/models/v1/{events/credits/grant_list_response.rbi → credits/credit_grant_response.rbi} +106 -70
  39. data/rbi/stigg/models/v1/{events/credits/custom_currency_list_response.rbi → credits/custom_currency.rbi} +44 -13
  40. data/rbi/stigg/models/v1/credits/custom_currency_archive_params.rbi +42 -0
  41. data/rbi/stigg/models/v1/credits/custom_currency_create_params.rbi +149 -0
  42. data/rbi/stigg/models/v1/credits/custom_currency_list_associated_entities_params.rbi +42 -0
  43. data/rbi/stigg/models/v1/credits/custom_currency_list_associated_entities_response.rbi +99 -0
  44. data/rbi/stigg/models/v1/credits/custom_currency_list_params.rbi +143 -0
  45. data/rbi/stigg/models/v1/credits/custom_currency_list_response.rbi +172 -0
  46. data/rbi/stigg/models/v1/credits/custom_currency_unarchive_params.rbi +42 -0
  47. data/rbi/stigg/models/v1/credits/custom_currency_update_params.rbi +143 -0
  48. data/rbi/stigg/models/v1/credits/grant_create_params.rbi +1123 -0
  49. data/rbi/stigg/models/v1/credits/grant_list_params.rbi +185 -0
  50. data/rbi/stigg/models/v1/credits/grant_list_response.rbi +719 -0
  51. data/rbi/stigg/models/v1/credits/grant_void_params.rbi +42 -0
  52. data/rbi/stigg/resources/v1/credits/auto_recharge.rbi +36 -0
  53. data/rbi/stigg/resources/v1/credits/custom_currencies.rbi +161 -0
  54. data/rbi/stigg/resources/v1/credits/grants.rbi +129 -0
  55. data/rbi/stigg/resources/v1/credits.rbi +91 -0
  56. data/rbi/stigg/resources/v1/events.rbi +0 -3
  57. data/rbi/stigg/resources/v1.rbi +3 -0
  58. data/sig/stigg/models/v1/credit_get_usage_params.rbs +78 -0
  59. data/sig/stigg/models/v1/credit_get_usage_response.rbs +123 -0
  60. data/sig/stigg/models/v1/credit_list_ledger_params.rbs +63 -0
  61. data/sig/stigg/models/v1/credit_list_ledger_response.rbs +85 -0
  62. data/sig/stigg/models/v1/{events/credit_get_auto_recharge_params.rbs → credits/auto_recharge_get_auto_recharge_params.rbs} +3 -3
  63. data/sig/stigg/models/v1/{events/credit_get_auto_recharge_response.rbs → credits/auto_recharge_get_auto_recharge_response.rbs} +17 -17
  64. data/sig/stigg/models/v1/{events/credits/grant_list_response.rbs → credits/credit_grant_response.rbs} +57 -42
  65. data/sig/stigg/models/v1/{events/credits/custom_currency_list_response.rbs → credits/custom_currency.rbs} +19 -8
  66. data/sig/stigg/models/v1/credits/custom_currency_archive_params.rbs +27 -0
  67. data/sig/stigg/models/v1/credits/custom_currency_create_params.rbs +77 -0
  68. data/sig/stigg/models/v1/credits/custom_currency_list_associated_entities_params.rbs +27 -0
  69. data/sig/stigg/models/v1/credits/custom_currency_list_associated_entities_response.rbs +42 -0
  70. data/sig/stigg/models/v1/credits/custom_currency_list_params.rbs +66 -0
  71. data/sig/stigg/models/v1/credits/custom_currency_list_response.rbs +76 -0
  72. data/sig/stigg/models/v1/credits/custom_currency_unarchive_params.rbs +27 -0
  73. data/sig/stigg/models/v1/credits/custom_currency_update_params.rbs +73 -0
  74. data/sig/stigg/models/v1/credits/grant_create_params.rbs +501 -0
  75. data/sig/stigg/models/v1/{events/credit_list_ledger_params.rbs → credits/grant_list_params.rbs} +41 -3
  76. data/sig/stigg/models/v1/credits/grant_list_response.rbs +300 -0
  77. data/sig/stigg/models/v1/credits/grant_void_params.rbs +24 -0
  78. data/sig/stigg/resources/v1/credits/auto_recharge.rbs +17 -0
  79. data/sig/stigg/resources/v1/credits/custom_currencies.rbs +54 -0
  80. data/sig/stigg/resources/v1/credits/grants.rbs +46 -0
  81. data/sig/stigg/resources/v1/credits.rbs +35 -0
  82. data/sig/stigg/resources/v1/events.rbs +0 -2
  83. data/sig/stigg/resources/v1.rbs +2 -0
  84. metadata +73 -79
  85. data/lib/stigg/models/v1/events/credit_get_usage_params.rb +0 -86
  86. data/lib/stigg/models/v1/events/credit_get_usage_response.rb +0 -151
  87. data/lib/stigg/models/v1/events/credit_list_ledger_params.rb +0 -66
  88. data/lib/stigg/models/v1/events/credit_list_ledger_response.rb +0 -107
  89. data/lib/stigg/models/v1/events/credits/credit_grant_response.rb +0 -452
  90. data/lib/stigg/models/v1/events/credits/custom_currency_archive_params.rb +0 -26
  91. data/lib/stigg/models/v1/events/credits/custom_currency_archive_response.rb +0 -127
  92. data/lib/stigg/models/v1/events/credits/custom_currency_create_params.rb +0 -95
  93. data/lib/stigg/models/v1/events/credits/custom_currency_create_response.rb +0 -127
  94. data/lib/stigg/models/v1/events/credits/custom_currency_list_associated_entities_params.rb +0 -26
  95. data/lib/stigg/models/v1/events/credits/custom_currency_list_associated_entities_response.rb +0 -54
  96. data/lib/stigg/models/v1/events/credits/custom_currency_list_params.rb +0 -67
  97. data/lib/stigg/models/v1/events/credits/custom_currency_unarchive_params.rb +0 -26
  98. data/lib/stigg/models/v1/events/credits/custom_currency_unarchive_response.rb +0 -127
  99. data/lib/stigg/models/v1/events/credits/custom_currency_update_params.rb +0 -95
  100. data/lib/stigg/models/v1/events/credits/custom_currency_update_response.rb +0 -127
  101. data/lib/stigg/models/v1/events/credits/grant_create_params.rb +0 -406
  102. data/lib/stigg/models/v1/events/credits/grant_list_params.rb +0 -116
  103. data/lib/stigg/models/v1/events/credits/grant_void_params.rb +0 -26
  104. data/lib/stigg/resources/v1/events/credits/custom_currencies.rb +0 -192
  105. data/lib/stigg/resources/v1/events/credits/grants.rb +0 -137
  106. data/lib/stigg/resources/v1/events/credits.rb +0 -136
  107. data/rbi/stigg/models/v1/events/credit_get_usage_params.rbi +0 -170
  108. data/rbi/stigg/models/v1/events/credit_get_usage_response.rbi +0 -308
  109. data/rbi/stigg/models/v1/events/credit_list_ledger_params.rbi +0 -105
  110. data/rbi/stigg/models/v1/events/credit_list_ledger_response.rbi +0 -175
  111. data/rbi/stigg/models/v1/events/credits/credit_grant_response.rbi +0 -777
  112. data/rbi/stigg/models/v1/events/credits/custom_currency_archive_params.rbi +0 -44
  113. data/rbi/stigg/models/v1/events/credits/custom_currency_archive_response.rbi +0 -224
  114. data/rbi/stigg/models/v1/events/credits/custom_currency_create_params.rbi +0 -156
  115. data/rbi/stigg/models/v1/events/credits/custom_currency_create_response.rbi +0 -224
  116. data/rbi/stigg/models/v1/events/credits/custom_currency_list_associated_entities_params.rbi +0 -44
  117. data/rbi/stigg/models/v1/events/credits/custom_currency_list_associated_entities_response.rbi +0 -101
  118. data/rbi/stigg/models/v1/events/credits/custom_currency_list_params.rbi +0 -145
  119. data/rbi/stigg/models/v1/events/credits/custom_currency_unarchive_params.rbi +0 -44
  120. data/rbi/stigg/models/v1/events/credits/custom_currency_unarchive_response.rbi +0 -224
  121. data/rbi/stigg/models/v1/events/credits/custom_currency_update_params.rbi +0 -150
  122. data/rbi/stigg/models/v1/events/credits/custom_currency_update_response.rbi +0 -224
  123. data/rbi/stigg/models/v1/events/credits/grant_create_params.rbi +0 -1134
  124. data/rbi/stigg/models/v1/events/credits/grant_list_params.rbi +0 -193
  125. data/rbi/stigg/models/v1/events/credits/grant_void_params.rbi +0 -44
  126. data/rbi/stigg/resources/v1/events/credits/custom_currencies.rbi +0 -171
  127. data/rbi/stigg/resources/v1/events/credits/grants.rbi +0 -132
  128. data/rbi/stigg/resources/v1/events/credits.rbi +0 -111
  129. data/sig/stigg/models/v1/events/credit_get_usage_params.rbs +0 -80
  130. data/sig/stigg/models/v1/events/credit_get_usage_response.rbs +0 -125
  131. data/sig/stigg/models/v1/events/credit_list_ledger_response.rbs +0 -87
  132. data/sig/stigg/models/v1/events/credits/credit_grant_response.rbs +0 -319
  133. data/sig/stigg/models/v1/events/credits/custom_currency_archive_params.rbs +0 -29
  134. data/sig/stigg/models/v1/events/credits/custom_currency_archive_response.rbs +0 -95
  135. data/sig/stigg/models/v1/events/credits/custom_currency_create_params.rbs +0 -79
  136. data/sig/stigg/models/v1/events/credits/custom_currency_create_response.rbs +0 -95
  137. data/sig/stigg/models/v1/events/credits/custom_currency_list_associated_entities_params.rbs +0 -29
  138. data/sig/stigg/models/v1/events/credits/custom_currency_list_associated_entities_response.rbs +0 -44
  139. data/sig/stigg/models/v1/events/credits/custom_currency_list_params.rbs +0 -68
  140. data/sig/stigg/models/v1/events/credits/custom_currency_unarchive_params.rbs +0 -29
  141. data/sig/stigg/models/v1/events/credits/custom_currency_unarchive_response.rbs +0 -95
  142. data/sig/stigg/models/v1/events/credits/custom_currency_update_params.rbs +0 -75
  143. data/sig/stigg/models/v1/events/credits/custom_currency_update_response.rbs +0 -95
  144. data/sig/stigg/models/v1/events/credits/grant_create_params.rbs +0 -503
  145. data/sig/stigg/models/v1/events/credits/grant_list_params.rbs +0 -105
  146. data/sig/stigg/models/v1/events/credits/grant_void_params.rbs +0 -29
  147. data/sig/stigg/resources/v1/events/credits/custom_currencies.rbs +0 -56
  148. data/sig/stigg/resources/v1/events/credits/grants.rbs +0 -48
  149. data/sig/stigg/resources/v1/events/credits.rbs +0 -41
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c90ef360bd74c5409fabb376a4cee67876dde159497942b7464353adfd591ff2
4
- data.tar.gz: 8080663595e284f048d9624092e687f9c8cbfb75fb1faf6c8c50354377692049
3
+ metadata.gz: f109db145e987e2dc684f7073b27fcf0ce28bb1a7ba6f5f39335ad9fe6d2c856
4
+ data.tar.gz: cdc9fd0dfa42be023387a44a4109f04ff3c776d0d4c12ceaca2893be9636a5ba
5
5
  SHA512:
6
- metadata.gz: f087d074fac5431724e397974750eba2a4e0dbca2865c77549c14a726a71484c6bbae696e0c8142f2a1b86d8827279ec9ef94ff4016e14604ce7d07877e9290e
7
- data.tar.gz: 0cff15ec7536714419a418bb84ec2d53a5dd79e0e6cbf02bb09e264125e652273d7d78ea9bc057fbcdab8707434d983cf84107f6c56265c35ec3bae39ad221df
6
+ metadata.gz: 750b15519abb891d606b37d98efe08a0d776311794fc4576466e52ac29f2eccc66634bd460ece86fbad9d3601b3e2b8c1f0aa2745612a1095fa09e3625f95d4c
7
+ data.tar.gz: 35673538aca99642bda1c7e0b01c75eac3fae3adcb1b9329e34efd19bb7b6584eceb8463739e62563b694b97465938428e6a6be31081b932a36f9d5b133ccf4c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
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
+
3
11
  ## 0.1.0-beta.1 (2026-05-12)
4
12
 
5
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)
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.1"
27
+ gem "stigg", "~> 0.1.0.pre.beta.2"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -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