stripe 5.22.0 → 5.55.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +142 -0
- data/Gemfile +0 -1
- data/Makefile +7 -0
- data/README.md +32 -27
- data/VERSION +1 -1
- data/lib/stripe/api_operations/create.rb +1 -1
- data/lib/stripe/api_operations/delete.rb +7 -3
- data/lib/stripe/api_operations/list.rb +1 -1
- data/lib/stripe/api_operations/nested_resource.rb +6 -5
- data/lib/stripe/api_operations/request.rb +54 -5
- data/lib/stripe/api_operations/save.rb +7 -4
- data/lib/stripe/api_operations/search.rb +19 -0
- data/lib/stripe/api_resource.rb +13 -19
- data/lib/stripe/api_resource_test_helpers.rb +47 -0
- data/lib/stripe/connection_manager.rb +51 -10
- data/lib/stripe/error_object.rb +2 -3
- data/lib/stripe/instrumentation.rb +3 -1
- data/lib/stripe/list_object.rb +2 -2
- data/lib/stripe/oauth.rb +7 -6
- data/lib/stripe/object_types.rb +21 -1
- data/lib/stripe/resources/account.rb +5 -9
- data/lib/stripe/resources/account_link.rb +1 -0
- data/lib/stripe/resources/apple_pay_domain.rb +1 -0
- data/lib/stripe/resources/application_fee.rb +1 -0
- data/lib/stripe/resources/application_fee_refund.rb +2 -1
- data/lib/stripe/resources/balance.rb +1 -0
- data/lib/stripe/resources/balance_transaction.rb +1 -0
- data/lib/stripe/resources/bank_account.rb +2 -1
- data/lib/stripe/resources/billing_portal/configuration.rb +14 -0
- data/lib/stripe/resources/billing_portal/session.rb +1 -0
- data/lib/stripe/resources/bitcoin_receiver.rb +1 -0
- data/lib/stripe/resources/bitcoin_transaction.rb +3 -2
- data/lib/stripe/resources/capability.rb +2 -1
- data/lib/stripe/resources/card.rb +1 -0
- data/lib/stripe/resources/cash_balance.rb +22 -0
- data/lib/stripe/resources/charge.rb +10 -0
- data/lib/stripe/resources/checkout/session.rb +12 -0
- data/lib/stripe/resources/country_spec.rb +1 -0
- data/lib/stripe/resources/coupon.rb +1 -0
- data/lib/stripe/resources/credit_note.rb +3 -2
- data/lib/stripe/resources/credit_note_line_item.rb +1 -0
- data/lib/stripe/resources/customer.rb +41 -2
- data/lib/stripe/resources/customer_balance_transaction.rb +3 -2
- data/lib/stripe/resources/discount.rb +1 -0
- data/lib/stripe/resources/dispute.rb +1 -0
- data/lib/stripe/resources/ephemeral_key.rb +1 -0
- data/lib/stripe/resources/event.rb +1 -0
- data/lib/stripe/resources/exchange_rate.rb +1 -0
- data/lib/stripe/resources/file.rb +3 -1
- data/lib/stripe/resources/file_link.rb +1 -0
- data/lib/stripe/resources/financial_connections/account.rb +31 -0
- data/lib/stripe/resources/financial_connections/account_owner.rb +10 -0
- data/lib/stripe/resources/financial_connections/account_ownership.rb +10 -0
- data/lib/stripe/resources/financial_connections/session.rb +12 -0
- data/lib/stripe/resources/funding_instructions.rb +16 -0
- data/lib/stripe/resources/identity/verification_report.rb +12 -0
- data/lib/stripe/resources/identity/verification_session.rb +35 -0
- data/lib/stripe/resources/invoice.rb +12 -2
- data/lib/stripe/resources/invoice_item.rb +1 -0
- data/lib/stripe/resources/invoice_line_item.rb +1 -0
- data/lib/stripe/resources/issuing/authorization.rb +1 -0
- data/lib/stripe/resources/issuing/card.rb +1 -0
- data/lib/stripe/resources/issuing/card_details.rb +2 -1
- data/lib/stripe/resources/issuing/cardholder.rb +1 -0
- data/lib/stripe/resources/issuing/dispute.rb +12 -0
- data/lib/stripe/resources/issuing/transaction.rb +1 -0
- data/lib/stripe/resources/line_item.rb +1 -0
- data/lib/stripe/resources/login_link.rb +1 -0
- data/lib/stripe/resources/mandate.rb +1 -0
- data/lib/stripe/resources/order.rb +1 -0
- data/lib/stripe/resources/order_return.rb +1 -0
- data/lib/stripe/resources/payment_intent.rb +40 -0
- data/lib/stripe/resources/payment_link.rb +23 -0
- data/lib/stripe/resources/payment_method.rb +1 -0
- data/lib/stripe/resources/payout.rb +11 -0
- data/lib/stripe/resources/person.rb +1 -0
- data/lib/stripe/resources/plan.rb +1 -0
- data/lib/stripe/resources/price.rb +10 -0
- data/lib/stripe/resources/product.rb +10 -0
- data/lib/stripe/resources/promotion_code.rb +12 -0
- data/lib/stripe/resources/quote.rb +105 -0
- data/lib/stripe/resources/radar/early_fraud_warning.rb +1 -0
- data/lib/stripe/resources/radar/value_list.rb +1 -0
- data/lib/stripe/resources/radar/value_list_item.rb +1 -0
- data/lib/stripe/resources/recipient.rb +1 -0
- data/lib/stripe/resources/refund.rb +31 -0
- data/lib/stripe/resources/reporting/report_run.rb +1 -0
- data/lib/stripe/resources/reporting/report_type.rb +1 -0
- data/lib/stripe/resources/reversal.rb +3 -2
- data/lib/stripe/resources/review.rb +1 -0
- data/lib/stripe/resources/setup_attempt.rb +10 -0
- data/lib/stripe/resources/setup_intent.rb +11 -0
- data/lib/stripe/resources/shipping_rate.rb +12 -0
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +1 -0
- data/lib/stripe/resources/sku.rb +1 -0
- data/lib/stripe/resources/source.rb +4 -3
- data/lib/stripe/resources/source_transaction.rb +1 -0
- data/lib/stripe/resources/subscription.rb +10 -0
- data/lib/stripe/resources/subscription_item.rb +2 -1
- data/lib/stripe/resources/subscription_schedule.rb +1 -0
- data/lib/stripe/resources/tax_code.rb +10 -0
- data/lib/stripe/resources/tax_id.rb +1 -0
- data/lib/stripe/resources/tax_rate.rb +1 -0
- data/lib/stripe/resources/terminal/configuration.rb +15 -0
- data/lib/stripe/resources/terminal/connection_token.rb +1 -0
- data/lib/stripe/resources/terminal/location.rb +1 -0
- data/lib/stripe/resources/terminal/reader.rb +61 -0
- data/lib/stripe/resources/test_helpers/test_clock.rb +25 -0
- data/lib/stripe/resources/three_d_secure.rb +1 -0
- data/lib/stripe/resources/token.rb +1 -0
- data/lib/stripe/resources/topup.rb +1 -0
- data/lib/stripe/resources/transfer.rb +1 -0
- data/lib/stripe/resources/usage_record.rb +1 -0
- data/lib/stripe/resources/usage_record_summary.rb +1 -0
- data/lib/stripe/resources/webhook_endpoint.rb +1 -0
- data/lib/stripe/resources.rb +18 -0
- data/lib/stripe/search_result_object.rb +86 -0
- data/lib/stripe/stripe_client.rb +252 -114
- data/lib/stripe/stripe_configuration.rb +194 -0
- data/lib/stripe/stripe_object.rb +24 -1
- data/lib/stripe/stripe_response.rb +80 -52
- data/lib/stripe/util.rb +62 -7
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +39 -168
- data/stripe.gemspec +12 -5
- metadata +29 -190
- data/.editorconfig +0 -10
- data/.gitattributes +0 -4
- data/.github/ISSUE_TEMPLATE.md +0 -5
- data/.gitignore +0 -8
- data/.rubocop.yml +0 -80
- data/.rubocop_todo.yml +0 -33
- data/.travis.yml +0 -40
- data/.vscode/extensions.json +0 -7
- data/.vscode/settings.json +0 -8
- data/test/openapi/README.md +0 -9
- data/test/stripe/account_link_test.rb +0 -18
- data/test/stripe/account_test.rb +0 -412
- data/test/stripe/alipay_account_test.rb +0 -37
- data/test/stripe/api_operations_test.rb +0 -80
- data/test/stripe/api_resource_test.rb +0 -646
- data/test/stripe/apple_pay_domain_test.rb +0 -46
- data/test/stripe/application_fee_refund_test.rb +0 -37
- data/test/stripe/application_fee_test.rb +0 -58
- data/test/stripe/balance_test.rb +0 -13
- data/test/stripe/balance_transaction_test.rb +0 -20
- data/test/stripe/bank_account_test.rb +0 -36
- data/test/stripe/billing_portal/session_test.rb +0 -18
- data/test/stripe/capability_test.rb +0 -45
- data/test/stripe/charge_test.rb +0 -64
- data/test/stripe/checkout/session_test.rb +0 -53
- data/test/stripe/connection_manager_test.rb +0 -163
- data/test/stripe/country_spec_test.rb +0 -20
- data/test/stripe/coupon_test.rb +0 -61
- data/test/stripe/credit_note_test.rb +0 -90
- data/test/stripe/customer_balance_transaction_test.rb +0 -37
- data/test/stripe/customer_card_test.rb +0 -42
- data/test/stripe/customer_test.rb +0 -226
- data/test/stripe/dispute_test.rb +0 -51
- data/test/stripe/ephemeral_key_test.rb +0 -93
- data/test/stripe/errors_test.rb +0 -53
- data/test/stripe/exchange_rate_test.rb +0 -20
- data/test/stripe/file_link_test.rb +0 -41
- data/test/stripe/file_test.rb +0 -87
- data/test/stripe/instrumentation_test.rb +0 -74
- data/test/stripe/invoice_item_test.rb +0 -66
- data/test/stripe/invoice_line_item_test.rb +0 -8
- data/test/stripe/invoice_test.rb +0 -229
- data/test/stripe/issuing/authorization_test.rb +0 -72
- data/test/stripe/issuing/card_test.rb +0 -74
- data/test/stripe/issuing/cardholder_test.rb +0 -53
- data/test/stripe/issuing/dispute_test.rb +0 -35
- data/test/stripe/issuing/transaction_test.rb +0 -48
- data/test/stripe/list_object_test.rb +0 -202
- data/test/stripe/login_link_test.rb +0 -37
- data/test/stripe/mandate_test.rb +0 -14
- data/test/stripe/multipart_encoder_test.rb +0 -130
- data/test/stripe/oauth_test.rb +0 -104
- data/test/stripe/order_return_test.rb +0 -21
- data/test/stripe/order_test.rb +0 -82
- data/test/stripe/payment_intent_test.rb +0 -107
- data/test/stripe/payment_method_test.rb +0 -84
- data/test/stripe/payout_test.rb +0 -57
- data/test/stripe/person_test.rb +0 -46
- data/test/stripe/plan_test.rb +0 -98
- data/test/stripe/price_test.rb +0 -48
- data/test/stripe/product_test.rb +0 -59
- data/test/stripe/radar/early_fraud_warning_test.rb +0 -22
- data/test/stripe/radar/value_list_item_test.rb +0 -48
- data/test/stripe/radar/value_list_test.rb +0 -61
- data/test/stripe/recipient_test.rb +0 -62
- data/test/stripe/refund_test.rb +0 -39
- data/test/stripe/reporting/report_run_test.rb +0 -33
- data/test/stripe/reporting/report_type_test.rb +0 -22
- data/test/stripe/reversal_test.rb +0 -43
- data/test/stripe/review_test.rb +0 -27
- data/test/stripe/setup_intent_test.rb +0 -84
- data/test/stripe/sigma/scheduled_query_run_test.rb +0 -22
- data/test/stripe/sku_test.rb +0 -60
- data/test/stripe/source_test.rb +0 -119
- data/test/stripe/stripe_client_test.rb +0 -1291
- data/test/stripe/stripe_object_test.rb +0 -500
- data/test/stripe/stripe_response_test.rb +0 -95
- data/test/stripe/subscription_item_test.rb +0 -84
- data/test/stripe/subscription_schedule_test.rb +0 -82
- data/test/stripe/subscription_test.rb +0 -80
- data/test/stripe/tax_id_test.rb +0 -31
- data/test/stripe/tax_rate_test.rb +0 -43
- data/test/stripe/terminal/connection_token_test.rb +0 -16
- data/test/stripe/terminal/location_test.rb +0 -68
- data/test/stripe/terminal/reader_test.rb +0 -62
- data/test/stripe/three_d_secure_test.rb +0 -23
- data/test/stripe/topup_test.rb +0 -62
- data/test/stripe/transfer_test.rb +0 -88
- data/test/stripe/usage_record_summary_test.rb +0 -29
- data/test/stripe/util_test.rb +0 -402
- data/test/stripe/webhook_endpoint_test.rb +0 -59
- data/test/stripe/webhook_test.rb +0 -135
- data/test/stripe_mock.rb +0 -78
- data/test/stripe_test.rb +0 -50
- data/test/test_data.rb +0 -61
- data/test/test_helper.rb +0 -75
data/lib/stripe.rb
CHANGED
@@ -12,6 +12,7 @@ require "securerandom"
|
|
12
12
|
require "set"
|
13
13
|
require "socket"
|
14
14
|
require "uri"
|
15
|
+
require "forwardable"
|
15
16
|
|
16
17
|
# Version
|
17
18
|
require "stripe/version"
|
@@ -23,6 +24,7 @@ require "stripe/api_operations/list"
|
|
23
24
|
require "stripe/api_operations/nested_resource"
|
24
25
|
require "stripe/api_operations/request"
|
25
26
|
require "stripe/api_operations/save"
|
27
|
+
require "stripe/api_operations/search"
|
26
28
|
|
27
29
|
# API resource support classes
|
28
30
|
require "stripe/errors"
|
@@ -34,10 +36,13 @@ require "stripe/stripe_client"
|
|
34
36
|
require "stripe/stripe_object"
|
35
37
|
require "stripe/stripe_response"
|
36
38
|
require "stripe/list_object"
|
39
|
+
require "stripe/search_result_object"
|
37
40
|
require "stripe/error_object"
|
38
41
|
require "stripe/api_resource"
|
42
|
+
require "stripe/api_resource_test_helpers"
|
39
43
|
require "stripe/singleton_api_resource"
|
40
44
|
require "stripe/webhook"
|
45
|
+
require "stripe/stripe_configuration"
|
41
46
|
|
42
47
|
# Named API resources
|
43
48
|
require "stripe/resources"
|
@@ -48,47 +53,43 @@ require "stripe/oauth"
|
|
48
53
|
module Stripe
|
49
54
|
DEFAULT_CA_BUNDLE_PATH = __dir__ + "/data/ca-certificates.crt"
|
50
55
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
@uploads_base = "https://files.stripe.com"
|
56
|
-
|
57
|
-
@log_level = nil
|
58
|
-
@logger = nil
|
59
|
-
|
60
|
-
@proxy = nil
|
61
|
-
|
62
|
-
@max_network_retries = 0
|
63
|
-
@max_network_retry_delay = 2
|
64
|
-
@initial_network_retry_delay = 0.5
|
65
|
-
|
66
|
-
@ca_bundle_path = DEFAULT_CA_BUNDLE_PATH
|
67
|
-
@ca_store = nil
|
68
|
-
@verify_ssl_certs = true
|
56
|
+
# map to the same values as the standard library's logger
|
57
|
+
LEVEL_DEBUG = Logger::DEBUG
|
58
|
+
LEVEL_ERROR = Logger::ERROR
|
59
|
+
LEVEL_INFO = Logger::INFO
|
69
60
|
|
70
|
-
@
|
71
|
-
@read_timeout = 80
|
61
|
+
@app_info = nil
|
72
62
|
|
73
|
-
@
|
63
|
+
@config = Stripe::StripeConfiguration.setup
|
74
64
|
|
75
65
|
class << self
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
66
|
+
extend Forwardable
|
67
|
+
|
68
|
+
attr_reader :config
|
69
|
+
|
70
|
+
# User configurable options
|
71
|
+
def_delegators :@config, :api_key, :api_key=
|
72
|
+
def_delegators :@config, :api_version, :api_version=
|
73
|
+
def_delegators :@config, :stripe_account, :stripe_account=
|
74
|
+
def_delegators :@config, :api_base, :api_base=
|
75
|
+
def_delegators :@config, :uploads_base, :uploads_base=
|
76
|
+
def_delegators :@config, :connect_base, :connect_base=
|
77
|
+
def_delegators :@config, :open_timeout, :open_timeout=
|
78
|
+
def_delegators :@config, :read_timeout, :read_timeout=
|
79
|
+
def_delegators :@config, :write_timeout, :write_timeout=
|
80
|
+
def_delegators :@config, :proxy, :proxy=
|
81
|
+
def_delegators :@config, :verify_ssl_certs, :verify_ssl_certs=
|
82
|
+
def_delegators :@config, :ca_bundle_path, :ca_bundle_path=
|
83
|
+
def_delegators :@config, :log_level, :log_level=
|
84
|
+
def_delegators :@config, :logger, :logger=
|
85
|
+
def_delegators :@config, :max_network_retries, :max_network_retries=
|
86
|
+
def_delegators :@config, :enable_telemetry=, :enable_telemetry?
|
87
|
+
def_delegators :@config, :client_id=, :client_id
|
88
|
+
|
89
|
+
# Internal configurations
|
90
|
+
def_delegators :@config, :max_network_retry_delay
|
91
|
+
def_delegators :@config, :initial_network_retry_delay
|
92
|
+
def_delegators :@config, :ca_store
|
92
93
|
end
|
93
94
|
|
94
95
|
# Gets the application for a plugin that's identified some. See
|
@@ -101,131 +102,11 @@ module Stripe
|
|
101
102
|
@app_info = info
|
102
103
|
end
|
103
104
|
|
104
|
-
def self.api_base=(api_base)
|
105
|
-
@api_base = api_base
|
106
|
-
StripeClient.clear_all_connection_managers
|
107
|
-
end
|
108
|
-
|
109
|
-
# The location of a file containing a bundle of CA certificates. By default
|
110
|
-
# the library will use an included bundle that can successfully validate
|
111
|
-
# Stripe certificates.
|
112
|
-
def self.ca_bundle_path
|
113
|
-
@ca_bundle_path
|
114
|
-
end
|
115
|
-
|
116
|
-
def self.ca_bundle_path=(path)
|
117
|
-
@ca_bundle_path = path
|
118
|
-
|
119
|
-
# empty this field so a new store is initialized
|
120
|
-
@ca_store = nil
|
121
|
-
|
122
|
-
StripeClient.clear_all_connection_managers
|
123
|
-
end
|
124
|
-
|
125
|
-
# A certificate store initialized from the the bundle in #ca_bundle_path and
|
126
|
-
# which is used to validate TLS on every request.
|
127
|
-
#
|
128
|
-
# This was added to the give the gem "pseudo thread safety" in that it seems
|
129
|
-
# when initiating many parallel requests marshaling the certificate store is
|
130
|
-
# the most likely point of failure (see issue #382). Any program attempting
|
131
|
-
# to leverage this pseudo safety should make a call to this method (i.e.
|
132
|
-
# `Stripe.ca_store`) in their initialization code because it marshals lazily
|
133
|
-
# and is itself not thread safe.
|
134
|
-
def self.ca_store
|
135
|
-
@ca_store ||= begin
|
136
|
-
store = OpenSSL::X509::Store.new
|
137
|
-
store.add_file(ca_bundle_path)
|
138
|
-
store
|
139
|
-
end
|
140
|
-
end
|
141
|
-
|
142
|
-
def self.connect_base=(connect_base)
|
143
|
-
@connect_base = connect_base
|
144
|
-
StripeClient.clear_all_connection_managers
|
145
|
-
end
|
146
|
-
|
147
|
-
def self.enable_telemetry?
|
148
|
-
@enable_telemetry
|
149
|
-
end
|
150
|
-
|
151
|
-
def self.enable_telemetry=(val)
|
152
|
-
@enable_telemetry = val
|
153
|
-
end
|
154
|
-
|
155
|
-
# map to the same values as the standard library's logger
|
156
|
-
LEVEL_DEBUG = Logger::DEBUG
|
157
|
-
LEVEL_ERROR = Logger::ERROR
|
158
|
-
LEVEL_INFO = Logger::INFO
|
159
|
-
|
160
|
-
# When set prompts the library to log some extra information to $stdout and
|
161
|
-
# $stderr about what it's doing. For example, it'll produce information about
|
162
|
-
# requests, responses, and errors that are received. Valid log levels are
|
163
|
-
# `debug` and `info`, with `debug` being a little more verbose in places.
|
164
|
-
#
|
165
|
-
# Use of this configuration is only useful when `.logger` is _not_ set. When
|
166
|
-
# it is, the decision what levels to print is entirely deferred to the logger.
|
167
|
-
def self.log_level
|
168
|
-
@log_level
|
169
|
-
end
|
170
|
-
|
171
|
-
def self.log_level=(val)
|
172
|
-
# Backwards compatibility for values that we briefly allowed
|
173
|
-
if val == "debug"
|
174
|
-
val = LEVEL_DEBUG
|
175
|
-
elsif val == "info"
|
176
|
-
val = LEVEL_INFO
|
177
|
-
end
|
178
|
-
|
179
|
-
if !val.nil? && ![LEVEL_DEBUG, LEVEL_ERROR, LEVEL_INFO].include?(val)
|
180
|
-
raise ArgumentError,
|
181
|
-
"log_level should only be set to `nil`, `debug` or `info`"
|
182
|
-
end
|
183
|
-
@log_level = val
|
184
|
-
end
|
185
|
-
|
186
|
-
# Sets a logger to which logging output will be sent. The logger should
|
187
|
-
# support the same interface as the `Logger` class that's part of Ruby's
|
188
|
-
# standard library (hint, anything in `Rails.logger` will likely be
|
189
|
-
# suitable).
|
190
|
-
#
|
191
|
-
# If `.logger` is set, the value of `.log_level` is ignored. The decision on
|
192
|
-
# what levels to print is entirely deferred to the logger.
|
193
|
-
def self.logger
|
194
|
-
@logger
|
195
|
-
end
|
196
|
-
|
197
|
-
def self.logger=(val)
|
198
|
-
@logger = val
|
199
|
-
end
|
200
|
-
|
201
|
-
def self.max_network_retries
|
202
|
-
@max_network_retries
|
203
|
-
end
|
204
|
-
|
205
|
-
def self.max_network_retries=(val)
|
206
|
-
@max_network_retries = val.to_i
|
207
|
-
end
|
208
|
-
|
209
|
-
def self.open_timeout=(open_timeout)
|
210
|
-
@open_timeout = open_timeout
|
211
|
-
StripeClient.clear_all_connection_managers
|
212
|
-
end
|
213
|
-
|
214
|
-
def self.proxy=(proxy)
|
215
|
-
@proxy = proxy
|
216
|
-
StripeClient.clear_all_connection_managers
|
217
|
-
end
|
218
|
-
|
219
|
-
def self.read_timeout=(read_timeout)
|
220
|
-
@read_timeout = read_timeout
|
221
|
-
StripeClient.clear_all_connection_managers
|
222
|
-
end
|
223
|
-
|
224
105
|
# Sets some basic information about the running application that's sent along
|
225
106
|
# with API requests. Useful for plugin authors to identify their plugin when
|
226
107
|
# communicating with Stripe.
|
227
108
|
#
|
228
|
-
# Takes a name and optional
|
109
|
+
# Takes a name and optional partner program ID, plugin URL, and version.
|
229
110
|
def self.set_app_info(name, partner_id: nil, url: nil, version: nil)
|
230
111
|
@app_info = {
|
231
112
|
name: name,
|
@@ -234,16 +115,6 @@ module Stripe
|
|
234
115
|
version: version,
|
235
116
|
}
|
236
117
|
end
|
237
|
-
|
238
|
-
def self.uploads_base=(uploads_base)
|
239
|
-
@uploads_base = uploads_base
|
240
|
-
StripeClient.clear_all_connection_managers
|
241
|
-
end
|
242
|
-
|
243
|
-
def self.verify_ssl_certs=(verify_ssl_certs)
|
244
|
-
@verify_ssl_certs = verify_ssl_certs
|
245
|
-
StripeClient.clear_all_connection_managers
|
246
|
-
end
|
247
118
|
end
|
248
119
|
|
249
120
|
Stripe.log_level = ENV["STRIPE_LOG"] unless ENV["STRIPE_LOG"].nil?
|
data/stripe.gemspec
CHANGED
@@ -13,21 +13,28 @@ Gem::Specification.new do |s|
|
|
13
13
|
"See https://stripe.com for details."
|
14
14
|
s.author = "Stripe"
|
15
15
|
s.email = "support@stripe.com"
|
16
|
-
s.homepage = "https://stripe.com/docs/api
|
16
|
+
s.homepage = "https://stripe.com/docs/api?lang=ruby"
|
17
17
|
s.license = "MIT"
|
18
18
|
|
19
19
|
s.metadata = {
|
20
20
|
"bug_tracker_uri" => "https://github.com/stripe/stripe-ruby/issues",
|
21
21
|
"changelog_uri" =>
|
22
22
|
"https://github.com/stripe/stripe-ruby/blob/master/CHANGELOG.md",
|
23
|
-
"documentation_uri" => "https://stripe.com/docs/api
|
23
|
+
"documentation_uri" => "https://stripe.com/docs/api?lang=ruby",
|
24
24
|
"github_repo" => "ssh://github.com/stripe/stripe-ruby",
|
25
|
-
"homepage_uri" => "https://stripe.com/docs/api
|
25
|
+
"homepage_uri" => "https://stripe.com/docs/api?lang=ruby",
|
26
26
|
"source_code_uri" => "https://github.com/stripe/stripe-ruby",
|
27
27
|
}
|
28
28
|
|
29
|
-
|
30
|
-
|
29
|
+
ignored = Regexp.union(
|
30
|
+
/\A\.editorconfig/,
|
31
|
+
/\A\.git/,
|
32
|
+
/\A\.rubocop/,
|
33
|
+
/\A\.travis.yml/,
|
34
|
+
/\A\.vscode/,
|
35
|
+
/\Atest/
|
36
|
+
)
|
37
|
+
s.files = `git ls-files`.split("\n").reject { |f| ignored.match(f) }
|
31
38
|
s.executables = `git ls-files -- bin/*`.split("\n")
|
32
39
|
.map { |f| ::File.basename(f) }
|
33
40
|
s.require_paths = ["lib"]
|
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: 5.
|
4
|
+
version: 5.55.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-05 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.
|
@@ -18,21 +18,13 @@ executables:
|
|
18
18
|
extensions: []
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
|
-
- ".editorconfig"
|
22
|
-
- ".gitattributes"
|
23
|
-
- ".github/ISSUE_TEMPLATE.md"
|
24
|
-
- ".gitignore"
|
25
|
-
- ".rubocop.yml"
|
26
|
-
- ".rubocop_todo.yml"
|
27
|
-
- ".travis.yml"
|
28
|
-
- ".vscode/extensions.json"
|
29
|
-
- ".vscode/settings.json"
|
30
21
|
- CHANGELOG.md
|
31
22
|
- CODE_OF_CONDUCT.md
|
32
23
|
- CONTRIBUTORS
|
33
24
|
- Gemfile
|
34
25
|
- History.txt
|
35
26
|
- LICENSE
|
27
|
+
- Makefile
|
36
28
|
- README.md
|
37
29
|
- Rakefile
|
38
30
|
- VERSION
|
@@ -45,7 +37,9 @@ files:
|
|
45
37
|
- lib/stripe/api_operations/nested_resource.rb
|
46
38
|
- lib/stripe/api_operations/request.rb
|
47
39
|
- lib/stripe/api_operations/save.rb
|
40
|
+
- lib/stripe/api_operations/search.rb
|
48
41
|
- lib/stripe/api_resource.rb
|
42
|
+
- lib/stripe/api_resource_test_helpers.rb
|
49
43
|
- lib/stripe/connection_manager.rb
|
50
44
|
- lib/stripe/error_object.rb
|
51
45
|
- lib/stripe/errors.rb
|
@@ -64,11 +58,13 @@ files:
|
|
64
58
|
- lib/stripe/resources/balance.rb
|
65
59
|
- lib/stripe/resources/balance_transaction.rb
|
66
60
|
- lib/stripe/resources/bank_account.rb
|
61
|
+
- lib/stripe/resources/billing_portal/configuration.rb
|
67
62
|
- lib/stripe/resources/billing_portal/session.rb
|
68
63
|
- lib/stripe/resources/bitcoin_receiver.rb
|
69
64
|
- lib/stripe/resources/bitcoin_transaction.rb
|
70
65
|
- lib/stripe/resources/capability.rb
|
71
66
|
- lib/stripe/resources/card.rb
|
67
|
+
- lib/stripe/resources/cash_balance.rb
|
72
68
|
- lib/stripe/resources/charge.rb
|
73
69
|
- lib/stripe/resources/checkout/session.rb
|
74
70
|
- lib/stripe/resources/country_spec.rb
|
@@ -84,6 +80,13 @@ files:
|
|
84
80
|
- lib/stripe/resources/exchange_rate.rb
|
85
81
|
- lib/stripe/resources/file.rb
|
86
82
|
- lib/stripe/resources/file_link.rb
|
83
|
+
- lib/stripe/resources/financial_connections/account.rb
|
84
|
+
- lib/stripe/resources/financial_connections/account_owner.rb
|
85
|
+
- lib/stripe/resources/financial_connections/account_ownership.rb
|
86
|
+
- lib/stripe/resources/financial_connections/session.rb
|
87
|
+
- lib/stripe/resources/funding_instructions.rb
|
88
|
+
- lib/stripe/resources/identity/verification_report.rb
|
89
|
+
- lib/stripe/resources/identity/verification_session.rb
|
87
90
|
- lib/stripe/resources/invoice.rb
|
88
91
|
- lib/stripe/resources/invoice_item.rb
|
89
92
|
- lib/stripe/resources/invoice_line_item.rb
|
@@ -99,12 +102,15 @@ files:
|
|
99
102
|
- lib/stripe/resources/order.rb
|
100
103
|
- lib/stripe/resources/order_return.rb
|
101
104
|
- lib/stripe/resources/payment_intent.rb
|
105
|
+
- lib/stripe/resources/payment_link.rb
|
102
106
|
- lib/stripe/resources/payment_method.rb
|
103
107
|
- lib/stripe/resources/payout.rb
|
104
108
|
- lib/stripe/resources/person.rb
|
105
109
|
- lib/stripe/resources/plan.rb
|
106
110
|
- lib/stripe/resources/price.rb
|
107
111
|
- lib/stripe/resources/product.rb
|
112
|
+
- lib/stripe/resources/promotion_code.rb
|
113
|
+
- lib/stripe/resources/quote.rb
|
108
114
|
- lib/stripe/resources/radar/early_fraud_warning.rb
|
109
115
|
- lib/stripe/resources/radar/value_list.rb
|
110
116
|
- lib/stripe/resources/radar/value_list_item.rb
|
@@ -115,7 +121,9 @@ files:
|
|
115
121
|
- lib/stripe/resources/reporting/report_type.rb
|
116
122
|
- lib/stripe/resources/reversal.rb
|
117
123
|
- lib/stripe/resources/review.rb
|
124
|
+
- lib/stripe/resources/setup_attempt.rb
|
118
125
|
- lib/stripe/resources/setup_intent.rb
|
126
|
+
- lib/stripe/resources/shipping_rate.rb
|
119
127
|
- lib/stripe/resources/sigma/scheduled_query_run.rb
|
120
128
|
- lib/stripe/resources/sku.rb
|
121
129
|
- lib/stripe/resources/source.rb
|
@@ -123,11 +131,14 @@ files:
|
|
123
131
|
- lib/stripe/resources/subscription.rb
|
124
132
|
- lib/stripe/resources/subscription_item.rb
|
125
133
|
- lib/stripe/resources/subscription_schedule.rb
|
134
|
+
- lib/stripe/resources/tax_code.rb
|
126
135
|
- lib/stripe/resources/tax_id.rb
|
127
136
|
- lib/stripe/resources/tax_rate.rb
|
137
|
+
- lib/stripe/resources/terminal/configuration.rb
|
128
138
|
- lib/stripe/resources/terminal/connection_token.rb
|
129
139
|
- lib/stripe/resources/terminal/location.rb
|
130
140
|
- lib/stripe/resources/terminal/reader.rb
|
141
|
+
- lib/stripe/resources/test_helpers/test_clock.rb
|
131
142
|
- lib/stripe/resources/three_d_secure.rb
|
132
143
|
- lib/stripe/resources/token.rb
|
133
144
|
- lib/stripe/resources/topup.rb
|
@@ -135,110 +146,25 @@ files:
|
|
135
146
|
- lib/stripe/resources/usage_record.rb
|
136
147
|
- lib/stripe/resources/usage_record_summary.rb
|
137
148
|
- lib/stripe/resources/webhook_endpoint.rb
|
149
|
+
- lib/stripe/search_result_object.rb
|
138
150
|
- lib/stripe/singleton_api_resource.rb
|
139
151
|
- lib/stripe/stripe_client.rb
|
152
|
+
- lib/stripe/stripe_configuration.rb
|
140
153
|
- lib/stripe/stripe_object.rb
|
141
154
|
- lib/stripe/stripe_response.rb
|
142
155
|
- lib/stripe/util.rb
|
143
156
|
- lib/stripe/version.rb
|
144
157
|
- lib/stripe/webhook.rb
|
145
158
|
- stripe.gemspec
|
146
|
-
|
147
|
-
- test/stripe/account_link_test.rb
|
148
|
-
- test/stripe/account_test.rb
|
149
|
-
- test/stripe/alipay_account_test.rb
|
150
|
-
- test/stripe/api_operations_test.rb
|
151
|
-
- test/stripe/api_resource_test.rb
|
152
|
-
- test/stripe/apple_pay_domain_test.rb
|
153
|
-
- test/stripe/application_fee_refund_test.rb
|
154
|
-
- test/stripe/application_fee_test.rb
|
155
|
-
- test/stripe/balance_test.rb
|
156
|
-
- test/stripe/balance_transaction_test.rb
|
157
|
-
- test/stripe/bank_account_test.rb
|
158
|
-
- test/stripe/billing_portal/session_test.rb
|
159
|
-
- test/stripe/capability_test.rb
|
160
|
-
- test/stripe/charge_test.rb
|
161
|
-
- test/stripe/checkout/session_test.rb
|
162
|
-
- test/stripe/connection_manager_test.rb
|
163
|
-
- test/stripe/country_spec_test.rb
|
164
|
-
- test/stripe/coupon_test.rb
|
165
|
-
- test/stripe/credit_note_test.rb
|
166
|
-
- test/stripe/customer_balance_transaction_test.rb
|
167
|
-
- test/stripe/customer_card_test.rb
|
168
|
-
- test/stripe/customer_test.rb
|
169
|
-
- test/stripe/dispute_test.rb
|
170
|
-
- test/stripe/ephemeral_key_test.rb
|
171
|
-
- test/stripe/errors_test.rb
|
172
|
-
- test/stripe/exchange_rate_test.rb
|
173
|
-
- test/stripe/file_link_test.rb
|
174
|
-
- test/stripe/file_test.rb
|
175
|
-
- test/stripe/instrumentation_test.rb
|
176
|
-
- test/stripe/invoice_item_test.rb
|
177
|
-
- test/stripe/invoice_line_item_test.rb
|
178
|
-
- test/stripe/invoice_test.rb
|
179
|
-
- test/stripe/issuing/authorization_test.rb
|
180
|
-
- test/stripe/issuing/card_test.rb
|
181
|
-
- test/stripe/issuing/cardholder_test.rb
|
182
|
-
- test/stripe/issuing/dispute_test.rb
|
183
|
-
- test/stripe/issuing/transaction_test.rb
|
184
|
-
- test/stripe/list_object_test.rb
|
185
|
-
- test/stripe/login_link_test.rb
|
186
|
-
- test/stripe/mandate_test.rb
|
187
|
-
- test/stripe/multipart_encoder_test.rb
|
188
|
-
- test/stripe/oauth_test.rb
|
189
|
-
- test/stripe/order_return_test.rb
|
190
|
-
- test/stripe/order_test.rb
|
191
|
-
- test/stripe/payment_intent_test.rb
|
192
|
-
- test/stripe/payment_method_test.rb
|
193
|
-
- test/stripe/payout_test.rb
|
194
|
-
- test/stripe/person_test.rb
|
195
|
-
- test/stripe/plan_test.rb
|
196
|
-
- test/stripe/price_test.rb
|
197
|
-
- test/stripe/product_test.rb
|
198
|
-
- test/stripe/radar/early_fraud_warning_test.rb
|
199
|
-
- test/stripe/radar/value_list_item_test.rb
|
200
|
-
- test/stripe/radar/value_list_test.rb
|
201
|
-
- test/stripe/recipient_test.rb
|
202
|
-
- test/stripe/refund_test.rb
|
203
|
-
- test/stripe/reporting/report_run_test.rb
|
204
|
-
- test/stripe/reporting/report_type_test.rb
|
205
|
-
- test/stripe/reversal_test.rb
|
206
|
-
- test/stripe/review_test.rb
|
207
|
-
- test/stripe/setup_intent_test.rb
|
208
|
-
- test/stripe/sigma/scheduled_query_run_test.rb
|
209
|
-
- test/stripe/sku_test.rb
|
210
|
-
- test/stripe/source_test.rb
|
211
|
-
- test/stripe/stripe_client_test.rb
|
212
|
-
- test/stripe/stripe_object_test.rb
|
213
|
-
- test/stripe/stripe_response_test.rb
|
214
|
-
- test/stripe/subscription_item_test.rb
|
215
|
-
- test/stripe/subscription_schedule_test.rb
|
216
|
-
- test/stripe/subscription_test.rb
|
217
|
-
- test/stripe/tax_id_test.rb
|
218
|
-
- test/stripe/tax_rate_test.rb
|
219
|
-
- test/stripe/terminal/connection_token_test.rb
|
220
|
-
- test/stripe/terminal/location_test.rb
|
221
|
-
- test/stripe/terminal/reader_test.rb
|
222
|
-
- test/stripe/three_d_secure_test.rb
|
223
|
-
- test/stripe/topup_test.rb
|
224
|
-
- test/stripe/transfer_test.rb
|
225
|
-
- test/stripe/usage_record_summary_test.rb
|
226
|
-
- test/stripe/util_test.rb
|
227
|
-
- test/stripe/webhook_endpoint_test.rb
|
228
|
-
- test/stripe/webhook_test.rb
|
229
|
-
- test/stripe_mock.rb
|
230
|
-
- test/stripe_test.rb
|
231
|
-
- test/test_data.rb
|
232
|
-
- test/test_helper.rb
|
233
|
-
homepage: https://stripe.com/docs/api/ruby
|
159
|
+
homepage: https://stripe.com/docs/api?lang=ruby
|
234
160
|
licenses:
|
235
161
|
- MIT
|
236
162
|
metadata:
|
237
163
|
bug_tracker_uri: https://github.com/stripe/stripe-ruby/issues
|
238
164
|
changelog_uri: https://github.com/stripe/stripe-ruby/blob/master/CHANGELOG.md
|
239
|
-
documentation_uri: https://stripe.com/docs/api
|
165
|
+
documentation_uri: https://stripe.com/docs/api?lang=ruby
|
240
166
|
github_repo: ssh://github.com/stripe/stripe-ruby
|
241
|
-
homepage_uri: https://stripe.com/docs/api
|
167
|
+
homepage_uri: https://stripe.com/docs/api?lang=ruby
|
242
168
|
source_code_uri: https://github.com/stripe/stripe-ruby
|
243
169
|
post_install_message:
|
244
170
|
rdoc_options: []
|
@@ -255,95 +181,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
255
181
|
- !ruby/object:Gem::Version
|
256
182
|
version: '0'
|
257
183
|
requirements: []
|
258
|
-
rubygems_version: 3.
|
184
|
+
rubygems_version: 3.3.7
|
259
185
|
signing_key:
|
260
186
|
specification_version: 4
|
261
187
|
summary: Ruby bindings for the Stripe API
|
262
|
-
test_files:
|
263
|
-
- test/openapi/README.md
|
264
|
-
- test/stripe/account_link_test.rb
|
265
|
-
- test/stripe/account_test.rb
|
266
|
-
- test/stripe/alipay_account_test.rb
|
267
|
-
- test/stripe/api_operations_test.rb
|
268
|
-
- test/stripe/api_resource_test.rb
|
269
|
-
- test/stripe/apple_pay_domain_test.rb
|
270
|
-
- test/stripe/application_fee_refund_test.rb
|
271
|
-
- test/stripe/application_fee_test.rb
|
272
|
-
- test/stripe/balance_test.rb
|
273
|
-
- test/stripe/balance_transaction_test.rb
|
274
|
-
- test/stripe/bank_account_test.rb
|
275
|
-
- test/stripe/billing_portal/session_test.rb
|
276
|
-
- test/stripe/capability_test.rb
|
277
|
-
- test/stripe/charge_test.rb
|
278
|
-
- test/stripe/checkout/session_test.rb
|
279
|
-
- test/stripe/connection_manager_test.rb
|
280
|
-
- test/stripe/country_spec_test.rb
|
281
|
-
- test/stripe/coupon_test.rb
|
282
|
-
- test/stripe/credit_note_test.rb
|
283
|
-
- test/stripe/customer_balance_transaction_test.rb
|
284
|
-
- test/stripe/customer_card_test.rb
|
285
|
-
- test/stripe/customer_test.rb
|
286
|
-
- test/stripe/dispute_test.rb
|
287
|
-
- test/stripe/ephemeral_key_test.rb
|
288
|
-
- test/stripe/errors_test.rb
|
289
|
-
- test/stripe/exchange_rate_test.rb
|
290
|
-
- test/stripe/file_link_test.rb
|
291
|
-
- test/stripe/file_test.rb
|
292
|
-
- test/stripe/instrumentation_test.rb
|
293
|
-
- test/stripe/invoice_item_test.rb
|
294
|
-
- test/stripe/invoice_line_item_test.rb
|
295
|
-
- test/stripe/invoice_test.rb
|
296
|
-
- test/stripe/issuing/authorization_test.rb
|
297
|
-
- test/stripe/issuing/card_test.rb
|
298
|
-
- test/stripe/issuing/cardholder_test.rb
|
299
|
-
- test/stripe/issuing/dispute_test.rb
|
300
|
-
- test/stripe/issuing/transaction_test.rb
|
301
|
-
- test/stripe/list_object_test.rb
|
302
|
-
- test/stripe/login_link_test.rb
|
303
|
-
- test/stripe/mandate_test.rb
|
304
|
-
- test/stripe/multipart_encoder_test.rb
|
305
|
-
- test/stripe/oauth_test.rb
|
306
|
-
- test/stripe/order_return_test.rb
|
307
|
-
- test/stripe/order_test.rb
|
308
|
-
- test/stripe/payment_intent_test.rb
|
309
|
-
- test/stripe/payment_method_test.rb
|
310
|
-
- test/stripe/payout_test.rb
|
311
|
-
- test/stripe/person_test.rb
|
312
|
-
- test/stripe/plan_test.rb
|
313
|
-
- test/stripe/price_test.rb
|
314
|
-
- test/stripe/product_test.rb
|
315
|
-
- test/stripe/radar/early_fraud_warning_test.rb
|
316
|
-
- test/stripe/radar/value_list_item_test.rb
|
317
|
-
- test/stripe/radar/value_list_test.rb
|
318
|
-
- test/stripe/recipient_test.rb
|
319
|
-
- test/stripe/refund_test.rb
|
320
|
-
- test/stripe/reporting/report_run_test.rb
|
321
|
-
- test/stripe/reporting/report_type_test.rb
|
322
|
-
- test/stripe/reversal_test.rb
|
323
|
-
- test/stripe/review_test.rb
|
324
|
-
- test/stripe/setup_intent_test.rb
|
325
|
-
- test/stripe/sigma/scheduled_query_run_test.rb
|
326
|
-
- test/stripe/sku_test.rb
|
327
|
-
- test/stripe/source_test.rb
|
328
|
-
- test/stripe/stripe_client_test.rb
|
329
|
-
- test/stripe/stripe_object_test.rb
|
330
|
-
- test/stripe/stripe_response_test.rb
|
331
|
-
- test/stripe/subscription_item_test.rb
|
332
|
-
- test/stripe/subscription_schedule_test.rb
|
333
|
-
- test/stripe/subscription_test.rb
|
334
|
-
- test/stripe/tax_id_test.rb
|
335
|
-
- test/stripe/tax_rate_test.rb
|
336
|
-
- test/stripe/terminal/connection_token_test.rb
|
337
|
-
- test/stripe/terminal/location_test.rb
|
338
|
-
- test/stripe/terminal/reader_test.rb
|
339
|
-
- test/stripe/three_d_secure_test.rb
|
340
|
-
- test/stripe/topup_test.rb
|
341
|
-
- test/stripe/transfer_test.rb
|
342
|
-
- test/stripe/usage_record_summary_test.rb
|
343
|
-
- test/stripe/util_test.rb
|
344
|
-
- test/stripe/webhook_endpoint_test.rb
|
345
|
-
- test/stripe/webhook_test.rb
|
346
|
-
- test/stripe_mock.rb
|
347
|
-
- test/stripe_test.rb
|
348
|
-
- test/test_data.rb
|
349
|
-
- test/test_helper.rb
|
188
|
+
test_files: []
|
data/.editorconfig
DELETED
data/.gitattributes
DELETED
data/.github/ISSUE_TEMPLATE.md
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
Please only file issues here that you believe represent actual bugs or feature requests for the Stripe Ruby library.
|
2
|
-
|
3
|
-
If you're having general trouble with your Stripe integration, please reach out to support using the form at https://support.stripe.com/ (preferred) or via email to support@stripe.com.
|
4
|
-
|
5
|
-
If you are reporting a bug, please include your Ruby version and the version of the Stripe Ruby library you're using, as well as any other details that may be helpful in reproducing the problem.
|