stripe 18.4.0.pre.alpha.4 → 18.4.0.pre.alpha.6
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/lib/stripe/params/billing/alert_create_params.rb +83 -1
- data/lib/stripe/params/payment_method_update_params.rb +17 -1
- data/lib/stripe/params/subscription_pause_params.rb +24 -7
- data/lib/stripe/params/subscription_resume_params.rb +1 -5
- data/lib/stripe/request_params.rb +35 -0
- data/lib/stripe/resources/billing/alert.rb +110 -0
- data/lib/stripe/resources/invoice_line_item.rb +36 -2
- data/lib/stripe/resources/payment_method.rb +4 -0
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe.rbi +354 -26
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2401c7a043ebd47ce50478f3504d47b3d4f87858b2ff59b7609ce9433b3afd79
|
|
4
|
+
data.tar.gz: 85edd7ba11d395b79b7b26391083aa1b6c5a92db930b3893535d3f7f31e3cee4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a51d46f6b4d7a2fca45c0e394bd32e07dcf2e6a883341589db805d487639bccf52afafe61eb372c3abef9b3c5a182dd8d76b19b9e933cd761bae41c7f4aeca96
|
|
7
|
+
data.tar.gz: 1b1087ef84a593165062c1b8196894455637bfa6f03e864b1321cc963d90415a629d1b591267879ef7fd484b7ea5c88896ac8d2a3d1556da9235c0943dfea9b5
|
|
@@ -115,6 +115,84 @@ module Stripe
|
|
|
115
115
|
end
|
|
116
116
|
end
|
|
117
117
|
|
|
118
|
+
class SpendThreshold < ::Stripe::RequestParams
|
|
119
|
+
class Filters < ::Stripe::RequestParams
|
|
120
|
+
# Filter by billable item IDs. Maximum of 20 billable items.
|
|
121
|
+
attr_accessor :billable_items
|
|
122
|
+
# Filter by billing cadence ID.
|
|
123
|
+
attr_accessor :billing_cadence
|
|
124
|
+
# Filter by pricing plan ID.
|
|
125
|
+
attr_accessor :pricing_plan
|
|
126
|
+
# Filter by pricing plan subscription ID.
|
|
127
|
+
attr_accessor :pricing_plan_subscription
|
|
128
|
+
|
|
129
|
+
def initialize(
|
|
130
|
+
billable_items: nil,
|
|
131
|
+
billing_cadence: nil,
|
|
132
|
+
pricing_plan: nil,
|
|
133
|
+
pricing_plan_subscription: nil
|
|
134
|
+
)
|
|
135
|
+
@billable_items = billable_items
|
|
136
|
+
@billing_cadence = billing_cadence
|
|
137
|
+
@pricing_plan = pricing_plan
|
|
138
|
+
@pricing_plan_subscription = pricing_plan_subscription
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
class Gte < ::Stripe::RequestParams
|
|
143
|
+
class Amount < ::Stripe::RequestParams
|
|
144
|
+
# Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter.
|
|
145
|
+
attr_accessor :currency
|
|
146
|
+
# An integer representing the amount of the threshold.
|
|
147
|
+
attr_accessor :value
|
|
148
|
+
|
|
149
|
+
def initialize(currency: nil, value: nil)
|
|
150
|
+
@currency = currency
|
|
151
|
+
@value = value
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
class CustomPricingUnit < ::Stripe::RequestParams
|
|
156
|
+
# The ID of the custom pricing unit.
|
|
157
|
+
attr_accessor :id
|
|
158
|
+
# A positive decimal string representing the amount of the custom pricing unit threshold.
|
|
159
|
+
attr_accessor :value
|
|
160
|
+
|
|
161
|
+
def initialize(id: nil, value: nil)
|
|
162
|
+
@id = id
|
|
163
|
+
@value = value
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
# The monetary amount. Required when type is `amount`.
|
|
167
|
+
attr_accessor :amount
|
|
168
|
+
# The custom pricing unit amount. Required when type is `custom_pricing_unit`.
|
|
169
|
+
attr_accessor :custom_pricing_unit
|
|
170
|
+
# The type of the threshold amount.
|
|
171
|
+
attr_accessor :type
|
|
172
|
+
|
|
173
|
+
def initialize(amount: nil, custom_pricing_unit: nil, type: nil)
|
|
174
|
+
@amount = amount
|
|
175
|
+
@custom_pricing_unit = custom_pricing_unit
|
|
176
|
+
@type = type
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
# Defines the period over which spend is aggregated.
|
|
180
|
+
attr_accessor :aggregation_period
|
|
181
|
+
# Filters to scope the spend calculation.
|
|
182
|
+
attr_accessor :filters
|
|
183
|
+
# Defines the granularity of spend aggregation. Defaults to `pricing_plan_subscription`.
|
|
184
|
+
attr_accessor :group_by
|
|
185
|
+
# Defines at which value the alert will fire.
|
|
186
|
+
attr_accessor :gte
|
|
187
|
+
|
|
188
|
+
def initialize(aggregation_period: nil, filters: nil, group_by: nil, gte: nil)
|
|
189
|
+
@aggregation_period = aggregation_period
|
|
190
|
+
@filters = filters
|
|
191
|
+
@group_by = group_by
|
|
192
|
+
@gte = gte
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
118
196
|
class UsageThreshold < ::Stripe::RequestParams
|
|
119
197
|
class Filter < ::Stripe::RequestParams
|
|
120
198
|
# Limit the scope to this usage alert only to this customer.
|
|
@@ -153,19 +231,23 @@ module Stripe
|
|
|
153
231
|
attr_accessor :title
|
|
154
232
|
# The configuration of the usage threshold.
|
|
155
233
|
attr_accessor :usage_threshold
|
|
234
|
+
# The configuration of the spend threshold.
|
|
235
|
+
attr_accessor :spend_threshold
|
|
156
236
|
|
|
157
237
|
def initialize(
|
|
158
238
|
alert_type: nil,
|
|
159
239
|
credit_balance_threshold: nil,
|
|
160
240
|
expand: nil,
|
|
161
241
|
title: nil,
|
|
162
|
-
usage_threshold: nil
|
|
242
|
+
usage_threshold: nil,
|
|
243
|
+
spend_threshold: nil
|
|
163
244
|
)
|
|
164
245
|
@alert_type = alert_type
|
|
165
246
|
@credit_balance_threshold = credit_balance_threshold
|
|
166
247
|
@expand = expand
|
|
167
248
|
@title = title
|
|
168
249
|
@usage_threshold = usage_threshold
|
|
250
|
+
@spend_threshold = spend_threshold
|
|
169
251
|
end
|
|
170
252
|
end
|
|
171
253
|
end
|
|
@@ -77,6 +77,18 @@ module Stripe
|
|
|
77
77
|
end
|
|
78
78
|
end
|
|
79
79
|
|
|
80
|
+
class Custom < ::Stripe::RequestParams
|
|
81
|
+
# A reference to an external payment method, such as a PayPal Billing Agreement ID.
|
|
82
|
+
attr_accessor :payment_method_reference
|
|
83
|
+
# Indicates whether the payment method supports off-session payments.
|
|
84
|
+
attr_accessor :usage
|
|
85
|
+
|
|
86
|
+
def initialize(payment_method_reference: nil, usage: nil)
|
|
87
|
+
@payment_method_reference = payment_method_reference
|
|
88
|
+
@usage = usage
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
80
92
|
class Payto < ::Stripe::RequestParams
|
|
81
93
|
# The account number for the bank account.
|
|
82
94
|
attr_accessor :account_number
|
|
@@ -117,6 +129,8 @@ module Stripe
|
|
|
117
129
|
attr_accessor :payto
|
|
118
130
|
# If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
|
|
119
131
|
attr_accessor :us_bank_account
|
|
132
|
+
# If this is a `custom` PaymentMethod, this hash contains details about the Custom payment method.
|
|
133
|
+
attr_accessor :custom
|
|
120
134
|
|
|
121
135
|
def initialize(
|
|
122
136
|
allow_redisplay: nil,
|
|
@@ -125,7 +139,8 @@ module Stripe
|
|
|
125
139
|
expand: nil,
|
|
126
140
|
metadata: nil,
|
|
127
141
|
payto: nil,
|
|
128
|
-
us_bank_account: nil
|
|
142
|
+
us_bank_account: nil,
|
|
143
|
+
custom: nil
|
|
129
144
|
)
|
|
130
145
|
@allow_redisplay = allow_redisplay
|
|
131
146
|
@billing_details = billing_details
|
|
@@ -134,6 +149,7 @@ module Stripe
|
|
|
134
149
|
@metadata = metadata
|
|
135
150
|
@payto = payto
|
|
136
151
|
@us_bank_account = us_bank_account
|
|
152
|
+
@custom = custom
|
|
137
153
|
end
|
|
138
154
|
end
|
|
139
155
|
end
|
|
@@ -4,14 +4,31 @@
|
|
|
4
4
|
module Stripe
|
|
5
5
|
class SubscriptionPauseParams < ::Stripe::RequestParams
|
|
6
6
|
class BillFor < ::Stripe::RequestParams
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
attr_accessor :unused_time
|
|
7
|
+
class OutstandingUsageThrough < ::Stripe::RequestParams
|
|
8
|
+
# When to bill metered usage in the current period.
|
|
9
|
+
attr_accessor :type
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
def initialize(type: nil)
|
|
12
|
+
@type = type
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
class UnusedTimeFrom < ::Stripe::RequestParams
|
|
17
|
+
# When to credit for unused time.
|
|
18
|
+
attr_accessor :type
|
|
19
|
+
|
|
20
|
+
def initialize(type: nil)
|
|
21
|
+
@type = type
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
# Controls when to bill for metered usage in the current period. Defaults to `{ type: "now" }`.
|
|
25
|
+
attr_accessor :outstanding_usage_through
|
|
26
|
+
# Controls when to credit for unused time on licensed items. Defaults to `{ type: "now" }`.
|
|
27
|
+
attr_accessor :unused_time_from
|
|
28
|
+
|
|
29
|
+
def initialize(outstanding_usage_through: nil, unused_time_from: nil)
|
|
30
|
+
@outstanding_usage_through = outstanding_usage_through
|
|
31
|
+
@unused_time_from = unused_time_from
|
|
15
32
|
end
|
|
16
33
|
end
|
|
17
34
|
# Controls what to bill for when pausing the subscription.
|
|
@@ -11,21 +11,17 @@ module Stripe
|
|
|
11
11
|
attr_accessor :proration_behavior
|
|
12
12
|
# If set, prorations will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same prorations that were previewed with the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint.
|
|
13
13
|
attr_accessor :proration_date
|
|
14
|
-
# Controls when the subscription transitions from `paused` to `active`. Determines how payment on the invoice affects the resumption process.The default is `pending_if_incomplete`.
|
|
15
|
-
attr_accessor :payment_behavior
|
|
16
14
|
|
|
17
15
|
def initialize(
|
|
18
16
|
billing_cycle_anchor: nil,
|
|
19
17
|
expand: nil,
|
|
20
18
|
proration_behavior: nil,
|
|
21
|
-
proration_date: nil
|
|
22
|
-
payment_behavior: nil
|
|
19
|
+
proration_date: nil
|
|
23
20
|
)
|
|
24
21
|
@billing_cycle_anchor = billing_cycle_anchor
|
|
25
22
|
@expand = expand
|
|
26
23
|
@proration_behavior = proration_behavior
|
|
27
24
|
@proration_date = proration_date
|
|
28
|
-
@payment_behavior = payment_behavior
|
|
29
25
|
end
|
|
30
26
|
end
|
|
31
27
|
end
|
|
@@ -5,11 +5,46 @@ module Stripe
|
|
|
5
5
|
# For internal use only. Does not provide a stable API and may be broken
|
|
6
6
|
# with future non-major changes.
|
|
7
7
|
class RequestParams
|
|
8
|
+
class << self
|
|
9
|
+
# Override the object instantiation flow in Ruby in order to track explicitly set keys
|
|
10
|
+
# V2 APIs accept null values on the backend. However, we do not want to set a key to nil
|
|
11
|
+
# if the user has not explicitly set them to nil
|
|
12
|
+
# TODO(major): https://go/j/DEVSDK-2990
|
|
13
|
+
def new(**kwargs)
|
|
14
|
+
instance = allocate
|
|
15
|
+
# Track explicitly set keys for V2 classes only
|
|
16
|
+
instance.instance_variable_set(:@_explicitly_set_keys, kwargs.keys.to_set) if name&.start_with?("Stripe::V2::")
|
|
17
|
+
instance.send(:initialize, **kwargs)
|
|
18
|
+
instance
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Override attr_accessor to create setters that track explicitly set keys for V2 classes
|
|
22
|
+
def attr_accessor(*names)
|
|
23
|
+
names.each do |name|
|
|
24
|
+
# Define getter
|
|
25
|
+
define_method(name) { instance_variable_get("@#{name}") }
|
|
26
|
+
|
|
27
|
+
# Define setter that tracks the key as explicitly set
|
|
28
|
+
define_method("#{name}=") do |value|
|
|
29
|
+
@_explicitly_set_keys&.add(name)
|
|
30
|
+
instance_variable_set("@#{name}", value)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
8
36
|
def to_h
|
|
9
37
|
instance_variables.each_with_object({}) do |var, hash|
|
|
38
|
+
# _explicitly_set_keys is set as an instance variable.
|
|
39
|
+
# Ignore the var if it is _explicitly_set_keys itself.
|
|
40
|
+
next if var == :@_explicitly_set_keys
|
|
41
|
+
|
|
10
42
|
key = var.to_s.delete("@").to_sym
|
|
11
43
|
value = instance_variable_get(var)
|
|
12
44
|
|
|
45
|
+
# For V2 classes, only include keys that were explicitly set
|
|
46
|
+
next if @_explicitly_set_keys && !@_explicitly_set_keys.include?(key)
|
|
47
|
+
|
|
13
48
|
hash[key] = if value.is_a?(RequestParams)
|
|
14
49
|
value.to_h
|
|
15
50
|
# Check if value is an array and contains RequestParams objects
|
|
@@ -144,6 +144,113 @@ module Stripe
|
|
|
144
144
|
@field_remappings = {}
|
|
145
145
|
end
|
|
146
146
|
end
|
|
147
|
+
|
|
148
|
+
class SpendThreshold < ::Stripe::StripeObject
|
|
149
|
+
class Filters < ::Stripe::StripeObject
|
|
150
|
+
# Filter by billable item IDs.
|
|
151
|
+
attr_reader :billable_items
|
|
152
|
+
# Filter by billing cadence ID.
|
|
153
|
+
attr_reader :billing_cadence
|
|
154
|
+
# Filter by pricing plan ID.
|
|
155
|
+
attr_reader :pricing_plan
|
|
156
|
+
# Filter by pricing plan subscription ID.
|
|
157
|
+
attr_reader :pricing_plan_subscription
|
|
158
|
+
|
|
159
|
+
def self.inner_class_types
|
|
160
|
+
@inner_class_types = {}
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
def self.field_remappings
|
|
164
|
+
@field_remappings = {}
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
class Gte < ::Stripe::StripeObject
|
|
169
|
+
class Amount < ::Stripe::StripeObject
|
|
170
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
171
|
+
attr_reader :currency
|
|
172
|
+
# A positive integer representing the amount.
|
|
173
|
+
attr_reader :value
|
|
174
|
+
|
|
175
|
+
def self.inner_class_types
|
|
176
|
+
@inner_class_types = {}
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
def self.field_remappings
|
|
180
|
+
@field_remappings = {}
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
class CustomPricingUnit < ::Stripe::StripeObject
|
|
185
|
+
class CustomPricingUnitDetails < ::Stripe::StripeObject
|
|
186
|
+
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
187
|
+
attr_reader :created
|
|
188
|
+
# The name of the custom pricing unit.
|
|
189
|
+
attr_reader :display_name
|
|
190
|
+
# Unique identifier for the object.
|
|
191
|
+
attr_reader :id
|
|
192
|
+
# A lookup key for the custom pricing unit.
|
|
193
|
+
attr_reader :lookup_key
|
|
194
|
+
# Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
|
195
|
+
attr_reader :metadata
|
|
196
|
+
# The status of the custom pricing unit.
|
|
197
|
+
attr_reader :status
|
|
198
|
+
|
|
199
|
+
def self.inner_class_types
|
|
200
|
+
@inner_class_types = {}
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
def self.field_remappings
|
|
204
|
+
@field_remappings = {}
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
# The custom pricing unit object.
|
|
208
|
+
attr_reader :custom_pricing_unit_details
|
|
209
|
+
# Unique identifier for the object.
|
|
210
|
+
attr_reader :id
|
|
211
|
+
# A positive decimal string representing the amount.
|
|
212
|
+
attr_reader :value
|
|
213
|
+
|
|
214
|
+
def self.inner_class_types
|
|
215
|
+
@inner_class_types = { custom_pricing_unit_details: CustomPricingUnitDetails }
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
def self.field_remappings
|
|
219
|
+
@field_remappings = {}
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
# The monetary amount. Present when type is `amount`.
|
|
223
|
+
attr_reader :amount
|
|
224
|
+
# The custom pricing unit amount. Present when type is `custom_pricing_unit`.
|
|
225
|
+
attr_reader :custom_pricing_unit
|
|
226
|
+
# The type of the threshold amount.
|
|
227
|
+
attr_reader :type
|
|
228
|
+
|
|
229
|
+
def self.inner_class_types
|
|
230
|
+
@inner_class_types = { amount: Amount, custom_pricing_unit: CustomPricingUnit }
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
def self.field_remappings
|
|
234
|
+
@field_remappings = {}
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
# Defines the period over which spend is aggregated.
|
|
238
|
+
attr_reader :aggregation_period
|
|
239
|
+
# Filters to scope the spend calculation.
|
|
240
|
+
attr_reader :filters
|
|
241
|
+
# Defines the granularity of spend aggregation.
|
|
242
|
+
attr_reader :group_by
|
|
243
|
+
# The threshold value configuration for a spend threshold alert.
|
|
244
|
+
attr_reader :gte
|
|
245
|
+
|
|
246
|
+
def self.inner_class_types
|
|
247
|
+
@inner_class_types = { filters: Filters, gte: Gte }
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
def self.field_remappings
|
|
251
|
+
@field_remappings = {}
|
|
252
|
+
end
|
|
253
|
+
end
|
|
147
254
|
# Defines the type of the alert.
|
|
148
255
|
attr_reader :alert_type
|
|
149
256
|
# Encapsulates configuration of the alert to monitor billing credit balance.
|
|
@@ -160,6 +267,8 @@ module Stripe
|
|
|
160
267
|
attr_reader :title
|
|
161
268
|
# Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://docs.stripe.com/api/billing/meter).
|
|
162
269
|
attr_reader :usage_threshold
|
|
270
|
+
# Encapsulates the alert's configuration to monitor spend on pricing plan subscriptions.
|
|
271
|
+
attr_reader :spend_threshold
|
|
163
272
|
|
|
164
273
|
# Reactivates this alert, allowing it to trigger again.
|
|
165
274
|
def activate(params = {}, opts = {})
|
|
@@ -235,6 +344,7 @@ module Stripe
|
|
|
235
344
|
@inner_class_types = {
|
|
236
345
|
credit_balance_threshold: CreditBalanceThreshold,
|
|
237
346
|
usage_threshold: UsageThreshold,
|
|
347
|
+
spend_threshold: SpendThreshold,
|
|
238
348
|
}
|
|
239
349
|
end
|
|
240
350
|
|
|
@@ -132,11 +132,45 @@ module Stripe
|
|
|
132
132
|
end
|
|
133
133
|
|
|
134
134
|
class ScheduleDetails < ::Stripe::StripeObject
|
|
135
|
-
|
|
135
|
+
class ProrationDetails < ::Stripe::StripeObject
|
|
136
|
+
class CreditedItems < ::Stripe::StripeObject
|
|
137
|
+
# Invoice containing the credited invoice line items
|
|
138
|
+
attr_reader :invoice
|
|
139
|
+
# Credited invoice line items
|
|
140
|
+
attr_reader :invoice_line_items
|
|
141
|
+
|
|
142
|
+
def self.inner_class_types
|
|
143
|
+
@inner_class_types = {}
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
def self.field_remappings
|
|
147
|
+
@field_remappings = {}
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
# For a credit proration `line_item`, the original debit line_items to which the credit proration applies.
|
|
151
|
+
attr_reader :credited_items
|
|
152
|
+
|
|
153
|
+
def self.inner_class_types
|
|
154
|
+
@inner_class_types = { credited_items: CreditedItems }
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
def self.field_remappings
|
|
158
|
+
@field_remappings = {}
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
# The subscription schedule that generated this line item.
|
|
136
162
|
attr_reader :schedule
|
|
163
|
+
# The invoice item that generated this line item.
|
|
164
|
+
attr_reader :invoice_item
|
|
165
|
+
# Whether this is a proration.
|
|
166
|
+
attr_reader :proration
|
|
167
|
+
# Additional details for proration line items.
|
|
168
|
+
attr_reader :proration_details
|
|
169
|
+
# The subscription that the schedule belongs to.
|
|
170
|
+
attr_reader :subscription
|
|
137
171
|
|
|
138
172
|
def self.inner_class_types
|
|
139
|
-
@inner_class_types = {}
|
|
173
|
+
@inner_class_types = { proration_details: ProrationDetails }
|
|
140
174
|
end
|
|
141
175
|
|
|
142
176
|
def self.field_remappings
|
|
@@ -829,6 +829,10 @@ module Stripe
|
|
|
829
829
|
attr_reader :logo
|
|
830
830
|
# ID of the Dashboard-only CustomPaymentMethodType. Not expandable.
|
|
831
831
|
attr_reader :type
|
|
832
|
+
# A reference to an external payment method, such as a PayPal Billing Agreement ID.
|
|
833
|
+
attr_reader :payment_method_reference
|
|
834
|
+
# Indicates whether the payment method supports off-session payments.
|
|
835
|
+
attr_reader :usage
|
|
832
836
|
|
|
833
837
|
def self.inner_class_types
|
|
834
838
|
@inner_class_types = { logo: Logo }
|
data/lib/stripe/version.rb
CHANGED
data/rbi/stripe.rbi
CHANGED
|
@@ -7085,6 +7085,120 @@ module Stripe
|
|
|
7085
7085
|
@field_remappings = {}
|
|
7086
7086
|
end
|
|
7087
7087
|
end
|
|
7088
|
+
class SpendThreshold < ::Stripe::StripeObject
|
|
7089
|
+
class Filters < ::Stripe::StripeObject
|
|
7090
|
+
# Filter by billable item IDs.
|
|
7091
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
7092
|
+
def billable_items; end
|
|
7093
|
+
# Filter by billing cadence ID.
|
|
7094
|
+
sig { returns(T.nilable(String)) }
|
|
7095
|
+
def billing_cadence; end
|
|
7096
|
+
# Filter by pricing plan ID.
|
|
7097
|
+
sig { returns(T.nilable(String)) }
|
|
7098
|
+
def pricing_plan; end
|
|
7099
|
+
# Filter by pricing plan subscription ID.
|
|
7100
|
+
sig { returns(T.nilable(String)) }
|
|
7101
|
+
def pricing_plan_subscription; end
|
|
7102
|
+
def self.inner_class_types
|
|
7103
|
+
@inner_class_types = {}
|
|
7104
|
+
end
|
|
7105
|
+
def self.field_remappings
|
|
7106
|
+
@field_remappings = {}
|
|
7107
|
+
end
|
|
7108
|
+
end
|
|
7109
|
+
class Gte < ::Stripe::StripeObject
|
|
7110
|
+
class Amount < ::Stripe::StripeObject
|
|
7111
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
7112
|
+
sig { returns(String) }
|
|
7113
|
+
def currency; end
|
|
7114
|
+
# A positive integer representing the amount.
|
|
7115
|
+
sig { returns(Integer) }
|
|
7116
|
+
def value; end
|
|
7117
|
+
def self.inner_class_types
|
|
7118
|
+
@inner_class_types = {}
|
|
7119
|
+
end
|
|
7120
|
+
def self.field_remappings
|
|
7121
|
+
@field_remappings = {}
|
|
7122
|
+
end
|
|
7123
|
+
end
|
|
7124
|
+
class CustomPricingUnit < ::Stripe::StripeObject
|
|
7125
|
+
class CustomPricingUnitDetails < ::Stripe::StripeObject
|
|
7126
|
+
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
7127
|
+
sig { returns(Integer) }
|
|
7128
|
+
def created; end
|
|
7129
|
+
# The name of the custom pricing unit.
|
|
7130
|
+
sig { returns(String) }
|
|
7131
|
+
def display_name; end
|
|
7132
|
+
# Unique identifier for the object.
|
|
7133
|
+
sig { returns(String) }
|
|
7134
|
+
def id; end
|
|
7135
|
+
# A lookup key for the custom pricing unit.
|
|
7136
|
+
sig { returns(T.nilable(String)) }
|
|
7137
|
+
def lookup_key; end
|
|
7138
|
+
# Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
|
7139
|
+
sig { returns(T::Hash[String, String]) }
|
|
7140
|
+
def metadata; end
|
|
7141
|
+
# The status of the custom pricing unit.
|
|
7142
|
+
sig { returns(String) }
|
|
7143
|
+
def status; end
|
|
7144
|
+
def self.inner_class_types
|
|
7145
|
+
@inner_class_types = {}
|
|
7146
|
+
end
|
|
7147
|
+
def self.field_remappings
|
|
7148
|
+
@field_remappings = {}
|
|
7149
|
+
end
|
|
7150
|
+
end
|
|
7151
|
+
# The custom pricing unit object.
|
|
7152
|
+
sig { returns(T.nilable(CustomPricingUnitDetails)) }
|
|
7153
|
+
def custom_pricing_unit_details; end
|
|
7154
|
+
# Unique identifier for the object.
|
|
7155
|
+
sig { returns(String) }
|
|
7156
|
+
def id; end
|
|
7157
|
+
# A positive decimal string representing the amount.
|
|
7158
|
+
sig { returns(String) }
|
|
7159
|
+
def value; end
|
|
7160
|
+
def self.inner_class_types
|
|
7161
|
+
@inner_class_types = {custom_pricing_unit_details: CustomPricingUnitDetails}
|
|
7162
|
+
end
|
|
7163
|
+
def self.field_remappings
|
|
7164
|
+
@field_remappings = {}
|
|
7165
|
+
end
|
|
7166
|
+
end
|
|
7167
|
+
# The monetary amount. Present when type is `amount`.
|
|
7168
|
+
sig { returns(T.nilable(Amount)) }
|
|
7169
|
+
def amount; end
|
|
7170
|
+
# The custom pricing unit amount. Present when type is `custom_pricing_unit`.
|
|
7171
|
+
sig { returns(T.nilable(CustomPricingUnit)) }
|
|
7172
|
+
def custom_pricing_unit; end
|
|
7173
|
+
# The type of the threshold amount.
|
|
7174
|
+
sig { returns(String) }
|
|
7175
|
+
def type; end
|
|
7176
|
+
def self.inner_class_types
|
|
7177
|
+
@inner_class_types = {amount: Amount, custom_pricing_unit: CustomPricingUnit}
|
|
7178
|
+
end
|
|
7179
|
+
def self.field_remappings
|
|
7180
|
+
@field_remappings = {}
|
|
7181
|
+
end
|
|
7182
|
+
end
|
|
7183
|
+
# Defines the period over which spend is aggregated.
|
|
7184
|
+
sig { returns(String) }
|
|
7185
|
+
def aggregation_period; end
|
|
7186
|
+
# Filters to scope the spend calculation.
|
|
7187
|
+
sig { returns(T.nilable(Filters)) }
|
|
7188
|
+
def filters; end
|
|
7189
|
+
# Defines the granularity of spend aggregation.
|
|
7190
|
+
sig { returns(T.nilable(String)) }
|
|
7191
|
+
def group_by; end
|
|
7192
|
+
# The threshold value configuration for a spend threshold alert.
|
|
7193
|
+
sig { returns(Gte) }
|
|
7194
|
+
def gte; end
|
|
7195
|
+
def self.inner_class_types
|
|
7196
|
+
@inner_class_types = {filters: Filters, gte: Gte}
|
|
7197
|
+
end
|
|
7198
|
+
def self.field_remappings
|
|
7199
|
+
@field_remappings = {}
|
|
7200
|
+
end
|
|
7201
|
+
end
|
|
7088
7202
|
# Defines the type of the alert.
|
|
7089
7203
|
sig { returns(String) }
|
|
7090
7204
|
def alert_type; end
|
|
@@ -7109,6 +7223,9 @@ module Stripe
|
|
|
7109
7223
|
# Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://docs.stripe.com/api/billing/meter).
|
|
7110
7224
|
sig { returns(T.nilable(UsageThreshold)) }
|
|
7111
7225
|
def usage_threshold; end
|
|
7226
|
+
# Encapsulates the alert's configuration to monitor spend on pricing plan subscriptions.
|
|
7227
|
+
sig { returns(T.nilable(SpendThreshold)) }
|
|
7228
|
+
def spend_threshold; end
|
|
7112
7229
|
# Reactivates this alert, allowing it to trigger again.
|
|
7113
7230
|
sig {
|
|
7114
7231
|
params(params: T.any(::Stripe::Billing::AlertActivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::Billing::Alert)
|
|
@@ -23823,11 +23940,48 @@ module Stripe
|
|
|
23823
23940
|
end
|
|
23824
23941
|
end
|
|
23825
23942
|
class ScheduleDetails < ::Stripe::StripeObject
|
|
23826
|
-
|
|
23943
|
+
class ProrationDetails < ::Stripe::StripeObject
|
|
23944
|
+
class CreditedItems < ::Stripe::StripeObject
|
|
23945
|
+
# Invoice containing the credited invoice line items
|
|
23946
|
+
sig { returns(String) }
|
|
23947
|
+
def invoice; end
|
|
23948
|
+
# Credited invoice line items
|
|
23949
|
+
sig { returns(T::Array[String]) }
|
|
23950
|
+
def invoice_line_items; end
|
|
23951
|
+
def self.inner_class_types
|
|
23952
|
+
@inner_class_types = {}
|
|
23953
|
+
end
|
|
23954
|
+
def self.field_remappings
|
|
23955
|
+
@field_remappings = {}
|
|
23956
|
+
end
|
|
23957
|
+
end
|
|
23958
|
+
# For a credit proration `line_item`, the original debit line_items to which the credit proration applies.
|
|
23959
|
+
sig { returns(T.nilable(CreditedItems)) }
|
|
23960
|
+
def credited_items; end
|
|
23961
|
+
def self.inner_class_types
|
|
23962
|
+
@inner_class_types = {credited_items: CreditedItems}
|
|
23963
|
+
end
|
|
23964
|
+
def self.field_remappings
|
|
23965
|
+
@field_remappings = {}
|
|
23966
|
+
end
|
|
23967
|
+
end
|
|
23968
|
+
# The subscription schedule that generated this line item.
|
|
23827
23969
|
sig { returns(String) }
|
|
23828
23970
|
def schedule; end
|
|
23971
|
+
# The invoice item that generated this line item.
|
|
23972
|
+
sig { returns(T.nilable(String)) }
|
|
23973
|
+
def invoice_item; end
|
|
23974
|
+
# Whether this is a proration.
|
|
23975
|
+
sig { returns(T::Boolean) }
|
|
23976
|
+
def proration; end
|
|
23977
|
+
# Additional details for proration line items.
|
|
23978
|
+
sig { returns(T.nilable(ProrationDetails)) }
|
|
23979
|
+
def proration_details; end
|
|
23980
|
+
# The subscription that the schedule belongs to.
|
|
23981
|
+
sig { returns(T.nilable(String)) }
|
|
23982
|
+
def subscription; end
|
|
23829
23983
|
def self.inner_class_types
|
|
23830
|
-
@inner_class_types = {}
|
|
23984
|
+
@inner_class_types = {proration_details: ProrationDetails}
|
|
23831
23985
|
end
|
|
23832
23986
|
def self.field_remappings
|
|
23833
23987
|
@field_remappings = {}
|
|
@@ -39582,6 +39736,12 @@ module Stripe
|
|
|
39582
39736
|
# ID of the Dashboard-only CustomPaymentMethodType. Not expandable.
|
|
39583
39737
|
sig { returns(String) }
|
|
39584
39738
|
def type; end
|
|
39739
|
+
# A reference to an external payment method, such as a PayPal Billing Agreement ID.
|
|
39740
|
+
sig { returns(T.nilable(String)) }
|
|
39741
|
+
def payment_method_reference; end
|
|
39742
|
+
# Indicates whether the payment method supports off-session payments.
|
|
39743
|
+
sig { returns(T.nilable(String)) }
|
|
39744
|
+
def usage; end
|
|
39585
39745
|
def self.inner_class_types
|
|
39586
39746
|
@inner_class_types = {logo: Logo}
|
|
39587
39747
|
end
|
|
@@ -94122,6 +94282,126 @@ module Stripe
|
|
|
94122
94282
|
}
|
|
94123
94283
|
def initialize(filters: nil, lte: nil); end
|
|
94124
94284
|
end
|
|
94285
|
+
class SpendThreshold < ::Stripe::RequestParams
|
|
94286
|
+
class Filters < ::Stripe::RequestParams
|
|
94287
|
+
# Filter by billable item IDs. Maximum of 20 billable items.
|
|
94288
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
94289
|
+
def billable_items; end
|
|
94290
|
+
sig {
|
|
94291
|
+
params(_billable_items: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String]))
|
|
94292
|
+
}
|
|
94293
|
+
def billable_items=(_billable_items); end
|
|
94294
|
+
# Filter by billing cadence ID.
|
|
94295
|
+
sig { returns(T.nilable(String)) }
|
|
94296
|
+
def billing_cadence; end
|
|
94297
|
+
sig { params(_billing_cadence: T.nilable(String)).returns(T.nilable(String)) }
|
|
94298
|
+
def billing_cadence=(_billing_cadence); end
|
|
94299
|
+
# Filter by pricing plan ID.
|
|
94300
|
+
sig { returns(T.nilable(String)) }
|
|
94301
|
+
def pricing_plan; end
|
|
94302
|
+
sig { params(_pricing_plan: T.nilable(String)).returns(T.nilable(String)) }
|
|
94303
|
+
def pricing_plan=(_pricing_plan); end
|
|
94304
|
+
# Filter by pricing plan subscription ID.
|
|
94305
|
+
sig { returns(T.nilable(String)) }
|
|
94306
|
+
def pricing_plan_subscription; end
|
|
94307
|
+
sig { params(_pricing_plan_subscription: T.nilable(String)).returns(T.nilable(String)) }
|
|
94308
|
+
def pricing_plan_subscription=(_pricing_plan_subscription); end
|
|
94309
|
+
sig {
|
|
94310
|
+
params(billable_items: T.nilable(T::Array[String]), billing_cadence: T.nilable(String), pricing_plan: T.nilable(String), pricing_plan_subscription: T.nilable(String)).void
|
|
94311
|
+
}
|
|
94312
|
+
def initialize(
|
|
94313
|
+
billable_items: nil,
|
|
94314
|
+
billing_cadence: nil,
|
|
94315
|
+
pricing_plan: nil,
|
|
94316
|
+
pricing_plan_subscription: nil
|
|
94317
|
+
); end
|
|
94318
|
+
end
|
|
94319
|
+
class Gte < ::Stripe::RequestParams
|
|
94320
|
+
class Amount < ::Stripe::RequestParams
|
|
94321
|
+
# Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter.
|
|
94322
|
+
sig { returns(String) }
|
|
94323
|
+
def currency; end
|
|
94324
|
+
sig { params(_currency: String).returns(String) }
|
|
94325
|
+
def currency=(_currency); end
|
|
94326
|
+
# An integer representing the amount of the threshold.
|
|
94327
|
+
sig { returns(Integer) }
|
|
94328
|
+
def value; end
|
|
94329
|
+
sig { params(_value: Integer).returns(Integer) }
|
|
94330
|
+
def value=(_value); end
|
|
94331
|
+
sig { params(currency: String, value: Integer).void }
|
|
94332
|
+
def initialize(currency: nil, value: nil); end
|
|
94333
|
+
end
|
|
94334
|
+
class CustomPricingUnit < ::Stripe::RequestParams
|
|
94335
|
+
# The ID of the custom pricing unit.
|
|
94336
|
+
sig { returns(String) }
|
|
94337
|
+
def id; end
|
|
94338
|
+
sig { params(_id: String).returns(String) }
|
|
94339
|
+
def id=(_id); end
|
|
94340
|
+
# A positive decimal string representing the amount of the custom pricing unit threshold.
|
|
94341
|
+
sig { returns(String) }
|
|
94342
|
+
def value; end
|
|
94343
|
+
sig { params(_value: String).returns(String) }
|
|
94344
|
+
def value=(_value); end
|
|
94345
|
+
sig { params(id: String, value: String).void }
|
|
94346
|
+
def initialize(id: nil, value: nil); end
|
|
94347
|
+
end
|
|
94348
|
+
# The monetary amount. Required when type is `amount`.
|
|
94349
|
+
sig {
|
|
94350
|
+
returns(T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold::Gte::Amount))
|
|
94351
|
+
}
|
|
94352
|
+
def amount; end
|
|
94353
|
+
sig {
|
|
94354
|
+
params(_amount: T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold::Gte::Amount)).returns(T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold::Gte::Amount))
|
|
94355
|
+
}
|
|
94356
|
+
def amount=(_amount); end
|
|
94357
|
+
# The custom pricing unit amount. Required when type is `custom_pricing_unit`.
|
|
94358
|
+
sig {
|
|
94359
|
+
returns(T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold::Gte::CustomPricingUnit))
|
|
94360
|
+
}
|
|
94361
|
+
def custom_pricing_unit; end
|
|
94362
|
+
sig {
|
|
94363
|
+
params(_custom_pricing_unit: T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold::Gte::CustomPricingUnit)).returns(T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold::Gte::CustomPricingUnit))
|
|
94364
|
+
}
|
|
94365
|
+
def custom_pricing_unit=(_custom_pricing_unit); end
|
|
94366
|
+
# The type of the threshold amount.
|
|
94367
|
+
sig { returns(String) }
|
|
94368
|
+
def type; end
|
|
94369
|
+
sig { params(_type: String).returns(String) }
|
|
94370
|
+
def type=(_type); end
|
|
94371
|
+
sig {
|
|
94372
|
+
params(amount: T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold::Gte::Amount), custom_pricing_unit: T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold::Gte::CustomPricingUnit), type: String).void
|
|
94373
|
+
}
|
|
94374
|
+
def initialize(amount: nil, custom_pricing_unit: nil, type: nil); end
|
|
94375
|
+
end
|
|
94376
|
+
# Defines the period over which spend is aggregated.
|
|
94377
|
+
sig { returns(String) }
|
|
94378
|
+
def aggregation_period; end
|
|
94379
|
+
sig { params(_aggregation_period: String).returns(String) }
|
|
94380
|
+
def aggregation_period=(_aggregation_period); end
|
|
94381
|
+
# Filters to scope the spend calculation.
|
|
94382
|
+
sig { returns(T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold::Filters)) }
|
|
94383
|
+
def filters; end
|
|
94384
|
+
sig {
|
|
94385
|
+
params(_filters: T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold::Filters)).returns(T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold::Filters))
|
|
94386
|
+
}
|
|
94387
|
+
def filters=(_filters); end
|
|
94388
|
+
# Defines the granularity of spend aggregation. Defaults to `pricing_plan_subscription`.
|
|
94389
|
+
sig { returns(T.nilable(String)) }
|
|
94390
|
+
def group_by; end
|
|
94391
|
+
sig { params(_group_by: T.nilable(String)).returns(T.nilable(String)) }
|
|
94392
|
+
def group_by=(_group_by); end
|
|
94393
|
+
# Defines at which value the alert will fire.
|
|
94394
|
+
sig { returns(::Stripe::Billing::AlertCreateParams::SpendThreshold::Gte) }
|
|
94395
|
+
def gte; end
|
|
94396
|
+
sig {
|
|
94397
|
+
params(_gte: ::Stripe::Billing::AlertCreateParams::SpendThreshold::Gte).returns(::Stripe::Billing::AlertCreateParams::SpendThreshold::Gte)
|
|
94398
|
+
}
|
|
94399
|
+
def gte=(_gte); end
|
|
94400
|
+
sig {
|
|
94401
|
+
params(aggregation_period: String, filters: T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold::Filters), group_by: T.nilable(String), gte: ::Stripe::Billing::AlertCreateParams::SpendThreshold::Gte).void
|
|
94402
|
+
}
|
|
94403
|
+
def initialize(aggregation_period: nil, filters: nil, group_by: nil, gte: nil); end
|
|
94404
|
+
end
|
|
94125
94405
|
class UsageThreshold < ::Stripe::RequestParams
|
|
94126
94406
|
class Filter < ::Stripe::RequestParams
|
|
94127
94407
|
# Limit the scope to this usage alert only to this customer.
|
|
@@ -94195,15 +94475,23 @@ module Stripe
|
|
|
94195
94475
|
params(_usage_threshold: T.nilable(::Stripe::Billing::AlertCreateParams::UsageThreshold)).returns(T.nilable(::Stripe::Billing::AlertCreateParams::UsageThreshold))
|
|
94196
94476
|
}
|
|
94197
94477
|
def usage_threshold=(_usage_threshold); end
|
|
94478
|
+
# The configuration of the spend threshold.
|
|
94479
|
+
sig { returns(T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold)) }
|
|
94480
|
+
def spend_threshold; end
|
|
94198
94481
|
sig {
|
|
94199
|
-
params(
|
|
94482
|
+
params(_spend_threshold: T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold)).returns(T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold))
|
|
94483
|
+
}
|
|
94484
|
+
def spend_threshold=(_spend_threshold); end
|
|
94485
|
+
sig {
|
|
94486
|
+
params(alert_type: String, credit_balance_threshold: T.nilable(::Stripe::Billing::AlertCreateParams::CreditBalanceThreshold), expand: T.nilable(T::Array[String]), title: String, usage_threshold: T.nilable(::Stripe::Billing::AlertCreateParams::UsageThreshold), spend_threshold: T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold)).void
|
|
94200
94487
|
}
|
|
94201
94488
|
def initialize(
|
|
94202
94489
|
alert_type: nil,
|
|
94203
94490
|
credit_balance_threshold: nil,
|
|
94204
94491
|
expand: nil,
|
|
94205
94492
|
title: nil,
|
|
94206
|
-
usage_threshold: nil
|
|
94493
|
+
usage_threshold: nil,
|
|
94494
|
+
spend_threshold: nil
|
|
94207
94495
|
); end
|
|
94208
94496
|
end
|
|
94209
94497
|
end
|
|
@@ -173789,6 +174077,20 @@ module Stripe
|
|
|
173789
174077
|
}
|
|
173790
174078
|
def initialize(exp_month: nil, exp_year: nil, networks: nil); end
|
|
173791
174079
|
end
|
|
174080
|
+
class Custom < ::Stripe::RequestParams
|
|
174081
|
+
# A reference to an external payment method, such as a PayPal Billing Agreement ID.
|
|
174082
|
+
sig { returns(T.nilable(String)) }
|
|
174083
|
+
def payment_method_reference; end
|
|
174084
|
+
sig { params(_payment_method_reference: T.nilable(String)).returns(T.nilable(String)) }
|
|
174085
|
+
def payment_method_reference=(_payment_method_reference); end
|
|
174086
|
+
# Indicates whether the payment method supports off-session payments.
|
|
174087
|
+
sig { returns(T.nilable(String)) }
|
|
174088
|
+
def usage; end
|
|
174089
|
+
sig { params(_usage: T.nilable(String)).returns(T.nilable(String)) }
|
|
174090
|
+
def usage=(_usage); end
|
|
174091
|
+
sig { params(payment_method_reference: T.nilable(String), usage: T.nilable(String)).void }
|
|
174092
|
+
def initialize(payment_method_reference: nil, usage: nil); end
|
|
174093
|
+
end
|
|
173792
174094
|
class Payto < ::Stripe::RequestParams
|
|
173793
174095
|
# The account number for the bank account.
|
|
173794
174096
|
sig { returns(T.nilable(String)) }
|
|
@@ -173869,8 +174171,15 @@ module Stripe
|
|
|
173869
174171
|
params(_us_bank_account: T.nilable(::Stripe::PaymentMethodUpdateParams::UsBankAccount)).returns(T.nilable(::Stripe::PaymentMethodUpdateParams::UsBankAccount))
|
|
173870
174172
|
}
|
|
173871
174173
|
def us_bank_account=(_us_bank_account); end
|
|
174174
|
+
# If this is a `custom` PaymentMethod, this hash contains details about the Custom payment method.
|
|
174175
|
+
sig { returns(T.nilable(::Stripe::PaymentMethodUpdateParams::Custom)) }
|
|
174176
|
+
def custom; end
|
|
174177
|
+
sig {
|
|
174178
|
+
params(_custom: T.nilable(::Stripe::PaymentMethodUpdateParams::Custom)).returns(T.nilable(::Stripe::PaymentMethodUpdateParams::Custom))
|
|
174179
|
+
}
|
|
174180
|
+
def custom=(_custom); end
|
|
173872
174181
|
sig {
|
|
173873
|
-
params(allow_redisplay: T.nilable(String), billing_details: T.nilable(::Stripe::PaymentMethodUpdateParams::BillingDetails), card: T.nilable(::Stripe::PaymentMethodUpdateParams::Card), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.any(String, T::Hash[String, String])), payto: T.nilable(::Stripe::PaymentMethodUpdateParams::Payto), us_bank_account: T.nilable(::Stripe::PaymentMethodUpdateParams::UsBankAccount)).void
|
|
174182
|
+
params(allow_redisplay: T.nilable(String), billing_details: T.nilable(::Stripe::PaymentMethodUpdateParams::BillingDetails), card: T.nilable(::Stripe::PaymentMethodUpdateParams::Card), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.any(String, T::Hash[String, String])), payto: T.nilable(::Stripe::PaymentMethodUpdateParams::Payto), us_bank_account: T.nilable(::Stripe::PaymentMethodUpdateParams::UsBankAccount), custom: T.nilable(::Stripe::PaymentMethodUpdateParams::Custom)).void
|
|
173874
174183
|
}
|
|
173875
174184
|
def initialize(
|
|
173876
174185
|
allow_redisplay: nil,
|
|
@@ -173879,7 +174188,8 @@ module Stripe
|
|
|
173879
174188
|
expand: nil,
|
|
173880
174189
|
metadata: nil,
|
|
173881
174190
|
payto: nil,
|
|
173882
|
-
us_bank_account: nil
|
|
174191
|
+
us_bank_account: nil,
|
|
174192
|
+
custom: nil
|
|
173883
174193
|
); end
|
|
173884
174194
|
end
|
|
173885
174195
|
end
|
|
@@ -200918,20 +201228,44 @@ end
|
|
|
200918
201228
|
module Stripe
|
|
200919
201229
|
class SubscriptionPauseParams < ::Stripe::RequestParams
|
|
200920
201230
|
class BillFor < ::Stripe::RequestParams
|
|
200921
|
-
|
|
200922
|
-
|
|
200923
|
-
|
|
200924
|
-
|
|
200925
|
-
|
|
200926
|
-
|
|
200927
|
-
|
|
200928
|
-
|
|
200929
|
-
|
|
200930
|
-
|
|
201231
|
+
class OutstandingUsageThrough < ::Stripe::RequestParams
|
|
201232
|
+
# When to bill metered usage in the current period.
|
|
201233
|
+
sig { returns(String) }
|
|
201234
|
+
def type; end
|
|
201235
|
+
sig { params(_type: String).returns(String) }
|
|
201236
|
+
def type=(_type); end
|
|
201237
|
+
sig { params(type: String).void }
|
|
201238
|
+
def initialize(type: nil); end
|
|
201239
|
+
end
|
|
201240
|
+
class UnusedTimeFrom < ::Stripe::RequestParams
|
|
201241
|
+
# When to credit for unused time.
|
|
201242
|
+
sig { returns(String) }
|
|
201243
|
+
def type; end
|
|
201244
|
+
sig { params(_type: String).returns(String) }
|
|
201245
|
+
def type=(_type); end
|
|
201246
|
+
sig { params(type: String).void }
|
|
201247
|
+
def initialize(type: nil); end
|
|
201248
|
+
end
|
|
201249
|
+
# Controls when to bill for metered usage in the current period. Defaults to `{ type: "now" }`.
|
|
201250
|
+
sig {
|
|
201251
|
+
returns(T.nilable(::Stripe::SubscriptionPauseParams::BillFor::OutstandingUsageThrough))
|
|
201252
|
+
}
|
|
201253
|
+
def outstanding_usage_through; end
|
|
201254
|
+
sig {
|
|
201255
|
+
params(_outstanding_usage_through: T.nilable(::Stripe::SubscriptionPauseParams::BillFor::OutstandingUsageThrough)).returns(T.nilable(::Stripe::SubscriptionPauseParams::BillFor::OutstandingUsageThrough))
|
|
201256
|
+
}
|
|
201257
|
+
def outstanding_usage_through=(_outstanding_usage_through); end
|
|
201258
|
+
# Controls when to credit for unused time on licensed items. Defaults to `{ type: "now" }`.
|
|
201259
|
+
sig { returns(T.nilable(::Stripe::SubscriptionPauseParams::BillFor::UnusedTimeFrom)) }
|
|
201260
|
+
def unused_time_from; end
|
|
200931
201261
|
sig {
|
|
200932
|
-
params(
|
|
201262
|
+
params(_unused_time_from: T.nilable(::Stripe::SubscriptionPauseParams::BillFor::UnusedTimeFrom)).returns(T.nilable(::Stripe::SubscriptionPauseParams::BillFor::UnusedTimeFrom))
|
|
200933
201263
|
}
|
|
200934
|
-
def
|
|
201264
|
+
def unused_time_from=(_unused_time_from); end
|
|
201265
|
+
sig {
|
|
201266
|
+
params(outstanding_usage_through: T.nilable(::Stripe::SubscriptionPauseParams::BillFor::OutstandingUsageThrough), unused_time_from: T.nilable(::Stripe::SubscriptionPauseParams::BillFor::UnusedTimeFrom)).void
|
|
201267
|
+
}
|
|
201268
|
+
def initialize(outstanding_usage_through: nil, unused_time_from: nil); end
|
|
200935
201269
|
end
|
|
200936
201270
|
# Controls what to bill for when pausing the subscription.
|
|
200937
201271
|
sig { returns(T.nilable(::Stripe::SubscriptionPauseParams::BillFor)) }
|
|
@@ -200984,20 +201318,14 @@ module Stripe
|
|
|
200984
201318
|
def proration_date; end
|
|
200985
201319
|
sig { params(_proration_date: T.nilable(Integer)).returns(T.nilable(Integer)) }
|
|
200986
201320
|
def proration_date=(_proration_date); end
|
|
200987
|
-
# Controls when the subscription transitions from `paused` to `active`. Determines how payment on the invoice affects the resumption process.The default is `pending_if_incomplete`.
|
|
200988
|
-
sig { returns(T.nilable(String)) }
|
|
200989
|
-
def payment_behavior; end
|
|
200990
|
-
sig { params(_payment_behavior: T.nilable(String)).returns(T.nilable(String)) }
|
|
200991
|
-
def payment_behavior=(_payment_behavior); end
|
|
200992
201321
|
sig {
|
|
200993
|
-
params(billing_cycle_anchor: T.nilable(String), expand: T.nilable(T::Array[String]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer)
|
|
201322
|
+
params(billing_cycle_anchor: T.nilable(String), expand: T.nilable(T::Array[String]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer)).void
|
|
200994
201323
|
}
|
|
200995
201324
|
def initialize(
|
|
200996
201325
|
billing_cycle_anchor: nil,
|
|
200997
201326
|
expand: nil,
|
|
200998
201327
|
proration_behavior: nil,
|
|
200999
|
-
proration_date: nil
|
|
201000
|
-
payment_behavior: nil
|
|
201328
|
+
proration_date: nil
|
|
201001
201329
|
); end
|
|
201002
201330
|
end
|
|
201003
201331
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: stripe
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 18.4.0.pre.alpha.
|
|
4
|
+
version: 18.4.0.pre.alpha.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stripe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Stripe is the easiest way to accept payments online. See https://stripe.com
|
|
14
14
|
for details.
|