stripe 19.4.0.pre.alpha.2 → 19.4.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/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/event_types.rb +15 -0
- data/lib/stripe/events/v2_billing_contract_activated_event.rb +44 -0
- data/lib/stripe/events/v2_billing_contract_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_billing_contract_created_event.rb +44 -0
- data/lib/stripe/events/v2_billing_contract_ended_event.rb +44 -0
- data/lib/stripe/events/v2_billing_contract_updated_event.rb +44 -0
- data/lib/stripe/params/capital/financing_transaction_list_params.rb +2 -2
- data/lib/stripe/params/checkout/session_create_params.rb +1 -1
- data/lib/stripe/params/invoice_create_preview_params.rb +1 -1
- data/lib/stripe/params/payment_intent_confirm_params.rb +10 -1
- data/lib/stripe/params/payment_intent_create_params.rb +10 -1
- data/lib/stripe/params/payment_intent_update_params.rb +10 -1
- data/lib/stripe/params/promotion_code_create_params.rb +1 -1
- data/lib/stripe/params/promotion_code_update_params.rb +1 -1
- data/lib/stripe/params/subscription_schedule_create_params.rb +2 -2
- data/lib/stripe/params/subscription_schedule_list_params.rb +1 -1
- data/lib/stripe/params/subscription_schedule_update_params.rb +2 -2
- data/lib/stripe/params/terminal/reader_activate_gift_card_params.rb +35 -0
- data/lib/stripe/params/terminal/reader_cashout_gift_card_params.rb +21 -0
- data/lib/stripe/params/terminal/reader_check_gift_card_balance_params.rb +21 -0
- data/lib/stripe/params/terminal/reader_collect_payment_method_params.rb +4 -0
- data/lib/stripe/params/terminal/reader_process_payment_intent_params.rb +4 -0
- data/lib/stripe/params/terminal/reader_reload_gift_card_params.rb +27 -0
- data/lib/stripe/params/v2/billing/contract_cancel_params.rb +1 -1
- data/lib/stripe/params/v2/billing/contract_create_params.rb +13 -175
- data/lib/stripe/params/v2/billing/contract_list_params.rb +1 -1
- data/lib/stripe/params/v2/billing/contract_update_params.rb +48 -495
- data/lib/stripe/params/v2/core/account_list_params.rb +9 -1
- data/lib/stripe/params/v2/data/analytics/metric_query_create_params.rb +2 -2
- data/lib/stripe/params.rb +8 -0
- data/lib/stripe/resources/account.rb +55 -3
- data/lib/stripe/resources/bank_account.rb +2 -2
- data/lib/stripe/resources/billing/alert_recovered.rb +17 -1
- data/lib/stripe/resources/capability.rb +2 -2
- data/lib/stripe/resources/capital/financing_transaction.rb +1 -1
- data/lib/stripe/resources/charge.rb +1 -1
- data/lib/stripe/resources/checkout/session.rb +21 -3
- data/lib/stripe/resources/confirmation_token.rb +1 -1
- data/lib/stripe/resources/dispute.rb +4 -2
- data/lib/stripe/resources/financial_connections/session.rb +2 -0
- data/lib/stripe/resources/invoice.rb +3 -0
- data/lib/stripe/resources/issuing/authorization.rb +52 -1
- data/lib/stripe/resources/issuing/transaction.rb +47 -1
- data/lib/stripe/resources/payment_attempt_record.rb +2 -2
- data/lib/stripe/resources/payment_intent.rb +28 -0
- data/lib/stripe/resources/payment_method.rb +1 -1
- data/lib/stripe/resources/payment_record.rb +2 -2
- data/lib/stripe/resources/person.rb +2 -2
- data/lib/stripe/resources/quote.rb +22 -1
- data/lib/stripe/resources/quote_preview_invoice.rb +3 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +44 -2
- data/lib/stripe/resources/setup_attempt.rb +16 -0
- data/lib/stripe/resources/setup_intent.rb +3 -0
- data/lib/stripe/resources/shared_payment/granted_token.rb +1 -1
- data/lib/stripe/resources/subscription_schedule.rb +44 -2
- data/lib/stripe/resources/tax/registration.rb +32 -0
- data/lib/stripe/resources/terminal/reader.rb +173 -0
- data/lib/stripe/resources/v2/billing/contract.rb +47 -330
- data/lib/stripe/resources/v2/billing/contract_pricing_line_quantity_change.rb +2 -2
- data/lib/stripe/resources/v2/core/account.rb +18 -0
- data/lib/stripe/resources/v2/money_management/payout_method.rb +16 -0
- data/lib/stripe/resources/v2/money_management/received_credit.rb +30 -0
- data/lib/stripe/resources.rb +15 -0
- data/lib/stripe/services/account_service.rb +1 -1
- data/lib/stripe/services/dispute_service.rb +1 -1
- data/lib/stripe/services/terminal/reader_service.rb +44 -0
- data/lib/stripe/services/v2/billing/contract_service.rb +7 -7
- data/lib/stripe/stripe_event_notification_handler.rb +30 -0
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe.rbi +1039 -1148
- metadata +11 -2
|
@@ -8,7 +8,7 @@ module Stripe
|
|
|
8
8
|
class PricingLineAction < ::Stripe::RequestParams
|
|
9
9
|
class Add < ::Stripe::RequestParams
|
|
10
10
|
class EndsAt < ::Stripe::RequestParams
|
|
11
|
-
# The timestamp when the
|
|
11
|
+
# The timestamp when the pricing ends.
|
|
12
12
|
attr_accessor :timestamp
|
|
13
13
|
# The type of end time to apply.
|
|
14
14
|
attr_accessor :type
|
|
@@ -35,53 +35,12 @@ module Stripe
|
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
class OverwritePrice < ::Stripe::RequestParams
|
|
38
|
-
class Tier < ::Stripe::RequestParams
|
|
39
|
-
# Price for the entire tier, represented as a decimal string in minor currency units.
|
|
40
|
-
attr_accessor :flat_amount
|
|
41
|
-
# Per-unit price for units included in this tier, represented as a decimal string in minor currency units.
|
|
42
|
-
attr_accessor :unit_amount
|
|
43
|
-
# Up to and including this quantity will be contained in the tier.
|
|
44
|
-
attr_accessor :up_to_decimal
|
|
45
|
-
# No upper bound to this tier.
|
|
46
|
-
attr_accessor :up_to_inf
|
|
47
|
-
|
|
48
|
-
def initialize(
|
|
49
|
-
flat_amount: nil,
|
|
50
|
-
unit_amount: nil,
|
|
51
|
-
up_to_decimal: nil,
|
|
52
|
-
up_to_inf: nil
|
|
53
|
-
)
|
|
54
|
-
@flat_amount = flat_amount
|
|
55
|
-
@unit_amount = unit_amount
|
|
56
|
-
@up_to_decimal = up_to_decimal
|
|
57
|
-
@up_to_inf = up_to_inf
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
def self.field_encodings
|
|
61
|
-
@field_encodings = { up_to_decimal: :decimal_string }
|
|
62
|
-
end
|
|
63
|
-
end
|
|
64
|
-
# Defines whether the tiered price should be graduated or volume-based.
|
|
65
|
-
attr_accessor :tiering_mode
|
|
66
|
-
# Each element represents a pricing tier.
|
|
67
|
-
attr_accessor :tiers
|
|
68
38
|
# The per-unit amount to be charged, represented as a decimal string in minor currency units.
|
|
69
39
|
attr_accessor :unit_amount
|
|
70
40
|
|
|
71
|
-
def initialize(
|
|
72
|
-
@tiering_mode = tiering_mode
|
|
73
|
-
@tiers = tiers
|
|
41
|
+
def initialize(unit_amount: nil)
|
|
74
42
|
@unit_amount = unit_amount
|
|
75
43
|
end
|
|
76
|
-
|
|
77
|
-
def self.field_encodings
|
|
78
|
-
@field_encodings = {
|
|
79
|
-
tiers: {
|
|
80
|
-
kind: :array,
|
|
81
|
-
element: { kind: :object, fields: { up_to_decimal: :decimal_string } },
|
|
82
|
-
},
|
|
83
|
-
}
|
|
84
|
-
end
|
|
85
44
|
end
|
|
86
45
|
|
|
87
46
|
class StartsAt < ::Stripe::RequestParams
|
|
@@ -107,7 +66,7 @@ module Stripe
|
|
|
107
66
|
attr_accessor :priority
|
|
108
67
|
# When the override starts. Defaults to the pricing line's start if not specified.
|
|
109
68
|
attr_accessor :starts_at
|
|
110
|
-
# The type of override.
|
|
69
|
+
# The type of override.
|
|
111
70
|
attr_accessor :type
|
|
112
71
|
|
|
113
72
|
def initialize(
|
|
@@ -127,20 +86,6 @@ module Stripe
|
|
|
127
86
|
@starts_at = starts_at
|
|
128
87
|
@type = type
|
|
129
88
|
end
|
|
130
|
-
|
|
131
|
-
def self.field_encodings
|
|
132
|
-
@field_encodings = {
|
|
133
|
-
overwrite_price: {
|
|
134
|
-
kind: :object,
|
|
135
|
-
fields: {
|
|
136
|
-
tiers: {
|
|
137
|
-
kind: :array,
|
|
138
|
-
element: { kind: :object, fields: { up_to_decimal: :decimal_string } },
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
}
|
|
143
|
-
end
|
|
144
89
|
end
|
|
145
90
|
|
|
146
91
|
class QuantityChange < ::Stripe::RequestParams
|
|
@@ -169,12 +114,12 @@ module Stripe
|
|
|
169
114
|
@field_encodings = { set: :decimal_string }
|
|
170
115
|
end
|
|
171
116
|
end
|
|
172
|
-
# The
|
|
117
|
+
# The id of the price.
|
|
173
118
|
attr_accessor :price
|
|
174
119
|
# Pricing overrides embedded directly on this pricing line.
|
|
175
120
|
attr_accessor :pricing_overrides
|
|
176
121
|
# Quantity changes for the pricing line. For now, at most one entry is allowed.
|
|
177
|
-
# A quantity change clears all future quantity changes on this pricing line.
|
|
122
|
+
# A quantity change clears all future quantity changes on this pricing line. Defaults to 1.
|
|
178
123
|
attr_accessor :quantity_changes
|
|
179
124
|
|
|
180
125
|
def initialize(price: nil, pricing_overrides: nil, quantity_changes: nil)
|
|
@@ -185,23 +130,6 @@ module Stripe
|
|
|
185
130
|
|
|
186
131
|
def self.field_encodings
|
|
187
132
|
@field_encodings = {
|
|
188
|
-
pricing_overrides: {
|
|
189
|
-
kind: :array,
|
|
190
|
-
element: {
|
|
191
|
-
kind: :object,
|
|
192
|
-
fields: {
|
|
193
|
-
overwrite_price: {
|
|
194
|
-
kind: :object,
|
|
195
|
-
fields: {
|
|
196
|
-
tiers: {
|
|
197
|
-
kind: :array,
|
|
198
|
-
element: { kind: :object, fields: { up_to_decimal: :decimal_string } },
|
|
199
|
-
},
|
|
200
|
-
},
|
|
201
|
-
},
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
},
|
|
205
133
|
quantity_changes: {
|
|
206
134
|
kind: :array,
|
|
207
135
|
element: { kind: :object, fields: { set: :decimal_string } },
|
|
@@ -224,26 +152,6 @@ module Stripe
|
|
|
224
152
|
price_details: {
|
|
225
153
|
kind: :object,
|
|
226
154
|
fields: {
|
|
227
|
-
pricing_overrides: {
|
|
228
|
-
kind: :array,
|
|
229
|
-
element: {
|
|
230
|
-
kind: :object,
|
|
231
|
-
fields: {
|
|
232
|
-
overwrite_price: {
|
|
233
|
-
kind: :object,
|
|
234
|
-
fields: {
|
|
235
|
-
tiers: {
|
|
236
|
-
kind: :array,
|
|
237
|
-
element: {
|
|
238
|
-
kind: :object,
|
|
239
|
-
fields: { up_to_decimal: :decimal_string },
|
|
240
|
-
},
|
|
241
|
-
},
|
|
242
|
-
},
|
|
243
|
-
},
|
|
244
|
-
},
|
|
245
|
-
},
|
|
246
|
-
},
|
|
247
155
|
quantity_changes: {
|
|
248
156
|
kind: :array,
|
|
249
157
|
element: { kind: :object, fields: { set: :decimal_string } },
|
|
@@ -255,7 +163,7 @@ module Stripe
|
|
|
255
163
|
end
|
|
256
164
|
|
|
257
165
|
class StartsAt < ::Stripe::RequestParams
|
|
258
|
-
# The timestamp when the
|
|
166
|
+
# The timestamp when the pricing starts.
|
|
259
167
|
attr_accessor :timestamp
|
|
260
168
|
# The type of start time to apply.
|
|
261
169
|
attr_accessor :type
|
|
@@ -298,26 +206,6 @@ module Stripe
|
|
|
298
206
|
price_details: {
|
|
299
207
|
kind: :object,
|
|
300
208
|
fields: {
|
|
301
|
-
pricing_overrides: {
|
|
302
|
-
kind: :array,
|
|
303
|
-
element: {
|
|
304
|
-
kind: :object,
|
|
305
|
-
fields: {
|
|
306
|
-
overwrite_price: {
|
|
307
|
-
kind: :object,
|
|
308
|
-
fields: {
|
|
309
|
-
tiers: {
|
|
310
|
-
kind: :array,
|
|
311
|
-
element: {
|
|
312
|
-
kind: :object,
|
|
313
|
-
fields: { up_to_decimal: :decimal_string },
|
|
314
|
-
},
|
|
315
|
-
},
|
|
316
|
-
},
|
|
317
|
-
},
|
|
318
|
-
},
|
|
319
|
-
},
|
|
320
|
-
},
|
|
321
209
|
quantity_changes: {
|
|
322
210
|
kind: :array,
|
|
323
211
|
element: { kind: :object, fields: { set: :decimal_string } },
|
|
@@ -331,7 +219,7 @@ module Stripe
|
|
|
331
219
|
end
|
|
332
220
|
|
|
333
221
|
class Remove < ::Stripe::RequestParams
|
|
334
|
-
# The
|
|
222
|
+
# The id of the pricing line to remove.
|
|
335
223
|
attr_accessor :id
|
|
336
224
|
|
|
337
225
|
def initialize(id: nil)
|
|
@@ -341,7 +229,7 @@ module Stripe
|
|
|
341
229
|
|
|
342
230
|
class Update < ::Stripe::RequestParams
|
|
343
231
|
class EndsAt < ::Stripe::RequestParams
|
|
344
|
-
# The timestamp when the
|
|
232
|
+
# The timestamp when the pricing ends.
|
|
345
233
|
attr_accessor :timestamp
|
|
346
234
|
# The type of end time to apply.
|
|
347
235
|
attr_accessor :type
|
|
@@ -357,7 +245,7 @@ module Stripe
|
|
|
357
245
|
class PricingOverrideAction < ::Stripe::RequestParams
|
|
358
246
|
class Add < ::Stripe::RequestParams
|
|
359
247
|
class EndsAt < ::Stripe::RequestParams
|
|
360
|
-
# The timestamp when the
|
|
248
|
+
# The timestamp when the pricing ends.
|
|
361
249
|
attr_accessor :timestamp
|
|
362
250
|
# The type of end time to apply.
|
|
363
251
|
attr_accessor :type
|
|
@@ -369,57 +257,16 @@ module Stripe
|
|
|
369
257
|
end
|
|
370
258
|
|
|
371
259
|
class OverwritePrice < ::Stripe::RequestParams
|
|
372
|
-
class Tier < ::Stripe::RequestParams
|
|
373
|
-
# Price for the entire tier, represented as a decimal string in minor currency units.
|
|
374
|
-
attr_accessor :flat_amount
|
|
375
|
-
# Per-unit price for units included in this tier, represented as a decimal string in minor currency units.
|
|
376
|
-
attr_accessor :unit_amount
|
|
377
|
-
# Up to and including this quantity will be contained in the tier.
|
|
378
|
-
attr_accessor :up_to_decimal
|
|
379
|
-
# No upper bound to this tier.
|
|
380
|
-
attr_accessor :up_to_inf
|
|
381
|
-
|
|
382
|
-
def initialize(
|
|
383
|
-
flat_amount: nil,
|
|
384
|
-
unit_amount: nil,
|
|
385
|
-
up_to_decimal: nil,
|
|
386
|
-
up_to_inf: nil
|
|
387
|
-
)
|
|
388
|
-
@flat_amount = flat_amount
|
|
389
|
-
@unit_amount = unit_amount
|
|
390
|
-
@up_to_decimal = up_to_decimal
|
|
391
|
-
@up_to_inf = up_to_inf
|
|
392
|
-
end
|
|
393
|
-
|
|
394
|
-
def self.field_encodings
|
|
395
|
-
@field_encodings = { up_to_decimal: :decimal_string }
|
|
396
|
-
end
|
|
397
|
-
end
|
|
398
|
-
# Defines whether the tiered price should be graduated or volume-based.
|
|
399
|
-
attr_accessor :tiering_mode
|
|
400
|
-
# Each element represents a pricing tier.
|
|
401
|
-
attr_accessor :tiers
|
|
402
260
|
# The per-unit amount to be charged, represented as a decimal string in minor currency units.
|
|
403
261
|
attr_accessor :unit_amount
|
|
404
262
|
|
|
405
|
-
def initialize(
|
|
406
|
-
@tiering_mode = tiering_mode
|
|
407
|
-
@tiers = tiers
|
|
263
|
+
def initialize(unit_amount: nil)
|
|
408
264
|
@unit_amount = unit_amount
|
|
409
265
|
end
|
|
410
|
-
|
|
411
|
-
def self.field_encodings
|
|
412
|
-
@field_encodings = {
|
|
413
|
-
tiers: {
|
|
414
|
-
kind: :array,
|
|
415
|
-
element: { kind: :object, fields: { up_to_decimal: :decimal_string } },
|
|
416
|
-
},
|
|
417
|
-
}
|
|
418
|
-
end
|
|
419
266
|
end
|
|
420
267
|
|
|
421
268
|
class StartsAt < ::Stripe::RequestParams
|
|
422
|
-
# The timestamp when the
|
|
269
|
+
# The timestamp when the pricing starts.
|
|
423
270
|
attr_accessor :timestamp
|
|
424
271
|
# The type of start time to apply.
|
|
425
272
|
attr_accessor :type
|
|
@@ -433,7 +280,7 @@ module Stripe
|
|
|
433
280
|
attr_accessor :ends_at
|
|
434
281
|
# A lookup key for the override.
|
|
435
282
|
attr_accessor :lookup_key
|
|
436
|
-
#
|
|
283
|
+
# Metadata for the pricing override.
|
|
437
284
|
attr_accessor :metadata
|
|
438
285
|
# Parameters for an overwrite_price override. Required if `type` is `overwrite_price`.
|
|
439
286
|
attr_accessor :overwrite_price
|
|
@@ -461,26 +308,12 @@ module Stripe
|
|
|
461
308
|
@starts_at = starts_at
|
|
462
309
|
@type = type
|
|
463
310
|
end
|
|
464
|
-
|
|
465
|
-
def self.field_encodings
|
|
466
|
-
@field_encodings = {
|
|
467
|
-
overwrite_price: {
|
|
468
|
-
kind: :object,
|
|
469
|
-
fields: {
|
|
470
|
-
tiers: {
|
|
471
|
-
kind: :array,
|
|
472
|
-
element: { kind: :object, fields: { up_to_decimal: :decimal_string } },
|
|
473
|
-
},
|
|
474
|
-
},
|
|
475
|
-
},
|
|
476
|
-
}
|
|
477
|
-
end
|
|
478
311
|
end
|
|
479
312
|
|
|
480
313
|
class Remove < ::Stripe::RequestParams
|
|
481
|
-
# The
|
|
314
|
+
# The id of the pricing override to remove.
|
|
482
315
|
attr_accessor :id
|
|
483
|
-
#
|
|
316
|
+
# Lookup key of the override to remove.
|
|
484
317
|
attr_accessor :lookup_key
|
|
485
318
|
|
|
486
319
|
def initialize(id: nil, lookup_key: nil)
|
|
@@ -491,7 +324,7 @@ module Stripe
|
|
|
491
324
|
|
|
492
325
|
class Update < ::Stripe::RequestParams
|
|
493
326
|
class EndsAt < ::Stripe::RequestParams
|
|
494
|
-
# The timestamp when the
|
|
327
|
+
# The timestamp when the pricing ends.
|
|
495
328
|
attr_accessor :timestamp
|
|
496
329
|
# The type of end time to apply.
|
|
497
330
|
attr_accessor :type
|
|
@@ -503,7 +336,7 @@ module Stripe
|
|
|
503
336
|
end
|
|
504
337
|
|
|
505
338
|
class StartsAt < ::Stripe::RequestParams
|
|
506
|
-
# The timestamp when the
|
|
339
|
+
# The timestamp when the pricing starts.
|
|
507
340
|
attr_accessor :timestamp
|
|
508
341
|
# The type of start time to apply.
|
|
509
342
|
attr_accessor :type
|
|
@@ -513,15 +346,15 @@ module Stripe
|
|
|
513
346
|
@type = type
|
|
514
347
|
end
|
|
515
348
|
end
|
|
516
|
-
#
|
|
349
|
+
# Updated end time.
|
|
517
350
|
attr_accessor :ends_at
|
|
518
|
-
# The
|
|
351
|
+
# The id of the pricing override to update.
|
|
519
352
|
attr_accessor :id
|
|
520
|
-
#
|
|
353
|
+
# Updated lookup key.
|
|
521
354
|
attr_accessor :lookup_key
|
|
522
|
-
#
|
|
355
|
+
# Metadata for the pricing override.
|
|
523
356
|
attr_accessor :metadata
|
|
524
|
-
#
|
|
357
|
+
# Updated start time.
|
|
525
358
|
attr_accessor :starts_at
|
|
526
359
|
|
|
527
360
|
def initialize(
|
|
@@ -538,13 +371,13 @@ module Stripe
|
|
|
538
371
|
@starts_at = starts_at
|
|
539
372
|
end
|
|
540
373
|
end
|
|
541
|
-
#
|
|
374
|
+
# Add a pricing line override.
|
|
542
375
|
attr_accessor :add
|
|
543
|
-
#
|
|
376
|
+
# Remove a pricing line override.
|
|
544
377
|
attr_accessor :remove
|
|
545
378
|
# The type of pricing line override action.
|
|
546
379
|
attr_accessor :type
|
|
547
|
-
#
|
|
380
|
+
# Update a pricing line override.
|
|
548
381
|
attr_accessor :update
|
|
549
382
|
|
|
550
383
|
def initialize(add: nil, remove: nil, type: nil, update: nil)
|
|
@@ -553,25 +386,6 @@ module Stripe
|
|
|
553
386
|
@type = type
|
|
554
387
|
@update = update
|
|
555
388
|
end
|
|
556
|
-
|
|
557
|
-
def self.field_encodings
|
|
558
|
-
@field_encodings = {
|
|
559
|
-
add: {
|
|
560
|
-
kind: :object,
|
|
561
|
-
fields: {
|
|
562
|
-
overwrite_price: {
|
|
563
|
-
kind: :object,
|
|
564
|
-
fields: {
|
|
565
|
-
tiers: {
|
|
566
|
-
kind: :array,
|
|
567
|
-
element: { kind: :object, fields: { up_to_decimal: :decimal_string } },
|
|
568
|
-
},
|
|
569
|
-
},
|
|
570
|
-
},
|
|
571
|
-
},
|
|
572
|
-
},
|
|
573
|
-
}
|
|
574
|
-
end
|
|
575
389
|
end
|
|
576
390
|
|
|
577
391
|
class QuantityChange < ::Stripe::RequestParams
|
|
@@ -612,31 +426,6 @@ module Stripe
|
|
|
612
426
|
|
|
613
427
|
def self.field_encodings
|
|
614
428
|
@field_encodings = {
|
|
615
|
-
pricing_override_actions: {
|
|
616
|
-
kind: :array,
|
|
617
|
-
element: {
|
|
618
|
-
kind: :object,
|
|
619
|
-
fields: {
|
|
620
|
-
add: {
|
|
621
|
-
kind: :object,
|
|
622
|
-
fields: {
|
|
623
|
-
overwrite_price: {
|
|
624
|
-
kind: :object,
|
|
625
|
-
fields: {
|
|
626
|
-
tiers: {
|
|
627
|
-
kind: :array,
|
|
628
|
-
element: {
|
|
629
|
-
kind: :object,
|
|
630
|
-
fields: { up_to_decimal: :decimal_string },
|
|
631
|
-
},
|
|
632
|
-
},
|
|
633
|
-
},
|
|
634
|
-
},
|
|
635
|
-
},
|
|
636
|
-
},
|
|
637
|
-
},
|
|
638
|
-
},
|
|
639
|
-
},
|
|
640
429
|
quantity_changes: {
|
|
641
430
|
kind: :array,
|
|
642
431
|
element: { kind: :object, fields: { set: :decimal_string } },
|
|
@@ -656,31 +445,6 @@ module Stripe
|
|
|
656
445
|
price_details: {
|
|
657
446
|
kind: :object,
|
|
658
447
|
fields: {
|
|
659
|
-
pricing_override_actions: {
|
|
660
|
-
kind: :array,
|
|
661
|
-
element: {
|
|
662
|
-
kind: :object,
|
|
663
|
-
fields: {
|
|
664
|
-
add: {
|
|
665
|
-
kind: :object,
|
|
666
|
-
fields: {
|
|
667
|
-
overwrite_price: {
|
|
668
|
-
kind: :object,
|
|
669
|
-
fields: {
|
|
670
|
-
tiers: {
|
|
671
|
-
kind: :array,
|
|
672
|
-
element: {
|
|
673
|
-
kind: :object,
|
|
674
|
-
fields: { up_to_decimal: :decimal_string },
|
|
675
|
-
},
|
|
676
|
-
},
|
|
677
|
-
},
|
|
678
|
-
},
|
|
679
|
-
},
|
|
680
|
-
},
|
|
681
|
-
},
|
|
682
|
-
},
|
|
683
|
-
},
|
|
684
448
|
quantity_changes: {
|
|
685
449
|
kind: :array,
|
|
686
450
|
element: { kind: :object, fields: { set: :decimal_string } },
|
|
@@ -692,7 +456,7 @@ module Stripe
|
|
|
692
456
|
end
|
|
693
457
|
|
|
694
458
|
class StartsAt < ::Stripe::RequestParams
|
|
695
|
-
# The timestamp when the
|
|
459
|
+
# The timestamp when the pricing starts.
|
|
696
460
|
attr_accessor :timestamp
|
|
697
461
|
# The type of start time to apply.
|
|
698
462
|
attr_accessor :type
|
|
@@ -702,13 +466,13 @@ module Stripe
|
|
|
702
466
|
@type = type
|
|
703
467
|
end
|
|
704
468
|
end
|
|
705
|
-
#
|
|
469
|
+
# Updated end time.
|
|
706
470
|
attr_accessor :ends_at
|
|
707
|
-
# The
|
|
471
|
+
# The id of the pricing line.
|
|
708
472
|
attr_accessor :id
|
|
709
|
-
#
|
|
473
|
+
# Updated pricing configuration.
|
|
710
474
|
attr_accessor :pricing
|
|
711
|
-
#
|
|
475
|
+
# Updated start time.
|
|
712
476
|
attr_accessor :starts_at
|
|
713
477
|
|
|
714
478
|
def initialize(ends_at: nil, id: nil, pricing: nil, starts_at: nil)
|
|
@@ -726,31 +490,6 @@ module Stripe
|
|
|
726
490
|
price_details: {
|
|
727
491
|
kind: :object,
|
|
728
492
|
fields: {
|
|
729
|
-
pricing_override_actions: {
|
|
730
|
-
kind: :array,
|
|
731
|
-
element: {
|
|
732
|
-
kind: :object,
|
|
733
|
-
fields: {
|
|
734
|
-
add: {
|
|
735
|
-
kind: :object,
|
|
736
|
-
fields: {
|
|
737
|
-
overwrite_price: {
|
|
738
|
-
kind: :object,
|
|
739
|
-
fields: {
|
|
740
|
-
tiers: {
|
|
741
|
-
kind: :array,
|
|
742
|
-
element: {
|
|
743
|
-
kind: :object,
|
|
744
|
-
fields: { up_to_decimal: :decimal_string },
|
|
745
|
-
},
|
|
746
|
-
},
|
|
747
|
-
},
|
|
748
|
-
},
|
|
749
|
-
},
|
|
750
|
-
},
|
|
751
|
-
},
|
|
752
|
-
},
|
|
753
|
-
},
|
|
754
493
|
quantity_changes: {
|
|
755
494
|
kind: :array,
|
|
756
495
|
element: { kind: :object, fields: { set: :decimal_string } },
|
|
@@ -762,13 +501,13 @@ module Stripe
|
|
|
762
501
|
}
|
|
763
502
|
end
|
|
764
503
|
end
|
|
765
|
-
#
|
|
504
|
+
# Add a pricing line.
|
|
766
505
|
attr_accessor :add
|
|
767
|
-
#
|
|
506
|
+
# Remove a pricing line.
|
|
768
507
|
attr_accessor :remove
|
|
769
508
|
# The type of pricing line action.
|
|
770
509
|
attr_accessor :type
|
|
771
|
-
#
|
|
510
|
+
# Update a pricing line.
|
|
772
511
|
attr_accessor :update
|
|
773
512
|
|
|
774
513
|
def initialize(add: nil, remove: nil, type: nil, update: nil)
|
|
@@ -789,26 +528,6 @@ module Stripe
|
|
|
789
528
|
price_details: {
|
|
790
529
|
kind: :object,
|
|
791
530
|
fields: {
|
|
792
|
-
pricing_overrides: {
|
|
793
|
-
kind: :array,
|
|
794
|
-
element: {
|
|
795
|
-
kind: :object,
|
|
796
|
-
fields: {
|
|
797
|
-
overwrite_price: {
|
|
798
|
-
kind: :object,
|
|
799
|
-
fields: {
|
|
800
|
-
tiers: {
|
|
801
|
-
kind: :array,
|
|
802
|
-
element: {
|
|
803
|
-
kind: :object,
|
|
804
|
-
fields: { up_to_decimal: :decimal_string },
|
|
805
|
-
},
|
|
806
|
-
},
|
|
807
|
-
},
|
|
808
|
-
},
|
|
809
|
-
},
|
|
810
|
-
},
|
|
811
|
-
},
|
|
812
531
|
quantity_changes: {
|
|
813
532
|
kind: :array,
|
|
814
533
|
element: { kind: :object, fields: { set: :decimal_string } },
|
|
@@ -828,31 +547,6 @@ module Stripe
|
|
|
828
547
|
price_details: {
|
|
829
548
|
kind: :object,
|
|
830
549
|
fields: {
|
|
831
|
-
pricing_override_actions: {
|
|
832
|
-
kind: :array,
|
|
833
|
-
element: {
|
|
834
|
-
kind: :object,
|
|
835
|
-
fields: {
|
|
836
|
-
add: {
|
|
837
|
-
kind: :object,
|
|
838
|
-
fields: {
|
|
839
|
-
overwrite_price: {
|
|
840
|
-
kind: :object,
|
|
841
|
-
fields: {
|
|
842
|
-
tiers: {
|
|
843
|
-
kind: :array,
|
|
844
|
-
element: {
|
|
845
|
-
kind: :object,
|
|
846
|
-
fields: { up_to_decimal: :decimal_string },
|
|
847
|
-
},
|
|
848
|
-
},
|
|
849
|
-
},
|
|
850
|
-
},
|
|
851
|
-
},
|
|
852
|
-
},
|
|
853
|
-
},
|
|
854
|
-
},
|
|
855
|
-
},
|
|
856
550
|
quantity_changes: {
|
|
857
551
|
kind: :array,
|
|
858
552
|
element: { kind: :object, fields: { set: :decimal_string } },
|
|
@@ -870,7 +564,7 @@ module Stripe
|
|
|
870
564
|
class PricingOverrideAction < ::Stripe::RequestParams
|
|
871
565
|
class Add < ::Stripe::RequestParams
|
|
872
566
|
class EndsAt < ::Stripe::RequestParams
|
|
873
|
-
# The timestamp when the
|
|
567
|
+
# The timestamp when the pricing ends.
|
|
874
568
|
attr_accessor :timestamp
|
|
875
569
|
# The type of end time to apply.
|
|
876
570
|
attr_accessor :type
|
|
@@ -881,7 +575,7 @@ module Stripe
|
|
|
881
575
|
end
|
|
882
576
|
end
|
|
883
577
|
|
|
884
|
-
class
|
|
578
|
+
class MultiplyPricing < ::Stripe::RequestParams
|
|
885
579
|
class Criterion < ::Stripe::RequestParams
|
|
886
580
|
# Filter by pricing line IDs.
|
|
887
581
|
attr_accessor :pricing_line_ids
|
|
@@ -896,9 +590,9 @@ module Stripe
|
|
|
896
590
|
@type = type
|
|
897
591
|
end
|
|
898
592
|
end
|
|
899
|
-
# Criteria determining which rates the
|
|
593
|
+
# Criteria determining which rates the multiply_pricing override applies to.
|
|
900
594
|
attr_accessor :criteria
|
|
901
|
-
# The
|
|
595
|
+
# The multiply_pricing factor, represented as a decimal string. e.g. "0.8" for a 20% reduction.
|
|
902
596
|
attr_accessor :factor
|
|
903
597
|
|
|
904
598
|
def initialize(criteria: nil, factor: nil)
|
|
@@ -908,57 +602,16 @@ module Stripe
|
|
|
908
602
|
end
|
|
909
603
|
|
|
910
604
|
class OverwritePrice < ::Stripe::RequestParams
|
|
911
|
-
class Tier < ::Stripe::RequestParams
|
|
912
|
-
# Price for the entire tier, represented as a decimal string in minor currency units.
|
|
913
|
-
attr_accessor :flat_amount
|
|
914
|
-
# Per-unit price for units included in this tier, represented as a decimal string in minor currency units.
|
|
915
|
-
attr_accessor :unit_amount
|
|
916
|
-
# Up to and including this quantity will be contained in the tier.
|
|
917
|
-
attr_accessor :up_to_decimal
|
|
918
|
-
# No upper bound to this tier.
|
|
919
|
-
attr_accessor :up_to_inf
|
|
920
|
-
|
|
921
|
-
def initialize(
|
|
922
|
-
flat_amount: nil,
|
|
923
|
-
unit_amount: nil,
|
|
924
|
-
up_to_decimal: nil,
|
|
925
|
-
up_to_inf: nil
|
|
926
|
-
)
|
|
927
|
-
@flat_amount = flat_amount
|
|
928
|
-
@unit_amount = unit_amount
|
|
929
|
-
@up_to_decimal = up_to_decimal
|
|
930
|
-
@up_to_inf = up_to_inf
|
|
931
|
-
end
|
|
932
|
-
|
|
933
|
-
def self.field_encodings
|
|
934
|
-
@field_encodings = { up_to_decimal: :decimal_string }
|
|
935
|
-
end
|
|
936
|
-
end
|
|
937
|
-
# Defines whether the tiered price should be graduated or volume-based.
|
|
938
|
-
attr_accessor :tiering_mode
|
|
939
|
-
# Each element represents a pricing tier.
|
|
940
|
-
attr_accessor :tiers
|
|
941
605
|
# The per-unit amount to be charged, represented as a decimal string in minor currency units.
|
|
942
606
|
attr_accessor :unit_amount
|
|
943
607
|
|
|
944
|
-
def initialize(
|
|
945
|
-
@tiering_mode = tiering_mode
|
|
946
|
-
@tiers = tiers
|
|
608
|
+
def initialize(unit_amount: nil)
|
|
947
609
|
@unit_amount = unit_amount
|
|
948
610
|
end
|
|
949
|
-
|
|
950
|
-
def self.field_encodings
|
|
951
|
-
@field_encodings = {
|
|
952
|
-
tiers: {
|
|
953
|
-
kind: :array,
|
|
954
|
-
element: { kind: :object, fields: { up_to_decimal: :decimal_string } },
|
|
955
|
-
},
|
|
956
|
-
}
|
|
957
|
-
end
|
|
958
611
|
end
|
|
959
612
|
|
|
960
613
|
class StartsAt < ::Stripe::RequestParams
|
|
961
|
-
# The timestamp when the
|
|
614
|
+
# The timestamp when the pricing starts.
|
|
962
615
|
attr_accessor :timestamp
|
|
963
616
|
# The type of start time to apply.
|
|
964
617
|
attr_accessor :type
|
|
@@ -972,8 +625,8 @@ module Stripe
|
|
|
972
625
|
attr_accessor :ends_at
|
|
973
626
|
# A lookup key for the pricing override.
|
|
974
627
|
attr_accessor :lookup_key
|
|
975
|
-
# A
|
|
976
|
-
attr_accessor :
|
|
628
|
+
# A multiply_pricing override to add.
|
|
629
|
+
attr_accessor :multiply_pricing
|
|
977
630
|
# An overwrite price override to add.
|
|
978
631
|
attr_accessor :overwrite_price
|
|
979
632
|
# The priority for the pricing override. The highest priority is 0 and the lowest is 100.
|
|
@@ -986,7 +639,7 @@ module Stripe
|
|
|
986
639
|
def initialize(
|
|
987
640
|
ends_at: nil,
|
|
988
641
|
lookup_key: nil,
|
|
989
|
-
|
|
642
|
+
multiply_pricing: nil,
|
|
990
643
|
overwrite_price: nil,
|
|
991
644
|
priority: nil,
|
|
992
645
|
starts_at: nil,
|
|
@@ -994,30 +647,16 @@ module Stripe
|
|
|
994
647
|
)
|
|
995
648
|
@ends_at = ends_at
|
|
996
649
|
@lookup_key = lookup_key
|
|
997
|
-
@
|
|
650
|
+
@multiply_pricing = multiply_pricing
|
|
998
651
|
@overwrite_price = overwrite_price
|
|
999
652
|
@priority = priority
|
|
1000
653
|
@starts_at = starts_at
|
|
1001
654
|
@type = type
|
|
1002
655
|
end
|
|
1003
|
-
|
|
1004
|
-
def self.field_encodings
|
|
1005
|
-
@field_encodings = {
|
|
1006
|
-
overwrite_price: {
|
|
1007
|
-
kind: :object,
|
|
1008
|
-
fields: {
|
|
1009
|
-
tiers: {
|
|
1010
|
-
kind: :array,
|
|
1011
|
-
element: { kind: :object, fields: { up_to_decimal: :decimal_string } },
|
|
1012
|
-
},
|
|
1013
|
-
},
|
|
1014
|
-
},
|
|
1015
|
-
}
|
|
1016
|
-
end
|
|
1017
656
|
end
|
|
1018
657
|
|
|
1019
658
|
class Remove < ::Stripe::RequestParams
|
|
1020
|
-
# The
|
|
659
|
+
# The id of the pricing override to remove.
|
|
1021
660
|
attr_accessor :id
|
|
1022
661
|
|
|
1023
662
|
def initialize(id: nil)
|
|
@@ -1027,7 +666,7 @@ module Stripe
|
|
|
1027
666
|
|
|
1028
667
|
class Update < ::Stripe::RequestParams
|
|
1029
668
|
class EndsAt < ::Stripe::RequestParams
|
|
1030
|
-
# The timestamp when the
|
|
669
|
+
# The timestamp when the pricing ends.
|
|
1031
670
|
attr_accessor :timestamp
|
|
1032
671
|
# The type of end time to apply.
|
|
1033
672
|
attr_accessor :type
|
|
@@ -1039,7 +678,7 @@ module Stripe
|
|
|
1039
678
|
end
|
|
1040
679
|
|
|
1041
680
|
class StartsAt < ::Stripe::RequestParams
|
|
1042
|
-
# The timestamp when the
|
|
681
|
+
# The timestamp when the pricing starts.
|
|
1043
682
|
attr_accessor :timestamp
|
|
1044
683
|
# The type of start time to apply.
|
|
1045
684
|
attr_accessor :type
|
|
@@ -1062,13 +701,13 @@ module Stripe
|
|
|
1062
701
|
@starts_at = starts_at
|
|
1063
702
|
end
|
|
1064
703
|
end
|
|
1065
|
-
#
|
|
704
|
+
# Add a pricing override.
|
|
1066
705
|
attr_accessor :add
|
|
1067
|
-
#
|
|
706
|
+
# Remove a pricing override.
|
|
1068
707
|
attr_accessor :remove
|
|
1069
708
|
# The type of pricing override action.
|
|
1070
709
|
attr_accessor :type
|
|
1071
|
-
#
|
|
710
|
+
# Update a pricing override.
|
|
1072
711
|
attr_accessor :update
|
|
1073
712
|
|
|
1074
713
|
def initialize(add: nil, remove: nil, type: nil, update: nil)
|
|
@@ -1077,25 +716,6 @@ module Stripe
|
|
|
1077
716
|
@type = type
|
|
1078
717
|
@update = update
|
|
1079
718
|
end
|
|
1080
|
-
|
|
1081
|
-
def self.field_encodings
|
|
1082
|
-
@field_encodings = {
|
|
1083
|
-
add: {
|
|
1084
|
-
kind: :object,
|
|
1085
|
-
fields: {
|
|
1086
|
-
overwrite_price: {
|
|
1087
|
-
kind: :object,
|
|
1088
|
-
fields: {
|
|
1089
|
-
tiers: {
|
|
1090
|
-
kind: :array,
|
|
1091
|
-
element: { kind: :object, fields: { up_to_decimal: :decimal_string } },
|
|
1092
|
-
},
|
|
1093
|
-
},
|
|
1094
|
-
},
|
|
1095
|
-
},
|
|
1096
|
-
},
|
|
1097
|
-
}
|
|
1098
|
-
end
|
|
1099
719
|
end
|
|
1100
720
|
# Additional fields to include in the response.
|
|
1101
721
|
attr_accessor :include
|
|
@@ -1126,26 +746,6 @@ module Stripe
|
|
|
1126
746
|
price_details: {
|
|
1127
747
|
kind: :object,
|
|
1128
748
|
fields: {
|
|
1129
|
-
pricing_overrides: {
|
|
1130
|
-
kind: :array,
|
|
1131
|
-
element: {
|
|
1132
|
-
kind: :object,
|
|
1133
|
-
fields: {
|
|
1134
|
-
overwrite_price: {
|
|
1135
|
-
kind: :object,
|
|
1136
|
-
fields: {
|
|
1137
|
-
tiers: {
|
|
1138
|
-
kind: :array,
|
|
1139
|
-
element: {
|
|
1140
|
-
kind: :object,
|
|
1141
|
-
fields: { up_to_decimal: :decimal_string },
|
|
1142
|
-
},
|
|
1143
|
-
},
|
|
1144
|
-
},
|
|
1145
|
-
},
|
|
1146
|
-
},
|
|
1147
|
-
},
|
|
1148
|
-
},
|
|
1149
749
|
quantity_changes: {
|
|
1150
750
|
kind: :array,
|
|
1151
751
|
element: { kind: :object, fields: { set: :decimal_string } },
|
|
@@ -1165,31 +765,6 @@ module Stripe
|
|
|
1165
765
|
price_details: {
|
|
1166
766
|
kind: :object,
|
|
1167
767
|
fields: {
|
|
1168
|
-
pricing_override_actions: {
|
|
1169
|
-
kind: :array,
|
|
1170
|
-
element: {
|
|
1171
|
-
kind: :object,
|
|
1172
|
-
fields: {
|
|
1173
|
-
add: {
|
|
1174
|
-
kind: :object,
|
|
1175
|
-
fields: {
|
|
1176
|
-
overwrite_price: {
|
|
1177
|
-
kind: :object,
|
|
1178
|
-
fields: {
|
|
1179
|
-
tiers: {
|
|
1180
|
-
kind: :array,
|
|
1181
|
-
element: {
|
|
1182
|
-
kind: :object,
|
|
1183
|
-
fields: { up_to_decimal: :decimal_string },
|
|
1184
|
-
},
|
|
1185
|
-
},
|
|
1186
|
-
},
|
|
1187
|
-
},
|
|
1188
|
-
},
|
|
1189
|
-
},
|
|
1190
|
-
},
|
|
1191
|
-
},
|
|
1192
|
-
},
|
|
1193
768
|
quantity_changes: {
|
|
1194
769
|
kind: :array,
|
|
1195
770
|
element: { kind: :object, fields: { set: :decimal_string } },
|
|
@@ -1203,28 +778,6 @@ module Stripe
|
|
|
1203
778
|
},
|
|
1204
779
|
},
|
|
1205
780
|
},
|
|
1206
|
-
pricing_override_actions: {
|
|
1207
|
-
kind: :array,
|
|
1208
|
-
element: {
|
|
1209
|
-
kind: :object,
|
|
1210
|
-
fields: {
|
|
1211
|
-
add: {
|
|
1212
|
-
kind: :object,
|
|
1213
|
-
fields: {
|
|
1214
|
-
overwrite_price: {
|
|
1215
|
-
kind: :object,
|
|
1216
|
-
fields: {
|
|
1217
|
-
tiers: {
|
|
1218
|
-
kind: :array,
|
|
1219
|
-
element: { kind: :object, fields: { up_to_decimal: :decimal_string } },
|
|
1220
|
-
},
|
|
1221
|
-
},
|
|
1222
|
-
},
|
|
1223
|
-
},
|
|
1224
|
-
},
|
|
1225
|
-
},
|
|
1226
|
-
},
|
|
1227
|
-
},
|
|
1228
781
|
}
|
|
1229
782
|
end
|
|
1230
783
|
end
|