stripe 20.2.0.pre.alpha.1 → 20.2.0.pre.alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/event_types.rb +28 -0
  3. data/lib/stripe/events/v2_core_account_closed_event.rb +2 -2
  4. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +2 -2
  5. data/lib/stripe/events/v2_extend_object_definition_created_event.rb +61 -0
  6. data/lib/stripe/events/v2_extend_object_definition_version_created_event.rb +65 -0
  7. data/lib/stripe/events/v2_money_management_received_debit_mandate_canceled_event.rb +2 -0
  8. data/lib/stripe/events/v2_money_management_received_debit_mandate_created_event.rb +2 -0
  9. data/lib/stripe/events/v2_money_management_received_debit_mandate_expired_event.rb +2 -0
  10. data/lib/stripe/events/v2_money_management_received_debit_mandate_pending_cancellation_event.rb +2 -0
  11. data/lib/stripe/events/v2_money_management_received_debit_mandate_updated_event.rb +2 -0
  12. data/lib/stripe/events/v2_money_management_spending_mandate_canceled_event.rb +44 -0
  13. data/lib/stripe/events/v2_money_management_spending_mandate_created_event.rb +46 -0
  14. data/lib/stripe/events/v2_money_management_spending_mandate_expired_event.rb +44 -0
  15. data/lib/stripe/events/v2_money_management_spending_mandate_pending_cancellation_event.rb +44 -0
  16. data/lib/stripe/events/v2_money_management_spending_mandate_updated_event.rb +44 -0
  17. data/lib/stripe/object_types.rb +5 -0
  18. data/lib/stripe/params/account_session_create_params.rb +200 -0
  19. data/lib/stripe/params/checkout/session_create_params.rb +46 -1
  20. data/lib/stripe/params/confirmation_token_create_params.rb +21 -0
  21. data/lib/stripe/params/customer_tax_exemption_create_params.rb +29 -1
  22. data/lib/stripe/params/customer_update_params.rb +55 -0
  23. data/lib/stripe/params/fx_quote_create_params.rb +2 -2
  24. data/lib/stripe/params/invoice_create_params.rb +8 -1
  25. data/lib/stripe/params/invoice_update_params.rb +8 -1
  26. data/lib/stripe/params/payment_attempt_record_report_authenticated_params.rb +58 -1
  27. data/lib/stripe/params/payment_attempt_record_report_authorized_params.rb +35 -1
  28. data/lib/stripe/params/payment_attempt_record_report_guaranteed_params.rb +35 -1
  29. data/lib/stripe/params/payment_intent_capture_params.rb +57 -1
  30. data/lib/stripe/params/payment_intent_confirm_params.rb +91 -1
  31. data/lib/stripe/params/payment_intent_create_params.rb +91 -1
  32. data/lib/stripe/params/payment_intent_decrement_authorization_params.rb +57 -1
  33. data/lib/stripe/params/payment_intent_increment_authorization_params.rb +57 -1
  34. data/lib/stripe/params/payment_intent_update_params.rb +91 -1
  35. data/lib/stripe/params/payment_method_configuration_create_params.rb +42 -0
  36. data/lib/stripe/params/payment_method_configuration_update_params.rb +42 -0
  37. data/lib/stripe/params/payment_method_create_params.rb +21 -0
  38. data/lib/stripe/params/payment_record_report_payment_attempt_guaranteed_params.rb +35 -1
  39. data/lib/stripe/params/payment_record_report_payment_attempt_params.rb +35 -1
  40. data/lib/stripe/params/payment_record_report_payment_params.rb +35 -1
  41. data/lib/stripe/params/quote_create_params.rb +1 -1
  42. data/lib/stripe/params/quote_update_params.rb +1 -1
  43. data/lib/stripe/params/radar/payment_evaluation_create_params.rb +19 -1
  44. data/lib/stripe/params/refund_create_params.rb +4 -0
  45. data/lib/stripe/params/setup_intent_confirm_params.rb +50 -1
  46. data/lib/stripe/params/setup_intent_create_params.rb +50 -1
  47. data/lib/stripe/params/setup_intent_update_params.rb +34 -1
  48. data/lib/stripe/params/shared_payment/issued_token_create_params.rb +19 -0
  49. data/lib/stripe/params/subscription_create_params.rb +4 -0
  50. data/lib/stripe/params/subscription_list_params.rb +5 -1
  51. data/lib/stripe/params/subscription_update_params.rb +4 -0
  52. data/lib/stripe/params/tax/certificate_create_params.rb +21 -0
  53. data/lib/stripe/params/tax/certificate_delete_params.rb +8 -0
  54. data/lib/stripe/params/tax/certificate_list_params.rb +33 -0
  55. data/lib/stripe/params/tax/certificate_retrieve_params.rb +15 -0
  56. data/lib/stripe/params/tax/form_create_params.rb +504 -0
  57. data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +21 -0
  58. data/lib/stripe/params/v2/core/account_session_create_params.rb +13 -0
  59. data/lib/stripe/params/v2/extend/object_definition_list_params.rb +17 -0
  60. data/lib/stripe/params/v2/extend/object_definition_retrieve_params.rb +10 -0
  61. data/lib/stripe/params/v2/extend/object_definitions/version_list_params.rb +19 -0
  62. data/lib/stripe/params/v2/extend/object_definitions/version_retrieve_params.rb +12 -0
  63. data/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb +22 -1
  64. data/lib/stripe/params/v2/money_management/outbound_setup_intent_create_params.rb +46 -0
  65. data/lib/stripe/params/v2/money_management/payout_intent_create_params.rb +22 -1
  66. data/lib/stripe/params/v2/money_management/payout_intent_update_params.rb +22 -1
  67. data/lib/stripe/params/v2/money_management/received_debit_list_params.rb +5 -2
  68. data/lib/stripe/params/v2/money_management/spending_mandate_cancel_params.rb +10 -0
  69. data/lib/stripe/params/v2/money_management/spending_mandate_list_params.rb +26 -0
  70. data/lib/stripe/params/v2/money_management/spending_mandate_retrieve_params.rb +10 -0
  71. data/lib/stripe/params.rb +27 -0
  72. data/lib/stripe/resources/account_session.rb +81 -0
  73. data/lib/stripe/resources/apps/install.rb +1 -1
  74. data/lib/stripe/resources/balance_transaction.rb +1 -1
  75. data/lib/stripe/resources/charge.rb +373 -5
  76. data/lib/stripe/resources/checkout/session.rb +32 -0
  77. data/lib/stripe/resources/confirmation_token.rb +103 -3
  78. data/lib/stripe/resources/coupon.rb +6 -3
  79. data/lib/stripe/resources/customer_tax_exemption.rb +32 -1
  80. data/lib/stripe/resources/identity/verification_report.rb +34 -0
  81. data/lib/stripe/resources/invoice.rb +3 -0
  82. data/lib/stripe/resources/mandate.rb +16 -0
  83. data/lib/stripe/resources/payment_attempt_record.rb +151 -2
  84. data/lib/stripe/resources/payment_intent.rb +126 -2
  85. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +46 -1
  86. data/lib/stripe/resources/payment_method.rb +103 -3
  87. data/lib/stripe/resources/payment_method_configuration.rb +68 -0
  88. data/lib/stripe/resources/payment_record.rb +151 -2
  89. data/lib/stripe/resources/radar/payment_evaluation.rb +41 -2
  90. data/lib/stripe/resources/refund.rb +38 -0
  91. data/lib/stripe/resources/reporting/report_run.rb +2 -0
  92. data/lib/stripe/resources/reserve/hold.rb +2 -2
  93. data/lib/stripe/resources/reserve/plan.rb +1 -1
  94. data/lib/stripe/resources/reserve/release.rb +1 -1
  95. data/lib/stripe/resources/setup_attempt.rb +21 -2
  96. data/lib/stripe/resources/setup_intent.rb +38 -2
  97. data/lib/stripe/resources/shared_payment/granted_token.rb +32 -2
  98. data/lib/stripe/resources/shared_payment/issued_token.rb +20 -0
  99. data/lib/stripe/resources/subscription.rb +3 -1
  100. data/lib/stripe/resources/tax/certificate.rb +81 -0
  101. data/lib/stripe/resources/tax/form.rb +11 -0
  102. data/lib/stripe/resources/tax/form_correction.rb +43 -0
  103. data/lib/stripe/resources/terminal/reader.rb +18 -1
  104. data/lib/stripe/resources/treasury/inbound_transfer.rb +29 -1
  105. data/lib/stripe/resources/treasury/outbound_payment.rb +29 -1
  106. data/lib/stripe/resources/treasury/outbound_transfer.rb +29 -1
  107. data/lib/stripe/resources/v2/core/account_session.rb +27 -0
  108. data/lib/stripe/resources/v2/core/event.rb +1 -1
  109. data/lib/stripe/resources/v2/core/event_base.rb +36 -0
  110. data/lib/stripe/resources/v2/data/search_result_list.rb +1 -1
  111. data/lib/stripe/resources/v2/extend/object_definition.rb +40 -0
  112. data/lib/stripe/resources/v2/extend/object_definition_version.rb +168 -0
  113. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +74 -1
  114. data/lib/stripe/resources/v2/money_management/payout_intent.rb +22 -1
  115. data/lib/stripe/resources/v2/money_management/payout_method.rb +40 -0
  116. data/lib/stripe/resources/v2/money_management/received_debit.rb +3 -0
  117. data/lib/stripe/resources/v2/money_management/spending_mandate.rb +121 -0
  118. data/lib/stripe/resources/v2/tax/operations_resolve_address_result.rb +1 -1
  119. data/lib/stripe/resources.rb +46 -0
  120. data/lib/stripe/services/apps/install_service.rb +1 -1
  121. data/lib/stripe/services/checkout/session_service.rb +2 -0
  122. data/lib/stripe/services/reserve/hold_service.rb +2 -2
  123. data/lib/stripe/services/reserve/plan_service.rb +2 -2
  124. data/lib/stripe/services/reserve/release_service.rb +2 -2
  125. data/lib/stripe/services/tax/certificate_service.rb +52 -0
  126. data/lib/stripe/services/tax/form_service.rb +11 -0
  127. data/lib/stripe/services/tax_service.rb +2 -1
  128. data/lib/stripe/services/v2/core/vault/network_token_service.rb +1 -0
  129. data/lib/stripe/services/v2/extend/object_definition_service.rb +39 -0
  130. data/lib/stripe/services/v2/extend/object_definitions/version_service.rb +34 -0
  131. data/lib/stripe/services/v2/extend_service.rb +2 -1
  132. data/lib/stripe/services/v2/money_management/received_debit_mandate_service.rb +3 -0
  133. data/lib/stripe/services/v2/money_management/spending_mandate_service.rb +43 -0
  134. data/lib/stripe/services/v2/money_management_service.rb +2 -1
  135. data/lib/stripe/services.rb +11 -0
  136. data/lib/stripe/stripe_event_notification_handler.rb +28 -0
  137. data/lib/stripe/stripe_service.rb +13 -9
  138. data/lib/stripe/version.rb +1 -1
  139. data/lib/stripe/webhook.rb +68 -3
  140. data/lib/stripe/workload_identity_exchange.rb +2 -2
  141. data/rbi/stripe/resources/v2/core/event_base.rbi +11 -0
  142. data/rbi/stripe.rbi +5856 -213
  143. metadata +32 -2
@@ -303,6 +303,23 @@ module Stripe
303
303
  end
304
304
  end
305
305
 
306
+ class SepaDebit < ::Stripe::StripeObject
307
+ # Creditor identifier used for the intended debit.
308
+ attr_reader :creditor_id
309
+ # Describes the presence of the customer during the payment.
310
+ attr_reader :customer_presence
311
+ # Describes whether this payment is one-off or recurring.
312
+ attr_reader :payment_type
313
+
314
+ def self.inner_class_types
315
+ @inner_class_types = {}
316
+ end
317
+
318
+ def self.field_remappings
319
+ @field_remappings = {}
320
+ end
321
+ end
322
+
306
323
  class UsBankAccount < ::Stripe::StripeObject
307
324
  # Describes the presence of the customer during the payment.
308
325
  attr_reader :customer_presence
@@ -321,11 +338,13 @@ module Stripe
321
338
  attr_reader :card
322
339
  # Describes the type of money movement.
323
340
  attr_reader :money_movement_type
341
+ # Describes SEPA debit money movement details.
342
+ attr_reader :sepa_debit
324
343
  # Describes US bank account money movement details.
325
344
  attr_reader :us_bank_account
326
345
 
327
346
  def self.inner_class_types
328
- @inner_class_types = { card: Card, us_bank_account: UsBankAccount }
347
+ @inner_class_types = { card: Card, sepa_debit: SepaDebit, us_bank_account: UsBankAccount }
329
348
  end
330
349
 
331
350
  def self.field_remappings
@@ -508,6 +527,23 @@ module Stripe
508
527
  end
509
528
  end
510
529
 
530
+ class CardTesting < ::Stripe::StripeObject
531
+ # The time when this signal was evaluated.
532
+ attr_reader :evaluated_at
533
+ # Risk level of this signal, based on the score.
534
+ attr_reader :risk_level
535
+ # Numeric score for this signal, returned with two decimal places. Possible values for evaluated payments are between 0 and 100, where higher scores indicate a higher likelihood of the signal being true.
536
+ attr_reader :score
537
+
538
+ def self.inner_class_types
539
+ @inner_class_types = {}
540
+ end
541
+
542
+ def self.field_remappings
543
+ @field_remappings = {}
544
+ end
545
+ end
546
+
511
547
  class EarlyFraudWarning < ::Stripe::StripeObject
512
548
  # The time when this signal was evaluated.
513
549
  attr_reader :evaluated_at
@@ -560,6 +596,8 @@ module Stripe
560
596
  end
561
597
  # A payment evaluation signal with evaluated_at, risk_level, and score fields.
562
598
  attr_reader :bank_initiated_return
599
+ # The likelihood that this `PaymentEvaluation` is part of a card testing attack.
600
+ attr_reader :card_testing
563
601
  # The likelihood that this `PaymentEvaluation` results in an early fraud warning.
564
602
  attr_reader :early_fraud_warning
565
603
  # The likelihood that this `PaymentEvaluation` results in a dispute with reason code `fraudulent`.
@@ -570,6 +608,7 @@ module Stripe
570
608
  def self.inner_class_types
571
609
  @inner_class_types = {
572
610
  bank_initiated_return: BankInitiatedReturn,
611
+ card_testing: CardTesting,
573
612
  early_fraud_warning: EarlyFraudWarning,
574
613
  fraudulent_dispute: FraudulentDispute,
575
614
  fraudulent_payment: FraudulentPayment,
@@ -600,7 +639,7 @@ module Stripe
600
639
  attr_reader :outcome
601
640
  # Payment details attached to this payment evaluation.
602
641
  attr_reader :payment_details
603
- # Recommended action based on the score of the `fraudulent_payment` signal. Possible values are `block`, `continue` and `request_three_d_secure`.
642
+ # Recommended action for this payment based on its evaluated signals and rules.
604
643
  attr_reader :recommended_action
605
644
  # Details about Radar Rules associated with the payment evaluation.
606
645
  attr_reader :rules
@@ -83,6 +83,21 @@ module Stripe
83
83
  end
84
84
  end
85
85
 
86
+ class Bizum < ::Stripe::StripeObject
87
+ # The reference assigned to the refund.
88
+ attr_reader :reference
89
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
90
+ attr_reader :reference_status
91
+
92
+ def self.inner_class_types
93
+ @inner_class_types = {}
94
+ end
95
+
96
+ def self.field_remappings
97
+ @field_remappings = {}
98
+ end
99
+ end
100
+
86
101
  class Blik < ::Stripe::StripeObject
87
102
  # For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed.
88
103
  attr_reader :network_decline_code
@@ -451,6 +466,21 @@ module Stripe
451
466
  end
452
467
  end
453
468
 
469
+ class Upi < ::Stripe::StripeObject
470
+ # The reference assigned to the refund.
471
+ attr_reader :reference
472
+ # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
473
+ attr_reader :reference_status
474
+
475
+ def self.inner_class_types
476
+ @inner_class_types = {}
477
+ end
478
+
479
+ def self.field_remappings
480
+ @field_remappings = {}
481
+ end
482
+ end
483
+
454
484
  class UsBankTransfer < ::Stripe::StripeObject
455
485
  # The reference assigned to the refund.
456
486
  attr_reader :reference
@@ -497,6 +527,8 @@ module Stripe
497
527
  attr_reader :amazon_pay
498
528
  # Attribute for field au_bank_transfer
499
529
  attr_reader :au_bank_transfer
530
+ # Attribute for field bizum
531
+ attr_reader :bizum
500
532
  # Attribute for field blik
501
533
  attr_reader :blik
502
534
  # Attribute for field br_bank_transfer
@@ -555,6 +587,8 @@ module Stripe
555
587
  attr_reader :twint
556
588
  # The type of transaction-specific details of the payment method used in the refund (e.g., `card`). An additional hash is included on `destination_details` with a name matching this value. It contains information specific to the refund transaction.
557
589
  attr_reader :type
590
+ # Attribute for field upi
591
+ attr_reader :upi
558
592
  # Attribute for field us_bank_transfer
559
593
  attr_reader :us_bank_transfer
560
594
  # Attribute for field wechat_pay
@@ -570,6 +604,7 @@ module Stripe
570
604
  alma: Alma,
571
605
  amazon_pay: AmazonPay,
572
606
  au_bank_transfer: AuBankTransfer,
607
+ bizum: Bizum,
573
608
  blik: Blik,
574
609
  br_bank_transfer: BrBankTransfer,
575
610
  card: Card,
@@ -598,6 +633,7 @@ module Stripe
598
633
  swish: Swish,
599
634
  th_bank_transfer: ThBankTransfer,
600
635
  twint: Twint,
636
+ upi: Upi,
601
637
  us_bank_transfer: UsBankTransfer,
602
638
  wechat_pay: WechatPay,
603
639
  zip: Zip,
@@ -702,6 +738,8 @@ module Stripe
702
738
  attr_reader :payment_intent
703
739
  # ID of the payment method associated with this refund.
704
740
  attr_reader :payment_method
741
+ # ID of the PaymentRecord associated with the payment that has been refunded.
742
+ attr_reader :payment_record
705
743
  # Provides the reason for why the refund is pending. Possible values are: `processing`, `insufficient_funds`, or `charge_pending`.
706
744
  attr_reader :pending_reason
707
745
  # Attribute for field presentment_details
@@ -35,6 +35,8 @@ module Stripe
35
35
  attr_reader :payout
36
36
  # Category of balance transactions to be included in the report run.
37
37
  attr_reader :reporting_category
38
+ # The tax invoice month in YYYY-MM format.
39
+ attr_reader :tax_invoice_month
38
40
  # Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`.
39
41
  attr_reader :timezone
40
42
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Reserve
6
- # ReserveHolds are used to place a temporary ReserveHold on a merchant's funds.
6
+ # A ReserveHold holds a portion of an account's funds until it's released. Stripe or the account's platform can create a ReserveHold directly, and a ReservePlan creates ReserveHolds automatically from incoming Charges.
7
7
  class Hold < APIResource
8
8
  extend Stripe::APIOperations::List
9
9
 
@@ -76,7 +76,7 @@ module Stripe
76
76
  # Which source balance type this ReserveHold reserves funds from. One of `bank_account`, `card`, or `fpx`.
77
77
  attr_reader :source_type
78
78
 
79
- # Returns a list of ReserveHolds previously created. The ReserveHolds are returned in sorted order, with the most recent ReserveHolds appearing first.
79
+ # Returns a list of ReserveHolds on your account or on one of your connected accounts. The ReserveHolds are returned in sorted order, with the most recent ReserveHolds appearing first.
80
80
  def self.list(params = {}, opts = {})
81
81
  request_stripe_object(method: :get, path: "/v1/reserve/holds", params: params, opts: opts)
82
82
  end
@@ -82,7 +82,7 @@ module Stripe
82
82
  # The type of the ReservePlan.
83
83
  attr_reader :type
84
84
 
85
- # Returns a list of ReservePlans previously created. The ReservePlans are returned in sorted order, with the most recent ReservePlans appearing first.
85
+ # Returns a list of ReservePlans on your account or on one of your connected accounts. The ReservePlans are returned in sorted order, with the most recent ReservePlans appearing first.
86
86
  def self.list(params = {}, opts = {})
87
87
  request_stripe_object(method: :get, path: "/v1/reserve/plans", params: params, opts: opts)
88
88
  end
@@ -57,7 +57,7 @@ module Stripe
57
57
  # Attribute for field source_transaction
58
58
  attr_reader :source_transaction
59
59
 
60
- # Returns a list of ReserveReleases previously created. The ReserveReleases are returned in sorted order, with the most recent ReserveReleases appearing first.
60
+ # Returns a list of ReserveReleases on your account or on one of your connected accounts. The ReserveReleases are returned in sorted order, with the most recent ReserveReleases appearing first.
61
61
  def self.list(params = {}, opts = {})
62
62
  request_stripe_object(
63
63
  method: :get,
@@ -109,9 +109,9 @@ module Stripe
109
109
 
110
110
  class Card < ::Stripe::StripeObject
111
111
  class Checks < ::Stripe::StripeObject
112
- # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
112
+ # If an address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
113
113
  attr_reader :address_line1_check
114
- # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
114
+ # If an address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
115
115
  attr_reader :address_postal_code_check
116
116
  # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
117
117
  attr_reader :cvc_check
@@ -385,6 +385,9 @@ module Stripe
385
385
  end
386
386
 
387
387
  class Paypay < ::Stripe::StripeObject
388
+ # Uniquely identifies this particular PayPay account. You can use this attribute to check whether two PayPay accounts are the same.
389
+ attr_reader :fingerprint
390
+
388
391
  def self.inner_class_types
389
392
  @inner_class_types = {}
390
393
  end
@@ -486,6 +489,19 @@ module Stripe
486
489
  end
487
490
  end
488
491
 
492
+ class TossPay < ::Stripe::StripeObject
493
+ # The buyer identifier provided by NICE for this Toss Pay account, when available.
494
+ attr_reader :buyer_id
495
+
496
+ def self.inner_class_types
497
+ @inner_class_types = {}
498
+ end
499
+
500
+ def self.field_remappings
501
+ @field_remappings = {}
502
+ end
503
+ end
504
+
489
505
  class Twint < ::Stripe::StripeObject
490
506
  def self.inner_class_types
491
507
  @inner_class_types = {}
@@ -569,6 +585,8 @@ module Stripe
569
585
  attr_reader :sofort
570
586
  # Attribute for field stripe_balance
571
587
  attr_reader :stripe_balance
588
+ # Attribute for field toss_pay
589
+ attr_reader :toss_pay
572
590
  # Attribute for field twint
573
591
  attr_reader :twint
574
592
  # The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method.
@@ -607,6 +625,7 @@ module Stripe
607
625
  sepa_debit: SepaDebit,
608
626
  sofort: Sofort,
609
627
  stripe_balance: StripeBalance,
628
+ toss_pay: TossPay,
610
629
  twint: Twint,
611
630
  upi: Upi,
612
631
  us_bank_account: UsBankAccount,
@@ -255,7 +255,7 @@ module Stripe
255
255
  end
256
256
 
257
257
  class VerifyWithMicrodeposits < ::Stripe::StripeObject
258
- # The timestamp when the microdeposits are expected to land.
258
+ # The timestamp when the microdeposits are expected to land. Null for instant microdeposits.
259
259
  attr_reader :arrival_date
260
260
  # The URL for the hosted verification page, which allows customers to verify their bank account.
261
261
  attr_reader :hosted_verification_url
@@ -383,6 +383,19 @@ module Stripe
383
383
  end
384
384
 
385
385
  class BacsDebit < ::Stripe::StripeObject
386
+ class FinancialConnections < ::Stripe::StripeObject
387
+ # Attribute for field return_url
388
+ attr_reader :return_url
389
+
390
+ def self.inner_class_types
391
+ @inner_class_types = {}
392
+ end
393
+
394
+ def self.field_remappings
395
+ @field_remappings = {}
396
+ end
397
+ end
398
+
386
399
  class MandateOptions < ::Stripe::StripeObject
387
400
  # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
388
401
  attr_reader :reference_prefix
@@ -395,13 +408,18 @@ module Stripe
395
408
  @field_remappings = {}
396
409
  end
397
410
  end
411
+ # Attribute for field financial_connections
412
+ attr_reader :financial_connections
398
413
  # Attribute for field mandate_options
399
414
  attr_reader :mandate_options
400
415
  # Attribute for field verification_method
401
416
  attr_reader :verification_method
402
417
 
403
418
  def self.inner_class_types
404
- @inner_class_types = { mandate_options: MandateOptions }
419
+ @inner_class_types = {
420
+ financial_connections: FinancialConnections,
421
+ mandate_options: MandateOptions,
422
+ }
405
423
  end
406
424
 
407
425
  def self.field_remappings
@@ -845,6 +863,21 @@ module Stripe
845
863
  end
846
864
  end
847
865
 
866
+ class RadarOptions < ::Stripe::StripeObject
867
+ # The value you provided for whether this transaction starts a free trial. This is null if you haven't explicitly set it.
868
+ attr_reader :is_free_trial_transaction
869
+ # A [Radar Session](https://docs.stripe.com/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
870
+ attr_reader :session
871
+
872
+ def self.inner_class_types
873
+ @inner_class_types = {}
874
+ end
875
+
876
+ def self.field_remappings
877
+ @field_remappings = {}
878
+ end
879
+ end
880
+
848
881
  class Redaction < ::Stripe::StripeObject
849
882
  # Indicates whether this object and its related objects have been redacted or not.
850
883
  attr_reader :status
@@ -960,6 +993,8 @@ module Stripe
960
993
  attr_reader :payment_method_options
961
994
  # The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type).
962
995
  attr_reader :payment_method_types
996
+ # Options to configure Radar.
997
+ attr_reader :radar_options
963
998
  # Redaction status of this SetupIntent. If the SetupIntent isn't redacted, this field is null.
964
999
  attr_reader :redaction
965
1000
  # Attribute for field setup_details
@@ -1094,6 +1129,7 @@ module Stripe
1094
1129
  next_action: NextAction,
1095
1130
  payment_method_configuration_details: PaymentMethodConfigurationDetails,
1096
1131
  payment_method_options: PaymentMethodOptions,
1132
+ radar_options: RadarOptions,
1097
1133
  redaction: Redaction,
1098
1134
  setup_details: SetupDetails,
1099
1135
  }
@@ -80,9 +80,9 @@ module Stripe
80
80
 
81
81
  class Card < ::Stripe::StripeObject
82
82
  class Checks < ::Stripe::StripeObject
83
- # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
83
+ # If an address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
84
84
  attr_reader :address_line1_check
85
- # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
85
+ # If an address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
86
86
  attr_reader :address_postal_code_check
87
87
  # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
88
88
  attr_reader :cvc_check
@@ -441,6 +441,33 @@ module Stripe
441
441
  end
442
442
  end
443
443
 
444
+ class ReferralFeeDetails < ::Stripe::StripeObject
445
+ class Rate < ::Stripe::StripeObject
446
+ # The percentage of the payment amount which will be calculated as a fee.
447
+ attr_reader :percentage
448
+ # The type of fee rate.
449
+ attr_reader :type
450
+
451
+ def self.inner_class_types
452
+ @inner_class_types = {}
453
+ end
454
+
455
+ def self.field_remappings
456
+ @field_remappings = {}
457
+ end
458
+ end
459
+ # Attribute for field rate
460
+ attr_reader :rate
461
+
462
+ def self.inner_class_types
463
+ @inner_class_types = { rate: Rate }
464
+ end
465
+
466
+ def self.field_remappings
467
+ @field_remappings = {}
468
+ end
469
+ end
470
+
444
471
  class RiskDetails < ::Stripe::StripeObject
445
472
  class Insights < ::Stripe::StripeObject
446
473
  class Bot < ::Stripe::StripeObject
@@ -631,6 +658,8 @@ module Stripe
631
658
  attr_reader :object
632
659
  # Details of the PaymentMethod that was shared via this token.
633
660
  attr_reader :payment_method_details
661
+ # Referral fees may be charged when a SharedPaymentGrantedToken is used. This behavior is controlled by the issuer of the token. This field provides details about the referral fee rate.
662
+ attr_reader :referral_fee_details
634
663
  # Risk details of the SharedPaymentGrantedToken.
635
664
  attr_reader :risk_details
636
665
  # Metadata about the SharedPaymentGrantedToken.
@@ -685,6 +714,7 @@ module Stripe
685
714
  @inner_class_types = {
686
715
  agent_details: AgentDetails,
687
716
  payment_method_details: PaymentMethodDetails,
717
+ referral_fee_details: ReferralFeeDetails,
688
718
  risk_details: RiskDetails,
689
719
  usage_details: UsageDetails,
690
720
  usage_limits: UsageLimits,
@@ -56,6 +56,23 @@ module Stripe
56
56
  end
57
57
  end
58
58
 
59
+ class ReferralFeeDetails < ::Stripe::StripeObject
60
+ # The Customer to be invoiced for fees assessed.
61
+ attr_reader :customer
62
+ # The account to be invoiced for fees assessed.
63
+ attr_reader :customer_account
64
+ # The percentage of the payment charged as a referral fee.
65
+ attr_reader :referral_fee_percent
66
+
67
+ def self.inner_class_types
68
+ @inner_class_types = {}
69
+ end
70
+
71
+ def self.field_remappings
72
+ @field_remappings = {}
73
+ end
74
+ end
75
+
59
76
  class RiskDetails < ::Stripe::StripeObject
60
77
  class Insights < ::Stripe::StripeObject
61
78
  class Bot < ::Stripe::StripeObject
@@ -261,6 +278,8 @@ module Stripe
261
278
  attr_reader :object
262
279
  # ID of an existing PaymentMethod.
263
280
  attr_reader :payment_method
281
+ # Referral fee details of the SharedPaymentIssuedToken.
282
+ attr_reader :referral_fee_details
264
283
  # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
265
284
  attr_reader :return_url
266
285
  # Risk details of the SharedPaymentIssuedToken.
@@ -313,6 +332,7 @@ module Stripe
313
332
  def self.inner_class_types
314
333
  @inner_class_types = {
315
334
  next_action: NextAction,
335
+ referral_fee_details: ReferralFeeDetails,
316
336
  risk_details: RiskDetails,
317
337
  seller_details: SellerDetails,
318
338
  usage_details: UsageDetails,
@@ -1013,12 +1013,14 @@ module Stripe
1013
1013
  attr_reader :application_fee_percent
1014
1014
  # Attribute for field automatic_tax
1015
1015
  attr_reader :automatic_tax
1016
- # The Billing Cadence which controls the timing of recurring invoice generation for this subscription.If unset, the subscription will bill according to its own configured schedule and create its own invoices.If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence.
1016
+ # The Billing Cadence which controls the timing of recurring invoice generation for this subscription. If unset, the subscription will bill according to its own configured schedule and create its own invoices. If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence.
1017
1017
  attr_reader :billing_cadence
1018
1018
  # The reference point that aligns future [billing cycle](https://docs.stripe.com/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format.
1019
1019
  attr_reader :billing_cycle_anchor
1020
1020
  # The fixed values used to calculate the `billing_cycle_anchor`.
1021
1021
  attr_reader :billing_cycle_anchor_config
1022
+ # The Billing Group which controls the timing of recurring invoice generation for this subscription.If unset, the subscription will bill according to its own configured schedule and create its own invoices.If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence.
1023
+ attr_reader :billing_group
1022
1024
  # The billing mode of the subscription.
1023
1025
  attr_reader :billing_mode
1024
1026
  # Billing schedules for this subscription.
@@ -0,0 +1,81 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Tax
6
+ # Tax exemption and resale certificates associated with tax exemptions.
7
+ class Certificate < APIResource
8
+ extend Stripe::APIOperations::Create
9
+ include Stripe::APIOperations::Delete
10
+ extend Stripe::APIOperations::List
11
+
12
+ OBJECT_NAME = "tax.certificate"
13
+ def self.object_name
14
+ "tax.certificate"
15
+ end
16
+
17
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
18
+ attr_reader :created
19
+ # Whether the certificate has been deleted.
20
+ attr_reader :deleted
21
+ # The uploaded certificate file.
22
+ attr_reader :file
23
+ # Unique identifier for the object.
24
+ attr_reader :id
25
+ # If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
26
+ attr_reader :livemode
27
+ # String representing the object's type. Objects of the same type share the same value.
28
+ attr_reader :object
29
+ # The tax exemption associated with this certificate.
30
+ attr_reader :tax_exemption
31
+
32
+ # Create a tax certificate associated with a tax exemption.
33
+ def self.create(params = {}, opts = {})
34
+ request_stripe_object(
35
+ method: :post,
36
+ path: "/v1/tax/certificates",
37
+ params: params,
38
+ opts: opts
39
+ )
40
+ end
41
+
42
+ # Delete a tax certificate associated with a tax exemption.
43
+ def self.delete(id, params = {}, opts = {})
44
+ request_stripe_object(
45
+ method: :delete,
46
+ path: format("/v1/tax/certificates/%<id>s", { id: CGI.escape(id) }),
47
+ params: params,
48
+ opts: opts
49
+ )
50
+ end
51
+
52
+ # Delete a tax certificate associated with a tax exemption.
53
+ def delete(params = {}, opts = {})
54
+ request_stripe_object(
55
+ method: :delete,
56
+ path: format("/v1/tax/certificates/%<id>s", { id: CGI.escape(self["id"]) }),
57
+ params: params,
58
+ opts: opts
59
+ )
60
+ end
61
+
62
+ # List certificates for an existing tax exemption.
63
+ def self.list(params = {}, opts = {})
64
+ request_stripe_object(
65
+ method: :get,
66
+ path: "/v1/tax/certificates",
67
+ params: params,
68
+ opts: opts
69
+ )
70
+ end
71
+
72
+ def self.inner_class_types
73
+ @inner_class_types = {}
74
+ end
75
+
76
+ def self.field_remappings
77
+ @field_remappings = {}
78
+ end
79
+ end
80
+ end
81
+ end
@@ -7,6 +7,7 @@ module Stripe
7
7
  #
8
8
  # Related guide: [US tax reporting for Connect platforms](https://stripe.com/docs/connect/tax-reporting)
9
9
  class Form < APIResource
10
+ extend Stripe::APIOperations::Create
10
11
  extend Stripe::APIOperations::List
11
12
 
12
13
  OBJECT_NAME = "tax.form"
@@ -750,6 +751,16 @@ module Stripe
750
751
  # Attribute for field us_1099_nec
751
752
  attr_reader :us_1099_nec
752
753
 
754
+ # Creates a correction for a filed tax form. Supply either payee details or numerical values for the tax form type. Created correction forms are not filed automatically.
755
+ def self.create(id, params = {}, opts = {})
756
+ request_stripe_object(
757
+ method: :post,
758
+ path: format("/v1/tax/forms/%<id>s/corrections", { id: CGI.escape(id) }),
759
+ params: params,
760
+ opts: opts
761
+ )
762
+ end
763
+
753
764
  # Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first.
754
765
  def self.list(params = {}, opts = {})
755
766
  request_stripe_object(method: :get, path: "/v1/tax/forms", params: params, opts: opts)
@@ -0,0 +1,43 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Tax
6
+ # Corrections to filed tax forms.
7
+ class FormCorrection < APIResource
8
+ OBJECT_NAME = "tax.form_correction"
9
+ def self.object_name
10
+ "tax.form_correction"
11
+ end
12
+
13
+ class CorrectionForm < ::Stripe::StripeObject
14
+ # The kind of information changed by this correction.
15
+ attr_reader :correction_type
16
+ # The corrected tax form.
17
+ attr_reader :form
18
+
19
+ def self.inner_class_types
20
+ @inner_class_types = {}
21
+ end
22
+
23
+ def self.field_remappings
24
+ @field_remappings = {}
25
+ end
26
+ end
27
+ # The tax forms created by the correction.
28
+ attr_reader :correction_forms
29
+ # String representing the object's type. Objects of the same type share the same value.
30
+ attr_reader :object
31
+ # The original tax form that was corrected.
32
+ attr_reader :original_form
33
+
34
+ def self.inner_class_types
35
+ @inner_class_types = { correction_forms: CorrectionForm }
36
+ end
37
+
38
+ def self.field_remappings
39
+ @field_remappings = {}
40
+ end
41
+ end
42
+ end
43
+ end
@@ -704,10 +704,27 @@ module Stripe
704
704
  @field_remappings = {}
705
705
  end
706
706
  end
707
+
708
+ class DeviceHealthDetail < ::Stripe::StripeObject
709
+ # The type of condition affecting the reader's device health.
710
+ attr_reader :type
711
+
712
+ def self.inner_class_types
713
+ @inner_class_types = {}
714
+ end
715
+
716
+ def self.field_remappings
717
+ @field_remappings = {}
718
+ end
719
+ end
707
720
  # The most recent action performed by the reader.
708
721
  attr_reader :action
709
722
  # Always true for a deleted object
710
723
  attr_reader :deleted
724
+ # The overall device health of the reader: `healthy` or `unhealthy`. Renamed to `no_issues_detected` and `needs_attention` respectively; see `device_health_details` for the specific conditions.
725
+ attr_reader :device_health
726
+ # The set of conditions affecting the reader's device health. Empty when there are no conditions.
727
+ attr_reader :device_health_details
711
728
  # The current software version of the reader.
712
729
  attr_reader :device_sw_version
713
730
  # Device type of the reader.
@@ -1095,7 +1112,7 @@ module Stripe
1095
1112
  end
1096
1113
 
1097
1114
  def self.inner_class_types
1098
- @inner_class_types = { action: Action }
1115
+ @inner_class_types = { action: Action, device_health_details: DeviceHealthDetail }
1099
1116
  end
1100
1117
 
1101
1118
  def self.field_remappings