stripe 21.0.0 → 21.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_operations/request.rb +16 -7
  3. data/lib/stripe/api_operations/save.rb +4 -4
  4. data/lib/stripe/api_requestor.rb +54 -34
  5. data/lib/stripe/api_resource.rb +1 -2
  6. data/lib/stripe/api_version.rb +1 -1
  7. data/lib/stripe/connection_manager.rb +3 -0
  8. data/lib/stripe/event_types.rb +20 -0
  9. data/lib/stripe/events/v2_core_account_closed_event.rb +2 -2
  10. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +2 -2
  11. data/lib/stripe/events/v2_core_claimable_sandbox_claimed_event.rb +44 -0
  12. data/lib/stripe/events/v2_core_claimable_sandbox_created_event.rb +44 -0
  13. data/lib/stripe/events/v2_core_claimable_sandbox_expired_event.rb +44 -0
  14. data/lib/stripe/events/v2_core_claimable_sandbox_expiring_event.rb +44 -0
  15. data/lib/stripe/events/v2_core_claimable_sandbox_updated_event.rb +44 -0
  16. data/lib/stripe/object_types.rb +1 -0
  17. data/lib/stripe/params/billing_portal/configuration_create_params.rb +1 -1
  18. data/lib/stripe/params/billing_portal/configuration_update_params.rb +1 -1
  19. data/lib/stripe/params/checkout/session_create_params.rb +8 -1
  20. data/lib/stripe/params/coupon_create_params.rb +1 -1
  21. data/lib/stripe/params/financial_connections/session_create_params.rb +1 -1
  22. data/lib/stripe/params/invoice_item_create_params.rb +1 -1
  23. data/lib/stripe/params/payment_intent_capture_params.rb +663 -1
  24. data/lib/stripe/params/payment_intent_confirm_params.rb +663 -1
  25. data/lib/stripe/params/payment_intent_create_params.rb +664 -2
  26. data/lib/stripe/params/payment_intent_update_params.rb +664 -2
  27. data/lib/stripe/params/payment_link_update_params.rb +4 -0
  28. data/lib/stripe/params/product_create_params.rb +4 -1
  29. data/lib/stripe/params/product_update_params.rb +4 -1
  30. data/lib/stripe/params/quote_create_params.rb +1 -1
  31. data/lib/stripe/params/quote_update_params.rb +1 -1
  32. data/lib/stripe/params/reporting/report_run_create_params.rb +4 -0
  33. data/lib/stripe/params/tax/registration_create_params.rb +13 -1
  34. data/lib/stripe/params/test_helpers/treasury/inbound_transfer_fail_params.rb +23 -1
  35. data/lib/stripe/params/test_helpers/treasury/inbound_transfer_return_inbound_transfer_params.rb +34 -1
  36. data/lib/stripe/params/treasury/inbound_transfer_fail_params.rb +23 -1
  37. data/lib/stripe/params/treasury/inbound_transfer_return_inbound_transfer_params.rb +34 -1
  38. data/lib/stripe/params/v2/core/account_create_params.rb +138 -4
  39. data/lib/stripe/params/v2/core/account_link_create_params.rb +19 -1
  40. data/lib/stripe/params/v2/core/account_update_params.rb +138 -4
  41. data/lib/stripe/params/v2/core/claimable_sandbox_create_params.rb +63 -0
  42. data/lib/stripe/params/v2/core/claimable_sandbox_renew_onboarding_link_params.rb +32 -0
  43. data/lib/stripe/params/v2/core/claimable_sandbox_retrieve_params.rb +17 -0
  44. data/lib/stripe/params/v2/money_management/financial_account_list_params.rb +1 -1
  45. data/lib/stripe/params/v2/money_management/financial_address_create_params.rb +2 -2
  46. data/lib/stripe/params.rb +7 -0
  47. data/lib/stripe/request_options.rb +19 -2
  48. data/lib/stripe/resources/apps/install.rb +2 -2
  49. data/lib/stripe/resources/balance_transaction.rb +1 -1
  50. data/lib/stripe/resources/charge.rb +274 -5
  51. data/lib/stripe/resources/checkout/session.rb +4 -0
  52. data/lib/stripe/resources/confirmation_token.rb +2 -2
  53. data/lib/stripe/resources/coupon.rb +6 -3
  54. data/lib/stripe/resources/dispute.rb +1 -1
  55. data/lib/stripe/resources/event.rb +2 -2
  56. data/lib/stripe/resources/issuing/card.rb +1 -1
  57. data/lib/stripe/resources/payment_attempt_record.rb +4 -1
  58. data/lib/stripe/resources/payment_intent.rb +575 -2
  59. data/lib/stripe/resources/payment_method.rb +2 -2
  60. data/lib/stripe/resources/payment_record.rb +4 -1
  61. data/lib/stripe/resources/product.rb +2 -0
  62. data/lib/stripe/resources/radar/payment_evaluation.rb +1 -1
  63. data/lib/stripe/resources/refund.rb +38 -0
  64. data/lib/stripe/resources/reporting/report_run.rb +2 -0
  65. data/lib/stripe/resources/reserve/hold.rb +1 -1
  66. data/lib/stripe/resources/setup_attempt.rb +2 -2
  67. data/lib/stripe/resources/setup_intent.rb +1 -1
  68. data/lib/stripe/resources/tax/registration.rb +16 -1
  69. data/lib/stripe/resources/treasury/inbound_transfer.rb +35 -7
  70. data/lib/stripe/resources/treasury/outbound_payment.rb +37 -9
  71. data/lib/stripe/resources/treasury/outbound_transfer.rb +37 -9
  72. data/lib/stripe/resources/treasury/received_credit.rb +1 -1
  73. data/lib/stripe/resources/treasury/received_debit.rb +1 -1
  74. data/lib/stripe/resources/v2/core/account.rb +246 -3
  75. data/lib/stripe/resources/v2/core/account_link.rb +18 -1
  76. data/lib/stripe/resources/v2/core/account_person_token.rb +2 -0
  77. data/lib/stripe/resources/v2/core/account_token.rb +3 -1
  78. data/lib/stripe/resources/v2/core/claimable_sandbox.rb +269 -0
  79. data/lib/stripe/resources/v2/core/event_base.rb +8 -25
  80. data/lib/stripe/resources/v2/core/event_notification.rb +32 -0
  81. data/lib/stripe/resources.rb +17 -0
  82. data/lib/stripe/services/apps/install_service.rb +2 -2
  83. data/lib/stripe/services/checkout/session_service.rb +2 -0
  84. data/lib/stripe/services/event_service.rb +1 -1
  85. data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +3 -3
  86. data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +4 -4
  87. data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +4 -4
  88. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -1
  89. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -1
  90. data/lib/stripe/services/v2/core/account_link_service.rb +1 -1
  91. data/lib/stripe/services/v2/core/account_token_service.rb +2 -2
  92. data/lib/stripe/services/v2/core/accounts/person_token_service.rb +2 -1
  93. data/lib/stripe/services/v2/core/claimable_sandbox_service.rb +49 -0
  94. data/lib/stripe/services/v2/core_service.rb +2 -1
  95. data/lib/stripe/services.rb +2 -0
  96. data/lib/stripe/stripe_client.rb +6 -0
  97. data/lib/stripe/stripe_configuration.rb +9 -2
  98. data/lib/stripe/stripe_event_notification_handler.rb +26 -0
  99. data/lib/stripe/stripe_object.rb +22 -9
  100. data/lib/stripe/version.rb +1 -1
  101. data/rbi/stripe.rbi +6888 -221
  102. metadata +12 -2
@@ -491,9 +491,9 @@ module Stripe
491
491
 
492
492
  class Card < ::Stripe::StripeObject
493
493
  class Checks < ::Stripe::StripeObject
494
- # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
494
+ # If an address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
495
495
  attr_reader :address_line1_check
496
- # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
496
+ # If an address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
497
497
  attr_reader :address_postal_code_check
498
498
  # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
499
499
  attr_reader :cvc_check
@@ -668,11 +668,144 @@ module Stripe
668
668
  end
669
669
 
670
670
  class Link < ::Stripe::StripeObject
671
+ class FundingSource < ::Stripe::StripeObject
672
+ class Card < ::Stripe::StripeObject
673
+ class Checks < ::Stripe::StripeObject
674
+ # If an address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
675
+ attr_reader :address_line1_check
676
+ # If an address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
677
+ attr_reader :address_postal_code_check
678
+ # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
679
+ attr_reader :cvc_check
680
+
681
+ def self.inner_class_types
682
+ @inner_class_types = {}
683
+ end
684
+
685
+ def self.field_remappings
686
+ @field_remappings = {}
687
+ end
688
+ end
689
+
690
+ class NetworkToken < ::Stripe::StripeObject
691
+ # Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction.
692
+ attr_reader :used
693
+
694
+ def self.inner_class_types
695
+ @inner_class_types = {}
696
+ end
697
+
698
+ def self.field_remappings
699
+ @field_remappings = {}
700
+ end
701
+ end
702
+
703
+ class ThreeDSecure < ::Stripe::StripeObject
704
+ # For authenticated transactions: how the customer was authenticated by
705
+ # the issuing bank.
706
+ attr_reader :authentication_flow
707
+ # The Electronic Commerce Indicator (ECI). A protocol-level field
708
+ # indicating what degree of authentication was performed.
709
+ attr_reader :electronic_commerce_indicator
710
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
711
+ attr_reader :exemption_indicator
712
+ # Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on
713
+ # the outcome of Stripe's internal risk assessment.
714
+ attr_reader :exemption_indicator_applied
715
+ # Indicates the outcome of 3D Secure authentication.
716
+ attr_reader :result
717
+ # Additional information about why 3D Secure succeeded or failed based
718
+ # on the `result`.
719
+ attr_reader :result_reason
720
+ # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID
721
+ # (dsTransId) for this payment.
722
+ attr_reader :transaction_id
723
+ # The version of 3D Secure that was used.
724
+ attr_reader :version
725
+
726
+ def self.inner_class_types
727
+ @inner_class_types = {}
728
+ end
729
+
730
+ def self.field_remappings
731
+ @field_remappings = {}
732
+ end
733
+ end
734
+ # The authorized amount.
735
+ attr_reader :amount_authorized
736
+ # Authorization code on the charge.
737
+ attr_reader :authorization_code
738
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
739
+ attr_reader :brand
740
+ # Check results by Card networks on Card address and CVC at time of payment.
741
+ attr_reader :checks
742
+ # 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.
743
+ attr_reader :country
744
+ # 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.)
745
+ attr_reader :description
746
+ # 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.
747
+ attr_reader :electronic_commerce_indicator
748
+ # Two-digit number representing the card's expiration month.
749
+ attr_reader :exp_month
750
+ # Four-digit number representing the card's expiration year.
751
+ attr_reader :exp_year
752
+ # 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.
753
+ #
754
+ # *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.*
755
+ attr_reader :fingerprint
756
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
757
+ attr_reader :funding
758
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
759
+ attr_reader :iin
760
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
761
+ attr_reader :issuer
762
+ # The last four digits of the card.
763
+ attr_reader :last4
764
+ # 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`.
765
+ attr_reader :network
766
+ # If this card has network token credentials, this contains the details of the network token credentials.
767
+ attr_reader :network_token
768
+ # 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.
769
+ attr_reader :network_transaction_id
770
+ # Status of a card based on the card issuer.
771
+ attr_reader :regulated_status
772
+ # Populated if this transaction used 3D Secure authentication.
773
+ attr_reader :three_d_secure
774
+ # 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.
775
+ attr_reader :transaction_link_id
776
+
777
+ def self.inner_class_types
778
+ @inner_class_types = {
779
+ checks: Checks,
780
+ network_token: NetworkToken,
781
+ three_d_secure: ThreeDSecure,
782
+ }
783
+ end
784
+
785
+ def self.field_remappings
786
+ @field_remappings = {}
787
+ end
788
+ end
789
+ # Attribute for field card
790
+ attr_reader :card
791
+ # The type of funding source used for this Link payment.
792
+ attr_reader :type
793
+
794
+ def self.inner_class_types
795
+ @inner_class_types = { card: Card }
796
+ end
797
+
798
+ def self.field_remappings
799
+ @field_remappings = {}
800
+ end
801
+ end
671
802
  # The [funding source group code](https://docs.stripe.com/payments/link/link-payment-methods) applied to this Link payment at confirmation time.
672
803
  attr_reader :funding_source_group
804
+ # Details about the funding sources used for this Link payment.
805
+ attr_reader :funding_sources
673
806
 
674
807
  def self.inner_class_types
675
- @inner_class_types = {}
808
+ @inner_class_types = { funding_sources: FundingSource }
676
809
  end
677
810
 
678
811
  def self.field_remappings
@@ -1395,14 +1528,147 @@ module Stripe
1395
1528
  end
1396
1529
 
1397
1530
  class Link < ::Stripe::StripeObject
1531
+ class FundingSource < ::Stripe::StripeObject
1532
+ class Card < ::Stripe::StripeObject
1533
+ class Checks < ::Stripe::StripeObject
1534
+ # If an address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
1535
+ attr_reader :address_line1_check
1536
+ # If an address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
1537
+ attr_reader :address_postal_code_check
1538
+ # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
1539
+ attr_reader :cvc_check
1540
+
1541
+ def self.inner_class_types
1542
+ @inner_class_types = {}
1543
+ end
1544
+
1545
+ def self.field_remappings
1546
+ @field_remappings = {}
1547
+ end
1548
+ end
1549
+
1550
+ class NetworkToken < ::Stripe::StripeObject
1551
+ # Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction.
1552
+ attr_reader :used
1553
+
1554
+ def self.inner_class_types
1555
+ @inner_class_types = {}
1556
+ end
1557
+
1558
+ def self.field_remappings
1559
+ @field_remappings = {}
1560
+ end
1561
+ end
1562
+
1563
+ class ThreeDSecure < ::Stripe::StripeObject
1564
+ # For authenticated transactions: how the customer was authenticated by
1565
+ # the issuing bank.
1566
+ attr_reader :authentication_flow
1567
+ # The Electronic Commerce Indicator (ECI). A protocol-level field
1568
+ # indicating what degree of authentication was performed.
1569
+ attr_reader :electronic_commerce_indicator
1570
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
1571
+ attr_reader :exemption_indicator
1572
+ # Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on
1573
+ # the outcome of Stripe's internal risk assessment.
1574
+ attr_reader :exemption_indicator_applied
1575
+ # Indicates the outcome of 3D Secure authentication.
1576
+ attr_reader :result
1577
+ # Additional information about why 3D Secure succeeded or failed based
1578
+ # on the `result`.
1579
+ attr_reader :result_reason
1580
+ # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID
1581
+ # (dsTransId) for this payment.
1582
+ attr_reader :transaction_id
1583
+ # The version of 3D Secure that was used.
1584
+ attr_reader :version
1585
+
1586
+ def self.inner_class_types
1587
+ @inner_class_types = {}
1588
+ end
1589
+
1590
+ def self.field_remappings
1591
+ @field_remappings = {}
1592
+ end
1593
+ end
1594
+ # The authorized amount.
1595
+ attr_reader :amount_authorized
1596
+ # Authorization code on the charge.
1597
+ attr_reader :authorization_code
1598
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
1599
+ attr_reader :brand
1600
+ # Check results by Card networks on Card address and CVC at time of payment.
1601
+ attr_reader :checks
1602
+ # 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.
1603
+ attr_reader :country
1604
+ # 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.)
1605
+ attr_reader :description
1606
+ # 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.
1607
+ attr_reader :electronic_commerce_indicator
1608
+ # Two-digit number representing the card's expiration month.
1609
+ attr_reader :exp_month
1610
+ # Four-digit number representing the card's expiration year.
1611
+ attr_reader :exp_year
1612
+ # 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.
1613
+ #
1614
+ # *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.*
1615
+ attr_reader :fingerprint
1616
+ # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
1617
+ attr_reader :funding
1618
+ # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
1619
+ attr_reader :iin
1620
+ # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
1621
+ attr_reader :issuer
1622
+ # The last four digits of the card.
1623
+ attr_reader :last4
1624
+ # 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`.
1625
+ attr_reader :network
1626
+ # If this card has network token credentials, this contains the details of the network token credentials.
1627
+ attr_reader :network_token
1628
+ # 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.
1629
+ attr_reader :network_transaction_id
1630
+ # Status of a card based on the card issuer.
1631
+ attr_reader :regulated_status
1632
+ # Populated if this transaction used 3D Secure authentication.
1633
+ attr_reader :three_d_secure
1634
+ # 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.
1635
+ attr_reader :transaction_link_id
1636
+
1637
+ def self.inner_class_types
1638
+ @inner_class_types = {
1639
+ checks: Checks,
1640
+ network_token: NetworkToken,
1641
+ three_d_secure: ThreeDSecure,
1642
+ }
1643
+ end
1644
+
1645
+ def self.field_remappings
1646
+ @field_remappings = {}
1647
+ end
1648
+ end
1649
+ # Attribute for field card
1650
+ attr_reader :card
1651
+ # The type of funding source used for this Link payment.
1652
+ attr_reader :type
1653
+
1654
+ def self.inner_class_types
1655
+ @inner_class_types = { card: Card }
1656
+ end
1657
+
1658
+ def self.field_remappings
1659
+ @field_remappings = {}
1660
+ end
1661
+ end
1398
1662
  # Two-letter ISO code representing the funding source country beneath the Link payment.
1399
1663
  # You could use this attribute to get a sense of international fees.
1400
1664
  attr_reader :country
1401
1665
  # The [funding source group code](https://docs.stripe.com/payments/link/link-payment-methods) applied to this Link payment at confirmation time.
1402
1666
  attr_reader :funding_source_group
1667
+ # Details about the funding sources used for this Link payment.
1668
+ attr_reader :funding_sources
1403
1669
 
1404
1670
  def self.inner_class_types
1405
- @inner_class_types = {}
1671
+ @inner_class_types = { funding_sources: FundingSource }
1406
1672
  end
1407
1673
 
1408
1674
  def self.field_remappings
@@ -1484,7 +1750,7 @@ module Stripe
1484
1750
  end
1485
1751
 
1486
1752
  class NzBankAccount < ::Stripe::StripeObject
1487
- # The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
1753
+ # The name on the bank account. Only present if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details.
1488
1754
  attr_reader :account_holder_name
1489
1755
  # The numeric code for the bank account's bank.
1490
1756
  attr_reader :bank_code
@@ -1622,6 +1888,9 @@ module Stripe
1622
1888
  end
1623
1889
 
1624
1890
  class Paypay < ::Stripe::StripeObject
1891
+ # Uniquely identifies this particular PayPay account. You can use this attribute to check whether two PayPay accounts are the same.
1892
+ attr_reader :fingerprint
1893
+
1625
1894
  def self.inner_class_types
1626
1895
  @inner_class_types = {}
1627
1896
  end
@@ -88,6 +88,8 @@ module Stripe
88
88
  @field_remappings = {}
89
89
  end
90
90
  end
91
+ # Controls how much address information Checkout collects when automatic tax is enabled.
92
+ attr_reader :address_collection_precision
91
93
  # Indicates whether automatic tax is enabled for the session
92
94
  attr_reader :enabled
93
95
  # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
@@ -2455,6 +2457,8 @@ module Stripe
2455
2457
  attr_reader :wallet_options
2456
2458
 
2457
2459
  # Creates a Checkout Session object.
2460
+ #
2461
+ # 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).
2458
2462
  def self.create(params = {}, opts = {})
2459
2463
  request_stripe_object(
2460
2464
  method: :post,
@@ -322,9 +322,9 @@ module Stripe
322
322
 
323
323
  class Card < ::Stripe::StripeObject
324
324
  class Checks < ::Stripe::StripeObject
325
- # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
325
+ # If an address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
326
326
  attr_reader :address_line1_check
327
- # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
327
+ # If an address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
328
328
  attr_reader :address_postal_code_check
329
329
  # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
330
330
  attr_reader :cvc_check
@@ -2,9 +2,12 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
- # A coupon contains information about a percent-off or amount-off discount you
6
- # might want to apply to a customer. Coupons may be applied to [subscriptions](https://docs.stripe.com/api#subscriptions), [invoices](https://docs.stripe.com/api#invoices),
7
- # [checkout sessions](https://docs.stripe.com/api/checkout/sessions), [quotes](https://docs.stripe.com/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://docs.stripe.com/api/charges/create) or [payment intents](https://docs.stripe.com/api/payment_intents).
5
+ # A coupon defines a fixed or custom discount. Fixed discounts take a percentage or amount off, while
6
+ # [custom coupons](https://docs.stripe.com/billing/subscriptions/script-coupons) use scripts to calculate discounts dynamically for subscriptions and invoices.
7
+ # You can apply coupons to customers' [subscriptions](https://docs.stripe.com/api#subscriptions), [invoices](https://docs.stripe.com/api#invoices),
8
+ # [Checkout Sessions](https://docs.stripe.com/api/checkout/sessions), [quotes](https://docs.stripe.com/api#quotes), and other supported billing objects.
9
+ # The optional [applies_to.products](https://docs.stripe.com/api/coupons/object#coupon_object-applies_to-products) property limits which product line items are eligible for the discount, independently of where you apply the coupon.
10
+ # Coupons don't work with conventional one-off [charges](https://docs.stripe.com/api/charges/create) or [payment intents](https://docs.stripe.com/api/payment_intents).
8
11
  class Coupon < APIResource
9
12
  extend Stripe::APIOperations::Create
10
13
  include Stripe::APIOperations::Delete
@@ -438,7 +438,7 @@ module Stripe
438
438
  end
439
439
  # Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed).
440
440
  attr_reader :amount
441
- # List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.
441
+ # List of balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.
442
442
  attr_reader :balance_transactions
443
443
  # ID of the charge that's disputed.
444
444
  attr_reader :charge
@@ -73,14 +73,14 @@ module Stripe
73
73
  attr_reader :livemode
74
74
  # String representing the object's type. Objects of the same type share the same value.
75
75
  attr_reader :object
76
- # Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify.
76
+ # Number of webhooks that haven't been successfully delivered (for example, to return a 20x response). This count can include deliveries to endpoints that belong to Connect platforms or apps with access to your account. These endpoints don't appear when you list your account's webhook endpoints or event destinations. To see the delivery status for each endpoint, view the event in [Workbench](https://docs.stripe.com/workbench/overview#events).
77
77
  attr_reader :pending_webhooks
78
78
  # Information on the API request that triggers the event.
79
79
  attr_reader :request
80
80
  # Description of the event (for example, `invoice.created` or `charge.refunded`).
81
81
  attr_reader :type
82
82
 
83
- # List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
83
+ # List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object api_version attribute (not according to your current Stripe API version or Stripe-Version header). The list includes only events for the account that makes the request. A platform's list doesn't include events from its connected accounts. To list a connected account's events, make the request <a href="https://docs.stripe.com/connect/authentication">as the connected account](https://docs.stripe.com/api/events/object) using the Stripe-Account header.
84
84
  def self.list(params = {}, opts = {})
85
85
  request_stripe_object(method: :get, path: "/v1/events", params: params, opts: opts)
86
86
  end
@@ -287,7 +287,7 @@ module Stripe
287
287
  attr_reader :id
288
288
  # The last 4 digits of the card number.
289
289
  attr_reader :last4
290
- # Stripe’s assessment of whether this card’s details have been compromised. If this property isn't null, cancel and reissue the card to prevent fraudulent activity risk.
290
+ # Stripe’s assessment of whether this card’s details have been compromised. If this property isn’t null, cancel and reissue the card to reduce the risk of fraudulent activity. Stripe may remove a fraud warning if the cardholder confirms that the activity on the card is legitimate.
291
291
  attr_reader :latest_fraud_warning
292
292
  # Rules that control the lifecycle of this card, such as automatic cancellation. Refer to our [documentation](/issuing/controls/lifecycle-controls) for more details.
293
293
  attr_reader :lifecycle_controls
@@ -501,7 +501,7 @@ module Stripe
501
501
  class Checks < ::Stripe::StripeObject
502
502
  # If you provide a value for `address.line1`, the check result is one of `pass`, `fail`, `unavailable`, or `unchecked`.
503
503
  attr_reader :address_line1_check
504
- # If you provide a address postal code, the check result is one of `pass`, `fail`, `unavailable`, or `unchecked`.
504
+ # If you provide an address postal code, the check result is one of `pass`, `fail`, `unavailable`, or `unchecked`.
505
505
  attr_reader :address_postal_code_check
506
506
  # If you provide a CVC, the check results is one of `pass`, `fail`, `unavailable`, or `unchecked`.
507
507
  attr_reader :cvc_check
@@ -1396,6 +1396,9 @@ module Stripe
1396
1396
  end
1397
1397
 
1398
1398
  class Paypay < ::Stripe::StripeObject
1399
+ # Uniquely identifies this particular PayPay account. You can use this attribute to check whether two PayPay accounts are the same.
1400
+ attr_reader :fingerprint
1401
+
1399
1402
  def self.inner_class_types
1400
1403
  @inner_class_types = {}
1401
1404
  end