stigg 0.1.0.pre.alpha.1 → 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 +22 -0
- data/README.md +29 -1
- data/lib/stigg/internal/my_cursor_id_page.rb +32 -4
- data/lib/stigg/internal/type/base_model.rb +2 -2
- data/lib/stigg/models/v1/{coupon_create_response.rb → coupon.rb} +31 -26
- data/lib/stigg/models/v1/coupon_create_params.rb +2 -0
- data/lib/stigg/models/v1/coupon_list_params.rb +14 -14
- data/lib/stigg/models/v1/coupon_list_response.rb +262 -278
- 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_list_params.rb +14 -14
- data/lib/stigg/models/v1/customer_list_response.rb +160 -174
- data/lib/stigg/models/v1/{customer_create_params.rb → customer_provision_params.rb} +18 -16
- data/lib/stigg/models/v1/customer_response.rb +9 -2
- data/lib/stigg/models/v1/customer_update_params.rb +2 -0
- data/lib/stigg/models/v1/customers/payment_method_attach_params.rb +3 -1
- data/lib/stigg/models/v1/customers/{promotional_create_params.rb → promotional_entitlement_grant_params.rb} +46 -44
- data/lib/stigg/models/v1/customers/{promotional_create_response.rb → promotional_entitlement_grant_response.rb} +105 -32
- data/lib/stigg/models/v1/customers/{promotional_revoke_params.rb → promotional_entitlement_revoke_params.rb} +2 -2
- data/lib/stigg/models/v1/customers/{promotional_revoke_response.rb → promotional_entitlement_revoke_response.rb} +107 -33
- 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} +67 -26
- data/lib/stigg/models/v1/subscription_cancel_params.rb +75 -0
- data/lib/stigg/models/v1/subscription_delegate_params.rb +7 -2
- 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_list_params.rb +20 -24
- data/lib/stigg/models/v1/subscription_list_response.rb +255 -236
- data/lib/stigg/models/v1/subscription_migrate_params.rb +3 -3
- data/lib/stigg/models/v1/subscription_preview_params.rb +139 -46
- data/lib/stigg/models/v1/subscription_preview_response.rb +164 -49
- data/lib/stigg/models/v1/subscription_provision_params.rb +1693 -0
- data/lib/stigg/models/v1/subscription_provision_response.rb +1038 -0
- data/lib/stigg/models/v1/subscription_transfer_params.rb +2 -6
- 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} +9 -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 +16 -14
- data/lib/stigg/resources/v1/customers/payment_method.rb +6 -5
- data/lib/stigg/resources/v1/customers/{promotional.rb → promotional_entitlements.rb} +17 -17
- data/lib/stigg/resources/v1/customers.rb +78 -56
- data/lib/stigg/resources/v1/events.rb +38 -0
- data/lib/stigg/resources/v1/subscriptions/future_update.rb +10 -8
- data/lib/stigg/resources/v1/subscriptions.rb +206 -79
- 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 -23
- data/rbi/stigg/internal/my_cursor_id_page.rbi +27 -0
- data/rbi/stigg/models/v1/coupon.rbi +891 -0
- data/rbi/stigg/models/v1/coupon_create_params.rbi +1 -0
- data/rbi/stigg/models/v1/coupon_list_params.rbi +21 -21
- data/rbi/stigg/models/v1/coupon_list_response.rbi +812 -869
- 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_list_params.rbi +21 -21
- data/rbi/stigg/models/v1/customer_list_response.rbi +307 -347
- data/rbi/stigg/models/v1/{customer_create_params.rbi → customer_provision_params.rbi} +36 -35
- data/rbi/stigg/models/v1/customer_response.rbi +8 -1
- data/rbi/stigg/models/v1/customer_update_params.rbi +1 -0
- data/rbi/stigg/models/v1/customers/payment_method_attach_params.rbi +3 -0
- data/rbi/stigg/models/v1/customers/{promotional_create_params.rbi → promotional_entitlement_grant_params.rbi} +78 -77
- data/rbi/stigg/models/v1/customers/promotional_entitlement_grant_response.rbi +690 -0
- data/rbi/stigg/models/v1/customers/{promotional_revoke_params.rbi → promotional_entitlement_revoke_params.rbi} +2 -2
- 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} +130 -98
- data/rbi/stigg/models/v1/subscription_cancel_params.rbi +182 -0
- data/rbi/stigg/models/v1/subscription_delegate_params.rbi +6 -2
- 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_list_params.rbi +26 -28
- data/rbi/stigg/models/v1/subscription_list_response.rbi +460 -435
- data/rbi/stigg/models/v1/subscription_migrate_params.rbi +3 -3
- data/rbi/stigg/models/v1/subscription_preview_params.rbi +112 -14
- data/rbi/stigg/models/v1/subscription_preview_response.rbi +139 -6
- data/rbi/stigg/models/v1/subscription_provision_params.rbi +5306 -0
- data/rbi/stigg/models/v1/subscription_provision_response.rbi +3175 -0
- data/rbi/stigg/models/v1/subscription_transfer_params.rbi +2 -4
- 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} +10 -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 +22 -14
- data/rbi/stigg/resources/v1/customers/payment_method.rbi +9 -3
- data/rbi/stigg/resources/v1/customers/{promotional.rbi → promotional_entitlements.rbi} +13 -9
- data/rbi/stigg/resources/v1/customers.rbi +84 -53
- data/rbi/stigg/resources/v1/events.rbi +28 -0
- data/rbi/stigg/resources/v1/subscriptions/future_update.rbi +14 -10
- data/rbi/stigg/resources/v1/subscriptions.rbi +242 -58
- data/rbi/stigg/resources/v1/usage.rbi +57 -0
- data/rbi/stigg/resources/v1.rbi +4 -26
- data/sig/stigg/internal/my_cursor_id_page.rbs +17 -0
- data/sig/stigg/models/v1/{coupon_create_response.rbs → coupon.rbs} +29 -32
- data/sig/stigg/models/v1/coupon_list_params.rbs +11 -11
- data/sig/stigg/models/v1/coupon_list_response.rbs +331 -351
- 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_list_params.rbs +11 -11
- data/sig/stigg/models/v1/customer_list_response.rbs +133 -153
- data/sig/stigg/models/v1/{customer_create_params.rbs → customer_provision_params.rbs} +22 -22
- data/sig/stigg/models/v1/customers/{promotional_create_params.rbs → promotional_entitlement_grant_params.rbs} +43 -43
- data/sig/stigg/models/v1/customers/promotional_entitlement_grant_response.rbs +281 -0
- data/sig/stigg/models/v1/customers/{promotional_revoke_params.rbs → promotional_entitlement_revoke_params.rbs} +2 -2
- 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} +61 -35
- 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_list_params.rbs +14 -14
- data/sig/stigg/models/v1/subscription_list_response.rbs +196 -189
- data/sig/stigg/models/v1/subscription_preview_params.rbs +2 -6
- data/sig/stigg/models/v1/subscription_provision_params.rbs +2223 -0
- data/sig/stigg/models/v1/subscription_provision_response.rbs +1305 -0
- 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 +5 -5
- data/sig/stigg/resources/v1/customers/{promotional.rbs → promotional_entitlements.rbs} +5 -5
- data/sig/stigg/resources/v1/customers.rbs +20 -17
- 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 +68 -20
- data/sig/stigg/resources/v1/usage.rbs +24 -0
- data/sig/stigg/resources/v1.rbs +2 -8
- metadata +77 -71
- data/lib/stigg/models/v1/coupon_retrieve_response.rb +0 -317
- data/lib/stigg/models/v1/customers/usage_retrieve_params.rb +0 -56
- data/lib/stigg/models/v1/customers/usage_retrieve_response.rb +0 -145
- data/lib/stigg/models/v1/subscription_create_params.rb +0 -214
- data/lib/stigg/models/v1/subscription_create_response.rb +0 -338
- data/lib/stigg/models/v1/subscription_delegate_response.rb +0 -274
- data/lib/stigg/models/v1/subscription_migrate_response.rb +0 -274
- data/lib/stigg/models/v1/subscription_transfer_response.rb +0 -274
- data/lib/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rb +0 -32
- data/lib/stigg/models/v1_create_event_params.rb +0 -87
- data/lib/stigg/models/v1_create_event_response.rb +0 -16
- data/lib/stigg/models/v1_create_usage_params.rb +0 -96
- data/lib/stigg/models/v1_create_usage_response.rb +0 -112
- data/lib/stigg/resources/v1/customers/usage.rb +0 -59
- data/rbi/stigg/models/v1/coupon_create_response.rbi +0 -986
- data/rbi/stigg/models/v1/coupon_retrieve_response.rbi +0 -986
- data/rbi/stigg/models/v1/customers/promotional_create_response.rbi +0 -495
- data/rbi/stigg/models/v1/customers/promotional_revoke_response.rbi +0 -497
- data/rbi/stigg/models/v1/customers/usage_retrieve_params.rbi +0 -84
- data/rbi/stigg/models/v1/customers/usage_retrieve_response.rbi +0 -353
- data/rbi/stigg/models/v1/subscription_create_params.rbi +0 -394
- data/rbi/stigg/models/v1/subscription_create_response.rbi +0 -668
- data/rbi/stigg/models/v1/subscription_delegate_response.rbi +0 -535
- data/rbi/stigg/models/v1/subscription_retrieve_response.rbi +0 -535
- data/rbi/stigg/models/v1/subscription_transfer_response.rbi +0 -535
- data/rbi/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbi +0 -79
- data/rbi/stigg/models/v1_create_event_params.rbi +0 -160
- data/rbi/stigg/models/v1_create_event_response.rbi +0 -23
- data/rbi/stigg/models/v1_create_usage_params.rbi +0 -177
- data/rbi/stigg/models/v1_create_usage_response.rbi +0 -150
- data/rbi/stigg/resources/v1/customers/usage.rbi +0 -45
- data/sig/stigg/models/v1/coupon_retrieve_response.rbs +0 -394
- data/sig/stigg/models/v1/customers/promotional_create_response.rbs +0 -209
- data/sig/stigg/models/v1/customers/promotional_revoke_response.rbs +0 -209
- data/sig/stigg/models/v1/customers/usage_retrieve_params.rbs +0 -54
- data/sig/stigg/models/v1/customers/usage_retrieve_response.rbs +0 -134
- data/sig/stigg/models/v1/subscription_create_params.rbs +0 -199
- data/sig/stigg/models/v1/subscription_create_response.rbs +0 -283
- data/sig/stigg/models/v1/subscription_delegate_response.rbs +0 -224
- data/sig/stigg/models/v1/subscription_migrate_response.rbs +0 -224
- data/sig/stigg/models/v1/subscription_transfer_response.rbs +0 -224
- 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 -90
- data/sig/stigg/models/v1_create_usage_response.rbs +0 -85
- data/sig/stigg/resources/v1/customers/usage.rbs +0 -21
|
@@ -4,17 +4,20 @@ module Stigg
|
|
|
4
4
|
module Models
|
|
5
5
|
module V1
|
|
6
6
|
module Customers
|
|
7
|
-
# @see Stigg::Resources::V1::Customers::
|
|
8
|
-
class
|
|
7
|
+
# @see Stigg::Resources::V1::Customers::PromotionalEntitlements#revoke
|
|
8
|
+
class PromotionalEntitlementRevokeResponse < Stigg::Internal::Type::BaseModel
|
|
9
9
|
# @!attribute data
|
|
10
|
+
# Granted feature entitlement
|
|
10
11
|
#
|
|
11
|
-
# @return [Stigg::Models::V1::Customers::
|
|
12
|
-
required :data, -> { Stigg::Models::V1::Customers::
|
|
12
|
+
# @return [Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data]
|
|
13
|
+
required :data, -> { Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data }
|
|
13
14
|
|
|
14
15
|
# @!method initialize(data:)
|
|
15
|
-
#
|
|
16
|
+
# Response object
|
|
17
|
+
#
|
|
18
|
+
# @param data [Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data] Granted feature entitlement
|
|
16
19
|
|
|
17
|
-
# @see Stigg::Models::V1::Customers::
|
|
20
|
+
# @see Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse#data
|
|
18
21
|
class Data < Stigg::Internal::Type::BaseModel
|
|
19
22
|
# @!attribute id
|
|
20
23
|
# Unique identifier for the entity
|
|
@@ -91,24 +94,25 @@ module Stigg
|
|
|
91
94
|
# @!attribute period
|
|
92
95
|
# The grant period of the promotional entitlement
|
|
93
96
|
#
|
|
94
|
-
# @return [Symbol, Stigg::Models::V1::Customers::
|
|
95
|
-
required :period,
|
|
97
|
+
# @return [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::Period]
|
|
98
|
+
required :period,
|
|
99
|
+
enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::Period }
|
|
96
100
|
|
|
97
101
|
# @!attribute reset_period
|
|
98
102
|
# The reset period of the entitlement
|
|
99
103
|
#
|
|
100
|
-
# @return [Symbol, Stigg::Models::V1::Customers::
|
|
104
|
+
# @return [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriod, nil]
|
|
101
105
|
required :reset_period,
|
|
102
|
-
enum: -> { Stigg::Models::V1::Customers::
|
|
106
|
+
enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriod },
|
|
103
107
|
api_name: :resetPeriod,
|
|
104
108
|
nil?: true
|
|
105
109
|
|
|
106
110
|
# @!attribute reset_period_configuration
|
|
107
111
|
# The reset period configuration of the entitlement
|
|
108
112
|
#
|
|
109
|
-
# @return [Stigg::Models::V1::Customers::
|
|
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]
|
|
110
114
|
required :reset_period_configuration,
|
|
111
|
-
union: -> { Stigg::Models::V1::Customers::
|
|
115
|
+
union: -> { Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration },
|
|
112
116
|
api_name: :resetPeriodConfiguration,
|
|
113
117
|
nil?: true
|
|
114
118
|
|
|
@@ -121,8 +125,9 @@ module Stigg
|
|
|
121
125
|
# @!attribute status
|
|
122
126
|
# The status of the entitlement
|
|
123
127
|
#
|
|
124
|
-
# @return [Symbol, Stigg::Models::V1::Customers::
|
|
125
|
-
required :status,
|
|
128
|
+
# @return [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::Status]
|
|
129
|
+
required :status,
|
|
130
|
+
enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::Status }
|
|
126
131
|
|
|
127
132
|
# @!attribute updated_at
|
|
128
133
|
# Timestamp of when the record was last updated
|
|
@@ -137,6 +142,8 @@ module Stigg
|
|
|
137
142
|
required :usage_limit, Float, api_name: :usageLimit, nil?: true
|
|
138
143
|
|
|
139
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
|
+
#
|
|
140
147
|
# @param id [String] Unique identifier for the entity
|
|
141
148
|
#
|
|
142
149
|
# @param created_at [Time] Timestamp of when the record was created
|
|
@@ -159,15 +166,15 @@ module Stigg
|
|
|
159
166
|
#
|
|
160
167
|
# @param is_visible [Boolean] Whether the entitlement is visible
|
|
161
168
|
#
|
|
162
|
-
# @param period [Symbol, Stigg::Models::V1::Customers::
|
|
169
|
+
# @param period [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::Period] The grant period of the promotional entitlement
|
|
163
170
|
#
|
|
164
|
-
# @param reset_period [Symbol, Stigg::Models::V1::Customers::
|
|
171
|
+
# @param reset_period [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriod, nil] The reset period of the entitlement
|
|
165
172
|
#
|
|
166
|
-
# @param reset_period_configuration [Stigg::Models::V1::Customers::
|
|
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
|
|
167
174
|
#
|
|
168
175
|
# @param start_date [Time] The start date of the entitlement
|
|
169
176
|
#
|
|
170
|
-
# @param status [Symbol, Stigg::Models::V1::Customers::
|
|
177
|
+
# @param status [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::Status] The status of the entitlement
|
|
171
178
|
#
|
|
172
179
|
# @param updated_at [Time] Timestamp of when the record was last updated
|
|
173
180
|
#
|
|
@@ -175,7 +182,7 @@ module Stigg
|
|
|
175
182
|
|
|
176
183
|
# The grant period of the promotional entitlement
|
|
177
184
|
#
|
|
178
|
-
# @see Stigg::Models::V1::Customers::
|
|
185
|
+
# @see Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data#period
|
|
179
186
|
module Period
|
|
180
187
|
extend Stigg::Internal::Type::Enum
|
|
181
188
|
|
|
@@ -192,7 +199,7 @@ module Stigg
|
|
|
192
199
|
|
|
193
200
|
# The reset period of the entitlement
|
|
194
201
|
#
|
|
195
|
-
# @see Stigg::Models::V1::Customers::
|
|
202
|
+
# @see Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data#reset_period
|
|
196
203
|
module ResetPeriod
|
|
197
204
|
extend Stigg::Internal::Type::Enum
|
|
198
205
|
|
|
@@ -208,35 +215,102 @@ module Stigg
|
|
|
208
215
|
|
|
209
216
|
# The reset period configuration of the entitlement
|
|
210
217
|
#
|
|
211
|
-
# @see Stigg::Models::V1::Customers::
|
|
218
|
+
# @see Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data#reset_period_configuration
|
|
212
219
|
module ResetPeriodConfiguration
|
|
213
220
|
extend Stigg::Internal::Type::Union
|
|
214
221
|
|
|
215
|
-
|
|
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 }
|
|
216
227
|
|
|
217
|
-
|
|
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)
|
|
218
244
|
|
|
219
|
-
|
|
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
|
|
220
257
|
|
|
221
|
-
class
|
|
258
|
+
class MonthlyResetPeriodConfig < Stigg::Internal::Type::BaseModel
|
|
222
259
|
# @!attribute according_to
|
|
223
|
-
#
|
|
260
|
+
# Reset anchor (SubscriptionStart or StartOfTheMonth)
|
|
224
261
|
#
|
|
225
|
-
# @return [Symbol, Stigg::Models::V1::Customers::
|
|
262
|
+
# @return [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::MonthlyResetPeriodConfig::AccordingTo]
|
|
226
263
|
required :according_to,
|
|
227
|
-
enum: -> { Stigg::Models::V1::Customers::
|
|
264
|
+
enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::MonthlyResetPeriodConfig::AccordingTo },
|
|
228
265
|
api_name: :accordingTo
|
|
229
266
|
|
|
230
267
|
# @!method initialize(according_to:)
|
|
231
|
-
#
|
|
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)
|
|
232
299
|
|
|
233
|
-
#
|
|
300
|
+
# Reset anchor (SubscriptionStart or specific day)
|
|
234
301
|
#
|
|
235
|
-
# @see Stigg::Models::V1::Customers::
|
|
302
|
+
# @see Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data::ResetPeriodConfiguration::WeeklyResetPeriodConfig#according_to
|
|
236
303
|
module AccordingTo
|
|
237
304
|
extend Stigg::Internal::Type::Enum
|
|
238
305
|
|
|
239
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
|
|
240
314
|
|
|
241
315
|
# @!method self.values
|
|
242
316
|
# @return [Array<Symbol>]
|
|
@@ -244,12 +318,12 @@ module Stigg
|
|
|
244
318
|
end
|
|
245
319
|
|
|
246
320
|
# @!method self.variants
|
|
247
|
-
# @return [Array(Stigg::Models::V1::Customers::
|
|
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)]
|
|
248
322
|
end
|
|
249
323
|
|
|
250
324
|
# The status of the entitlement
|
|
251
325
|
#
|
|
252
|
-
# @see Stigg::Models::V1::Customers::
|
|
326
|
+
# @see Stigg::Models::V1::Customers::PromotionalEntitlementRevokeResponse::Data#status
|
|
253
327
|
module Status
|
|
254
328
|
extend Stigg::Internal::Type::Enum
|
|
255
329
|
|
|
@@ -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,16 +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
|
+
# Customer subscription to a plan
|
|
9
10
|
#
|
|
10
|
-
# @return [Stigg::Models::V1::
|
|
11
|
-
required :data, -> { Stigg::
|
|
11
|
+
# @return [Stigg::Models::V1::Subscription::Data]
|
|
12
|
+
required :data, -> { Stigg::V1::Subscription::Data }
|
|
12
13
|
|
|
13
14
|
# @!method initialize(data:)
|
|
14
|
-
#
|
|
15
|
+
# Response object
|
|
16
|
+
#
|
|
17
|
+
# @param data [Stigg::Models::V1::Subscription::Data] Customer subscription to a plan
|
|
15
18
|
|
|
16
|
-
# @see Stigg::Models::V1::
|
|
19
|
+
# @see Stigg::Models::V1::Subscription#data
|
|
17
20
|
class Data < Stigg::Internal::Type::BaseModel
|
|
18
21
|
# @!attribute id
|
|
19
22
|
# Subscription ID
|
|
@@ -42,9 +45,9 @@ module Stigg
|
|
|
42
45
|
# @!attribute payment_collection
|
|
43
46
|
# Payment collection
|
|
44
47
|
#
|
|
45
|
-
# @return [Symbol, Stigg::Models::V1::
|
|
48
|
+
# @return [Symbol, Stigg::Models::V1::Subscription::Data::PaymentCollection]
|
|
46
49
|
required :payment_collection,
|
|
47
|
-
enum: -> { Stigg::
|
|
50
|
+
enum: -> { Stigg::V1::Subscription::Data::PaymentCollection },
|
|
48
51
|
api_name: :paymentCollection
|
|
49
52
|
|
|
50
53
|
# @!attribute plan_id
|
|
@@ -56,9 +59,11 @@ module Stigg
|
|
|
56
59
|
# @!attribute pricing_type
|
|
57
60
|
# Pricing type
|
|
58
61
|
#
|
|
59
|
-
# @return [Symbol, Stigg::Models::V1::
|
|
62
|
+
# @return [Symbol, Stigg::Models::V1::Subscription::Data::PricingType]
|
|
60
63
|
required :pricing_type,
|
|
61
|
-
enum: -> {
|
|
64
|
+
enum: -> {
|
|
65
|
+
Stigg::V1::Subscription::Data::PricingType
|
|
66
|
+
},
|
|
62
67
|
api_name: :pricingType
|
|
63
68
|
|
|
64
69
|
# @!attribute start_date
|
|
@@ -70,8 +75,8 @@ module Stigg
|
|
|
70
75
|
# @!attribute status
|
|
71
76
|
# Subscription status
|
|
72
77
|
#
|
|
73
|
-
# @return [Symbol, Stigg::Models::V1::
|
|
74
|
-
required :status, enum: -> { Stigg::
|
|
78
|
+
# @return [Symbol, Stigg::Models::V1::Subscription::Data::Status]
|
|
79
|
+
required :status, enum: -> { Stigg::V1::Subscription::Data::Status }
|
|
75
80
|
|
|
76
81
|
# @!attribute cancellation_date
|
|
77
82
|
# Subscription cancellation date
|
|
@@ -82,9 +87,9 @@ module Stigg
|
|
|
82
87
|
# @!attribute cancel_reason
|
|
83
88
|
# Subscription cancel reason
|
|
84
89
|
#
|
|
85
|
-
# @return [Symbol, Stigg::Models::V1::
|
|
90
|
+
# @return [Symbol, Stigg::Models::V1::Subscription::Data::CancelReason, nil]
|
|
86
91
|
optional :cancel_reason,
|
|
87
|
-
enum: -> { Stigg::
|
|
92
|
+
enum: -> { Stigg::V1::Subscription::Data::CancelReason },
|
|
88
93
|
api_name: :cancelReason,
|
|
89
94
|
nil?: true
|
|
90
95
|
|
|
@@ -127,12 +132,17 @@ module Stigg
|
|
|
127
132
|
# @!attribute payment_collection_method
|
|
128
133
|
# The method used to collect payments for a subscription
|
|
129
134
|
#
|
|
130
|
-
# @return [Symbol, Stigg::Models::V1::
|
|
135
|
+
# @return [Symbol, Stigg::Models::V1::Subscription::Data::PaymentCollectionMethod, nil]
|
|
131
136
|
optional :payment_collection_method,
|
|
132
|
-
enum: -> { Stigg::
|
|
137
|
+
enum: -> { Stigg::V1::Subscription::Data::PaymentCollectionMethod },
|
|
133
138
|
api_name: :paymentCollectionMethod,
|
|
134
139
|
nil?: true
|
|
135
140
|
|
|
141
|
+
# @!attribute prices
|
|
142
|
+
#
|
|
143
|
+
# @return [Array<Stigg::Models::V1::Subscription::Data::Price>, nil]
|
|
144
|
+
optional :prices, -> { Stigg::Internal::Type::ArrayOf[Stigg::V1::Subscription::Data::Price] }
|
|
145
|
+
|
|
136
146
|
# @!attribute resource_id
|
|
137
147
|
# Resource ID
|
|
138
148
|
#
|
|
@@ -145,7 +155,9 @@ module Stigg
|
|
|
145
155
|
# @return [Time, nil]
|
|
146
156
|
optional :trial_end_date, Time, api_name: :trialEndDate, nil?: true
|
|
147
157
|
|
|
148
|
-
# @!method initialize(id:, billing_id:, created_at:, customer_id:, payment_collection:, plan_id:, pricing_type:, start_date:, status:, cancellation_date: nil, cancel_reason: nil, current_billing_period_end: nil, current_billing_period_start: nil, effective_end_date: nil, end_date: nil, metadata: nil, paying_customer_id: nil, payment_collection_method: nil, resource_id: nil, trial_end_date: nil)
|
|
158
|
+
# @!method initialize(id:, billing_id:, created_at:, customer_id:, payment_collection:, plan_id:, pricing_type:, start_date:, status:, cancellation_date: nil, cancel_reason: nil, current_billing_period_end: nil, current_billing_period_start: nil, effective_end_date: nil, end_date: nil, metadata: nil, paying_customer_id: nil, payment_collection_method: nil, prices: nil, resource_id: nil, trial_end_date: nil)
|
|
159
|
+
# Customer subscription to a plan
|
|
160
|
+
#
|
|
149
161
|
# @param id [String] Subscription ID
|
|
150
162
|
#
|
|
151
163
|
# @param billing_id [String, nil] Billing ID
|
|
@@ -154,19 +166,19 @@ module Stigg
|
|
|
154
166
|
#
|
|
155
167
|
# @param customer_id [String] Customer ID
|
|
156
168
|
#
|
|
157
|
-
# @param payment_collection [Symbol, Stigg::Models::V1::
|
|
169
|
+
# @param payment_collection [Symbol, Stigg::Models::V1::Subscription::Data::PaymentCollection] Payment collection
|
|
158
170
|
#
|
|
159
171
|
# @param plan_id [String] Plan ID
|
|
160
172
|
#
|
|
161
|
-
# @param pricing_type [Symbol, Stigg::Models::V1::
|
|
173
|
+
# @param pricing_type [Symbol, Stigg::Models::V1::Subscription::Data::PricingType] Pricing type
|
|
162
174
|
#
|
|
163
175
|
# @param start_date [Time] Subscription start date
|
|
164
176
|
#
|
|
165
|
-
# @param status [Symbol, Stigg::Models::V1::
|
|
177
|
+
# @param status [Symbol, Stigg::Models::V1::Subscription::Data::Status] Subscription status
|
|
166
178
|
#
|
|
167
179
|
# @param cancellation_date [Time, nil] Subscription cancellation date
|
|
168
180
|
#
|
|
169
|
-
# @param cancel_reason [Symbol, Stigg::Models::V1::
|
|
181
|
+
# @param cancel_reason [Symbol, Stigg::Models::V1::Subscription::Data::CancelReason, nil] Subscription cancel reason
|
|
170
182
|
#
|
|
171
183
|
# @param current_billing_period_end [Time, nil] End of the current billing period
|
|
172
184
|
#
|
|
@@ -180,7 +192,9 @@ module Stigg
|
|
|
180
192
|
#
|
|
181
193
|
# @param paying_customer_id [String, nil] Paying customer ID for delegated billing
|
|
182
194
|
#
|
|
183
|
-
# @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
|
|
196
|
+
#
|
|
197
|
+
# @param prices [Array<Stigg::Models::V1::Subscription::Data::Price>]
|
|
184
198
|
#
|
|
185
199
|
# @param resource_id [String, nil] Resource ID
|
|
186
200
|
#
|
|
@@ -188,7 +202,7 @@ module Stigg
|
|
|
188
202
|
|
|
189
203
|
# Payment collection
|
|
190
204
|
#
|
|
191
|
-
# @see Stigg::Models::V1::
|
|
205
|
+
# @see Stigg::Models::V1::Subscription::Data#payment_collection
|
|
192
206
|
module PaymentCollection
|
|
193
207
|
extend Stigg::Internal::Type::Enum
|
|
194
208
|
|
|
@@ -203,7 +217,7 @@ module Stigg
|
|
|
203
217
|
|
|
204
218
|
# Pricing type
|
|
205
219
|
#
|
|
206
|
-
# @see Stigg::Models::V1::
|
|
220
|
+
# @see Stigg::Models::V1::Subscription::Data#pricing_type
|
|
207
221
|
module PricingType
|
|
208
222
|
extend Stigg::Internal::Type::Enum
|
|
209
223
|
|
|
@@ -217,7 +231,7 @@ module Stigg
|
|
|
217
231
|
|
|
218
232
|
# Subscription status
|
|
219
233
|
#
|
|
220
|
-
# @see Stigg::Models::V1::
|
|
234
|
+
# @see Stigg::Models::V1::Subscription::Data#status
|
|
221
235
|
module Status
|
|
222
236
|
extend Stigg::Internal::Type::Enum
|
|
223
237
|
|
|
@@ -234,7 +248,7 @@ module Stigg
|
|
|
234
248
|
|
|
235
249
|
# Subscription cancel reason
|
|
236
250
|
#
|
|
237
|
-
# @see Stigg::Models::V1::
|
|
251
|
+
# @see Stigg::Models::V1::Subscription::Data#cancel_reason
|
|
238
252
|
module CancelReason
|
|
239
253
|
extend Stigg::Internal::Type::Enum
|
|
240
254
|
|
|
@@ -256,7 +270,7 @@ module Stigg
|
|
|
256
270
|
|
|
257
271
|
# The method used to collect payments for a subscription
|
|
258
272
|
#
|
|
259
|
-
# @see Stigg::Models::V1::
|
|
273
|
+
# @see Stigg::Models::V1::Subscription::Data#payment_collection_method
|
|
260
274
|
module PaymentCollectionMethod
|
|
261
275
|
extend Stigg::Internal::Type::Enum
|
|
262
276
|
|
|
@@ -267,6 +281,33 @@ module Stigg
|
|
|
267
281
|
# @!method self.values
|
|
268
282
|
# @return [Array<Symbol>]
|
|
269
283
|
end
|
|
284
|
+
|
|
285
|
+
class Price < Stigg::Internal::Type::BaseModel
|
|
286
|
+
# @!attribute id
|
|
287
|
+
# Price ID
|
|
288
|
+
#
|
|
289
|
+
# @return [String]
|
|
290
|
+
required :id, String
|
|
291
|
+
|
|
292
|
+
# @!attribute created_at
|
|
293
|
+
# Creation timestamp
|
|
294
|
+
#
|
|
295
|
+
# @return [String]
|
|
296
|
+
required :created_at, String, api_name: :createdAt
|
|
297
|
+
|
|
298
|
+
# @!attribute updated_at
|
|
299
|
+
# Last update timestamp
|
|
300
|
+
#
|
|
301
|
+
# @return [String]
|
|
302
|
+
required :updated_at, String, api_name: :updatedAt
|
|
303
|
+
|
|
304
|
+
# @!method initialize(id:, created_at:, updated_at:)
|
|
305
|
+
# @param id [String] Price ID
|
|
306
|
+
#
|
|
307
|
+
# @param created_at [String] Creation timestamp
|
|
308
|
+
#
|
|
309
|
+
# @param updated_at [String] Last update timestamp
|
|
310
|
+
end
|
|
270
311
|
end
|
|
271
312
|
end
|
|
272
313
|
end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see Stigg::Resources::V1::Subscriptions#cancel
|
|
7
|
+
class SubscriptionCancelParams < Stigg::Internal::Type::BaseModel
|
|
8
|
+
extend Stigg::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Stigg::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute cancellation_action
|
|
12
|
+
# Action on cancellation (downgrade or revoke)
|
|
13
|
+
#
|
|
14
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionCancelParams::CancellationAction, nil]
|
|
15
|
+
optional :cancellation_action,
|
|
16
|
+
enum: -> { Stigg::V1::SubscriptionCancelParams::CancellationAction },
|
|
17
|
+
api_name: :cancellationAction
|
|
18
|
+
|
|
19
|
+
# @!attribute cancellation_time
|
|
20
|
+
# When to cancel (immediate, period end, or date)
|
|
21
|
+
#
|
|
22
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionCancelParams::CancellationTime, nil]
|
|
23
|
+
optional :cancellation_time,
|
|
24
|
+
enum: -> { Stigg::V1::SubscriptionCancelParams::CancellationTime },
|
|
25
|
+
api_name: :cancellationTime
|
|
26
|
+
|
|
27
|
+
# @!attribute end_date
|
|
28
|
+
# Subscription end date
|
|
29
|
+
#
|
|
30
|
+
# @return [Time, nil]
|
|
31
|
+
optional :end_date, Time, api_name: :endDate
|
|
32
|
+
|
|
33
|
+
# @!attribute prorate
|
|
34
|
+
# If set, enables or disables prorating of credits on subscription cancellation.
|
|
35
|
+
#
|
|
36
|
+
# @return [Boolean, nil]
|
|
37
|
+
optional :prorate, Stigg::Internal::Type::Boolean
|
|
38
|
+
|
|
39
|
+
# @!method initialize(cancellation_action: nil, cancellation_time: nil, end_date: nil, prorate: nil, request_options: {})
|
|
40
|
+
# @param cancellation_action [Symbol, Stigg::Models::V1::SubscriptionCancelParams::CancellationAction] Action on cancellation (downgrade or revoke)
|
|
41
|
+
#
|
|
42
|
+
# @param cancellation_time [Symbol, Stigg::Models::V1::SubscriptionCancelParams::CancellationTime] When to cancel (immediate, period end, or date)
|
|
43
|
+
#
|
|
44
|
+
# @param end_date [Time] Subscription end date
|
|
45
|
+
#
|
|
46
|
+
# @param prorate [Boolean] If set, enables or disables prorating of credits on subscription cancellation.
|
|
47
|
+
#
|
|
48
|
+
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
|
|
49
|
+
|
|
50
|
+
# Action on cancellation (downgrade or revoke)
|
|
51
|
+
module CancellationAction
|
|
52
|
+
extend Stigg::Internal::Type::Enum
|
|
53
|
+
|
|
54
|
+
DEFAULT = :DEFAULT
|
|
55
|
+
REVOKE_ENTITLEMENTS = :REVOKE_ENTITLEMENTS
|
|
56
|
+
|
|
57
|
+
# @!method self.values
|
|
58
|
+
# @return [Array<Symbol>]
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# When to cancel (immediate, period end, or date)
|
|
62
|
+
module CancellationTime
|
|
63
|
+
extend Stigg::Internal::Type::Enum
|
|
64
|
+
|
|
65
|
+
END_OF_BILLING_PERIOD = :END_OF_BILLING_PERIOD
|
|
66
|
+
IMMEDIATE = :IMMEDIATE
|
|
67
|
+
SPECIFIC_DATE = :SPECIFIC_DATE
|
|
68
|
+
|
|
69
|
+
# @!method self.values
|
|
70
|
+
# @return [Array<Symbol>]
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|