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
@@ -221,6 +221,16 @@ module Stripe
221
221
  end
222
222
  end
223
223
 
224
+ class AeonPay < ::Stripe::StripeObject
225
+ def self.inner_class_types
226
+ @inner_class_types = {}
227
+ end
228
+
229
+ def self.field_remappings
230
+ @field_remappings = {}
231
+ end
232
+ end
233
+
224
234
  class Affirm < ::Stripe::StripeObject
225
235
  # ID of the location that this reader is assigned to.
226
236
  attr_reader :location
@@ -371,6 +381,16 @@ module Stripe
371
381
  end
372
382
  end
373
383
 
384
+ class AuPay < ::Stripe::StripeObject
385
+ def self.inner_class_types
386
+ @inner_class_types = {}
387
+ end
388
+
389
+ def self.field_remappings
390
+ @field_remappings = {}
391
+ end
392
+ end
393
+
374
394
  class BacsDebit < ::Stripe::StripeObject
375
395
  # Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format.
376
396
  attr_reader :expected_debit_date
@@ -517,9 +537,9 @@ module Stripe
517
537
  end
518
538
 
519
539
  class Checks < ::Stripe::StripeObject
520
- # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
540
+ # If an address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
521
541
  attr_reader :address_line1_check
522
- # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
542
+ # If an address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
523
543
  attr_reader :address_postal_code_check
524
544
  # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
525
545
  attr_reader :cvc_check
@@ -733,11 +753,144 @@ module Stripe
733
753
  end
734
754
 
735
755
  class Link < ::Stripe::StripeObject
756
+ class FundingSource < ::Stripe::StripeObject
757
+ class Card < ::Stripe::StripeObject
758
+ class Checks < ::Stripe::StripeObject
759
+ # If an address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
760
+ attr_reader :address_line1_check
761
+ # If an address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
762
+ attr_reader :address_postal_code_check
763
+ # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
764
+ attr_reader :cvc_check
765
+
766
+ def self.inner_class_types
767
+ @inner_class_types = {}
768
+ end
769
+
770
+ def self.field_remappings
771
+ @field_remappings = {}
772
+ end
773
+ end
774
+
775
+ class NetworkToken < ::Stripe::StripeObject
776
+ # Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction.
777
+ attr_reader :used
778
+
779
+ def self.inner_class_types
780
+ @inner_class_types = {}
781
+ end
782
+
783
+ def self.field_remappings
784
+ @field_remappings = {}
785
+ end
786
+ end
787
+
788
+ class ThreeDSecure < ::Stripe::StripeObject
789
+ # For authenticated transactions: how the customer was authenticated by
790
+ # the issuing bank.
791
+ attr_reader :authentication_flow
792
+ # The Electronic Commerce Indicator (ECI). A protocol-level field
793
+ # indicating what degree of authentication was performed.
794
+ attr_reader :electronic_commerce_indicator
795
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
796
+ attr_reader :exemption_indicator
797
+ # Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on
798
+ # the outcome of Stripe's internal risk assessment.
799
+ attr_reader :exemption_indicator_applied
800
+ # Indicates the outcome of 3D Secure authentication.
801
+ attr_reader :result
802
+ # Additional information about why 3D Secure succeeded or failed based
803
+ # on the `result`.
804
+ attr_reader :result_reason
805
+ # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID
806
+ # (dsTransId) for this payment.
807
+ attr_reader :transaction_id
808
+ # The version of 3D Secure that was used.
809
+ attr_reader :version
810
+
811
+ def self.inner_class_types
812
+ @inner_class_types = {}
813
+ end
814
+
815
+ def self.field_remappings
816
+ @field_remappings = {}
817
+ end
818
+ end
819
+ # The authorized amount.
820
+ attr_reader :amount_authorized
821
+ # Authorization code on the charge.
822
+ attr_reader :authorization_code
823
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
824
+ attr_reader :brand
825
+ # Check results by Card networks on Card address and CVC at time of payment.
826
+ attr_reader :checks
827
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
828
+ attr_reader :country
829
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
830
+ attr_reader :description
831
+ # The Electronic Commerce Indicator (ECI) returned by the card network in the authorization response. Indicates the level of authentication used. Only populated for Visa and Mastercard transactions. This is the network's final ECI and can differ from the request value. An authenticated ECI alone doesn't determine liability shift.
832
+ attr_reader :electronic_commerce_indicator
833
+ # Two-digit number representing the card's expiration month.
834
+ attr_reader :exp_month
835
+ # Four-digit number representing the card's expiration year.
836
+ attr_reader :exp_year
837
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
838
+ #
839
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
840
+ attr_reader :fingerprint
841
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
842
+ attr_reader :funding
843
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
844
+ attr_reader :iin
845
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
846
+ attr_reader :issuer
847
+ # The last four digits of the card.
848
+ attr_reader :last4
849
+ # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
850
+ attr_reader :network
851
+ # If this card has network token credentials, this contains the details of the network token credentials.
852
+ attr_reader :network_token
853
+ # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
854
+ attr_reader :network_transaction_id
855
+ # Status of a card based on the card issuer.
856
+ attr_reader :regulated_status
857
+ # Populated if this transaction used 3D Secure authentication.
858
+ attr_reader :three_d_secure
859
+ # Transaction Link ID (TLID) is a unique identifier for a transaction. This is used by some card networks, such as Mastercard, for transaction linking, in addition to Network Transaction IDs. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
860
+ attr_reader :transaction_link_id
861
+
862
+ def self.inner_class_types
863
+ @inner_class_types = {
864
+ checks: Checks,
865
+ network_token: NetworkToken,
866
+ three_d_secure: ThreeDSecure,
867
+ }
868
+ end
869
+
870
+ def self.field_remappings
871
+ @field_remappings = {}
872
+ end
873
+ end
874
+ # Attribute for field card
875
+ attr_reader :card
876
+ # The type of funding source used for this Link payment.
877
+ attr_reader :type
878
+
879
+ def self.inner_class_types
880
+ @inner_class_types = { card: Card }
881
+ end
882
+
883
+ def self.field_remappings
884
+ @field_remappings = {}
885
+ end
886
+ end
736
887
  # The [funding source group code](https://docs.stripe.com/payments/link/link-payment-methods) applied to this Link payment at confirmation time.
737
888
  attr_reader :funding_source_group
889
+ # Details about the funding sources used for this Link payment.
890
+ attr_reader :funding_sources
738
891
 
739
892
  def self.inner_class_types
740
- @inner_class_types = {}
893
+ @inner_class_types = { funding_sources: FundingSource }
741
894
  end
742
895
 
743
896
  def self.field_remappings
@@ -1031,6 +1184,35 @@ module Stripe
1031
1184
  end
1032
1185
 
1033
1186
  class CardPresent < ::Stripe::StripeObject
1187
+ class Fleet < ::Stripe::StripeObject
1188
+ class TransactionDatum < ::Stripe::StripeObject
1189
+ # The prompt that the Terminal SDK displays to collect this Fleet value.
1190
+ attr_reader :prompt
1191
+ # Whether the collected value is printed on the receipt.
1192
+ attr_reader :receipt_behavior
1193
+ # The value collected for this Fleet prompt.
1194
+ attr_reader :value
1195
+
1196
+ def self.inner_class_types
1197
+ @inner_class_types = {}
1198
+ end
1199
+
1200
+ def self.field_remappings
1201
+ @field_remappings = {}
1202
+ end
1203
+ end
1204
+ # Fleet prompts and values collected for this transaction.
1205
+ attr_reader :transaction_data
1206
+
1207
+ def self.inner_class_types
1208
+ @inner_class_types = { transaction_data: TransactionDatum }
1209
+ end
1210
+
1211
+ def self.field_remappings
1212
+ @field_remappings = {}
1213
+ end
1214
+ end
1215
+
1034
1216
  class Multicapture < ::Stripe::StripeObject
1035
1217
  # Indicates whether or not multiple captures are supported.
1036
1218
  attr_reader :status
@@ -1073,6 +1255,20 @@ module Stripe
1073
1255
  end
1074
1256
 
1075
1257
  class Receipt < ::Stripe::StripeObject
1258
+ class CardholderMessage < ::Stripe::StripeObject
1259
+ # Where the message must be printed or displayed. An empty list means the message must not be shown.
1260
+ attr_reader :destinations
1261
+ # The message from the card issuer, such as the remaining balance.
1262
+ attr_reader :value
1263
+
1264
+ def self.inner_class_types
1265
+ @inner_class_types = {}
1266
+ end
1267
+
1268
+ def self.field_remappings
1269
+ @field_remappings = {}
1270
+ end
1271
+ end
1076
1272
  # The type of account being debited or credited
1077
1273
  attr_reader :account_type
1078
1274
  # The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers.
@@ -1083,6 +1279,8 @@ module Stripe
1083
1279
  attr_reader :authorization_code
1084
1280
  # EMV tag 8A. A code returned by the card issuer.
1085
1281
  attr_reader :authorization_response_code
1282
+ # A message from the card issuer to show to the cardholder, and where it must be shown.
1283
+ attr_reader :cardholder_message
1086
1284
  # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
1087
1285
  attr_reader :cardholder_verification_method
1088
1286
  # Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84.
@@ -1093,7 +1291,7 @@ module Stripe
1093
1291
  attr_reader :transaction_status_information
1094
1292
 
1095
1293
  def self.inner_class_types
1096
- @inner_class_types = {}
1294
+ @inner_class_types = { cardholder_message: CardholderMessage }
1097
1295
  end
1098
1296
 
1099
1297
  def self.field_remappings
@@ -1137,6 +1335,8 @@ module Stripe
1137
1335
  #
1138
1336
  # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
1139
1337
  attr_reader :fingerprint
1338
+ # Attribute for field fleet
1339
+ attr_reader :fleet
1140
1340
  # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
1141
1341
  attr_reader :funding
1142
1342
  # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.
@@ -1180,6 +1380,7 @@ module Stripe
1180
1380
 
1181
1381
  def self.inner_class_types
1182
1382
  @inner_class_types = {
1383
+ fleet: Fleet,
1183
1384
  multicapture: Multicapture,
1184
1385
  offline: Offline,
1185
1386
  reauthorization: Reauthorization,
@@ -1253,6 +1454,16 @@ module Stripe
1253
1454
  end
1254
1455
  end
1255
1456
 
1457
+ class Dbarai < ::Stripe::StripeObject
1458
+ def self.inner_class_types
1459
+ @inner_class_types = {}
1460
+ end
1461
+
1462
+ def self.field_remappings
1463
+ @field_remappings = {}
1464
+ end
1465
+ end
1466
+
1256
1467
  class Eps < ::Stripe::StripeObject
1257
1468
  # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
1258
1469
  attr_reader :bank
@@ -1621,14 +1832,147 @@ module Stripe
1621
1832
  end
1622
1833
 
1623
1834
  class Link < ::Stripe::StripeObject
1835
+ class FundingSource < ::Stripe::StripeObject
1836
+ class Card < ::Stripe::StripeObject
1837
+ class Checks < ::Stripe::StripeObject
1838
+ # If an address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
1839
+ attr_reader :address_line1_check
1840
+ # If an address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
1841
+ attr_reader :address_postal_code_check
1842
+ # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
1843
+ attr_reader :cvc_check
1844
+
1845
+ def self.inner_class_types
1846
+ @inner_class_types = {}
1847
+ end
1848
+
1849
+ def self.field_remappings
1850
+ @field_remappings = {}
1851
+ end
1852
+ end
1853
+
1854
+ class NetworkToken < ::Stripe::StripeObject
1855
+ # Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction.
1856
+ attr_reader :used
1857
+
1858
+ def self.inner_class_types
1859
+ @inner_class_types = {}
1860
+ end
1861
+
1862
+ def self.field_remappings
1863
+ @field_remappings = {}
1864
+ end
1865
+ end
1866
+
1867
+ class ThreeDSecure < ::Stripe::StripeObject
1868
+ # For authenticated transactions: how the customer was authenticated by
1869
+ # the issuing bank.
1870
+ attr_reader :authentication_flow
1871
+ # The Electronic Commerce Indicator (ECI). A protocol-level field
1872
+ # indicating what degree of authentication was performed.
1873
+ attr_reader :electronic_commerce_indicator
1874
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
1875
+ attr_reader :exemption_indicator
1876
+ # Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on
1877
+ # the outcome of Stripe's internal risk assessment.
1878
+ attr_reader :exemption_indicator_applied
1879
+ # Indicates the outcome of 3D Secure authentication.
1880
+ attr_reader :result
1881
+ # Additional information about why 3D Secure succeeded or failed based
1882
+ # on the `result`.
1883
+ attr_reader :result_reason
1884
+ # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID
1885
+ # (dsTransId) for this payment.
1886
+ attr_reader :transaction_id
1887
+ # The version of 3D Secure that was used.
1888
+ attr_reader :version
1889
+
1890
+ def self.inner_class_types
1891
+ @inner_class_types = {}
1892
+ end
1893
+
1894
+ def self.field_remappings
1895
+ @field_remappings = {}
1896
+ end
1897
+ end
1898
+ # The authorized amount.
1899
+ attr_reader :amount_authorized
1900
+ # Authorization code on the charge.
1901
+ attr_reader :authorization_code
1902
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
1903
+ attr_reader :brand
1904
+ # Check results by Card networks on Card address and CVC at time of payment.
1905
+ attr_reader :checks
1906
+ # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
1907
+ attr_reader :country
1908
+ # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
1909
+ attr_reader :description
1910
+ # The Electronic Commerce Indicator (ECI) returned by the card network in the authorization response. Indicates the level of authentication used. Only populated for Visa and Mastercard transactions. This is the network's final ECI and can differ from the request value. An authenticated ECI alone doesn't determine liability shift.
1911
+ attr_reader :electronic_commerce_indicator
1912
+ # Two-digit number representing the card's expiration month.
1913
+ attr_reader :exp_month
1914
+ # Four-digit number representing the card's expiration year.
1915
+ attr_reader :exp_year
1916
+ # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
1917
+ #
1918
+ # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
1919
+ attr_reader :fingerprint
1920
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
1921
+ attr_reader :funding
1922
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
1923
+ attr_reader :iin
1924
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
1925
+ attr_reader :issuer
1926
+ # The last four digits of the card.
1927
+ attr_reader :last4
1928
+ # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
1929
+ attr_reader :network
1930
+ # If this card has network token credentials, this contains the details of the network token credentials.
1931
+ attr_reader :network_token
1932
+ # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
1933
+ attr_reader :network_transaction_id
1934
+ # Status of a card based on the card issuer.
1935
+ attr_reader :regulated_status
1936
+ # Populated if this transaction used 3D Secure authentication.
1937
+ attr_reader :three_d_secure
1938
+ # Transaction Link ID (TLID) is a unique identifier for a transaction. This is used by some card networks, such as Mastercard, for transaction linking, in addition to Network Transaction IDs. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
1939
+ attr_reader :transaction_link_id
1940
+
1941
+ def self.inner_class_types
1942
+ @inner_class_types = {
1943
+ checks: Checks,
1944
+ network_token: NetworkToken,
1945
+ three_d_secure: ThreeDSecure,
1946
+ }
1947
+ end
1948
+
1949
+ def self.field_remappings
1950
+ @field_remappings = {}
1951
+ end
1952
+ end
1953
+ # Attribute for field card
1954
+ attr_reader :card
1955
+ # The type of funding source used for this Link payment.
1956
+ attr_reader :type
1957
+
1958
+ def self.inner_class_types
1959
+ @inner_class_types = { card: Card }
1960
+ end
1961
+
1962
+ def self.field_remappings
1963
+ @field_remappings = {}
1964
+ end
1965
+ end
1624
1966
  # Two-letter ISO code representing the funding source country beneath the Link payment.
1625
1967
  # You could use this attribute to get a sense of international fees.
1626
1968
  attr_reader :country
1627
1969
  # The [funding source group code](https://docs.stripe.com/payments/link/link-payment-methods) applied to this Link payment at confirmation time.
1628
1970
  attr_reader :funding_source_group
1971
+ # Details about the funding sources used for this Link payment.
1972
+ attr_reader :funding_sources
1629
1973
 
1630
1974
  def self.inner_class_types
1631
- @inner_class_types = {}
1975
+ @inner_class_types = { funding_sources: FundingSource }
1632
1976
  end
1633
1977
 
1634
1978
  def self.field_remappings
@@ -1646,6 +1990,16 @@ module Stripe
1646
1990
  end
1647
1991
  end
1648
1992
 
1993
+ class Merpay < ::Stripe::StripeObject
1994
+ def self.inner_class_types
1995
+ @inner_class_types = {}
1996
+ end
1997
+
1998
+ def self.field_remappings
1999
+ @field_remappings = {}
2000
+ end
2001
+ end
2002
+
1649
2003
  class Mobilepay < ::Stripe::StripeObject
1650
2004
  class Card < ::Stripe::StripeObject
1651
2005
  # Brand of the card used in the transaction
@@ -1912,6 +2266,8 @@ module Stripe
1912
2266
  end
1913
2267
 
1914
2268
  class Paypay < ::Stripe::StripeObject
2269
+ # Uniquely identifies this particular PayPay account. You can use this attribute to check whether two PayPay accounts are the same.
2270
+ attr_reader :fingerprint
1915
2271
  # ID of the multi-use Mandate created by, or used to make, this PayPay payment.
1916
2272
  attr_reader :mandate
1917
2273
 
@@ -2388,6 +2744,8 @@ module Stripe
2388
2744
  attr_reader :ach_debit
2389
2745
  # Attribute for field acss_debit
2390
2746
  attr_reader :acss_debit
2747
+ # Attribute for field aeon_pay
2748
+ attr_reader :aeon_pay
2391
2749
  # Attribute for field affirm
2392
2750
  attr_reader :affirm
2393
2751
  # Attribute for field afterpay_clearpay
@@ -2400,6 +2758,8 @@ module Stripe
2400
2758
  attr_reader :amazon_pay
2401
2759
  # Attribute for field au_becs_debit
2402
2760
  attr_reader :au_becs_debit
2761
+ # Attribute for field au_pay
2762
+ attr_reader :au_pay
2403
2763
  # Attribute for field bacs_debit
2404
2764
  attr_reader :bacs_debit
2405
2765
  # Attribute for field bancontact
@@ -2424,6 +2784,8 @@ module Stripe
2424
2784
  attr_reader :crypto
2425
2785
  # Attribute for field customer_balance
2426
2786
  attr_reader :customer_balance
2787
+ # Attribute for field dbarai
2788
+ attr_reader :dbarai
2427
2789
  # Attribute for field eps
2428
2790
  attr_reader :eps
2429
2791
  # Attribute for field fpx
@@ -2456,6 +2818,8 @@ module Stripe
2456
2818
  attr_reader :link
2457
2819
  # Attribute for field mb_way
2458
2820
  attr_reader :mb_way
2821
+ # Attribute for field merpay
2822
+ attr_reader :merpay
2459
2823
  # Attribute for field mobilepay
2460
2824
  attr_reader :mobilepay
2461
2825
  # Attribute for field multibanco
@@ -2546,12 +2910,14 @@ module Stripe
2546
2910
  ach_credit_transfer: AchCreditTransfer,
2547
2911
  ach_debit: AchDebit,
2548
2912
  acss_debit: AcssDebit,
2913
+ aeon_pay: AeonPay,
2549
2914
  affirm: Affirm,
2550
2915
  afterpay_clearpay: AfterpayClearpay,
2551
2916
  alipay: Alipay,
2552
2917
  alma: Alma,
2553
2918
  amazon_pay: AmazonPay,
2554
2919
  au_becs_debit: AuBecsDebit,
2920
+ au_pay: AuPay,
2555
2921
  bacs_debit: BacsDebit,
2556
2922
  bancontact: Bancontact,
2557
2923
  billie: Billie,
@@ -2564,6 +2930,7 @@ module Stripe
2564
2930
  cashapp: Cashapp,
2565
2931
  crypto: Crypto,
2566
2932
  customer_balance: CustomerBalance,
2933
+ dbarai: Dbarai,
2567
2934
  eps: Eps,
2568
2935
  fpx: Fpx,
2569
2936
  getflex: Getflex,
@@ -2580,6 +2947,7 @@ module Stripe
2580
2947
  kr_card: KrCard,
2581
2948
  link: Link,
2582
2949
  mb_way: MbWay,
2950
+ merpay: Merpay,
2583
2951
  mobilepay: Mobilepay,
2584
2952
  multibanco: Multibanco,
2585
2953
  naver_pay: NaverPay,
@@ -2444,6 +2444,14 @@ module Stripe
2444
2444
  end
2445
2445
 
2446
2446
  class Paypay < ::Stripe::StripeObject
2447
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2448
+ #
2449
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2450
+ #
2451
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2452
+ #
2453
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2454
+ attr_reader :setup_future_usage
2447
2455
  # A reference to the merchant subscription this payment corresponds to.
2448
2456
  attr_reader :subscription_reference
2449
2457
 
@@ -2687,6 +2695,25 @@ module Stripe
2687
2695
  end
2688
2696
  end
2689
2697
 
2698
+ class StripeBalance < ::Stripe::StripeObject
2699
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2700
+ #
2701
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
2702
+ #
2703
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2704
+ #
2705
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
2706
+ attr_reader :setup_future_usage
2707
+
2708
+ def self.inner_class_types
2709
+ @inner_class_types = {}
2710
+ end
2711
+
2712
+ def self.field_remappings
2713
+ @field_remappings = {}
2714
+ end
2715
+ end
2716
+
2690
2717
  class Sunbit < ::Stripe::StripeObject
2691
2718
  # Controls when the funds will be captured from the customer's account.
2692
2719
  attr_reader :capture_method
@@ -2959,6 +2986,8 @@ module Stripe
2959
2986
  attr_reader :sequra
2960
2987
  # Attribute for field sofort
2961
2988
  attr_reader :sofort
2989
+ # Attribute for field stripe_balance
2990
+ attr_reader :stripe_balance
2962
2991
  # Attribute for field sunbit
2963
2992
  attr_reader :sunbit
2964
2993
  # Attribute for field swish
@@ -3017,6 +3046,7 @@ module Stripe
3017
3046
  sepa_debit: SepaDebit,
3018
3047
  sequra: Sequra,
3019
3048
  sofort: Sofort,
3049
+ stripe_balance: StripeBalance,
3020
3050
  sunbit: Sunbit,
3021
3051
  swish: Swish,
3022
3052
  twint: Twint,
@@ -3760,6 +3790,8 @@ module Stripe
3760
3790
  end
3761
3791
 
3762
3792
  # Creates a Checkout Session object.
3793
+ #
3794
+ # Validate requests on your server and protect your application's Session-creation endpoint with access controls and limits on repeated creation. See [Protect your Session-creation endpoint](https://docs.stripe.com/payments/accept-a-payment?payment-ui=elements&api-integration=checkout#protect-session-creation).
3763
3795
  def self.create(params = {}, opts = {})
3764
3796
  request_stripe_object(
3765
3797
  method: :post,