stripe 21.0.0 → 21.1.0
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_operations/request.rb +16 -7
- data/lib/stripe/api_operations/save.rb +4 -4
- data/lib/stripe/api_requestor.rb +54 -34
- data/lib/stripe/api_resource.rb +1 -2
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/connection_manager.rb +3 -0
- data/lib/stripe/event_types.rb +20 -0
- data/lib/stripe/events/v2_core_account_closed_event.rb +2 -2
- data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +2 -2
- data/lib/stripe/events/v2_core_claimable_sandbox_claimed_event.rb +44 -0
- data/lib/stripe/events/v2_core_claimable_sandbox_created_event.rb +44 -0
- data/lib/stripe/events/v2_core_claimable_sandbox_expired_event.rb +44 -0
- data/lib/stripe/events/v2_core_claimable_sandbox_expiring_event.rb +44 -0
- data/lib/stripe/events/v2_core_claimable_sandbox_updated_event.rb +44 -0
- data/lib/stripe/object_types.rb +1 -0
- data/lib/stripe/params/billing_portal/configuration_create_params.rb +1 -1
- data/lib/stripe/params/billing_portal/configuration_update_params.rb +1 -1
- data/lib/stripe/params/checkout/session_create_params.rb +8 -1
- data/lib/stripe/params/coupon_create_params.rb +1 -1
- data/lib/stripe/params/financial_connections/session_create_params.rb +1 -1
- data/lib/stripe/params/invoice_item_create_params.rb +1 -1
- data/lib/stripe/params/payment_intent_capture_params.rb +663 -1
- data/lib/stripe/params/payment_intent_confirm_params.rb +663 -1
- data/lib/stripe/params/payment_intent_create_params.rb +664 -2
- data/lib/stripe/params/payment_intent_update_params.rb +664 -2
- data/lib/stripe/params/payment_link_update_params.rb +4 -0
- data/lib/stripe/params/product_create_params.rb +4 -1
- data/lib/stripe/params/product_update_params.rb +4 -1
- data/lib/stripe/params/quote_create_params.rb +1 -1
- data/lib/stripe/params/quote_update_params.rb +1 -1
- data/lib/stripe/params/reporting/report_run_create_params.rb +4 -0
- data/lib/stripe/params/tax/registration_create_params.rb +13 -1
- data/lib/stripe/params/test_helpers/treasury/inbound_transfer_fail_params.rb +23 -1
- data/lib/stripe/params/test_helpers/treasury/inbound_transfer_return_inbound_transfer_params.rb +34 -1
- data/lib/stripe/params/treasury/inbound_transfer_fail_params.rb +23 -1
- data/lib/stripe/params/treasury/inbound_transfer_return_inbound_transfer_params.rb +34 -1
- data/lib/stripe/params/v2/core/account_create_params.rb +138 -4
- data/lib/stripe/params/v2/core/account_link_create_params.rb +19 -1
- data/lib/stripe/params/v2/core/account_update_params.rb +138 -4
- data/lib/stripe/params/v2/core/claimable_sandbox_create_params.rb +63 -0
- data/lib/stripe/params/v2/core/claimable_sandbox_renew_onboarding_link_params.rb +32 -0
- data/lib/stripe/params/v2/core/claimable_sandbox_retrieve_params.rb +17 -0
- data/lib/stripe/params/v2/money_management/financial_account_list_params.rb +1 -1
- data/lib/stripe/params/v2/money_management/financial_address_create_params.rb +2 -2
- data/lib/stripe/params.rb +7 -0
- data/lib/stripe/request_options.rb +19 -2
- data/lib/stripe/resources/apps/install.rb +2 -2
- data/lib/stripe/resources/balance_transaction.rb +1 -1
- data/lib/stripe/resources/charge.rb +274 -5
- data/lib/stripe/resources/checkout/session.rb +4 -0
- data/lib/stripe/resources/confirmation_token.rb +2 -2
- data/lib/stripe/resources/coupon.rb +6 -3
- data/lib/stripe/resources/dispute.rb +1 -1
- data/lib/stripe/resources/event.rb +2 -2
- data/lib/stripe/resources/issuing/card.rb +1 -1
- data/lib/stripe/resources/payment_attempt_record.rb +4 -1
- data/lib/stripe/resources/payment_intent.rb +575 -2
- data/lib/stripe/resources/payment_method.rb +2 -2
- data/lib/stripe/resources/payment_record.rb +4 -1
- data/lib/stripe/resources/product.rb +2 -0
- data/lib/stripe/resources/radar/payment_evaluation.rb +1 -1
- data/lib/stripe/resources/refund.rb +38 -0
- data/lib/stripe/resources/reporting/report_run.rb +2 -0
- data/lib/stripe/resources/reserve/hold.rb +1 -1
- data/lib/stripe/resources/setup_attempt.rb +2 -2
- data/lib/stripe/resources/setup_intent.rb +1 -1
- data/lib/stripe/resources/tax/registration.rb +16 -1
- data/lib/stripe/resources/treasury/inbound_transfer.rb +35 -7
- data/lib/stripe/resources/treasury/outbound_payment.rb +37 -9
- data/lib/stripe/resources/treasury/outbound_transfer.rb +37 -9
- data/lib/stripe/resources/treasury/received_credit.rb +1 -1
- data/lib/stripe/resources/treasury/received_debit.rb +1 -1
- data/lib/stripe/resources/v2/core/account.rb +246 -3
- data/lib/stripe/resources/v2/core/account_link.rb +18 -1
- data/lib/stripe/resources/v2/core/account_person_token.rb +2 -0
- data/lib/stripe/resources/v2/core/account_token.rb +3 -1
- data/lib/stripe/resources/v2/core/claimable_sandbox.rb +269 -0
- data/lib/stripe/resources/v2/core/event_base.rb +8 -25
- data/lib/stripe/resources/v2/core/event_notification.rb +32 -0
- data/lib/stripe/resources.rb +17 -0
- data/lib/stripe/services/apps/install_service.rb +2 -2
- data/lib/stripe/services/checkout/session_service.rb +2 -0
- data/lib/stripe/services/event_service.rb +1 -1
- data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +3 -3
- data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +4 -4
- data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +4 -4
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -1
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -1
- data/lib/stripe/services/v2/core/account_link_service.rb +1 -1
- data/lib/stripe/services/v2/core/account_token_service.rb +2 -2
- data/lib/stripe/services/v2/core/accounts/person_token_service.rb +2 -1
- data/lib/stripe/services/v2/core/claimable_sandbox_service.rb +49 -0
- data/lib/stripe/services/v2/core_service.rb +2 -1
- data/lib/stripe/services.rb +2 -0
- data/lib/stripe/stripe_client.rb +6 -0
- data/lib/stripe/stripe_configuration.rb +9 -2
- data/lib/stripe/stripe_event_notification_handler.rb +26 -0
- data/lib/stripe/stripe_object.rb +22 -9
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe.rbi +6888 -221
- metadata +12 -2
|
@@ -266,17 +266,679 @@ module Stripe
|
|
|
266
266
|
end
|
|
267
267
|
|
|
268
268
|
class PaymentDetails < ::Stripe::RequestParams
|
|
269
|
+
class CarRentalDatum < ::Stripe::RequestParams
|
|
270
|
+
class Affiliate < ::Stripe::RequestParams
|
|
271
|
+
# Affiliate partner code.
|
|
272
|
+
attr_accessor :code
|
|
273
|
+
# Name of affiliate partner.
|
|
274
|
+
attr_accessor :name
|
|
275
|
+
|
|
276
|
+
def initialize(code: nil, name: nil)
|
|
277
|
+
@code = code
|
|
278
|
+
@name = name
|
|
279
|
+
end
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
class Distance < ::Stripe::RequestParams
|
|
283
|
+
# Distance traveled.
|
|
284
|
+
attr_accessor :amount
|
|
285
|
+
# Unit of measurement for the distance traveled. One of `miles` or `kilometers`.
|
|
286
|
+
attr_accessor :unit
|
|
287
|
+
|
|
288
|
+
def initialize(amount: nil, unit: nil)
|
|
289
|
+
@amount = amount
|
|
290
|
+
@unit = unit
|
|
291
|
+
end
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
class Driver < ::Stripe::RequestParams
|
|
295
|
+
class DateOfBirth < ::Stripe::RequestParams
|
|
296
|
+
# Day of birth (1-31).
|
|
297
|
+
attr_accessor :day
|
|
298
|
+
# Month of birth (1-12).
|
|
299
|
+
attr_accessor :month
|
|
300
|
+
# Year of birth (must be greater than 1900).
|
|
301
|
+
attr_accessor :year
|
|
302
|
+
|
|
303
|
+
def initialize(day: nil, month: nil, year: nil)
|
|
304
|
+
@day = day
|
|
305
|
+
@month = month
|
|
306
|
+
@year = year
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
# Driver's date of birth.
|
|
310
|
+
attr_accessor :date_of_birth
|
|
311
|
+
# Driver's identification number.
|
|
312
|
+
attr_accessor :driver_identification_number
|
|
313
|
+
# Driver's tax number.
|
|
314
|
+
attr_accessor :driver_tax_number
|
|
315
|
+
# Driver's full name.
|
|
316
|
+
attr_accessor :name
|
|
317
|
+
|
|
318
|
+
def initialize(
|
|
319
|
+
date_of_birth: nil,
|
|
320
|
+
driver_identification_number: nil,
|
|
321
|
+
driver_tax_number: nil,
|
|
322
|
+
name: nil
|
|
323
|
+
)
|
|
324
|
+
@date_of_birth = date_of_birth
|
|
325
|
+
@driver_identification_number = driver_identification_number
|
|
326
|
+
@driver_tax_number = driver_tax_number
|
|
327
|
+
@name = name
|
|
328
|
+
end
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
class DropOff < ::Stripe::RequestParams
|
|
332
|
+
class Address < ::Stripe::RequestParams
|
|
333
|
+
# City, district, suburb, town, or village.
|
|
334
|
+
attr_accessor :city
|
|
335
|
+
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
336
|
+
attr_accessor :country
|
|
337
|
+
# Address line 1, such as the street, PO Box, or company name.
|
|
338
|
+
attr_accessor :line1
|
|
339
|
+
# Address line 2, such as the apartment, suite, unit, or building.
|
|
340
|
+
attr_accessor :line2
|
|
341
|
+
# ZIP or postal code.
|
|
342
|
+
attr_accessor :postal_code
|
|
343
|
+
# State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
|
|
344
|
+
attr_accessor :state
|
|
345
|
+
|
|
346
|
+
def initialize(
|
|
347
|
+
city: nil,
|
|
348
|
+
country: nil,
|
|
349
|
+
line1: nil,
|
|
350
|
+
line2: nil,
|
|
351
|
+
postal_code: nil,
|
|
352
|
+
state: nil
|
|
353
|
+
)
|
|
354
|
+
@city = city
|
|
355
|
+
@country = country
|
|
356
|
+
@line1 = line1
|
|
357
|
+
@line2 = line2
|
|
358
|
+
@postal_code = postal_code
|
|
359
|
+
@state = state
|
|
360
|
+
end
|
|
361
|
+
end
|
|
362
|
+
# Address of the rental location.
|
|
363
|
+
attr_accessor :address
|
|
364
|
+
# Location name.
|
|
365
|
+
attr_accessor :location_name
|
|
366
|
+
# Timestamp for the location.
|
|
367
|
+
attr_accessor :time
|
|
368
|
+
|
|
369
|
+
def initialize(address: nil, location_name: nil, time: nil)
|
|
370
|
+
@address = address
|
|
371
|
+
@location_name = location_name
|
|
372
|
+
@time = time
|
|
373
|
+
end
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
class Insurance < ::Stripe::RequestParams
|
|
377
|
+
# Amount of the insurance coverage in cents.
|
|
378
|
+
attr_accessor :amount
|
|
379
|
+
# Currency of the insurance amount.
|
|
380
|
+
attr_accessor :currency
|
|
381
|
+
# Name of the insurance company.
|
|
382
|
+
attr_accessor :insurance_company_name
|
|
383
|
+
# Type of insurance coverage.
|
|
384
|
+
attr_accessor :insurance_type
|
|
385
|
+
|
|
386
|
+
def initialize(
|
|
387
|
+
amount: nil,
|
|
388
|
+
currency: nil,
|
|
389
|
+
insurance_company_name: nil,
|
|
390
|
+
insurance_type: nil
|
|
391
|
+
)
|
|
392
|
+
@amount = amount
|
|
393
|
+
@currency = currency
|
|
394
|
+
@insurance_company_name = insurance_company_name
|
|
395
|
+
@insurance_type = insurance_type
|
|
396
|
+
end
|
|
397
|
+
end
|
|
398
|
+
|
|
399
|
+
class Pickup < ::Stripe::RequestParams
|
|
400
|
+
class Address < ::Stripe::RequestParams
|
|
401
|
+
# City, district, suburb, town, or village.
|
|
402
|
+
attr_accessor :city
|
|
403
|
+
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
404
|
+
attr_accessor :country
|
|
405
|
+
# Address line 1, such as the street, PO Box, or company name.
|
|
406
|
+
attr_accessor :line1
|
|
407
|
+
# Address line 2, such as the apartment, suite, unit, or building.
|
|
408
|
+
attr_accessor :line2
|
|
409
|
+
# ZIP or postal code.
|
|
410
|
+
attr_accessor :postal_code
|
|
411
|
+
# State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
|
|
412
|
+
attr_accessor :state
|
|
413
|
+
|
|
414
|
+
def initialize(
|
|
415
|
+
city: nil,
|
|
416
|
+
country: nil,
|
|
417
|
+
line1: nil,
|
|
418
|
+
line2: nil,
|
|
419
|
+
postal_code: nil,
|
|
420
|
+
state: nil
|
|
421
|
+
)
|
|
422
|
+
@city = city
|
|
423
|
+
@country = country
|
|
424
|
+
@line1 = line1
|
|
425
|
+
@line2 = line2
|
|
426
|
+
@postal_code = postal_code
|
|
427
|
+
@state = state
|
|
428
|
+
end
|
|
429
|
+
end
|
|
430
|
+
# Address of the rental location.
|
|
431
|
+
attr_accessor :address
|
|
432
|
+
# Location name.
|
|
433
|
+
attr_accessor :location_name
|
|
434
|
+
# Timestamp for the location.
|
|
435
|
+
attr_accessor :time
|
|
436
|
+
|
|
437
|
+
def initialize(address: nil, location_name: nil, time: nil)
|
|
438
|
+
@address = address
|
|
439
|
+
@location_name = location_name
|
|
440
|
+
@time = time
|
|
441
|
+
end
|
|
442
|
+
end
|
|
443
|
+
|
|
444
|
+
class Total < ::Stripe::RequestParams
|
|
445
|
+
class Discounts < ::Stripe::RequestParams
|
|
446
|
+
# Corporate client discount code.
|
|
447
|
+
attr_accessor :corporate_client_code
|
|
448
|
+
# Coupon code applied to the rental.
|
|
449
|
+
attr_accessor :coupon
|
|
450
|
+
# Maximum number of free miles or kilometers included.
|
|
451
|
+
attr_accessor :maximum_free_miles_or_kilometers
|
|
452
|
+
|
|
453
|
+
def initialize(
|
|
454
|
+
corporate_client_code: nil,
|
|
455
|
+
coupon: nil,
|
|
456
|
+
maximum_free_miles_or_kilometers: nil
|
|
457
|
+
)
|
|
458
|
+
@corporate_client_code = corporate_client_code
|
|
459
|
+
@coupon = coupon
|
|
460
|
+
@maximum_free_miles_or_kilometers = maximum_free_miles_or_kilometers
|
|
461
|
+
end
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
class ExtraCharge < ::Stripe::RequestParams
|
|
465
|
+
# Amount of the extra charge in cents.
|
|
466
|
+
attr_accessor :amount
|
|
467
|
+
# Type of extra charge.
|
|
468
|
+
attr_accessor :type
|
|
469
|
+
|
|
470
|
+
def initialize(amount: nil, type: nil)
|
|
471
|
+
@amount = amount
|
|
472
|
+
@type = type
|
|
473
|
+
end
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
class Tax < ::Stripe::RequestParams
|
|
477
|
+
class TaxItem < ::Stripe::RequestParams
|
|
478
|
+
# Tax amount.
|
|
479
|
+
attr_accessor :amount
|
|
480
|
+
# Tax rate applied.
|
|
481
|
+
attr_accessor :rate
|
|
482
|
+
# Type of tax applied.
|
|
483
|
+
attr_accessor :type
|
|
484
|
+
|
|
485
|
+
def initialize(amount: nil, rate: nil, type: nil)
|
|
486
|
+
@amount = amount
|
|
487
|
+
@rate = rate
|
|
488
|
+
@type = type
|
|
489
|
+
end
|
|
490
|
+
end
|
|
491
|
+
# Indicates if the transaction is tax exempt.
|
|
492
|
+
attr_accessor :tax_exempt_indicator
|
|
493
|
+
# Array of tax details.
|
|
494
|
+
attr_accessor :tax_items
|
|
495
|
+
|
|
496
|
+
def initialize(tax_exempt_indicator: nil, tax_items: nil)
|
|
497
|
+
@tax_exempt_indicator = tax_exempt_indicator
|
|
498
|
+
@tax_items = tax_items
|
|
499
|
+
end
|
|
500
|
+
end
|
|
501
|
+
# Total amount in cents.
|
|
502
|
+
attr_accessor :amount
|
|
503
|
+
# Currency of the amount.
|
|
504
|
+
attr_accessor :currency
|
|
505
|
+
# Discount details for the rental.
|
|
506
|
+
attr_accessor :discounts
|
|
507
|
+
# Additional charges for the rental.
|
|
508
|
+
attr_accessor :extra_charges
|
|
509
|
+
# Rate per unit for the rental.
|
|
510
|
+
attr_accessor :rate_per_unit
|
|
511
|
+
# Unit of measurement for the rate.
|
|
512
|
+
attr_accessor :rate_unit
|
|
513
|
+
# Tax breakdown for the rental.
|
|
514
|
+
attr_accessor :tax
|
|
515
|
+
|
|
516
|
+
def initialize(
|
|
517
|
+
amount: nil,
|
|
518
|
+
currency: nil,
|
|
519
|
+
discounts: nil,
|
|
520
|
+
extra_charges: nil,
|
|
521
|
+
rate_per_unit: nil,
|
|
522
|
+
rate_unit: nil,
|
|
523
|
+
tax: nil
|
|
524
|
+
)
|
|
525
|
+
@amount = amount
|
|
526
|
+
@currency = currency
|
|
527
|
+
@discounts = discounts
|
|
528
|
+
@extra_charges = extra_charges
|
|
529
|
+
@rate_per_unit = rate_per_unit
|
|
530
|
+
@rate_unit = rate_unit
|
|
531
|
+
@tax = tax
|
|
532
|
+
end
|
|
533
|
+
end
|
|
534
|
+
|
|
535
|
+
class Vehicle < ::Stripe::RequestParams
|
|
536
|
+
# Make of the rental vehicle.
|
|
537
|
+
attr_accessor :make
|
|
538
|
+
# Model of the rental vehicle.
|
|
539
|
+
attr_accessor :model
|
|
540
|
+
# Odometer reading at the time of rental.
|
|
541
|
+
attr_accessor :odometer
|
|
542
|
+
# Type of the rental vehicle.
|
|
543
|
+
attr_accessor :type
|
|
544
|
+
# Class of the rental vehicle.
|
|
545
|
+
attr_accessor :vehicle_class
|
|
546
|
+
# Vehicle identification number (VIN).
|
|
547
|
+
attr_accessor :vehicle_identification_number
|
|
548
|
+
|
|
549
|
+
def initialize(
|
|
550
|
+
make: nil,
|
|
551
|
+
model: nil,
|
|
552
|
+
odometer: nil,
|
|
553
|
+
type: nil,
|
|
554
|
+
vehicle_class: nil,
|
|
555
|
+
vehicle_identification_number: nil
|
|
556
|
+
)
|
|
557
|
+
@make = make
|
|
558
|
+
@model = model
|
|
559
|
+
@odometer = odometer
|
|
560
|
+
@type = type
|
|
561
|
+
@vehicle_class = vehicle_class
|
|
562
|
+
@vehicle_identification_number = vehicle_identification_number
|
|
563
|
+
end
|
|
564
|
+
end
|
|
565
|
+
# Affiliate (such as travel agency) details for the rental.
|
|
566
|
+
attr_accessor :affiliate
|
|
567
|
+
# Booking confirmation number for the car rental.
|
|
568
|
+
attr_accessor :booking_number
|
|
569
|
+
# Name of the car rental company.
|
|
570
|
+
attr_accessor :carrier_name
|
|
571
|
+
# Customer service phone number for the car rental company.
|
|
572
|
+
attr_accessor :customer_service_phone_number
|
|
573
|
+
# Number of days the car is being rented.
|
|
574
|
+
attr_accessor :days_rented
|
|
575
|
+
# Distance details for the rental.
|
|
576
|
+
attr_accessor :distance
|
|
577
|
+
# List of drivers for the rental.
|
|
578
|
+
attr_accessor :drivers
|
|
579
|
+
# Drop-off location details.
|
|
580
|
+
attr_accessor :drop_off
|
|
581
|
+
# Insurance details for the rental.
|
|
582
|
+
attr_accessor :insurances
|
|
583
|
+
# Indicates if the customer was a no-show.
|
|
584
|
+
attr_accessor :no_show_indicator
|
|
585
|
+
# Pickup location details.
|
|
586
|
+
attr_accessor :pickup
|
|
587
|
+
# Name of the person renting the vehicle.
|
|
588
|
+
attr_accessor :renter_name
|
|
589
|
+
# Total cost breakdown for the rental.
|
|
590
|
+
attr_accessor :total
|
|
591
|
+
# Vehicle details for the rental.
|
|
592
|
+
attr_accessor :vehicle
|
|
593
|
+
|
|
594
|
+
def initialize(
|
|
595
|
+
affiliate: nil,
|
|
596
|
+
booking_number: nil,
|
|
597
|
+
carrier_name: nil,
|
|
598
|
+
customer_service_phone_number: nil,
|
|
599
|
+
days_rented: nil,
|
|
600
|
+
distance: nil,
|
|
601
|
+
drivers: nil,
|
|
602
|
+
drop_off: nil,
|
|
603
|
+
insurances: nil,
|
|
604
|
+
no_show_indicator: nil,
|
|
605
|
+
pickup: nil,
|
|
606
|
+
renter_name: nil,
|
|
607
|
+
total: nil,
|
|
608
|
+
vehicle: nil
|
|
609
|
+
)
|
|
610
|
+
@affiliate = affiliate
|
|
611
|
+
@booking_number = booking_number
|
|
612
|
+
@carrier_name = carrier_name
|
|
613
|
+
@customer_service_phone_number = customer_service_phone_number
|
|
614
|
+
@days_rented = days_rented
|
|
615
|
+
@distance = distance
|
|
616
|
+
@drivers = drivers
|
|
617
|
+
@drop_off = drop_off
|
|
618
|
+
@insurances = insurances
|
|
619
|
+
@no_show_indicator = no_show_indicator
|
|
620
|
+
@pickup = pickup
|
|
621
|
+
@renter_name = renter_name
|
|
622
|
+
@total = total
|
|
623
|
+
@vehicle = vehicle
|
|
624
|
+
end
|
|
625
|
+
end
|
|
626
|
+
|
|
627
|
+
class LodgingDatum < ::Stripe::RequestParams
|
|
628
|
+
class Accommodation < ::Stripe::RequestParams
|
|
629
|
+
# Type of accommodation.
|
|
630
|
+
attr_accessor :accommodation_type
|
|
631
|
+
# Bed type.
|
|
632
|
+
attr_accessor :bed_type
|
|
633
|
+
# Daily accommodation rate in cents.
|
|
634
|
+
attr_accessor :daily_rate_amount
|
|
635
|
+
# Number of nights.
|
|
636
|
+
attr_accessor :nights
|
|
637
|
+
# Number of rooms, cabanas, apartments, and so on.
|
|
638
|
+
attr_accessor :number_of_rooms
|
|
639
|
+
# Rate type.
|
|
640
|
+
attr_accessor :rate_type
|
|
641
|
+
# Whether smoking is allowed.
|
|
642
|
+
attr_accessor :smoking_indicator
|
|
643
|
+
|
|
644
|
+
def initialize(
|
|
645
|
+
accommodation_type: nil,
|
|
646
|
+
bed_type: nil,
|
|
647
|
+
daily_rate_amount: nil,
|
|
648
|
+
nights: nil,
|
|
649
|
+
number_of_rooms: nil,
|
|
650
|
+
rate_type: nil,
|
|
651
|
+
smoking_indicator: nil
|
|
652
|
+
)
|
|
653
|
+
@accommodation_type = accommodation_type
|
|
654
|
+
@bed_type = bed_type
|
|
655
|
+
@daily_rate_amount = daily_rate_amount
|
|
656
|
+
@nights = nights
|
|
657
|
+
@number_of_rooms = number_of_rooms
|
|
658
|
+
@rate_type = rate_type
|
|
659
|
+
@smoking_indicator = smoking_indicator
|
|
660
|
+
end
|
|
661
|
+
end
|
|
662
|
+
|
|
663
|
+
class Affiliate < ::Stripe::RequestParams
|
|
664
|
+
# Affiliate partner code.
|
|
665
|
+
attr_accessor :code
|
|
666
|
+
# Affiliate partner name.
|
|
667
|
+
attr_accessor :name
|
|
668
|
+
|
|
669
|
+
def initialize(code: nil, name: nil)
|
|
670
|
+
@code = code
|
|
671
|
+
@name = name
|
|
672
|
+
end
|
|
673
|
+
end
|
|
674
|
+
|
|
675
|
+
class Guest < ::Stripe::RequestParams
|
|
676
|
+
# Guest's full name.
|
|
677
|
+
attr_accessor :name
|
|
678
|
+
|
|
679
|
+
def initialize(name: nil)
|
|
680
|
+
@name = name
|
|
681
|
+
end
|
|
682
|
+
end
|
|
683
|
+
|
|
684
|
+
class Host < ::Stripe::RequestParams
|
|
685
|
+
class Address < ::Stripe::RequestParams
|
|
686
|
+
# City, district, suburb, town, or village.
|
|
687
|
+
attr_accessor :city
|
|
688
|
+
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
689
|
+
attr_accessor :country
|
|
690
|
+
# Address line 1, such as the street, PO Box, or company name.
|
|
691
|
+
attr_accessor :line1
|
|
692
|
+
# Address line 2, such as the apartment, suite, unit, or building.
|
|
693
|
+
attr_accessor :line2
|
|
694
|
+
# ZIP or postal code.
|
|
695
|
+
attr_accessor :postal_code
|
|
696
|
+
# State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
|
|
697
|
+
attr_accessor :state
|
|
698
|
+
|
|
699
|
+
def initialize(
|
|
700
|
+
city: nil,
|
|
701
|
+
country: nil,
|
|
702
|
+
line1: nil,
|
|
703
|
+
line2: nil,
|
|
704
|
+
postal_code: nil,
|
|
705
|
+
state: nil
|
|
706
|
+
)
|
|
707
|
+
@city = city
|
|
708
|
+
@country = country
|
|
709
|
+
@line1 = line1
|
|
710
|
+
@line2 = line2
|
|
711
|
+
@postal_code = postal_code
|
|
712
|
+
@state = state
|
|
713
|
+
end
|
|
714
|
+
end
|
|
715
|
+
# Address of the host.
|
|
716
|
+
attr_accessor :address
|
|
717
|
+
# Host's country of domicile.
|
|
718
|
+
attr_accessor :country_of_domicile
|
|
719
|
+
# Reference number for the host.
|
|
720
|
+
attr_accessor :host_reference
|
|
721
|
+
# Type of host.
|
|
722
|
+
attr_accessor :host_type
|
|
723
|
+
# Name of the lodging property or host.
|
|
724
|
+
attr_accessor :name
|
|
725
|
+
# Total number of reservations for the host.
|
|
726
|
+
attr_accessor :number_of_reservations
|
|
727
|
+
# Property phone number.
|
|
728
|
+
attr_accessor :property_phone_number
|
|
729
|
+
# Host's registration date.
|
|
730
|
+
attr_accessor :registered_at
|
|
731
|
+
|
|
732
|
+
def initialize(
|
|
733
|
+
address: nil,
|
|
734
|
+
country_of_domicile: nil,
|
|
735
|
+
host_reference: nil,
|
|
736
|
+
host_type: nil,
|
|
737
|
+
name: nil,
|
|
738
|
+
number_of_reservations: nil,
|
|
739
|
+
property_phone_number: nil,
|
|
740
|
+
registered_at: nil
|
|
741
|
+
)
|
|
742
|
+
@address = address
|
|
743
|
+
@country_of_domicile = country_of_domicile
|
|
744
|
+
@host_reference = host_reference
|
|
745
|
+
@host_type = host_type
|
|
746
|
+
@name = name
|
|
747
|
+
@number_of_reservations = number_of_reservations
|
|
748
|
+
@property_phone_number = property_phone_number
|
|
749
|
+
@registered_at = registered_at
|
|
750
|
+
end
|
|
751
|
+
end
|
|
752
|
+
|
|
753
|
+
class Insurance < ::Stripe::RequestParams
|
|
754
|
+
# Price of the insurance coverage in cents.
|
|
755
|
+
attr_accessor :amount
|
|
756
|
+
# Currency of the insurance amount.
|
|
757
|
+
attr_accessor :currency
|
|
758
|
+
# Name of the insurance company.
|
|
759
|
+
attr_accessor :insurance_company_name
|
|
760
|
+
# Type of insurance coverage.
|
|
761
|
+
attr_accessor :insurance_type
|
|
762
|
+
|
|
763
|
+
def initialize(
|
|
764
|
+
amount: nil,
|
|
765
|
+
currency: nil,
|
|
766
|
+
insurance_company_name: nil,
|
|
767
|
+
insurance_type: nil
|
|
768
|
+
)
|
|
769
|
+
@amount = amount
|
|
770
|
+
@currency = currency
|
|
771
|
+
@insurance_company_name = insurance_company_name
|
|
772
|
+
@insurance_type = insurance_type
|
|
773
|
+
end
|
|
774
|
+
end
|
|
775
|
+
|
|
776
|
+
class Total < ::Stripe::RequestParams
|
|
777
|
+
class Discounts < ::Stripe::RequestParams
|
|
778
|
+
# Corporate client discount code.
|
|
779
|
+
attr_accessor :corporate_client_code
|
|
780
|
+
# Coupon code.
|
|
781
|
+
attr_accessor :coupon
|
|
782
|
+
|
|
783
|
+
def initialize(corporate_client_code: nil, coupon: nil)
|
|
784
|
+
@corporate_client_code = corporate_client_code
|
|
785
|
+
@coupon = coupon
|
|
786
|
+
end
|
|
787
|
+
end
|
|
788
|
+
|
|
789
|
+
class ExtraCharge < ::Stripe::RequestParams
|
|
790
|
+
# Amount of the extra charge in cents.
|
|
791
|
+
attr_accessor :amount
|
|
792
|
+
# Type of extra charge.
|
|
793
|
+
attr_accessor :type
|
|
794
|
+
|
|
795
|
+
def initialize(amount: nil, type: nil)
|
|
796
|
+
@amount = amount
|
|
797
|
+
@type = type
|
|
798
|
+
end
|
|
799
|
+
end
|
|
800
|
+
|
|
801
|
+
class Tax < ::Stripe::RequestParams
|
|
802
|
+
class TaxItem < ::Stripe::RequestParams
|
|
803
|
+
# Tax amount in cents.
|
|
804
|
+
attr_accessor :amount
|
|
805
|
+
# Tax rate.
|
|
806
|
+
attr_accessor :rate
|
|
807
|
+
# Type of tax applied.
|
|
808
|
+
attr_accessor :type
|
|
809
|
+
|
|
810
|
+
def initialize(amount: nil, rate: nil, type: nil)
|
|
811
|
+
@amount = amount
|
|
812
|
+
@rate = rate
|
|
813
|
+
@type = type
|
|
814
|
+
end
|
|
815
|
+
end
|
|
816
|
+
# Indicates whether the transaction is tax exempt.
|
|
817
|
+
attr_accessor :tax_exempt_indicator
|
|
818
|
+
# Tax details.
|
|
819
|
+
attr_accessor :tax_items
|
|
820
|
+
|
|
821
|
+
def initialize(tax_exempt_indicator: nil, tax_items: nil)
|
|
822
|
+
@tax_exempt_indicator = tax_exempt_indicator
|
|
823
|
+
@tax_items = tax_items
|
|
824
|
+
end
|
|
825
|
+
end
|
|
826
|
+
# Total price of the lodging reservation in cents.
|
|
827
|
+
attr_accessor :amount
|
|
828
|
+
# Cash advances in cents.
|
|
829
|
+
attr_accessor :cash_advances
|
|
830
|
+
# Currency of the total amount.
|
|
831
|
+
attr_accessor :currency
|
|
832
|
+
# Discount details for the lodging.
|
|
833
|
+
attr_accessor :discounts
|
|
834
|
+
# Additional charges for the lodging.
|
|
835
|
+
attr_accessor :extra_charges
|
|
836
|
+
# Prepaid amount in cents.
|
|
837
|
+
attr_accessor :prepaid_amount
|
|
838
|
+
# Tax breakdown for the lodging reservation.
|
|
839
|
+
attr_accessor :tax
|
|
840
|
+
|
|
841
|
+
def initialize(
|
|
842
|
+
amount: nil,
|
|
843
|
+
cash_advances: nil,
|
|
844
|
+
currency: nil,
|
|
845
|
+
discounts: nil,
|
|
846
|
+
extra_charges: nil,
|
|
847
|
+
prepaid_amount: nil,
|
|
848
|
+
tax: nil
|
|
849
|
+
)
|
|
850
|
+
@amount = amount
|
|
851
|
+
@cash_advances = cash_advances
|
|
852
|
+
@currency = currency
|
|
853
|
+
@discounts = discounts
|
|
854
|
+
@extra_charges = extra_charges
|
|
855
|
+
@prepaid_amount = prepaid_amount
|
|
856
|
+
@tax = tax
|
|
857
|
+
end
|
|
858
|
+
end
|
|
859
|
+
# Accommodation details for the lodging.
|
|
860
|
+
attr_accessor :accommodation
|
|
861
|
+
# Affiliate details if applicable.
|
|
862
|
+
attr_accessor :affiliate
|
|
863
|
+
# Booking confirmation number for the lodging.
|
|
864
|
+
attr_accessor :booking_number
|
|
865
|
+
# Check-in date.
|
|
866
|
+
attr_accessor :checkin_at
|
|
867
|
+
# Check-out date.
|
|
868
|
+
attr_accessor :checkout_at
|
|
869
|
+
# Customer service phone number for the lodging company.
|
|
870
|
+
attr_accessor :customer_service_phone_number
|
|
871
|
+
# Whether the lodging is compliant with any hotel fire safety regulations.
|
|
872
|
+
attr_accessor :fire_safety_act_compliance_indicator
|
|
873
|
+
# List of guests for the lodging.
|
|
874
|
+
attr_accessor :guests
|
|
875
|
+
# Host details for the lodging.
|
|
876
|
+
attr_accessor :host
|
|
877
|
+
# List of insurances for the lodging.
|
|
878
|
+
attr_accessor :insurances
|
|
879
|
+
# Whether the renter is a no-show.
|
|
880
|
+
attr_accessor :no_show_indicator
|
|
881
|
+
# Renter ID number for the lodging.
|
|
882
|
+
attr_accessor :renter_id_number
|
|
883
|
+
# Renter name for the lodging.
|
|
884
|
+
attr_accessor :renter_name
|
|
885
|
+
# Total details for the lodging.
|
|
886
|
+
attr_accessor :total
|
|
887
|
+
|
|
888
|
+
def initialize(
|
|
889
|
+
accommodation: nil,
|
|
890
|
+
affiliate: nil,
|
|
891
|
+
booking_number: nil,
|
|
892
|
+
checkin_at: nil,
|
|
893
|
+
checkout_at: nil,
|
|
894
|
+
customer_service_phone_number: nil,
|
|
895
|
+
fire_safety_act_compliance_indicator: nil,
|
|
896
|
+
guests: nil,
|
|
897
|
+
host: nil,
|
|
898
|
+
insurances: nil,
|
|
899
|
+
no_show_indicator: nil,
|
|
900
|
+
renter_id_number: nil,
|
|
901
|
+
renter_name: nil,
|
|
902
|
+
total: nil
|
|
903
|
+
)
|
|
904
|
+
@accommodation = accommodation
|
|
905
|
+
@affiliate = affiliate
|
|
906
|
+
@booking_number = booking_number
|
|
907
|
+
@checkin_at = checkin_at
|
|
908
|
+
@checkout_at = checkout_at
|
|
909
|
+
@customer_service_phone_number = customer_service_phone_number
|
|
910
|
+
@fire_safety_act_compliance_indicator = fire_safety_act_compliance_indicator
|
|
911
|
+
@guests = guests
|
|
912
|
+
@host = host
|
|
913
|
+
@insurances = insurances
|
|
914
|
+
@no_show_indicator = no_show_indicator
|
|
915
|
+
@renter_id_number = renter_id_number
|
|
916
|
+
@renter_name = renter_name
|
|
917
|
+
@total = total
|
|
918
|
+
end
|
|
919
|
+
end
|
|
920
|
+
# Car rental data for this PaymentIntent.
|
|
921
|
+
attr_accessor :car_rental_data
|
|
269
922
|
# A unique value to identify the customer. This field is available only for card payments.
|
|
270
923
|
#
|
|
271
924
|
# This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent to card networks.
|
|
272
925
|
attr_accessor :customer_reference
|
|
926
|
+
# Lodging data for this PaymentIntent.
|
|
927
|
+
attr_accessor :lodging_data
|
|
273
928
|
# A unique value assigned by the business to identify the transaction. Required for L2 and L3 rates.
|
|
274
929
|
#
|
|
275
930
|
# For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before being sent to card networks. For Klarna, this field is truncated to 255 characters and is visible to customers when they view the order in the Klarna app.
|
|
276
931
|
attr_accessor :order_reference
|
|
277
932
|
|
|
278
|
-
def initialize(
|
|
933
|
+
def initialize(
|
|
934
|
+
car_rental_data: nil,
|
|
935
|
+
customer_reference: nil,
|
|
936
|
+
lodging_data: nil,
|
|
937
|
+
order_reference: nil
|
|
938
|
+
)
|
|
939
|
+
@car_rental_data = car_rental_data
|
|
279
940
|
@customer_reference = customer_reference
|
|
941
|
+
@lodging_data = lodging_data
|
|
280
942
|
@order_reference = order_reference
|
|
281
943
|
end
|
|
282
944
|
end
|
|
@@ -3071,7 +3733,7 @@ module Stripe
|
|
|
3071
3733
|
#
|
|
3072
3734
|
# Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead.
|
|
3073
3735
|
attr_accessor :statement_descriptor
|
|
3074
|
-
# Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement.
|
|
3736
|
+
# Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. A suffix longer than 22 characters returns an error. If a valid suffix makes the complete statement descriptor longer than 22 characters, Stripe truncates the descriptor instead of returning an error. Learn how to [fit the suffix in the complete descriptor](https://docs.stripe.com/get-started/account/statement-descriptors#suffix-length).
|
|
3075
3737
|
attr_accessor :statement_descriptor_suffix
|
|
3076
3738
|
# The parameters that you can use to automatically create a Transfer.
|
|
3077
3739
|
# Learn more about the [use case for connected accounts](https://docs.stripe.com/payments/connected-accounts).
|