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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/stigg/models/v1/credit_get_usage_params.rb +84 -0
- data/lib/stigg/models/v1/credit_get_usage_response.rb +149 -0
- data/lib/stigg/models/v1/credit_list_ledger_params.rb +64 -0
- data/lib/stigg/models/v1/credit_list_ledger_response.rb +105 -0
- data/lib/stigg/models/v1/{events/credit_get_auto_recharge_params.rb → credits/auto_recharge_get_auto_recharge_params.rb} +3 -3
- data/lib/stigg/models/v1/{events/credit_get_auto_recharge_response.rb → credits/auto_recharge_get_auto_recharge_response.rb} +15 -15
- data/lib/stigg/models/v1/{events/credits/grant_list_response.rb → credits/credit_grant_response.rb} +52 -37
- data/lib/stigg/models/v1/{events/credits/custom_currency_list_response.rb → credits/custom_currency.rb} +20 -8
- data/lib/stigg/models/v1/credits/custom_currency_archive_params.rb +24 -0
- data/lib/stigg/models/v1/credits/custom_currency_create_params.rb +92 -0
- data/lib/stigg/models/v1/credits/custom_currency_list_associated_entities_params.rb +24 -0
- data/lib/stigg/models/v1/credits/custom_currency_list_associated_entities_response.rb +52 -0
- data/lib/stigg/models/v1/credits/custom_currency_list_params.rb +65 -0
- data/lib/stigg/models/v1/credits/custom_currency_list_response.rb +109 -0
- data/lib/stigg/models/v1/credits/custom_currency_unarchive_params.rb +24 -0
- data/lib/stigg/models/v1/credits/custom_currency_update_params.rb +92 -0
- data/lib/stigg/models/v1/credits/grant_create_params.rb +404 -0
- data/lib/stigg/models/v1/credits/grant_list_params.rb +114 -0
- data/lib/stigg/models/v1/credits/grant_list_response.rb +431 -0
- data/lib/stigg/models/v1/credits/grant_void_params.rb +24 -0
- data/lib/stigg/resources/v1/credits/auto_recharge.rb +44 -0
- data/lib/stigg/resources/v1/credits/custom_currencies.rb +188 -0
- data/lib/stigg/resources/v1/credits/grants.rb +135 -0
- data/lib/stigg/resources/v1/credits.rb +112 -0
- data/lib/stigg/resources/v1/events.rb +0 -4
- data/lib/stigg/resources/v1.rb +4 -0
- data/lib/stigg/version.rb +1 -1
- data/lib/stigg.rb +24 -26
- data/rbi/stigg/models/v1/credit_get_usage_params.rbi +155 -0
- data/rbi/stigg/models/v1/credit_get_usage_response.rbi +298 -0
- data/rbi/stigg/models/v1/credit_list_ledger_params.rbi +100 -0
- data/rbi/stigg/models/v1/credit_list_ledger_response.rbi +173 -0
- data/rbi/stigg/models/v1/{events/credit_get_auto_recharge_params.rbi → credits/auto_recharge_get_auto_recharge_params.rbi} +3 -3
- data/rbi/stigg/models/v1/{events/credit_get_auto_recharge_response.rbi → credits/auto_recharge_get_auto_recharge_response.rbi} +22 -22
- data/rbi/stigg/models/v1/{events/credits/grant_list_response.rbi → credits/credit_grant_response.rbi} +106 -70
- data/rbi/stigg/models/v1/{events/credits/custom_currency_list_response.rbi → credits/custom_currency.rbi} +44 -13
- data/rbi/stigg/models/v1/credits/custom_currency_archive_params.rbi +42 -0
- data/rbi/stigg/models/v1/credits/custom_currency_create_params.rbi +149 -0
- data/rbi/stigg/models/v1/credits/custom_currency_list_associated_entities_params.rbi +42 -0
- data/rbi/stigg/models/v1/credits/custom_currency_list_associated_entities_response.rbi +99 -0
- data/rbi/stigg/models/v1/credits/custom_currency_list_params.rbi +143 -0
- data/rbi/stigg/models/v1/credits/custom_currency_list_response.rbi +172 -0
- data/rbi/stigg/models/v1/credits/custom_currency_unarchive_params.rbi +42 -0
- data/rbi/stigg/models/v1/credits/custom_currency_update_params.rbi +143 -0
- data/rbi/stigg/models/v1/credits/grant_create_params.rbi +1123 -0
- data/rbi/stigg/models/v1/credits/grant_list_params.rbi +185 -0
- data/rbi/stigg/models/v1/credits/grant_list_response.rbi +719 -0
- data/rbi/stigg/models/v1/credits/grant_void_params.rbi +42 -0
- data/rbi/stigg/resources/v1/credits/auto_recharge.rbi +36 -0
- data/rbi/stigg/resources/v1/credits/custom_currencies.rbi +161 -0
- data/rbi/stigg/resources/v1/credits/grants.rbi +129 -0
- data/rbi/stigg/resources/v1/credits.rbi +91 -0
- data/rbi/stigg/resources/v1/events.rbi +0 -3
- data/rbi/stigg/resources/v1.rbi +3 -0
- data/sig/stigg/models/v1/credit_get_usage_params.rbs +78 -0
- data/sig/stigg/models/v1/credit_get_usage_response.rbs +123 -0
- data/sig/stigg/models/v1/credit_list_ledger_params.rbs +63 -0
- data/sig/stigg/models/v1/credit_list_ledger_response.rbs +85 -0
- data/sig/stigg/models/v1/{events/credit_get_auto_recharge_params.rbs → credits/auto_recharge_get_auto_recharge_params.rbs} +3 -3
- data/sig/stigg/models/v1/{events/credit_get_auto_recharge_response.rbs → credits/auto_recharge_get_auto_recharge_response.rbs} +17 -17
- data/sig/stigg/models/v1/{events/credits/grant_list_response.rbs → credits/credit_grant_response.rbs} +57 -42
- data/sig/stigg/models/v1/{events/credits/custom_currency_list_response.rbs → credits/custom_currency.rbs} +19 -8
- data/sig/stigg/models/v1/credits/custom_currency_archive_params.rbs +27 -0
- data/sig/stigg/models/v1/credits/custom_currency_create_params.rbs +77 -0
- data/sig/stigg/models/v1/credits/custom_currency_list_associated_entities_params.rbs +27 -0
- data/sig/stigg/models/v1/credits/custom_currency_list_associated_entities_response.rbs +42 -0
- data/sig/stigg/models/v1/credits/custom_currency_list_params.rbs +66 -0
- data/sig/stigg/models/v1/credits/custom_currency_list_response.rbs +76 -0
- data/sig/stigg/models/v1/credits/custom_currency_unarchive_params.rbs +27 -0
- data/sig/stigg/models/v1/credits/custom_currency_update_params.rbs +73 -0
- data/sig/stigg/models/v1/credits/grant_create_params.rbs +501 -0
- data/sig/stigg/models/v1/{events/credit_list_ledger_params.rbs → credits/grant_list_params.rbs} +41 -3
- data/sig/stigg/models/v1/credits/grant_list_response.rbs +300 -0
- data/sig/stigg/models/v1/credits/grant_void_params.rbs +24 -0
- data/sig/stigg/resources/v1/credits/auto_recharge.rbs +17 -0
- data/sig/stigg/resources/v1/credits/custom_currencies.rbs +54 -0
- data/sig/stigg/resources/v1/credits/grants.rbs +46 -0
- data/sig/stigg/resources/v1/credits.rbs +35 -0
- data/sig/stigg/resources/v1/events.rbs +0 -2
- data/sig/stigg/resources/v1.rbs +2 -0
- metadata +73 -79
- data/lib/stigg/models/v1/events/credit_get_usage_params.rb +0 -86
- data/lib/stigg/models/v1/events/credit_get_usage_response.rb +0 -151
- data/lib/stigg/models/v1/events/credit_list_ledger_params.rb +0 -66
- data/lib/stigg/models/v1/events/credit_list_ledger_response.rb +0 -107
- data/lib/stigg/models/v1/events/credits/credit_grant_response.rb +0 -452
- data/lib/stigg/models/v1/events/credits/custom_currency_archive_params.rb +0 -26
- data/lib/stigg/models/v1/events/credits/custom_currency_archive_response.rb +0 -127
- data/lib/stigg/models/v1/events/credits/custom_currency_create_params.rb +0 -95
- data/lib/stigg/models/v1/events/credits/custom_currency_create_response.rb +0 -127
- data/lib/stigg/models/v1/events/credits/custom_currency_list_associated_entities_params.rb +0 -26
- data/lib/stigg/models/v1/events/credits/custom_currency_list_associated_entities_response.rb +0 -54
- data/lib/stigg/models/v1/events/credits/custom_currency_list_params.rb +0 -67
- data/lib/stigg/models/v1/events/credits/custom_currency_unarchive_params.rb +0 -26
- data/lib/stigg/models/v1/events/credits/custom_currency_unarchive_response.rb +0 -127
- data/lib/stigg/models/v1/events/credits/custom_currency_update_params.rb +0 -95
- data/lib/stigg/models/v1/events/credits/custom_currency_update_response.rb +0 -127
- data/lib/stigg/models/v1/events/credits/grant_create_params.rb +0 -406
- data/lib/stigg/models/v1/events/credits/grant_list_params.rb +0 -116
- data/lib/stigg/models/v1/events/credits/grant_void_params.rb +0 -26
- data/lib/stigg/resources/v1/events/credits/custom_currencies.rb +0 -192
- data/lib/stigg/resources/v1/events/credits/grants.rb +0 -137
- data/lib/stigg/resources/v1/events/credits.rb +0 -136
- data/rbi/stigg/models/v1/events/credit_get_usage_params.rbi +0 -170
- data/rbi/stigg/models/v1/events/credit_get_usage_response.rbi +0 -308
- data/rbi/stigg/models/v1/events/credit_list_ledger_params.rbi +0 -105
- data/rbi/stigg/models/v1/events/credit_list_ledger_response.rbi +0 -175
- data/rbi/stigg/models/v1/events/credits/credit_grant_response.rbi +0 -777
- data/rbi/stigg/models/v1/events/credits/custom_currency_archive_params.rbi +0 -44
- data/rbi/stigg/models/v1/events/credits/custom_currency_archive_response.rbi +0 -224
- data/rbi/stigg/models/v1/events/credits/custom_currency_create_params.rbi +0 -156
- data/rbi/stigg/models/v1/events/credits/custom_currency_create_response.rbi +0 -224
- data/rbi/stigg/models/v1/events/credits/custom_currency_list_associated_entities_params.rbi +0 -44
- data/rbi/stigg/models/v1/events/credits/custom_currency_list_associated_entities_response.rbi +0 -101
- data/rbi/stigg/models/v1/events/credits/custom_currency_list_params.rbi +0 -145
- data/rbi/stigg/models/v1/events/credits/custom_currency_unarchive_params.rbi +0 -44
- data/rbi/stigg/models/v1/events/credits/custom_currency_unarchive_response.rbi +0 -224
- data/rbi/stigg/models/v1/events/credits/custom_currency_update_params.rbi +0 -150
- data/rbi/stigg/models/v1/events/credits/custom_currency_update_response.rbi +0 -224
- data/rbi/stigg/models/v1/events/credits/grant_create_params.rbi +0 -1134
- data/rbi/stigg/models/v1/events/credits/grant_list_params.rbi +0 -193
- data/rbi/stigg/models/v1/events/credits/grant_void_params.rbi +0 -44
- data/rbi/stigg/resources/v1/events/credits/custom_currencies.rbi +0 -171
- data/rbi/stigg/resources/v1/events/credits/grants.rbi +0 -132
- data/rbi/stigg/resources/v1/events/credits.rbi +0 -111
- data/sig/stigg/models/v1/events/credit_get_usage_params.rbs +0 -80
- data/sig/stigg/models/v1/events/credit_get_usage_response.rbs +0 -125
- data/sig/stigg/models/v1/events/credit_list_ledger_response.rbs +0 -87
- data/sig/stigg/models/v1/events/credits/credit_grant_response.rbs +0 -319
- data/sig/stigg/models/v1/events/credits/custom_currency_archive_params.rbs +0 -29
- data/sig/stigg/models/v1/events/credits/custom_currency_archive_response.rbs +0 -95
- data/sig/stigg/models/v1/events/credits/custom_currency_create_params.rbs +0 -79
- data/sig/stigg/models/v1/events/credits/custom_currency_create_response.rbs +0 -95
- data/sig/stigg/models/v1/events/credits/custom_currency_list_associated_entities_params.rbs +0 -29
- data/sig/stigg/models/v1/events/credits/custom_currency_list_associated_entities_response.rbs +0 -44
- data/sig/stigg/models/v1/events/credits/custom_currency_list_params.rbs +0 -68
- data/sig/stigg/models/v1/events/credits/custom_currency_unarchive_params.rbs +0 -29
- data/sig/stigg/models/v1/events/credits/custom_currency_unarchive_response.rbs +0 -95
- data/sig/stigg/models/v1/events/credits/custom_currency_update_params.rbs +0 -75
- data/sig/stigg/models/v1/events/credits/custom_currency_update_response.rbs +0 -95
- data/sig/stigg/models/v1/events/credits/grant_create_params.rbs +0 -503
- data/sig/stigg/models/v1/events/credits/grant_list_params.rbs +0 -105
- data/sig/stigg/models/v1/events/credits/grant_void_params.rbs +0 -29
- data/sig/stigg/resources/v1/events/credits/custom_currencies.rbs +0 -56
- data/sig/stigg/resources/v1/events/credits/grants.rbs +0 -48
- 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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f109db145e987e2dc684f7073b27fcf0ce28bb1a7ba6f5f39335ad9fe6d2c856
|
|
4
|
+
data.tar.gz: cdc9fd0dfa42be023387a44a4109f04ff3c776d0d4c12ceaca2893be9636a5ba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
@@ -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
|
|
7
|
-
# @see Stigg::Resources::V1::
|
|
8
|
-
class
|
|
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
|
|
7
|
-
# @see Stigg::Resources::V1::
|
|
8
|
-
class
|
|
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::
|
|
13
|
-
required :data, -> { Stigg::Models::V1::
|
|
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::
|
|
18
|
+
# @param data [Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data] Automatic recharge configuration for a customer and currency
|
|
19
19
|
|
|
20
|
-
# @see Stigg::Models::V1::
|
|
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::
|
|
49
|
+
# @return [Symbol, Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data::GrantExpirationPeriod]
|
|
50
50
|
required :grant_expiration_period,
|
|
51
|
-
enum: -> { Stigg::Models::V1::
|
|
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::
|
|
75
|
+
# @return [Symbol, Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data::ThresholdType]
|
|
76
76
|
required :threshold_type,
|
|
77
|
-
enum: -> { Stigg::Models::V1::
|
|
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::
|
|
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::
|
|
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::
|
|
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::
|
|
132
|
+
# @see Stigg::Models::V1::Credits::AutoRechargeGetAutoRechargeResponse::Data#threshold_type
|
|
133
133
|
module ThresholdType
|
|
134
134
|
extend Stigg::Internal::Type::Enum
|
|
135
135
|
|