stripe 20.2.0.pre.alpha.2 → 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 (83) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/event_types.rb +20 -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_money_management_received_debit_mandate_canceled_event.rb +2 -0
  6. data/lib/stripe/events/v2_money_management_received_debit_mandate_created_event.rb +2 -0
  7. data/lib/stripe/events/v2_money_management_received_debit_mandate_expired_event.rb +2 -0
  8. data/lib/stripe/events/v2_money_management_received_debit_mandate_pending_cancellation_event.rb +2 -0
  9. data/lib/stripe/events/v2_money_management_received_debit_mandate_updated_event.rb +2 -0
  10. data/lib/stripe/events/v2_money_management_spending_mandate_canceled_event.rb +44 -0
  11. data/lib/stripe/events/v2_money_management_spending_mandate_created_event.rb +46 -0
  12. data/lib/stripe/events/v2_money_management_spending_mandate_expired_event.rb +44 -0
  13. data/lib/stripe/events/v2_money_management_spending_mandate_pending_cancellation_event.rb +44 -0
  14. data/lib/stripe/events/v2_money_management_spending_mandate_updated_event.rb +44 -0
  15. data/lib/stripe/object_types.rb +1 -0
  16. data/lib/stripe/params/checkout/session_create_params.rb +4 -0
  17. data/lib/stripe/params/customer_update_params.rb +55 -0
  18. data/lib/stripe/params/fx_quote_create_params.rb +2 -2
  19. data/lib/stripe/params/payment_attempt_record_report_authenticated_params.rb +10 -1
  20. data/lib/stripe/params/payment_attempt_record_report_authorized_params.rb +35 -1
  21. data/lib/stripe/params/payment_attempt_record_report_guaranteed_params.rb +35 -1
  22. data/lib/stripe/params/payment_method_configuration_create_params.rb +21 -0
  23. data/lib/stripe/params/payment_method_configuration_update_params.rb +21 -0
  24. data/lib/stripe/params/payment_record_report_payment_attempt_guaranteed_params.rb +35 -1
  25. data/lib/stripe/params/payment_record_report_payment_attempt_params.rb +35 -1
  26. data/lib/stripe/params/payment_record_report_payment_params.rb +35 -1
  27. data/lib/stripe/params/radar/payment_evaluation_create_params.rb +7 -1
  28. data/lib/stripe/params/setup_intent_confirm_params.rb +13 -1
  29. data/lib/stripe/params/setup_intent_create_params.rb +13 -1
  30. data/lib/stripe/params/setup_intent_update_params.rb +13 -1
  31. data/lib/stripe/params/shared_payment/issued_token_create_params.rb +19 -0
  32. data/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb +22 -1
  33. data/lib/stripe/params/v2/money_management/outbound_setup_intent_create_params.rb +46 -0
  34. data/lib/stripe/params/v2/money_management/payout_intent_create_params.rb +22 -1
  35. data/lib/stripe/params/v2/money_management/payout_intent_update_params.rb +22 -1
  36. data/lib/stripe/params/v2/money_management/received_debit_list_params.rb +5 -2
  37. data/lib/stripe/params/v2/money_management/spending_mandate_cancel_params.rb +10 -0
  38. data/lib/stripe/params/v2/money_management/spending_mandate_list_params.rb +26 -0
  39. data/lib/stripe/params/v2/money_management/spending_mandate_retrieve_params.rb +10 -0
  40. data/lib/stripe/params.rb +6 -0
  41. data/lib/stripe/resources/balance_transaction.rb +1 -1
  42. data/lib/stripe/resources/charge.rb +23 -7
  43. data/lib/stripe/resources/checkout/session.rb +2 -0
  44. data/lib/stripe/resources/confirmation_token.rb +19 -3
  45. data/lib/stripe/resources/identity/verification_report.rb +34 -0
  46. data/lib/stripe/resources/mandate.rb +16 -0
  47. data/lib/stripe/resources/payment_attempt_record.rb +18 -2
  48. data/lib/stripe/resources/payment_intent.rb +26 -0
  49. data/lib/stripe/resources/payment_method.rb +19 -3
  50. data/lib/stripe/resources/payment_method_configuration.rb +34 -0
  51. data/lib/stripe/resources/payment_record.rb +18 -2
  52. data/lib/stripe/resources/radar/payment_evaluation.rb +4 -0
  53. data/lib/stripe/resources/reserve/hold.rb +2 -2
  54. data/lib/stripe/resources/reserve/plan.rb +1 -1
  55. data/lib/stripe/resources/reserve/release.rb +1 -1
  56. data/lib/stripe/resources/setup_attempt.rb +18 -2
  57. data/lib/stripe/resources/setup_intent.rb +19 -1
  58. data/lib/stripe/resources/shared_payment/granted_token.rb +32 -2
  59. data/lib/stripe/resources/shared_payment/issued_token.rb +20 -0
  60. data/lib/stripe/resources/terminal/reader.rb +18 -1
  61. data/lib/stripe/resources/v2/core/event.rb +1 -1
  62. data/lib/stripe/resources/v2/core/event_base.rb +36 -0
  63. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +74 -1
  64. data/lib/stripe/resources/v2/money_management/payout_intent.rb +22 -1
  65. data/lib/stripe/resources/v2/money_management/payout_method.rb +40 -0
  66. data/lib/stripe/resources/v2/money_management/received_debit.rb +3 -0
  67. data/lib/stripe/resources/v2/money_management/spending_mandate.rb +121 -0
  68. data/lib/stripe/resources.rb +29 -0
  69. data/lib/stripe/services/checkout/session_service.rb +2 -0
  70. data/lib/stripe/services/reserve/hold_service.rb +2 -2
  71. data/lib/stripe/services/reserve/plan_service.rb +2 -2
  72. data/lib/stripe/services/reserve/release_service.rb +2 -2
  73. data/lib/stripe/services/v2/core/vault/network_token_service.rb +1 -0
  74. data/lib/stripe/services/v2/money_management/received_debit_mandate_service.rb +3 -0
  75. data/lib/stripe/services/v2/money_management/spending_mandate_service.rb +43 -0
  76. data/lib/stripe/services/v2/money_management_service.rb +2 -1
  77. data/lib/stripe/services.rb +2 -0
  78. data/lib/stripe/stripe_event_notification_handler.rb +20 -0
  79. data/lib/stripe/version.rb +1 -1
  80. data/lib/stripe/webhook.rb +61 -2
  81. data/rbi/stripe/resources/v2/core/event_base.rbi +11 -0
  82. data/rbi/stripe.rbi +1464 -72
  83. metadata +14 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23d399f2f6bcef6dc7a24850449dd98633f1b487bf45ef8a41efd3333fff751f
4
- data.tar.gz: 5737310496d29af374ee1c2c1fc358d61c0f1f3eb39d92dacd56cd951aabefb2
3
+ metadata.gz: b939fd238eaf2c1e88bb2aae8455ec54301fa95ad3fb31da3fe0bd6bfbea0d4d
4
+ data.tar.gz: 2761a0ebbe0849ba0a486e26f62df09175a7f7ba603977ae0ddd974e54db79ef
5
5
  SHA512:
6
- metadata.gz: 8758a3977c284117337d43931445a4f81cd87bf8f07f00ded958534b0ee05f67f93a13d0262c123adca161298c8c20922093b4efb8b6943710e7b028bc1ab713
7
- data.tar.gz: 34633662ef7bbccd5b309b842b1c5a1682131addfda91735765e926d959af508cd52d2b96e0507947b8a54b769495d5e3b61de5cafac9fdbcff5f8f5dc5d16db
6
+ metadata.gz: 3169195de89f6c0362789a81306e2dedfef978c09f46da4d9b1b76e2f1d7b1133b8a668ce3a3cfb7732a2e2aa01e4bb97fdc1a570fb0cc2eb02a609e8f3559ae
7
+ data.tar.gz: 67b088e72db2b3b77abdd787d49eb2f00d4a441a2ce47be5c1f548b4f28fd173f165c63fcedc223225131e1c71bf76cf7a7e3d207f1f3229e1b56332e447d89b
@@ -812,6 +812,16 @@ module Stripe
812
812
  Events::V2MoneyManagementRewardProgramRewardEarnedEvent,
813
813
  Events::V2MoneyManagementRewardProgramRewardReversedEvent.lookup_type =>
814
814
  Events::V2MoneyManagementRewardProgramRewardReversedEvent,
815
+ Events::V2MoneyManagementSpendingMandateCanceledEvent.lookup_type =>
816
+ Events::V2MoneyManagementSpendingMandateCanceledEvent,
817
+ Events::V2MoneyManagementSpendingMandateCreatedEvent.lookup_type =>
818
+ Events::V2MoneyManagementSpendingMandateCreatedEvent,
819
+ Events::V2MoneyManagementSpendingMandateExpiredEvent.lookup_type =>
820
+ Events::V2MoneyManagementSpendingMandateExpiredEvent,
821
+ Events::V2MoneyManagementSpendingMandatePendingCancellationEvent.lookup_type =>
822
+ Events::V2MoneyManagementSpendingMandatePendingCancellationEvent,
823
+ Events::V2MoneyManagementSpendingMandateUpdatedEvent.lookup_type =>
824
+ Events::V2MoneyManagementSpendingMandateUpdatedEvent,
815
825
  Events::V2MoneyManagementTransactionCreatedEvent.lookup_type =>
816
826
  Events::V2MoneyManagementTransactionCreatedEvent,
817
827
  Events::V2MoneyManagementTransactionUpdatedEvent.lookup_type =>
@@ -1859,6 +1869,16 @@ module Stripe
1859
1869
  Events::V2MoneyManagementRewardProgramRewardEarnedEventNotification,
1860
1870
  Events::V2MoneyManagementRewardProgramRewardReversedEventNotification.lookup_type =>
1861
1871
  Events::V2MoneyManagementRewardProgramRewardReversedEventNotification,
1872
+ Events::V2MoneyManagementSpendingMandateCanceledEventNotification.lookup_type =>
1873
+ Events::V2MoneyManagementSpendingMandateCanceledEventNotification,
1874
+ Events::V2MoneyManagementSpendingMandateCreatedEventNotification.lookup_type =>
1875
+ Events::V2MoneyManagementSpendingMandateCreatedEventNotification,
1876
+ Events::V2MoneyManagementSpendingMandateExpiredEventNotification.lookup_type =>
1877
+ Events::V2MoneyManagementSpendingMandateExpiredEventNotification,
1878
+ Events::V2MoneyManagementSpendingMandatePendingCancellationEventNotification.lookup_type =>
1879
+ Events::V2MoneyManagementSpendingMandatePendingCancellationEventNotification,
1880
+ Events::V2MoneyManagementSpendingMandateUpdatedEventNotification.lookup_type =>
1881
+ Events::V2MoneyManagementSpendingMandateUpdatedEventNotification,
1862
1882
  Events::V2MoneyManagementTransactionCreatedEventNotification.lookup_type =>
1863
1883
  Events::V2MoneyManagementTransactionCreatedEventNotification,
1864
1884
  Events::V2MoneyManagementTransactionUpdatedEventNotification.lookup_type =>
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Events
6
- # This event occurs when an account is closed.
6
+ # Occurs when an Account is closed.
7
7
  class V2CoreAccountClosedEvent < Stripe::V2::Core::Event
8
8
  def self.lookup_type
9
9
  "v2.core.account.closed"
@@ -21,7 +21,7 @@ module Stripe
21
21
  attr_reader :related_object
22
22
  end
23
23
 
24
- # This event occurs when an account is closed.
24
+ # Occurs when an Account is closed.
25
25
  class V2CoreAccountClosedEventNotification < Stripe::V2::Core::EventNotification
26
26
  def self.lookup_type
27
27
  "v2.core.account.closed"
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Events
6
- # This event occurs when account defaults are created or updated.
6
+ # Occurs when an Account's defaults are created or updated.
7
7
  class V2CoreAccountIncludingDefaultsUpdatedEvent < Stripe::V2::Core::Event
8
8
  def self.lookup_type
9
9
  "v2.core.account[defaults].updated"
@@ -21,7 +21,7 @@ module Stripe
21
21
  attr_reader :related_object
22
22
  end
23
23
 
24
- # This event occurs when account defaults are created or updated.
24
+ # Occurs when an Account's defaults are created or updated.
25
25
  class V2CoreAccountIncludingDefaultsUpdatedEventNotification < Stripe::V2::Core::EventNotification
26
26
  def self.lookup_type
27
27
  "v2.core.account[defaults].updated"
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Events
6
+ # Deprecated: Use v2.money_management.spending_mandate.canceled instead.
6
7
  # Occurs when a ReceivedDebitMandate is successfully canceled.
7
8
  class V2MoneyManagementReceivedDebitMandateCanceledEvent < Stripe::V2::Core::Event
8
9
  def self.lookup_type
@@ -21,6 +22,7 @@ module Stripe
21
22
  attr_reader :related_object
22
23
  end
23
24
 
25
+ # Deprecated: Use v2.money_management.spending_mandate.canceled instead.
24
26
  # Occurs when a ReceivedDebitMandate is successfully canceled.
25
27
  class V2MoneyManagementReceivedDebitMandateCanceledEventNotification < Stripe::V2::Core::EventNotification
26
28
  def self.lookup_type
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Events
6
+ # Deprecated: Use v2.money_management.spending_mandate.created instead.
6
7
  # Occurs when a ReceivedDebitMandate is created by an external party.
7
8
  class V2MoneyManagementReceivedDebitMandateCreatedEvent < Stripe::V2::Core::Event
8
9
  def self.lookup_type
@@ -21,6 +22,7 @@ module Stripe
21
22
  attr_reader :related_object
22
23
  end
23
24
 
25
+ # Deprecated: Use v2.money_management.spending_mandate.created instead.
24
26
  # Occurs when a ReceivedDebitMandate is created by an external party.
25
27
  class V2MoneyManagementReceivedDebitMandateCreatedEventNotification < Stripe::V2::Core::EventNotification
26
28
  def self.lookup_type
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Events
6
+ # Deprecated: Use v2.money_management.spending_mandate.expired instead.
6
7
  # Occurs when a ReceivedDebitMandate expires.
7
8
  class V2MoneyManagementReceivedDebitMandateExpiredEvent < Stripe::V2::Core::Event
8
9
  def self.lookup_type
@@ -21,6 +22,7 @@ module Stripe
21
22
  attr_reader :related_object
22
23
  end
23
24
 
25
+ # Deprecated: Use v2.money_management.spending_mandate.expired instead.
24
26
  # Occurs when a ReceivedDebitMandate expires.
25
27
  class V2MoneyManagementReceivedDebitMandateExpiredEventNotification < Stripe::V2::Core::EventNotification
26
28
  def self.lookup_type
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Events
6
+ # Deprecated: Use v2.money_management.spending_mandate.pending_cancellation instead.
6
7
  # Occurs when a ReceivedDebitMandate transitions to pending_cancellation status.
7
8
  class V2MoneyManagementReceivedDebitMandatePendingCancellationEvent < Stripe::V2::Core::Event
8
9
  def self.lookup_type
@@ -21,6 +22,7 @@ module Stripe
21
22
  attr_reader :related_object
22
23
  end
23
24
 
25
+ # Deprecated: Use v2.money_management.spending_mandate.pending_cancellation instead.
24
26
  # Occurs when a ReceivedDebitMandate transitions to pending_cancellation status.
25
27
  class V2MoneyManagementReceivedDebitMandatePendingCancellationEventNotification < Stripe::V2::Core::EventNotification
26
28
  def self.lookup_type
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Events
6
+ # Deprecated: Use v2.money_management.spending_mandate.updated instead.
6
7
  # Occurs when a ReceivedDebitMandate is updated.
7
8
  class V2MoneyManagementReceivedDebitMandateUpdatedEvent < Stripe::V2::Core::Event
8
9
  def self.lookup_type
@@ -21,6 +22,7 @@ module Stripe
21
22
  attr_reader :related_object
22
23
  end
23
24
 
25
+ # Deprecated: Use v2.money_management.spending_mandate.updated instead.
24
26
  # Occurs when a ReceivedDebitMandate is updated.
25
27
  class V2MoneyManagementReceivedDebitMandateUpdatedEventNotification < Stripe::V2::Core::EventNotification
26
28
  def self.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 SpendingMandate is successfully canceled.
7
+ class V2MoneyManagementSpendingMandateCanceledEvent < Stripe::V2::Core::Event
8
+ def self.lookup_type
9
+ "v2.money_management.spending_mandate.canceled"
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 SpendingMandate is successfully canceled.
25
+ class V2MoneyManagementSpendingMandateCanceledEventNotification < Stripe::V2::Core::EventNotification
26
+ def self.lookup_type
27
+ "v2.money_management.spending_mandate.canceled"
28
+ end
29
+
30
+ attr_reader :related_object
31
+
32
+ # Retrieves the SpendingMandate 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,46 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Events
6
+ # Occurs when a SpendingMandate is created, either when a mandate is received from an external
7
+ # party or when a user authorizes a counterparty to pull money from a Financial Account.
8
+ class V2MoneyManagementSpendingMandateCreatedEvent < Stripe::V2::Core::Event
9
+ def self.lookup_type
10
+ "v2.money_management.spending_mandate.created"
11
+ end
12
+
13
+ # Retrieves the related object from the API. Makes an API request on every call.
14
+ def fetch_related_object
15
+ _request(
16
+ method: :get,
17
+ path: related_object.url,
18
+ base_address: :api,
19
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" }
20
+ )
21
+ end
22
+ attr_reader :related_object
23
+ end
24
+
25
+ # Occurs when a SpendingMandate is created, either when a mandate is received from an external
26
+ # party or when a user authorizes a counterparty to pull money from a Financial Account.
27
+ class V2MoneyManagementSpendingMandateCreatedEventNotification < Stripe::V2::Core::EventNotification
28
+ def self.lookup_type
29
+ "v2.money_management.spending_mandate.created"
30
+ end
31
+
32
+ attr_reader :related_object
33
+
34
+ # Retrieves the SpendingMandate related to this EventNotification from the Stripe API. Makes an API request on every call.
35
+ def fetch_related_object
36
+ resp = @client.raw_request(
37
+ :get,
38
+ related_object.url,
39
+ opts: { stripe_context: context, "Stripe-Request-Trigger": "event=#{id}" },
40
+ usage: ["fetch_related_object"]
41
+ )
42
+ @client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
43
+ end
44
+ end
45
+ end
46
+ 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 SpendingMandate expires.
7
+ class V2MoneyManagementSpendingMandateExpiredEvent < Stripe::V2::Core::Event
8
+ def self.lookup_type
9
+ "v2.money_management.spending_mandate.expired"
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 SpendingMandate expires.
25
+ class V2MoneyManagementSpendingMandateExpiredEventNotification < Stripe::V2::Core::EventNotification
26
+ def self.lookup_type
27
+ "v2.money_management.spending_mandate.expired"
28
+ end
29
+
30
+ attr_reader :related_object
31
+
32
+ # Retrieves the SpendingMandate 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 SpendingMandate transitions to pending_cancellation status.
7
+ class V2MoneyManagementSpendingMandatePendingCancellationEvent < Stripe::V2::Core::Event
8
+ def self.lookup_type
9
+ "v2.money_management.spending_mandate.pending_cancellation"
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 SpendingMandate transitions to pending_cancellation status.
25
+ class V2MoneyManagementSpendingMandatePendingCancellationEventNotification < Stripe::V2::Core::EventNotification
26
+ def self.lookup_type
27
+ "v2.money_management.spending_mandate.pending_cancellation"
28
+ end
29
+
30
+ attr_reader :related_object
31
+
32
+ # Retrieves the SpendingMandate 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 SpendingMandate is updated.
7
+ class V2MoneyManagementSpendingMandateUpdatedEvent < Stripe::V2::Core::Event
8
+ def self.lookup_type
9
+ "v2.money_management.spending_mandate.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 SpendingMandate is updated.
25
+ class V2MoneyManagementSpendingMandateUpdatedEventNotification < Stripe::V2::Core::EventNotification
26
+ def self.lookup_type
27
+ "v2.money_management.spending_mandate.updated"
28
+ end
29
+
30
+ attr_reader :related_object
31
+
32
+ # Retrieves the SpendingMandate 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
@@ -347,6 +347,7 @@ module Stripe
347
347
  V2::MoneyManagement::RewardProgramEnrollment.object_name =>
348
348
  V2::MoneyManagement::RewardProgramEnrollment,
349
349
  V2::MoneyManagement::RewardProgramRule.object_name => V2::MoneyManagement::RewardProgramRule,
350
+ V2::MoneyManagement::SpendingMandate.object_name => V2::MoneyManagement::SpendingMandate,
350
351
  V2::MoneyManagement::Transaction.object_name => V2::MoneyManagement::Transaction,
351
352
  V2::MoneyManagement::TransactionEntry.object_name => V2::MoneyManagement::TransactionEntry,
352
353
  V2::Network::BusinessProfile.object_name => V2::Network::BusinessProfile,
@@ -3806,6 +3806,8 @@ module Stripe
3806
3806
  # We recommend that you review your privacy policy and check with your legal contacts
3807
3807
  # before using this feature. Learn more about [collecting phone numbers with Checkout](https://docs.stripe.com/payments/checkout/phone-numbers).
3808
3808
  attr_accessor :phone_number_collection
3809
+ # Token used to resolve the presentment currency for this Checkout Session.
3810
+ attr_accessor :pricing_token
3809
3811
  # This parameter applies to `ui_mode: embedded_page`. Learn more about the [redirect behavior](https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
3810
3812
  attr_accessor :redirect_on_completion
3811
3813
  # The URL to redirect your customer back to after they authenticate or cancel their payment on the
@@ -3892,6 +3894,7 @@ module Stripe
3892
3894
  payment_settings: nil,
3893
3895
  permissions: nil,
3894
3896
  phone_number_collection: nil,
3897
+ pricing_token: nil,
3895
3898
  redirect_on_completion: nil,
3896
3899
  return_url: nil,
3897
3900
  saved_payment_method_options: nil,
@@ -3954,6 +3957,7 @@ module Stripe
3954
3957
  @payment_settings = payment_settings
3955
3958
  @permissions = permissions
3956
3959
  @phone_number_collection = phone_number_collection
3960
+ @pricing_token = pricing_token
3957
3961
  @redirect_on_completion = redirect_on_completion
3958
3962
  @return_url = return_url
3959
3963
  @saved_payment_method_options = saved_payment_method_options
@@ -91,6 +91,57 @@ module Stripe
91
91
  end
92
92
  end
93
93
 
94
+ class MarketingAttribution < ::Stripe::RequestParams
95
+ class AdConversion < ::Stripe::RequestParams
96
+ # Whether the customer consented to sending conversion data to an advertising platform.
97
+ attr_accessor :consent_collected
98
+
99
+ def initialize(consent_collected: nil)
100
+ @consent_collected = consent_collected
101
+ end
102
+ end
103
+ # Information used when sending conversions to an advertising platform.
104
+ attr_accessor :ad_conversion
105
+ # The advertising platform's click identifier.
106
+ attr_accessor :click_id
107
+ # The Unix timestamp when the advertising interaction occurred.
108
+ attr_accessor :occurred_at
109
+ # The advertising group ID from the `utm_adgroup` parameter.
110
+ attr_accessor :utm_adgroup
111
+ # The advertising content identifier from the `utm_content` parameter.
112
+ attr_accessor :utm_content
113
+ # The advertising campaign ID from the `utm_id` parameter.
114
+ attr_accessor :utm_id
115
+ # The marketing medium from the `utm_medium` parameter.
116
+ attr_accessor :utm_medium
117
+ # The referral source from the `utm_source` parameter.
118
+ attr_accessor :utm_source
119
+ # The paid search term from the `utm_term` parameter.
120
+ attr_accessor :utm_term
121
+
122
+ def initialize(
123
+ ad_conversion: nil,
124
+ click_id: nil,
125
+ occurred_at: nil,
126
+ utm_adgroup: nil,
127
+ utm_content: nil,
128
+ utm_id: nil,
129
+ utm_medium: nil,
130
+ utm_source: nil,
131
+ utm_term: nil
132
+ )
133
+ @ad_conversion = ad_conversion
134
+ @click_id = click_id
135
+ @occurred_at = occurred_at
136
+ @utm_adgroup = utm_adgroup
137
+ @utm_content = utm_content
138
+ @utm_id = utm_id
139
+ @utm_medium = utm_medium
140
+ @utm_source = utm_source
141
+ @utm_term = utm_term
142
+ end
143
+ end
144
+
94
145
  class Shipping < ::Stripe::RequestParams
95
146
  class Address < ::Stripe::RequestParams
96
147
  # City, district, suburb, town, or village.
@@ -173,6 +224,8 @@ module Stripe
173
224
  attr_accessor :invoice_prefix
174
225
  # Default invoice settings for this customer.
175
226
  attr_accessor :invoice_settings
227
+ # Advertising attribution information for this customer. Only one attribution is supported, and it can only be set once.
228
+ attr_accessor :marketing_attributions
176
229
  # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
177
230
  attr_accessor :metadata
178
231
  # The customer's full name or business name.
@@ -206,6 +259,7 @@ module Stripe
206
259
  individual_name: nil,
207
260
  invoice_prefix: nil,
208
261
  invoice_settings: nil,
262
+ marketing_attributions: nil,
209
263
  metadata: nil,
210
264
  name: nil,
211
265
  next_invoice_sequence: nil,
@@ -228,6 +282,7 @@ module Stripe
228
282
  @individual_name = individual_name
229
283
  @invoice_prefix = invoice_prefix
230
284
  @invoice_settings = invoice_settings
285
+ @marketing_attributions = marketing_attributions
231
286
  @metadata = metadata
232
287
  @name = name
233
288
  @next_invoice_sequence = next_invoice_sequence
@@ -47,11 +47,11 @@ module Stripe
47
47
  end
48
48
  # Specifies which fields in the response should be expanded.
49
49
  attr_accessor :expand
50
- # A list of three letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be [supported currencies](https://stripe.com/docs/currencies).
50
+ # A list of three letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be [supported currencies](https://stripe.com/docs/currencies). Payout-only currencies are also supported, but only for informational quotes (`lock_duration=none`).
51
51
  attr_accessor :from_currencies
52
52
  # The duration that you wish the quote to be locked for. The quote will be usable for the duration specified. The default is `none`. The maximum is 1 day.
53
53
  attr_accessor :lock_duration
54
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
54
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Payout-only currencies are also supported, but only for informational quotes (`lock_duration=none`).
55
55
  attr_accessor :to_currency
56
56
  # The usage specific information for the quote.
57
57
  attr_accessor :usage
@@ -54,13 +54,22 @@ module Stripe
54
54
  attr_accessor :expand
55
55
  # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
56
56
  attr_accessor :metadata
57
+ # Payment evaluations associated with this reported payment.
58
+ attr_accessor :payment_evaluations
57
59
  # Information about the Payment Method debited for this payment.
58
60
  attr_accessor :payment_method_details
59
61
 
60
- def initialize(authenticated_at: nil, expand: nil, metadata: nil, payment_method_details: nil)
62
+ def initialize(
63
+ authenticated_at: nil,
64
+ expand: nil,
65
+ metadata: nil,
66
+ payment_evaluations: nil,
67
+ payment_method_details: nil
68
+ )
61
69
  @authenticated_at = authenticated_at
62
70
  @expand = expand
63
71
  @metadata = metadata
72
+ @payment_evaluations = payment_evaluations
64
73
  @payment_method_details = payment_method_details
65
74
  end
66
75
  end
@@ -19,11 +19,45 @@ module Stripe
19
19
  @cvc_check = cvc_check
20
20
  end
21
21
  end
22
+
23
+ class ThreeDSecure < ::Stripe::RequestParams
24
+ # For authenticated transactions: Indicates how the issuing bank authenticated the customer.
25
+ attr_accessor :authentication_flow
26
+ # The Electronic Commerce Indicator (ECI). A protocol-level field indicating what degree of authentication was performed.
27
+ attr_accessor :electronic_commerce_indicator
28
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
29
+ attr_accessor :exemption_indicator
30
+ # Indicates the outcome of 3D Secure authentication.
31
+ attr_accessor :result
32
+ # Additional information about why 3D Secure succeeded or failed, based on the `result`.
33
+ attr_accessor :result_reason
34
+ # The version of 3D Secure that was used.
35
+ attr_accessor :version
36
+
37
+ def initialize(
38
+ authentication_flow: nil,
39
+ electronic_commerce_indicator: nil,
40
+ exemption_indicator: nil,
41
+ result: nil,
42
+ result_reason: nil,
43
+ version: nil
44
+ )
45
+ @authentication_flow = authentication_flow
46
+ @electronic_commerce_indicator = electronic_commerce_indicator
47
+ @exemption_indicator = exemption_indicator
48
+ @result = result
49
+ @result_reason = result_reason
50
+ @version = version
51
+ end
52
+ end
22
53
  # Verification checks performed on the card.
23
54
  attr_accessor :checks
55
+ # Populated if this transaction used 3D Secure authentication.
56
+ attr_accessor :three_d_secure
24
57
 
25
- def initialize(checks: nil)
58
+ def initialize(checks: nil, three_d_secure: nil)
26
59
  @checks = checks
60
+ @three_d_secure = three_d_secure
27
61
  end
28
62
  end
29
63
  # Information about the card payment method used to make this payment.
@@ -19,11 +19,45 @@ module Stripe
19
19
  @cvc_check = cvc_check
20
20
  end
21
21
  end
22
+
23
+ class ThreeDSecure < ::Stripe::RequestParams
24
+ # For authenticated transactions: Indicates how the issuing bank authenticated the customer.
25
+ attr_accessor :authentication_flow
26
+ # The Electronic Commerce Indicator (ECI). A protocol-level field indicating what degree of authentication was performed.
27
+ attr_accessor :electronic_commerce_indicator
28
+ # The exemption requested via 3DS and accepted by the issuer at authentication time.
29
+ attr_accessor :exemption_indicator
30
+ # Indicates the outcome of 3D Secure authentication.
31
+ attr_accessor :result
32
+ # Additional information about why 3D Secure succeeded or failed, based on the `result`.
33
+ attr_accessor :result_reason
34
+ # The version of 3D Secure that was used.
35
+ attr_accessor :version
36
+
37
+ def initialize(
38
+ authentication_flow: nil,
39
+ electronic_commerce_indicator: nil,
40
+ exemption_indicator: nil,
41
+ result: nil,
42
+ result_reason: nil,
43
+ version: nil
44
+ )
45
+ @authentication_flow = authentication_flow
46
+ @electronic_commerce_indicator = electronic_commerce_indicator
47
+ @exemption_indicator = exemption_indicator
48
+ @result = result
49
+ @result_reason = result_reason
50
+ @version = version
51
+ end
52
+ end
22
53
  # Verification checks performed on the card.
23
54
  attr_accessor :checks
55
+ # Populated if this transaction used 3D Secure authentication.
56
+ attr_accessor :three_d_secure
24
57
 
25
- def initialize(checks: nil)
58
+ def initialize(checks: nil, three_d_secure: nil)
26
59
  @checks = checks
60
+ @three_d_secure = three_d_secure
27
61
  end
28
62
  end
29
63
  # Information about the card payment method used to make this payment.