stripe 20.2.0.pre.alpha.1 → 20.2.0.pre.alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/event_types.rb +28 -0
  3. data/lib/stripe/events/v2_core_account_closed_event.rb +2 -2
  4. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +2 -2
  5. data/lib/stripe/events/v2_extend_object_definition_created_event.rb +61 -0
  6. data/lib/stripe/events/v2_extend_object_definition_version_created_event.rb +65 -0
  7. data/lib/stripe/events/v2_money_management_received_debit_mandate_canceled_event.rb +2 -0
  8. data/lib/stripe/events/v2_money_management_received_debit_mandate_created_event.rb +2 -0
  9. data/lib/stripe/events/v2_money_management_received_debit_mandate_expired_event.rb +2 -0
  10. data/lib/stripe/events/v2_money_management_received_debit_mandate_pending_cancellation_event.rb +2 -0
  11. data/lib/stripe/events/v2_money_management_received_debit_mandate_updated_event.rb +2 -0
  12. data/lib/stripe/events/v2_money_management_spending_mandate_canceled_event.rb +44 -0
  13. data/lib/stripe/events/v2_money_management_spending_mandate_created_event.rb +46 -0
  14. data/lib/stripe/events/v2_money_management_spending_mandate_expired_event.rb +44 -0
  15. data/lib/stripe/events/v2_money_management_spending_mandate_pending_cancellation_event.rb +44 -0
  16. data/lib/stripe/events/v2_money_management_spending_mandate_updated_event.rb +44 -0
  17. data/lib/stripe/object_types.rb +5 -0
  18. data/lib/stripe/params/account_session_create_params.rb +200 -0
  19. data/lib/stripe/params/checkout/session_create_params.rb +46 -1
  20. data/lib/stripe/params/confirmation_token_create_params.rb +21 -0
  21. data/lib/stripe/params/customer_tax_exemption_create_params.rb +29 -1
  22. data/lib/stripe/params/customer_update_params.rb +55 -0
  23. data/lib/stripe/params/fx_quote_create_params.rb +2 -2
  24. data/lib/stripe/params/invoice_create_params.rb +8 -1
  25. data/lib/stripe/params/invoice_update_params.rb +8 -1
  26. data/lib/stripe/params/payment_attempt_record_report_authenticated_params.rb +58 -1
  27. data/lib/stripe/params/payment_attempt_record_report_authorized_params.rb +35 -1
  28. data/lib/stripe/params/payment_attempt_record_report_guaranteed_params.rb +35 -1
  29. data/lib/stripe/params/payment_intent_capture_params.rb +57 -1
  30. data/lib/stripe/params/payment_intent_confirm_params.rb +91 -1
  31. data/lib/stripe/params/payment_intent_create_params.rb +91 -1
  32. data/lib/stripe/params/payment_intent_decrement_authorization_params.rb +57 -1
  33. data/lib/stripe/params/payment_intent_increment_authorization_params.rb +57 -1
  34. data/lib/stripe/params/payment_intent_update_params.rb +91 -1
  35. data/lib/stripe/params/payment_method_configuration_create_params.rb +42 -0
  36. data/lib/stripe/params/payment_method_configuration_update_params.rb +42 -0
  37. data/lib/stripe/params/payment_method_create_params.rb +21 -0
  38. data/lib/stripe/params/payment_record_report_payment_attempt_guaranteed_params.rb +35 -1
  39. data/lib/stripe/params/payment_record_report_payment_attempt_params.rb +35 -1
  40. data/lib/stripe/params/payment_record_report_payment_params.rb +35 -1
  41. data/lib/stripe/params/quote_create_params.rb +1 -1
  42. data/lib/stripe/params/quote_update_params.rb +1 -1
  43. data/lib/stripe/params/radar/payment_evaluation_create_params.rb +19 -1
  44. data/lib/stripe/params/refund_create_params.rb +4 -0
  45. data/lib/stripe/params/setup_intent_confirm_params.rb +50 -1
  46. data/lib/stripe/params/setup_intent_create_params.rb +50 -1
  47. data/lib/stripe/params/setup_intent_update_params.rb +34 -1
  48. data/lib/stripe/params/shared_payment/issued_token_create_params.rb +19 -0
  49. data/lib/stripe/params/subscription_create_params.rb +4 -0
  50. data/lib/stripe/params/subscription_list_params.rb +5 -1
  51. data/lib/stripe/params/subscription_update_params.rb +4 -0
  52. data/lib/stripe/params/tax/certificate_create_params.rb +21 -0
  53. data/lib/stripe/params/tax/certificate_delete_params.rb +8 -0
  54. data/lib/stripe/params/tax/certificate_list_params.rb +33 -0
  55. data/lib/stripe/params/tax/certificate_retrieve_params.rb +15 -0
  56. data/lib/stripe/params/tax/form_create_params.rb +504 -0
  57. data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +21 -0
  58. data/lib/stripe/params/v2/core/account_session_create_params.rb +13 -0
  59. data/lib/stripe/params/v2/extend/object_definition_list_params.rb +17 -0
  60. data/lib/stripe/params/v2/extend/object_definition_retrieve_params.rb +10 -0
  61. data/lib/stripe/params/v2/extend/object_definitions/version_list_params.rb +19 -0
  62. data/lib/stripe/params/v2/extend/object_definitions/version_retrieve_params.rb +12 -0
  63. data/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb +22 -1
  64. data/lib/stripe/params/v2/money_management/outbound_setup_intent_create_params.rb +46 -0
  65. data/lib/stripe/params/v2/money_management/payout_intent_create_params.rb +22 -1
  66. data/lib/stripe/params/v2/money_management/payout_intent_update_params.rb +22 -1
  67. data/lib/stripe/params/v2/money_management/received_debit_list_params.rb +5 -2
  68. data/lib/stripe/params/v2/money_management/spending_mandate_cancel_params.rb +10 -0
  69. data/lib/stripe/params/v2/money_management/spending_mandate_list_params.rb +26 -0
  70. data/lib/stripe/params/v2/money_management/spending_mandate_retrieve_params.rb +10 -0
  71. data/lib/stripe/params.rb +27 -0
  72. data/lib/stripe/resources/account_session.rb +81 -0
  73. data/lib/stripe/resources/apps/install.rb +1 -1
  74. data/lib/stripe/resources/balance_transaction.rb +1 -1
  75. data/lib/stripe/resources/charge.rb +373 -5
  76. data/lib/stripe/resources/checkout/session.rb +32 -0
  77. data/lib/stripe/resources/confirmation_token.rb +103 -3
  78. data/lib/stripe/resources/coupon.rb +6 -3
  79. data/lib/stripe/resources/customer_tax_exemption.rb +32 -1
  80. data/lib/stripe/resources/identity/verification_report.rb +34 -0
  81. data/lib/stripe/resources/invoice.rb +3 -0
  82. data/lib/stripe/resources/mandate.rb +16 -0
  83. data/lib/stripe/resources/payment_attempt_record.rb +151 -2
  84. data/lib/stripe/resources/payment_intent.rb +126 -2
  85. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +46 -1
  86. data/lib/stripe/resources/payment_method.rb +103 -3
  87. data/lib/stripe/resources/payment_method_configuration.rb +68 -0
  88. data/lib/stripe/resources/payment_record.rb +151 -2
  89. data/lib/stripe/resources/radar/payment_evaluation.rb +41 -2
  90. data/lib/stripe/resources/refund.rb +38 -0
  91. data/lib/stripe/resources/reporting/report_run.rb +2 -0
  92. data/lib/stripe/resources/reserve/hold.rb +2 -2
  93. data/lib/stripe/resources/reserve/plan.rb +1 -1
  94. data/lib/stripe/resources/reserve/release.rb +1 -1
  95. data/lib/stripe/resources/setup_attempt.rb +21 -2
  96. data/lib/stripe/resources/setup_intent.rb +38 -2
  97. data/lib/stripe/resources/shared_payment/granted_token.rb +32 -2
  98. data/lib/stripe/resources/shared_payment/issued_token.rb +20 -0
  99. data/lib/stripe/resources/subscription.rb +3 -1
  100. data/lib/stripe/resources/tax/certificate.rb +81 -0
  101. data/lib/stripe/resources/tax/form.rb +11 -0
  102. data/lib/stripe/resources/tax/form_correction.rb +43 -0
  103. data/lib/stripe/resources/terminal/reader.rb +18 -1
  104. data/lib/stripe/resources/treasury/inbound_transfer.rb +29 -1
  105. data/lib/stripe/resources/treasury/outbound_payment.rb +29 -1
  106. data/lib/stripe/resources/treasury/outbound_transfer.rb +29 -1
  107. data/lib/stripe/resources/v2/core/account_session.rb +27 -0
  108. data/lib/stripe/resources/v2/core/event.rb +1 -1
  109. data/lib/stripe/resources/v2/core/event_base.rb +36 -0
  110. data/lib/stripe/resources/v2/data/search_result_list.rb +1 -1
  111. data/lib/stripe/resources/v2/extend/object_definition.rb +40 -0
  112. data/lib/stripe/resources/v2/extend/object_definition_version.rb +168 -0
  113. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +74 -1
  114. data/lib/stripe/resources/v2/money_management/payout_intent.rb +22 -1
  115. data/lib/stripe/resources/v2/money_management/payout_method.rb +40 -0
  116. data/lib/stripe/resources/v2/money_management/received_debit.rb +3 -0
  117. data/lib/stripe/resources/v2/money_management/spending_mandate.rb +121 -0
  118. data/lib/stripe/resources/v2/tax/operations_resolve_address_result.rb +1 -1
  119. data/lib/stripe/resources.rb +46 -0
  120. data/lib/stripe/services/apps/install_service.rb +1 -1
  121. data/lib/stripe/services/checkout/session_service.rb +2 -0
  122. data/lib/stripe/services/reserve/hold_service.rb +2 -2
  123. data/lib/stripe/services/reserve/plan_service.rb +2 -2
  124. data/lib/stripe/services/reserve/release_service.rb +2 -2
  125. data/lib/stripe/services/tax/certificate_service.rb +52 -0
  126. data/lib/stripe/services/tax/form_service.rb +11 -0
  127. data/lib/stripe/services/tax_service.rb +2 -1
  128. data/lib/stripe/services/v2/core/vault/network_token_service.rb +1 -0
  129. data/lib/stripe/services/v2/extend/object_definition_service.rb +39 -0
  130. data/lib/stripe/services/v2/extend/object_definitions/version_service.rb +34 -0
  131. data/lib/stripe/services/v2/extend_service.rb +2 -1
  132. data/lib/stripe/services/v2/money_management/received_debit_mandate_service.rb +3 -0
  133. data/lib/stripe/services/v2/money_management/spending_mandate_service.rb +43 -0
  134. data/lib/stripe/services/v2/money_management_service.rb +2 -1
  135. data/lib/stripe/services.rb +11 -0
  136. data/lib/stripe/stripe_event_notification_handler.rb +28 -0
  137. data/lib/stripe/stripe_service.rb +13 -9
  138. data/lib/stripe/version.rb +1 -1
  139. data/lib/stripe/webhook.rb +68 -3
  140. data/lib/stripe/workload_identity_exchange.rb +2 -2
  141. data/rbi/stripe/resources/v2/core/event_base.rbi +11 -0
  142. data/rbi/stripe.rbi +5856 -213
  143. metadata +32 -2
@@ -0,0 +1,121 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module V2
6
+ module MoneyManagement
7
+ # A SpendingMandate authorizes a counterparty to pull money from a Financial Account.
8
+ class SpendingMandate < APIResource
9
+ OBJECT_NAME = "v2.money_management.spending_mandate"
10
+ def self.object_name
11
+ "v2.money_management.spending_mandate"
12
+ end
13
+
14
+ class BankTransfer < ::Stripe::StripeObject
15
+ # The name of the account holder that initiated the debit.
16
+ attr_reader :account_holder_name
17
+ # The financial address associated with this mandate.
18
+ attr_reader :financial_address
19
+ # The bank transfer network for this mandate.
20
+ attr_reader :network
21
+ # The bank transfer reference provided by the bank. Only present when `network` is `bacs`.
22
+ attr_reader :reference
23
+
24
+ def self.inner_class_types
25
+ @inner_class_types = {}
26
+ end
27
+
28
+ def self.field_remappings
29
+ @field_remappings = {}
30
+ end
31
+ end
32
+
33
+ class StatusDetails < ::Stripe::StripeObject
34
+ class Canceled < ::Stripe::StripeObject
35
+ # The `canceled` status reason.
36
+ attr_reader :reason
37
+
38
+ def self.inner_class_types
39
+ @inner_class_types = {}
40
+ end
41
+
42
+ def self.field_remappings
43
+ @field_remappings = {}
44
+ end
45
+ end
46
+ # If the mandate is canceled, this field provides more details on the cancellation reason.
47
+ attr_reader :canceled
48
+
49
+ def self.inner_class_types
50
+ @inner_class_types = { canceled: Canceled }
51
+ end
52
+
53
+ def self.field_remappings
54
+ @field_remappings = {}
55
+ end
56
+ end
57
+
58
+ class StatusTransitions < ::Stripe::StripeObject
59
+ # Timestamp describing when the SpendingMandate changed status to `active`.
60
+ # Represented as a RFC 3339 date & time UTC value in millisecond precision.
61
+ attr_reader :activated_at
62
+ # Timestamp describing when the SpendingMandate changed status to `canceled`.
63
+ # Represented as a RFC 3339 date & time UTC value in millisecond precision.
64
+ attr_reader :canceled_at
65
+ # Timestamp describing when the SpendingMandate was created.
66
+ # Represented as a RFC 3339 date & time UTC value in millisecond precision.
67
+ attr_reader :created_at
68
+ # Timestamp describing when the SpendingMandate changed status to `expired`.
69
+ # Represented as a RFC 3339 date & time UTC value in millisecond precision.
70
+ attr_reader :expired_at
71
+ # Timestamp describing when the SpendingMandate changed status to `pending_cancellation`.
72
+ # Represented as a RFC 3339 date & time UTC value in millisecond precision.
73
+ attr_reader :pending_cancellation_at
74
+
75
+ def self.inner_class_types
76
+ @inner_class_types = {}
77
+ end
78
+
79
+ def self.field_remappings
80
+ @field_remappings = {}
81
+ end
82
+ end
83
+ # Bank transfer details. Present if `type` is `bank_transfer`.
84
+ attr_reader :bank_transfer
85
+ # The time at which the SpendingMandate was created.
86
+ # Represented as a RFC 3339 date & time UTC value in millisecond precision.
87
+ attr_reader :created
88
+ # The currency in ISO 4217 format that debits will be collected in.
89
+ attr_reader :currency
90
+ # Financial account ID associated with this mandate.
91
+ attr_reader :financial_account
92
+ # The unique identifier for the SpendingMandate.
93
+ attr_reader :id
94
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
95
+ attr_reader :livemode
96
+ # String representing the object's type. Objects of the same type share the same value of the object field.
97
+ attr_reader :object
98
+ # The status of the SpendingMandate.
99
+ attr_reader :status
100
+ # Detailed information about the status of the SpendingMandate.
101
+ attr_reader :status_details
102
+ # Timestamps describing when the mandate changed status.
103
+ attr_reader :status_transitions
104
+ # The type of the SpendingMandate.
105
+ attr_reader :type
106
+
107
+ def self.inner_class_types
108
+ @inner_class_types = {
109
+ bank_transfer: BankTransfer,
110
+ status_details: StatusDetails,
111
+ status_transitions: StatusTransitions,
112
+ }
113
+ end
114
+
115
+ def self.field_remappings
116
+ @field_remappings = {}
117
+ end
118
+ end
119
+ end
120
+ end
121
+ end
@@ -5,7 +5,7 @@ module Stripe
5
5
  module V2
6
6
  module Tax
7
7
  # The result of resolving an address to its tax precision level.
8
- class OperationsResolveAddressResult < SingletonAPIResource
8
+ class OperationsResolveAddressResult < StripeObject
9
9
  OBJECT_NAME = "v2.tax.operations_resolve_address_result"
10
10
  def self.object_name
11
11
  "v2.tax.operations_resolve_address_result"
@@ -1257,6 +1257,13 @@ module Stripe
1257
1257
  autoload :V2DataReportRunUpdatedEventNotification, "stripe/events/v2_data_report_run_updated_event"
1258
1258
  autoload :V2ExtendExtensionRunFailedEvent, "stripe/events/v2_extend_extension_run_failed_event"
1259
1259
  autoload :V2ExtendExtensionRunFailedEventNotification, "stripe/events/v2_extend_extension_run_failed_event"
1260
+ autoload :V2ExtendObjectDefinitionCreatedEvent, "stripe/events/v2_extend_object_definition_created_event"
1261
+ autoload :V2ExtendObjectDefinitionCreatedEventNotification,
1262
+ "stripe/events/v2_extend_object_definition_created_event"
1263
+ autoload :V2ExtendObjectDefinitionVersionCreatedEvent,
1264
+ "stripe/events/v2_extend_object_definition_version_created_event"
1265
+ autoload :V2ExtendObjectDefinitionVersionCreatedEventNotification,
1266
+ "stripe/events/v2_extend_object_definition_version_created_event"
1260
1267
  autoload :V2ExtendWorkflowRunFailedEvent, "stripe/events/v2_extend_workflow_run_failed_event"
1261
1268
  autoload :V2ExtendWorkflowRunFailedEventNotification, "stripe/events/v2_extend_workflow_run_failed_event"
1262
1269
  autoload :V2ExtendWorkflowRunStartedEvent, "stripe/events/v2_extend_workflow_run_started_event"
@@ -1616,6 +1623,26 @@ module Stripe
1616
1623
  "stripe/events/v2_money_management_reward_program_reward_reversed_event"
1617
1624
  autoload :V2MoneyManagementRewardProgramRewardReversedEventNotification,
1618
1625
  "stripe/events/v2_money_management_reward_program_reward_reversed_event"
1626
+ autoload :V2MoneyManagementSpendingMandateCanceledEvent,
1627
+ "stripe/events/v2_money_management_spending_mandate_canceled_event"
1628
+ autoload :V2MoneyManagementSpendingMandateCanceledEventNotification,
1629
+ "stripe/events/v2_money_management_spending_mandate_canceled_event"
1630
+ autoload :V2MoneyManagementSpendingMandateCreatedEvent,
1631
+ "stripe/events/v2_money_management_spending_mandate_created_event"
1632
+ autoload :V2MoneyManagementSpendingMandateCreatedEventNotification,
1633
+ "stripe/events/v2_money_management_spending_mandate_created_event"
1634
+ autoload :V2MoneyManagementSpendingMandateExpiredEvent,
1635
+ "stripe/events/v2_money_management_spending_mandate_expired_event"
1636
+ autoload :V2MoneyManagementSpendingMandateExpiredEventNotification,
1637
+ "stripe/events/v2_money_management_spending_mandate_expired_event"
1638
+ autoload :V2MoneyManagementSpendingMandatePendingCancellationEvent,
1639
+ "stripe/events/v2_money_management_spending_mandate_pending_cancellation_event"
1640
+ autoload :V2MoneyManagementSpendingMandatePendingCancellationEventNotification,
1641
+ "stripe/events/v2_money_management_spending_mandate_pending_cancellation_event"
1642
+ autoload :V2MoneyManagementSpendingMandateUpdatedEvent,
1643
+ "stripe/events/v2_money_management_spending_mandate_updated_event"
1644
+ autoload :V2MoneyManagementSpendingMandateUpdatedEventNotification,
1645
+ "stripe/events/v2_money_management_spending_mandate_updated_event"
1619
1646
  autoload :V2MoneyManagementTransactionCreatedEvent, "stripe/events/v2_money_management_transaction_created_event"
1620
1647
  autoload :V2MoneyManagementTransactionCreatedEventNotification,
1621
1648
  "stripe/events/v2_money_management_transaction_created_event"
@@ -1836,7 +1863,9 @@ module Stripe
1836
1863
  autoload :Association, "stripe/resources/tax/association"
1837
1864
  autoload :Calculation, "stripe/resources/tax/calculation"
1838
1865
  autoload :CalculationLineItem, "stripe/resources/tax/calculation_line_item"
1866
+ autoload :Certificate, "stripe/resources/tax/certificate"
1839
1867
  autoload :Form, "stripe/resources/tax/form"
1868
+ autoload :FormCorrection, "stripe/resources/tax/form_correction"
1840
1869
  autoload :Location, "stripe/resources/tax/location"
1841
1870
  autoload :Registration, "stripe/resources/tax/registration"
1842
1871
  autoload :Settings, "stripe/resources/tax/settings"
@@ -1931,6 +1960,7 @@ module Stripe
1931
1960
  autoload :ClaimableSandbox, "stripe/resources/v2/core/claimable_sandbox"
1932
1961
  autoload :ConnectionSession, "stripe/resources/v2/core/connection_session"
1933
1962
  autoload :Event, "stripe/resources/v2/core/event"
1963
+ autoload :EventBase, "stripe/resources/v2/core/event_base"
1934
1964
  autoload :EventDestination, "stripe/resources/v2/core/event_destination"
1935
1965
  autoload :EventNotification, "stripe/resources/v2/core/event_notification"
1936
1966
  autoload :EventReason, "stripe/resources/v2/core/event_notification"
@@ -1969,6 +1999,8 @@ module Stripe
1969
1999
  end
1970
2000
 
1971
2001
  module Extend
2002
+ autoload :ObjectDefinition, "stripe/resources/v2/extend/object_definition"
2003
+ autoload :ObjectDefinitionVersion, "stripe/resources/v2/extend/object_definition_version"
1972
2004
  autoload :Workflow, "stripe/resources/v2/extend/workflow"
1973
2005
  autoload :WorkflowRun, "stripe/resources/v2/extend/workflow_run"
1974
2006
  end
@@ -2015,6 +2047,7 @@ module Stripe
2015
2047
  autoload :RewardProgram, "stripe/resources/v2/money_management/reward_program"
2016
2048
  autoload :RewardProgramEnrollment, "stripe/resources/v2/money_management/reward_program_enrollment"
2017
2049
  autoload :RewardProgramRule, "stripe/resources/v2/money_management/reward_program_rule"
2050
+ autoload :SpendingMandate, "stripe/resources/v2/money_management/spending_mandate"
2018
2051
  autoload :Transaction, "stripe/resources/v2/money_management/transaction"
2019
2052
  autoload :TransactionEntry, "stripe/resources/v2/money_management/transaction_entry"
2020
2053
  end
@@ -2074,6 +2107,7 @@ end
2074
2107
  module Stripe
2075
2108
  # rubocop:disable Metrics/CollectionLiteralLength
2076
2109
  RESOURCE_FILES = %w[
2110
+ stripe/resources/v2/core/event_base
2077
2111
  stripe/resources/v2/core/event_notification
2078
2112
  stripe/resources/account
2079
2113
  stripe/resources/account_link
@@ -2250,7 +2284,9 @@ module Stripe
2250
2284
  stripe/resources/tax/association
2251
2285
  stripe/resources/tax/calculation
2252
2286
  stripe/resources/tax/calculation_line_item
2287
+ stripe/resources/tax/certificate
2253
2288
  stripe/resources/tax/form
2289
+ stripe/resources/tax/form_correction
2254
2290
  stripe/resources/tax/location
2255
2291
  stripe/resources/tax/registration
2256
2292
  stripe/resources/tax/settings
@@ -2346,6 +2382,8 @@ module Stripe
2346
2382
  stripe/resources/v2/data/schema
2347
2383
  stripe/resources/v2/data/search_result_list
2348
2384
  stripe/resources/v2/deleted_object
2385
+ stripe/resources/v2/extend/object_definition
2386
+ stripe/resources/v2/extend/object_definition_version
2349
2387
  stripe/resources/v2/extend/workflow
2350
2388
  stripe/resources/v2/extend/workflow_run
2351
2389
  stripe/resources/v2/iam/activity_log
@@ -2382,6 +2420,7 @@ module Stripe
2382
2420
  stripe/resources/v2/money_management/reward_program
2383
2421
  stripe/resources/v2/money_management/reward_program_enrollment
2384
2422
  stripe/resources/v2/money_management/reward_program_rule
2423
+ stripe/resources/v2/money_management/spending_mandate
2385
2424
  stripe/resources/v2/money_management/transaction
2386
2425
  stripe/resources/v2/money_management/transaction_entry
2387
2426
  stripe/resources/v2/network/business_profile
@@ -2823,6 +2862,8 @@ module Stripe
2823
2862
  stripe/events/v2_data_reporting_query_run_succeeded_event
2824
2863
  stripe/events/v2_data_reporting_query_run_updated_event
2825
2864
  stripe/events/v2_extend_extension_run_failed_event
2865
+ stripe/events/v2_extend_object_definition_created_event
2866
+ stripe/events/v2_extend_object_definition_version_created_event
2826
2867
  stripe/events/v2_extend_workflow_run_failed_event
2827
2868
  stripe/events/v2_extend_workflow_run_started_event
2828
2869
  stripe/events/v2_extend_workflow_run_succeeded_event
@@ -2922,6 +2963,11 @@ module Stripe
2922
2963
  stripe/events/v2_money_management_recipient_verification_updated_event
2923
2964
  stripe/events/v2_money_management_reward_program_reward_earned_event
2924
2965
  stripe/events/v2_money_management_reward_program_reward_reversed_event
2966
+ stripe/events/v2_money_management_spending_mandate_canceled_event
2967
+ stripe/events/v2_money_management_spending_mandate_created_event
2968
+ stripe/events/v2_money_management_spending_mandate_expired_event
2969
+ stripe/events/v2_money_management_spending_mandate_pending_cancellation_event
2970
+ stripe/events/v2_money_management_spending_mandate_updated_event
2925
2971
  stripe/events/v2_money_management_transaction_created_event
2926
2972
  stripe/events/v2_money_management_transaction_updated_event
2927
2973
  stripe/events/v2_orchestrated_commerce_agreement_confirmed_event
@@ -4,7 +4,7 @@
4
4
  module Stripe
5
5
  module Apps
6
6
  class InstallService < StripeService
7
- # Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer acting on a connected account through Stripe-Account installs or reinstalls its app there, and an embedding platform can do the same once the app's developer approves its request to embed the app. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned.
7
+ # Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer acting on a connected account through Stripe-Account installs or reinstalls its app there, and an embedding platform can do the same once the app's developer approves its request to embed the app and the platform has accepted the Embedding Platform Terms and Conditions in the Dashboard. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned.
8
8
  def create(params = {}, opts = {})
9
9
  request(
10
10
  method: :post,
@@ -23,6 +23,8 @@ module Stripe
23
23
  end
24
24
 
25
25
  # Creates a Checkout Session object.
26
+ #
27
+ # 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).
26
28
  def create(params = {}, opts = {})
27
29
  unless params.is_a?(Stripe::RequestParams)
28
30
  params = ::Stripe::Checkout::SessionCreateParams.coerce_params(params)
@@ -4,7 +4,7 @@
4
4
  module Stripe
5
5
  module Reserve
6
6
  class HoldService < StripeService
7
- # Returns a list of ReserveHolds previously created. The ReserveHolds are returned in sorted order, with the most recent ReserveHolds appearing first.
7
+ # Returns a list of ReserveHolds on your account or on one of your connected accounts. The ReserveHolds are returned in sorted order, with the most recent ReserveHolds appearing first.
8
8
  def list(params = {}, opts = {})
9
9
  request(
10
10
  method: :get,
@@ -15,7 +15,7 @@ module Stripe
15
15
  )
16
16
  end
17
17
 
18
- # Retrieve a ReserveHold.
18
+ # Retrieve a ReserveHold on your account or on one of your connected accounts.
19
19
  def retrieve(id, params = {}, opts = {})
20
20
  request(
21
21
  method: :get,
@@ -4,7 +4,7 @@
4
4
  module Stripe
5
5
  module Reserve
6
6
  class PlanService < StripeService
7
- # Returns a list of ReservePlans previously created. The ReservePlans are returned in sorted order, with the most recent ReservePlans appearing first.
7
+ # Returns a list of ReservePlans on your account or on one of your connected accounts. The ReservePlans are returned in sorted order, with the most recent ReservePlans appearing first.
8
8
  def list(params = {}, opts = {})
9
9
  request(
10
10
  method: :get,
@@ -15,7 +15,7 @@ module Stripe
15
15
  )
16
16
  end
17
17
 
18
- # Retrieve a ReservePlan.
18
+ # Retrieve a ReservePlan on your account or on one of your connected accounts.
19
19
  def retrieve(id, params = {}, opts = {})
20
20
  request(
21
21
  method: :get,
@@ -4,7 +4,7 @@
4
4
  module Stripe
5
5
  module Reserve
6
6
  class ReleaseService < StripeService
7
- # Returns a list of ReserveReleases previously created. The ReserveReleases are returned in sorted order, with the most recent ReserveReleases appearing first.
7
+ # Returns a list of ReserveReleases on your account or on one of your connected accounts. The ReserveReleases are returned in sorted order, with the most recent ReserveReleases appearing first.
8
8
  def list(params = {}, opts = {})
9
9
  request(
10
10
  method: :get,
@@ -15,7 +15,7 @@ module Stripe
15
15
  )
16
16
  end
17
17
 
18
- # Retrieve a ReserveRelease.
18
+ # Retrieve a ReserveRelease on your account or on one of your connected accounts.
19
19
  def retrieve(id, params = {}, opts = {})
20
20
  request(
21
21
  method: :get,
@@ -0,0 +1,52 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Tax
6
+ class CertificateService < StripeService
7
+ # Create a tax certificate associated with a tax exemption.
8
+ def create(params = {}, opts = {})
9
+ request(
10
+ method: :post,
11
+ path: "/v1/tax/certificates",
12
+ params: params,
13
+ opts: opts,
14
+ base_address: :api
15
+ )
16
+ end
17
+
18
+ # Delete a tax certificate associated with a tax exemption.
19
+ def delete(id, params = {}, opts = {})
20
+ request(
21
+ method: :delete,
22
+ path: format("/v1/tax/certificates/%<id>s", { id: CGI.escape(id) }),
23
+ params: params,
24
+ opts: opts,
25
+ base_address: :api
26
+ )
27
+ end
28
+
29
+ # List certificates for an existing tax exemption.
30
+ def list(params = {}, opts = {})
31
+ request(
32
+ method: :get,
33
+ path: "/v1/tax/certificates",
34
+ params: params,
35
+ opts: opts,
36
+ base_address: :api
37
+ )
38
+ end
39
+
40
+ # Retrieve a tax certificate associated with a tax exemption.
41
+ def retrieve(id, params = {}, opts = {})
42
+ request(
43
+ method: :get,
44
+ path: format("/v1/tax/certificates/%<id>s", { id: CGI.escape(id) }),
45
+ params: params,
46
+ opts: opts,
47
+ base_address: :api
48
+ )
49
+ end
50
+ end
51
+ end
52
+ end
@@ -4,6 +4,17 @@
4
4
  module Stripe
5
5
  module Tax
6
6
  class FormService < StripeService
7
+ # Creates a correction for a filed tax form. Supply either payee details or numerical values for the tax form type. Created correction forms are not filed automatically.
8
+ def create(id, params = {}, opts = {})
9
+ request(
10
+ method: :post,
11
+ path: format("/v1/tax/forms/%<id>s/corrections", { id: CGI.escape(id) }),
12
+ params: params,
13
+ opts: opts,
14
+ base_address: :api
15
+ )
16
+ end
17
+
7
18
  # Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first.
8
19
  def list(params = {}, opts = {})
9
20
  request(method: :get, path: "/v1/tax/forms", params: params, opts: opts, base_address: :api)
@@ -3,12 +3,13 @@
3
3
 
4
4
  module Stripe
5
5
  class TaxService < StripeService
6
- attr_reader :associations, :calculations, :forms, :locations, :registrations, :settings, :transactions
6
+ attr_reader :associations, :calculations, :certificates, :forms, :locations, :registrations, :settings, :transactions
7
7
 
8
8
  def initialize(requestor)
9
9
  super
10
10
  @associations = Stripe::Tax::AssociationService.new(@requestor)
11
11
  @calculations = Stripe::Tax::CalculationService.new(@requestor)
12
+ @certificates = Stripe::Tax::CertificateService.new(@requestor)
12
13
  @forms = Stripe::Tax::FormService.new(@requestor)
13
14
  @locations = Stripe::Tax::LocationService.new(@requestor)
14
15
  @registrations = Stripe::Tax::RegistrationService.new(@requestor)
@@ -25,6 +25,7 @@ module Stripe
25
25
  #
26
26
  # ** raises CannotProceedError
27
27
  # ** raises BlockedByStripeError
28
+ # ** raises MerchantNotGatedError
28
29
  def create_from_credential(params = {}, opts = {})
29
30
  request(
30
31
  method: :post,
@@ -0,0 +1,39 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module V2
6
+ module Extend
7
+ class ObjectDefinitionService < StripeService
8
+ attr_reader :versions
9
+
10
+ def initialize(requestor)
11
+ super
12
+ @versions = Stripe::V2::Extend::ObjectDefinitions::VersionService.new(@requestor)
13
+ end
14
+
15
+ # Lists a page of object definitions.
16
+ def list(params = {}, opts = {})
17
+ request(
18
+ method: :get,
19
+ path: "/v2/extend/object_definitions",
20
+ params: params,
21
+ opts: opts,
22
+ base_address: :api
23
+ )
24
+ end
25
+
26
+ # Retrieves an object definition.
27
+ def retrieve(id, params = {}, opts = {})
28
+ request(
29
+ method: :get,
30
+ path: format("/v2/extend/object_definitions/%<id>s", { id: CGI.escape(id) }),
31
+ params: params,
32
+ opts: opts,
33
+ base_address: :api
34
+ )
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,34 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module V2
6
+ module Extend
7
+ module ObjectDefinitions
8
+ class VersionService < StripeService
9
+ # Lists a page of object definition versions in descending semantic version order.
10
+ def list(object_definition_id, params = {}, opts = {})
11
+ request(
12
+ method: :get,
13
+ path: format("/v2/extend/object_definitions/%<object_definition_id>s/versions", { object_definition_id: CGI.escape(object_definition_id) }),
14
+ params: params,
15
+ opts: opts,
16
+ base_address: :api
17
+ )
18
+ end
19
+
20
+ # Retrieves an object definition version.
21
+ def retrieve(object_definition_id, id, params = {}, opts = {})
22
+ request(
23
+ method: :get,
24
+ path: format("/v2/extend/object_definitions/%<object_definition_id>s/versions/%<id>s", { object_definition_id: CGI.escape(object_definition_id), id: CGI.escape(id) }),
25
+ params: params,
26
+ opts: opts,
27
+ base_address: :api
28
+ )
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -4,10 +4,11 @@
4
4
  module Stripe
5
5
  module V2
6
6
  class ExtendService < StripeService
7
- attr_reader :workflows, :workflow_runs
7
+ attr_reader :object_definitions, :workflows, :workflow_runs
8
8
 
9
9
  def initialize(requestor)
10
10
  super
11
+ @object_definitions = Stripe::V2::Extend::ObjectDefinitionService.new(@requestor)
11
12
  @workflows = Stripe::V2::Extend::WorkflowService.new(@requestor)
12
13
  @workflow_runs = Stripe::V2::Extend::WorkflowRunService.new(@requestor)
13
14
  end
@@ -5,6 +5,7 @@ module Stripe
5
5
  module V2
6
6
  module MoneyManagement
7
7
  class ReceivedDebitMandateService < StripeService
8
+ # Deprecated: Use CancelSpendingMandate instead.
8
9
  # Cancels an active ReceivedDebitMandate.
9
10
  def cancel(id, params = {}, opts = {})
10
11
  request(
@@ -16,6 +17,7 @@ module Stripe
16
17
  )
17
18
  end
18
19
 
20
+ # Deprecated: Use ListSpendingMandates instead.
19
21
  # Returns a list of ReceivedDebitMandates.
20
22
  def list(params = {}, opts = {})
21
23
  request(
@@ -27,6 +29,7 @@ module Stripe
27
29
  )
28
30
  end
29
31
 
32
+ # Deprecated: Use RetrieveSpendingMandate instead.
30
33
  # Retrieves the details of an existing ReceivedDebitMandate.
31
34
  def retrieve(id, params = {}, opts = {})
32
35
  request(
@@ -0,0 +1,43 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module V2
6
+ module MoneyManagement
7
+ class SpendingMandateService < StripeService
8
+ # Cancels an active SpendingMandate.
9
+ def cancel(id, params = {}, opts = {})
10
+ request(
11
+ method: :post,
12
+ path: format("/v2/money_management/spending_mandates/%<id>s/cancel", { id: CGI.escape(id) }),
13
+ params: params,
14
+ opts: opts,
15
+ base_address: :api
16
+ )
17
+ end
18
+
19
+ # Returns a list of SpendingMandates.
20
+ def list(params = {}, opts = {})
21
+ request(
22
+ method: :get,
23
+ path: "/v2/money_management/spending_mandates",
24
+ params: params,
25
+ opts: opts,
26
+ base_address: :api
27
+ )
28
+ end
29
+
30
+ # Retrieves the details of an existing SpendingMandate.
31
+ def retrieve(id, params = {}, opts = {})
32
+ request(
33
+ method: :get,
34
+ path: format("/v2/money_management/spending_mandates/%<id>s", { id: CGI.escape(id) }),
35
+ params: params,
36
+ opts: opts,
37
+ base_address: :api
38
+ )
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -4,7 +4,7 @@
4
4
  module Stripe
5
5
  module V2
6
6
  class MoneyManagementService < StripeService
7
- attr_reader :adjustments, :currency_conversions, :debit_disputes, :earned_credits, :financial_accounts, :financial_addresses, :funding_intents, :funding_sessions, :inbound_fundings, :inbound_transfers, :inbound_transfer_mandates, :outbound_payments, :outbound_payment_quotes, :outbound_setup_intents, :outbound_transfers, :payout_intents, :payout_methods, :payout_methods_bank_account_spec, :received_credits, :received_debits, :received_debit_mandates, :recipient_verifications, :reward_programs, :reward_program_enrollments, :test_helpers, :transactions, :transaction_entries
7
+ attr_reader :adjustments, :currency_conversions, :debit_disputes, :earned_credits, :financial_accounts, :financial_addresses, :funding_intents, :funding_sessions, :inbound_fundings, :inbound_transfers, :inbound_transfer_mandates, :outbound_payments, :outbound_payment_quotes, :outbound_setup_intents, :outbound_transfers, :payout_intents, :payout_methods, :payout_methods_bank_account_spec, :received_credits, :received_debits, :received_debit_mandates, :recipient_verifications, :reward_programs, :reward_program_enrollments, :spending_mandates, :test_helpers, :transactions, :transaction_entries
8
8
 
9
9
  def initialize(requestor)
10
10
  super
@@ -40,6 +40,7 @@ module Stripe
40
40
  @reward_programs = Stripe::V2::MoneyManagement::RewardProgramService.new(@requestor)
41
41
  @reward_program_enrollments = Stripe::V2::MoneyManagement::RewardProgramEnrollmentService
42
42
  .new(@requestor)
43
+ @spending_mandates = Stripe::V2::MoneyManagement::SpendingMandateService.new(@requestor)
43
44
  @test_helpers = Stripe::V2::MoneyManagement::TestHelperService.new(@requestor)
44
45
  @transactions = Stripe::V2::MoneyManagement::TransactionService.new(@requestor)
45
46
  @transaction_entries = Stripe::V2::MoneyManagement::TransactionEntryService.new(@requestor)