stripe 21.2.0.pre.alpha.1 → 21.2.0.pre.alpha.2

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 (137) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_operations/singleton_save.rb +4 -4
  3. data/lib/stripe/api_version.rb +1 -1
  4. data/lib/stripe/event_types.rb +22 -0
  5. data/lib/stripe/events/v2_money_management_dispute_adjustment_created_event.rb +44 -0
  6. data/lib/stripe/events/v2_money_management_dispute_created_event.rb +44 -0
  7. data/lib/stripe/events/v2_money_management_dispute_lost_event.rb +44 -0
  8. data/lib/stripe/events/v2_money_management_dispute_updated_event.rb +44 -0
  9. data/lib/stripe/events/v2_money_management_dispute_won_event.rb +44 -0
  10. data/lib/stripe/events/v2_risk_evaluation_outcome_delinquency_ready_event.rb +44 -0
  11. data/lib/stripe/object_types.rb +3 -0
  12. data/lib/stripe/params/balance_transaction_list_params.rb +2 -2
  13. data/lib/stripe/params/billing_portal/session_create_params.rb +13 -0
  14. data/lib/stripe/params/checkout/session_create_params.rb +208 -4
  15. data/lib/stripe/params/crypto/onramp_session_checkout_params.rb +37 -1
  16. data/lib/stripe/params/crypto/onramp_session_create_params.rb +4 -0
  17. data/lib/stripe/params/customer_create_params.rb +7 -1
  18. data/lib/stripe/params/customer_update_params.rb +7 -1
  19. data/lib/stripe/params/invoice_rendering_template_create_params.rb +14 -2
  20. data/lib/stripe/params/invoice_rendering_template_update_params.rb +14 -2
  21. data/lib/stripe/params/issuing/authorization_create_params.rb +1 -1
  22. data/lib/stripe/params/payment_intent_confirm_params.rb +96 -4
  23. data/lib/stripe/params/payment_intent_create_params.rb +96 -4
  24. data/lib/stripe/params/payment_intent_update_params.rb +96 -4
  25. data/lib/stripe/params/payment_method_configuration_create_params.rb +63 -0
  26. data/lib/stripe/params/payment_method_configuration_update_params.rb +63 -0
  27. data/lib/stripe/params/tax/calculation_create_params.rb +1 -1
  28. data/lib/stripe/params/terminal/configuration_create_params.rb +1 -1
  29. data/lib/stripe/params/terminal/configuration_update_params.rb +1 -1
  30. data/lib/stripe/params/terminal/reader_refund_payment_params.rb +15 -1
  31. data/lib/stripe/params/test_helpers/issuing/authorization_create_params.rb +1 -1
  32. data/lib/stripe/params/v2/billing/contract_create_params.rb +182 -9
  33. data/lib/stripe/params/v2/billing/contract_update_params.rb +328 -16
  34. data/lib/stripe/params/v2/core/account_create_params.rb +432 -3
  35. data/lib/stripe/params/v2/core/account_token_create_params.rb +4 -1
  36. data/lib/stripe/params/v2/core/account_update_params.rb +436 -4
  37. data/lib/stripe/params/v2/core/fee_batch_list_params.rb +7 -1
  38. data/lib/stripe/params/v2/money_management/dispute_adjustment_list_params.rb +23 -0
  39. data/lib/stripe/params/v2/money_management/dispute_adjustment_retrieve_params.rb +10 -0
  40. data/lib/stripe/params/v2/money_management/dispute_create_params.rb +37 -0
  41. data/lib/stripe/params/v2/money_management/dispute_list_params.rb +26 -0
  42. data/lib/stripe/params/v2/money_management/dispute_retrieve_params.rb +10 -0
  43. data/lib/stripe/params/v2/money_management/financial_account_update_params.rb +41 -1
  44. data/lib/stripe/params/v2/money_management/inbound_transfer_mandate_create_params.rb +24 -8
  45. data/lib/stripe/params/v2/money_management/spending_mandate_create_params.rb +51 -0
  46. data/lib/stripe/params/v2/money_management/spending_mandate_list_params.rb +4 -1
  47. data/lib/stripe/params/v2/money_management/spending_mandate_update_params.rb +39 -0
  48. data/lib/stripe/params/v2/money_management/test_helpers/financial_address_debit_params.rb +20 -1
  49. data/lib/stripe/params/v2/risk/evaluation_outcome_list_params.rb +34 -0
  50. data/lib/stripe/params/v2/risk/evaluation_outcome_retrieve_params.rb +10 -0
  51. data/lib/stripe/params/v2/test_helpers/money_management/inbound_transfer_fail_params.rb +19 -0
  52. data/lib/stripe/params/v2/test_helpers/money_management/inbound_transfer_succeed_params.rb +12 -0
  53. data/lib/stripe/params.rb +27 -5
  54. data/lib/stripe/resources/billing_portal/session.rb +16 -0
  55. data/lib/stripe/resources/cash_balance.rb +1 -1
  56. data/lib/stripe/resources/charge.rb +32 -0
  57. data/lib/stripe/resources/checkout/session.rb +65 -2
  58. data/lib/stripe/resources/confirmation_token.rb +54 -2
  59. data/lib/stripe/resources/customer.rb +4 -0
  60. data/lib/stripe/resources/customer_tax_exemption.rb +2 -0
  61. data/lib/stripe/resources/dispute.rb +4 -0
  62. data/lib/stripe/resources/identity/verification_report.rb +34 -0
  63. data/lib/stripe/resources/invoice.rb +0 -30
  64. data/lib/stripe/resources/invoice_rendering_template.rb +19 -1
  65. data/lib/stripe/resources/issuing/authorization.rb +18 -0
  66. data/lib/stripe/resources/issuing/card.rb +28 -0
  67. data/lib/stripe/resources/issuing/transaction.rb +18 -0
  68. data/lib/stripe/resources/mandate.rb +65 -0
  69. data/lib/stripe/resources/payment_attempt_record.rb +46 -0
  70. data/lib/stripe/resources/payment_intent.rb +113 -103
  71. data/lib/stripe/resources/payment_link.rb +2 -0
  72. data/lib/stripe/resources/payment_method.rb +53 -1
  73. data/lib/stripe/resources/payment_method_configuration.rb +102 -0
  74. data/lib/stripe/resources/payment_record.rb +46 -0
  75. data/lib/stripe/resources/quote_preview_invoice.rb +0 -30
  76. data/lib/stripe/resources/radar/account_evaluation.rb +36 -2
  77. data/lib/stripe/resources/reserve/plan.rb +1 -1
  78. data/lib/stripe/resources/risk/form.rb +44 -1
  79. data/lib/stripe/resources/setup_attempt.rb +91 -0
  80. data/lib/stripe/resources/setup_intent.rb +1 -1
  81. data/lib/stripe/resources/source.rb +2 -2
  82. data/lib/stripe/resources/subscription.rb +0 -20
  83. data/lib/stripe/resources/tax/calculation.rb +1 -1
  84. data/lib/stripe/resources/tax/form.rb +6 -0
  85. data/lib/stripe/resources/tax/transaction.rb +1 -1
  86. data/lib/stripe/resources/terminal/configuration.rb +1 -1
  87. data/lib/stripe/resources/terminal/onboarding_link.rb +2 -1
  88. data/lib/stripe/resources/terminal/reader.rb +17 -1
  89. data/lib/stripe/resources/test_helpers/test_clock.rb +1 -1
  90. data/lib/stripe/resources/three_d_secure/authentication.rb +1 -1
  91. data/lib/stripe/resources/v2/billing/contract.rb +285 -6
  92. data/lib/stripe/resources/v2/billing/contract_term.rb +133 -6
  93. data/lib/stripe/resources/v2/core/account.rb +2709 -322
  94. data/lib/stripe/resources/v2/core/fee_batch.rb +3 -0
  95. data/lib/stripe/resources/v2/core/fee_entry.rb +33 -3
  96. data/lib/stripe/resources/v2/money_management/dispute.rb +78 -0
  97. data/lib/stripe/resources/v2/money_management/dispute_adjustment.rb +53 -0
  98. data/lib/stripe/resources/v2/money_management/financial_account.rb +45 -0
  99. data/lib/stripe/resources/v2/money_management/inbound_transfer_mandate.rb +6 -4
  100. data/lib/stripe/resources/v2/money_management/received_debit.rb +27 -1
  101. data/lib/stripe/resources/v2/money_management/spending_mandate.rb +18 -2
  102. data/lib/stripe/resources/v2/money_management/transaction.rb +2 -0
  103. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +2 -0
  104. data/lib/stripe/resources/v2/risk/evaluation_outcome.rb +305 -0
  105. data/lib/stripe/resources/v2/signals/account_evaluation.rb +34 -0
  106. data/lib/stripe/resources/v2/signals/account_signal.rb +23 -0
  107. data/lib/stripe/resources.rb +30 -0
  108. data/lib/stripe/services/checkout/session_service.rb +1 -1
  109. data/lib/stripe/services/payment_intent_service.rb +0 -11
  110. data/lib/stripe/services/risk/form_service.rb +44 -1
  111. data/lib/stripe/services/subscription_service.rb +0 -11
  112. data/lib/stripe/services/terminal/onboarding_link_service.rb +1 -0
  113. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +1 -1
  114. data/lib/stripe/services/v2/core/fee_batch_service.rb +4 -1
  115. data/lib/stripe/services/v2/core/fee_entry_service.rb +3 -1
  116. data/lib/stripe/services/v2/money_management/debit_dispute_service.rb +1 -0
  117. data/lib/stripe/services/v2/money_management/dispute_adjustment_service.rb +32 -0
  118. data/lib/stripe/services/v2/money_management/dispute_service.rb +46 -0
  119. data/lib/stripe/services/v2/money_management/inbound_transfer_mandate_service.rb +6 -3
  120. data/lib/stripe/services/v2/money_management/spending_mandate_service.rb +26 -0
  121. data/lib/stripe/services/v2/money_management_service.rb +3 -1
  122. data/lib/stripe/services/v2/risk/evaluation_outcome_service.rb +32 -0
  123. data/lib/stripe/services/v2/risk_service.rb +2 -1
  124. data/lib/stripe/services/v2/test_helpers/money_management/inbound_transfer_service.rb +34 -0
  125. data/lib/stripe/services/v2/test_helpers/money_management_service.rb +8 -0
  126. data/lib/stripe/services.rb +11 -0
  127. data/lib/stripe/stripe_client.rb +1 -1
  128. data/lib/stripe/stripe_event_notification_handler.rb +24 -0
  129. data/lib/stripe/stripe_object.rb +14 -4
  130. data/lib/stripe/util.rb +21 -2
  131. data/lib/stripe/v2_type_coercion.rb +6 -2
  132. data/lib/stripe/version.rb +1 -1
  133. data/lib/stripe/webhook.rb +1 -0
  134. data/rbi/stripe.rbi +8211 -782
  135. metadata +26 -4
  136. data/lib/stripe/params/payment_intent_update_crypto_refund_address_params.rb +0 -19
  137. data/lib/stripe/params/subscription_attach_cadence_params.rb +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad3ff88340bbbd1f1007f35971d5a5d5e636f76dfd7b55f8db6b0fc24c552e6f
4
- data.tar.gz: 199f3b3926a6a43d6b98c6917d0ab8f0b1346549f44f3b65cd35c0b0e70f3520
3
+ metadata.gz: f70a29e4c3739c72aaef8511133e6fa3109651e1e07d7299f056d89029212b75
4
+ data.tar.gz: 1bbd27c0614111579dc03190dc3b349f38b0b2b55407a887f80c387609283d72
5
5
  SHA512:
6
- metadata.gz: b9f5a87bfbc418a1cd1acb60e7b31500a7bc00168784e0c553060ced8d02b4dc8afb66d555a900579d639f232c3a0688ccaef7cf4861dc1d16f667f1681e6437
7
- data.tar.gz: 9823bb1b50ff78c3ba0a104ee4c0d39ff3a216bc37971f7554a556d0d502d7aad23f9a75630bbfb3f89f7a541b61c21fd56b7dbe48cac4e695f9ceca247617a2
6
+ metadata.gz: 18226e0dcacb88947ccd56c4086f77f04571da0a59d561d0f54d463771d684e04e11d32a7f962e8d67931ba410b74e0d50379c2f504fd9acdbe29c851231568c
7
+ data.tar.gz: 961ce0508bc34071fe478c8c70a3ef73cf1ea105b3fe15f1c1647de301fd86dbb79c4c3cec966218775acf901d70b6e964d71a3735fc5be7011af16a37e51f38
@@ -63,10 +63,10 @@ module Stripe
63
63
 
64
64
  opts = Util.normalize_opts(opts)
65
65
 
66
- APIRequestor.active_requestor.execute_request_initialize_from(:post, resource_url, :api, self,
67
- params: values,
68
- opts: RequestOptions.extract_opts_from_hash(opts),
69
- usage: ["save"])
66
+ @requestor.execute_request_initialize_from(:post, resource_url, :api, self,
67
+ params: values,
68
+ opts: RequestOptions.extract_opts_from_hash(opts),
69
+ usage: ["save"])
70
70
  end
71
71
  extend Gem::Deprecate
72
72
  deprecate :save, "the `update` class method (for examples " \
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module ApiVersion
6
- CURRENT = "2026-11-18.preview"
6
+ CURRENT = "2026-12-02.preview"
7
7
  CURRENT_MAJOR = ""
8
8
  end
9
9
  end
@@ -665,6 +665,14 @@ module Stripe
665
665
  Events::V2MoneyManagementDebitDisputeSubmittedEvent,
666
666
  Events::V2MoneyManagementDebitDisputeSucceededEvent.lookup_type =>
667
667
  Events::V2MoneyManagementDebitDisputeSucceededEvent,
668
+ Events::V2MoneyManagementDisputeAdjustmentCreatedEvent.lookup_type =>
669
+ Events::V2MoneyManagementDisputeAdjustmentCreatedEvent,
670
+ Events::V2MoneyManagementDisputeCreatedEvent.lookup_type =>
671
+ Events::V2MoneyManagementDisputeCreatedEvent,
672
+ Events::V2MoneyManagementDisputeLostEvent.lookup_type => Events::V2MoneyManagementDisputeLostEvent,
673
+ Events::V2MoneyManagementDisputeUpdatedEvent.lookup_type =>
674
+ Events::V2MoneyManagementDisputeUpdatedEvent,
675
+ Events::V2MoneyManagementDisputeWonEvent.lookup_type => Events::V2MoneyManagementDisputeWonEvent,
668
676
  Events::V2MoneyManagementEarnedCreditSucceededEvent.lookup_type =>
669
677
  Events::V2MoneyManagementEarnedCreditSucceededEvent,
670
678
  Events::V2MoneyManagementFinancialAccountCreatedEvent.lookup_type =>
@@ -890,6 +898,8 @@ module Stripe
890
898
  Events::V2ReportingReportRunSucceededEvent.lookup_type =>
891
899
  Events::V2ReportingReportRunSucceededEvent,
892
900
  Events::V2ReportingReportRunUpdatedEvent.lookup_type => Events::V2ReportingReportRunUpdatedEvent,
901
+ Events::V2RiskEvaluationOutcomeDelinquencyReadyEvent.lookup_type =>
902
+ Events::V2RiskEvaluationOutcomeDelinquencyReadyEvent,
893
903
  Events::V2SignalsAccountEvaluationCompleteEvent.lookup_type =>
894
904
  Events::V2SignalsAccountEvaluationCompleteEvent,
895
905
  Events::V2SignalsAccountSignalCustomerRiskReadyEvent.lookup_type =>
@@ -1742,6 +1752,16 @@ module Stripe
1742
1752
  Events::V2MoneyManagementDebitDisputeSubmittedEventNotification,
1743
1753
  Events::V2MoneyManagementDebitDisputeSucceededEventNotification.lookup_type =>
1744
1754
  Events::V2MoneyManagementDebitDisputeSucceededEventNotification,
1755
+ Events::V2MoneyManagementDisputeAdjustmentCreatedEventNotification.lookup_type =>
1756
+ Events::V2MoneyManagementDisputeAdjustmentCreatedEventNotification,
1757
+ Events::V2MoneyManagementDisputeCreatedEventNotification.lookup_type =>
1758
+ Events::V2MoneyManagementDisputeCreatedEventNotification,
1759
+ Events::V2MoneyManagementDisputeLostEventNotification.lookup_type =>
1760
+ Events::V2MoneyManagementDisputeLostEventNotification,
1761
+ Events::V2MoneyManagementDisputeUpdatedEventNotification.lookup_type =>
1762
+ Events::V2MoneyManagementDisputeUpdatedEventNotification,
1763
+ Events::V2MoneyManagementDisputeWonEventNotification.lookup_type =>
1764
+ Events::V2MoneyManagementDisputeWonEventNotification,
1745
1765
  Events::V2MoneyManagementEarnedCreditSucceededEventNotification.lookup_type =>
1746
1766
  Events::V2MoneyManagementEarnedCreditSucceededEventNotification,
1747
1767
  Events::V2MoneyManagementFinancialAccountCreatedEventNotification.lookup_type =>
@@ -1970,6 +1990,8 @@ module Stripe
1970
1990
  Events::V2ReportingReportRunSucceededEventNotification,
1971
1991
  Events::V2ReportingReportRunUpdatedEventNotification.lookup_type =>
1972
1992
  Events::V2ReportingReportRunUpdatedEventNotification,
1993
+ Events::V2RiskEvaluationOutcomeDelinquencyReadyEventNotification.lookup_type =>
1994
+ Events::V2RiskEvaluationOutcomeDelinquencyReadyEventNotification,
1973
1995
  Events::V2SignalsAccountEvaluationCompleteEventNotification.lookup_type =>
1974
1996
  Events::V2SignalsAccountEvaluationCompleteEventNotification,
1975
1997
  Events::V2SignalsAccountSignalCustomerRiskReadyEventNotification.lookup_type =>
@@ -0,0 +1,44 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Events
6
+ # Occurs when a DisputeAdjustment records a money movement on the FinancialAccount for a Dispute.
7
+ class V2MoneyManagementDisputeAdjustmentCreatedEvent < Stripe::V2::Core::Event
8
+ def self.lookup_type
9
+ "v2.money_management.dispute_adjustment.created"
10
+ end
11
+
12
+ # Retrieves the related object from the API. Makes an API request on every call.
13
+ def fetch_related_object
14
+ _request(
15
+ method: :get,
16
+ path: related_object.url,
17
+ base_address: :api,
18
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
19
+ )
20
+ end
21
+ attr_reader :related_object
22
+ end
23
+
24
+ # Occurs when a DisputeAdjustment records a money movement on the FinancialAccount for a Dispute.
25
+ class V2MoneyManagementDisputeAdjustmentCreatedEventNotification < Stripe::V2::Core::EventNotification
26
+ def self.lookup_type
27
+ "v2.money_management.dispute_adjustment.created"
28
+ end
29
+
30
+ attr_reader :related_object
31
+
32
+ # Retrieves the DisputeAdjustment related to this EventNotification from the Stripe API. Makes an API request on every call.
33
+ def fetch_related_object
34
+ resp = @client.raw_request(
35
+ :get,
36
+ related_object.url,
37
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
38
+ usage: ["fetch_related_object"]
39
+ )
40
+ @client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,44 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Events
6
+ # Occurs when a Dispute is created and is under review.
7
+ class V2MoneyManagementDisputeCreatedEvent < Stripe::V2::Core::Event
8
+ def self.lookup_type
9
+ "v2.money_management.dispute.created"
10
+ end
11
+
12
+ # Retrieves the related object from the API. Makes an API request on every call.
13
+ def fetch_related_object
14
+ _request(
15
+ method: :get,
16
+ path: related_object.url,
17
+ base_address: :api,
18
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
19
+ )
20
+ end
21
+ attr_reader :related_object
22
+ end
23
+
24
+ # Occurs when a Dispute is created and is under review.
25
+ class V2MoneyManagementDisputeCreatedEventNotification < Stripe::V2::Core::EventNotification
26
+ def self.lookup_type
27
+ "v2.money_management.dispute.created"
28
+ end
29
+
30
+ attr_reader :related_object
31
+
32
+ # Retrieves the Dispute related to this EventNotification from the Stripe API. Makes an API request on every call.
33
+ def fetch_related_object
34
+ resp = @client.raw_request(
35
+ :get,
36
+ related_object.url,
37
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
38
+ usage: ["fetch_related_object"]
39
+ )
40
+ @client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,44 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Events
6
+ # Occurs when a Dispute is resolved against the account holder.
7
+ class V2MoneyManagementDisputeLostEvent < Stripe::V2::Core::Event
8
+ def self.lookup_type
9
+ "v2.money_management.dispute.lost"
10
+ end
11
+
12
+ # Retrieves the related object from the API. Makes an API request on every call.
13
+ def fetch_related_object
14
+ _request(
15
+ method: :get,
16
+ path: related_object.url,
17
+ base_address: :api,
18
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
19
+ )
20
+ end
21
+ attr_reader :related_object
22
+ end
23
+
24
+ # Occurs when a Dispute is resolved against the account holder.
25
+ class V2MoneyManagementDisputeLostEventNotification < Stripe::V2::Core::EventNotification
26
+ def self.lookup_type
27
+ "v2.money_management.dispute.lost"
28
+ end
29
+
30
+ attr_reader :related_object
31
+
32
+ # Retrieves the Dispute related to this EventNotification from the Stripe API. Makes an API request on every call.
33
+ def fetch_related_object
34
+ resp = @client.raw_request(
35
+ :get,
36
+ related_object.url,
37
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
38
+ usage: ["fetch_related_object"]
39
+ )
40
+ @client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,44 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Events
6
+ # Occurs when a Dispute changes, including when it is won or lost.
7
+ class V2MoneyManagementDisputeUpdatedEvent < Stripe::V2::Core::Event
8
+ def self.lookup_type
9
+ "v2.money_management.dispute.updated"
10
+ end
11
+
12
+ # Retrieves the related object from the API. Makes an API request on every call.
13
+ def fetch_related_object
14
+ _request(
15
+ method: :get,
16
+ path: related_object.url,
17
+ base_address: :api,
18
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
19
+ )
20
+ end
21
+ attr_reader :related_object
22
+ end
23
+
24
+ # Occurs when a Dispute changes, including when it is won or lost.
25
+ class V2MoneyManagementDisputeUpdatedEventNotification < Stripe::V2::Core::EventNotification
26
+ def self.lookup_type
27
+ "v2.money_management.dispute.updated"
28
+ end
29
+
30
+ attr_reader :related_object
31
+
32
+ # Retrieves the Dispute related to this EventNotification from the Stripe API. Makes an API request on every call.
33
+ def fetch_related_object
34
+ resp = @client.raw_request(
35
+ :get,
36
+ related_object.url,
37
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
38
+ usage: ["fetch_related_object"]
39
+ )
40
+ @client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,44 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Events
6
+ # Occurs when a Dispute is resolved in the account holder's favor.
7
+ class V2MoneyManagementDisputeWonEvent < Stripe::V2::Core::Event
8
+ def self.lookup_type
9
+ "v2.money_management.dispute.won"
10
+ end
11
+
12
+ # Retrieves the related object from the API. Makes an API request on every call.
13
+ def fetch_related_object
14
+ _request(
15
+ method: :get,
16
+ path: related_object.url,
17
+ base_address: :api,
18
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
19
+ )
20
+ end
21
+ attr_reader :related_object
22
+ end
23
+
24
+ # Occurs when a Dispute is resolved in the account holder's favor.
25
+ class V2MoneyManagementDisputeWonEventNotification < Stripe::V2::Core::EventNotification
26
+ def self.lookup_type
27
+ "v2.money_management.dispute.won"
28
+ end
29
+
30
+ attr_reader :related_object
31
+
32
+ # Retrieves the Dispute related to this EventNotification from the Stripe API. Makes an API request on every call.
33
+ def fetch_related_object
34
+ resp = @client.raw_request(
35
+ :get,
36
+ related_object.url,
37
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
38
+ usage: ["fetch_related_object"]
39
+ )
40
+ @client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,44 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Events
6
+ # Occurs when a new Stripe-generated delinquency evaluation outcome is available.
7
+ class V2RiskEvaluationOutcomeDelinquencyReadyEvent < Stripe::V2::Core::Event
8
+ def self.lookup_type
9
+ "v2.risk.evaluation_outcome.delinquency_ready"
10
+ end
11
+
12
+ # Retrieves the related object from the API. Makes an API request on every call.
13
+ def fetch_related_object
14
+ _request(
15
+ method: :get,
16
+ path: related_object.url,
17
+ base_address: :api,
18
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
19
+ )
20
+ end
21
+ attr_reader :related_object
22
+ end
23
+
24
+ # Occurs when a new Stripe-generated delinquency evaluation outcome is available.
25
+ class V2RiskEvaluationOutcomeDelinquencyReadyEventNotification < Stripe::V2::Core::EventNotification
26
+ def self.lookup_type
27
+ "v2.risk.evaluation_outcome.delinquency_ready"
28
+ end
29
+
30
+ attr_reader :related_object
31
+
32
+ # Retrieves the EvaluationOutcome related to this EventNotification from the Stripe API. Makes an API request on every call.
33
+ def fetch_related_object
34
+ resp = @client.raw_request(
35
+ :get,
36
+ related_object.url,
37
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
38
+ usage: ["fetch_related_object"]
39
+ )
40
+ @client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
41
+ end
42
+ end
43
+ end
44
+ end
@@ -306,6 +306,8 @@ module Stripe
306
306
  V2::MoneyManagement::Adjustment.object_name => V2::MoneyManagement::Adjustment,
307
307
  V2::MoneyManagement::CurrencyConversion.object_name => V2::MoneyManagement::CurrencyConversion,
308
308
  V2::MoneyManagement::DebitDispute.object_name => V2::MoneyManagement::DebitDispute,
309
+ V2::MoneyManagement::Dispute.object_name => V2::MoneyManagement::Dispute,
310
+ V2::MoneyManagement::DisputeAdjustment.object_name => V2::MoneyManagement::DisputeAdjustment,
309
311
  V2::MoneyManagement::EarnedCredit.object_name => V2::MoneyManagement::EarnedCredit,
310
312
  V2::MoneyManagement::EarnedCreditSimulation.object_name =>
311
313
  V2::MoneyManagement::EarnedCreditSimulation,
@@ -369,6 +371,7 @@ module Stripe
369
371
  V2::Provisioning::ResourceAccessConfiguration,
370
372
  V2::Reporting::Report.object_name => V2::Reporting::Report,
371
373
  V2::Reporting::ReportRun.object_name => V2::Reporting::ReportRun,
374
+ V2::Risk::EvaluationOutcome.object_name => V2::Risk::EvaluationOutcome,
372
375
  V2::Risk::Form.object_name => V2::Risk::Form,
373
376
  V2::Signals::AccountActivity.object_name => V2::Signals::AccountActivity,
374
377
  V2::Signals::AccountEvaluation.object_name => V2::Signals::AccountEvaluation,
@@ -30,9 +30,9 @@ module Stripe
30
30
  attr_accessor :expand
31
31
  # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
32
32
  attr_accessor :limit
33
- # For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID.
33
+ # For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. You can't combine this parameter with `source`.
34
34
  attr_accessor :payout
35
- # Only returns transactions associated with the given object.
35
+ # Only returns transactions associated with the given object. You can't combine this parameter with `payout`.
36
36
  attr_accessor :source
37
37
  # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
38
38
  attr_accessor :starting_after
@@ -57,6 +57,15 @@ module Stripe
57
57
  end
58
58
  end
59
59
 
60
+ class PaymentMethodUpdate < ::Stripe::RequestParams
61
+ # The ID of the subscription whose payment method the customer will update. The new payment method is set as the subscription's `default_payment_method` instead of the customer's `invoice_settings.default_payment_method`. Only supported in the redesigned customer portal.
62
+ attr_accessor :subscription
63
+
64
+ def initialize(subscription: nil)
65
+ @subscription = subscription
66
+ end
67
+ end
68
+
60
69
  class SubscriptionCancel < ::Stripe::RequestParams
61
70
  class Retention < ::Stripe::RequestParams
62
71
  class CouponOffer < ::Stripe::RequestParams
@@ -148,6 +157,8 @@ module Stripe
148
157
  end
149
158
  # Behavior after the flow is completed.
150
159
  attr_accessor :after_completion
160
+ # Configuration when `flow_data.type=payment_method_update`.
161
+ attr_accessor :payment_method_update
151
162
  # Configuration when `flow_data.type=subscription_cancel`.
152
163
  attr_accessor :subscription_cancel
153
164
  # Configuration when `flow_data.type=subscription_pause`.
@@ -161,6 +172,7 @@ module Stripe
161
172
 
162
173
  def initialize(
163
174
  after_completion: nil,
175
+ payment_method_update: nil,
164
176
  subscription_cancel: nil,
165
177
  subscription_pause: nil,
166
178
  subscription_update: nil,
@@ -168,6 +180,7 @@ module Stripe
168
180
  type: nil
169
181
  )
170
182
  @after_completion = after_completion
183
+ @payment_method_update = payment_method_update
171
184
  @subscription_cancel = subscription_cancel
172
185
  @subscription_pause = subscription_pause
173
186
  @subscription_update = subscription_update