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,168 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
class EventReportParams < Stigg::Internal::Type::BaseModel
|
|
7
|
+
extend Stigg::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Stigg::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(Stigg::V1::EventReportParams, Stigg::Internal::AnyHash)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# A list of usage events to report
|
|
16
|
+
sig { returns(T::Array[Stigg::V1::EventReportParams::Event]) }
|
|
17
|
+
attr_accessor :events
|
|
18
|
+
|
|
19
|
+
sig do
|
|
20
|
+
params(
|
|
21
|
+
events: T::Array[Stigg::V1::EventReportParams::Event::OrHash],
|
|
22
|
+
request_options: Stigg::RequestOptions::OrHash
|
|
23
|
+
).returns(T.attached_class)
|
|
24
|
+
end
|
|
25
|
+
def self.new(
|
|
26
|
+
# A list of usage events to report
|
|
27
|
+
events:,
|
|
28
|
+
request_options: {}
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
sig do
|
|
33
|
+
override.returns(
|
|
34
|
+
{
|
|
35
|
+
events: T::Array[Stigg::V1::EventReportParams::Event],
|
|
36
|
+
request_options: Stigg::RequestOptions
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
end
|
|
40
|
+
def to_hash
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
class Event < Stigg::Internal::Type::BaseModel
|
|
44
|
+
OrHash =
|
|
45
|
+
T.type_alias do
|
|
46
|
+
T.any(
|
|
47
|
+
Stigg::V1::EventReportParams::Event,
|
|
48
|
+
Stigg::Internal::AnyHash
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Customer id
|
|
53
|
+
sig { returns(String) }
|
|
54
|
+
attr_accessor :customer_id
|
|
55
|
+
|
|
56
|
+
# The name of the usage event
|
|
57
|
+
sig { returns(String) }
|
|
58
|
+
attr_accessor :event_name
|
|
59
|
+
|
|
60
|
+
# Idempotency key
|
|
61
|
+
sig { returns(String) }
|
|
62
|
+
attr_accessor :idempotency_key
|
|
63
|
+
|
|
64
|
+
# Dimensions associated with the usage event
|
|
65
|
+
sig do
|
|
66
|
+
returns(
|
|
67
|
+
T.nilable(
|
|
68
|
+
T::Hash[
|
|
69
|
+
Symbol,
|
|
70
|
+
Stigg::V1::EventReportParams::Event::Dimension::Variants
|
|
71
|
+
]
|
|
72
|
+
)
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
attr_reader :dimensions
|
|
76
|
+
|
|
77
|
+
sig do
|
|
78
|
+
params(
|
|
79
|
+
dimensions:
|
|
80
|
+
T::Hash[
|
|
81
|
+
Symbol,
|
|
82
|
+
Stigg::V1::EventReportParams::Event::Dimension::Variants
|
|
83
|
+
]
|
|
84
|
+
).void
|
|
85
|
+
end
|
|
86
|
+
attr_writer :dimensions
|
|
87
|
+
|
|
88
|
+
# Resource id
|
|
89
|
+
sig { returns(T.nilable(String)) }
|
|
90
|
+
attr_accessor :resource_id
|
|
91
|
+
|
|
92
|
+
# Timestamp
|
|
93
|
+
sig { returns(T.nilable(Time)) }
|
|
94
|
+
attr_reader :timestamp
|
|
95
|
+
|
|
96
|
+
sig { params(timestamp: Time).void }
|
|
97
|
+
attr_writer :timestamp
|
|
98
|
+
|
|
99
|
+
# Raw usage event
|
|
100
|
+
sig do
|
|
101
|
+
params(
|
|
102
|
+
customer_id: String,
|
|
103
|
+
event_name: String,
|
|
104
|
+
idempotency_key: String,
|
|
105
|
+
dimensions:
|
|
106
|
+
T::Hash[
|
|
107
|
+
Symbol,
|
|
108
|
+
Stigg::V1::EventReportParams::Event::Dimension::Variants
|
|
109
|
+
],
|
|
110
|
+
resource_id: T.nilable(String),
|
|
111
|
+
timestamp: Time
|
|
112
|
+
).returns(T.attached_class)
|
|
113
|
+
end
|
|
114
|
+
def self.new(
|
|
115
|
+
# Customer id
|
|
116
|
+
customer_id:,
|
|
117
|
+
# The name of the usage event
|
|
118
|
+
event_name:,
|
|
119
|
+
# Idempotency key
|
|
120
|
+
idempotency_key:,
|
|
121
|
+
# Dimensions associated with the usage event
|
|
122
|
+
dimensions: nil,
|
|
123
|
+
# Resource id
|
|
124
|
+
resource_id: nil,
|
|
125
|
+
# Timestamp
|
|
126
|
+
timestamp: nil
|
|
127
|
+
)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
sig do
|
|
131
|
+
override.returns(
|
|
132
|
+
{
|
|
133
|
+
customer_id: String,
|
|
134
|
+
event_name: String,
|
|
135
|
+
idempotency_key: String,
|
|
136
|
+
dimensions:
|
|
137
|
+
T::Hash[
|
|
138
|
+
Symbol,
|
|
139
|
+
Stigg::V1::EventReportParams::Event::Dimension::Variants
|
|
140
|
+
],
|
|
141
|
+
resource_id: T.nilable(String),
|
|
142
|
+
timestamp: Time
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
end
|
|
146
|
+
def to_hash
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
module Dimension
|
|
150
|
+
extend Stigg::Internal::Type::Union
|
|
151
|
+
|
|
152
|
+
Variants = T.type_alias { T.any(String, Float, T::Boolean) }
|
|
153
|
+
|
|
154
|
+
sig do
|
|
155
|
+
override.returns(
|
|
156
|
+
T::Array[
|
|
157
|
+
Stigg::V1::EventReportParams::Event::Dimension::Variants
|
|
158
|
+
]
|
|
159
|
+
)
|
|
160
|
+
end
|
|
161
|
+
def self.variants
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
class EventReportResponse < Stigg::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Stigg::Models::V1::EventReportResponse,
|
|
11
|
+
Stigg::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Empty success response confirming that events were successfully ingested and
|
|
16
|
+
# queued for processing by Stigg's metering system.
|
|
17
|
+
sig { returns(T.anything) }
|
|
18
|
+
attr_accessor :data
|
|
19
|
+
|
|
20
|
+
# Response object
|
|
21
|
+
sig { params(data: T.anything).returns(T.attached_class) }
|
|
22
|
+
def self.new(
|
|
23
|
+
# Empty success response confirming that events were successfully ingested and
|
|
24
|
+
# queued for processing by Stigg's metering system.
|
|
25
|
+
data:
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig { override.returns({ data: T.anything }) }
|
|
30
|
+
def to_hash
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -3,31 +3,24 @@
|
|
|
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
|
|
16
|
-
sig { returns(Stigg::
|
|
13
|
+
sig { returns(Stigg::V1::Subscription::Data) }
|
|
17
14
|
attr_reader :data
|
|
18
15
|
|
|
19
|
-
sig
|
|
20
|
-
params(
|
|
21
|
-
data: Stigg::Models::V1::SubscriptionMigrateResponse::Data::OrHash
|
|
22
|
-
).void
|
|
23
|
-
end
|
|
16
|
+
sig { params(data: Stigg::V1::Subscription::Data::OrHash).void }
|
|
24
17
|
attr_writer :data
|
|
25
18
|
|
|
26
19
|
# Response object
|
|
27
20
|
sig do
|
|
28
|
-
params(
|
|
29
|
-
|
|
30
|
-
)
|
|
21
|
+
params(data: Stigg::V1::Subscription::Data::OrHash).returns(
|
|
22
|
+
T.attached_class
|
|
23
|
+
)
|
|
31
24
|
end
|
|
32
25
|
def self.new(
|
|
33
26
|
# Customer subscription to a plan
|
|
@@ -35,21 +28,14 @@ module Stigg
|
|
|
35
28
|
)
|
|
36
29
|
end
|
|
37
30
|
|
|
38
|
-
sig
|
|
39
|
-
override.returns(
|
|
40
|
-
{ data: Stigg::Models::V1::SubscriptionMigrateResponse::Data }
|
|
41
|
-
)
|
|
42
|
-
end
|
|
31
|
+
sig { override.returns({ data: Stigg::V1::Subscription::Data }) }
|
|
43
32
|
def to_hash
|
|
44
33
|
end
|
|
45
34
|
|
|
46
35
|
class Data < Stigg::Internal::Type::BaseModel
|
|
47
36
|
OrHash =
|
|
48
37
|
T.type_alias do
|
|
49
|
-
T.any(
|
|
50
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data,
|
|
51
|
-
Stigg::Internal::AnyHash
|
|
52
|
-
)
|
|
38
|
+
T.any(Stigg::V1::Subscription::Data, Stigg::Internal::AnyHash)
|
|
53
39
|
end
|
|
54
40
|
|
|
55
41
|
# Subscription ID
|
|
@@ -71,7 +57,7 @@ module Stigg
|
|
|
71
57
|
# Payment collection
|
|
72
58
|
sig do
|
|
73
59
|
returns(
|
|
74
|
-
Stigg::
|
|
60
|
+
Stigg::V1::Subscription::Data::PaymentCollection::TaggedSymbol
|
|
75
61
|
)
|
|
76
62
|
end
|
|
77
63
|
attr_accessor :payment_collection
|
|
@@ -82,9 +68,7 @@ module Stigg
|
|
|
82
68
|
|
|
83
69
|
# Pricing type
|
|
84
70
|
sig do
|
|
85
|
-
returns(
|
|
86
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::PricingType::TaggedSymbol
|
|
87
|
-
)
|
|
71
|
+
returns(Stigg::V1::Subscription::Data::PricingType::TaggedSymbol)
|
|
88
72
|
end
|
|
89
73
|
attr_accessor :pricing_type
|
|
90
74
|
|
|
@@ -93,11 +77,7 @@ module Stigg
|
|
|
93
77
|
attr_accessor :start_date
|
|
94
78
|
|
|
95
79
|
# Subscription status
|
|
96
|
-
sig
|
|
97
|
-
returns(
|
|
98
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::Status::TaggedSymbol
|
|
99
|
-
)
|
|
100
|
-
end
|
|
80
|
+
sig { returns(Stigg::V1::Subscription::Data::Status::TaggedSymbol) }
|
|
101
81
|
attr_accessor :status
|
|
102
82
|
|
|
103
83
|
# Subscription cancellation date
|
|
@@ -108,7 +88,7 @@ module Stigg
|
|
|
108
88
|
sig do
|
|
109
89
|
returns(
|
|
110
90
|
T.nilable(
|
|
111
|
-
Stigg::
|
|
91
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
112
92
|
)
|
|
113
93
|
)
|
|
114
94
|
end
|
|
@@ -145,29 +125,20 @@ module Stigg
|
|
|
145
125
|
sig do
|
|
146
126
|
returns(
|
|
147
127
|
T.nilable(
|
|
148
|
-
Stigg::
|
|
128
|
+
Stigg::V1::Subscription::Data::PaymentCollectionMethod::TaggedSymbol
|
|
149
129
|
)
|
|
150
130
|
)
|
|
151
131
|
end
|
|
152
132
|
attr_accessor :payment_collection_method
|
|
153
133
|
|
|
154
134
|
sig do
|
|
155
|
-
returns(
|
|
156
|
-
T.nilable(
|
|
157
|
-
T::Array[
|
|
158
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::Price
|
|
159
|
-
]
|
|
160
|
-
)
|
|
161
|
-
)
|
|
135
|
+
returns(T.nilable(T::Array[Stigg::V1::Subscription::Data::Price]))
|
|
162
136
|
end
|
|
163
137
|
attr_reader :prices
|
|
164
138
|
|
|
165
139
|
sig do
|
|
166
140
|
params(
|
|
167
|
-
prices:
|
|
168
|
-
T::Array[
|
|
169
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::Price::OrHash
|
|
170
|
-
]
|
|
141
|
+
prices: T::Array[Stigg::V1::Subscription::Data::Price::OrHash]
|
|
171
142
|
).void
|
|
172
143
|
end
|
|
173
144
|
attr_writer :prices
|
|
@@ -188,17 +159,16 @@ module Stigg
|
|
|
188
159
|
created_at: Time,
|
|
189
160
|
customer_id: String,
|
|
190
161
|
payment_collection:
|
|
191
|
-
Stigg::
|
|
162
|
+
Stigg::V1::Subscription::Data::PaymentCollection::OrSymbol,
|
|
192
163
|
plan_id: String,
|
|
193
164
|
pricing_type:
|
|
194
|
-
Stigg::
|
|
165
|
+
Stigg::V1::Subscription::Data::PricingType::OrSymbol,
|
|
195
166
|
start_date: Time,
|
|
196
|
-
status:
|
|
197
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::Status::OrSymbol,
|
|
167
|
+
status: Stigg::V1::Subscription::Data::Status::OrSymbol,
|
|
198
168
|
cancellation_date: T.nilable(Time),
|
|
199
169
|
cancel_reason:
|
|
200
170
|
T.nilable(
|
|
201
|
-
Stigg::
|
|
171
|
+
Stigg::V1::Subscription::Data::CancelReason::OrSymbol
|
|
202
172
|
),
|
|
203
173
|
current_billing_period_end: T.nilable(Time),
|
|
204
174
|
current_billing_period_start: T.nilable(Time),
|
|
@@ -208,12 +178,9 @@ module Stigg
|
|
|
208
178
|
paying_customer_id: T.nilable(String),
|
|
209
179
|
payment_collection_method:
|
|
210
180
|
T.nilable(
|
|
211
|
-
Stigg::
|
|
181
|
+
Stigg::V1::Subscription::Data::PaymentCollectionMethod::OrSymbol
|
|
212
182
|
),
|
|
213
|
-
prices:
|
|
214
|
-
T::Array[
|
|
215
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::Price::OrHash
|
|
216
|
-
],
|
|
183
|
+
prices: T::Array[Stigg::V1::Subscription::Data::Price::OrHash],
|
|
217
184
|
resource_id: T.nilable(String),
|
|
218
185
|
trial_end_date: T.nilable(Time)
|
|
219
186
|
).returns(T.attached_class)
|
|
@@ -271,17 +238,16 @@ module Stigg
|
|
|
271
238
|
created_at: Time,
|
|
272
239
|
customer_id: String,
|
|
273
240
|
payment_collection:
|
|
274
|
-
Stigg::
|
|
241
|
+
Stigg::V1::Subscription::Data::PaymentCollection::TaggedSymbol,
|
|
275
242
|
plan_id: String,
|
|
276
243
|
pricing_type:
|
|
277
|
-
Stigg::
|
|
244
|
+
Stigg::V1::Subscription::Data::PricingType::TaggedSymbol,
|
|
278
245
|
start_date: Time,
|
|
279
|
-
status:
|
|
280
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::Status::TaggedSymbol,
|
|
246
|
+
status: Stigg::V1::Subscription::Data::Status::TaggedSymbol,
|
|
281
247
|
cancellation_date: T.nilable(Time),
|
|
282
248
|
cancel_reason:
|
|
283
249
|
T.nilable(
|
|
284
|
-
Stigg::
|
|
250
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
285
251
|
),
|
|
286
252
|
current_billing_period_end: T.nilable(Time),
|
|
287
253
|
current_billing_period_start: T.nilable(Time),
|
|
@@ -291,12 +257,9 @@ module Stigg
|
|
|
291
257
|
paying_customer_id: T.nilable(String),
|
|
292
258
|
payment_collection_method:
|
|
293
259
|
T.nilable(
|
|
294
|
-
Stigg::
|
|
260
|
+
Stigg::V1::Subscription::Data::PaymentCollectionMethod::TaggedSymbol
|
|
295
261
|
),
|
|
296
|
-
prices:
|
|
297
|
-
T::Array[
|
|
298
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::Price
|
|
299
|
-
],
|
|
262
|
+
prices: T::Array[Stigg::V1::Subscription::Data::Price],
|
|
300
263
|
resource_id: T.nilable(String),
|
|
301
264
|
trial_end_date: T.nilable(Time)
|
|
302
265
|
}
|
|
@@ -311,38 +274,35 @@ module Stigg
|
|
|
311
274
|
|
|
312
275
|
TaggedSymbol =
|
|
313
276
|
T.type_alias do
|
|
314
|
-
T.all(
|
|
315
|
-
Symbol,
|
|
316
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::PaymentCollection
|
|
317
|
-
)
|
|
277
|
+
T.all(Symbol, Stigg::V1::Subscription::Data::PaymentCollection)
|
|
318
278
|
end
|
|
319
279
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
320
280
|
|
|
321
281
|
NOT_REQUIRED =
|
|
322
282
|
T.let(
|
|
323
283
|
:NOT_REQUIRED,
|
|
324
|
-
Stigg::
|
|
284
|
+
Stigg::V1::Subscription::Data::PaymentCollection::TaggedSymbol
|
|
325
285
|
)
|
|
326
286
|
PROCESSING =
|
|
327
287
|
T.let(
|
|
328
288
|
:PROCESSING,
|
|
329
|
-
Stigg::
|
|
289
|
+
Stigg::V1::Subscription::Data::PaymentCollection::TaggedSymbol
|
|
330
290
|
)
|
|
331
291
|
FAILED =
|
|
332
292
|
T.let(
|
|
333
293
|
:FAILED,
|
|
334
|
-
Stigg::
|
|
294
|
+
Stigg::V1::Subscription::Data::PaymentCollection::TaggedSymbol
|
|
335
295
|
)
|
|
336
296
|
ACTION_REQUIRED =
|
|
337
297
|
T.let(
|
|
338
298
|
:ACTION_REQUIRED,
|
|
339
|
-
Stigg::
|
|
299
|
+
Stigg::V1::Subscription::Data::PaymentCollection::TaggedSymbol
|
|
340
300
|
)
|
|
341
301
|
|
|
342
302
|
sig do
|
|
343
303
|
override.returns(
|
|
344
304
|
T::Array[
|
|
345
|
-
Stigg::
|
|
305
|
+
Stigg::V1::Subscription::Data::PaymentCollection::TaggedSymbol
|
|
346
306
|
]
|
|
347
307
|
)
|
|
348
308
|
end
|
|
@@ -356,33 +316,30 @@ module Stigg
|
|
|
356
316
|
|
|
357
317
|
TaggedSymbol =
|
|
358
318
|
T.type_alias do
|
|
359
|
-
T.all(
|
|
360
|
-
Symbol,
|
|
361
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::PricingType
|
|
362
|
-
)
|
|
319
|
+
T.all(Symbol, Stigg::V1::Subscription::Data::PricingType)
|
|
363
320
|
end
|
|
364
321
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
365
322
|
|
|
366
323
|
FREE =
|
|
367
324
|
T.let(
|
|
368
325
|
:FREE,
|
|
369
|
-
Stigg::
|
|
326
|
+
Stigg::V1::Subscription::Data::PricingType::TaggedSymbol
|
|
370
327
|
)
|
|
371
328
|
PAID =
|
|
372
329
|
T.let(
|
|
373
330
|
:PAID,
|
|
374
|
-
Stigg::
|
|
331
|
+
Stigg::V1::Subscription::Data::PricingType::TaggedSymbol
|
|
375
332
|
)
|
|
376
333
|
CUSTOM =
|
|
377
334
|
T.let(
|
|
378
335
|
:CUSTOM,
|
|
379
|
-
Stigg::
|
|
336
|
+
Stigg::V1::Subscription::Data::PricingType::TaggedSymbol
|
|
380
337
|
)
|
|
381
338
|
|
|
382
339
|
sig do
|
|
383
340
|
override.returns(
|
|
384
341
|
T::Array[
|
|
385
|
-
Stigg::
|
|
342
|
+
Stigg::V1::Subscription::Data::PricingType::TaggedSymbol
|
|
386
343
|
]
|
|
387
344
|
)
|
|
388
345
|
end
|
|
@@ -396,49 +353,44 @@ module Stigg
|
|
|
396
353
|
|
|
397
354
|
TaggedSymbol =
|
|
398
355
|
T.type_alias do
|
|
399
|
-
T.all(
|
|
400
|
-
Symbol,
|
|
401
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::Status
|
|
402
|
-
)
|
|
356
|
+
T.all(Symbol, Stigg::V1::Subscription::Data::Status)
|
|
403
357
|
end
|
|
404
358
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
405
359
|
|
|
406
360
|
PAYMENT_PENDING =
|
|
407
361
|
T.let(
|
|
408
362
|
:PAYMENT_PENDING,
|
|
409
|
-
Stigg::
|
|
363
|
+
Stigg::V1::Subscription::Data::Status::TaggedSymbol
|
|
410
364
|
)
|
|
411
365
|
ACTIVE =
|
|
412
366
|
T.let(
|
|
413
367
|
:ACTIVE,
|
|
414
|
-
Stigg::
|
|
368
|
+
Stigg::V1::Subscription::Data::Status::TaggedSymbol
|
|
415
369
|
)
|
|
416
370
|
EXPIRED =
|
|
417
371
|
T.let(
|
|
418
372
|
:EXPIRED,
|
|
419
|
-
Stigg::
|
|
373
|
+
Stigg::V1::Subscription::Data::Status::TaggedSymbol
|
|
420
374
|
)
|
|
421
375
|
IN_TRIAL =
|
|
422
376
|
T.let(
|
|
423
377
|
:IN_TRIAL,
|
|
424
|
-
Stigg::
|
|
378
|
+
Stigg::V1::Subscription::Data::Status::TaggedSymbol
|
|
425
379
|
)
|
|
426
380
|
CANCELED =
|
|
427
381
|
T.let(
|
|
428
382
|
:CANCELED,
|
|
429
|
-
Stigg::
|
|
383
|
+
Stigg::V1::Subscription::Data::Status::TaggedSymbol
|
|
430
384
|
)
|
|
431
385
|
NOT_STARTED =
|
|
432
386
|
T.let(
|
|
433
387
|
:NOT_STARTED,
|
|
434
|
-
Stigg::
|
|
388
|
+
Stigg::V1::Subscription::Data::Status::TaggedSymbol
|
|
435
389
|
)
|
|
436
390
|
|
|
437
391
|
sig do
|
|
438
392
|
override.returns(
|
|
439
|
-
T::Array[
|
|
440
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::Status::TaggedSymbol
|
|
441
|
-
]
|
|
393
|
+
T::Array[Stigg::V1::Subscription::Data::Status::TaggedSymbol]
|
|
442
394
|
)
|
|
443
395
|
end
|
|
444
396
|
def self.values
|
|
@@ -451,73 +403,70 @@ module Stigg
|
|
|
451
403
|
|
|
452
404
|
TaggedSymbol =
|
|
453
405
|
T.type_alias do
|
|
454
|
-
T.all(
|
|
455
|
-
Symbol,
|
|
456
|
-
Stigg::Models::V1::SubscriptionMigrateResponse::Data::CancelReason
|
|
457
|
-
)
|
|
406
|
+
T.all(Symbol, Stigg::V1::Subscription::Data::CancelReason)
|
|
458
407
|
end
|
|
459
408
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
460
409
|
|
|
461
410
|
UPGRADE_OR_DOWNGRADE =
|
|
462
411
|
T.let(
|
|
463
412
|
:UPGRADE_OR_DOWNGRADE,
|
|
464
|
-
Stigg::
|
|
413
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
465
414
|
)
|
|
466
415
|
CANCELLED_BY_BILLING =
|
|
467
416
|
T.let(
|
|
468
417
|
:CANCELLED_BY_BILLING,
|
|
469
|
-
Stigg::
|
|
418
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
470
419
|
)
|
|
471
420
|
EXPIRED =
|
|
472
421
|
T.let(
|
|
473
422
|
:EXPIRED,
|
|
474
|
-
Stigg::
|
|
423
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
475
424
|
)
|
|
476
425
|
DETACH_BILLING =
|
|
477
426
|
T.let(
|
|
478
427
|
:DETACH_BILLING,
|
|
479
|
-
Stigg::
|
|
428
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
480
429
|
)
|
|
481
430
|
TRIAL_ENDED =
|
|
482
431
|
T.let(
|
|
483
432
|
:TRIAL_ENDED,
|
|
484
|
-
Stigg::
|
|
433
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
485
434
|
)
|
|
486
435
|
IMMEDIATE =
|
|
487
436
|
T.let(
|
|
488
437
|
:Immediate,
|
|
489
|
-
Stigg::
|
|
438
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
490
439
|
)
|
|
491
440
|
TRIAL_CONVERTED =
|
|
492
441
|
T.let(
|
|
493
442
|
:TRIAL_CONVERTED,
|
|
494
|
-
Stigg::
|
|
443
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
495
444
|
)
|
|
496
445
|
PENDING_PAYMENT_EXPIRED =
|
|
497
446
|
T.let(
|
|
498
447
|
:PENDING_PAYMENT_EXPIRED,
|
|
499
|
-
Stigg::
|
|
448
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
500
449
|
)
|
|
501
450
|
SCHEDULED_CANCELLATION =
|
|
502
451
|
T.let(
|
|
503
452
|
:ScheduledCancellation,
|
|
504
|
-
Stigg::
|
|
453
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
505
454
|
)
|
|
506
455
|
CUSTOMER_ARCHIVED =
|
|
507
456
|
T.let(
|
|
508
457
|
:CustomerArchived,
|
|
509
|
-
Stigg::
|
|
458
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
510
459
|
)
|
|
511
460
|
AUTO_CANCELLATION_RULE =
|
|
512
461
|
T.let(
|
|
513
462
|
:AutoCancellationRule,
|
|
514
|
-
Stigg::
|
|
463
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
515
464
|
)
|
|
516
465
|
|
|
517
466
|
sig do
|
|
518
467
|
override.returns(
|
|
519
468
|
T::Array[
|
|
520
|
-
Stigg::
|
|
469
|
+
Stigg::V1::Subscription::Data::CancelReason::TaggedSymbol
|
|
521
470
|
]
|
|
522
471
|
)
|
|
523
472
|
end
|
|
@@ -533,7 +482,7 @@ module Stigg
|
|
|
533
482
|
T.type_alias do
|
|
534
483
|
T.all(
|
|
535
484
|
Symbol,
|
|
536
|
-
Stigg::
|
|
485
|
+
Stigg::V1::Subscription::Data::PaymentCollectionMethod
|
|
537
486
|
)
|
|
538
487
|
end
|
|
539
488
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -541,23 +490,23 @@ module Stigg
|
|
|
541
490
|
CHARGE =
|
|
542
491
|
T.let(
|
|
543
492
|
:CHARGE,
|
|
544
|
-
Stigg::
|
|
493
|
+
Stigg::V1::Subscription::Data::PaymentCollectionMethod::TaggedSymbol
|
|
545
494
|
)
|
|
546
495
|
INVOICE =
|
|
547
496
|
T.let(
|
|
548
497
|
:INVOICE,
|
|
549
|
-
Stigg::
|
|
498
|
+
Stigg::V1::Subscription::Data::PaymentCollectionMethod::TaggedSymbol
|
|
550
499
|
)
|
|
551
500
|
NONE =
|
|
552
501
|
T.let(
|
|
553
502
|
:NONE,
|
|
554
|
-
Stigg::
|
|
503
|
+
Stigg::V1::Subscription::Data::PaymentCollectionMethod::TaggedSymbol
|
|
555
504
|
)
|
|
556
505
|
|
|
557
506
|
sig do
|
|
558
507
|
override.returns(
|
|
559
508
|
T::Array[
|
|
560
|
-
Stigg::
|
|
509
|
+
Stigg::V1::Subscription::Data::PaymentCollectionMethod::TaggedSymbol
|
|
561
510
|
]
|
|
562
511
|
)
|
|
563
512
|
end
|
|
@@ -569,7 +518,7 @@ module Stigg
|
|
|
569
518
|
OrHash =
|
|
570
519
|
T.type_alias do
|
|
571
520
|
T.any(
|
|
572
|
-
Stigg::
|
|
521
|
+
Stigg::V1::Subscription::Data::Price,
|
|
573
522
|
Stigg::Internal::AnyHash
|
|
574
523
|
)
|
|
575
524
|
end
|