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.
- checksums.yaml +4 -4
- data/lib/stripe/api_operations/singleton_save.rb +4 -4
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/event_types.rb +22 -0
- data/lib/stripe/events/v2_money_management_dispute_adjustment_created_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_dispute_created_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_dispute_lost_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_dispute_updated_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_dispute_won_event.rb +44 -0
- data/lib/stripe/events/v2_risk_evaluation_outcome_delinquency_ready_event.rb +44 -0
- data/lib/stripe/object_types.rb +3 -0
- data/lib/stripe/params/balance_transaction_list_params.rb +2 -2
- data/lib/stripe/params/billing_portal/session_create_params.rb +13 -0
- data/lib/stripe/params/checkout/session_create_params.rb +208 -4
- data/lib/stripe/params/crypto/onramp_session_checkout_params.rb +37 -1
- data/lib/stripe/params/crypto/onramp_session_create_params.rb +4 -0
- data/lib/stripe/params/customer_create_params.rb +7 -1
- data/lib/stripe/params/customer_update_params.rb +7 -1
- data/lib/stripe/params/invoice_rendering_template_create_params.rb +14 -2
- data/lib/stripe/params/invoice_rendering_template_update_params.rb +14 -2
- data/lib/stripe/params/issuing/authorization_create_params.rb +1 -1
- data/lib/stripe/params/payment_intent_confirm_params.rb +96 -4
- data/lib/stripe/params/payment_intent_create_params.rb +96 -4
- data/lib/stripe/params/payment_intent_update_params.rb +96 -4
- data/lib/stripe/params/payment_method_configuration_create_params.rb +63 -0
- data/lib/stripe/params/payment_method_configuration_update_params.rb +63 -0
- data/lib/stripe/params/tax/calculation_create_params.rb +1 -1
- data/lib/stripe/params/terminal/configuration_create_params.rb +1 -1
- data/lib/stripe/params/terminal/configuration_update_params.rb +1 -1
- data/lib/stripe/params/terminal/reader_refund_payment_params.rb +15 -1
- data/lib/stripe/params/test_helpers/issuing/authorization_create_params.rb +1 -1
- data/lib/stripe/params/v2/billing/contract_create_params.rb +182 -9
- data/lib/stripe/params/v2/billing/contract_update_params.rb +328 -16
- data/lib/stripe/params/v2/core/account_create_params.rb +432 -3
- data/lib/stripe/params/v2/core/account_token_create_params.rb +4 -1
- data/lib/stripe/params/v2/core/account_update_params.rb +436 -4
- data/lib/stripe/params/v2/core/fee_batch_list_params.rb +7 -1
- data/lib/stripe/params/v2/money_management/dispute_adjustment_list_params.rb +23 -0
- data/lib/stripe/params/v2/money_management/dispute_adjustment_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/dispute_create_params.rb +37 -0
- data/lib/stripe/params/v2/money_management/dispute_list_params.rb +26 -0
- data/lib/stripe/params/v2/money_management/dispute_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/financial_account_update_params.rb +41 -1
- data/lib/stripe/params/v2/money_management/inbound_transfer_mandate_create_params.rb +24 -8
- data/lib/stripe/params/v2/money_management/spending_mandate_create_params.rb +51 -0
- data/lib/stripe/params/v2/money_management/spending_mandate_list_params.rb +4 -1
- data/lib/stripe/params/v2/money_management/spending_mandate_update_params.rb +39 -0
- data/lib/stripe/params/v2/money_management/test_helpers/financial_address_debit_params.rb +20 -1
- data/lib/stripe/params/v2/risk/evaluation_outcome_list_params.rb +34 -0
- data/lib/stripe/params/v2/risk/evaluation_outcome_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/test_helpers/money_management/inbound_transfer_fail_params.rb +19 -0
- data/lib/stripe/params/v2/test_helpers/money_management/inbound_transfer_succeed_params.rb +12 -0
- data/lib/stripe/params.rb +27 -5
- data/lib/stripe/resources/billing_portal/session.rb +16 -0
- data/lib/stripe/resources/cash_balance.rb +1 -1
- data/lib/stripe/resources/charge.rb +32 -0
- data/lib/stripe/resources/checkout/session.rb +65 -2
- data/lib/stripe/resources/confirmation_token.rb +54 -2
- data/lib/stripe/resources/customer.rb +4 -0
- data/lib/stripe/resources/customer_tax_exemption.rb +2 -0
- data/lib/stripe/resources/dispute.rb +4 -0
- data/lib/stripe/resources/identity/verification_report.rb +34 -0
- data/lib/stripe/resources/invoice.rb +0 -30
- data/lib/stripe/resources/invoice_rendering_template.rb +19 -1
- data/lib/stripe/resources/issuing/authorization.rb +18 -0
- data/lib/stripe/resources/issuing/card.rb +28 -0
- data/lib/stripe/resources/issuing/transaction.rb +18 -0
- data/lib/stripe/resources/mandate.rb +65 -0
- data/lib/stripe/resources/payment_attempt_record.rb +46 -0
- data/lib/stripe/resources/payment_intent.rb +113 -103
- data/lib/stripe/resources/payment_link.rb +2 -0
- data/lib/stripe/resources/payment_method.rb +53 -1
- data/lib/stripe/resources/payment_method_configuration.rb +102 -0
- data/lib/stripe/resources/payment_record.rb +46 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -30
- data/lib/stripe/resources/radar/account_evaluation.rb +36 -2
- data/lib/stripe/resources/reserve/plan.rb +1 -1
- data/lib/stripe/resources/risk/form.rb +44 -1
- data/lib/stripe/resources/setup_attempt.rb +91 -0
- data/lib/stripe/resources/setup_intent.rb +1 -1
- data/lib/stripe/resources/source.rb +2 -2
- data/lib/stripe/resources/subscription.rb +0 -20
- data/lib/stripe/resources/tax/calculation.rb +1 -1
- data/lib/stripe/resources/tax/form.rb +6 -0
- data/lib/stripe/resources/tax/transaction.rb +1 -1
- data/lib/stripe/resources/terminal/configuration.rb +1 -1
- data/lib/stripe/resources/terminal/onboarding_link.rb +2 -1
- data/lib/stripe/resources/terminal/reader.rb +17 -1
- data/lib/stripe/resources/test_helpers/test_clock.rb +1 -1
- data/lib/stripe/resources/three_d_secure/authentication.rb +1 -1
- data/lib/stripe/resources/v2/billing/contract.rb +285 -6
- data/lib/stripe/resources/v2/billing/contract_term.rb +133 -6
- data/lib/stripe/resources/v2/core/account.rb +2709 -322
- data/lib/stripe/resources/v2/core/fee_batch.rb +3 -0
- data/lib/stripe/resources/v2/core/fee_entry.rb +33 -3
- data/lib/stripe/resources/v2/money_management/dispute.rb +78 -0
- data/lib/stripe/resources/v2/money_management/dispute_adjustment.rb +53 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +45 -0
- data/lib/stripe/resources/v2/money_management/inbound_transfer_mandate.rb +6 -4
- data/lib/stripe/resources/v2/money_management/received_debit.rb +27 -1
- data/lib/stripe/resources/v2/money_management/spending_mandate.rb +18 -2
- data/lib/stripe/resources/v2/money_management/transaction.rb +2 -0
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +2 -0
- data/lib/stripe/resources/v2/risk/evaluation_outcome.rb +305 -0
- data/lib/stripe/resources/v2/signals/account_evaluation.rb +34 -0
- data/lib/stripe/resources/v2/signals/account_signal.rb +23 -0
- data/lib/stripe/resources.rb +30 -0
- data/lib/stripe/services/checkout/session_service.rb +1 -1
- data/lib/stripe/services/payment_intent_service.rb +0 -11
- data/lib/stripe/services/risk/form_service.rb +44 -1
- data/lib/stripe/services/subscription_service.rb +0 -11
- data/lib/stripe/services/terminal/onboarding_link_service.rb +1 -0
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +1 -1
- data/lib/stripe/services/v2/core/fee_batch_service.rb +4 -1
- data/lib/stripe/services/v2/core/fee_entry_service.rb +3 -1
- data/lib/stripe/services/v2/money_management/debit_dispute_service.rb +1 -0
- data/lib/stripe/services/v2/money_management/dispute_adjustment_service.rb +32 -0
- data/lib/stripe/services/v2/money_management/dispute_service.rb +46 -0
- data/lib/stripe/services/v2/money_management/inbound_transfer_mandate_service.rb +6 -3
- data/lib/stripe/services/v2/money_management/spending_mandate_service.rb +26 -0
- data/lib/stripe/services/v2/money_management_service.rb +3 -1
- data/lib/stripe/services/v2/risk/evaluation_outcome_service.rb +32 -0
- data/lib/stripe/services/v2/risk_service.rb +2 -1
- data/lib/stripe/services/v2/test_helpers/money_management/inbound_transfer_service.rb +34 -0
- data/lib/stripe/services/v2/test_helpers/money_management_service.rb +8 -0
- data/lib/stripe/services.rb +11 -0
- data/lib/stripe/stripe_client.rb +1 -1
- data/lib/stripe/stripe_event_notification_handler.rb +24 -0
- data/lib/stripe/stripe_object.rb +14 -4
- data/lib/stripe/util.rb +21 -2
- data/lib/stripe/v2_type_coercion.rb +6 -2
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe/webhook.rb +1 -0
- data/rbi/stripe.rbi +8211 -782
- metadata +26 -4
- data/lib/stripe/params/payment_intent_update_crypto_refund_address_params.rb +0 -19
- 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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f70a29e4c3739c72aaef8511133e6fa3109651e1e07d7299f056d89029212b75
|
|
4
|
+
data.tar.gz: 1bbd27c0614111579dc03190dc3b349f38b0b2b55407a887f80c387609283d72
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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 " \
|
data/lib/stripe/api_version.rb
CHANGED
data/lib/stripe/event_types.rb
CHANGED
|
@@ -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
|
data/lib/stripe/object_types.rb
CHANGED
|
@@ -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
|