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.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_operations/request.rb +16 -7
  3. data/lib/stripe/api_operations/save.rb +4 -4
  4. data/lib/stripe/api_requestor.rb +54 -34
  5. data/lib/stripe/api_resource.rb +1 -2
  6. data/lib/stripe/api_version.rb +1 -1
  7. data/lib/stripe/connection_manager.rb +3 -0
  8. data/lib/stripe/event_types.rb +20 -0
  9. data/lib/stripe/events/v2_core_account_closed_event.rb +2 -2
  10. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +2 -2
  11. data/lib/stripe/events/v2_core_claimable_sandbox_claimed_event.rb +44 -0
  12. data/lib/stripe/events/v2_core_claimable_sandbox_created_event.rb +44 -0
  13. data/lib/stripe/events/v2_core_claimable_sandbox_expired_event.rb +44 -0
  14. data/lib/stripe/events/v2_core_claimable_sandbox_expiring_event.rb +44 -0
  15. data/lib/stripe/events/v2_core_claimable_sandbox_updated_event.rb +44 -0
  16. data/lib/stripe/object_types.rb +1 -0
  17. data/lib/stripe/params/billing_portal/configuration_create_params.rb +1 -1
  18. data/lib/stripe/params/billing_portal/configuration_update_params.rb +1 -1
  19. data/lib/stripe/params/checkout/session_create_params.rb +8 -1
  20. data/lib/stripe/params/coupon_create_params.rb +1 -1
  21. data/lib/stripe/params/financial_connections/session_create_params.rb +1 -1
  22. data/lib/stripe/params/invoice_item_create_params.rb +1 -1
  23. data/lib/stripe/params/payment_intent_capture_params.rb +663 -1
  24. data/lib/stripe/params/payment_intent_confirm_params.rb +663 -1
  25. data/lib/stripe/params/payment_intent_create_params.rb +664 -2
  26. data/lib/stripe/params/payment_intent_update_params.rb +664 -2
  27. data/lib/stripe/params/payment_link_update_params.rb +4 -0
  28. data/lib/stripe/params/product_create_params.rb +4 -1
  29. data/lib/stripe/params/product_update_params.rb +4 -1
  30. data/lib/stripe/params/quote_create_params.rb +1 -1
  31. data/lib/stripe/params/quote_update_params.rb +1 -1
  32. data/lib/stripe/params/reporting/report_run_create_params.rb +4 -0
  33. data/lib/stripe/params/tax/registration_create_params.rb +13 -1
  34. data/lib/stripe/params/test_helpers/treasury/inbound_transfer_fail_params.rb +23 -1
  35. data/lib/stripe/params/test_helpers/treasury/inbound_transfer_return_inbound_transfer_params.rb +34 -1
  36. data/lib/stripe/params/treasury/inbound_transfer_fail_params.rb +23 -1
  37. data/lib/stripe/params/treasury/inbound_transfer_return_inbound_transfer_params.rb +34 -1
  38. data/lib/stripe/params/v2/core/account_create_params.rb +138 -4
  39. data/lib/stripe/params/v2/core/account_link_create_params.rb +19 -1
  40. data/lib/stripe/params/v2/core/account_update_params.rb +138 -4
  41. data/lib/stripe/params/v2/core/claimable_sandbox_create_params.rb +63 -0
  42. data/lib/stripe/params/v2/core/claimable_sandbox_renew_onboarding_link_params.rb +32 -0
  43. data/lib/stripe/params/v2/core/claimable_sandbox_retrieve_params.rb +17 -0
  44. data/lib/stripe/params/v2/money_management/financial_account_list_params.rb +1 -1
  45. data/lib/stripe/params/v2/money_management/financial_address_create_params.rb +2 -2
  46. data/lib/stripe/params.rb +7 -0
  47. data/lib/stripe/request_options.rb +19 -2
  48. data/lib/stripe/resources/apps/install.rb +2 -2
  49. data/lib/stripe/resources/balance_transaction.rb +1 -1
  50. data/lib/stripe/resources/charge.rb +274 -5
  51. data/lib/stripe/resources/checkout/session.rb +4 -0
  52. data/lib/stripe/resources/confirmation_token.rb +2 -2
  53. data/lib/stripe/resources/coupon.rb +6 -3
  54. data/lib/stripe/resources/dispute.rb +1 -1
  55. data/lib/stripe/resources/event.rb +2 -2
  56. data/lib/stripe/resources/issuing/card.rb +1 -1
  57. data/lib/stripe/resources/payment_attempt_record.rb +4 -1
  58. data/lib/stripe/resources/payment_intent.rb +575 -2
  59. data/lib/stripe/resources/payment_method.rb +2 -2
  60. data/lib/stripe/resources/payment_record.rb +4 -1
  61. data/lib/stripe/resources/product.rb +2 -0
  62. data/lib/stripe/resources/radar/payment_evaluation.rb +1 -1
  63. data/lib/stripe/resources/refund.rb +38 -0
  64. data/lib/stripe/resources/reporting/report_run.rb +2 -0
  65. data/lib/stripe/resources/reserve/hold.rb +1 -1
  66. data/lib/stripe/resources/setup_attempt.rb +2 -2
  67. data/lib/stripe/resources/setup_intent.rb +1 -1
  68. data/lib/stripe/resources/tax/registration.rb +16 -1
  69. data/lib/stripe/resources/treasury/inbound_transfer.rb +35 -7
  70. data/lib/stripe/resources/treasury/outbound_payment.rb +37 -9
  71. data/lib/stripe/resources/treasury/outbound_transfer.rb +37 -9
  72. data/lib/stripe/resources/treasury/received_credit.rb +1 -1
  73. data/lib/stripe/resources/treasury/received_debit.rb +1 -1
  74. data/lib/stripe/resources/v2/core/account.rb +246 -3
  75. data/lib/stripe/resources/v2/core/account_link.rb +18 -1
  76. data/lib/stripe/resources/v2/core/account_person_token.rb +2 -0
  77. data/lib/stripe/resources/v2/core/account_token.rb +3 -1
  78. data/lib/stripe/resources/v2/core/claimable_sandbox.rb +269 -0
  79. data/lib/stripe/resources/v2/core/event_base.rb +8 -25
  80. data/lib/stripe/resources/v2/core/event_notification.rb +32 -0
  81. data/lib/stripe/resources.rb +17 -0
  82. data/lib/stripe/services/apps/install_service.rb +2 -2
  83. data/lib/stripe/services/checkout/session_service.rb +2 -0
  84. data/lib/stripe/services/event_service.rb +1 -1
  85. data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +3 -3
  86. data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +4 -4
  87. data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +4 -4
  88. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -1
  89. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -1
  90. data/lib/stripe/services/v2/core/account_link_service.rb +1 -1
  91. data/lib/stripe/services/v2/core/account_token_service.rb +2 -2
  92. data/lib/stripe/services/v2/core/accounts/person_token_service.rb +2 -1
  93. data/lib/stripe/services/v2/core/claimable_sandbox_service.rb +49 -0
  94. data/lib/stripe/services/v2/core_service.rb +2 -1
  95. data/lib/stripe/services.rb +2 -0
  96. data/lib/stripe/stripe_client.rb +6 -0
  97. data/lib/stripe/stripe_configuration.rb +9 -2
  98. data/lib/stripe/stripe_event_notification_handler.rb +26 -0
  99. data/lib/stripe/stripe_object.rb +22 -9
  100. data/lib/stripe/version.rb +1 -1
  101. data/rbi/stripe.rbi +6888 -221
  102. metadata +12 -2
@@ -99,7 +99,7 @@ module Stripe
99
99
  attr_accessor :quantity
100
100
  # Non-negative decimal with at most 12 decimal places. The quantity of units for the invoice item.
101
101
  attr_accessor :quantity_decimal
102
- # The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
102
+ # The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. You can use this parameter with either `customer` or `customer_account`. The subscription must belong to the customer you specify.
103
103
  attr_accessor :subscription
104
104
  # Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
105
105
  attr_accessor :tax_behavior
@@ -213,17 +213,679 @@ module Stripe
213
213
  end
214
214
 
215
215
  class PaymentDetails < ::Stripe::RequestParams
216
+ class CarRentalDatum < ::Stripe::RequestParams
217
+ class Affiliate < ::Stripe::RequestParams
218
+ # Affiliate partner code.
219
+ attr_accessor :code
220
+ # Name of affiliate partner.
221
+ attr_accessor :name
222
+
223
+ def initialize(code: nil, name: nil)
224
+ @code = code
225
+ @name = name
226
+ end
227
+ end
228
+
229
+ class Distance < ::Stripe::RequestParams
230
+ # Distance traveled.
231
+ attr_accessor :amount
232
+ # Unit of measurement for the distance traveled. One of `miles` or `kilometers`.
233
+ attr_accessor :unit
234
+
235
+ def initialize(amount: nil, unit: nil)
236
+ @amount = amount
237
+ @unit = unit
238
+ end
239
+ end
240
+
241
+ class Driver < ::Stripe::RequestParams
242
+ class DateOfBirth < ::Stripe::RequestParams
243
+ # Day of birth (1-31).
244
+ attr_accessor :day
245
+ # Month of birth (1-12).
246
+ attr_accessor :month
247
+ # Year of birth (must be greater than 1900).
248
+ attr_accessor :year
249
+
250
+ def initialize(day: nil, month: nil, year: nil)
251
+ @day = day
252
+ @month = month
253
+ @year = year
254
+ end
255
+ end
256
+ # Driver's date of birth.
257
+ attr_accessor :date_of_birth
258
+ # Driver's identification number.
259
+ attr_accessor :driver_identification_number
260
+ # Driver's tax number.
261
+ attr_accessor :driver_tax_number
262
+ # Driver's full name.
263
+ attr_accessor :name
264
+
265
+ def initialize(
266
+ date_of_birth: nil,
267
+ driver_identification_number: nil,
268
+ driver_tax_number: nil,
269
+ name: nil
270
+ )
271
+ @date_of_birth = date_of_birth
272
+ @driver_identification_number = driver_identification_number
273
+ @driver_tax_number = driver_tax_number
274
+ @name = name
275
+ end
276
+ end
277
+
278
+ class DropOff < ::Stripe::RequestParams
279
+ class Address < ::Stripe::RequestParams
280
+ # City, district, suburb, town, or village.
281
+ attr_accessor :city
282
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
283
+ attr_accessor :country
284
+ # Address line 1, such as the street, PO Box, or company name.
285
+ attr_accessor :line1
286
+ # Address line 2, such as the apartment, suite, unit, or building.
287
+ attr_accessor :line2
288
+ # ZIP or postal code.
289
+ attr_accessor :postal_code
290
+ # State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
291
+ attr_accessor :state
292
+
293
+ def initialize(
294
+ city: nil,
295
+ country: nil,
296
+ line1: nil,
297
+ line2: nil,
298
+ postal_code: nil,
299
+ state: nil
300
+ )
301
+ @city = city
302
+ @country = country
303
+ @line1 = line1
304
+ @line2 = line2
305
+ @postal_code = postal_code
306
+ @state = state
307
+ end
308
+ end
309
+ # Address of the rental location.
310
+ attr_accessor :address
311
+ # Location name.
312
+ attr_accessor :location_name
313
+ # Timestamp for the location.
314
+ attr_accessor :time
315
+
316
+ def initialize(address: nil, location_name: nil, time: nil)
317
+ @address = address
318
+ @location_name = location_name
319
+ @time = time
320
+ end
321
+ end
322
+
323
+ class Insurance < ::Stripe::RequestParams
324
+ # Amount of the insurance coverage in cents.
325
+ attr_accessor :amount
326
+ # Currency of the insurance amount.
327
+ attr_accessor :currency
328
+ # Name of the insurance company.
329
+ attr_accessor :insurance_company_name
330
+ # Type of insurance coverage.
331
+ attr_accessor :insurance_type
332
+
333
+ def initialize(
334
+ amount: nil,
335
+ currency: nil,
336
+ insurance_company_name: nil,
337
+ insurance_type: nil
338
+ )
339
+ @amount = amount
340
+ @currency = currency
341
+ @insurance_company_name = insurance_company_name
342
+ @insurance_type = insurance_type
343
+ end
344
+ end
345
+
346
+ class Pickup < ::Stripe::RequestParams
347
+ class Address < ::Stripe::RequestParams
348
+ # City, district, suburb, town, or village.
349
+ attr_accessor :city
350
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
351
+ attr_accessor :country
352
+ # Address line 1, such as the street, PO Box, or company name.
353
+ attr_accessor :line1
354
+ # Address line 2, such as the apartment, suite, unit, or building.
355
+ attr_accessor :line2
356
+ # ZIP or postal code.
357
+ attr_accessor :postal_code
358
+ # State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
359
+ attr_accessor :state
360
+
361
+ def initialize(
362
+ city: nil,
363
+ country: nil,
364
+ line1: nil,
365
+ line2: nil,
366
+ postal_code: nil,
367
+ state: nil
368
+ )
369
+ @city = city
370
+ @country = country
371
+ @line1 = line1
372
+ @line2 = line2
373
+ @postal_code = postal_code
374
+ @state = state
375
+ end
376
+ end
377
+ # Address of the rental location.
378
+ attr_accessor :address
379
+ # Location name.
380
+ attr_accessor :location_name
381
+ # Timestamp for the location.
382
+ attr_accessor :time
383
+
384
+ def initialize(address: nil, location_name: nil, time: nil)
385
+ @address = address
386
+ @location_name = location_name
387
+ @time = time
388
+ end
389
+ end
390
+
391
+ class Total < ::Stripe::RequestParams
392
+ class Discounts < ::Stripe::RequestParams
393
+ # Corporate client discount code.
394
+ attr_accessor :corporate_client_code
395
+ # Coupon code applied to the rental.
396
+ attr_accessor :coupon
397
+ # Maximum number of free miles or kilometers included.
398
+ attr_accessor :maximum_free_miles_or_kilometers
399
+
400
+ def initialize(
401
+ corporate_client_code: nil,
402
+ coupon: nil,
403
+ maximum_free_miles_or_kilometers: nil
404
+ )
405
+ @corporate_client_code = corporate_client_code
406
+ @coupon = coupon
407
+ @maximum_free_miles_or_kilometers = maximum_free_miles_or_kilometers
408
+ end
409
+ end
410
+
411
+ class ExtraCharge < ::Stripe::RequestParams
412
+ # Amount of the extra charge in cents.
413
+ attr_accessor :amount
414
+ # Type of extra charge.
415
+ attr_accessor :type
416
+
417
+ def initialize(amount: nil, type: nil)
418
+ @amount = amount
419
+ @type = type
420
+ end
421
+ end
422
+
423
+ class Tax < ::Stripe::RequestParams
424
+ class TaxItem < ::Stripe::RequestParams
425
+ # Tax amount.
426
+ attr_accessor :amount
427
+ # Tax rate applied.
428
+ attr_accessor :rate
429
+ # Type of tax applied.
430
+ attr_accessor :type
431
+
432
+ def initialize(amount: nil, rate: nil, type: nil)
433
+ @amount = amount
434
+ @rate = rate
435
+ @type = type
436
+ end
437
+ end
438
+ # Indicates if the transaction is tax exempt.
439
+ attr_accessor :tax_exempt_indicator
440
+ # Array of tax details.
441
+ attr_accessor :tax_items
442
+
443
+ def initialize(tax_exempt_indicator: nil, tax_items: nil)
444
+ @tax_exempt_indicator = tax_exempt_indicator
445
+ @tax_items = tax_items
446
+ end
447
+ end
448
+ # Total amount in cents.
449
+ attr_accessor :amount
450
+ # Currency of the amount.
451
+ attr_accessor :currency
452
+ # Discount details for the rental.
453
+ attr_accessor :discounts
454
+ # Additional charges for the rental.
455
+ attr_accessor :extra_charges
456
+ # Rate per unit for the rental.
457
+ attr_accessor :rate_per_unit
458
+ # Unit of measurement for the rate.
459
+ attr_accessor :rate_unit
460
+ # Tax breakdown for the rental.
461
+ attr_accessor :tax
462
+
463
+ def initialize(
464
+ amount: nil,
465
+ currency: nil,
466
+ discounts: nil,
467
+ extra_charges: nil,
468
+ rate_per_unit: nil,
469
+ rate_unit: nil,
470
+ tax: nil
471
+ )
472
+ @amount = amount
473
+ @currency = currency
474
+ @discounts = discounts
475
+ @extra_charges = extra_charges
476
+ @rate_per_unit = rate_per_unit
477
+ @rate_unit = rate_unit
478
+ @tax = tax
479
+ end
480
+ end
481
+
482
+ class Vehicle < ::Stripe::RequestParams
483
+ # Make of the rental vehicle.
484
+ attr_accessor :make
485
+ # Model of the rental vehicle.
486
+ attr_accessor :model
487
+ # Odometer reading at the time of rental.
488
+ attr_accessor :odometer
489
+ # Type of the rental vehicle.
490
+ attr_accessor :type
491
+ # Class of the rental vehicle.
492
+ attr_accessor :vehicle_class
493
+ # Vehicle identification number (VIN).
494
+ attr_accessor :vehicle_identification_number
495
+
496
+ def initialize(
497
+ make: nil,
498
+ model: nil,
499
+ odometer: nil,
500
+ type: nil,
501
+ vehicle_class: nil,
502
+ vehicle_identification_number: nil
503
+ )
504
+ @make = make
505
+ @model = model
506
+ @odometer = odometer
507
+ @type = type
508
+ @vehicle_class = vehicle_class
509
+ @vehicle_identification_number = vehicle_identification_number
510
+ end
511
+ end
512
+ # Affiliate (such as travel agency) details for the rental.
513
+ attr_accessor :affiliate
514
+ # Booking confirmation number for the car rental.
515
+ attr_accessor :booking_number
516
+ # Name of the car rental company.
517
+ attr_accessor :carrier_name
518
+ # Customer service phone number for the car rental company.
519
+ attr_accessor :customer_service_phone_number
520
+ # Number of days the car is being rented.
521
+ attr_accessor :days_rented
522
+ # Distance details for the rental.
523
+ attr_accessor :distance
524
+ # List of drivers for the rental.
525
+ attr_accessor :drivers
526
+ # Drop-off location details.
527
+ attr_accessor :drop_off
528
+ # Insurance details for the rental.
529
+ attr_accessor :insurances
530
+ # Indicates if the customer was a no-show.
531
+ attr_accessor :no_show_indicator
532
+ # Pickup location details.
533
+ attr_accessor :pickup
534
+ # Name of the person renting the vehicle.
535
+ attr_accessor :renter_name
536
+ # Total cost breakdown for the rental.
537
+ attr_accessor :total
538
+ # Vehicle details for the rental.
539
+ attr_accessor :vehicle
540
+
541
+ def initialize(
542
+ affiliate: nil,
543
+ booking_number: nil,
544
+ carrier_name: nil,
545
+ customer_service_phone_number: nil,
546
+ days_rented: nil,
547
+ distance: nil,
548
+ drivers: nil,
549
+ drop_off: nil,
550
+ insurances: nil,
551
+ no_show_indicator: nil,
552
+ pickup: nil,
553
+ renter_name: nil,
554
+ total: nil,
555
+ vehicle: nil
556
+ )
557
+ @affiliate = affiliate
558
+ @booking_number = booking_number
559
+ @carrier_name = carrier_name
560
+ @customer_service_phone_number = customer_service_phone_number
561
+ @days_rented = days_rented
562
+ @distance = distance
563
+ @drivers = drivers
564
+ @drop_off = drop_off
565
+ @insurances = insurances
566
+ @no_show_indicator = no_show_indicator
567
+ @pickup = pickup
568
+ @renter_name = renter_name
569
+ @total = total
570
+ @vehicle = vehicle
571
+ end
572
+ end
573
+
574
+ class LodgingDatum < ::Stripe::RequestParams
575
+ class Accommodation < ::Stripe::RequestParams
576
+ # Type of accommodation.
577
+ attr_accessor :accommodation_type
578
+ # Bed type.
579
+ attr_accessor :bed_type
580
+ # Daily accommodation rate in cents.
581
+ attr_accessor :daily_rate_amount
582
+ # Number of nights.
583
+ attr_accessor :nights
584
+ # Number of rooms, cabanas, apartments, and so on.
585
+ attr_accessor :number_of_rooms
586
+ # Rate type.
587
+ attr_accessor :rate_type
588
+ # Whether smoking is allowed.
589
+ attr_accessor :smoking_indicator
590
+
591
+ def initialize(
592
+ accommodation_type: nil,
593
+ bed_type: nil,
594
+ daily_rate_amount: nil,
595
+ nights: nil,
596
+ number_of_rooms: nil,
597
+ rate_type: nil,
598
+ smoking_indicator: nil
599
+ )
600
+ @accommodation_type = accommodation_type
601
+ @bed_type = bed_type
602
+ @daily_rate_amount = daily_rate_amount
603
+ @nights = nights
604
+ @number_of_rooms = number_of_rooms
605
+ @rate_type = rate_type
606
+ @smoking_indicator = smoking_indicator
607
+ end
608
+ end
609
+
610
+ class Affiliate < ::Stripe::RequestParams
611
+ # Affiliate partner code.
612
+ attr_accessor :code
613
+ # Affiliate partner name.
614
+ attr_accessor :name
615
+
616
+ def initialize(code: nil, name: nil)
617
+ @code = code
618
+ @name = name
619
+ end
620
+ end
621
+
622
+ class Guest < ::Stripe::RequestParams
623
+ # Guest's full name.
624
+ attr_accessor :name
625
+
626
+ def initialize(name: nil)
627
+ @name = name
628
+ end
629
+ end
630
+
631
+ class Host < ::Stripe::RequestParams
632
+ class Address < ::Stripe::RequestParams
633
+ # City, district, suburb, town, or village.
634
+ attr_accessor :city
635
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
636
+ attr_accessor :country
637
+ # Address line 1, such as the street, PO Box, or company name.
638
+ attr_accessor :line1
639
+ # Address line 2, such as the apartment, suite, unit, or building.
640
+ attr_accessor :line2
641
+ # ZIP or postal code.
642
+ attr_accessor :postal_code
643
+ # State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
644
+ attr_accessor :state
645
+
646
+ def initialize(
647
+ city: nil,
648
+ country: nil,
649
+ line1: nil,
650
+ line2: nil,
651
+ postal_code: nil,
652
+ state: nil
653
+ )
654
+ @city = city
655
+ @country = country
656
+ @line1 = line1
657
+ @line2 = line2
658
+ @postal_code = postal_code
659
+ @state = state
660
+ end
661
+ end
662
+ # Address of the host.
663
+ attr_accessor :address
664
+ # Host's country of domicile.
665
+ attr_accessor :country_of_domicile
666
+ # Reference number for the host.
667
+ attr_accessor :host_reference
668
+ # Type of host.
669
+ attr_accessor :host_type
670
+ # Name of the lodging property or host.
671
+ attr_accessor :name
672
+ # Total number of reservations for the host.
673
+ attr_accessor :number_of_reservations
674
+ # Property phone number.
675
+ attr_accessor :property_phone_number
676
+ # Host's registration date.
677
+ attr_accessor :registered_at
678
+
679
+ def initialize(
680
+ address: nil,
681
+ country_of_domicile: nil,
682
+ host_reference: nil,
683
+ host_type: nil,
684
+ name: nil,
685
+ number_of_reservations: nil,
686
+ property_phone_number: nil,
687
+ registered_at: nil
688
+ )
689
+ @address = address
690
+ @country_of_domicile = country_of_domicile
691
+ @host_reference = host_reference
692
+ @host_type = host_type
693
+ @name = name
694
+ @number_of_reservations = number_of_reservations
695
+ @property_phone_number = property_phone_number
696
+ @registered_at = registered_at
697
+ end
698
+ end
699
+
700
+ class Insurance < ::Stripe::RequestParams
701
+ # Price of the insurance coverage in cents.
702
+ attr_accessor :amount
703
+ # Currency of the insurance amount.
704
+ attr_accessor :currency
705
+ # Name of the insurance company.
706
+ attr_accessor :insurance_company_name
707
+ # Type of insurance coverage.
708
+ attr_accessor :insurance_type
709
+
710
+ def initialize(
711
+ amount: nil,
712
+ currency: nil,
713
+ insurance_company_name: nil,
714
+ insurance_type: nil
715
+ )
716
+ @amount = amount
717
+ @currency = currency
718
+ @insurance_company_name = insurance_company_name
719
+ @insurance_type = insurance_type
720
+ end
721
+ end
722
+
723
+ class Total < ::Stripe::RequestParams
724
+ class Discounts < ::Stripe::RequestParams
725
+ # Corporate client discount code.
726
+ attr_accessor :corporate_client_code
727
+ # Coupon code.
728
+ attr_accessor :coupon
729
+
730
+ def initialize(corporate_client_code: nil, coupon: nil)
731
+ @corporate_client_code = corporate_client_code
732
+ @coupon = coupon
733
+ end
734
+ end
735
+
736
+ class ExtraCharge < ::Stripe::RequestParams
737
+ # Amount of the extra charge in cents.
738
+ attr_accessor :amount
739
+ # Type of extra charge.
740
+ attr_accessor :type
741
+
742
+ def initialize(amount: nil, type: nil)
743
+ @amount = amount
744
+ @type = type
745
+ end
746
+ end
747
+
748
+ class Tax < ::Stripe::RequestParams
749
+ class TaxItem < ::Stripe::RequestParams
750
+ # Tax amount in cents.
751
+ attr_accessor :amount
752
+ # Tax rate.
753
+ attr_accessor :rate
754
+ # Type of tax applied.
755
+ attr_accessor :type
756
+
757
+ def initialize(amount: nil, rate: nil, type: nil)
758
+ @amount = amount
759
+ @rate = rate
760
+ @type = type
761
+ end
762
+ end
763
+ # Indicates whether the transaction is tax exempt.
764
+ attr_accessor :tax_exempt_indicator
765
+ # Tax details.
766
+ attr_accessor :tax_items
767
+
768
+ def initialize(tax_exempt_indicator: nil, tax_items: nil)
769
+ @tax_exempt_indicator = tax_exempt_indicator
770
+ @tax_items = tax_items
771
+ end
772
+ end
773
+ # Total price of the lodging reservation in cents.
774
+ attr_accessor :amount
775
+ # Cash advances in cents.
776
+ attr_accessor :cash_advances
777
+ # Currency of the total amount.
778
+ attr_accessor :currency
779
+ # Discount details for the lodging.
780
+ attr_accessor :discounts
781
+ # Additional charges for the lodging.
782
+ attr_accessor :extra_charges
783
+ # Prepaid amount in cents.
784
+ attr_accessor :prepaid_amount
785
+ # Tax breakdown for the lodging reservation.
786
+ attr_accessor :tax
787
+
788
+ def initialize(
789
+ amount: nil,
790
+ cash_advances: nil,
791
+ currency: nil,
792
+ discounts: nil,
793
+ extra_charges: nil,
794
+ prepaid_amount: nil,
795
+ tax: nil
796
+ )
797
+ @amount = amount
798
+ @cash_advances = cash_advances
799
+ @currency = currency
800
+ @discounts = discounts
801
+ @extra_charges = extra_charges
802
+ @prepaid_amount = prepaid_amount
803
+ @tax = tax
804
+ end
805
+ end
806
+ # Accommodation details for the lodging.
807
+ attr_accessor :accommodation
808
+ # Affiliate details if applicable.
809
+ attr_accessor :affiliate
810
+ # Booking confirmation number for the lodging.
811
+ attr_accessor :booking_number
812
+ # Check-in date.
813
+ attr_accessor :checkin_at
814
+ # Check-out date.
815
+ attr_accessor :checkout_at
816
+ # Customer service phone number for the lodging company.
817
+ attr_accessor :customer_service_phone_number
818
+ # Whether the lodging is compliant with any hotel fire safety regulations.
819
+ attr_accessor :fire_safety_act_compliance_indicator
820
+ # List of guests for the lodging.
821
+ attr_accessor :guests
822
+ # Host details for the lodging.
823
+ attr_accessor :host
824
+ # List of insurances for the lodging.
825
+ attr_accessor :insurances
826
+ # Whether the renter is a no-show.
827
+ attr_accessor :no_show_indicator
828
+ # Renter ID number for the lodging.
829
+ attr_accessor :renter_id_number
830
+ # Renter name for the lodging.
831
+ attr_accessor :renter_name
832
+ # Total details for the lodging.
833
+ attr_accessor :total
834
+
835
+ def initialize(
836
+ accommodation: nil,
837
+ affiliate: nil,
838
+ booking_number: nil,
839
+ checkin_at: nil,
840
+ checkout_at: nil,
841
+ customer_service_phone_number: nil,
842
+ fire_safety_act_compliance_indicator: nil,
843
+ guests: nil,
844
+ host: nil,
845
+ insurances: nil,
846
+ no_show_indicator: nil,
847
+ renter_id_number: nil,
848
+ renter_name: nil,
849
+ total: nil
850
+ )
851
+ @accommodation = accommodation
852
+ @affiliate = affiliate
853
+ @booking_number = booking_number
854
+ @checkin_at = checkin_at
855
+ @checkout_at = checkout_at
856
+ @customer_service_phone_number = customer_service_phone_number
857
+ @fire_safety_act_compliance_indicator = fire_safety_act_compliance_indicator
858
+ @guests = guests
859
+ @host = host
860
+ @insurances = insurances
861
+ @no_show_indicator = no_show_indicator
862
+ @renter_id_number = renter_id_number
863
+ @renter_name = renter_name
864
+ @total = total
865
+ end
866
+ end
867
+ # Car rental data for this PaymentIntent.
868
+ attr_accessor :car_rental_data
216
869
  # A unique value to identify the customer. This field is available only for card payments.
217
870
  #
218
871
  # This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent to card networks.
219
872
  attr_accessor :customer_reference
873
+ # Lodging data for this PaymentIntent.
874
+ attr_accessor :lodging_data
220
875
  # A unique value assigned by the business to identify the transaction. Required for L2 and L3 rates.
221
876
  #
222
877
  # 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.
223
878
  attr_accessor :order_reference
224
879
 
225
- def initialize(customer_reference: nil, order_reference: nil)
880
+ def initialize(
881
+ car_rental_data: nil,
882
+ customer_reference: nil,
883
+ lodging_data: nil,
884
+ order_reference: nil
885
+ )
886
+ @car_rental_data = car_rental_data
226
887
  @customer_reference = customer_reference
888
+ @lodging_data = lodging_data
227
889
  @order_reference = order_reference
228
890
  end
229
891
  end