stigg 0.1.0.pre.beta.3 → 0.1.0.pre.beta.4
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_auto_recharge_params.rb +32 -0
- data/lib/stigg/models/v1/credit_get_auto_recharge_response.rb +145 -0
- 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/credits/grant_list_response.rb → credits/credit_grant_response.rb} +52 -37
- 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/{events/credits/custom_currency_list_response.rb → credits/custom_currency_response.rb} +20 -8
- 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/custom_currencies.rb +188 -0
- data/lib/stigg/resources/v1/credits/grants.rb +135 -0
- data/lib/stigg/resources/v1/credits.rb +134 -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 +23 -26
- data/rbi/stigg/models/v1/credit_get_auto_recharge_params.rbi +56 -0
- data/rbi/stigg/models/v1/credit_get_auto_recharge_response.rbi +246 -0
- 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/credits/grant_list_response.rbi → credits/credit_grant_response.rbi} +106 -70
- data/rbi/stigg/models/v1/{events/credit_get_auto_recharge_params.rbi → credits/custom_currency_archive_params.rbi} +5 -21
- 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/{events/credits/custom_currency_list_response.rbi → credits/custom_currency_response.rbi} +48 -9
- 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/custom_currencies.rbi +161 -0
- data/rbi/stigg/resources/v1/credits/grants.rbi +129 -0
- data/rbi/stigg/resources/v1/credits.rbi +106 -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_auto_recharge_params.rbs +30 -0
- data/sig/stigg/models/v1/credit_get_auto_recharge_response.rbs +109 -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/credits/grant_list_response.rbs → credits/credit_grant_response.rbs} +57 -42
- data/sig/stigg/models/v1/{events/credit_get_auto_recharge_params.rbs → credits/custom_currency_archive_params.rbs} +4 -9
- 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/{events/credits/custom_currency_list_response.rbs → credits/custom_currency_response.rbs} +21 -8
- 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/custom_currencies.rbs +54 -0
- data/sig/stigg/resources/v1/credits/grants.rbs +46 -0
- data/sig/stigg/resources/v1/credits.rbs +39 -0
- data/sig/stigg/resources/v1/events.rbs +0 -2
- data/sig/stigg/resources/v1.rbs +2 -0
- metadata +70 -79
- data/lib/stigg/models/v1/events/credit_get_auto_recharge_params.rb +0 -34
- data/lib/stigg/models/v1/events/credit_get_auto_recharge_response.rb +0 -147
- 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_auto_recharge_response.rbi +0 -257
- 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_auto_recharge_response.rbs +0 -113
- 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: 249c958d5421d800576ceee5879df6926ab2326f8710331b9d8a4b5596444a3e
|
|
4
|
+
data.tar.gz: 577134966cf75587de409e62f3668c2b231aa8a9f0c856fe662092f00d8a01bc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3a73442035e11452368dc6b1120e8c8579adec9ab1c1ff21cefb6cfe54d333e7115550f848e7db01fb0e90ce5dac0ec2417767b8bbd67a0568e68497b99bbe71
|
|
7
|
+
data.tar.gz: c828c1daaecf5f769ca17c99cef44652f6ab1fe67f033c740f5eca867340278714d927b321041412082520039aa1abf8690ff52c71fb4cb4e309e6fc47f15593
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-beta.4 (2026-05-14)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-beta.3...v0.1.0-beta.4](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.3...v0.1.0-beta.4)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** fix credits resource ([2afca34](https://github.com/stiggio/stigg-ruby/commit/2afca34e49428caf0a750174cbf09a868c183faa))
|
|
10
|
+
|
|
3
11
|
## 0.1.0-beta.3 (2026-05-14)
|
|
4
12
|
|
|
5
13
|
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)
|
data/README.md
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see Stigg::Resources::V1::Credits#get_auto_recharge
|
|
7
|
+
class CreditGetAutoRechargeParams < Stigg::Internal::Type::BaseModel
|
|
8
|
+
extend Stigg::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Stigg::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute currency_id
|
|
12
|
+
# Filter by currency ID (required)
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :currency_id, String
|
|
16
|
+
|
|
17
|
+
# @!attribute customer_id
|
|
18
|
+
# Filter by customer ID (required)
|
|
19
|
+
#
|
|
20
|
+
# @return [String]
|
|
21
|
+
required :customer_id, String
|
|
22
|
+
|
|
23
|
+
# @!method initialize(currency_id:, customer_id:, request_options: {})
|
|
24
|
+
# @param currency_id [String] Filter by currency ID (required)
|
|
25
|
+
#
|
|
26
|
+
# @param customer_id [String] Filter by customer ID (required)
|
|
27
|
+
#
|
|
28
|
+
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see Stigg::Resources::V1::Credits#get_auto_recharge
|
|
7
|
+
class CreditGetAutoRechargeResponse < Stigg::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute data
|
|
9
|
+
# Automatic recharge configuration for a customer and currency
|
|
10
|
+
#
|
|
11
|
+
# @return [Stigg::Models::V1::CreditGetAutoRechargeResponse::Data]
|
|
12
|
+
required :data, -> { Stigg::Models::V1::CreditGetAutoRechargeResponse::Data }
|
|
13
|
+
|
|
14
|
+
# @!method initialize(data:)
|
|
15
|
+
# Response object
|
|
16
|
+
#
|
|
17
|
+
# @param data [Stigg::Models::V1::CreditGetAutoRechargeResponse::Data] Automatic recharge configuration for a customer and currency
|
|
18
|
+
|
|
19
|
+
# @see Stigg::Models::V1::CreditGetAutoRechargeResponse#data
|
|
20
|
+
class Data < Stigg::Internal::Type::BaseModel
|
|
21
|
+
# @!attribute id
|
|
22
|
+
# The unique configuration ID
|
|
23
|
+
#
|
|
24
|
+
# @return [String, nil]
|
|
25
|
+
required :id, String, nil?: true
|
|
26
|
+
|
|
27
|
+
# @!attribute created_at
|
|
28
|
+
# Timestamp of when the record was created
|
|
29
|
+
#
|
|
30
|
+
# @return [Time, nil]
|
|
31
|
+
required :created_at, Time, api_name: :createdAt, nil?: true
|
|
32
|
+
|
|
33
|
+
# @!attribute currency_id
|
|
34
|
+
# The currency ID for this configuration
|
|
35
|
+
#
|
|
36
|
+
# @return [String]
|
|
37
|
+
required :currency_id, String, api_name: :currencyId
|
|
38
|
+
|
|
39
|
+
# @!attribute customer_id
|
|
40
|
+
# The customer ID this configuration belongs to
|
|
41
|
+
#
|
|
42
|
+
# @return [String]
|
|
43
|
+
required :customer_id, String, api_name: :customerId
|
|
44
|
+
|
|
45
|
+
# @!attribute grant_expiration_period
|
|
46
|
+
# Expiration period for auto-recharge grants (1_MONTH or 1_YEAR)
|
|
47
|
+
#
|
|
48
|
+
# @return [Symbol, Stigg::Models::V1::CreditGetAutoRechargeResponse::Data::GrantExpirationPeriod]
|
|
49
|
+
required :grant_expiration_period,
|
|
50
|
+
enum: -> { Stigg::Models::V1::CreditGetAutoRechargeResponse::Data::GrantExpirationPeriod },
|
|
51
|
+
api_name: :grantExpirationPeriod
|
|
52
|
+
|
|
53
|
+
# @!attribute is_enabled
|
|
54
|
+
# Whether automatic recharge is enabled
|
|
55
|
+
#
|
|
56
|
+
# @return [Boolean]
|
|
57
|
+
required :is_enabled, Stigg::Internal::Type::Boolean, api_name: :isEnabled
|
|
58
|
+
|
|
59
|
+
# @!attribute max_spend_limit
|
|
60
|
+
# Maximum monthly spend limit for automatic recharges
|
|
61
|
+
#
|
|
62
|
+
# @return [Float, nil]
|
|
63
|
+
required :max_spend_limit, Float, api_name: :maxSpendLimit, nil?: true
|
|
64
|
+
|
|
65
|
+
# @!attribute target_balance
|
|
66
|
+
# The target credit balance to recharge to
|
|
67
|
+
#
|
|
68
|
+
# @return [Float]
|
|
69
|
+
required :target_balance, Float, api_name: :targetBalance
|
|
70
|
+
|
|
71
|
+
# @!attribute threshold_type
|
|
72
|
+
# The threshold type (CREDIT_AMOUNT or DOLLAR_AMOUNT)
|
|
73
|
+
#
|
|
74
|
+
# @return [Symbol, Stigg::Models::V1::CreditGetAutoRechargeResponse::Data::ThresholdType]
|
|
75
|
+
required :threshold_type,
|
|
76
|
+
enum: -> { Stigg::Models::V1::CreditGetAutoRechargeResponse::Data::ThresholdType },
|
|
77
|
+
api_name: :thresholdType
|
|
78
|
+
|
|
79
|
+
# @!attribute threshold_value
|
|
80
|
+
# The threshold value that triggers a recharge
|
|
81
|
+
#
|
|
82
|
+
# @return [Float]
|
|
83
|
+
required :threshold_value, Float, api_name: :thresholdValue
|
|
84
|
+
|
|
85
|
+
# @!attribute updated_at
|
|
86
|
+
# Timestamp of when the record was last updated
|
|
87
|
+
#
|
|
88
|
+
# @return [Time, nil]
|
|
89
|
+
required :updated_at, Time, api_name: :updatedAt, nil?: true
|
|
90
|
+
|
|
91
|
+
# @!method initialize(id:, created_at:, currency_id:, customer_id:, grant_expiration_period:, is_enabled:, max_spend_limit:, target_balance:, threshold_type:, threshold_value:, updated_at:)
|
|
92
|
+
# Automatic recharge configuration for a customer and currency
|
|
93
|
+
#
|
|
94
|
+
# @param id [String, nil] The unique configuration ID
|
|
95
|
+
#
|
|
96
|
+
# @param created_at [Time, nil] Timestamp of when the record was created
|
|
97
|
+
#
|
|
98
|
+
# @param currency_id [String] The currency ID for this configuration
|
|
99
|
+
#
|
|
100
|
+
# @param customer_id [String] The customer ID this configuration belongs to
|
|
101
|
+
#
|
|
102
|
+
# @param grant_expiration_period [Symbol, Stigg::Models::V1::CreditGetAutoRechargeResponse::Data::GrantExpirationPeriod] Expiration period for auto-recharge grants (1_MONTH or 1_YEAR)
|
|
103
|
+
#
|
|
104
|
+
# @param is_enabled [Boolean] Whether automatic recharge is enabled
|
|
105
|
+
#
|
|
106
|
+
# @param max_spend_limit [Float, nil] Maximum monthly spend limit for automatic recharges
|
|
107
|
+
#
|
|
108
|
+
# @param target_balance [Float] The target credit balance to recharge to
|
|
109
|
+
#
|
|
110
|
+
# @param threshold_type [Symbol, Stigg::Models::V1::CreditGetAutoRechargeResponse::Data::ThresholdType] The threshold type (CREDIT_AMOUNT or DOLLAR_AMOUNT)
|
|
111
|
+
#
|
|
112
|
+
# @param threshold_value [Float] The threshold value that triggers a recharge
|
|
113
|
+
#
|
|
114
|
+
# @param updated_at [Time, nil] Timestamp of when the record was last updated
|
|
115
|
+
|
|
116
|
+
# Expiration period for auto-recharge grants (1_MONTH or 1_YEAR)
|
|
117
|
+
#
|
|
118
|
+
# @see Stigg::Models::V1::CreditGetAutoRechargeResponse::Data#grant_expiration_period
|
|
119
|
+
module GrantExpirationPeriod
|
|
120
|
+
extend Stigg::Internal::Type::Enum
|
|
121
|
+
|
|
122
|
+
GRANT_EXPIRATION_PERIOD_1_MONTH = :"1_MONTH"
|
|
123
|
+
GRANT_EXPIRATION_PERIOD_1_YEAR = :"1_YEAR"
|
|
124
|
+
|
|
125
|
+
# @!method self.values
|
|
126
|
+
# @return [Array<Symbol>]
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# The threshold type (CREDIT_AMOUNT or DOLLAR_AMOUNT)
|
|
130
|
+
#
|
|
131
|
+
# @see Stigg::Models::V1::CreditGetAutoRechargeResponse::Data#threshold_type
|
|
132
|
+
module ThresholdType
|
|
133
|
+
extend Stigg::Internal::Type::Enum
|
|
134
|
+
|
|
135
|
+
CREDIT_AMOUNT = :CREDIT_AMOUNT
|
|
136
|
+
DOLLAR_AMOUNT = :DOLLAR_AMOUNT
|
|
137
|
+
|
|
138
|
+
# @!method self.values
|
|
139
|
+
# @return [Array<Symbol>]
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
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
|