stripe 13.1.0.pre.beta.2 → 13.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +660 -1368
  3. data/OPENAPI_VERSION +1 -1
  4. data/README.md +1 -1
  5. data/VERSION +1 -1
  6. data/examples/README.md +7 -2
  7. data/examples/example_template.rb +36 -0
  8. data/examples/meter_event_stream.rb +10 -0
  9. data/examples/{stripe_webhook_handler.rb → thinevent_webhook_handler.rb} +11 -0
  10. data/lib/stripe/api_resource.rb +8 -2
  11. data/lib/stripe/api_version.rb +1 -1
  12. data/lib/stripe/object_types.rb +1 -19
  13. data/lib/stripe/resources/billing/credit_balance_summary.rb +1 -1
  14. data/lib/stripe/resources/billing/credit_grant.rb +4 -1
  15. data/lib/stripe/resources/financial_connections/account.rb +0 -3
  16. data/lib/stripe/resources/invoice.rb +0 -81
  17. data/lib/stripe/resources/issuing/card.rb +2 -2
  18. data/lib/stripe/resources/payment_intent.rb +0 -50
  19. data/lib/stripe/resources/quote.rb +0 -104
  20. data/lib/stripe/resources/subscription_schedule.rb +0 -20
  21. data/lib/stripe/resources/terminal/reader.rb +0 -60
  22. data/lib/stripe/resources/token.rb +1 -1
  23. data/lib/stripe/resources/v2/billing/meter_event.rb +2 -2
  24. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +2 -2
  25. data/lib/stripe/resources/v2/billing/meter_event_session.rb +2 -2
  26. data/lib/stripe/resources/v2/event_destination.rb +13 -0
  27. data/lib/stripe/resources.rb +1 -18
  28. data/lib/stripe/services/account_login_link_service.rb +1 -1
  29. data/lib/stripe/services/financial_connections/account_service.rb +1 -3
  30. data/lib/stripe/services/financial_connections_service.rb +1 -2
  31. data/lib/stripe/services/invoice_service.rb +1 -44
  32. data/lib/stripe/services/issuing_service.rb +1 -4
  33. data/lib/stripe/services/payment_intent_service.rb +0 -26
  34. data/lib/stripe/services/quote_service.rb +1 -49
  35. data/lib/stripe/services/subscription_schedule_service.rb +0 -11
  36. data/lib/stripe/services/tax_service.rb +1 -3
  37. data/lib/stripe/services/terminal/reader_service.rb +0 -33
  38. data/lib/stripe/services/terminal_service.rb +1 -2
  39. data/lib/stripe/services/test_helpers/issuing/card_service.rb +1 -1
  40. data/lib/stripe/services/token_service.rb +1 -1
  41. data/lib/stripe/services/v1_services.rb +1 -6
  42. data/lib/stripe/services/v2/core/event_destination_service.rb +98 -0
  43. data/lib/stripe/services/v2/core_service.rb +2 -1
  44. data/lib/stripe/services.rb +1 -22
  45. data/lib/stripe/stripe_configuration.rb +1 -3
  46. data/lib/stripe/util.rb +1 -7
  47. data/lib/stripe/version.rb +1 -1
  48. data/lib/stripe.rb +0 -45
  49. metadata +8 -47
  50. data/examples/new_example.rb +0 -24
  51. data/lib/stripe/request_signing_authenticator.rb +0 -79
  52. data/lib/stripe/resources/account_notice.rb +0 -32
  53. data/lib/stripe/resources/capital/financing_offer.rb +0 -49
  54. data/lib/stripe/resources/capital/financing_summary.rb +0 -15
  55. data/lib/stripe/resources/capital/financing_transaction.rb +0 -27
  56. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -14
  57. data/lib/stripe/resources/financial_connections/institution.rb +0 -26
  58. data/lib/stripe/resources/gift_cards/card.rb +0 -59
  59. data/lib/stripe/resources/gift_cards/transaction.rb +0 -93
  60. data/lib/stripe/resources/invoice_payment.rb +0 -12
  61. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -88
  62. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -26
  63. data/lib/stripe/resources/margin.rb +0 -37
  64. data/lib/stripe/resources/order.rb +0 -120
  65. data/lib/stripe/resources/quote_preview_invoice.rb +0 -43
  66. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -11
  67. data/lib/stripe/resources/tax/association.rb +0 -24
  68. data/lib/stripe/resources/tax/form.rb +0 -49
  69. data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -14
  70. data/lib/stripe/services/account_notice_service.rb +0 -39
  71. data/lib/stripe/services/capital/financing_offer_service.rb +0 -42
  72. data/lib/stripe/services/capital/financing_summary_service.rb +0 -19
  73. data/lib/stripe/services/capital/financing_transaction_service.rb +0 -31
  74. data/lib/stripe/services/capital_service.rb +0 -15
  75. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +0 -19
  76. data/lib/stripe/services/financial_connections/institution_service.rb +0 -30
  77. data/lib/stripe/services/gift_cards/card_service.rb +0 -63
  78. data/lib/stripe/services/gift_cards/transaction_service.rb +0 -74
  79. data/lib/stripe/services/gift_cards_service.rb +0 -14
  80. data/lib/stripe/services/invoice_payment_service.rb +0 -28
  81. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -74
  82. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -30
  83. data/lib/stripe/services/margin_service.rb +0 -50
  84. data/lib/stripe/services/order_line_item_service.rb +0 -17
  85. data/lib/stripe/services/order_service.rb +0 -78
  86. data/lib/stripe/services/quote_line_service.rb +0 -17
  87. data/lib/stripe/services/quote_preview_invoice_service.rb +0 -17
  88. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -17
  89. data/lib/stripe/services/tax/association_service.rb +0 -19
  90. data/lib/stripe/services/tax/form_service.rb +0 -37
  91. data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -19
@@ -31,7 +31,7 @@ module Stripe
31
31
  end
32
32
 
33
33
  # Creates a single-use token that represents a bank account's details.
34
- # You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
34
+ # You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
35
35
  def self.create(params = {}, opts = {})
36
36
  request_stripe_object(method: :post, path: "/v1/tokens", params: params, opts: opts)
37
37
  end
@@ -6,9 +6,9 @@ module Stripe
6
6
  module Billing
7
7
  # Fix me empty_doc_string.
8
8
  class MeterEvent < APIResource
9
- OBJECT_NAME = "billing.meter_event"
9
+ OBJECT_NAME = "v2.billing.meter_event"
10
10
  def self.object_name
11
- "billing.meter_event"
11
+ "v2.billing.meter_event"
12
12
  end
13
13
  end
14
14
  end
@@ -5,9 +5,9 @@ module Stripe
5
5
  module V2
6
6
  module Billing
7
7
  class MeterEventAdjustment < APIResource
8
- OBJECT_NAME = "billing.meter_event_adjustment"
8
+ OBJECT_NAME = "v2.billing.meter_event_adjustment"
9
9
  def self.object_name
10
- "billing.meter_event_adjustment"
10
+ "v2.billing.meter_event_adjustment"
11
11
  end
12
12
  end
13
13
  end
@@ -5,9 +5,9 @@ module Stripe
5
5
  module V2
6
6
  module Billing
7
7
  class MeterEventSession < APIResource
8
- OBJECT_NAME = "billing.meter_event_session"
8
+ OBJECT_NAME = "v2.billing.meter_event_session"
9
9
  def self.object_name
10
- "billing.meter_event_session"
10
+ "v2.billing.meter_event_session"
11
11
  end
12
12
  end
13
13
  end
@@ -0,0 +1,13 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module V2
6
+ class EventDestination < APIResource
7
+ OBJECT_NAME = "v2.core.event_destination"
8
+ def self.object_name
9
+ "v2.core.event_destination"
10
+ end
11
+ end
12
+ end
13
+ end
@@ -3,7 +3,6 @@
3
3
 
4
4
  require "stripe/resources/account"
5
5
  require "stripe/resources/account_link"
6
- require "stripe/resources/account_notice"
7
6
  require "stripe/resources/account_session"
8
7
  require "stripe/resources/apple_pay_domain"
9
8
  require "stripe/resources/application_fee"
@@ -23,9 +22,6 @@ require "stripe/resources/billing/meter_event_summary"
23
22
  require "stripe/resources/billing_portal/configuration"
24
23
  require "stripe/resources/billing_portal/session"
25
24
  require "stripe/resources/capability"
26
- require "stripe/resources/capital/financing_offer"
27
- require "stripe/resources/capital/financing_summary"
28
- require "stripe/resources/capital/financing_transaction"
29
25
  require "stripe/resources/card"
30
26
  require "stripe/resources/cash_balance"
31
27
  require "stripe/resources/charge"
@@ -52,29 +48,22 @@ require "stripe/resources/exchange_rate"
52
48
  require "stripe/resources/file"
53
49
  require "stripe/resources/file_link"
54
50
  require "stripe/resources/financial_connections/account"
55
- require "stripe/resources/financial_connections/account_inferred_balance"
56
51
  require "stripe/resources/financial_connections/account_owner"
57
52
  require "stripe/resources/financial_connections/account_ownership"
58
- require "stripe/resources/financial_connections/institution"
59
53
  require "stripe/resources/financial_connections/session"
60
54
  require "stripe/resources/financial_connections/transaction"
61
55
  require "stripe/resources/forwarding/request"
62
56
  require "stripe/resources/funding_instructions"
63
- require "stripe/resources/gift_cards/card"
64
- require "stripe/resources/gift_cards/transaction"
65
57
  require "stripe/resources/identity/verification_report"
66
58
  require "stripe/resources/identity/verification_session"
67
59
  require "stripe/resources/invoice"
68
60
  require "stripe/resources/invoice_item"
69
61
  require "stripe/resources/invoice_line_item"
70
- require "stripe/resources/invoice_payment"
71
62
  require "stripe/resources/invoice_rendering_template"
72
63
  require "stripe/resources/issuing/authorization"
73
64
  require "stripe/resources/issuing/card"
74
65
  require "stripe/resources/issuing/cardholder"
75
- require "stripe/resources/issuing/credit_underwriting_record"
76
66
  require "stripe/resources/issuing/dispute"
77
- require "stripe/resources/issuing/dispute_settlement_detail"
78
67
  require "stripe/resources/issuing/personalization_design"
79
68
  require "stripe/resources/issuing/physical_bundle"
80
69
  require "stripe/resources/issuing/token"
@@ -82,8 +71,6 @@ require "stripe/resources/issuing/transaction"
82
71
  require "stripe/resources/line_item"
83
72
  require "stripe/resources/login_link"
84
73
  require "stripe/resources/mandate"
85
- require "stripe/resources/margin"
86
- require "stripe/resources/order"
87
74
  require "stripe/resources/payment_intent"
88
75
  require "stripe/resources/payment_link"
89
76
  require "stripe/resources/payment_method"
@@ -97,8 +84,6 @@ require "stripe/resources/product"
97
84
  require "stripe/resources/product_feature"
98
85
  require "stripe/resources/promotion_code"
99
86
  require "stripe/resources/quote"
100
- require "stripe/resources/quote_preview_invoice"
101
- require "stripe/resources/quote_preview_subscription_schedule"
102
87
  require "stripe/resources/radar/early_fraud_warning"
103
88
  require "stripe/resources/radar/value_list"
104
89
  require "stripe/resources/radar/value_list_item"
@@ -116,10 +101,8 @@ require "stripe/resources/source_transaction"
116
101
  require "stripe/resources/subscription"
117
102
  require "stripe/resources/subscription_item"
118
103
  require "stripe/resources/subscription_schedule"
119
- require "stripe/resources/tax/association"
120
104
  require "stripe/resources/tax/calculation"
121
105
  require "stripe/resources/tax/calculation_line_item"
122
- require "stripe/resources/tax/form"
123
106
  require "stripe/resources/tax/registration"
124
107
  require "stripe/resources/tax/settings"
125
108
  require "stripe/resources/tax/transaction"
@@ -131,7 +114,6 @@ require "stripe/resources/terminal/configuration"
131
114
  require "stripe/resources/terminal/connection_token"
132
115
  require "stripe/resources/terminal/location"
133
116
  require "stripe/resources/terminal/reader"
134
- require "stripe/resources/terminal/reader_collected_data"
135
117
  require "stripe/resources/test_helpers/test_clock"
136
118
  require "stripe/resources/token"
137
119
  require "stripe/resources/topup"
@@ -153,6 +135,7 @@ require "stripe/resources/v2/billing/meter_event"
153
135
  require "stripe/resources/v2/billing/meter_event_adjustment"
154
136
  require "stripe/resources/v2/billing/meter_event_session"
155
137
  require "stripe/resources/v2/event"
138
+ require "stripe/resources/v2/event_destination"
156
139
  require "stripe/resources/webhook_endpoint"
157
140
  require "stripe/events/v1_billing_meter_error_report_triggered_event"
158
141
  require "stripe/events/v1_billing_meter_no_meter_found_event"
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  class AccountLoginLinkService < StripeService
6
- # Creates a single-use login link for a connected account to access the Express Dashboard.
6
+ # Creates a login link for a connected account to access the Express Dashboard.
7
7
  #
8
8
  # You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform.
9
9
  def create(account, params = {}, opts = {})
@@ -4,12 +4,10 @@
4
4
  module Stripe
5
5
  module FinancialConnections
6
6
  class AccountService < StripeService
7
- attr_reader :inferred_balances, :owners
7
+ attr_reader :owners
8
8
 
9
9
  def initialize(requestor)
10
10
  super(requestor)
11
- @inferred_balances = Stripe::FinancialConnections::AccountInferredBalanceService
12
- .new(@requestor)
13
11
  @owners = Stripe::FinancialConnections::AccountOwnerService.new(@requestor)
14
12
  end
15
13
 
@@ -3,12 +3,11 @@
3
3
 
4
4
  module Stripe
5
5
  class FinancialConnectionsService < StripeService
6
- attr_reader :accounts, :institutions, :sessions, :transactions
6
+ attr_reader :accounts, :sessions, :transactions
7
7
 
8
8
  def initialize(requestor)
9
9
  super(requestor)
10
10
  @accounts = Stripe::FinancialConnections::AccountService.new(@requestor)
11
- @institutions = Stripe::FinancialConnections::InstitutionService.new(@requestor)
12
11
  @sessions = Stripe::FinancialConnections::SessionService.new(@requestor)
13
12
  @transactions = Stripe::FinancialConnections::TransactionService.new(@requestor)
14
13
  end
@@ -3,11 +3,10 @@
3
3
 
4
4
  module Stripe
5
5
  class InvoiceService < StripeService
6
- attr_reader :payments, :line_items, :upcoming_lines
6
+ attr_reader :line_items, :upcoming_lines
7
7
 
8
8
  def initialize(requestor)
9
9
  super(requestor)
10
- @payments = Stripe::InvoicePaymentService.new(@requestor)
11
10
  @line_items = Stripe::InvoiceLineItemService.new(@requestor)
12
11
  @upcoming_lines = Stripe::InvoiceUpcomingLinesService.new(@requestor)
13
12
  end
@@ -23,48 +22,6 @@ module Stripe
23
22
  )
24
23
  end
25
24
 
26
- # Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.
27
- #
28
- # For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid
29
- # of the invoice and subsequently transitioning the status of the invoice to paid if necessary.
30
- #
31
- # For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited
32
- # to the invoice, increasing its amount_paid. When the invoice is fully paid, the
33
- # invoice's status becomes paid.
34
- #
35
- # If the PaymentIntent's status is already succeeded when it's attached, it's
36
- # credited to the invoice immediately.
37
- #
38
- # See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more.
39
- def attach_payment(invoice, params = {}, opts = {})
40
- request(
41
- method: :post,
42
- path: format("/v1/invoices/%<invoice>s/attach_payment", { invoice: CGI.escape(invoice) }),
43
- params: params,
44
- opts: opts,
45
- base_address: :api
46
- )
47
- end
48
-
49
- # Attaches a PaymentIntent to the invoice, adding it to the list of payments.
50
- # When the PaymentIntent's status changes to succeeded, the payment is credited
51
- # to the invoice, increasing its amount_paid. When the invoice is fully paid, the
52
- # invoice's status becomes paid.
53
- #
54
- # If the PaymentIntent's status is already succeeded when it is attached, it is
55
- # credited to the invoice immediately.
56
- #
57
- # Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create)
58
- def attach_payment_intent(invoice, params = {}, opts = {})
59
- request(
60
- method: :post,
61
- path: format("/v1/invoices/%<invoice>s/attach_payment_intent", { invoice: CGI.escape(invoice) }),
62
- params: params,
63
- opts: opts,
64
- base_address: :api
65
- )
66
- end
67
-
68
25
  # This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or <a href="#send_invoice">send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.
69
26
  def create(params = {}, opts = {})
70
27
  request(method: :post, path: "/v1/invoices", params: params, opts: opts, base_address: :api)
@@ -3,17 +3,14 @@
3
3
 
4
4
  module Stripe
5
5
  class IssuingService < StripeService
6
- attr_reader :authorizations, :cards, :cardholders, :credit_underwriting_records, :disputes, :dispute_settlement_details, :personalization_designs, :physical_bundles, :tokens, :transactions
6
+ attr_reader :authorizations, :cards, :cardholders, :disputes, :personalization_designs, :physical_bundles, :tokens, :transactions
7
7
 
8
8
  def initialize(requestor)
9
9
  super(requestor)
10
10
  @authorizations = Stripe::Issuing::AuthorizationService.new(@requestor)
11
11
  @cards = Stripe::Issuing::CardService.new(@requestor)
12
12
  @cardholders = Stripe::Issuing::CardholderService.new(@requestor)
13
- @credit_underwriting_records = Stripe::Issuing::CreditUnderwritingRecordService
14
- .new(@requestor)
15
13
  @disputes = Stripe::Issuing::DisputeService.new(@requestor)
16
- @dispute_settlement_details = Stripe::Issuing::DisputeSettlementDetailService.new(@requestor)
17
14
  @personalization_designs = Stripe::Issuing::PersonalizationDesignService.new(@requestor)
18
15
  @physical_bundles = Stripe::Issuing::PhysicalBundleService.new(@requestor)
19
16
  @tokens = Stripe::Issuing::TokenService.new(@requestor)
@@ -99,32 +99,6 @@ module Stripe
99
99
  )
100
100
  end
101
101
 
102
- # Perform a decremental authorization on an eligible
103
- # [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
104
- # PaymentIntent's status must be requires_capture and
105
- # [decremental_authorization.status](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-decremental_authorization)
106
- # must be available.
107
- #
108
- # Decremental authorizations decrease the authorized amount on your customer's card
109
- # to the new, lower amount provided. A single PaymentIntent can call this endpoint multiple times to further decrease the authorized amount.
110
- #
111
- # After decrement, the PaymentIntent object
112
- # returns with the updated
113
- # [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount).
114
- # The PaymentIntent will now be capturable up to the new authorized amount.
115
- #
116
- # Each PaymentIntent can have a maximum of 10 decremental or incremental authorization attempts, including declines.
117
- # After it's fully captured, a PaymentIntent can no longer be decremented.
118
- def decrement_authorization(intent, params = {}, opts = {})
119
- request(
120
- method: :post,
121
- path: format("/v1/payment_intents/%<intent>s/decrement_authorization", { intent: CGI.escape(intent) }),
122
- params: params,
123
- opts: opts,
124
- base_address: :api
125
- )
126
- end
127
-
128
102
  # Perform an incremental authorization on an eligible
129
103
  # [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
130
104
  # PaymentIntent's status must be requires_capture and
@@ -3,14 +3,10 @@
3
3
 
4
4
  module Stripe
5
5
  class QuoteService < StripeService
6
- attr_reader :preview_invoices, :preview_subscription_schedules, :lines, :line_items, :computed_upfront_line_items
6
+ attr_reader :line_items, :computed_upfront_line_items
7
7
 
8
8
  def initialize(requestor)
9
9
  super(requestor)
10
- @preview_invoices = Stripe::QuotePreviewInvoiceService.new(@requestor)
11
- @preview_subscription_schedules = Stripe::QuotePreviewSubscriptionScheduleService
12
- .new(@requestor)
13
- @lines = Stripe::QuoteLineService.new(@requestor)
14
10
  @line_items = Stripe::QuoteLineItemService.new(@requestor)
15
11
  @computed_upfront_line_items = Stripe::QuoteComputedUpfrontLineItemsService.new(@requestor)
16
12
  end
@@ -58,39 +54,6 @@ module Stripe
58
54
  request(method: :get, path: "/v1/quotes", params: params, opts: opts, base_address: :api)
59
55
  end
60
56
 
61
- # Preview the invoice line items that would be generated by accepting the quote.
62
- def list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {})
63
- request(
64
- method: :get,
65
- path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(quote), preview_invoice: CGI.escape(preview_invoice) }),
66
- params: params,
67
- opts: opts,
68
- base_address: :api
69
- )
70
- end
71
-
72
- # Converts a stale quote to draft.
73
- def mark_draft(quote, params = {}, opts = {})
74
- request(
75
- method: :post,
76
- path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(quote) }),
77
- params: params,
78
- opts: opts,
79
- base_address: :api
80
- )
81
- end
82
-
83
- # Converts a draft or open quote to stale.
84
- def mark_stale(quote, params = {}, opts = {})
85
- request(
86
- method: :post,
87
- path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(quote) }),
88
- params: params,
89
- opts: opts,
90
- base_address: :api
91
- )
92
- end
93
-
94
57
  # Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
95
58
  def pdf(quote, params = {}, opts = {}, &read_body_chunk_block)
96
59
  opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
@@ -104,17 +67,6 @@ module Stripe
104
67
  )
105
68
  end
106
69
 
107
- # Recompute the upcoming invoice estimate for the quote.
108
- def reestimate(quote, params = {}, opts = {})
109
- request(
110
- method: :post,
111
- path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(quote) }),
112
- params: params,
113
- opts: opts,
114
- base_address: :api
115
- )
116
- end
117
-
118
70
  # Retrieves the quote with the given ID.
119
71
  def retrieve(quote, params = {}, opts = {})
120
72
  request(
@@ -3,17 +3,6 @@
3
3
 
4
4
  module Stripe
5
5
  class SubscriptionScheduleService < StripeService
6
- # Amends an existing subscription schedule.
7
- def amend(schedule, params = {}, opts = {})
8
- request(
9
- method: :post,
10
- path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
11
- params: params,
12
- opts: opts,
13
- base_address: :api
14
- )
15
- end
16
-
17
6
  # Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
18
7
  def cancel(schedule, params = {}, opts = {})
19
8
  request(
@@ -3,13 +3,11 @@
3
3
 
4
4
  module Stripe
5
5
  class TaxService < StripeService
6
- attr_reader :associations, :calculations, :forms, :registrations, :settings, :transactions
6
+ attr_reader :calculations, :registrations, :settings, :transactions
7
7
 
8
8
  def initialize(requestor)
9
9
  super(requestor)
10
- @associations = Stripe::Tax::AssociationService.new(@requestor)
11
10
  @calculations = Stripe::Tax::CalculationService.new(@requestor)
12
- @forms = Stripe::Tax::FormService.new(@requestor)
13
11
  @registrations = Stripe::Tax::RegistrationService.new(@requestor)
14
12
  @settings = Stripe::Tax::SettingsService.new(@requestor)
15
13
  @transactions = Stripe::Tax::TransactionService.new(@requestor)
@@ -15,39 +15,6 @@ module Stripe
15
15
  )
16
16
  end
17
17
 
18
- # Initiates an input collection flow on a Reader.
19
- def collect_inputs(reader, params = {}, opts = {})
20
- request(
21
- method: :post,
22
- path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(reader) }),
23
- params: params,
24
- opts: opts,
25
- base_address: :api
26
- )
27
- end
28
-
29
- # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
30
- def collect_payment_method(reader, params = {}, opts = {})
31
- request(
32
- method: :post,
33
- path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(reader) }),
34
- params: params,
35
- opts: opts,
36
- base_address: :api
37
- )
38
- end
39
-
40
- # Finalizes a payment on a Reader.
41
- def confirm_payment_intent(reader, params = {}, opts = {})
42
- request(
43
- method: :post,
44
- path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(reader) }),
45
- params: params,
46
- opts: opts,
47
- base_address: :api
48
- )
49
- end
50
-
51
18
  # Creates a new Reader object.
52
19
  def create(params = {}, opts = {})
53
20
  request(
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  class TerminalService < StripeService
6
- attr_reader :configurations, :connection_tokens, :locations, :readers, :reader_collected_data
6
+ attr_reader :configurations, :connection_tokens, :locations, :readers
7
7
 
8
8
  def initialize(requestor)
9
9
  super(requestor)
@@ -11,7 +11,6 @@ module Stripe
11
11
  @connection_tokens = Stripe::Terminal::ConnectionTokenService.new(@requestor)
12
12
  @locations = Stripe::Terminal::LocationService.new(@requestor)
13
13
  @readers = Stripe::Terminal::ReaderService.new(@requestor)
14
- @reader_collected_data = Stripe::Terminal::ReaderCollectedDataService.new(@requestor)
15
14
  end
16
15
  end
17
16
  end
@@ -49,7 +49,7 @@ module Stripe
49
49
  )
50
50
  end
51
51
 
52
- # Updates the shipping status of the specified Issuing Card object to submitted. This method is only available with Stripe Version ‘2024-09-30.acacia' or above.
52
+ # Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
53
53
  def submit_card(card, params = {}, opts = {})
54
54
  request(
55
55
  method: :post,
@@ -4,7 +4,7 @@
4
4
  module Stripe
5
5
  class TokenService < StripeService
6
6
  # Creates a single-use token that represents a bank account's details.
7
- # You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
7
+ # You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
8
8
  def create(params = {}, opts = {})
9
9
  request(method: :post, path: "/v1/tokens", params: params, opts: opts, base_address: :api)
10
10
  end
@@ -4,7 +4,7 @@ module Stripe
4
4
  class V1Services < StripeService
5
5
  # v1 accessors: The beginning of the section generated from our OpenAPI spec
6
6
  attr_reader :accounts
7
- attr_reader :account_links, :account_notices, :account_sessions, :apple_pay_domains, :application_fees, :apps, :balance, :balance_transactions, :billing, :billing_portal, :capital, :charges, :checkout, :climate, :confirmation_tokens, :test_helpers, :country_specs, :coupons, :credit_notes, :customers, :customer_sessions, :disputes, :entitlements, :ephemeral_keys, :events, :exchange_rates, :files, :file_links, :financial_connections, :forwarding, :gift_cards, :identity, :invoices, :invoice_rendering_templates, :invoice_items, :issuing, :mandates, :margins, :orders, :payment_intents, :payment_links, :payment_methods, :payment_method_configurations, :payment_method_domains, :payouts, :plans, :prices, :products, :promotion_codes, :quotes, :radar, :refunds, :reporting, :reviews, :sigma, :setup_attempts, :setup_intents, :shipping_rates, :sources, :subscriptions, :subscription_items, :subscription_schedules, :tax, :tax_codes, :tax_ids, :tax_rates, :terminal, :tokens, :topups, :transfers, :treasury, :webhook_endpoints
7
+ attr_reader :account_links, :account_sessions, :apple_pay_domains, :application_fees, :apps, :balance, :balance_transactions, :billing, :billing_portal, :charges, :checkout, :climate, :confirmation_tokens, :test_helpers, :country_specs, :coupons, :credit_notes, :customers, :customer_sessions, :disputes, :entitlements, :ephemeral_keys, :events, :exchange_rates, :files, :file_links, :financial_connections, :forwarding, :identity, :invoices, :invoice_rendering_templates, :invoice_items, :issuing, :mandates, :payment_intents, :payment_links, :payment_methods, :payment_method_configurations, :payment_method_domains, :payouts, :plans, :prices, :products, :promotion_codes, :quotes, :radar, :refunds, :reporting, :reviews, :sigma, :setup_attempts, :setup_intents, :shipping_rates, :sources, :subscriptions, :subscription_items, :subscription_schedules, :tax, :tax_codes, :tax_ids, :tax_rates, :terminal, :tokens, :topups, :transfers, :treasury, :webhook_endpoints
8
8
  # v1 accessors: The end of the section generated from our OpenAPI spec
9
9
 
10
10
  # OAuthService is manually maintained, as it has special behaviors
@@ -15,7 +15,6 @@ module Stripe
15
15
  # v1 services: The beginning of the section generated from our OpenAPI spec
16
16
  @accounts = Stripe::AccountService.new(@requestor)
17
17
  @account_links = Stripe::AccountLinkService.new(@requestor)
18
- @account_notices = Stripe::AccountNoticeService.new(@requestor)
19
18
  @account_sessions = Stripe::AccountSessionService.new(@requestor)
20
19
  @apple_pay_domains = Stripe::ApplePayDomainService.new(@requestor)
21
20
  @application_fees = Stripe::ApplicationFeeService.new(@requestor)
@@ -24,7 +23,6 @@ module Stripe
24
23
  @balance_transactions = Stripe::BalanceTransactionService.new(@requestor)
25
24
  @billing = Stripe::BillingService.new(@requestor)
26
25
  @billing_portal = Stripe::BillingPortalService.new(@requestor)
27
- @capital = Stripe::CapitalService.new(@requestor)
28
26
  @charges = Stripe::ChargeService.new(@requestor)
29
27
  @checkout = Stripe::CheckoutService.new(@requestor)
30
28
  @climate = Stripe::ClimateService.new(@requestor)
@@ -44,15 +42,12 @@ module Stripe
44
42
  @file_links = Stripe::FileLinkService.new(@requestor)
45
43
  @financial_connections = Stripe::FinancialConnectionsService.new(@requestor)
46
44
  @forwarding = Stripe::ForwardingService.new(@requestor)
47
- @gift_cards = Stripe::GiftCardsService.new(@requestor)
48
45
  @identity = Stripe::IdentityService.new(@requestor)
49
46
  @invoices = Stripe::InvoiceService.new(@requestor)
50
47
  @invoice_rendering_templates = Stripe::InvoiceRenderingTemplateService.new(@requestor)
51
48
  @invoice_items = Stripe::InvoiceItemService.new(@requestor)
52
49
  @issuing = Stripe::IssuingService.new(@requestor)
53
50
  @mandates = Stripe::MandateService.new(@requestor)
54
- @margins = Stripe::MarginService.new(@requestor)
55
- @orders = Stripe::OrderService.new(@requestor)
56
51
  @payment_intents = Stripe::PaymentIntentService.new(@requestor)
57
52
  @payment_links = Stripe::PaymentLinkService.new(@requestor)
58
53
  @payment_methods = Stripe::PaymentMethodService.new(@requestor)
@@ -0,0 +1,98 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module V2
6
+ module Core
7
+ class EventDestinationService < StripeService
8
+ # Create a new event destination.
9
+ def create(params = {}, opts = {})
10
+ request(
11
+ method: :post,
12
+ path: "/v2/core/event_destinations",
13
+ params: params,
14
+ opts: opts,
15
+ base_address: :api
16
+ )
17
+ end
18
+
19
+ # Delete an event destination.
20
+ def delete(id, params = {}, opts = {})
21
+ request(
22
+ method: :delete,
23
+ path: format("/v2/core/event_destinations/%<id>s", { id: CGI.escape(id) }),
24
+ params: params,
25
+ opts: opts,
26
+ base_address: :api
27
+ )
28
+ end
29
+
30
+ # Disable an event destination.
31
+ def disable(id, params = {}, opts = {})
32
+ request(
33
+ method: :post,
34
+ path: format("/v2/core/event_destinations/%<id>s/disable", { id: CGI.escape(id) }),
35
+ params: params,
36
+ opts: opts,
37
+ base_address: :api
38
+ )
39
+ end
40
+
41
+ # Enable an event destination.
42
+ def enable(id, params = {}, opts = {})
43
+ request(
44
+ method: :post,
45
+ path: format("/v2/core/event_destinations/%<id>s/enable", { id: CGI.escape(id) }),
46
+ params: params,
47
+ opts: opts,
48
+ base_address: :api
49
+ )
50
+ end
51
+
52
+ # Lists all event destinations.
53
+ def list(params = {}, opts = {})
54
+ request(
55
+ method: :get,
56
+ path: "/v2/core/event_destinations",
57
+ params: params,
58
+ opts: opts,
59
+ base_address: :api
60
+ )
61
+ end
62
+
63
+ # Send a `ping` event to an event destination.
64
+ def ping(id, params = {}, opts = {})
65
+ request(
66
+ method: :post,
67
+ path: format("/v2/core/event_destinations/%<id>s/ping", { id: CGI.escape(id) }),
68
+ params: params,
69
+ opts: opts,
70
+ base_address: :api
71
+ )
72
+ end
73
+
74
+ # Retrieves the details of an event destination.
75
+ def retrieve(id, params = {}, opts = {})
76
+ request(
77
+ method: :get,
78
+ path: format("/v2/core/event_destinations/%<id>s", { id: CGI.escape(id) }),
79
+ params: params,
80
+ opts: opts,
81
+ base_address: :api
82
+ )
83
+ end
84
+
85
+ # Update the details of an event destination.
86
+ def update(id, params = {}, opts = {})
87
+ request(
88
+ method: :post,
89
+ path: format("/v2/core/event_destinations/%<id>s", { id: CGI.escape(id) }),
90
+ params: params,
91
+ opts: opts,
92
+ base_address: :api
93
+ )
94
+ end
95
+ end
96
+ end
97
+ end
98
+ end
@@ -4,10 +4,11 @@
4
4
  module Stripe
5
5
  module V2
6
6
  class CoreService < StripeService
7
- attr_reader :events
7
+ attr_reader :event_destinations, :events
8
8
 
9
9
  def initialize(requestor)
10
10
  super(requestor)
11
+ @event_destinations = Stripe::V2::Core::EventDestinationService.new(@requestor)
11
12
  @events = Stripe::V2::Core::EventService.new(@requestor)
12
13
  end
13
14
  end