stigg 0.1.0.pre.alpha.2 → 0.1.0.pre.alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/stigg/internal/type/base_model.rb +2 -2
- data/lib/stigg/models/v1/{coupon_create_response.rb → coupon.rb} +24 -24
- data/lib/stigg/models/v1/customer_import_params.rb +75 -0
- data/lib/stigg/models/v1/customer_import_response.rb +35 -0
- data/lib/stigg/models/v1/{customer_create_params.rb → customer_provision_params.rb} +16 -16
- data/lib/stigg/models/v1/customer_response.rb +1 -1
- data/lib/stigg/models/v1/customers/promotional_entitlement_grant_params.rb +296 -0
- data/lib/stigg/models/v1/customers/promotional_entitlement_grant_response.rb +341 -0
- data/lib/stigg/models/v1/customers/promotional_entitlement_revoke_params.rb +24 -0
- data/lib/stigg/models/v1/customers/promotional_entitlement_revoke_response.rb +342 -0
- data/lib/stigg/models/v1/event_report_params.rb +91 -0
- data/lib/stigg/models/v1/event_report_response.rb +25 -0
- data/lib/stigg/models/v1/{subscription_retrieve_response.rb → subscription.rb} +30 -29
- data/lib/stigg/models/v1/subscription_cancel_params.rb +75 -0
- data/lib/stigg/models/v1/subscription_import_params.rb +92 -0
- data/lib/stigg/models/v1/subscription_import_response.rb +32 -0
- data/lib/stigg/models/v1/{subscription_create_params.rb → subscription_provision_params.rb} +118 -118
- data/lib/stigg/models/v1/{subscription_create_response.rb → subscription_provision_response.rb} +76 -75
- data/lib/stigg/models/v1/subscription_update_params.rb +1114 -0
- data/lib/stigg/models/v1/subscriptions/{future_update_cancel_pending_payment_response.rb → cancel_subscription.rb} +7 -5
- data/lib/stigg/models/v1/usage_history_params.rb +54 -0
- data/lib/stigg/models/v1/usage_history_response.rb +155 -0
- data/lib/stigg/models/v1/usage_report_params.rb +114 -0
- data/lib/stigg/models/v1/usage_report_response.rb +120 -0
- data/lib/stigg/models.rb +0 -4
- data/lib/stigg/resources/v1/coupons.rb +4 -4
- data/lib/stigg/resources/v1/customers/promotional_entitlements.rb +69 -0
- data/lib/stigg/resources/v1/customers.rb +59 -37
- data/lib/stigg/resources/v1/events.rb +38 -0
- data/lib/stigg/resources/v1/subscriptions/future_update.rb +4 -4
- data/lib/stigg/resources/v1/subscriptions.rb +166 -64
- data/lib/stigg/resources/v1/usage.rb +79 -0
- data/lib/stigg/resources/v1.rb +6 -42
- data/lib/stigg/version.rb +1 -1
- data/lib/stigg.rb +25 -16
- data/rbi/stigg/models/v1/{coupon_create_response.rbi → coupon.rbi} +156 -252
- data/rbi/stigg/models/v1/customer_import_params.rbi +130 -0
- data/rbi/stigg/models/v1/customer_import_response.rbi +76 -0
- data/rbi/stigg/models/v1/{customer_create_params.rbi → customer_provision_params.rbi} +35 -35
- data/rbi/stigg/models/v1/customers/promotional_entitlement_grant_params.rbi +640 -0
- data/rbi/stigg/models/v1/customers/promotional_entitlement_grant_response.rbi +690 -0
- data/rbi/stigg/models/v1/customers/promotional_entitlement_revoke_params.rbi +42 -0
- data/rbi/stigg/models/v1/customers/promotional_entitlement_revoke_response.rbi +696 -0
- data/rbi/stigg/models/v1/event_report_params.rbi +168 -0
- data/rbi/stigg/models/v1/event_report_response.rbi +35 -0
- data/rbi/stigg/models/v1/{subscription_migrate_response.rbi → subscription.rbi} +66 -117
- data/rbi/stigg/models/v1/subscription_cancel_params.rbi +182 -0
- data/rbi/stigg/models/v1/subscription_import_params.rbi +148 -0
- data/rbi/stigg/models/v1/subscription_import_response.rbi +69 -0
- data/rbi/stigg/models/v1/{subscription_create_params.rbi → subscription_provision_params.rbi} +794 -773
- data/rbi/stigg/models/v1/{subscription_create_response.rbi → subscription_provision_response.rbi} +481 -481
- data/rbi/stigg/models/v1/subscription_update_params.rbi +3578 -0
- data/rbi/stigg/models/v1/subscriptions/{future_update_cancel_schedule_response.rbi → cancel_subscription.rbi} +9 -16
- data/rbi/stigg/models/v1/usage_history_params.rbi +79 -0
- data/rbi/stigg/models/v1/usage_history_response.rbi +347 -0
- data/rbi/stigg/models/v1/usage_report_params.rbi +227 -0
- data/rbi/stigg/models/v1/usage_report_response.rbi +162 -0
- data/rbi/stigg/models.rbi +0 -4
- data/rbi/stigg/resources/v1/coupons.rbi +2 -2
- data/rbi/stigg/resources/v1/customers/promotional_entitlements.rbi +57 -0
- data/rbi/stigg/resources/v1/customers.rbi +53 -36
- data/rbi/stigg/resources/v1/events.rbi +28 -0
- data/rbi/stigg/resources/v1/subscriptions/future_update.rbi +2 -6
- data/rbi/stigg/resources/v1/subscriptions.rbi +179 -74
- data/rbi/stigg/resources/v1/usage.rbi +57 -0
- data/rbi/stigg/resources/v1.rbi +4 -26
- data/sig/stigg/models/v1/{coupon_create_response.rbs → coupon.rbs} +29 -32
- data/sig/stigg/models/v1/customer_import_params.rbs +74 -0
- data/sig/stigg/models/v1/customer_import_response.rbs +30 -0
- data/sig/stigg/models/v1/{customer_create_params.rbs → customer_provision_params.rbs} +22 -22
- data/sig/stigg/models/v1/customers/promotional_entitlement_grant_params.rbs +234 -0
- data/sig/stigg/models/v1/customers/promotional_entitlement_grant_response.rbs +281 -0
- data/sig/stigg/models/v1/customers/promotional_entitlement_revoke_params.rbs +27 -0
- data/sig/stigg/models/v1/customers/promotional_entitlement_revoke_response.rbs +281 -0
- data/sig/stigg/models/v1/event_report_params.rbs +82 -0
- data/sig/stigg/models/v1/event_report_response.rbs +15 -0
- data/sig/stigg/models/v1/{subscription_retrieve_response.rbs → subscription.rbs} +36 -41
- data/sig/stigg/models/v1/subscription_cancel_params.rbs +79 -0
- data/sig/stigg/models/v1/subscription_import_params.rbs +84 -0
- data/sig/stigg/models/v1/subscription_import_response.rbs +30 -0
- data/sig/stigg/models/v1/{subscription_create_params.rbs → subscription_provision_params.rbs} +200 -200
- data/sig/stigg/models/v1/{subscription_create_response.rbs → subscription_provision_response.rbs} +106 -106
- data/sig/stigg/models/v1/subscription_update_params.rbs +1544 -0
- data/sig/stigg/models/v1/subscriptions/cancel_subscription.rbs +34 -0
- data/sig/stigg/models/v1/usage_history_params.rbs +52 -0
- data/sig/stigg/models/v1/usage_history_response.rbs +129 -0
- data/sig/stigg/models/v1/usage_report_params.rbs +102 -0
- data/sig/stigg/models/v1/usage_report_response.rbs +87 -0
- data/sig/stigg/models.rbs +0 -4
- data/sig/stigg/resources/v1/coupons.rbs +2 -2
- data/sig/stigg/resources/v1/customers/promotional_entitlements.rbs +23 -0
- data/sig/stigg/resources/v1/customers.rbs +17 -12
- data/sig/stigg/resources/v1/events.rbs +14 -0
- data/sig/stigg/resources/v1/subscriptions/future_update.rbs +2 -2
- data/sig/stigg/resources/v1/subscriptions.rbs +65 -32
- data/sig/stigg/resources/v1/usage.rbs +24 -0
- data/sig/stigg/resources/v1.rbs +2 -8
- metadata +77 -50
- data/lib/stigg/models/v1/coupon_retrieve_response.rb +0 -322
- data/lib/stigg/models/v1/subscription_delegate_response.rb +0 -314
- data/lib/stigg/models/v1/subscription_migrate_response.rb +0 -314
- data/lib/stigg/models/v1/subscription_transfer_response.rb +0 -314
- data/lib/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rb +0 -34
- data/lib/stigg/models/v1_create_event_params.rb +0 -89
- data/lib/stigg/models/v1_create_event_response.rb +0 -23
- data/lib/stigg/models/v1_create_usage_params.rb +0 -112
- data/lib/stigg/models/v1_create_usage_response.rb +0 -118
- data/lib/stigg/resources/v1/customers/usage.rb +0 -18
- data/rbi/stigg/models/v1/coupon_retrieve_response.rbi +0 -987
- data/rbi/stigg/models/v1/subscription_delegate_response.rbi +0 -618
- data/rbi/stigg/models/v1/subscription_retrieve_response.rbi +0 -618
- data/rbi/stigg/models/v1/subscription_transfer_response.rbi +0 -618
- data/rbi/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbi +0 -80
- data/rbi/stigg/models/v1_create_event_params.rbi +0 -161
- data/rbi/stigg/models/v1_create_event_response.rbi +0 -30
- data/rbi/stigg/models/v1_create_usage_params.rbi +0 -217
- data/rbi/stigg/models/v1_create_usage_response.rbi +0 -157
- data/rbi/stigg/resources/v1/customers/usage.rbi +0 -16
- data/sig/stigg/models/v1/coupon_retrieve_response.rbs +0 -394
- data/sig/stigg/models/v1/subscription_delegate_response.rbs +0 -255
- data/sig/stigg/models/v1/subscription_migrate_response.rbs +0 -255
- data/sig/stigg/models/v1/subscription_transfer_response.rbs +0 -255
- data/sig/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbs +0 -34
- data/sig/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rbs +0 -34
- data/sig/stigg/models/v1_create_event_params.rbs +0 -80
- data/sig/stigg/models/v1_create_event_response.rbs +0 -13
- data/sig/stigg/models/v1_create_usage_params.rbs +0 -100
- data/sig/stigg/models/v1_create_usage_response.rbs +0 -85
- data/sig/stigg/resources/v1/customers/usage.rbs +0 -11
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
module Customers
|
|
7
|
+
# @see Stigg::Resources::V1::Customers::PromotionalEntitlements#revoke
|
|
8
|
+
class PromotionalEntitlementRevokeResponse < Stigg::Internal::Type::BaseModel
|
|
9
|
+
# @!attribute data
|
|
10
|
+
# Granted feature entitlement
|
|
11
|
+
#
|
|
12
|
+
# @return [Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data]
|
|
13
|
+
required :data, -> { Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data }
|
|
14
|
+
|
|
15
|
+
# @!method initialize(data:)
|
|
16
|
+
# Response object
|
|
17
|
+
#
|
|
18
|
+
# @param data [Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data] Granted feature entitlement
|
|
19
|
+
|
|
20
|
+
# @see Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse#data
|
|
21
|
+
class Data < Stigg::Internal::Type::BaseModel
|
|
22
|
+
# @!attribute id
|
|
23
|
+
# Unique identifier for the entity
|
|
24
|
+
#
|
|
25
|
+
# @return [String]
|
|
26
|
+
required :id, String
|
|
27
|
+
|
|
28
|
+
# @!attribute created_at
|
|
29
|
+
# Timestamp of when the record was created
|
|
30
|
+
#
|
|
31
|
+
# @return [Time]
|
|
32
|
+
required :created_at, Time, api_name: :createdAt
|
|
33
|
+
|
|
34
|
+
# @!attribute description
|
|
35
|
+
# The description of the entitlement
|
|
36
|
+
#
|
|
37
|
+
# @return [String, nil]
|
|
38
|
+
required :description, String, nil?: true
|
|
39
|
+
|
|
40
|
+
# @!attribute end_date
|
|
41
|
+
# The end date of the promotional entitlement
|
|
42
|
+
#
|
|
43
|
+
# @return [Time, nil]
|
|
44
|
+
required :end_date, Time, api_name: :endDate, nil?: true
|
|
45
|
+
|
|
46
|
+
# @!attribute enum_values
|
|
47
|
+
# The enum values of the entitlement
|
|
48
|
+
#
|
|
49
|
+
# @return [Array<String>, nil]
|
|
50
|
+
required :enum_values, Stigg::Internal::Type::ArrayOf[String], api_name: :enumValues, nil?: true
|
|
51
|
+
|
|
52
|
+
# @!attribute environment_id
|
|
53
|
+
# The unique identifier for the environment
|
|
54
|
+
#
|
|
55
|
+
# @return [String]
|
|
56
|
+
required :environment_id, String, api_name: :environmentId
|
|
57
|
+
|
|
58
|
+
# @!attribute feature_group_ids
|
|
59
|
+
# Feature group IDs associated with this entitlement
|
|
60
|
+
#
|
|
61
|
+
# @return [Array<String>, nil]
|
|
62
|
+
required :feature_group_ids,
|
|
63
|
+
Stigg::Internal::Type::ArrayOf[String],
|
|
64
|
+
api_name: :featureGroupIds,
|
|
65
|
+
nil?: true
|
|
66
|
+
|
|
67
|
+
# @!attribute feature_id
|
|
68
|
+
# The unique identifier of the entitlement feature
|
|
69
|
+
#
|
|
70
|
+
# @return [String]
|
|
71
|
+
required :feature_id, String, api_name: :featureId
|
|
72
|
+
|
|
73
|
+
# @!attribute has_soft_limit
|
|
74
|
+
# Whether the entitlement has a soft limit
|
|
75
|
+
#
|
|
76
|
+
# @return [Boolean, nil]
|
|
77
|
+
required :has_soft_limit, Stigg::Internal::Type::Boolean, api_name: :hasSoftLimit, nil?: true
|
|
78
|
+
|
|
79
|
+
# @!attribute has_unlimited_usage
|
|
80
|
+
# Whether the entitlement has an unlimited usage
|
|
81
|
+
#
|
|
82
|
+
# @return [Boolean, nil]
|
|
83
|
+
required :has_unlimited_usage,
|
|
84
|
+
Stigg::Internal::Type::Boolean,
|
|
85
|
+
api_name: :hasUnlimitedUsage,
|
|
86
|
+
nil?: true
|
|
87
|
+
|
|
88
|
+
# @!attribute is_visible
|
|
89
|
+
# Whether the entitlement is visible
|
|
90
|
+
#
|
|
91
|
+
# @return [Boolean]
|
|
92
|
+
required :is_visible, Stigg::Internal::Type::Boolean, api_name: :isVisible
|
|
93
|
+
|
|
94
|
+
# @!attribute period
|
|
95
|
+
# The grant period of the promotional entitlement
|
|
96
|
+
#
|
|
97
|
+
# @return [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::Period]
|
|
98
|
+
required :period,
|
|
99
|
+
enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::Period }
|
|
100
|
+
|
|
101
|
+
# @!attribute reset_period
|
|
102
|
+
# The reset period of the entitlement
|
|
103
|
+
#
|
|
104
|
+
# @return [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriod, nil]
|
|
105
|
+
required :reset_period,
|
|
106
|
+
enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriod },
|
|
107
|
+
api_name: :resetPeriod,
|
|
108
|
+
nil?: true
|
|
109
|
+
|
|
110
|
+
# @!attribute reset_period_configuration
|
|
111
|
+
# The reset period configuration of the entitlement
|
|
112
|
+
#
|
|
113
|
+
# @return [Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::YearlyResetPeriodConfig, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::MonthlyResetPeriodConfig, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::WeeklyResetPeriodConfig, nil]
|
|
114
|
+
required :reset_period_configuration,
|
|
115
|
+
union: -> { Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration },
|
|
116
|
+
api_name: :resetPeriodConfiguration,
|
|
117
|
+
nil?: true
|
|
118
|
+
|
|
119
|
+
# @!attribute start_date
|
|
120
|
+
# The start date of the entitlement
|
|
121
|
+
#
|
|
122
|
+
# @return [Time]
|
|
123
|
+
required :start_date, Time, api_name: :startDate
|
|
124
|
+
|
|
125
|
+
# @!attribute status
|
|
126
|
+
# The status of the entitlement
|
|
127
|
+
#
|
|
128
|
+
# @return [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::Status]
|
|
129
|
+
required :status,
|
|
130
|
+
enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::Status }
|
|
131
|
+
|
|
132
|
+
# @!attribute updated_at
|
|
133
|
+
# Timestamp of when the record was last updated
|
|
134
|
+
#
|
|
135
|
+
# @return [Time]
|
|
136
|
+
required :updated_at, Time, api_name: :updatedAt
|
|
137
|
+
|
|
138
|
+
# @!attribute usage_limit
|
|
139
|
+
# The usage limit of the entitlement
|
|
140
|
+
#
|
|
141
|
+
# @return [Float, nil]
|
|
142
|
+
required :usage_limit, Float, api_name: :usageLimit, nil?: true
|
|
143
|
+
|
|
144
|
+
# @!method initialize(id:, created_at:, description:, end_date:, enum_values:, environment_id:, feature_group_ids:, feature_id:, has_soft_limit:, has_unlimited_usage:, is_visible:, period:, reset_period:, reset_period_configuration:, start_date:, status:, updated_at:, usage_limit:)
|
|
145
|
+
# Granted feature entitlement
|
|
146
|
+
#
|
|
147
|
+
# @param id [String] Unique identifier for the entity
|
|
148
|
+
#
|
|
149
|
+
# @param created_at [Time] Timestamp of when the record was created
|
|
150
|
+
#
|
|
151
|
+
# @param description [String, nil] The description of the entitlement
|
|
152
|
+
#
|
|
153
|
+
# @param end_date [Time, nil] The end date of the promotional entitlement
|
|
154
|
+
#
|
|
155
|
+
# @param enum_values [Array<String>, nil] The enum values of the entitlement
|
|
156
|
+
#
|
|
157
|
+
# @param environment_id [String] The unique identifier for the environment
|
|
158
|
+
#
|
|
159
|
+
# @param feature_group_ids [Array<String>, nil] Feature group IDs associated with this entitlement
|
|
160
|
+
#
|
|
161
|
+
# @param feature_id [String] The unique identifier of the entitlement feature
|
|
162
|
+
#
|
|
163
|
+
# @param has_soft_limit [Boolean, nil] Whether the entitlement has a soft limit
|
|
164
|
+
#
|
|
165
|
+
# @param has_unlimited_usage [Boolean, nil] Whether the entitlement has an unlimited usage
|
|
166
|
+
#
|
|
167
|
+
# @param is_visible [Boolean] Whether the entitlement is visible
|
|
168
|
+
#
|
|
169
|
+
# @param period [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::Period] The grant period of the promotional entitlement
|
|
170
|
+
#
|
|
171
|
+
# @param reset_period [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriod, nil] The reset period of the entitlement
|
|
172
|
+
#
|
|
173
|
+
# @param reset_period_configuration [Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::YearlyResetPeriodConfig, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::MonthlyResetPeriodConfig, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::WeeklyResetPeriodConfig, nil] The reset period configuration of the entitlement
|
|
174
|
+
#
|
|
175
|
+
# @param start_date [Time] The start date of the entitlement
|
|
176
|
+
#
|
|
177
|
+
# @param status [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::Status] The status of the entitlement
|
|
178
|
+
#
|
|
179
|
+
# @param updated_at [Time] Timestamp of when the record was last updated
|
|
180
|
+
#
|
|
181
|
+
# @param usage_limit [Float, nil] The usage limit of the entitlement
|
|
182
|
+
|
|
183
|
+
# The grant period of the promotional entitlement
|
|
184
|
+
#
|
|
185
|
+
# @see Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data#period
|
|
186
|
+
module Period
|
|
187
|
+
extend Stigg::Internal::Type::Enum
|
|
188
|
+
|
|
189
|
+
PERIOD_1_WEEK = :"1 week"
|
|
190
|
+
PERIOD_1_MONTH = :"1 month"
|
|
191
|
+
PERIOD_6_MONTH = :"6 month"
|
|
192
|
+
PERIOD_1_YEAR = :"1 year"
|
|
193
|
+
LIFETIME = :lifetime
|
|
194
|
+
CUSTOM = :custom
|
|
195
|
+
|
|
196
|
+
# @!method self.values
|
|
197
|
+
# @return [Array<Symbol>]
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# The reset period of the entitlement
|
|
201
|
+
#
|
|
202
|
+
# @see Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data#reset_period
|
|
203
|
+
module ResetPeriod
|
|
204
|
+
extend Stigg::Internal::Type::Enum
|
|
205
|
+
|
|
206
|
+
YEAR = :YEAR
|
|
207
|
+
MONTH = :MONTH
|
|
208
|
+
WEEK = :WEEK
|
|
209
|
+
DAY = :DAY
|
|
210
|
+
HOUR = :HOUR
|
|
211
|
+
|
|
212
|
+
# @!method self.values
|
|
213
|
+
# @return [Array<Symbol>]
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# The reset period configuration of the entitlement
|
|
217
|
+
#
|
|
218
|
+
# @see Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data#reset_period_configuration
|
|
219
|
+
module ResetPeriodConfiguration
|
|
220
|
+
extend Stigg::Internal::Type::Union
|
|
221
|
+
|
|
222
|
+
# Yearly reset configuration
|
|
223
|
+
variant -> { Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::YearlyResetPeriodConfig }
|
|
224
|
+
|
|
225
|
+
# Monthly reset configuration
|
|
226
|
+
variant -> { Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::MonthlyResetPeriodConfig }
|
|
227
|
+
|
|
228
|
+
# Weekly reset configuration
|
|
229
|
+
variant -> { Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::WeeklyResetPeriodConfig }
|
|
230
|
+
|
|
231
|
+
class YearlyResetPeriodConfig < Stigg::Internal::Type::BaseModel
|
|
232
|
+
# @!attribute according_to
|
|
233
|
+
# Reset anchor (SubscriptionStart)
|
|
234
|
+
#
|
|
235
|
+
# @return [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::YearlyResetPeriodConfig::AccordingTo]
|
|
236
|
+
required :according_to,
|
|
237
|
+
enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::YearlyResetPeriodConfig::AccordingTo },
|
|
238
|
+
api_name: :accordingTo
|
|
239
|
+
|
|
240
|
+
# @!method initialize(according_to:)
|
|
241
|
+
# Yearly reset configuration
|
|
242
|
+
#
|
|
243
|
+
# @param according_to [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::YearlyResetPeriodConfig::AccordingTo] Reset anchor (SubscriptionStart)
|
|
244
|
+
|
|
245
|
+
# Reset anchor (SubscriptionStart)
|
|
246
|
+
#
|
|
247
|
+
# @see Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::YearlyResetPeriodConfig#according_to
|
|
248
|
+
module AccordingTo
|
|
249
|
+
extend Stigg::Internal::Type::Enum
|
|
250
|
+
|
|
251
|
+
SUBSCRIPTION_START = :SubscriptionStart
|
|
252
|
+
|
|
253
|
+
# @!method self.values
|
|
254
|
+
# @return [Array<Symbol>]
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
class MonthlyResetPeriodConfig < Stigg::Internal::Type::BaseModel
|
|
259
|
+
# @!attribute according_to
|
|
260
|
+
# Reset anchor (SubscriptionStart or StartOfTheMonth)
|
|
261
|
+
#
|
|
262
|
+
# @return [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::MonthlyResetPeriodConfig::AccordingTo]
|
|
263
|
+
required :according_to,
|
|
264
|
+
enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::MonthlyResetPeriodConfig::AccordingTo },
|
|
265
|
+
api_name: :accordingTo
|
|
266
|
+
|
|
267
|
+
# @!method initialize(according_to:)
|
|
268
|
+
# Monthly reset configuration
|
|
269
|
+
#
|
|
270
|
+
# @param according_to [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::MonthlyResetPeriodConfig::AccordingTo] Reset anchor (SubscriptionStart or StartOfTheMonth)
|
|
271
|
+
|
|
272
|
+
# Reset anchor (SubscriptionStart or StartOfTheMonth)
|
|
273
|
+
#
|
|
274
|
+
# @see Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::MonthlyResetPeriodConfig#according_to
|
|
275
|
+
module AccordingTo
|
|
276
|
+
extend Stigg::Internal::Type::Enum
|
|
277
|
+
|
|
278
|
+
SUBSCRIPTION_START = :SubscriptionStart
|
|
279
|
+
START_OF_THE_MONTH = :StartOfTheMonth
|
|
280
|
+
|
|
281
|
+
# @!method self.values
|
|
282
|
+
# @return [Array<Symbol>]
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
class WeeklyResetPeriodConfig < Stigg::Internal::Type::BaseModel
|
|
287
|
+
# @!attribute according_to
|
|
288
|
+
# Reset anchor (SubscriptionStart or specific day)
|
|
289
|
+
#
|
|
290
|
+
# @return [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::WeeklyResetPeriodConfig::AccordingTo]
|
|
291
|
+
required :according_to,
|
|
292
|
+
enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::WeeklyResetPeriodConfig::AccordingTo },
|
|
293
|
+
api_name: :accordingTo
|
|
294
|
+
|
|
295
|
+
# @!method initialize(according_to:)
|
|
296
|
+
# Weekly reset configuration
|
|
297
|
+
#
|
|
298
|
+
# @param according_to [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::WeeklyResetPeriodConfig::AccordingTo] Reset anchor (SubscriptionStart or specific day)
|
|
299
|
+
|
|
300
|
+
# Reset anchor (SubscriptionStart or specific day)
|
|
301
|
+
#
|
|
302
|
+
# @see Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::WeeklyResetPeriodConfig#according_to
|
|
303
|
+
module AccordingTo
|
|
304
|
+
extend Stigg::Internal::Type::Enum
|
|
305
|
+
|
|
306
|
+
SUBSCRIPTION_START = :SubscriptionStart
|
|
307
|
+
EVERY_SUNDAY = :EverySunday
|
|
308
|
+
EVERY_MONDAY = :EveryMonday
|
|
309
|
+
EVERY_TUESDAY = :EveryTuesday
|
|
310
|
+
EVERY_WEDNESDAY = :EveryWednesday
|
|
311
|
+
EVERY_THURSDAY = :EveryThursday
|
|
312
|
+
EVERY_FRIDAY = :EveryFriday
|
|
313
|
+
EVERY_SATURDAY = :EverySaturday
|
|
314
|
+
|
|
315
|
+
# @!method self.values
|
|
316
|
+
# @return [Array<Symbol>]
|
|
317
|
+
end
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
# @!method self.variants
|
|
321
|
+
# @return [Array(Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::YearlyResetPeriodConfig, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::MonthlyResetPeriodConfig, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::WeeklyResetPeriodConfig)]
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# The status of the entitlement
|
|
325
|
+
#
|
|
326
|
+
# @see Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data#status
|
|
327
|
+
module Status
|
|
328
|
+
extend Stigg::Internal::Type::Enum
|
|
329
|
+
|
|
330
|
+
ACTIVE = :Active
|
|
331
|
+
EXPIRED = :Expired
|
|
332
|
+
PAUSED = :Paused
|
|
333
|
+
|
|
334
|
+
# @!method self.values
|
|
335
|
+
# @return [Array<Symbol>]
|
|
336
|
+
end
|
|
337
|
+
end
|
|
338
|
+
end
|
|
339
|
+
end
|
|
340
|
+
end
|
|
341
|
+
end
|
|
342
|
+
end
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see Stigg::Resources::V1::Events#report
|
|
7
|
+
class EventReportParams < Stigg::Internal::Type::BaseModel
|
|
8
|
+
extend Stigg::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Stigg::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute events
|
|
12
|
+
# A list of usage events to report
|
|
13
|
+
#
|
|
14
|
+
# @return [Array<Stigg::Models::V1::EventReportParams::Event>]
|
|
15
|
+
required :events, -> { Stigg::Internal::Type::ArrayOf[Stigg::V1::EventReportParams::Event] }
|
|
16
|
+
|
|
17
|
+
# @!method initialize(events:, request_options: {})
|
|
18
|
+
# @param events [Array<Stigg::Models::V1::EventReportParams::Event>] A list of usage events to report
|
|
19
|
+
#
|
|
20
|
+
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
|
|
21
|
+
|
|
22
|
+
class Event < Stigg::Internal::Type::BaseModel
|
|
23
|
+
# @!attribute customer_id
|
|
24
|
+
# Customer id
|
|
25
|
+
#
|
|
26
|
+
# @return [String]
|
|
27
|
+
required :customer_id, String, api_name: :customerId
|
|
28
|
+
|
|
29
|
+
# @!attribute event_name
|
|
30
|
+
# The name of the usage event
|
|
31
|
+
#
|
|
32
|
+
# @return [String]
|
|
33
|
+
required :event_name, String, api_name: :eventName
|
|
34
|
+
|
|
35
|
+
# @!attribute idempotency_key
|
|
36
|
+
# Idempotency key
|
|
37
|
+
#
|
|
38
|
+
# @return [String]
|
|
39
|
+
required :idempotency_key, String, api_name: :idempotencyKey
|
|
40
|
+
|
|
41
|
+
# @!attribute dimensions
|
|
42
|
+
# Dimensions associated with the usage event
|
|
43
|
+
#
|
|
44
|
+
# @return [Hash{Symbol=>String, Float, Boolean}, nil]
|
|
45
|
+
optional :dimensions,
|
|
46
|
+
-> { Stigg::Internal::Type::HashOf[union: Stigg::V1::EventReportParams::Event::Dimension] }
|
|
47
|
+
|
|
48
|
+
# @!attribute resource_id
|
|
49
|
+
# Resource id
|
|
50
|
+
#
|
|
51
|
+
# @return [String, nil]
|
|
52
|
+
optional :resource_id, String, api_name: :resourceId, nil?: true
|
|
53
|
+
|
|
54
|
+
# @!attribute timestamp
|
|
55
|
+
# Timestamp
|
|
56
|
+
#
|
|
57
|
+
# @return [Time, nil]
|
|
58
|
+
optional :timestamp, Time
|
|
59
|
+
|
|
60
|
+
# @!method initialize(customer_id:, event_name:, idempotency_key:, dimensions: nil, resource_id: nil, timestamp: nil)
|
|
61
|
+
# Raw usage event
|
|
62
|
+
#
|
|
63
|
+
# @param customer_id [String] Customer id
|
|
64
|
+
#
|
|
65
|
+
# @param event_name [String] The name of the usage event
|
|
66
|
+
#
|
|
67
|
+
# @param idempotency_key [String] Idempotency key
|
|
68
|
+
#
|
|
69
|
+
# @param dimensions [Hash{Symbol=>String, Float, Boolean}] Dimensions associated with the usage event
|
|
70
|
+
#
|
|
71
|
+
# @param resource_id [String, nil] Resource id
|
|
72
|
+
#
|
|
73
|
+
# @param timestamp [Time] Timestamp
|
|
74
|
+
|
|
75
|
+
module Dimension
|
|
76
|
+
extend Stigg::Internal::Type::Union
|
|
77
|
+
|
|
78
|
+
variant String
|
|
79
|
+
|
|
80
|
+
variant Float
|
|
81
|
+
|
|
82
|
+
variant Stigg::Internal::Type::Boolean
|
|
83
|
+
|
|
84
|
+
# @!method self.variants
|
|
85
|
+
# @return [Array(String, Float, Boolean)]
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see Stigg::Resources::V1::Events#report
|
|
7
|
+
class EventReportResponse < Stigg::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute data
|
|
9
|
+
# Empty success response confirming that events were successfully ingested and
|
|
10
|
+
# queued for processing by Stigg's metering system.
|
|
11
|
+
#
|
|
12
|
+
# @return [Object]
|
|
13
|
+
required :data, Stigg::Internal::Type::Unknown
|
|
14
|
+
|
|
15
|
+
# @!method initialize(data:)
|
|
16
|
+
# Some parameter documentations has been truncated, see
|
|
17
|
+
# {Stigg::Models::V1::EventReportResponse} for more details.
|
|
18
|
+
#
|
|
19
|
+
# Response object
|
|
20
|
+
#
|
|
21
|
+
# @param data [Object] Empty success response confirming that events were successfully ingested and que
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -4,19 +4,19 @@ module Stigg
|
|
|
4
4
|
module Models
|
|
5
5
|
module V1
|
|
6
6
|
# @see Stigg::Resources::V1::Subscriptions#retrieve
|
|
7
|
-
class
|
|
7
|
+
class Subscription < Stigg::Internal::Type::BaseModel
|
|
8
8
|
# @!attribute data
|
|
9
9
|
# Customer subscription to a plan
|
|
10
10
|
#
|
|
11
|
-
# @return [Stigg::Models::V1::
|
|
12
|
-
required :data, -> { Stigg::
|
|
11
|
+
# @return [Stigg::Models::V1::Subscription::Data]
|
|
12
|
+
required :data, -> { Stigg::V1::Subscription::Data }
|
|
13
13
|
|
|
14
14
|
# @!method initialize(data:)
|
|
15
15
|
# Response object
|
|
16
16
|
#
|
|
17
|
-
# @param data [Stigg::Models::V1::
|
|
17
|
+
# @param data [Stigg::Models::V1::Subscription::Data] Customer subscription to a plan
|
|
18
18
|
|
|
19
|
-
# @see Stigg::Models::V1::
|
|
19
|
+
# @see Stigg::Models::V1::Subscription#data
|
|
20
20
|
class Data < Stigg::Internal::Type::BaseModel
|
|
21
21
|
# @!attribute id
|
|
22
22
|
# Subscription ID
|
|
@@ -45,9 +45,9 @@ module Stigg
|
|
|
45
45
|
# @!attribute payment_collection
|
|
46
46
|
# Payment collection
|
|
47
47
|
#
|
|
48
|
-
# @return [Symbol, Stigg::Models::V1::
|
|
48
|
+
# @return [Symbol, Stigg::Models::V1::Subscription::Data::PaymentCollection]
|
|
49
49
|
required :payment_collection,
|
|
50
|
-
enum: -> { Stigg::
|
|
50
|
+
enum: -> { Stigg::V1::Subscription::Data::PaymentCollection },
|
|
51
51
|
api_name: :paymentCollection
|
|
52
52
|
|
|
53
53
|
# @!attribute plan_id
|
|
@@ -59,9 +59,11 @@ module Stigg
|
|
|
59
59
|
# @!attribute pricing_type
|
|
60
60
|
# Pricing type
|
|
61
61
|
#
|
|
62
|
-
# @return [Symbol, Stigg::Models::V1::
|
|
62
|
+
# @return [Symbol, Stigg::Models::V1::Subscription::Data::PricingType]
|
|
63
63
|
required :pricing_type,
|
|
64
|
-
enum: -> {
|
|
64
|
+
enum: -> {
|
|
65
|
+
Stigg::V1::Subscription::Data::PricingType
|
|
66
|
+
},
|
|
65
67
|
api_name: :pricingType
|
|
66
68
|
|
|
67
69
|
# @!attribute start_date
|
|
@@ -73,8 +75,8 @@ module Stigg
|
|
|
73
75
|
# @!attribute status
|
|
74
76
|
# Subscription status
|
|
75
77
|
#
|
|
76
|
-
# @return [Symbol, Stigg::Models::V1::
|
|
77
|
-
required :status, enum: -> { Stigg::
|
|
78
|
+
# @return [Symbol, Stigg::Models::V1::Subscription::Data::Status]
|
|
79
|
+
required :status, enum: -> { Stigg::V1::Subscription::Data::Status }
|
|
78
80
|
|
|
79
81
|
# @!attribute cancellation_date
|
|
80
82
|
# Subscription cancellation date
|
|
@@ -85,9 +87,9 @@ module Stigg
|
|
|
85
87
|
# @!attribute cancel_reason
|
|
86
88
|
# Subscription cancel reason
|
|
87
89
|
#
|
|
88
|
-
# @return [Symbol, Stigg::Models::V1::
|
|
90
|
+
# @return [Symbol, Stigg::Models::V1::Subscription::Data::CancelReason, nil]
|
|
89
91
|
optional :cancel_reason,
|
|
90
|
-
enum: -> { Stigg::
|
|
92
|
+
enum: -> { Stigg::V1::Subscription::Data::CancelReason },
|
|
91
93
|
api_name: :cancelReason,
|
|
92
94
|
nil?: true
|
|
93
95
|
|
|
@@ -130,17 +132,16 @@ module Stigg
|
|
|
130
132
|
# @!attribute payment_collection_method
|
|
131
133
|
# The method used to collect payments for a subscription
|
|
132
134
|
#
|
|
133
|
-
# @return [Symbol, Stigg::Models::V1::
|
|
135
|
+
# @return [Symbol, Stigg::Models::V1::Subscription::Data::PaymentCollectionMethod, nil]
|
|
134
136
|
optional :payment_collection_method,
|
|
135
|
-
enum: -> { Stigg::
|
|
137
|
+
enum: -> { Stigg::V1::Subscription::Data::PaymentCollectionMethod },
|
|
136
138
|
api_name: :paymentCollectionMethod,
|
|
137
139
|
nil?: true
|
|
138
140
|
|
|
139
141
|
# @!attribute prices
|
|
140
142
|
#
|
|
141
|
-
# @return [Array<Stigg::Models::V1::
|
|
142
|
-
optional :prices,
|
|
143
|
-
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::SubscriptionRetrieveResponse::Data::Price] }
|
|
143
|
+
# @return [Array<Stigg::Models::V1::Subscription::Data::Price>, nil]
|
|
144
|
+
optional :prices, -> { Stigg::Internal::Type::ArrayOf[Stigg::V1::Subscription::Data::Price] }
|
|
144
145
|
|
|
145
146
|
# @!attribute resource_id
|
|
146
147
|
# Resource ID
|
|
@@ -165,19 +166,19 @@ module Stigg
|
|
|
165
166
|
#
|
|
166
167
|
# @param customer_id [String] Customer ID
|
|
167
168
|
#
|
|
168
|
-
# @param payment_collection [Symbol, Stigg::Models::V1::
|
|
169
|
+
# @param payment_collection [Symbol, Stigg::Models::V1::Subscription::Data::PaymentCollection] Payment collection
|
|
169
170
|
#
|
|
170
171
|
# @param plan_id [String] Plan ID
|
|
171
172
|
#
|
|
172
|
-
# @param pricing_type [Symbol, Stigg::Models::V1::
|
|
173
|
+
# @param pricing_type [Symbol, Stigg::Models::V1::Subscription::Data::PricingType] Pricing type
|
|
173
174
|
#
|
|
174
175
|
# @param start_date [Time] Subscription start date
|
|
175
176
|
#
|
|
176
|
-
# @param status [Symbol, Stigg::Models::V1::
|
|
177
|
+
# @param status [Symbol, Stigg::Models::V1::Subscription::Data::Status] Subscription status
|
|
177
178
|
#
|
|
178
179
|
# @param cancellation_date [Time, nil] Subscription cancellation date
|
|
179
180
|
#
|
|
180
|
-
# @param cancel_reason [Symbol, Stigg::Models::V1::
|
|
181
|
+
# @param cancel_reason [Symbol, Stigg::Models::V1::Subscription::Data::CancelReason, nil] Subscription cancel reason
|
|
181
182
|
#
|
|
182
183
|
# @param current_billing_period_end [Time, nil] End of the current billing period
|
|
183
184
|
#
|
|
@@ -191,9 +192,9 @@ module Stigg
|
|
|
191
192
|
#
|
|
192
193
|
# @param paying_customer_id [String, nil] Paying customer ID for delegated billing
|
|
193
194
|
#
|
|
194
|
-
# @param payment_collection_method [Symbol, Stigg::Models::V1::
|
|
195
|
+
# @param payment_collection_method [Symbol, Stigg::Models::V1::Subscription::Data::PaymentCollectionMethod, nil] The method used to collect payments for a subscription
|
|
195
196
|
#
|
|
196
|
-
# @param prices [Array<Stigg::Models::V1::
|
|
197
|
+
# @param prices [Array<Stigg::Models::V1::Subscription::Data::Price>]
|
|
197
198
|
#
|
|
198
199
|
# @param resource_id [String, nil] Resource ID
|
|
199
200
|
#
|
|
@@ -201,7 +202,7 @@ module Stigg
|
|
|
201
202
|
|
|
202
203
|
# Payment collection
|
|
203
204
|
#
|
|
204
|
-
# @see Stigg::Models::V1::
|
|
205
|
+
# @see Stigg::Models::V1::Subscription::Data#payment_collection
|
|
205
206
|
module PaymentCollection
|
|
206
207
|
extend Stigg::Internal::Type::Enum
|
|
207
208
|
|
|
@@ -216,7 +217,7 @@ module Stigg
|
|
|
216
217
|
|
|
217
218
|
# Pricing type
|
|
218
219
|
#
|
|
219
|
-
# @see Stigg::Models::V1::
|
|
220
|
+
# @see Stigg::Models::V1::Subscription::Data#pricing_type
|
|
220
221
|
module PricingType
|
|
221
222
|
extend Stigg::Internal::Type::Enum
|
|
222
223
|
|
|
@@ -230,7 +231,7 @@ module Stigg
|
|
|
230
231
|
|
|
231
232
|
# Subscription status
|
|
232
233
|
#
|
|
233
|
-
# @see Stigg::Models::V1::
|
|
234
|
+
# @see Stigg::Models::V1::Subscription::Data#status
|
|
234
235
|
module Status
|
|
235
236
|
extend Stigg::Internal::Type::Enum
|
|
236
237
|
|
|
@@ -247,7 +248,7 @@ module Stigg
|
|
|
247
248
|
|
|
248
249
|
# Subscription cancel reason
|
|
249
250
|
#
|
|
250
|
-
# @see Stigg::Models::V1::
|
|
251
|
+
# @see Stigg::Models::V1::Subscription::Data#cancel_reason
|
|
251
252
|
module CancelReason
|
|
252
253
|
extend Stigg::Internal::Type::Enum
|
|
253
254
|
|
|
@@ -269,7 +270,7 @@ module Stigg
|
|
|
269
270
|
|
|
270
271
|
# The method used to collect payments for a subscription
|
|
271
272
|
#
|
|
272
|
-
# @see Stigg::Models::V1::
|
|
273
|
+
# @see Stigg::Models::V1::Subscription::Data#payment_collection_method
|
|
273
274
|
module PaymentCollectionMethod
|
|
274
275
|
extend Stigg::Internal::Type::Enum
|
|
275
276
|
|