stigg 0.1.0.pre.alpha.1 → 0.1.0.pre.alpha.2
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 +14 -0
- data/README.md +29 -1
- data/lib/stigg/internal/my_cursor_id_page.rb +32 -4
- data/lib/stigg/models/v1/coupon_create_params.rb +2 -0
- data/lib/stigg/models/v1/coupon_create_response.rb +11 -6
- 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/coupon_retrieve_response.rb +11 -6
- data/lib/stigg/models/v1/customer_create_params.rb +2 -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_response.rb +8 -1
- 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/subscription_create_params.rb +1485 -6
- data/lib/stigg/models/v1/subscription_create_response.rb +703 -4
- data/lib/stigg/models/v1/subscription_delegate_params.rb +7 -2
- data/lib/stigg/models/v1/subscription_delegate_response.rb +42 -2
- 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_migrate_response.rb +42 -2
- 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_retrieve_response.rb +42 -2
- data/lib/stigg/models/v1/subscription_transfer_params.rb +2 -6
- data/lib/stigg/models/v1/subscription_transfer_response.rb +42 -2
- data/lib/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rb +2 -0
- data/lib/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rb +2 -0
- data/lib/stigg/models/v1_create_event_params.rb +2 -0
- data/lib/stigg/models/v1_create_event_response.rb +8 -1
- data/lib/stigg/models/v1_create_usage_params.rb +19 -3
- data/lib/stigg/models/v1_create_usage_response.rb +7 -1
- data/lib/stigg/resources/v1/coupons.rb +12 -10
- data/lib/stigg/resources/v1/customers/payment_method.rb +6 -5
- data/lib/stigg/resources/v1/customers/usage.rb +0 -41
- data/lib/stigg/resources/v1/customers.rb +20 -20
- data/lib/stigg/resources/v1/subscriptions/future_update.rb +6 -4
- data/lib/stigg/resources/v1/subscriptions.rb +74 -49
- data/lib/stigg/resources/v1.rb +2 -2
- data/lib/stigg/version.rb +1 -1
- data/lib/stigg.rb +0 -7
- data/rbi/stigg/internal/my_cursor_id_page.rbi +27 -0
- data/rbi/stigg/models/v1/coupon_create_params.rbi +1 -0
- data/rbi/stigg/models/v1/coupon_create_response.rbi +11 -10
- 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/coupon_retrieve_response.rbi +11 -10
- data/rbi/stigg/models/v1/customer_create_params.rbi +1 -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_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/subscription_create_params.rbi +4975 -84
- data/rbi/stigg/models/v1/subscription_create_response.rbi +2508 -1
- data/rbi/stigg/models/v1/subscription_delegate_params.rbi +6 -2
- data/rbi/stigg/models/v1/subscription_delegate_response.rbi +84 -1
- 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_migrate_response.rbi +84 -1
- 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_retrieve_response.rbi +84 -1
- data/rbi/stigg/models/v1/subscription_transfer_params.rbi +2 -4
- data/rbi/stigg/models/v1/subscription_transfer_response.rbi +84 -1
- data/rbi/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbi +1 -0
- data/rbi/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rbi +1 -0
- data/rbi/stigg/models/v1_create_event_params.rbi +1 -0
- data/rbi/stigg/models/v1_create_event_response.rbi +8 -1
- data/rbi/stigg/models/v1_create_usage_params.rbi +44 -4
- data/rbi/stigg/models/v1_create_usage_response.rbi +8 -1
- data/rbi/stigg/resources/v1/coupons.rbi +20 -12
- data/rbi/stigg/resources/v1/customers/payment_method.rbi +9 -3
- data/rbi/stigg/resources/v1/customers/usage.rbi +0 -29
- data/rbi/stigg/resources/v1/customers.rbi +34 -20
- data/rbi/stigg/resources/v1/subscriptions/future_update.rbi +12 -4
- data/rbi/stigg/resources/v1/subscriptions.rbi +102 -23
- data/rbi/stigg/resources/v1.rbi +2 -2
- data/sig/stigg/internal/my_cursor_id_page.rbs +17 -0
- data/sig/stigg/models/v1/coupon_create_response.rbs +4 -4
- 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/coupon_retrieve_response.rbs +4 -4
- 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/subscription_create_params.rbs +2029 -5
- data/sig/stigg/models/v1/subscription_create_response.rbs +1022 -0
- data/sig/stigg/models/v1/subscription_delegate_response.rbs +31 -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_migrate_response.rbs +31 -0
- data/sig/stigg/models/v1/subscription_preview_params.rbs +2 -6
- data/sig/stigg/models/v1/subscription_retrieve_response.rbs +31 -0
- data/sig/stigg/models/v1/subscription_transfer_response.rbs +31 -0
- data/sig/stigg/models/v1_create_usage_params.rbs +15 -5
- data/sig/stigg/resources/v1/coupons.rbs +3 -3
- data/sig/stigg/resources/v1/customers/usage.rbs +0 -10
- data/sig/stigg/resources/v1/customers.rbs +3 -5
- data/sig/stigg/resources/v1/subscriptions.rbs +19 -4
- metadata +2 -23
- data/lib/stigg/models/v1/customers/promotional_create_params.rb +0 -294
- data/lib/stigg/models/v1/customers/promotional_create_response.rb +0 -268
- data/lib/stigg/models/v1/customers/promotional_revoke_params.rb +0 -24
- data/lib/stigg/models/v1/customers/promotional_revoke_response.rb +0 -268
- 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/resources/v1/customers/promotional.rb +0 -69
- data/rbi/stigg/models/v1/customers/promotional_create_params.rbi +0 -639
- data/rbi/stigg/models/v1/customers/promotional_create_response.rbi +0 -495
- data/rbi/stigg/models/v1/customers/promotional_revoke_params.rbi +0 -42
- 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/resources/v1/customers/promotional.rbi +0 -53
- data/sig/stigg/models/v1/customers/promotional_create_params.rbs +0 -234
- data/sig/stigg/models/v1/customers/promotional_create_response.rbs +0 -209
- data/sig/stigg/models/v1/customers/promotional_revoke_params.rbs +0 -27
- 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/resources/v1/customers/promotional.rbs +0 -23
|
@@ -9,13 +9,18 @@ module Stigg
|
|
|
9
9
|
include Stigg::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
11
|
# @!attribute target_customer_id
|
|
12
|
-
# The customer
|
|
12
|
+
# The unique identifier of the customer who will assume payment responsibility for
|
|
13
|
+
# this subscription. This customer must already exist in your Stigg account and
|
|
14
|
+
# have a valid payment method if the subscription requires payment.
|
|
13
15
|
#
|
|
14
16
|
# @return [String]
|
|
15
17
|
required :target_customer_id, String, api_name: :targetCustomerId
|
|
16
18
|
|
|
17
19
|
# @!method initialize(target_customer_id:, request_options: {})
|
|
18
|
-
#
|
|
20
|
+
# Some parameter documentations has been truncated, see
|
|
21
|
+
# {Stigg::Models::V1::SubscriptionDelegateParams} for more details.
|
|
22
|
+
#
|
|
23
|
+
# @param target_customer_id [String] The unique identifier of the customer who will assume payment responsibility for
|
|
19
24
|
#
|
|
20
25
|
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
|
|
21
26
|
end
|
|
@@ -6,12 +6,15 @@ module Stigg
|
|
|
6
6
|
# @see Stigg::Resources::V1::Subscriptions#delegate
|
|
7
7
|
class SubscriptionDelegateResponse < Stigg::Internal::Type::BaseModel
|
|
8
8
|
# @!attribute data
|
|
9
|
+
# Customer subscription to a plan
|
|
9
10
|
#
|
|
10
11
|
# @return [Stigg::Models::V1::SubscriptionDelegateResponse::Data]
|
|
11
12
|
required :data, -> { Stigg::Models::V1::SubscriptionDelegateResponse::Data }
|
|
12
13
|
|
|
13
14
|
# @!method initialize(data:)
|
|
14
|
-
#
|
|
15
|
+
# Response object
|
|
16
|
+
#
|
|
17
|
+
# @param data [Stigg::Models::V1::SubscriptionDelegateResponse::Data] Customer subscription to a plan
|
|
15
18
|
|
|
16
19
|
# @see Stigg::Models::V1::SubscriptionDelegateResponse#data
|
|
17
20
|
class Data < Stigg::Internal::Type::BaseModel
|
|
@@ -133,6 +136,12 @@ module Stigg
|
|
|
133
136
|
api_name: :paymentCollectionMethod,
|
|
134
137
|
nil?: true
|
|
135
138
|
|
|
139
|
+
# @!attribute prices
|
|
140
|
+
#
|
|
141
|
+
# @return [Array<Stigg::Models::V1::SubscriptionDelegateResponse::Data::Price>, nil]
|
|
142
|
+
optional :prices,
|
|
143
|
+
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::SubscriptionDelegateResponse::Data::Price] }
|
|
144
|
+
|
|
136
145
|
# @!attribute resource_id
|
|
137
146
|
# Resource ID
|
|
138
147
|
#
|
|
@@ -145,7 +154,9 @@ module Stigg
|
|
|
145
154
|
# @return [Time, nil]
|
|
146
155
|
optional :trial_end_date, Time, api_name: :trialEndDate, nil?: true
|
|
147
156
|
|
|
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)
|
|
157
|
+
# @!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)
|
|
158
|
+
# Customer subscription to a plan
|
|
159
|
+
#
|
|
149
160
|
# @param id [String] Subscription ID
|
|
150
161
|
#
|
|
151
162
|
# @param billing_id [String, nil] Billing ID
|
|
@@ -182,6 +193,8 @@ module Stigg
|
|
|
182
193
|
#
|
|
183
194
|
# @param payment_collection_method [Symbol, Stigg::Models::V1::SubscriptionDelegateResponse::Data::PaymentCollectionMethod, nil] The method used to collect payments for a subscription
|
|
184
195
|
#
|
|
196
|
+
# @param prices [Array<Stigg::Models::V1::SubscriptionDelegateResponse::Data::Price>]
|
|
197
|
+
#
|
|
185
198
|
# @param resource_id [String, nil] Resource ID
|
|
186
199
|
#
|
|
187
200
|
# @param trial_end_date [Time, nil] Subscription trial end date
|
|
@@ -267,6 +280,33 @@ module Stigg
|
|
|
267
280
|
# @!method self.values
|
|
268
281
|
# @return [Array<Symbol>]
|
|
269
282
|
end
|
|
283
|
+
|
|
284
|
+
class Price < Stigg::Internal::Type::BaseModel
|
|
285
|
+
# @!attribute id
|
|
286
|
+
# Price ID
|
|
287
|
+
#
|
|
288
|
+
# @return [String]
|
|
289
|
+
required :id, String
|
|
290
|
+
|
|
291
|
+
# @!attribute created_at
|
|
292
|
+
# Creation timestamp
|
|
293
|
+
#
|
|
294
|
+
# @return [String]
|
|
295
|
+
required :created_at, String, api_name: :createdAt
|
|
296
|
+
|
|
297
|
+
# @!attribute updated_at
|
|
298
|
+
# Last update timestamp
|
|
299
|
+
#
|
|
300
|
+
# @return [String]
|
|
301
|
+
required :updated_at, String, api_name: :updatedAt
|
|
302
|
+
|
|
303
|
+
# @!method initialize(id:, created_at:, updated_at:)
|
|
304
|
+
# @param id [String] Price ID
|
|
305
|
+
#
|
|
306
|
+
# @param created_at [String] Creation timestamp
|
|
307
|
+
#
|
|
308
|
+
# @param updated_at [String] Last update timestamp
|
|
309
|
+
end
|
|
270
310
|
end
|
|
271
311
|
end
|
|
272
312
|
end
|
|
@@ -8,50 +8,46 @@ module Stigg
|
|
|
8
8
|
extend Stigg::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Stigg::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!attribute
|
|
12
|
-
#
|
|
11
|
+
# @!attribute after
|
|
12
|
+
# Return items that come after this cursor
|
|
13
13
|
#
|
|
14
14
|
# @return [String, nil]
|
|
15
|
-
optional :
|
|
15
|
+
optional :after, String
|
|
16
16
|
|
|
17
|
-
# @!attribute
|
|
18
|
-
#
|
|
17
|
+
# @!attribute before
|
|
18
|
+
# Return items that come before this cursor
|
|
19
19
|
#
|
|
20
20
|
# @return [String, nil]
|
|
21
|
-
optional :
|
|
21
|
+
optional :before, String
|
|
22
|
+
|
|
23
|
+
# @!attribute customer_id
|
|
24
|
+
# Filter by customer ID
|
|
25
|
+
#
|
|
26
|
+
# @return [String, nil]
|
|
27
|
+
optional :customer_id, String
|
|
22
28
|
|
|
23
29
|
# @!attribute limit
|
|
24
|
-
#
|
|
30
|
+
# Maximum number of items to return
|
|
25
31
|
#
|
|
26
32
|
# @return [Integer, nil]
|
|
27
33
|
optional :limit, Integer
|
|
28
34
|
|
|
29
|
-
# @!attribute starting_after
|
|
30
|
-
# Starting after this UUID for pagination
|
|
31
|
-
#
|
|
32
|
-
# @return [String, nil]
|
|
33
|
-
optional :starting_after, String
|
|
34
|
-
|
|
35
35
|
# @!attribute status
|
|
36
|
-
# Filter by
|
|
37
|
-
# ACTIVE,IN_TRIAL)
|
|
36
|
+
# Filter by status (comma-separated)
|
|
38
37
|
#
|
|
39
38
|
# @return [String, nil]
|
|
40
39
|
optional :status, String
|
|
41
40
|
|
|
42
|
-
# @!method initialize(
|
|
43
|
-
#
|
|
44
|
-
# {Stigg::Models::V1::SubscriptionListParams} for more details.
|
|
41
|
+
# @!method initialize(after: nil, before: nil, customer_id: nil, limit: nil, status: nil, request_options: {})
|
|
42
|
+
# @param after [String] Return items that come after this cursor
|
|
45
43
|
#
|
|
46
|
-
# @param
|
|
47
|
-
#
|
|
48
|
-
# @param ending_before [String] Ending before this UUID for pagination
|
|
44
|
+
# @param before [String] Return items that come before this cursor
|
|
49
45
|
#
|
|
50
|
-
# @param
|
|
46
|
+
# @param customer_id [String] Filter by customer ID
|
|
51
47
|
#
|
|
52
|
-
# @param
|
|
48
|
+
# @param limit [Integer] Maximum number of items to return
|
|
53
49
|
#
|
|
54
|
-
# @param status [String] Filter by
|
|
50
|
+
# @param status [String] Filter by status (comma-separated)
|
|
55
51
|
#
|
|
56
52
|
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
|
|
57
53
|
end
|