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
|
@@ -3,48 +3,39 @@
|
|
|
3
3
|
module Stigg
|
|
4
4
|
module Models
|
|
5
5
|
module V1
|
|
6
|
-
class
|
|
6
|
+
class Subscription < Stigg::Internal::Type::BaseModel
|
|
7
7
|
OrHash =
|
|
8
8
|
T.type_alias do
|
|
9
|
-
T.any(
|
|
10
|
-
Stigg::Models::V1::SubscriptionMigrateResponse,
|
|
11
|
-
Stigg::Internal::AnyHash
|
|
12
|
-
)
|
|
9
|
+
T.any(Stigg::V1::Subscription, Stigg::Internal::AnyHash)
|
|
13
10
|
end
|
|
14
11
|
|
|
15
|
-
|
|
12
|
+
# Customer subscription to a plan
|
|
13
|
+
sig { returns(Stigg::V1::Subscription::Data) }
|
|
16
14
|
attr_reader :data
|
|
17
15
|
|
|
18
|
-
sig
|
|
19
|
-
params(
|
|
20
|
-
data: Stigg::Models::V1::SubscriptionMigrateResponse::Data::OrHash
|
|
21
|
-
).void
|
|
22
|
-
end
|
|
16
|
+
sig { params(data: Stigg::V1::Subscription::Data::OrHash).void }
|
|
23
17
|
attr_writer :data
|
|
24
18
|
|
|
19
|
+
# Response object
|
|
25
20
|
sig do
|
|
26
|
-
params(
|
|
27
|
-
|
|
28
|
-
)
|
|
21
|
+
params(data: Stigg::V1::Subscription::Data::OrHash).returns(
|
|
22
|
+
T.attached_class
|
|
23
|
+
)
|
|
29
24
|
end
|
|
30
|
-
def self.new(
|
|
25
|
+
def self.new(
|
|
26
|
+
# Customer subscription to a plan
|
|
27
|
+
data:
|
|
28
|
+
)
|
|
31
29
|
end
|
|
32
30
|
|
|
33
|
-
sig
|
|
34
|
-
override.returns(
|
|
35
|
-
{ data: Stigg::Models::V1::SubscriptionMigrateResponse::Data }
|
|
36
|
-
)
|
|
37
|
-
end
|
|
31
|
+
sig { override.returns({ data: Stigg::V1::Subscription::Data }) }
|
|
38
32
|
def to_hash
|
|
39
33
|
end
|
|
40
34
|
|
|
41
35
|
class Data < Stigg::Internal::Type::BaseModel
|
|
42
36
|
OrHash =
|
|
43
37
|
T.type_alias do
|
|
44
|
-
T.any(
|
|
45
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data,
|
|
46
|
-
Stigg::Internal::AnyHash
|
|
47
|
-
)
|
|
38
|
+
T.any(Stigg::V1::Subscription::Data, Stigg::Internal::AnyHash)
|
|
48
39
|
end
|
|
49
40
|
|
|
50
41
|
# Subscription ID
|
|
@@ -66,7 +57,7 @@ module Stigg
|
|
|
66
57
|
# Payment collection
|
|
67
58
|
sig do
|
|
68
59
|
returns(
|
|
69
|
-
Stigg::
|
|
60
|
+
Stigg::V1::Subscription::Data::PaymentCollection::TaggedSymbol
|
|
70
61
|
)
|
|
71
62
|
end
|
|
72
63
|
attr_accessor :payment_collection
|
|
@@ -77,9 +68,7 @@ module Stigg
|
|
|
77
68
|
|
|
78
69
|
# Pricing type
|
|
79
70
|
sig do
|
|
80
|
-
returns(
|
|
81
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::PricingType::TaggedSymbol
|
|
82
|
-
)
|
|
71
|
+
returns(Stigg::V1::Subscription::Data::PricingType::TaggedSymbol)
|
|
83
72
|
end
|
|
84
73
|
attr_accessor :pricing_type
|
|
85
74
|
|
|
@@ -88,11 +77,7 @@ module Stigg
|
|
|
88
77
|
attr_accessor :start_date
|
|
89
78
|
|
|
90
79
|
# Subscription status
|
|
91
|
-
sig
|
|
92
|
-
returns(
|
|
93
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::Status::TaggedSymbol
|
|
94
|
-
)
|
|
95
|
-
end
|
|
80
|
+
sig { returns(Stigg::V1::Subscription::Data::Status::TaggedSymbol) }
|
|
96
81
|
attr_accessor :status
|
|
97
82
|
|
|
98
83
|
# Subscription cancellation date
|
|
@@ -103,7 +88,7 @@ module Stigg
|
|
|
103
88
|
sig do
|
|
104
89
|
returns(
|
|
105
90
|
T.nilable(
|
|
106
|
-
Stigg::
|
|
91
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
107
92
|
)
|
|
108
93
|
)
|
|
109
94
|
end
|
|
@@ -140,12 +125,24 @@ module Stigg
|
|
|
140
125
|
sig do
|
|
141
126
|
returns(
|
|
142
127
|
T.nilable(
|
|
143
|
-
Stigg::
|
|
128
|
+
Stigg::V1::Subscription::Data::PaymentCollectionMethod::TaggedSymbol
|
|
144
129
|
)
|
|
145
130
|
)
|
|
146
131
|
end
|
|
147
132
|
attr_accessor :payment_collection_method
|
|
148
133
|
|
|
134
|
+
sig do
|
|
135
|
+
returns(T.nilable(T::Array[Stigg::V1::Subscription::Data::Price]))
|
|
136
|
+
end
|
|
137
|
+
attr_reader :prices
|
|
138
|
+
|
|
139
|
+
sig do
|
|
140
|
+
params(
|
|
141
|
+
prices: T::Array[Stigg::V1::Subscription::Data::Price::OrHash]
|
|
142
|
+
).void
|
|
143
|
+
end
|
|
144
|
+
attr_writer :prices
|
|
145
|
+
|
|
149
146
|
# Resource ID
|
|
150
147
|
sig { returns(T.nilable(String)) }
|
|
151
148
|
attr_accessor :resource_id
|
|
@@ -154,6 +151,7 @@ module Stigg
|
|
|
154
151
|
sig { returns(T.nilable(Time)) }
|
|
155
152
|
attr_accessor :trial_end_date
|
|
156
153
|
|
|
154
|
+
# Customer subscription to a plan
|
|
157
155
|
sig do
|
|
158
156
|
params(
|
|
159
157
|
id: String,
|
|
@@ -161,17 +159,16 @@ module Stigg
|
|
|
161
159
|
created_at: Time,
|
|
162
160
|
customer_id: String,
|
|
163
161
|
payment_collection:
|
|
164
|
-
Stigg::
|
|
162
|
+
Stigg::V1::Subscription::Data::PaymentCollection::OrSymbol,
|
|
165
163
|
plan_id: String,
|
|
166
164
|
pricing_type:
|
|
167
|
-
Stigg::
|
|
165
|
+
Stigg::V1::Subscription::Data::PricingType::OrSymbol,
|
|
168
166
|
start_date: Time,
|
|
169
|
-
status:
|
|
170
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::Status::OrSymbol,
|
|
167
|
+
status: Stigg::V1::Subscription::Data::Status::OrSymbol,
|
|
171
168
|
cancellation_date: T.nilable(Time),
|
|
172
169
|
cancel_reason:
|
|
173
170
|
T.nilable(
|
|
174
|
-
Stigg::
|
|
171
|
+
Stigg::V1::Subscription::Data::CancelReason::OrSymbol
|
|
175
172
|
),
|
|
176
173
|
current_billing_period_end: T.nilable(Time),
|
|
177
174
|
current_billing_period_start: T.nilable(Time),
|
|
@@ -181,8 +178,9 @@ module Stigg
|
|
|
181
178
|
paying_customer_id: T.nilable(String),
|
|
182
179
|
payment_collection_method:
|
|
183
180
|
T.nilable(
|
|
184
|
-
Stigg::
|
|
181
|
+
Stigg::V1::Subscription::Data::PaymentCollectionMethod::OrSymbol
|
|
185
182
|
),
|
|
183
|
+
prices: T::Array[Stigg::V1::Subscription::Data::Price::OrHash],
|
|
186
184
|
resource_id: T.nilable(String),
|
|
187
185
|
trial_end_date: T.nilable(Time)
|
|
188
186
|
).returns(T.attached_class)
|
|
@@ -224,6 +222,7 @@ module Stigg
|
|
|
224
222
|
paying_customer_id: nil,
|
|
225
223
|
# The method used to collect payments for a subscription
|
|
226
224
|
payment_collection_method: nil,
|
|
225
|
+
prices: nil,
|
|
227
226
|
# Resource ID
|
|
228
227
|
resource_id: nil,
|
|
229
228
|
# Subscription trial end date
|
|
@@ -239,17 +238,16 @@ module Stigg
|
|
|
239
238
|
created_at: Time,
|
|
240
239
|
customer_id: String,
|
|
241
240
|
payment_collection:
|
|
242
|
-
Stigg::
|
|
241
|
+
Stigg::V1::Subscription::Data::PaymentCollection::TaggedSymbol,
|
|
243
242
|
plan_id: String,
|
|
244
243
|
pricing_type:
|
|
245
|
-
Stigg::
|
|
244
|
+
Stigg::V1::Subscription::Data::PricingType::TaggedSymbol,
|
|
246
245
|
start_date: Time,
|
|
247
|
-
status:
|
|
248
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::Status::TaggedSymbol,
|
|
246
|
+
status: Stigg::V1::Subscription::Data::Status::TaggedSymbol,
|
|
249
247
|
cancellation_date: T.nilable(Time),
|
|
250
248
|
cancel_reason:
|
|
251
249
|
T.nilable(
|
|
252
|
-
Stigg::
|
|
250
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
253
251
|
),
|
|
254
252
|
current_billing_period_end: T.nilable(Time),
|
|
255
253
|
current_billing_period_start: T.nilable(Time),
|
|
@@ -259,8 +257,9 @@ module Stigg
|
|
|
259
257
|
paying_customer_id: T.nilable(String),
|
|
260
258
|
payment_collection_method:
|
|
261
259
|
T.nilable(
|
|
262
|
-
Stigg::
|
|
260
|
+
Stigg::V1::Subscription::Data::PaymentCollectionMethod::TaggedSymbol
|
|
263
261
|
),
|
|
262
|
+
prices: T::Array[Stigg::V1::Subscription::Data::Price],
|
|
264
263
|
resource_id: T.nilable(String),
|
|
265
264
|
trial_end_date: T.nilable(Time)
|
|
266
265
|
}
|
|
@@ -275,38 +274,35 @@ module Stigg
|
|
|
275
274
|
|
|
276
275
|
TaggedSymbol =
|
|
277
276
|
T.type_alias do
|
|
278
|
-
T.all(
|
|
279
|
-
Symbol,
|
|
280
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::PaymentCollection
|
|
281
|
-
)
|
|
277
|
+
T.all(Symbol, Stigg::V1::Subscription::Data::PaymentCollection)
|
|
282
278
|
end
|
|
283
279
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
284
280
|
|
|
285
281
|
NOT_REQUIRED =
|
|
286
282
|
T.let(
|
|
287
283
|
:NOT_REQUIRED,
|
|
288
|
-
Stigg::
|
|
284
|
+
Stigg::V1::Subscription::Data::PaymentCollection::TaggedSymbol
|
|
289
285
|
)
|
|
290
286
|
PROCESSING =
|
|
291
287
|
T.let(
|
|
292
288
|
:PROCESSING,
|
|
293
|
-
Stigg::
|
|
289
|
+
Stigg::V1::Subscription::Data::PaymentCollection::TaggedSymbol
|
|
294
290
|
)
|
|
295
291
|
FAILED =
|
|
296
292
|
T.let(
|
|
297
293
|
:FAILED,
|
|
298
|
-
Stigg::
|
|
294
|
+
Stigg::V1::Subscription::Data::PaymentCollection::TaggedSymbol
|
|
299
295
|
)
|
|
300
296
|
ACTION_REQUIRED =
|
|
301
297
|
T.let(
|
|
302
298
|
:ACTION_REQUIRED,
|
|
303
|
-
Stigg::
|
|
299
|
+
Stigg::V1::Subscription::Data::PaymentCollection::TaggedSymbol
|
|
304
300
|
)
|
|
305
301
|
|
|
306
302
|
sig do
|
|
307
303
|
override.returns(
|
|
308
304
|
T::Array[
|
|
309
|
-
Stigg::
|
|
305
|
+
Stigg::V1::Subscription::Data::PaymentCollection::TaggedSymbol
|
|
310
306
|
]
|
|
311
307
|
)
|
|
312
308
|
end
|
|
@@ -320,33 +316,30 @@ module Stigg
|
|
|
320
316
|
|
|
321
317
|
TaggedSymbol =
|
|
322
318
|
T.type_alias do
|
|
323
|
-
T.all(
|
|
324
|
-
Symbol,
|
|
325
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::PricingType
|
|
326
|
-
)
|
|
319
|
+
T.all(Symbol, Stigg::V1::Subscription::Data::PricingType)
|
|
327
320
|
end
|
|
328
321
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
329
322
|
|
|
330
323
|
FREE =
|
|
331
324
|
T.let(
|
|
332
325
|
:FREE,
|
|
333
|
-
Stigg::
|
|
326
|
+
Stigg::V1::Subscription::Data::PricingType::TaggedSymbol
|
|
334
327
|
)
|
|
335
328
|
PAID =
|
|
336
329
|
T.let(
|
|
337
330
|
:PAID,
|
|
338
|
-
Stigg::
|
|
331
|
+
Stigg::V1::Subscription::Data::PricingType::TaggedSymbol
|
|
339
332
|
)
|
|
340
333
|
CUSTOM =
|
|
341
334
|
T.let(
|
|
342
335
|
:CUSTOM,
|
|
343
|
-
Stigg::
|
|
336
|
+
Stigg::V1::Subscription::Data::PricingType::TaggedSymbol
|
|
344
337
|
)
|
|
345
338
|
|
|
346
339
|
sig do
|
|
347
340
|
override.returns(
|
|
348
341
|
T::Array[
|
|
349
|
-
Stigg::
|
|
342
|
+
Stigg::V1::Subscription::Data::PricingType::TaggedSymbol
|
|
350
343
|
]
|
|
351
344
|
)
|
|
352
345
|
end
|
|
@@ -360,49 +353,44 @@ module Stigg
|
|
|
360
353
|
|
|
361
354
|
TaggedSymbol =
|
|
362
355
|
T.type_alias do
|
|
363
|
-
T.all(
|
|
364
|
-
Symbol,
|
|
365
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::Status
|
|
366
|
-
)
|
|
356
|
+
T.all(Symbol, Stigg::V1::Subscription::Data::Status)
|
|
367
357
|
end
|
|
368
358
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
369
359
|
|
|
370
360
|
PAYMENT_PENDING =
|
|
371
361
|
T.let(
|
|
372
362
|
:PAYMENT_PENDING,
|
|
373
|
-
Stigg::
|
|
363
|
+
Stigg::V1::Subscription::Data::Status::TaggedSymbol
|
|
374
364
|
)
|
|
375
365
|
ACTIVE =
|
|
376
366
|
T.let(
|
|
377
367
|
:ACTIVE,
|
|
378
|
-
Stigg::
|
|
368
|
+
Stigg::V1::Subscription::Data::Status::TaggedSymbol
|
|
379
369
|
)
|
|
380
370
|
EXPIRED =
|
|
381
371
|
T.let(
|
|
382
372
|
:EXPIRED,
|
|
383
|
-
Stigg::
|
|
373
|
+
Stigg::V1::Subscription::Data::Status::TaggedSymbol
|
|
384
374
|
)
|
|
385
375
|
IN_TRIAL =
|
|
386
376
|
T.let(
|
|
387
377
|
:IN_TRIAL,
|
|
388
|
-
Stigg::
|
|
378
|
+
Stigg::V1::Subscription::Data::Status::TaggedSymbol
|
|
389
379
|
)
|
|
390
380
|
CANCELED =
|
|
391
381
|
T.let(
|
|
392
382
|
:CANCELED,
|
|
393
|
-
Stigg::
|
|
383
|
+
Stigg::V1::Subscription::Data::Status::TaggedSymbol
|
|
394
384
|
)
|
|
395
385
|
NOT_STARTED =
|
|
396
386
|
T.let(
|
|
397
387
|
:NOT_STARTED,
|
|
398
|
-
Stigg::
|
|
388
|
+
Stigg::V1::Subscription::Data::Status::TaggedSymbol
|
|
399
389
|
)
|
|
400
390
|
|
|
401
391
|
sig do
|
|
402
392
|
override.returns(
|
|
403
|
-
T::Array[
|
|
404
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::Status::TaggedSymbol
|
|
405
|
-
]
|
|
393
|
+
T::Array[Stigg::V1::Subscription::Data::Status::TaggedSymbol]
|
|
406
394
|
)
|
|
407
395
|
end
|
|
408
396
|
def self.values
|
|
@@ -415,73 +403,70 @@ module Stigg
|
|
|
415
403
|
|
|
416
404
|
TaggedSymbol =
|
|
417
405
|
T.type_alias do
|
|
418
|
-
T.all(
|
|
419
|
-
Symbol,
|
|
420
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::CancelReason
|
|
421
|
-
)
|
|
406
|
+
T.all(Symbol, Stigg::V1::Subscription::Data::CancelReason)
|
|
422
407
|
end
|
|
423
408
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
424
409
|
|
|
425
410
|
UPGRADE_OR_DOWNGRADE =
|
|
426
411
|
T.let(
|
|
427
412
|
:UPGRADE_OR_DOWNGRADE,
|
|
428
|
-
Stigg::
|
|
413
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
429
414
|
)
|
|
430
415
|
CANCELLED_BY_BILLING =
|
|
431
416
|
T.let(
|
|
432
417
|
:CANCELLED_BY_BILLING,
|
|
433
|
-
Stigg::
|
|
418
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
434
419
|
)
|
|
435
420
|
EXPIRED =
|
|
436
421
|
T.let(
|
|
437
422
|
:EXPIRED,
|
|
438
|
-
Stigg::
|
|
423
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
439
424
|
)
|
|
440
425
|
DETACH_BILLING =
|
|
441
426
|
T.let(
|
|
442
427
|
:DETACH_BILLING,
|
|
443
|
-
Stigg::
|
|
428
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
444
429
|
)
|
|
445
430
|
TRIAL_ENDED =
|
|
446
431
|
T.let(
|
|
447
432
|
:TRIAL_ENDED,
|
|
448
|
-
Stigg::
|
|
433
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
449
434
|
)
|
|
450
435
|
IMMEDIATE =
|
|
451
436
|
T.let(
|
|
452
437
|
:Immediate,
|
|
453
|
-
Stigg::
|
|
438
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
454
439
|
)
|
|
455
440
|
TRIAL_CONVERTED =
|
|
456
441
|
T.let(
|
|
457
442
|
:TRIAL_CONVERTED,
|
|
458
|
-
Stigg::
|
|
443
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
459
444
|
)
|
|
460
445
|
PENDING_PAYMENT_EXPIRED =
|
|
461
446
|
T.let(
|
|
462
447
|
:PENDING_PAYMENT_EXPIRED,
|
|
463
|
-
Stigg::
|
|
448
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
464
449
|
)
|
|
465
450
|
SCHEDULED_CANCELLATION =
|
|
466
451
|
T.let(
|
|
467
452
|
:ScheduledCancellation,
|
|
468
|
-
Stigg::
|
|
453
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
469
454
|
)
|
|
470
455
|
CUSTOMER_ARCHIVED =
|
|
471
456
|
T.let(
|
|
472
457
|
:CustomerArchived,
|
|
473
|
-
Stigg::
|
|
458
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
474
459
|
)
|
|
475
460
|
AUTO_CANCELLATION_RULE =
|
|
476
461
|
T.let(
|
|
477
462
|
:AutoCancellationRule,
|
|
478
|
-
Stigg::
|
|
463
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
479
464
|
)
|
|
480
465
|
|
|
481
466
|
sig do
|
|
482
467
|
override.returns(
|
|
483
468
|
T::Array[
|
|
484
|
-
Stigg::
|
|
469
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
485
470
|
]
|
|
486
471
|
)
|
|
487
472
|
end
|
|
@@ -497,7 +482,7 @@ module Stigg
|
|
|
497
482
|
T.type_alias do
|
|
498
483
|
T.all(
|
|
499
484
|
Symbol,
|
|
500
|
-
Stigg::
|
|
485
|
+
Stigg::V1::Subscription::Data::PaymentCollectionMethod
|
|
501
486
|
)
|
|
502
487
|
end
|
|
503
488
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -505,29 +490,76 @@ module Stigg
|
|
|
505
490
|
CHARGE =
|
|
506
491
|
T.let(
|
|
507
492
|
:CHARGE,
|
|
508
|
-
Stigg::
|
|
493
|
+
Stigg::V1::Subscription::Data::PaymentCollectionMethod::TaggedSymbol
|
|
509
494
|
)
|
|
510
495
|
INVOICE =
|
|
511
496
|
T.let(
|
|
512
497
|
:INVOICE,
|
|
513
|
-
Stigg::
|
|
498
|
+
Stigg::V1::Subscription::Data::PaymentCollectionMethod::TaggedSymbol
|
|
514
499
|
)
|
|
515
500
|
NONE =
|
|
516
501
|
T.let(
|
|
517
502
|
:NONE,
|
|
518
|
-
Stigg::
|
|
503
|
+
Stigg::V1::Subscription::Data::PaymentCollectionMethod::TaggedSymbol
|
|
519
504
|
)
|
|
520
505
|
|
|
521
506
|
sig do
|
|
522
507
|
override.returns(
|
|
523
508
|
T::Array[
|
|
524
|
-
Stigg::
|
|
509
|
+
Stigg::V1::Subscription::Data::PaymentCollectionMethod::TaggedSymbol
|
|
525
510
|
]
|
|
526
511
|
)
|
|
527
512
|
end
|
|
528
513
|
def self.values
|
|
529
514
|
end
|
|
530
515
|
end
|
|
516
|
+
|
|
517
|
+
class Price < Stigg::Internal::Type::BaseModel
|
|
518
|
+
OrHash =
|
|
519
|
+
T.type_alias do
|
|
520
|
+
T.any(
|
|
521
|
+
Stigg::V1::Subscription::Data::Price,
|
|
522
|
+
Stigg::Internal::AnyHash
|
|
523
|
+
)
|
|
524
|
+
end
|
|
525
|
+
|
|
526
|
+
# Price ID
|
|
527
|
+
sig { returns(String) }
|
|
528
|
+
attr_accessor :id
|
|
529
|
+
|
|
530
|
+
# Creation timestamp
|
|
531
|
+
sig { returns(String) }
|
|
532
|
+
attr_accessor :created_at
|
|
533
|
+
|
|
534
|
+
# Last update timestamp
|
|
535
|
+
sig { returns(String) }
|
|
536
|
+
attr_accessor :updated_at
|
|
537
|
+
|
|
538
|
+
sig do
|
|
539
|
+
params(
|
|
540
|
+
id: String,
|
|
541
|
+
created_at: String,
|
|
542
|
+
updated_at: String
|
|
543
|
+
).returns(T.attached_class)
|
|
544
|
+
end
|
|
545
|
+
def self.new(
|
|
546
|
+
# Price ID
|
|
547
|
+
id:,
|
|
548
|
+
# Creation timestamp
|
|
549
|
+
created_at:,
|
|
550
|
+
# Last update timestamp
|
|
551
|
+
updated_at:
|
|
552
|
+
)
|
|
553
|
+
end
|
|
554
|
+
|
|
555
|
+
sig do
|
|
556
|
+
override.returns(
|
|
557
|
+
{ id: String, created_at: String, updated_at: String }
|
|
558
|
+
)
|
|
559
|
+
end
|
|
560
|
+
def to_hash
|
|
561
|
+
end
|
|
562
|
+
end
|
|
531
563
|
end
|
|
532
564
|
end
|
|
533
565
|
end
|