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
@@ -5,7 +5,6 @@ require "stripe/services/account_capability_service"
5
5
  require "stripe/services/account_external_account_service"
6
6
  require "stripe/services/account_link_service"
7
7
  require "stripe/services/account_login_link_service"
8
- require "stripe/services/account_notice_service"
9
8
  require "stripe/services/account_person_service"
10
9
  require "stripe/services/account_service"
11
10
  require "stripe/services/account_session_service"
@@ -28,10 +27,6 @@ require "stripe/services/billing_portal/configuration_service"
28
27
  require "stripe/services/billing_portal/session_service"
29
28
  require "stripe/services/billing_portal_service"
30
29
  require "stripe/services/billing_service"
31
- require "stripe/services/capital/financing_offer_service"
32
- require "stripe/services/capital/financing_summary_service"
33
- require "stripe/services/capital/financing_transaction_service"
34
- require "stripe/services/capital_service"
35
30
  require "stripe/services/charge_service"
36
31
  require "stripe/services/checkout/session_line_item_service"
37
32
  require "stripe/services/checkout/session_service"
@@ -64,42 +59,31 @@ require "stripe/services/event_service"
64
59
  require "stripe/services/exchange_rate_service"
65
60
  require "stripe/services/file_link_service"
66
61
  require "stripe/services/file_service"
67
- require "stripe/services/financial_connections/account_inferred_balance_service"
68
62
  require "stripe/services/financial_connections/account_owner_service"
69
63
  require "stripe/services/financial_connections/account_service"
70
- require "stripe/services/financial_connections/institution_service"
71
64
  require "stripe/services/financial_connections/session_service"
72
65
  require "stripe/services/financial_connections/transaction_service"
73
66
  require "stripe/services/financial_connections_service"
74
67
  require "stripe/services/forwarding/request_service"
75
68
  require "stripe/services/forwarding_service"
76
- require "stripe/services/gift_cards/card_service"
77
- require "stripe/services/gift_cards/transaction_service"
78
- require "stripe/services/gift_cards_service"
79
69
  require "stripe/services/identity/verification_report_service"
80
70
  require "stripe/services/identity/verification_session_service"
81
71
  require "stripe/services/identity_service"
82
72
  require "stripe/services/invoice_item_service"
83
73
  require "stripe/services/invoice_line_item_service"
84
- require "stripe/services/invoice_payment_service"
85
74
  require "stripe/services/invoice_rendering_template_service"
86
75
  require "stripe/services/invoice_service"
87
76
  require "stripe/services/invoice_upcoming_lines_service"
88
77
  require "stripe/services/issuing/authorization_service"
89
78
  require "stripe/services/issuing/card_service"
90
79
  require "stripe/services/issuing/cardholder_service"
91
- require "stripe/services/issuing/credit_underwriting_record_service"
92
80
  require "stripe/services/issuing/dispute_service"
93
- require "stripe/services/issuing/dispute_settlement_detail_service"
94
81
  require "stripe/services/issuing/personalization_design_service"
95
82
  require "stripe/services/issuing/physical_bundle_service"
96
83
  require "stripe/services/issuing/token_service"
97
84
  require "stripe/services/issuing/transaction_service"
98
85
  require "stripe/services/issuing_service"
99
86
  require "stripe/services/mandate_service"
100
- require "stripe/services/margin_service"
101
- require "stripe/services/order_line_item_service"
102
- require "stripe/services/order_service"
103
87
  require "stripe/services/payment_intent_service"
104
88
  require "stripe/services/payment_link_line_item_service"
105
89
  require "stripe/services/payment_link_service"
@@ -114,9 +98,6 @@ require "stripe/services/product_service"
114
98
  require "stripe/services/promotion_code_service"
115
99
  require "stripe/services/quote_computed_upfront_line_items_service"
116
100
  require "stripe/services/quote_line_item_service"
117
- require "stripe/services/quote_line_service"
118
- require "stripe/services/quote_preview_invoice_service"
119
- require "stripe/services/quote_preview_subscription_schedule_service"
120
101
  require "stripe/services/quote_service"
121
102
  require "stripe/services/radar/early_fraud_warning_service"
122
103
  require "stripe/services/radar/value_list_item_service"
@@ -139,10 +120,8 @@ require "stripe/services/subscription_item_usage_record_service"
139
120
  require "stripe/services/subscription_item_usage_record_summary_service"
140
121
  require "stripe/services/subscription_schedule_service"
141
122
  require "stripe/services/subscription_service"
142
- require "stripe/services/tax/association_service"
143
123
  require "stripe/services/tax/calculation_line_item_service"
144
124
  require "stripe/services/tax/calculation_service"
145
- require "stripe/services/tax/form_service"
146
125
  require "stripe/services/tax/registration_service"
147
126
  require "stripe/services/tax/settings_service"
148
127
  require "stripe/services/tax/transaction_line_item_service"
@@ -154,7 +133,6 @@ require "stripe/services/tax_service"
154
133
  require "stripe/services/terminal/configuration_service"
155
134
  require "stripe/services/terminal/connection_token_service"
156
135
  require "stripe/services/terminal/location_service"
157
- require "stripe/services/terminal/reader_collected_data_service"
158
136
  require "stripe/services/terminal/reader_service"
159
137
  require "stripe/services/terminal_service"
160
138
  require "stripe/services/test_helpers/confirmation_token_service"
@@ -197,6 +175,7 @@ require "stripe/services/v2/billing/meter_event_service"
197
175
  require "stripe/services/v2/billing/meter_event_session_service"
198
176
  require "stripe/services/v2/billing/meter_event_stream_service"
199
177
  require "stripe/services/v2/billing_service"
178
+ require "stripe/services/v2/core/event_destination_service"
200
179
  require "stripe/services/v2/core/event_service"
201
180
  require "stripe/services/v2/core_service"
202
181
  require "stripe/services/v2_services"
@@ -25,8 +25,7 @@ module Stripe
25
25
  # If `.logger` is set, the value of `.log_level` is ignored. The decision on
26
26
  # what levels to print is entirely deferred to the logger.
27
27
  class StripeConfiguration
28
- attr_accessor :api_key, :api_version, :authenticator, :client_id, :enable_telemetry, :logger,
29
- :stripe_account, :stripe_context
28
+ attr_accessor :api_key, :api_version, :client_id, :enable_telemetry, :logger, :stripe_account, :stripe_context
30
29
 
31
30
  attr_reader :api_base, :uploads_base, :connect_base, :meter_events_base, :base_addresses, :ca_bundle_path,
32
31
  :log_level, :initial_network_retry_delay, :max_network_retries, :max_network_retry_delay,
@@ -53,7 +52,6 @@ module Stripe
53
52
 
54
53
  def initialize
55
54
  @api_version = ApiVersion::CURRENT
56
-
57
55
  @ca_bundle_path = Stripe::DEFAULT_CA_BUNDLE_PATH
58
56
  @enable_telemetry = true
59
57
  @verify_ssl_certs = true
data/lib/stripe/util.rb CHANGED
@@ -300,13 +300,7 @@ module Stripe
300
300
  when String
301
301
  { api_key: opts }
302
302
  when Hash
303
- # If the user is using request signing for authentication,
304
- # no need to check the api_key per request.
305
- if !(opts.key?(:client) &&
306
- opts.fetch(:client).config.authenticator) &&
307
- opts.key?(:api_key)
308
- check_api_key!(opts.fetch(:api_key))
309
- end
303
+ check_api_key!(opts.fetch(:api_key)) if opts.key?(:api_key)
310
304
  # Explicitly use dup here instead of clone to avoid preserving freeze
311
305
  # state on input params.
312
306
  opts.dup
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "13.1.0-beta.2"
4
+ VERSION = "13.1.0"
5
5
  end
data/lib/stripe.rb CHANGED
@@ -13,7 +13,6 @@ require "set"
13
13
  require "socket"
14
14
  require "uri"
15
15
  require "forwardable"
16
- require "base64"
17
16
 
18
17
  # Version
19
18
  require "stripe/api_version"
@@ -51,7 +50,6 @@ require "stripe/api_resource_test_helpers"
51
50
  require "stripe/singleton_api_resource"
52
51
  require "stripe/webhook"
53
52
  require "stripe/stripe_configuration"
54
- require "stripe/request_signing_authenticator"
55
53
  require "stripe/thin_event"
56
54
 
57
55
  # Named API resources
@@ -87,7 +85,6 @@ module Stripe
87
85
 
88
86
  # User configurable options
89
87
  def_delegators :@config, :api_key, :api_key=
90
- def_delegators :@config, :authenticator, :authenticator=
91
88
  def_delegators :@config, :api_version, :api_version=
92
89
  def_delegators :@config, :stripe_account, :stripe_account=
93
90
  def_delegators :@config, :api_base, :api_base=
@@ -135,48 +132,6 @@ module Stripe
135
132
  version: version,
136
133
  }
137
134
  end
138
-
139
- def self.add_beta_version(beta_name, version)
140
- if api_version.include?("; #{beta_name}=")
141
- raise "Stripe version header #{api_version} already contains entry for beta #{beta_name}"
142
- end
143
-
144
- self.api_version = "#{api_version}; #{beta_name}=#{version}"
145
- end
146
-
147
- class RawRequest
148
- def initialize
149
- @opts = {}
150
- end
151
-
152
- def execute(method, url, base_address: :api, params: {}, opts: {}, usage: [])
153
- opts = Util.normalize_opts(opts)
154
- req_opts = RequestOptions.extract_opts_from_hash(opts)
155
-
156
- requestor = APIRequestor.active_requestor
157
- resp, = requestor.send(:execute_request_internal, method, url, base_address, params, req_opts,
158
- usage)
159
-
160
- requestor.interpret_response(resp)
161
- end
162
- end
163
-
164
- # Sends a request to Stripe REST API
165
- def self.raw_request(method, url, params = {}, opts = {}, base_address: :api)
166
- req = RawRequest.new
167
- req.execute(method, url, base_address: base_address, params: params, opts: opts,
168
- usage: ["raw_request"])
169
- end
170
-
171
- def self.deserialize(data, api_mode: :v1)
172
- data = JSON.parse(data) if data.is_a?(String)
173
- Util.convert_to_stripe_object(data, {}, api_mode: api_mode)
174
- end
175
- class << self
176
- extend Gem::Deprecate
177
- deprecate :raw_request, "StripeClient#raw_request", 2024, 9
178
- deprecate :deserialize, "StripeClient#deserialize", 2024, 9
179
- end
180
135
  end
181
136
 
182
137
  Stripe.log_level = ENV["STRIPE_LOG"] unless ENV["STRIPE_LOG"].nil?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.1.0.pre.beta.2
4
+ version: 13.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-08 00:00:00.000000000 Z
11
+ date: 2024-10-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Stripe is the easiest way to accept payments online. See https://stripe.com
14
14
  for details.
@@ -30,9 +30,9 @@ files:
30
30
  - Rakefile
31
31
  - VERSION
32
32
  - examples/README.md
33
+ - examples/example_template.rb
33
34
  - examples/meter_event_stream.rb
34
- - examples/new_example.rb
35
- - examples/stripe_webhook_handler.rb
35
+ - examples/thinevent_webhook_handler.rb
36
36
  - exe/stripe-console
37
37
  - lib/data/ca-certificates.crt
38
38
  - lib/stripe.rb
@@ -60,11 +60,9 @@ files:
60
60
  - lib/stripe/oauth.rb
61
61
  - lib/stripe/object_types.rb
62
62
  - lib/stripe/request_options.rb
63
- - lib/stripe/request_signing_authenticator.rb
64
63
  - lib/stripe/resources.rb
65
64
  - lib/stripe/resources/account.rb
66
65
  - lib/stripe/resources/account_link.rb
67
- - lib/stripe/resources/account_notice.rb
68
66
  - lib/stripe/resources/account_session.rb
69
67
  - lib/stripe/resources/alipay_account.rb
70
68
  - lib/stripe/resources/apple_pay_domain.rb
@@ -85,9 +83,6 @@ files:
85
83
  - lib/stripe/resources/billing_portal/configuration.rb
86
84
  - lib/stripe/resources/billing_portal/session.rb
87
85
  - lib/stripe/resources/capability.rb
88
- - lib/stripe/resources/capital/financing_offer.rb
89
- - lib/stripe/resources/capital/financing_summary.rb
90
- - lib/stripe/resources/capital/financing_transaction.rb
91
86
  - lib/stripe/resources/card.rb
92
87
  - lib/stripe/resources/cash_balance.rb
93
88
  - lib/stripe/resources/charge.rb
@@ -114,29 +109,22 @@ files:
114
109
  - lib/stripe/resources/file.rb
115
110
  - lib/stripe/resources/file_link.rb
116
111
  - lib/stripe/resources/financial_connections/account.rb
117
- - lib/stripe/resources/financial_connections/account_inferred_balance.rb
118
112
  - lib/stripe/resources/financial_connections/account_owner.rb
119
113
  - lib/stripe/resources/financial_connections/account_ownership.rb
120
- - lib/stripe/resources/financial_connections/institution.rb
121
114
  - lib/stripe/resources/financial_connections/session.rb
122
115
  - lib/stripe/resources/financial_connections/transaction.rb
123
116
  - lib/stripe/resources/forwarding/request.rb
124
117
  - lib/stripe/resources/funding_instructions.rb
125
- - lib/stripe/resources/gift_cards/card.rb
126
- - lib/stripe/resources/gift_cards/transaction.rb
127
118
  - lib/stripe/resources/identity/verification_report.rb
128
119
  - lib/stripe/resources/identity/verification_session.rb
129
120
  - lib/stripe/resources/invoice.rb
130
121
  - lib/stripe/resources/invoice_item.rb
131
122
  - lib/stripe/resources/invoice_line_item.rb
132
- - lib/stripe/resources/invoice_payment.rb
133
123
  - lib/stripe/resources/invoice_rendering_template.rb
134
124
  - lib/stripe/resources/issuing/authorization.rb
135
125
  - lib/stripe/resources/issuing/card.rb
136
126
  - lib/stripe/resources/issuing/cardholder.rb
137
- - lib/stripe/resources/issuing/credit_underwriting_record.rb
138
127
  - lib/stripe/resources/issuing/dispute.rb
139
- - lib/stripe/resources/issuing/dispute_settlement_detail.rb
140
128
  - lib/stripe/resources/issuing/personalization_design.rb
141
129
  - lib/stripe/resources/issuing/physical_bundle.rb
142
130
  - lib/stripe/resources/issuing/token.rb
@@ -144,8 +132,6 @@ files:
144
132
  - lib/stripe/resources/line_item.rb
145
133
  - lib/stripe/resources/login_link.rb
146
134
  - lib/stripe/resources/mandate.rb
147
- - lib/stripe/resources/margin.rb
148
- - lib/stripe/resources/order.rb
149
135
  - lib/stripe/resources/payment_intent.rb
150
136
  - lib/stripe/resources/payment_link.rb
151
137
  - lib/stripe/resources/payment_method.rb
@@ -159,8 +145,6 @@ files:
159
145
  - lib/stripe/resources/product_feature.rb
160
146
  - lib/stripe/resources/promotion_code.rb
161
147
  - lib/stripe/resources/quote.rb
162
- - lib/stripe/resources/quote_preview_invoice.rb
163
- - lib/stripe/resources/quote_preview_subscription_schedule.rb
164
148
  - lib/stripe/resources/radar/early_fraud_warning.rb
165
149
  - lib/stripe/resources/radar/value_list.rb
166
150
  - lib/stripe/resources/radar/value_list_item.rb
@@ -179,10 +163,8 @@ files:
179
163
  - lib/stripe/resources/subscription.rb
180
164
  - lib/stripe/resources/subscription_item.rb
181
165
  - lib/stripe/resources/subscription_schedule.rb
182
- - lib/stripe/resources/tax/association.rb
183
166
  - lib/stripe/resources/tax/calculation.rb
184
167
  - lib/stripe/resources/tax/calculation_line_item.rb
185
- - lib/stripe/resources/tax/form.rb
186
168
  - lib/stripe/resources/tax/registration.rb
187
169
  - lib/stripe/resources/tax/settings.rb
188
170
  - lib/stripe/resources/tax/transaction.rb
@@ -194,7 +176,6 @@ files:
194
176
  - lib/stripe/resources/terminal/connection_token.rb
195
177
  - lib/stripe/resources/terminal/location.rb
196
178
  - lib/stripe/resources/terminal/reader.rb
197
- - lib/stripe/resources/terminal/reader_collected_data.rb
198
179
  - lib/stripe/resources/test_helpers/test_clock.rb
199
180
  - lib/stripe/resources/token.rb
200
181
  - lib/stripe/resources/topup.rb
@@ -216,6 +197,7 @@ files:
216
197
  - lib/stripe/resources/v2/billing/meter_event_adjustment.rb
217
198
  - lib/stripe/resources/v2/billing/meter_event_session.rb
218
199
  - lib/stripe/resources/v2/event.rb
200
+ - lib/stripe/resources/v2/event_destination.rb
219
201
  - lib/stripe/resources/webhook_endpoint.rb
220
202
  - lib/stripe/search_result_object.rb
221
203
  - lib/stripe/services.rb
@@ -223,7 +205,6 @@ files:
223
205
  - lib/stripe/services/account_external_account_service.rb
224
206
  - lib/stripe/services/account_link_service.rb
225
207
  - lib/stripe/services/account_login_link_service.rb
226
- - lib/stripe/services/account_notice_service.rb
227
208
  - lib/stripe/services/account_person_service.rb
228
209
  - lib/stripe/services/account_service.rb
229
210
  - lib/stripe/services/account_session_service.rb
@@ -246,10 +227,6 @@ files:
246
227
  - lib/stripe/services/billing_portal/session_service.rb
247
228
  - lib/stripe/services/billing_portal_service.rb
248
229
  - lib/stripe/services/billing_service.rb
249
- - lib/stripe/services/capital/financing_offer_service.rb
250
- - lib/stripe/services/capital/financing_summary_service.rb
251
- - lib/stripe/services/capital/financing_transaction_service.rb
252
- - lib/stripe/services/capital_service.rb
253
230
  - lib/stripe/services/charge_service.rb
254
231
  - lib/stripe/services/checkout/session_line_item_service.rb
255
232
  - lib/stripe/services/checkout/session_service.rb
@@ -282,43 +259,32 @@ files:
282
259
  - lib/stripe/services/exchange_rate_service.rb
283
260
  - lib/stripe/services/file_link_service.rb
284
261
  - lib/stripe/services/file_service.rb
285
- - lib/stripe/services/financial_connections/account_inferred_balance_service.rb
286
262
  - lib/stripe/services/financial_connections/account_owner_service.rb
287
263
  - lib/stripe/services/financial_connections/account_service.rb
288
- - lib/stripe/services/financial_connections/institution_service.rb
289
264
  - lib/stripe/services/financial_connections/session_service.rb
290
265
  - lib/stripe/services/financial_connections/transaction_service.rb
291
266
  - lib/stripe/services/financial_connections_service.rb
292
267
  - lib/stripe/services/forwarding/request_service.rb
293
268
  - lib/stripe/services/forwarding_service.rb
294
- - lib/stripe/services/gift_cards/card_service.rb
295
- - lib/stripe/services/gift_cards/transaction_service.rb
296
- - lib/stripe/services/gift_cards_service.rb
297
269
  - lib/stripe/services/identity/verification_report_service.rb
298
270
  - lib/stripe/services/identity/verification_session_service.rb
299
271
  - lib/stripe/services/identity_service.rb
300
272
  - lib/stripe/services/invoice_item_service.rb
301
273
  - lib/stripe/services/invoice_line_item_service.rb
302
- - lib/stripe/services/invoice_payment_service.rb
303
274
  - lib/stripe/services/invoice_rendering_template_service.rb
304
275
  - lib/stripe/services/invoice_service.rb
305
276
  - lib/stripe/services/invoice_upcoming_lines_service.rb
306
277
  - lib/stripe/services/issuing/authorization_service.rb
307
278
  - lib/stripe/services/issuing/card_service.rb
308
279
  - lib/stripe/services/issuing/cardholder_service.rb
309
- - lib/stripe/services/issuing/credit_underwriting_record_service.rb
310
280
  - lib/stripe/services/issuing/dispute_service.rb
311
- - lib/stripe/services/issuing/dispute_settlement_detail_service.rb
312
281
  - lib/stripe/services/issuing/personalization_design_service.rb
313
282
  - lib/stripe/services/issuing/physical_bundle_service.rb
314
283
  - lib/stripe/services/issuing/token_service.rb
315
284
  - lib/stripe/services/issuing/transaction_service.rb
316
285
  - lib/stripe/services/issuing_service.rb
317
286
  - lib/stripe/services/mandate_service.rb
318
- - lib/stripe/services/margin_service.rb
319
287
  - lib/stripe/services/oauth_service.rb
320
- - lib/stripe/services/order_line_item_service.rb
321
- - lib/stripe/services/order_service.rb
322
288
  - lib/stripe/services/payment_intent_service.rb
323
289
  - lib/stripe/services/payment_link_line_item_service.rb
324
290
  - lib/stripe/services/payment_link_service.rb
@@ -333,9 +299,6 @@ files:
333
299
  - lib/stripe/services/promotion_code_service.rb
334
300
  - lib/stripe/services/quote_computed_upfront_line_items_service.rb
335
301
  - lib/stripe/services/quote_line_item_service.rb
336
- - lib/stripe/services/quote_line_service.rb
337
- - lib/stripe/services/quote_preview_invoice_service.rb
338
- - lib/stripe/services/quote_preview_subscription_schedule_service.rb
339
302
  - lib/stripe/services/quote_service.rb
340
303
  - lib/stripe/services/radar/early_fraud_warning_service.rb
341
304
  - lib/stripe/services/radar/value_list_item_service.rb
@@ -358,10 +321,8 @@ files:
358
321
  - lib/stripe/services/subscription_item_usage_record_summary_service.rb
359
322
  - lib/stripe/services/subscription_schedule_service.rb
360
323
  - lib/stripe/services/subscription_service.rb
361
- - lib/stripe/services/tax/association_service.rb
362
324
  - lib/stripe/services/tax/calculation_line_item_service.rb
363
325
  - lib/stripe/services/tax/calculation_service.rb
364
- - lib/stripe/services/tax/form_service.rb
365
326
  - lib/stripe/services/tax/registration_service.rb
366
327
  - lib/stripe/services/tax/settings_service.rb
367
328
  - lib/stripe/services/tax/transaction_line_item_service.rb
@@ -373,7 +334,6 @@ files:
373
334
  - lib/stripe/services/terminal/configuration_service.rb
374
335
  - lib/stripe/services/terminal/connection_token_service.rb
375
336
  - lib/stripe/services/terminal/location_service.rb
376
- - lib/stripe/services/terminal/reader_collected_data_service.rb
377
337
  - lib/stripe/services/terminal/reader_service.rb
378
338
  - lib/stripe/services/terminal_service.rb
379
339
  - lib/stripe/services/test_helpers/confirmation_token_service.rb
@@ -416,6 +376,7 @@ files:
416
376
  - lib/stripe/services/v2/billing/meter_event_session_service.rb
417
377
  - lib/stripe/services/v2/billing/meter_event_stream_service.rb
418
378
  - lib/stripe/services/v2/billing_service.rb
379
+ - lib/stripe/services/v2/core/event_destination_service.rb
419
380
  - lib/stripe/services/v2/core/event_service.rb
420
381
  - lib/stripe/services/v2/core_service.rb
421
382
  - lib/stripe/services/v2_services.rb
@@ -454,9 +415,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
454
415
  version: 2.3.0
455
416
  required_rubygems_version: !ruby/object:Gem::Requirement
456
417
  requirements:
457
- - - ">"
418
+ - - ">="
458
419
  - !ruby/object:Gem::Version
459
- version: 1.3.1
420
+ version: '0'
460
421
  requirements: []
461
422
  rubygems_version: 3.3.27
462
423
  signing_key:
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "stripe"
4
- require "date"
5
-
6
- class NewExample
7
- attr_accessor :api_key
8
-
9
- def initialize(api_key)
10
- @api_key = api_key
11
- end
12
-
13
- def do_something_great
14
- puts "Hello World"
15
- # client = Stripe::StripeClient.new(api_key)
16
- # client.v1
17
- end
18
- end
19
-
20
- # Send meter events
21
- api_key = "{{API_KEY}}"
22
-
23
- example = NewExample.new(api_key)
24
- example.do_something_great
@@ -1,79 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Stripe
4
- class RequestSigningAuthenticator
5
- AUTHORIZATION_HEADER_NAME = "Authorization"
6
- CONTENT_TYPE_HEADER_NAME = "Content-Type"
7
- STRIPE_CONTEXT_HEADER_NAME = "Stripe-Context"
8
- STRIPE_ACCOUNT_HEADER_NAME = "Stripe-Account"
9
- CONTENT_DIGEST_HEADER_NAME = "Content-Digest"
10
- SIGNATURE_INPUT_HEADER_NAME = "Signature-Input"
11
- SIGNATURE_HEADER_NAME = "Signature"
12
-
13
- attr_reader :auth_token, :sign_lambda
14
-
15
- def initialize(auth_token, sign_lambda)
16
- raise ArgumentError, "auth_token must be a string" unless auth_token.is_a?(String)
17
- raise ArgumentError, "sign_lambda must be a lambda" unless sign_lambda.is_a?(Proc)
18
-
19
- @auth_token = auth_token
20
- @sign_lambda = sign_lambda
21
- end
22
-
23
- def authenticate(method, headers, body)
24
- covered_headers = [CONTENT_TYPE_HEADER_NAME,
25
- CONTENT_DIGEST_HEADER_NAME,
26
- STRIPE_CONTEXT_HEADER_NAME,
27
- STRIPE_ACCOUNT_HEADER_NAME,
28
- AUTHORIZATION_HEADER_NAME,]
29
-
30
- headers[AUTHORIZATION_HEADER_NAME] = "STRIPE-V2-SIG #{auth_token}"
31
-
32
- if method == :get
33
- covered_headers -= [CONTENT_TYPE_HEADER_NAME,
34
- CONTENT_DIGEST_HEADER_NAME,]
35
- else
36
- content = body || ""
37
- headers[CONTENT_DIGEST_HEADER_NAME] =
38
- %(sha-256=:#{content_digest(content)}:)
39
- end
40
-
41
- covered_headers_formatted = covered_headers
42
- .map { |string| %("#{string.downcase}") }
43
- .join(" ")
44
-
45
- signature_input = "(#{covered_headers_formatted});created=#{created_time}"
46
-
47
- inputs = covered_headers
48
- .map { |header| %("#{header.downcase}": #{headers[header]}) }
49
- .join("\n")
50
-
51
- signature_base = %(#{inputs}\n"@signature-params": #{signature_input})
52
- .encode(Encoding::UTF_8)
53
-
54
- headers[SIGNATURE_INPUT_HEADER_NAME] = "sig1=#{signature_input}"
55
-
56
- headers[SIGNATURE_HEADER_NAME] =
57
- "sig1=:#{encoded_signature(signature_base)}:"
58
- end
59
-
60
- private def sign(signature_base)
61
- @sign_lambda.call(signature_base)
62
- end
63
-
64
- private def encoded_signature(signature_base)
65
- Base64.strict_encode64(sign(signature_base))
66
- rescue StandardError
67
- raise AuthenticationError, "Encountered '#{e.message} (#{e.class})' " \
68
- "when calculating request signature."
69
- end
70
-
71
- private def content_digest(content)
72
- Base64.strict_encode64(OpenSSL::Digest.new("SHA256").digest(content))
73
- end
74
-
75
- private def created_time
76
- Time.now.to_i
77
- end
78
- end
79
- end
@@ -1,32 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- # A notice to a Connected account. Notice can be sent by Stripe on your behalf or you can opt to send the notices yourself.
6
- #
7
- # See the [guide to send notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) to your connected accounts.
8
- class AccountNotice < APIResource
9
- extend Stripe::APIOperations::List
10
- include Stripe::APIOperations::Save
11
-
12
- OBJECT_NAME = "account_notice"
13
- def self.object_name
14
- "account_notice"
15
- end
16
-
17
- # Retrieves a list of AccountNotice objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first.
18
- def self.list(filters = {}, opts = {})
19
- request_stripe_object(method: :get, path: "/v1/account_notices", params: filters, opts: opts)
20
- end
21
-
22
- # Updates an AccountNotice object.
23
- def self.update(id, params = {}, opts = {})
24
- request_stripe_object(
25
- method: :post,
26
- path: format("/v1/account_notices/%<id>s", { id: CGI.escape(id) }),
27
- params: params,
28
- opts: opts
29
- )
30
- end
31
- end
32
- end
@@ -1,49 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- module Capital
6
- # This is an object representing an offer of financing from
7
- # Stripe Capital to a Connect subaccount.
8
- class FinancingOffer < APIResource
9
- extend Stripe::APIOperations::List
10
-
11
- OBJECT_NAME = "capital.financing_offer"
12
- def self.object_name
13
- "capital.financing_offer"
14
- end
15
-
16
- # Retrieves the financing offers available for Connected accounts that belong to your platform.
17
- def self.list(filters = {}, opts = {})
18
- request_stripe_object(
19
- method: :get,
20
- path: "/v1/capital/financing_offers",
21
- params: filters,
22
- opts: opts
23
- )
24
- end
25
-
26
- # Acknowledges that platform has received and delivered the financing_offer to
27
- # the intended merchant recipient.
28
- def mark_delivered(params = {}, opts = {})
29
- request_stripe_object(
30
- method: :post,
31
- path: format("/v1/capital/financing_offers/%<financing_offer>s/mark_delivered", { financing_offer: CGI.escape(self["id"]) }),
32
- params: params,
33
- opts: opts
34
- )
35
- end
36
-
37
- # Acknowledges that platform has received and delivered the financing_offer to
38
- # the intended merchant recipient.
39
- def self.mark_delivered(financing_offer, params = {}, opts = {})
40
- request_stripe_object(
41
- method: :post,
42
- path: format("/v1/capital/financing_offers/%<financing_offer>s/mark_delivered", { financing_offer: CGI.escape(financing_offer) }),
43
- params: params,
44
- opts: opts
45
- )
46
- end
47
- end
48
- end
49
- end
@@ -1,15 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- module Capital
6
- # A financing object describes an account's current financing state. Used by Connect
7
- # platforms to read the state of Capital offered to their connected accounts.
8
- class FinancingSummary < SingletonAPIResource
9
- OBJECT_NAME = "capital.financing_summary"
10
- def self.object_name
11
- "capital.financing_summary"
12
- end
13
- end
14
- end
15
- end