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