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
|
@@ -7,29 +7,59 @@ module Stigg
|
|
|
7
7
|
# @return [Stigg::Resources::V1::Subscriptions::FutureUpdate]
|
|
8
8
|
attr_reader :future_update
|
|
9
9
|
|
|
10
|
-
#
|
|
10
|
+
# Provision subscription
|
|
11
11
|
#
|
|
12
|
-
# @overload create(customer_id:, plan_id:, id: nil, await_payment_confirmation: nil, billing_period: nil, checkout_options: nil, metadata: nil, paying_customer_id: nil, resource_id: nil, trial_override_configuration: nil, request_options: {})
|
|
12
|
+
# @overload create(customer_id:, plan_id:, id: nil, addons: nil, applied_coupon: nil, await_payment_confirmation: nil, billing_country_code: nil, billing_id: nil, billing_information: nil, billing_period: nil, budget: nil, charges: nil, checkout_options: nil, metadata: nil, minimum_spend: nil, paying_customer_id: nil, payment_collection_method: nil, price_overrides: nil, resource_id: nil, salesforce_id: nil, schedule_strategy: nil, start_date: nil, subscription_entitlements: nil, trial_override_configuration: nil, unit_quantity: nil, request_options: {})
|
|
13
13
|
#
|
|
14
14
|
# @param customer_id [String] Customer ID to provision the subscription for
|
|
15
15
|
#
|
|
16
16
|
# @param plan_id [String] Plan ID to provision
|
|
17
17
|
#
|
|
18
|
-
# @param id [String
|
|
18
|
+
# @param id [String] Unique identifier for the subscription
|
|
19
|
+
#
|
|
20
|
+
# @param addons [Array<Stigg::Models::V1::SubscriptionCreateParams::Addon>]
|
|
21
|
+
#
|
|
22
|
+
# @param applied_coupon [Stigg::Models::V1::SubscriptionCreateParams::AppliedCoupon] Coupon configuration
|
|
19
23
|
#
|
|
20
24
|
# @param await_payment_confirmation [Boolean] Whether to wait for payment confirmation before returning the subscription
|
|
21
25
|
#
|
|
22
|
-
# @param
|
|
26
|
+
# @param billing_country_code [String, nil] The ISO 3166-1 alpha-2 country code for billing
|
|
27
|
+
#
|
|
28
|
+
# @param billing_id [String, nil] External billing system identifier
|
|
29
|
+
#
|
|
30
|
+
# @param billing_information [Stigg::Models::V1::SubscriptionCreateParams::BillingInformation]
|
|
31
|
+
#
|
|
32
|
+
# @param billing_period [Symbol, Stigg::Models::V1::SubscriptionCreateParams::BillingPeriod] Billing period (MONTHLY or ANNUALLY)
|
|
33
|
+
#
|
|
34
|
+
# @param budget [Stigg::Models::V1::SubscriptionCreateParams::Budget, nil]
|
|
35
|
+
#
|
|
36
|
+
# @param charges [Array<Stigg::Models::V1::SubscriptionCreateParams::Charge>]
|
|
23
37
|
#
|
|
24
|
-
# @param checkout_options [Stigg::Models::V1::SubscriptionCreateParams::CheckoutOptions]
|
|
38
|
+
# @param checkout_options [Stigg::Models::V1::SubscriptionCreateParams::CheckoutOptions] Checkout page configuration for payment collection
|
|
25
39
|
#
|
|
26
40
|
# @param metadata [Hash{Symbol=>String}] Additional metadata for the subscription
|
|
27
41
|
#
|
|
42
|
+
# @param minimum_spend [Stigg::Models::V1::SubscriptionCreateParams::MinimumSpend, nil]
|
|
43
|
+
#
|
|
28
44
|
# @param paying_customer_id [String, nil] Optional paying customer ID for split billing scenarios
|
|
29
45
|
#
|
|
46
|
+
# @param payment_collection_method [Symbol, Stigg::Models::V1::SubscriptionCreateParams::PaymentCollectionMethod] How payments should be collected for this subscription
|
|
47
|
+
#
|
|
48
|
+
# @param price_overrides [Array<Stigg::Models::V1::SubscriptionCreateParams::PriceOverride>]
|
|
49
|
+
#
|
|
30
50
|
# @param resource_id [String, nil] Optional resource ID for multi-instance subscriptions
|
|
31
51
|
#
|
|
32
|
-
# @param
|
|
52
|
+
# @param salesforce_id [String, nil] Salesforce ID
|
|
53
|
+
#
|
|
54
|
+
# @param schedule_strategy [Symbol, Stigg::Models::V1::SubscriptionCreateParams::ScheduleStrategy] Strategy for scheduling subscription changes
|
|
55
|
+
#
|
|
56
|
+
# @param start_date [Time] Subscription start date
|
|
57
|
+
#
|
|
58
|
+
# @param subscription_entitlements [Array<Stigg::Models::V1::SubscriptionCreateParams::SubscriptionEntitlement>]
|
|
59
|
+
#
|
|
60
|
+
# @param trial_override_configuration [Stigg::Models::V1::SubscriptionCreateParams::TrialOverrideConfiguration] Trial period override settings
|
|
61
|
+
#
|
|
62
|
+
# @param unit_quantity [Float]
|
|
33
63
|
#
|
|
34
64
|
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
35
65
|
#
|
|
@@ -47,11 +77,12 @@ module Stigg
|
|
|
47
77
|
)
|
|
48
78
|
end
|
|
49
79
|
|
|
50
|
-
# Get a single
|
|
80
|
+
# Get a single subscription by ID
|
|
51
81
|
#
|
|
52
82
|
# @overload retrieve(id, request_options: {})
|
|
53
83
|
#
|
|
54
|
-
# @param id [String]
|
|
84
|
+
# @param id [String] The unique identifier of the entity
|
|
85
|
+
#
|
|
55
86
|
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
56
87
|
#
|
|
57
88
|
# @return [Stigg::Models::V1::SubscriptionRetrieveResponse]
|
|
@@ -66,26 +97,23 @@ module Stigg
|
|
|
66
97
|
)
|
|
67
98
|
end
|
|
68
99
|
|
|
69
|
-
#
|
|
70
|
-
# {Stigg::Models::V1::SubscriptionListParams} for more details.
|
|
71
|
-
#
|
|
72
|
-
# Get a list of Subscriptions
|
|
100
|
+
# Get a list of subscriptions
|
|
73
101
|
#
|
|
74
|
-
# @overload list(
|
|
102
|
+
# @overload list(after: nil, before: nil, customer_id: nil, limit: nil, status: nil, request_options: {})
|
|
75
103
|
#
|
|
76
|
-
# @param
|
|
104
|
+
# @param after [String] Return items that come after this cursor
|
|
77
105
|
#
|
|
78
|
-
# @param
|
|
106
|
+
# @param before [String] Return items that come before this cursor
|
|
79
107
|
#
|
|
80
|
-
# @param
|
|
108
|
+
# @param customer_id [String] Filter by customer ID
|
|
81
109
|
#
|
|
82
|
-
# @param
|
|
110
|
+
# @param limit [Integer] Maximum number of items to return
|
|
83
111
|
#
|
|
84
|
-
# @param status [String] Filter by
|
|
112
|
+
# @param status [String] Filter by status (comma-separated)
|
|
85
113
|
#
|
|
86
114
|
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
87
115
|
#
|
|
88
|
-
# @return [Stigg::Models::V1::SubscriptionListResponse]
|
|
116
|
+
# @return [Stigg::Internal::MyCursorIDPage<Stigg::Models::V1::SubscriptionListResponse>]
|
|
89
117
|
#
|
|
90
118
|
# @see Stigg::Models::V1::SubscriptionListParams
|
|
91
119
|
def list(params = {})
|
|
@@ -93,23 +121,23 @@ module Stigg
|
|
|
93
121
|
@client.request(
|
|
94
122
|
method: :get,
|
|
95
123
|
path: "api/v1/subscriptions",
|
|
96
|
-
query: parsed.transform_keys(
|
|
97
|
-
|
|
98
|
-
ending_before: "endingBefore",
|
|
99
|
-
starting_after: "startingAfter"
|
|
100
|
-
),
|
|
124
|
+
query: parsed.transform_keys(customer_id: "customerId"),
|
|
125
|
+
page: Stigg::Internal::MyCursorIDPage,
|
|
101
126
|
model: Stigg::Models::V1::SubscriptionListResponse,
|
|
102
127
|
options: options
|
|
103
128
|
)
|
|
104
129
|
end
|
|
105
130
|
|
|
106
|
-
#
|
|
131
|
+
# Some parameter documentations has been truncated, see
|
|
132
|
+
# {Stigg::Models::V1::SubscriptionDelegateParams} for more details.
|
|
133
|
+
#
|
|
134
|
+
# Delegate subscription payment to customer
|
|
107
135
|
#
|
|
108
136
|
# @overload delegate(id, target_customer_id:, request_options: {})
|
|
109
137
|
#
|
|
110
|
-
# @param id [String]
|
|
138
|
+
# @param id [String] The unique identifier of the entity
|
|
111
139
|
#
|
|
112
|
-
# @param target_customer_id [String] The customer
|
|
140
|
+
# @param target_customer_id [String] The unique identifier of the customer who will assume payment responsibility for
|
|
113
141
|
#
|
|
114
142
|
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
115
143
|
#
|
|
@@ -127,13 +155,13 @@ module Stigg
|
|
|
127
155
|
)
|
|
128
156
|
end
|
|
129
157
|
|
|
130
|
-
#
|
|
158
|
+
# Migrate subscription to latest plan version
|
|
131
159
|
#
|
|
132
160
|
# @overload migrate(id, subscription_migration_time: nil, request_options: {})
|
|
133
161
|
#
|
|
134
|
-
# @param id [String]
|
|
162
|
+
# @param id [String] The unique identifier of the entity
|
|
135
163
|
#
|
|
136
|
-
# @param subscription_migration_time [Symbol, Stigg::Models::V1::SubscriptionMigrateParams::SubscriptionMigrationTime] When to migrate
|
|
164
|
+
# @param subscription_migration_time [Symbol, Stigg::Models::V1::SubscriptionMigrateParams::SubscriptionMigrationTime] When to migrate (immediate or period end)
|
|
137
165
|
#
|
|
138
166
|
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
139
167
|
#
|
|
@@ -151,7 +179,7 @@ module Stigg
|
|
|
151
179
|
)
|
|
152
180
|
end
|
|
153
181
|
|
|
154
|
-
#
|
|
182
|
+
# Preview subscription
|
|
155
183
|
#
|
|
156
184
|
# @overload preview(customer_id:, plan_id:, addons: nil, applied_coupon: nil, billable_features: nil, billing_country_code: nil, billing_information: nil, billing_period: nil, charges: nil, paying_customer_id: nil, resource_id: nil, schedule_strategy: nil, start_date: nil, trial_override_configuration: nil, unit_quantity: nil, request_options: {})
|
|
157
185
|
#
|
|
@@ -159,31 +187,31 @@ module Stigg
|
|
|
159
187
|
#
|
|
160
188
|
# @param plan_id [String] Plan ID
|
|
161
189
|
#
|
|
162
|
-
# @param addons [Array<Stigg::Models::V1::SubscriptionPreviewParams::Addon>]
|
|
190
|
+
# @param addons [Array<Stigg::Models::V1::SubscriptionPreviewParams::Addon>] Addons to include
|
|
163
191
|
#
|
|
164
|
-
# @param applied_coupon [Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon]
|
|
192
|
+
# @param applied_coupon [Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon] Coupon or discount to apply
|
|
165
193
|
#
|
|
166
|
-
# @param billable_features [Array<Stigg::Models::V1::SubscriptionPreviewParams::BillableFeature>]
|
|
194
|
+
# @param billable_features [Array<Stigg::Models::V1::SubscriptionPreviewParams::BillableFeature>] Billable features with quantities
|
|
167
195
|
#
|
|
168
|
-
# @param billing_country_code [String]
|
|
196
|
+
# @param billing_country_code [String] ISO 3166-1 country code for localization
|
|
169
197
|
#
|
|
170
|
-
# @param billing_information [Stigg::Models::V1::SubscriptionPreviewParams::BillingInformation]
|
|
198
|
+
# @param billing_information [Stigg::Models::V1::SubscriptionPreviewParams::BillingInformation] Billing and tax configuration
|
|
171
199
|
#
|
|
172
|
-
# @param billing_period [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::BillingPeriod]
|
|
200
|
+
# @param billing_period [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::BillingPeriod] Billing period (MONTHLY or ANNUALLY)
|
|
173
201
|
#
|
|
174
|
-
# @param charges [Array<Stigg::Models::V1::SubscriptionPreviewParams::Charge>]
|
|
202
|
+
# @param charges [Array<Stigg::Models::V1::SubscriptionPreviewParams::Charge>] One-time or recurring charges
|
|
175
203
|
#
|
|
176
|
-
# @param paying_customer_id [String]
|
|
204
|
+
# @param paying_customer_id [String] Paying customer ID for delegated billing
|
|
177
205
|
#
|
|
178
|
-
# @param resource_id [String]
|
|
206
|
+
# @param resource_id [String] Resource ID for multi-instance subscriptions
|
|
179
207
|
#
|
|
180
|
-
# @param schedule_strategy [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::ScheduleStrategy]
|
|
208
|
+
# @param schedule_strategy [Symbol, Stigg::Models::V1::SubscriptionPreviewParams::ScheduleStrategy] When to apply subscription changes
|
|
181
209
|
#
|
|
182
210
|
# @param start_date [Time] Subscription start date
|
|
183
211
|
#
|
|
184
|
-
# @param trial_override_configuration [Stigg::Models::V1::SubscriptionPreviewParams::TrialOverrideConfiguration]
|
|
212
|
+
# @param trial_override_configuration [Stigg::Models::V1::SubscriptionPreviewParams::TrialOverrideConfiguration] Trial period override settings
|
|
185
213
|
#
|
|
186
|
-
# @param unit_quantity [Float]
|
|
214
|
+
# @param unit_quantity [Float] Unit quantity for per-unit pricing
|
|
187
215
|
#
|
|
188
216
|
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
189
217
|
#
|
|
@@ -201,16 +229,13 @@ module Stigg
|
|
|
201
229
|
)
|
|
202
230
|
end
|
|
203
231
|
|
|
204
|
-
#
|
|
205
|
-
# {Stigg::Models::V1::SubscriptionTransferParams} for more details.
|
|
206
|
-
#
|
|
207
|
-
# Perform transfer to resource on a Subscription
|
|
232
|
+
# Transfer subscription to resource
|
|
208
233
|
#
|
|
209
234
|
# @overload transfer(id, destination_resource_id:, request_options: {})
|
|
210
235
|
#
|
|
211
|
-
# @param id [String]
|
|
236
|
+
# @param id [String] The unique identifier of the entity
|
|
212
237
|
#
|
|
213
|
-
# @param destination_resource_id [String]
|
|
238
|
+
# @param destination_resource_id [String] Resource ID to transfer the subscription to
|
|
214
239
|
#
|
|
215
240
|
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
216
241
|
#
|
data/lib/stigg/resources/v1.rb
CHANGED
|
@@ -12,7 +12,7 @@ module Stigg
|
|
|
12
12
|
# @return [Stigg::Resources::V1::Coupons]
|
|
13
13
|
attr_reader :coupons
|
|
14
14
|
|
|
15
|
-
#
|
|
15
|
+
# Report usage events
|
|
16
16
|
#
|
|
17
17
|
# @overload create_event(events:, request_options: {})
|
|
18
18
|
#
|
|
@@ -34,7 +34,7 @@ module Stigg
|
|
|
34
34
|
)
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
#
|
|
37
|
+
# Report usage measurements
|
|
38
38
|
#
|
|
39
39
|
# @overload create_usage(usages:, request_options: {})
|
|
40
40
|
#
|
data/lib/stigg/version.rb
CHANGED
data/lib/stigg.rb
CHANGED
|
@@ -67,12 +67,6 @@ require_relative "stigg/models/v1/customer_response"
|
|
|
67
67
|
require_relative "stigg/models/v1/customer_retrieve_params"
|
|
68
68
|
require_relative "stigg/models/v1/customers/payment_method_attach_params"
|
|
69
69
|
require_relative "stigg/models/v1/customers/payment_method_detach_params"
|
|
70
|
-
require_relative "stigg/models/v1/customers/promotional_create_params"
|
|
71
|
-
require_relative "stigg/models/v1/customers/promotional_create_response"
|
|
72
|
-
require_relative "stigg/models/v1/customers/promotional_revoke_params"
|
|
73
|
-
require_relative "stigg/models/v1/customers/promotional_revoke_response"
|
|
74
|
-
require_relative "stigg/models/v1/customers/usage_retrieve_params"
|
|
75
|
-
require_relative "stigg/models/v1/customers/usage_retrieve_response"
|
|
76
70
|
require_relative "stigg/models/v1/customer_unarchive_params"
|
|
77
71
|
require_relative "stigg/models/v1/customer_update_params"
|
|
78
72
|
require_relative "stigg/models/v1/subscription_create_params"
|
|
@@ -102,7 +96,6 @@ require_relative "stigg/resources/v1"
|
|
|
102
96
|
require_relative "stigg/resources/v1/coupons"
|
|
103
97
|
require_relative "stigg/resources/v1/customers"
|
|
104
98
|
require_relative "stigg/resources/v1/customers/payment_method"
|
|
105
|
-
require_relative "stigg/resources/v1/customers/promotional"
|
|
106
99
|
require_relative "stigg/resources/v1/customers/usage"
|
|
107
100
|
require_relative "stigg/resources/v1/subscriptions"
|
|
108
101
|
require_relative "stigg/resources/v1/subscriptions/future_update"
|
|
@@ -10,10 +10,37 @@ module Stigg
|
|
|
10
10
|
sig { returns(T.nilable(T::Array[Elem])) }
|
|
11
11
|
attr_accessor :data
|
|
12
12
|
|
|
13
|
+
sig { returns(Pagination) }
|
|
14
|
+
attr_accessor :pagination
|
|
15
|
+
|
|
13
16
|
# @api private
|
|
14
17
|
sig { returns(String) }
|
|
15
18
|
def inspect
|
|
16
19
|
end
|
|
20
|
+
|
|
21
|
+
class Pagination < Stigg::Internal::Type::BaseModel
|
|
22
|
+
OrHash = T.type_alias { T.any(Pagination, Stigg::Internal::AnyHash) }
|
|
23
|
+
|
|
24
|
+
sig { returns(T.nilable(String)) }
|
|
25
|
+
attr_reader :next_
|
|
26
|
+
|
|
27
|
+
sig { params(next_: String).void }
|
|
28
|
+
attr_writer :next_
|
|
29
|
+
|
|
30
|
+
sig { returns(T.nilable(String)) }
|
|
31
|
+
attr_reader :prev
|
|
32
|
+
|
|
33
|
+
sig { params(prev: String).void }
|
|
34
|
+
attr_writer :prev
|
|
35
|
+
|
|
36
|
+
sig { params(next_: String, prev: String).returns(T.attached_class) }
|
|
37
|
+
def self.new(next_: nil, prev: nil)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
sig { override.returns({ next_: String, prev: String }) }
|
|
41
|
+
def to_hash
|
|
42
|
+
end
|
|
43
|
+
end
|
|
17
44
|
end
|
|
18
45
|
end
|
|
19
46
|
end
|
|
@@ -12,6 +12,7 @@ module Stigg
|
|
|
12
12
|
)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
+
# Discount instrument with percentage or fixed amount
|
|
15
16
|
sig { returns(Stigg::Models::V1::CouponCreateResponse::Data) }
|
|
16
17
|
attr_reader :data
|
|
17
18
|
|
|
@@ -22,12 +23,16 @@ module Stigg
|
|
|
22
23
|
end
|
|
23
24
|
attr_writer :data
|
|
24
25
|
|
|
26
|
+
# Response object
|
|
25
27
|
sig do
|
|
26
28
|
params(
|
|
27
29
|
data: Stigg::Models::V1::CouponCreateResponse::Data::OrHash
|
|
28
30
|
).returns(T.attached_class)
|
|
29
31
|
end
|
|
30
|
-
def self.new(
|
|
32
|
+
def self.new(
|
|
33
|
+
# Discount instrument with percentage or fixed amount
|
|
34
|
+
data:
|
|
35
|
+
)
|
|
31
36
|
end
|
|
32
37
|
|
|
33
38
|
sig do
|
|
@@ -121,6 +126,7 @@ module Stigg
|
|
|
121
126
|
sig { returns(Time) }
|
|
122
127
|
attr_accessor :updated_at
|
|
123
128
|
|
|
129
|
+
# Discount instrument with percentage or fixed amount
|
|
124
130
|
sig do
|
|
125
131
|
params(
|
|
126
132
|
id: String,
|
|
@@ -226,20 +232,17 @@ module Stigg
|
|
|
226
232
|
# The price currency
|
|
227
233
|
sig do
|
|
228
234
|
returns(
|
|
229
|
-
|
|
230
|
-
Stigg::Models::V1::CouponCreateResponse::Data::AmountsOff::Currency::TaggedSymbol
|
|
231
|
-
)
|
|
235
|
+
Stigg::Models::V1::CouponCreateResponse::Data::AmountsOff::Currency::TaggedSymbol
|
|
232
236
|
)
|
|
233
237
|
end
|
|
234
238
|
attr_accessor :currency
|
|
235
239
|
|
|
240
|
+
# Monetary amount with currency
|
|
236
241
|
sig do
|
|
237
242
|
params(
|
|
238
243
|
amount: Float,
|
|
239
244
|
currency:
|
|
240
|
-
|
|
241
|
-
Stigg::Models::V1::CouponCreateResponse::Data::AmountsOff::Currency::OrSymbol
|
|
242
|
-
)
|
|
245
|
+
Stigg::Models::V1::CouponCreateResponse::Data::AmountsOff::Currency::OrSymbol
|
|
243
246
|
).returns(T.attached_class)
|
|
244
247
|
end
|
|
245
248
|
def self.new(
|
|
@@ -255,9 +258,7 @@ module Stigg
|
|
|
255
258
|
{
|
|
256
259
|
amount: Float,
|
|
257
260
|
currency:
|
|
258
|
-
|
|
259
|
-
Stigg::Models::V1::CouponCreateResponse::Data::AmountsOff::Currency::TaggedSymbol
|
|
260
|
-
)
|
|
261
|
+
Stigg::Models::V1::CouponCreateResponse::Data::AmountsOff::Currency::TaggedSymbol
|
|
261
262
|
}
|
|
262
263
|
)
|
|
263
264
|
end
|
|
@@ -12,42 +12,42 @@ module Stigg
|
|
|
12
12
|
T.any(Stigg::V1::CouponListParams, Stigg::Internal::AnyHash)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
#
|
|
15
|
+
# Return items that come after this cursor
|
|
16
16
|
sig { returns(T.nilable(String)) }
|
|
17
|
-
attr_reader :
|
|
17
|
+
attr_reader :after
|
|
18
18
|
|
|
19
|
-
sig { params(
|
|
20
|
-
attr_writer :
|
|
19
|
+
sig { params(after: String).void }
|
|
20
|
+
attr_writer :after
|
|
21
21
|
|
|
22
|
-
#
|
|
22
|
+
# Return items that come before this cursor
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_reader :before
|
|
25
|
+
|
|
26
|
+
sig { params(before: String).void }
|
|
27
|
+
attr_writer :before
|
|
28
|
+
|
|
29
|
+
# Maximum number of items to return
|
|
23
30
|
sig { returns(T.nilable(Integer)) }
|
|
24
31
|
attr_reader :limit
|
|
25
32
|
|
|
26
33
|
sig { params(limit: Integer).void }
|
|
27
34
|
attr_writer :limit
|
|
28
35
|
|
|
29
|
-
# Starting after this UUID for pagination
|
|
30
|
-
sig { returns(T.nilable(String)) }
|
|
31
|
-
attr_reader :starting_after
|
|
32
|
-
|
|
33
|
-
sig { params(starting_after: String).void }
|
|
34
|
-
attr_writer :starting_after
|
|
35
|
-
|
|
36
36
|
sig do
|
|
37
37
|
params(
|
|
38
|
-
|
|
38
|
+
after: String,
|
|
39
|
+
before: String,
|
|
39
40
|
limit: Integer,
|
|
40
|
-
starting_after: String,
|
|
41
41
|
request_options: Stigg::RequestOptions::OrHash
|
|
42
42
|
).returns(T.attached_class)
|
|
43
43
|
end
|
|
44
44
|
def self.new(
|
|
45
|
-
#
|
|
46
|
-
|
|
47
|
-
#
|
|
45
|
+
# Return items that come after this cursor
|
|
46
|
+
after: nil,
|
|
47
|
+
# Return items that come before this cursor
|
|
48
|
+
before: nil,
|
|
49
|
+
# Maximum number of items to return
|
|
48
50
|
limit: nil,
|
|
49
|
-
# Starting after this UUID for pagination
|
|
50
|
-
starting_after: nil,
|
|
51
51
|
request_options: {}
|
|
52
52
|
)
|
|
53
53
|
end
|
|
@@ -55,9 +55,9 @@ module Stigg
|
|
|
55
55
|
sig do
|
|
56
56
|
override.returns(
|
|
57
57
|
{
|
|
58
|
-
|
|
58
|
+
after: String,
|
|
59
|
+
before: String,
|
|
59
60
|
limit: Integer,
|
|
60
|
-
starting_after: String,
|
|
61
61
|
request_options: Stigg::RequestOptions
|
|
62
62
|
}
|
|
63
63
|
)
|