stripe 5.1.0 → 5.55.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (224) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +241 -17
  3. data/CODE_OF_CONDUCT.md +77 -0
  4. data/Gemfile +9 -5
  5. data/Makefile +7 -0
  6. data/README.md +105 -37
  7. data/VERSION +1 -1
  8. data/lib/stripe/api_operations/create.rb +1 -1
  9. data/lib/stripe/api_operations/delete.rb +7 -3
  10. data/lib/stripe/api_operations/list.rb +1 -6
  11. data/lib/stripe/api_operations/nested_resource.rb +29 -26
  12. data/lib/stripe/api_operations/request.rb +82 -6
  13. data/lib/stripe/api_operations/save.rb +7 -4
  14. data/lib/stripe/api_operations/search.rb +19 -0
  15. data/lib/stripe/api_resource.rb +13 -19
  16. data/lib/stripe/api_resource_test_helpers.rb +47 -0
  17. data/lib/stripe/connection_manager.rb +85 -26
  18. data/lib/stripe/error_object.rb +2 -3
  19. data/lib/stripe/errors.rb +9 -1
  20. data/lib/stripe/instrumentation.rb +84 -0
  21. data/lib/stripe/list_object.rb +32 -4
  22. data/lib/stripe/oauth.rb +8 -6
  23. data/lib/stripe/object_types.rb +26 -1
  24. data/lib/stripe/resources/account.rb +5 -9
  25. data/lib/stripe/resources/account_link.rb +1 -0
  26. data/lib/stripe/resources/apple_pay_domain.rb +1 -0
  27. data/lib/stripe/resources/application_fee.rb +1 -0
  28. data/lib/stripe/resources/application_fee_refund.rb +2 -1
  29. data/lib/stripe/resources/balance.rb +1 -0
  30. data/lib/stripe/resources/balance_transaction.rb +1 -0
  31. data/lib/stripe/resources/bank_account.rb +2 -1
  32. data/lib/stripe/resources/billing_portal/configuration.rb +14 -0
  33. data/lib/stripe/resources/billing_portal/session.rb +12 -0
  34. data/lib/stripe/resources/bitcoin_receiver.rb +1 -0
  35. data/lib/stripe/resources/bitcoin_transaction.rb +3 -2
  36. data/lib/stripe/resources/capability.rb +2 -1
  37. data/lib/stripe/resources/card.rb +1 -0
  38. data/lib/stripe/resources/cash_balance.rb +22 -0
  39. data/lib/stripe/resources/charge.rb +10 -0
  40. data/lib/stripe/resources/checkout/session.rb +16 -0
  41. data/lib/stripe/resources/country_spec.rb +1 -0
  42. data/lib/stripe/resources/coupon.rb +1 -0
  43. data/lib/stripe/resources/credit_note.rb +11 -0
  44. data/lib/stripe/resources/credit_note_line_item.rb +8 -0
  45. data/lib/stripe/resources/customer.rb +41 -2
  46. data/lib/stripe/resources/customer_balance_transaction.rb +3 -2
  47. data/lib/stripe/resources/discount.rb +1 -0
  48. data/lib/stripe/resources/dispute.rb +1 -0
  49. data/lib/stripe/resources/ephemeral_key.rb +1 -0
  50. data/lib/stripe/resources/event.rb +1 -0
  51. data/lib/stripe/resources/exchange_rate.rb +1 -0
  52. data/lib/stripe/resources/file.rb +3 -1
  53. data/lib/stripe/resources/file_link.rb +1 -0
  54. data/lib/stripe/resources/financial_connections/account.rb +31 -0
  55. data/lib/stripe/resources/financial_connections/account_owner.rb +10 -0
  56. data/lib/stripe/resources/financial_connections/account_ownership.rb +10 -0
  57. data/lib/stripe/resources/financial_connections/session.rb +12 -0
  58. data/lib/stripe/resources/funding_instructions.rb +16 -0
  59. data/lib/stripe/resources/identity/verification_report.rb +12 -0
  60. data/lib/stripe/resources/identity/verification_session.rb +35 -0
  61. data/lib/stripe/resources/invoice.rb +12 -2
  62. data/lib/stripe/resources/invoice_item.rb +1 -0
  63. data/lib/stripe/resources/invoice_line_item.rb +1 -0
  64. data/lib/stripe/resources/issuing/authorization.rb +1 -0
  65. data/lib/stripe/resources/issuing/card.rb +1 -0
  66. data/lib/stripe/resources/issuing/card_details.rb +2 -1
  67. data/lib/stripe/resources/issuing/cardholder.rb +1 -0
  68. data/lib/stripe/resources/issuing/dispute.rb +12 -0
  69. data/lib/stripe/resources/issuing/transaction.rb +1 -0
  70. data/lib/stripe/resources/line_item.rb +8 -0
  71. data/lib/stripe/resources/login_link.rb +1 -0
  72. data/lib/stripe/resources/mandate.rb +8 -0
  73. data/lib/stripe/resources/order.rb +1 -0
  74. data/lib/stripe/resources/order_return.rb +1 -0
  75. data/lib/stripe/resources/payment_intent.rb +40 -0
  76. data/lib/stripe/resources/payment_link.rb +23 -0
  77. data/lib/stripe/resources/payment_method.rb +1 -0
  78. data/lib/stripe/resources/payout.rb +11 -0
  79. data/lib/stripe/resources/person.rb +1 -0
  80. data/lib/stripe/resources/plan.rb +1 -0
  81. data/lib/stripe/resources/price.rb +21 -0
  82. data/lib/stripe/resources/product.rb +10 -0
  83. data/lib/stripe/resources/promotion_code.rb +12 -0
  84. data/lib/stripe/resources/quote.rb +105 -0
  85. data/lib/stripe/resources/radar/early_fraud_warning.rb +1 -0
  86. data/lib/stripe/resources/radar/value_list.rb +1 -0
  87. data/lib/stripe/resources/radar/value_list_item.rb +1 -0
  88. data/lib/stripe/resources/recipient.rb +1 -0
  89. data/lib/stripe/resources/refund.rb +31 -0
  90. data/lib/stripe/resources/reporting/report_run.rb +1 -0
  91. data/lib/stripe/resources/reporting/report_type.rb +1 -0
  92. data/lib/stripe/resources/reversal.rb +3 -2
  93. data/lib/stripe/resources/review.rb +1 -0
  94. data/lib/stripe/resources/setup_attempt.rb +10 -0
  95. data/lib/stripe/resources/setup_intent.rb +11 -0
  96. data/lib/stripe/resources/shipping_rate.rb +12 -0
  97. data/lib/stripe/resources/sigma/scheduled_query_run.rb +1 -0
  98. data/lib/stripe/resources/sku.rb +1 -0
  99. data/lib/stripe/resources/source.rb +10 -3
  100. data/lib/stripe/resources/source_transaction.rb +1 -0
  101. data/lib/stripe/resources/subscription.rb +10 -0
  102. data/lib/stripe/resources/subscription_item.rb +7 -1
  103. data/lib/stripe/resources/subscription_schedule.rb +1 -0
  104. data/lib/stripe/resources/tax_code.rb +10 -0
  105. data/lib/stripe/resources/tax_id.rb +1 -0
  106. data/lib/stripe/resources/tax_rate.rb +1 -0
  107. data/lib/stripe/resources/terminal/configuration.rb +15 -0
  108. data/lib/stripe/resources/terminal/connection_token.rb +1 -0
  109. data/lib/stripe/resources/terminal/location.rb +1 -0
  110. data/lib/stripe/resources/terminal/reader.rb +61 -0
  111. data/lib/stripe/resources/test_helpers/test_clock.rb +25 -0
  112. data/lib/stripe/resources/three_d_secure.rb +1 -0
  113. data/lib/stripe/resources/token.rb +1 -0
  114. data/lib/stripe/resources/topup.rb +1 -0
  115. data/lib/stripe/resources/transfer.rb +1 -0
  116. data/lib/stripe/resources/usage_record.rb +1 -0
  117. data/lib/stripe/resources/usage_record_summary.rb +1 -0
  118. data/lib/stripe/resources/webhook_endpoint.rb +1 -0
  119. data/lib/stripe/resources.rb +23 -0
  120. data/lib/stripe/search_result_object.rb +86 -0
  121. data/lib/stripe/stripe_client.rb +412 -146
  122. data/lib/stripe/stripe_configuration.rb +194 -0
  123. data/lib/stripe/stripe_object.rb +26 -2
  124. data/lib/stripe/stripe_response.rb +80 -52
  125. data/lib/stripe/util.rb +74 -7
  126. data/lib/stripe/version.rb +1 -1
  127. data/lib/stripe/webhook.rb +38 -7
  128. data/lib/stripe.rb +39 -168
  129. data/stripe.gemspec +12 -5
  130. metadata +36 -186
  131. data/.editorconfig +0 -10
  132. data/.gitattributes +0 -4
  133. data/.github/ISSUE_TEMPLATE.md +0 -5
  134. data/.gitignore +0 -8
  135. data/.rubocop.yml +0 -56
  136. data/.rubocop_todo.yml +0 -39
  137. data/.travis.yml +0 -39
  138. data/.vscode/extensions.json +0 -7
  139. data/.vscode/settings.json +0 -8
  140. data/test/api_stub_helpers.rb +0 -1
  141. data/test/openapi/README.md +0 -9
  142. data/test/stripe/account_link_test.rb +0 -18
  143. data/test/stripe/account_test.rb +0 -412
  144. data/test/stripe/alipay_account_test.rb +0 -37
  145. data/test/stripe/api_operations_test.rb +0 -80
  146. data/test/stripe/api_resource_test.rb +0 -613
  147. data/test/stripe/apple_pay_domain_test.rb +0 -46
  148. data/test/stripe/application_fee_refund_test.rb +0 -37
  149. data/test/stripe/application_fee_test.rb +0 -58
  150. data/test/stripe/balance_test.rb +0 -13
  151. data/test/stripe/balance_transaction_test.rb +0 -20
  152. data/test/stripe/bank_account_test.rb +0 -36
  153. data/test/stripe/capability_test.rb +0 -45
  154. data/test/stripe/charge_test.rb +0 -64
  155. data/test/stripe/checkout/session_test.rb +0 -41
  156. data/test/stripe/connection_manager_test.rb +0 -138
  157. data/test/stripe/country_spec_test.rb +0 -20
  158. data/test/stripe/coupon_test.rb +0 -61
  159. data/test/stripe/credit_note_test.rb +0 -61
  160. data/test/stripe/customer_balance_transaction_test.rb +0 -37
  161. data/test/stripe/customer_card_test.rb +0 -42
  162. data/test/stripe/customer_test.rb +0 -226
  163. data/test/stripe/dispute_test.rb +0 -51
  164. data/test/stripe/ephemeral_key_test.rb +0 -93
  165. data/test/stripe/errors_test.rb +0 -41
  166. data/test/stripe/exchange_rate_test.rb +0 -20
  167. data/test/stripe/file_link_test.rb +0 -41
  168. data/test/stripe/file_test.rb +0 -87
  169. data/test/stripe/invoice_item_test.rb +0 -66
  170. data/test/stripe/invoice_line_item_test.rb +0 -8
  171. data/test/stripe/invoice_test.rb +0 -229
  172. data/test/stripe/issuing/authorization_test.rb +0 -72
  173. data/test/stripe/issuing/card_test.rb +0 -62
  174. data/test/stripe/issuing/cardholder_test.rb +0 -53
  175. data/test/stripe/issuing/dispute_test.rb +0 -45
  176. data/test/stripe/issuing/transaction_test.rb +0 -48
  177. data/test/stripe/list_object_test.rb +0 -140
  178. data/test/stripe/login_link_test.rb +0 -37
  179. data/test/stripe/multipart_encoder_test.rb +0 -130
  180. data/test/stripe/oauth_test.rb +0 -88
  181. data/test/stripe/order_return_test.rb +0 -21
  182. data/test/stripe/order_test.rb +0 -82
  183. data/test/stripe/payment_intent_test.rb +0 -107
  184. data/test/stripe/payment_method_test.rb +0 -84
  185. data/test/stripe/payout_test.rb +0 -57
  186. data/test/stripe/person_test.rb +0 -46
  187. data/test/stripe/plan_test.rb +0 -98
  188. data/test/stripe/product_test.rb +0 -59
  189. data/test/stripe/radar/early_fraud_warning_test.rb +0 -22
  190. data/test/stripe/radar/value_list_item_test.rb +0 -48
  191. data/test/stripe/radar/value_list_test.rb +0 -61
  192. data/test/stripe/recipient_test.rb +0 -62
  193. data/test/stripe/refund_test.rb +0 -39
  194. data/test/stripe/reporting/report_run_test.rb +0 -33
  195. data/test/stripe/reporting/report_type_test.rb +0 -22
  196. data/test/stripe/reversal_test.rb +0 -43
  197. data/test/stripe/review_test.rb +0 -27
  198. data/test/stripe/setup_intent_test.rb +0 -84
  199. data/test/stripe/sigma/scheduled_query_run_test.rb +0 -22
  200. data/test/stripe/sku_test.rb +0 -60
  201. data/test/stripe/source_test.rb +0 -81
  202. data/test/stripe/source_transaction_test.rb +0 -19
  203. data/test/stripe/stripe_client_test.rb +0 -1039
  204. data/test/stripe/stripe_object_test.rb +0 -497
  205. data/test/stripe/stripe_response_test.rb +0 -95
  206. data/test/stripe/subscription_item_test.rb +0 -75
  207. data/test/stripe/subscription_schedule_test.rb +0 -82
  208. data/test/stripe/subscription_test.rb +0 -80
  209. data/test/stripe/tax_id_test.rb +0 -31
  210. data/test/stripe/tax_rate_test.rb +0 -43
  211. data/test/stripe/terminal/connection_token_test.rb +0 -16
  212. data/test/stripe/terminal/location_test.rb +0 -68
  213. data/test/stripe/terminal/reader_test.rb +0 -62
  214. data/test/stripe/three_d_secure_test.rb +0 -23
  215. data/test/stripe/topup_test.rb +0 -62
  216. data/test/stripe/transfer_test.rb +0 -88
  217. data/test/stripe/usage_record_summary_test.rb +0 -19
  218. data/test/stripe/util_test.rb +0 -402
  219. data/test/stripe/webhook_endpoint_test.rb +0 -59
  220. data/test/stripe/webhook_test.rb +0 -96
  221. data/test/stripe_mock.rb +0 -78
  222. data/test/stripe_test.rb +0 -50
  223. data/test/test_data.rb +0 -61
  224. data/test/test_helper.rb +0 -76
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
- @app_info = nil
52
-
53
- @api_base = "https://api.stripe.com"
54
- @connect_base = "https://connect.stripe.com"
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
- @open_timeout = 30
71
- @read_timeout = 80
61
+ @app_info = nil
72
62
 
73
- @enable_telemetry = true
63
+ @config = Stripe::StripeConfiguration.setup
74
64
 
75
65
  class << self
76
- attr_accessor :api_key
77
- attr_accessor :api_version
78
- attr_accessor :client_id
79
- attr_accessor :stripe_account
80
-
81
- # These all get manual attribute writers so that we can reset connections
82
- # if they change.
83
- attr_reader :api_base
84
- attr_reader :connect_base
85
- attr_reader :open_timeout
86
- attr_reader :proxy
87
- attr_reader :read_timeout
88
- attr_reader :uploads_base
89
- attr_reader :verify_ssl_certs
90
-
91
- attr_reader :max_network_retry_delay, :initial_network_retry_delay
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.connection_base=(connection_base)
143
- @connection_base = connection_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 partner program ID, plugin URL, and version.
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/ruby"
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/ruby",
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/ruby",
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
- s.files = `git ls-files`.split("\n")
30
- s.test_files = `git ls-files -- test/*`.split("\n")
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.1.0
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: 2019-08-27 00:00:00.000000000 Z
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,20 +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
22
+ - CODE_OF_CONDUCT.md
31
23
  - CONTRIBUTORS
32
24
  - Gemfile
33
25
  - History.txt
34
26
  - LICENSE
27
+ - Makefile
35
28
  - README.md
36
29
  - Rakefile
37
30
  - VERSION
@@ -44,10 +37,13 @@ files:
44
37
  - lib/stripe/api_operations/nested_resource.rb
45
38
  - lib/stripe/api_operations/request.rb
46
39
  - lib/stripe/api_operations/save.rb
40
+ - lib/stripe/api_operations/search.rb
47
41
  - lib/stripe/api_resource.rb
42
+ - lib/stripe/api_resource_test_helpers.rb
48
43
  - lib/stripe/connection_manager.rb
49
44
  - lib/stripe/error_object.rb
50
45
  - lib/stripe/errors.rb
46
+ - lib/stripe/instrumentation.rb
51
47
  - lib/stripe/list_object.rb
52
48
  - lib/stripe/multipart_encoder.rb
53
49
  - lib/stripe/oauth.rb
@@ -62,15 +58,19 @@ files:
62
58
  - lib/stripe/resources/balance.rb
63
59
  - lib/stripe/resources/balance_transaction.rb
64
60
  - lib/stripe/resources/bank_account.rb
61
+ - lib/stripe/resources/billing_portal/configuration.rb
62
+ - lib/stripe/resources/billing_portal/session.rb
65
63
  - lib/stripe/resources/bitcoin_receiver.rb
66
64
  - lib/stripe/resources/bitcoin_transaction.rb
67
65
  - lib/stripe/resources/capability.rb
68
66
  - lib/stripe/resources/card.rb
67
+ - lib/stripe/resources/cash_balance.rb
69
68
  - lib/stripe/resources/charge.rb
70
69
  - lib/stripe/resources/checkout/session.rb
71
70
  - lib/stripe/resources/country_spec.rb
72
71
  - lib/stripe/resources/coupon.rb
73
72
  - lib/stripe/resources/credit_note.rb
73
+ - lib/stripe/resources/credit_note_line_item.rb
74
74
  - lib/stripe/resources/customer.rb
75
75
  - lib/stripe/resources/customer_balance_transaction.rb
76
76
  - lib/stripe/resources/discount.rb
@@ -80,6 +80,13 @@ files:
80
80
  - lib/stripe/resources/exchange_rate.rb
81
81
  - lib/stripe/resources/file.rb
82
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
83
90
  - lib/stripe/resources/invoice.rb
84
91
  - lib/stripe/resources/invoice_item.rb
85
92
  - lib/stripe/resources/invoice_line_item.rb
@@ -89,15 +96,21 @@ files:
89
96
  - lib/stripe/resources/issuing/cardholder.rb
90
97
  - lib/stripe/resources/issuing/dispute.rb
91
98
  - lib/stripe/resources/issuing/transaction.rb
99
+ - lib/stripe/resources/line_item.rb
92
100
  - lib/stripe/resources/login_link.rb
101
+ - lib/stripe/resources/mandate.rb
93
102
  - lib/stripe/resources/order.rb
94
103
  - lib/stripe/resources/order_return.rb
95
104
  - lib/stripe/resources/payment_intent.rb
105
+ - lib/stripe/resources/payment_link.rb
96
106
  - lib/stripe/resources/payment_method.rb
97
107
  - lib/stripe/resources/payout.rb
98
108
  - lib/stripe/resources/person.rb
99
109
  - lib/stripe/resources/plan.rb
110
+ - lib/stripe/resources/price.rb
100
111
  - lib/stripe/resources/product.rb
112
+ - lib/stripe/resources/promotion_code.rb
113
+ - lib/stripe/resources/quote.rb
101
114
  - lib/stripe/resources/radar/early_fraud_warning.rb
102
115
  - lib/stripe/resources/radar/value_list.rb
103
116
  - lib/stripe/resources/radar/value_list_item.rb
@@ -108,7 +121,9 @@ files:
108
121
  - lib/stripe/resources/reporting/report_type.rb
109
122
  - lib/stripe/resources/reversal.rb
110
123
  - lib/stripe/resources/review.rb
124
+ - lib/stripe/resources/setup_attempt.rb
111
125
  - lib/stripe/resources/setup_intent.rb
126
+ - lib/stripe/resources/shipping_rate.rb
112
127
  - lib/stripe/resources/sigma/scheduled_query_run.rb
113
128
  - lib/stripe/resources/sku.rb
114
129
  - lib/stripe/resources/source.rb
@@ -116,11 +131,14 @@ files:
116
131
  - lib/stripe/resources/subscription.rb
117
132
  - lib/stripe/resources/subscription_item.rb
118
133
  - lib/stripe/resources/subscription_schedule.rb
134
+ - lib/stripe/resources/tax_code.rb
119
135
  - lib/stripe/resources/tax_id.rb
120
136
  - lib/stripe/resources/tax_rate.rb
137
+ - lib/stripe/resources/terminal/configuration.rb
121
138
  - lib/stripe/resources/terminal/connection_token.rb
122
139
  - lib/stripe/resources/terminal/location.rb
123
140
  - lib/stripe/resources/terminal/reader.rb
141
+ - lib/stripe/resources/test_helpers/test_clock.rb
124
142
  - lib/stripe/resources/three_d_secure.rb
125
143
  - lib/stripe/resources/token.rb
126
144
  - lib/stripe/resources/topup.rb
@@ -128,108 +146,25 @@ files:
128
146
  - lib/stripe/resources/usage_record.rb
129
147
  - lib/stripe/resources/usage_record_summary.rb
130
148
  - lib/stripe/resources/webhook_endpoint.rb
149
+ - lib/stripe/search_result_object.rb
131
150
  - lib/stripe/singleton_api_resource.rb
132
151
  - lib/stripe/stripe_client.rb
152
+ - lib/stripe/stripe_configuration.rb
133
153
  - lib/stripe/stripe_object.rb
134
154
  - lib/stripe/stripe_response.rb
135
155
  - lib/stripe/util.rb
136
156
  - lib/stripe/version.rb
137
157
  - lib/stripe/webhook.rb
138
158
  - stripe.gemspec
139
- - test/api_stub_helpers.rb
140
- - test/openapi/README.md
141
- - test/stripe/account_link_test.rb
142
- - test/stripe/account_test.rb
143
- - test/stripe/alipay_account_test.rb
144
- - test/stripe/api_operations_test.rb
145
- - test/stripe/api_resource_test.rb
146
- - test/stripe/apple_pay_domain_test.rb
147
- - test/stripe/application_fee_refund_test.rb
148
- - test/stripe/application_fee_test.rb
149
- - test/stripe/balance_test.rb
150
- - test/stripe/balance_transaction_test.rb
151
- - test/stripe/bank_account_test.rb
152
- - test/stripe/capability_test.rb
153
- - test/stripe/charge_test.rb
154
- - test/stripe/checkout/session_test.rb
155
- - test/stripe/connection_manager_test.rb
156
- - test/stripe/country_spec_test.rb
157
- - test/stripe/coupon_test.rb
158
- - test/stripe/credit_note_test.rb
159
- - test/stripe/customer_balance_transaction_test.rb
160
- - test/stripe/customer_card_test.rb
161
- - test/stripe/customer_test.rb
162
- - test/stripe/dispute_test.rb
163
- - test/stripe/ephemeral_key_test.rb
164
- - test/stripe/errors_test.rb
165
- - test/stripe/exchange_rate_test.rb
166
- - test/stripe/file_link_test.rb
167
- - test/stripe/file_test.rb
168
- - test/stripe/invoice_item_test.rb
169
- - test/stripe/invoice_line_item_test.rb
170
- - test/stripe/invoice_test.rb
171
- - test/stripe/issuing/authorization_test.rb
172
- - test/stripe/issuing/card_test.rb
173
- - test/stripe/issuing/cardholder_test.rb
174
- - test/stripe/issuing/dispute_test.rb
175
- - test/stripe/issuing/transaction_test.rb
176
- - test/stripe/list_object_test.rb
177
- - test/stripe/login_link_test.rb
178
- - test/stripe/multipart_encoder_test.rb
179
- - test/stripe/oauth_test.rb
180
- - test/stripe/order_return_test.rb
181
- - test/stripe/order_test.rb
182
- - test/stripe/payment_intent_test.rb
183
- - test/stripe/payment_method_test.rb
184
- - test/stripe/payout_test.rb
185
- - test/stripe/person_test.rb
186
- - test/stripe/plan_test.rb
187
- - test/stripe/product_test.rb
188
- - test/stripe/radar/early_fraud_warning_test.rb
189
- - test/stripe/radar/value_list_item_test.rb
190
- - test/stripe/radar/value_list_test.rb
191
- - test/stripe/recipient_test.rb
192
- - test/stripe/refund_test.rb
193
- - test/stripe/reporting/report_run_test.rb
194
- - test/stripe/reporting/report_type_test.rb
195
- - test/stripe/reversal_test.rb
196
- - test/stripe/review_test.rb
197
- - test/stripe/setup_intent_test.rb
198
- - test/stripe/sigma/scheduled_query_run_test.rb
199
- - test/stripe/sku_test.rb
200
- - test/stripe/source_test.rb
201
- - test/stripe/source_transaction_test.rb
202
- - test/stripe/stripe_client_test.rb
203
- - test/stripe/stripe_object_test.rb
204
- - test/stripe/stripe_response_test.rb
205
- - test/stripe/subscription_item_test.rb
206
- - test/stripe/subscription_schedule_test.rb
207
- - test/stripe/subscription_test.rb
208
- - test/stripe/tax_id_test.rb
209
- - test/stripe/tax_rate_test.rb
210
- - test/stripe/terminal/connection_token_test.rb
211
- - test/stripe/terminal/location_test.rb
212
- - test/stripe/terminal/reader_test.rb
213
- - test/stripe/three_d_secure_test.rb
214
- - test/stripe/topup_test.rb
215
- - test/stripe/transfer_test.rb
216
- - test/stripe/usage_record_summary_test.rb
217
- - test/stripe/util_test.rb
218
- - test/stripe/webhook_endpoint_test.rb
219
- - test/stripe/webhook_test.rb
220
- - test/stripe_mock.rb
221
- - test/stripe_test.rb
222
- - test/test_data.rb
223
- - test/test_helper.rb
224
- homepage: https://stripe.com/docs/api/ruby
159
+ homepage: https://stripe.com/docs/api?lang=ruby
225
160
  licenses:
226
161
  - MIT
227
162
  metadata:
228
163
  bug_tracker_uri: https://github.com/stripe/stripe-ruby/issues
229
164
  changelog_uri: https://github.com/stripe/stripe-ruby/blob/master/CHANGELOG.md
230
- documentation_uri: https://stripe.com/docs/api/ruby
165
+ documentation_uri: https://stripe.com/docs/api?lang=ruby
231
166
  github_repo: ssh://github.com/stripe/stripe-ruby
232
- homepage_uri: https://stripe.com/docs/api/ruby
167
+ homepage_uri: https://stripe.com/docs/api?lang=ruby
233
168
  source_code_uri: https://github.com/stripe/stripe-ruby
234
169
  post_install_message:
235
170
  rdoc_options: []
@@ -246,93 +181,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
246
181
  - !ruby/object:Gem::Version
247
182
  version: '0'
248
183
  requirements: []
249
- rubygems_version: 3.0.3
184
+ rubygems_version: 3.3.7
250
185
  signing_key:
251
186
  specification_version: 4
252
187
  summary: Ruby bindings for the Stripe API
253
- test_files:
254
- - test/api_stub_helpers.rb
255
- - test/openapi/README.md
256
- - test/stripe/account_link_test.rb
257
- - test/stripe/account_test.rb
258
- - test/stripe/alipay_account_test.rb
259
- - test/stripe/api_operations_test.rb
260
- - test/stripe/api_resource_test.rb
261
- - test/stripe/apple_pay_domain_test.rb
262
- - test/stripe/application_fee_refund_test.rb
263
- - test/stripe/application_fee_test.rb
264
- - test/stripe/balance_test.rb
265
- - test/stripe/balance_transaction_test.rb
266
- - test/stripe/bank_account_test.rb
267
- - test/stripe/capability_test.rb
268
- - test/stripe/charge_test.rb
269
- - test/stripe/checkout/session_test.rb
270
- - test/stripe/connection_manager_test.rb
271
- - test/stripe/country_spec_test.rb
272
- - test/stripe/coupon_test.rb
273
- - test/stripe/credit_note_test.rb
274
- - test/stripe/customer_balance_transaction_test.rb
275
- - test/stripe/customer_card_test.rb
276
- - test/stripe/customer_test.rb
277
- - test/stripe/dispute_test.rb
278
- - test/stripe/ephemeral_key_test.rb
279
- - test/stripe/errors_test.rb
280
- - test/stripe/exchange_rate_test.rb
281
- - test/stripe/file_link_test.rb
282
- - test/stripe/file_test.rb
283
- - test/stripe/invoice_item_test.rb
284
- - test/stripe/invoice_line_item_test.rb
285
- - test/stripe/invoice_test.rb
286
- - test/stripe/issuing/authorization_test.rb
287
- - test/stripe/issuing/card_test.rb
288
- - test/stripe/issuing/cardholder_test.rb
289
- - test/stripe/issuing/dispute_test.rb
290
- - test/stripe/issuing/transaction_test.rb
291
- - test/stripe/list_object_test.rb
292
- - test/stripe/login_link_test.rb
293
- - test/stripe/multipart_encoder_test.rb
294
- - test/stripe/oauth_test.rb
295
- - test/stripe/order_return_test.rb
296
- - test/stripe/order_test.rb
297
- - test/stripe/payment_intent_test.rb
298
- - test/stripe/payment_method_test.rb
299
- - test/stripe/payout_test.rb
300
- - test/stripe/person_test.rb
301
- - test/stripe/plan_test.rb
302
- - test/stripe/product_test.rb
303
- - test/stripe/radar/early_fraud_warning_test.rb
304
- - test/stripe/radar/value_list_item_test.rb
305
- - test/stripe/radar/value_list_test.rb
306
- - test/stripe/recipient_test.rb
307
- - test/stripe/refund_test.rb
308
- - test/stripe/reporting/report_run_test.rb
309
- - test/stripe/reporting/report_type_test.rb
310
- - test/stripe/reversal_test.rb
311
- - test/stripe/review_test.rb
312
- - test/stripe/setup_intent_test.rb
313
- - test/stripe/sigma/scheduled_query_run_test.rb
314
- - test/stripe/sku_test.rb
315
- - test/stripe/source_test.rb
316
- - test/stripe/source_transaction_test.rb
317
- - test/stripe/stripe_client_test.rb
318
- - test/stripe/stripe_object_test.rb
319
- - test/stripe/stripe_response_test.rb
320
- - test/stripe/subscription_item_test.rb
321
- - test/stripe/subscription_schedule_test.rb
322
- - test/stripe/subscription_test.rb
323
- - test/stripe/tax_id_test.rb
324
- - test/stripe/tax_rate_test.rb
325
- - test/stripe/terminal/connection_token_test.rb
326
- - test/stripe/terminal/location_test.rb
327
- - test/stripe/terminal/reader_test.rb
328
- - test/stripe/three_d_secure_test.rb
329
- - test/stripe/topup_test.rb
330
- - test/stripe/transfer_test.rb
331
- - test/stripe/usage_record_summary_test.rb
332
- - test/stripe/util_test.rb
333
- - test/stripe/webhook_endpoint_test.rb
334
- - test/stripe/webhook_test.rb
335
- - test/stripe_mock.rb
336
- - test/stripe_test.rb
337
- - test/test_data.rb
338
- - test/test_helper.rb
188
+ test_files: []
data/.editorconfig DELETED
@@ -1,10 +0,0 @@
1
- # see http://editorconfig.org/
2
-
3
- root = true
4
-
5
- [*]
6
- indent_style = space
7
- indent_size = 2
8
- end_of_line = lf
9
- charset = utf-8
10
- insert_final_newline = true
data/.gitattributes DELETED
@@ -1,4 +0,0 @@
1
- # may be useful in hiding large schema changes in pull request diffs (but not
2
- # using it for now)
3
- spec/*.json binary
4
- spec/*.yaml binary
@@ -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.
data/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- /stripe-*.gem
2
- /Gemfile.lock
3
- .rvmrc
4
- Gemfile.lock
5
- tags
6
- /.bundle/
7
- coverage/
8
- .idea/