stripe 15.5.0.pre.beta.2 → 15.6.0.pre.beta.1
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/API_VERSION +1 -1
- data/CHANGELOG.md +53 -1
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +18 -18
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/errors.rb +23 -23
- data/lib/stripe/resources/account.rb +2 -2
- data/lib/stripe/resources/account_session.rb +94 -13
- data/lib/stripe/resources/balance.rb +2 -7
- data/lib/stripe/resources/balance_settings.rb +72 -65
- data/lib/stripe/resources/billing/meter.rb +2 -2
- data/lib/stripe/resources/billing/meter_usage_row.rb +1 -1
- data/lib/stripe/resources/billing_portal/configuration.rb +12 -2
- data/lib/stripe/resources/charge.rb +40 -5
- data/lib/stripe/resources/checkout/session.rb +109 -5
- data/lib/stripe/resources/credit_note.rb +3 -3
- data/lib/stripe/resources/dispute.rb +1 -1
- data/lib/stripe/resources/file.rb +1 -1
- data/lib/stripe/resources/file_link.rb +1 -1
- data/lib/stripe/resources/invoice.rb +44 -1
- data/lib/stripe/resources/invoice_payment.rb +1 -1
- data/lib/stripe/resources/issuing/card.rb +8 -0
- data/lib/stripe/resources/mandate.rb +65 -1
- data/lib/stripe/resources/payment_attempt_record.rb +90 -10
- data/lib/stripe/resources/payment_intent.rb +182 -4
- data/lib/stripe/resources/payment_link.rb +1 -1
- data/lib/stripe/resources/payment_method.rb +2 -0
- data/lib/stripe/resources/payment_record.rb +111 -14
- data/lib/stripe/resources/promotion_code.rb +5 -2
- data/lib/stripe/resources/quote_preview_invoice.rb +1 -1
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +24 -0
- data/lib/stripe/resources/setup_attempt.rb +4 -1
- data/lib/stripe/resources/setup_intent.rb +194 -1
- data/lib/stripe/resources/subscription.rb +107 -9
- data/lib/stripe/resources/subscription_schedule.rb +124 -2
- data/lib/stripe/resources/terminal/configuration.rb +82 -0
- data/lib/stripe/resources/terminal/reader.rb +22 -0
- data/lib/stripe/resources/v2/core/account.rb +8 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +2 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +1 -1
- data/lib/stripe/resources/v2/money_management/transaction.rb +2 -0
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +2 -0
- data/lib/stripe/services/account_session_service.rb +64 -13
- data/lib/stripe/services/balance_settings_service.rb +44 -41
- data/lib/stripe/services/billing/meter_service.rb +1 -1
- data/lib/stripe/services/billing_portal/configuration_service.rb +10 -2
- data/lib/stripe/services/checkout/session_service.rb +86 -4
- data/lib/stripe/services/credit_note_preview_lines_service.rb +1 -1
- data/lib/stripe/services/credit_note_service.rb +2 -2
- data/lib/stripe/services/customer_service.rb +4 -4
- data/lib/stripe/services/file_link_service.rb +1 -1
- data/lib/stripe/services/file_service.rb +1 -1
- data/lib/stripe/services/invoice_payment_service.rb +1 -1
- data/lib/stripe/services/invoice_service.rb +43 -0
- data/lib/stripe/services/issuing/card_service.rb +8 -0
- data/lib/stripe/services/mandate_service.rb +40 -0
- data/lib/stripe/services/payment_attempt_record_service.rb +4 -1
- data/lib/stripe/services/payment_intent_service.rb +157 -3
- data/lib/stripe/services/payment_link_service.rb +1 -1
- data/lib/stripe/services/payment_record_service.rb +25 -5
- data/lib/stripe/services/quote_service.rb +4 -4
- data/lib/stripe/services/setup_intent_service.rb +153 -0
- data/lib/stripe/services/subscription_schedule_service.rb +100 -2
- data/lib/stripe/services/subscription_service.rb +107 -9
- data/lib/stripe/services/terminal/configuration_service.rb +64 -0
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +22 -0
- data/lib/stripe/services/v1_services.rb +5 -5
- data/lib/stripe/services/v2/billing_service.rb +2 -2
- data/lib/stripe/services/v2/core/account_service.rb +16 -2
- data/lib/stripe/services/v2/core_service.rb +3 -3
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +4 -1
- data/lib/stripe/services/v2/money_management_service.rb +3 -3
- data/lib/stripe/stripe_service.rb +3 -1
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe.rbi +142341 -140132
- metadata +2 -2
@@ -1096,6 +1096,53 @@ module Stripe
|
|
1096
1096
|
end
|
1097
1097
|
end
|
1098
1098
|
|
1099
|
+
class Pix < Stripe::RequestParams
|
1100
|
+
class MandateOptions < Stripe::RequestParams
|
1101
|
+
# Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
|
1102
|
+
attr_accessor :amount
|
1103
|
+
# Determines if the amount includes the IOF tax. Defaults to `never`.
|
1104
|
+
attr_accessor :amount_includes_iof
|
1105
|
+
# Type of amount. Defaults to `maximum`.
|
1106
|
+
attr_accessor :amount_type
|
1107
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
|
1108
|
+
attr_accessor :currency
|
1109
|
+
# Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
1110
|
+
attr_accessor :end_date
|
1111
|
+
# Schedule at which the future payments will be charged. Defaults to `weekly`.
|
1112
|
+
attr_accessor :payment_schedule
|
1113
|
+
# Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
|
1114
|
+
attr_accessor :reference
|
1115
|
+
# Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date.
|
1116
|
+
attr_accessor :start_date
|
1117
|
+
|
1118
|
+
def initialize(
|
1119
|
+
amount: nil,
|
1120
|
+
amount_includes_iof: nil,
|
1121
|
+
amount_type: nil,
|
1122
|
+
currency: nil,
|
1123
|
+
end_date: nil,
|
1124
|
+
payment_schedule: nil,
|
1125
|
+
reference: nil,
|
1126
|
+
start_date: nil
|
1127
|
+
)
|
1128
|
+
@amount = amount
|
1129
|
+
@amount_includes_iof = amount_includes_iof
|
1130
|
+
@amount_type = amount_type
|
1131
|
+
@currency = currency
|
1132
|
+
@end_date = end_date
|
1133
|
+
@payment_schedule = payment_schedule
|
1134
|
+
@reference = reference
|
1135
|
+
@start_date = start_date
|
1136
|
+
end
|
1137
|
+
end
|
1138
|
+
# Additional fields for mandate creation.
|
1139
|
+
attr_accessor :mandate_options
|
1140
|
+
|
1141
|
+
def initialize(mandate_options: nil)
|
1142
|
+
@mandate_options = mandate_options
|
1143
|
+
end
|
1144
|
+
end
|
1145
|
+
|
1099
1146
|
class SepaDebit < Stripe::RequestParams
|
1100
1147
|
class MandateOptions < Stripe::RequestParams
|
1101
1148
|
# Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
|
@@ -1217,6 +1264,8 @@ module Stripe
|
|
1217
1264
|
attr_accessor :paypal
|
1218
1265
|
# If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options.
|
1219
1266
|
attr_accessor :payto
|
1267
|
+
# If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options.
|
1268
|
+
attr_accessor :pix
|
1220
1269
|
# If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
|
1221
1270
|
attr_accessor :sepa_debit
|
1222
1271
|
# If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
|
@@ -1232,6 +1281,7 @@ module Stripe
|
|
1232
1281
|
link: nil,
|
1233
1282
|
paypal: nil,
|
1234
1283
|
payto: nil,
|
1284
|
+
pix: nil,
|
1235
1285
|
sepa_debit: nil,
|
1236
1286
|
us_bank_account: nil
|
1237
1287
|
)
|
@@ -1244,6 +1294,7 @@ module Stripe
|
|
1244
1294
|
@link = link
|
1245
1295
|
@paypal = paypal
|
1246
1296
|
@payto = payto
|
1297
|
+
@pix = pix
|
1247
1298
|
@sepa_debit = sepa_debit
|
1248
1299
|
@us_bank_account = us_bank_account
|
1249
1300
|
end
|
@@ -2353,6 +2404,53 @@ module Stripe
|
|
2353
2404
|
end
|
2354
2405
|
end
|
2355
2406
|
|
2407
|
+
class Pix < Stripe::RequestParams
|
2408
|
+
class MandateOptions < Stripe::RequestParams
|
2409
|
+
# Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
|
2410
|
+
attr_accessor :amount
|
2411
|
+
# Determines if the amount includes the IOF tax. Defaults to `never`.
|
2412
|
+
attr_accessor :amount_includes_iof
|
2413
|
+
# Type of amount. Defaults to `maximum`.
|
2414
|
+
attr_accessor :amount_type
|
2415
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
|
2416
|
+
attr_accessor :currency
|
2417
|
+
# Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
2418
|
+
attr_accessor :end_date
|
2419
|
+
# Schedule at which the future payments will be charged. Defaults to `weekly`.
|
2420
|
+
attr_accessor :payment_schedule
|
2421
|
+
# Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
|
2422
|
+
attr_accessor :reference
|
2423
|
+
# Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date.
|
2424
|
+
attr_accessor :start_date
|
2425
|
+
|
2426
|
+
def initialize(
|
2427
|
+
amount: nil,
|
2428
|
+
amount_includes_iof: nil,
|
2429
|
+
amount_type: nil,
|
2430
|
+
currency: nil,
|
2431
|
+
end_date: nil,
|
2432
|
+
payment_schedule: nil,
|
2433
|
+
reference: nil,
|
2434
|
+
start_date: nil
|
2435
|
+
)
|
2436
|
+
@amount = amount
|
2437
|
+
@amount_includes_iof = amount_includes_iof
|
2438
|
+
@amount_type = amount_type
|
2439
|
+
@currency = currency
|
2440
|
+
@end_date = end_date
|
2441
|
+
@payment_schedule = payment_schedule
|
2442
|
+
@reference = reference
|
2443
|
+
@start_date = start_date
|
2444
|
+
end
|
2445
|
+
end
|
2446
|
+
# Additional fields for mandate creation.
|
2447
|
+
attr_accessor :mandate_options
|
2448
|
+
|
2449
|
+
def initialize(mandate_options: nil)
|
2450
|
+
@mandate_options = mandate_options
|
2451
|
+
end
|
2452
|
+
end
|
2453
|
+
|
2356
2454
|
class SepaDebit < Stripe::RequestParams
|
2357
2455
|
class MandateOptions < Stripe::RequestParams
|
2358
2456
|
# Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
|
@@ -2474,6 +2572,8 @@ module Stripe
|
|
2474
2572
|
attr_accessor :paypal
|
2475
2573
|
# If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options.
|
2476
2574
|
attr_accessor :payto
|
2575
|
+
# If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options.
|
2576
|
+
attr_accessor :pix
|
2477
2577
|
# If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
|
2478
2578
|
attr_accessor :sepa_debit
|
2479
2579
|
# If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
|
@@ -2489,6 +2589,7 @@ module Stripe
|
|
2489
2589
|
link: nil,
|
2490
2590
|
paypal: nil,
|
2491
2591
|
payto: nil,
|
2592
|
+
pix: nil,
|
2492
2593
|
sepa_debit: nil,
|
2493
2594
|
us_bank_account: nil
|
2494
2595
|
)
|
@@ -2501,6 +2602,7 @@ module Stripe
|
|
2501
2602
|
@link = link
|
2502
2603
|
@paypal = paypal
|
2503
2604
|
@payto = payto
|
2605
|
+
@pix = pix
|
2504
2606
|
@sepa_debit = sepa_debit
|
2505
2607
|
@us_bank_account = us_bank_account
|
2506
2608
|
end
|
@@ -3597,6 +3699,53 @@ module Stripe
|
|
3597
3699
|
end
|
3598
3700
|
end
|
3599
3701
|
|
3702
|
+
class Pix < Stripe::RequestParams
|
3703
|
+
class MandateOptions < Stripe::RequestParams
|
3704
|
+
# Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
|
3705
|
+
attr_accessor :amount
|
3706
|
+
# Determines if the amount includes the IOF tax. Defaults to `never`.
|
3707
|
+
attr_accessor :amount_includes_iof
|
3708
|
+
# Type of amount. Defaults to `maximum`.
|
3709
|
+
attr_accessor :amount_type
|
3710
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
|
3711
|
+
attr_accessor :currency
|
3712
|
+
# Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
3713
|
+
attr_accessor :end_date
|
3714
|
+
# Schedule at which the future payments will be charged. Defaults to `weekly`.
|
3715
|
+
attr_accessor :payment_schedule
|
3716
|
+
# Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
|
3717
|
+
attr_accessor :reference
|
3718
|
+
# Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date.
|
3719
|
+
attr_accessor :start_date
|
3720
|
+
|
3721
|
+
def initialize(
|
3722
|
+
amount: nil,
|
3723
|
+
amount_includes_iof: nil,
|
3724
|
+
amount_type: nil,
|
3725
|
+
currency: nil,
|
3726
|
+
end_date: nil,
|
3727
|
+
payment_schedule: nil,
|
3728
|
+
reference: nil,
|
3729
|
+
start_date: nil
|
3730
|
+
)
|
3731
|
+
@amount = amount
|
3732
|
+
@amount_includes_iof = amount_includes_iof
|
3733
|
+
@amount_type = amount_type
|
3734
|
+
@currency = currency
|
3735
|
+
@end_date = end_date
|
3736
|
+
@payment_schedule = payment_schedule
|
3737
|
+
@reference = reference
|
3738
|
+
@start_date = start_date
|
3739
|
+
end
|
3740
|
+
end
|
3741
|
+
# Additional fields for mandate creation.
|
3742
|
+
attr_accessor :mandate_options
|
3743
|
+
|
3744
|
+
def initialize(mandate_options: nil)
|
3745
|
+
@mandate_options = mandate_options
|
3746
|
+
end
|
3747
|
+
end
|
3748
|
+
|
3600
3749
|
class SepaDebit < Stripe::RequestParams
|
3601
3750
|
class MandateOptions < Stripe::RequestParams
|
3602
3751
|
# Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
|
@@ -3718,6 +3867,8 @@ module Stripe
|
|
3718
3867
|
attr_accessor :paypal
|
3719
3868
|
# If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options.
|
3720
3869
|
attr_accessor :payto
|
3870
|
+
# If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options.
|
3871
|
+
attr_accessor :pix
|
3721
3872
|
# If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
|
3722
3873
|
attr_accessor :sepa_debit
|
3723
3874
|
# If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
|
@@ -3733,6 +3884,7 @@ module Stripe
|
|
3733
3884
|
link: nil,
|
3734
3885
|
paypal: nil,
|
3735
3886
|
payto: nil,
|
3887
|
+
pix: nil,
|
3736
3888
|
sepa_debit: nil,
|
3737
3889
|
us_bank_account: nil
|
3738
3890
|
)
|
@@ -3745,6 +3897,7 @@ module Stripe
|
|
3745
3897
|
@link = link
|
3746
3898
|
@paypal = paypal
|
3747
3899
|
@payto = payto
|
3900
|
+
@pix = pix
|
3748
3901
|
@sepa_debit = sepa_debit
|
3749
3902
|
@us_bank_account = us_bank_account
|
3750
3903
|
end
|
@@ -299,6 +299,41 @@ module Stripe
|
|
299
299
|
end
|
300
300
|
end
|
301
301
|
|
302
|
+
class Period < Stripe::RequestParams
|
303
|
+
class End < Stripe::RequestParams
|
304
|
+
# A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
|
305
|
+
attr_accessor :timestamp
|
306
|
+
# Select how to calculate the end of the invoice item period.
|
307
|
+
attr_accessor :type
|
308
|
+
|
309
|
+
def initialize(timestamp: nil, type: nil)
|
310
|
+
@timestamp = timestamp
|
311
|
+
@type = type
|
312
|
+
end
|
313
|
+
end
|
314
|
+
|
315
|
+
class Start < Stripe::RequestParams
|
316
|
+
# A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
|
317
|
+
attr_accessor :timestamp
|
318
|
+
# Select how to calculate the start of the invoice item period.
|
319
|
+
attr_accessor :type
|
320
|
+
|
321
|
+
def initialize(timestamp: nil, type: nil)
|
322
|
+
@timestamp = timestamp
|
323
|
+
@type = type
|
324
|
+
end
|
325
|
+
end
|
326
|
+
# End of the invoice item period.
|
327
|
+
attr_accessor :end
|
328
|
+
# Start of the invoice item period.
|
329
|
+
attr_accessor :start
|
330
|
+
|
331
|
+
def initialize(end_: nil, start: nil)
|
332
|
+
@end = end_
|
333
|
+
@start = start
|
334
|
+
end
|
335
|
+
end
|
336
|
+
|
302
337
|
class PriceData < Stripe::RequestParams
|
303
338
|
# 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).
|
304
339
|
attr_accessor :currency
|
@@ -327,6 +362,10 @@ module Stripe
|
|
327
362
|
end
|
328
363
|
# The coupons to redeem into discounts for the item.
|
329
364
|
attr_accessor :discounts
|
365
|
+
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
366
|
+
attr_accessor :metadata
|
367
|
+
# The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
|
368
|
+
attr_accessor :period
|
330
369
|
# The ID of the price object. One of `price` or `price_data` is required.
|
331
370
|
attr_accessor :price
|
332
371
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
@@ -336,8 +375,18 @@ module Stripe
|
|
336
375
|
# The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
337
376
|
attr_accessor :tax_rates
|
338
377
|
|
339
|
-
def initialize(
|
378
|
+
def initialize(
|
379
|
+
discounts: nil,
|
380
|
+
metadata: nil,
|
381
|
+
period: nil,
|
382
|
+
price: nil,
|
383
|
+
price_data: nil,
|
384
|
+
quantity: nil,
|
385
|
+
tax_rates: nil
|
386
|
+
)
|
340
387
|
@discounts = discounts
|
388
|
+
@metadata = metadata
|
389
|
+
@period = period
|
341
390
|
@price = price
|
342
391
|
@price_data = price_data
|
343
392
|
@quantity = quantity
|
@@ -991,6 +1040,41 @@ module Stripe
|
|
991
1040
|
end
|
992
1041
|
end
|
993
1042
|
|
1043
|
+
class Period < Stripe::RequestParams
|
1044
|
+
class End < Stripe::RequestParams
|
1045
|
+
# A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
|
1046
|
+
attr_accessor :timestamp
|
1047
|
+
# Select how to calculate the end of the invoice item period.
|
1048
|
+
attr_accessor :type
|
1049
|
+
|
1050
|
+
def initialize(timestamp: nil, type: nil)
|
1051
|
+
@timestamp = timestamp
|
1052
|
+
@type = type
|
1053
|
+
end
|
1054
|
+
end
|
1055
|
+
|
1056
|
+
class Start < Stripe::RequestParams
|
1057
|
+
# A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
|
1058
|
+
attr_accessor :timestamp
|
1059
|
+
# Select how to calculate the start of the invoice item period.
|
1060
|
+
attr_accessor :type
|
1061
|
+
|
1062
|
+
def initialize(timestamp: nil, type: nil)
|
1063
|
+
@timestamp = timestamp
|
1064
|
+
@type = type
|
1065
|
+
end
|
1066
|
+
end
|
1067
|
+
# End of the invoice item period.
|
1068
|
+
attr_accessor :end
|
1069
|
+
# Start of the invoice item period.
|
1070
|
+
attr_accessor :start
|
1071
|
+
|
1072
|
+
def initialize(end_: nil, start: nil)
|
1073
|
+
@end = end_
|
1074
|
+
@start = start
|
1075
|
+
end
|
1076
|
+
end
|
1077
|
+
|
994
1078
|
class PriceData < Stripe::RequestParams
|
995
1079
|
# 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).
|
996
1080
|
attr_accessor :currency
|
@@ -1019,6 +1103,10 @@ module Stripe
|
|
1019
1103
|
end
|
1020
1104
|
# The coupons to redeem into discounts for the item.
|
1021
1105
|
attr_accessor :discounts
|
1106
|
+
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1107
|
+
attr_accessor :metadata
|
1108
|
+
# The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
|
1109
|
+
attr_accessor :period
|
1022
1110
|
# The ID of the price object. One of `price` or `price_data` is required.
|
1023
1111
|
attr_accessor :price
|
1024
1112
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
@@ -1028,8 +1116,18 @@ module Stripe
|
|
1028
1116
|
# The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
1029
1117
|
attr_accessor :tax_rates
|
1030
1118
|
|
1031
|
-
def initialize(
|
1119
|
+
def initialize(
|
1120
|
+
discounts: nil,
|
1121
|
+
metadata: nil,
|
1122
|
+
period: nil,
|
1123
|
+
price: nil,
|
1124
|
+
price_data: nil,
|
1125
|
+
quantity: nil,
|
1126
|
+
tax_rates: nil
|
1127
|
+
)
|
1032
1128
|
@discounts = discounts
|
1129
|
+
@metadata = metadata
|
1130
|
+
@period = period
|
1033
1131
|
@price = price
|
1034
1132
|
@price_data = price_data
|
1035
1133
|
@quantity = quantity
|
@@ -86,6 +86,41 @@ module Stripe
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
+
class Period < Stripe::RequestParams
|
90
|
+
class End < Stripe::RequestParams
|
91
|
+
# A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
|
92
|
+
attr_accessor :timestamp
|
93
|
+
# Select how to calculate the end of the invoice item period.
|
94
|
+
attr_accessor :type
|
95
|
+
|
96
|
+
def initialize(timestamp: nil, type: nil)
|
97
|
+
@timestamp = timestamp
|
98
|
+
@type = type
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
class Start < Stripe::RequestParams
|
103
|
+
# A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
|
104
|
+
attr_accessor :timestamp
|
105
|
+
# Select how to calculate the start of the invoice item period.
|
106
|
+
attr_accessor :type
|
107
|
+
|
108
|
+
def initialize(timestamp: nil, type: nil)
|
109
|
+
@timestamp = timestamp
|
110
|
+
@type = type
|
111
|
+
end
|
112
|
+
end
|
113
|
+
# End of the invoice item period.
|
114
|
+
attr_accessor :end
|
115
|
+
# Start of the invoice item period.
|
116
|
+
attr_accessor :start
|
117
|
+
|
118
|
+
def initialize(end_: nil, start: nil)
|
119
|
+
@end = end_
|
120
|
+
@start = start
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
89
124
|
class PriceData < Stripe::RequestParams
|
90
125
|
# 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).
|
91
126
|
attr_accessor :currency
|
@@ -114,6 +149,10 @@ module Stripe
|
|
114
149
|
end
|
115
150
|
# The coupons to redeem into discounts for the item.
|
116
151
|
attr_accessor :discounts
|
152
|
+
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
153
|
+
attr_accessor :metadata
|
154
|
+
# The period associated with this invoice item. Defaults to the current period of the subscription.
|
155
|
+
attr_accessor :period
|
117
156
|
# The ID of the price object. One of `price` or `price_data` is required.
|
118
157
|
attr_accessor :price
|
119
158
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
@@ -123,8 +162,18 @@ module Stripe
|
|
123
162
|
# The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
124
163
|
attr_accessor :tax_rates
|
125
164
|
|
126
|
-
def initialize(
|
165
|
+
def initialize(
|
166
|
+
discounts: nil,
|
167
|
+
metadata: nil,
|
168
|
+
period: nil,
|
169
|
+
price: nil,
|
170
|
+
price_data: nil,
|
171
|
+
quantity: nil,
|
172
|
+
tax_rates: nil
|
173
|
+
)
|
127
174
|
@discounts = discounts
|
175
|
+
@metadata = metadata
|
176
|
+
@period = period
|
128
177
|
@price = price
|
129
178
|
@price_data = price_data
|
130
179
|
@quantity = quantity
|
@@ -880,9 +929,9 @@ module Stripe
|
|
880
929
|
attr_accessor :collection_method
|
881
930
|
# Only return subscriptions that were created during the given date interval.
|
882
931
|
attr_accessor :created
|
883
|
-
# Only return subscriptions whose current_period_end falls within the given date interval.
|
932
|
+
# Only return subscriptions whose minimum item current_period_end falls within the given date interval.
|
884
933
|
attr_accessor :current_period_end
|
885
|
-
# Only return subscriptions whose current_period_start falls within the given date interval.
|
934
|
+
# Only return subscriptions whose maximum item current_period_start falls within the given date interval.
|
886
935
|
attr_accessor :current_period_start
|
887
936
|
# The ID of the customer whose subscriptions will be retrieved.
|
888
937
|
attr_accessor :customer
|
@@ -985,6 +1034,41 @@ module Stripe
|
|
985
1034
|
end
|
986
1035
|
end
|
987
1036
|
|
1037
|
+
class Period < Stripe::RequestParams
|
1038
|
+
class End < Stripe::RequestParams
|
1039
|
+
# A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
|
1040
|
+
attr_accessor :timestamp
|
1041
|
+
# Select how to calculate the end of the invoice item period.
|
1042
|
+
attr_accessor :type
|
1043
|
+
|
1044
|
+
def initialize(timestamp: nil, type: nil)
|
1045
|
+
@timestamp = timestamp
|
1046
|
+
@type = type
|
1047
|
+
end
|
1048
|
+
end
|
1049
|
+
|
1050
|
+
class Start < Stripe::RequestParams
|
1051
|
+
# A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
|
1052
|
+
attr_accessor :timestamp
|
1053
|
+
# Select how to calculate the start of the invoice item period.
|
1054
|
+
attr_accessor :type
|
1055
|
+
|
1056
|
+
def initialize(timestamp: nil, type: nil)
|
1057
|
+
@timestamp = timestamp
|
1058
|
+
@type = type
|
1059
|
+
end
|
1060
|
+
end
|
1061
|
+
# End of the invoice item period.
|
1062
|
+
attr_accessor :end
|
1063
|
+
# Start of the invoice item period.
|
1064
|
+
attr_accessor :start
|
1065
|
+
|
1066
|
+
def initialize(end_: nil, start: nil)
|
1067
|
+
@end = end_
|
1068
|
+
@start = start
|
1069
|
+
end
|
1070
|
+
end
|
1071
|
+
|
988
1072
|
class PriceData < Stripe::RequestParams
|
989
1073
|
# 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).
|
990
1074
|
attr_accessor :currency
|
@@ -1013,6 +1097,10 @@ module Stripe
|
|
1013
1097
|
end
|
1014
1098
|
# The coupons to redeem into discounts for the item.
|
1015
1099
|
attr_accessor :discounts
|
1100
|
+
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1101
|
+
attr_accessor :metadata
|
1102
|
+
# The period associated with this invoice item. Defaults to the current period of the subscription.
|
1103
|
+
attr_accessor :period
|
1016
1104
|
# The ID of the price object. One of `price` or `price_data` is required.
|
1017
1105
|
attr_accessor :price
|
1018
1106
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
@@ -1022,8 +1110,18 @@ module Stripe
|
|
1022
1110
|
# The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
1023
1111
|
attr_accessor :tax_rates
|
1024
1112
|
|
1025
|
-
def initialize(
|
1113
|
+
def initialize(
|
1114
|
+
discounts: nil,
|
1115
|
+
metadata: nil,
|
1116
|
+
period: nil,
|
1117
|
+
price: nil,
|
1118
|
+
price_data: nil,
|
1119
|
+
quantity: nil,
|
1120
|
+
tax_rates: nil
|
1121
|
+
)
|
1026
1122
|
@discounts = discounts
|
1123
|
+
@metadata = metadata
|
1124
|
+
@period = period
|
1027
1125
|
@price = price
|
1028
1126
|
@price_data = price_data
|
1029
1127
|
@quantity = quantity
|
@@ -1055,15 +1153,15 @@ module Stripe
|
|
1055
1153
|
end
|
1056
1154
|
|
1057
1155
|
class BillingCycleAnchorConfig < Stripe::RequestParams
|
1058
|
-
# The day of the month the
|
1156
|
+
# The day of the month the anchor should be. Ranges from 1 to 31.
|
1059
1157
|
attr_accessor :day_of_month
|
1060
|
-
# The hour of the day the
|
1158
|
+
# The hour of the day the anchor should be. Ranges from 0 to 23.
|
1061
1159
|
attr_accessor :hour
|
1062
|
-
# The minute of the hour the
|
1160
|
+
# The minute of the hour the anchor should be. Ranges from 0 to 59.
|
1063
1161
|
attr_accessor :minute
|
1064
|
-
# The month to start full cycle
|
1162
|
+
# The month to start full cycle periods. Ranges from 1 to 12.
|
1065
1163
|
attr_accessor :month
|
1066
|
-
# The second of the minute the
|
1164
|
+
# The second of the minute the anchor should be. Ranges from 0 to 59.
|
1067
1165
|
attr_accessor :second
|
1068
1166
|
|
1069
1167
|
def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil)
|