stripe 5.28.0 → 5.38.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +46 -0
  3. data/Gemfile +0 -1
  4. data/README.md +5 -1
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_operations/request.rb +35 -2
  7. data/lib/stripe/api_resource.rb +8 -0
  8. data/lib/stripe/connection_manager.rb +27 -10
  9. data/lib/stripe/error_object.rb +2 -3
  10. data/lib/stripe/instrumentation.rb +3 -1
  11. data/lib/stripe/oauth.rb +4 -3
  12. data/lib/stripe/object_types.rb +7 -1
  13. data/lib/stripe/resources/account.rb +3 -8
  14. data/lib/stripe/resources/application_fee_refund.rb +2 -1
  15. data/lib/stripe/resources/billing_portal/configuration.rb +14 -0
  16. data/lib/stripe/resources/bitcoin_transaction.rb +3 -2
  17. data/lib/stripe/resources/capability.rb +2 -1
  18. data/lib/stripe/resources/credit_note_line_item.rb +1 -0
  19. data/lib/stripe/resources/customer.rb +6 -1
  20. data/lib/stripe/resources/customer_balance_transaction.rb +3 -2
  21. data/lib/stripe/resources/file.rb +2 -1
  22. data/lib/stripe/resources/identity/verification_report.rb +12 -0
  23. data/lib/stripe/resources/identity/verification_session.rb +35 -0
  24. data/lib/stripe/resources/invoice_line_item.rb +1 -0
  25. data/lib/stripe/resources/line_item.rb +1 -0
  26. data/lib/stripe/resources/login_link.rb +1 -0
  27. data/lib/stripe/resources/person.rb +1 -0
  28. data/lib/stripe/resources/quote.rb +105 -0
  29. data/lib/stripe/resources/reversal.rb +3 -2
  30. data/lib/stripe/resources/tax_code.rb +10 -0
  31. data/lib/stripe/resources/tax_id.rb +1 -0
  32. data/lib/stripe/resources/usage_record.rb +1 -0
  33. data/lib/stripe/resources/usage_record_summary.rb +1 -0
  34. data/lib/stripe/resources.rb +6 -0
  35. data/lib/stripe/stripe_client.rb +242 -111
  36. data/lib/stripe/stripe_configuration.rb +25 -9
  37. data/lib/stripe/stripe_object.rb +23 -0
  38. data/lib/stripe/stripe_response.rb +80 -52
  39. data/lib/stripe/util.rb +15 -7
  40. data/lib/stripe/version.rb +1 -1
  41. data/lib/stripe.rb +23 -22
  42. data/stripe.gemspec +9 -2
  43. metadata +8 -192
  44. data/.editorconfig +0 -10
  45. data/.gitattributes +0 -4
  46. data/.github/ISSUE_TEMPLATE.md +0 -5
  47. data/.gitignore +0 -8
  48. data/.rubocop.yml +0 -80
  49. data/.rubocop_todo.yml +0 -33
  50. data/.travis.yml +0 -38
  51. data/.vscode/extensions.json +0 -7
  52. data/.vscode/settings.json +0 -8
  53. data/test/openapi/README.md +0 -9
  54. data/test/stripe/account_link_test.rb +0 -18
  55. data/test/stripe/account_test.rb +0 -412
  56. data/test/stripe/alipay_account_test.rb +0 -37
  57. data/test/stripe/api_operations_test.rb +0 -80
  58. data/test/stripe/api_resource_test.rb +0 -646
  59. data/test/stripe/apple_pay_domain_test.rb +0 -46
  60. data/test/stripe/application_fee_refund_test.rb +0 -37
  61. data/test/stripe/application_fee_test.rb +0 -58
  62. data/test/stripe/balance_test.rb +0 -13
  63. data/test/stripe/balance_transaction_test.rb +0 -20
  64. data/test/stripe/bank_account_test.rb +0 -36
  65. data/test/stripe/billing_portal/session_test.rb +0 -18
  66. data/test/stripe/capability_test.rb +0 -45
  67. data/test/stripe/charge_test.rb +0 -64
  68. data/test/stripe/checkout/session_test.rb +0 -53
  69. data/test/stripe/connection_manager_test.rb +0 -167
  70. data/test/stripe/country_spec_test.rb +0 -20
  71. data/test/stripe/coupon_test.rb +0 -61
  72. data/test/stripe/credit_note_test.rb +0 -90
  73. data/test/stripe/customer_balance_transaction_test.rb +0 -37
  74. data/test/stripe/customer_card_test.rb +0 -48
  75. data/test/stripe/customer_test.rb +0 -226
  76. data/test/stripe/dispute_test.rb +0 -51
  77. data/test/stripe/ephemeral_key_test.rb +0 -93
  78. data/test/stripe/errors_test.rb +0 -53
  79. data/test/stripe/exchange_rate_test.rb +0 -20
  80. data/test/stripe/file_link_test.rb +0 -41
  81. data/test/stripe/file_test.rb +0 -87
  82. data/test/stripe/instrumentation_test.rb +0 -74
  83. data/test/stripe/invoice_item_test.rb +0 -66
  84. data/test/stripe/invoice_line_item_test.rb +0 -8
  85. data/test/stripe/invoice_test.rb +0 -229
  86. data/test/stripe/issuing/authorization_test.rb +0 -72
  87. data/test/stripe/issuing/card_test.rb +0 -74
  88. data/test/stripe/issuing/cardholder_test.rb +0 -53
  89. data/test/stripe/issuing/dispute_test.rb +0 -54
  90. data/test/stripe/issuing/transaction_test.rb +0 -48
  91. data/test/stripe/list_object_test.rb +0 -202
  92. data/test/stripe/login_link_test.rb +0 -37
  93. data/test/stripe/mandate_test.rb +0 -14
  94. data/test/stripe/multipart_encoder_test.rb +0 -130
  95. data/test/stripe/oauth_test.rb +0 -104
  96. data/test/stripe/order_return_test.rb +0 -21
  97. data/test/stripe/order_test.rb +0 -82
  98. data/test/stripe/payment_intent_test.rb +0 -107
  99. data/test/stripe/payment_method_test.rb +0 -84
  100. data/test/stripe/payout_test.rb +0 -72
  101. data/test/stripe/person_test.rb +0 -46
  102. data/test/stripe/plan_test.rb +0 -98
  103. data/test/stripe/price_test.rb +0 -48
  104. data/test/stripe/product_test.rb +0 -58
  105. data/test/stripe/promotion_code_test.rb +0 -42
  106. data/test/stripe/radar/early_fraud_warning_test.rb +0 -22
  107. data/test/stripe/radar/value_list_item_test.rb +0 -48
  108. data/test/stripe/radar/value_list_test.rb +0 -61
  109. data/test/stripe/recipient_test.rb +0 -62
  110. data/test/stripe/refund_test.rb +0 -39
  111. data/test/stripe/reporting/report_run_test.rb +0 -33
  112. data/test/stripe/reporting/report_type_test.rb +0 -22
  113. data/test/stripe/reversal_test.rb +0 -43
  114. data/test/stripe/review_test.rb +0 -27
  115. data/test/stripe/setup_attempt_test.rb +0 -16
  116. data/test/stripe/setup_intent_test.rb +0 -84
  117. data/test/stripe/sigma/scheduled_query_run_test.rb +0 -22
  118. data/test/stripe/sku_test.rb +0 -60
  119. data/test/stripe/source_test.rb +0 -119
  120. data/test/stripe/stripe_client_test.rb +0 -1291
  121. data/test/stripe/stripe_configuration_test.rb +0 -131
  122. data/test/stripe/stripe_object_test.rb +0 -500
  123. data/test/stripe/stripe_response_test.rb +0 -95
  124. data/test/stripe/subscription_item_test.rb +0 -84
  125. data/test/stripe/subscription_schedule_test.rb +0 -82
  126. data/test/stripe/subscription_test.rb +0 -80
  127. data/test/stripe/tax_id_test.rb +0 -31
  128. data/test/stripe/tax_rate_test.rb +0 -43
  129. data/test/stripe/terminal/connection_token_test.rb +0 -16
  130. data/test/stripe/terminal/location_test.rb +0 -68
  131. data/test/stripe/terminal/reader_test.rb +0 -62
  132. data/test/stripe/three_d_secure_test.rb +0 -23
  133. data/test/stripe/topup_test.rb +0 -62
  134. data/test/stripe/transfer_test.rb +0 -88
  135. data/test/stripe/usage_record_summary_test.rb +0 -29
  136. data/test/stripe/util_test.rb +0 -402
  137. data/test/stripe/webhook_endpoint_test.rb +0 -59
  138. data/test/stripe/webhook_test.rb +0 -135
  139. data/test/stripe_mock.rb +0 -78
  140. data/test/stripe_test.rb +0 -132
  141. data/test/test_data.rb +0 -61
  142. data/test/test_helper.rb +0 -77
@@ -267,6 +267,27 @@ module Stripe
267
267
  []
268
268
  end
269
269
 
270
+ # When designing APIs, we now make a conscious effort server-side to avoid
271
+ # naming fields after important built-ins in various languages (e.g. class,
272
+ # method, etc.).
273
+ #
274
+ # However, a long time ago we made the mistake (either consciously or by
275
+ # accident) of initializing our `metadata` fields as instances of
276
+ # `StripeObject`, and metadata can have a wide range of different keys
277
+ # defined in it. This is somewhat a convenient in that it allows users to
278
+ # access data like `obj.metadata.my_field`, but is almost certainly not
279
+ # worth the cost.
280
+ #
281
+ # Naming metadata fields bad things like `class` causes `initialize_from`
282
+ # to produce strange results, so we ban known offenders here.
283
+ #
284
+ # In a future major version we should consider leaving `metadata` as a hash
285
+ # and forcing people to access it with `obj.metadata[:my_field]` because
286
+ # the potential for trouble is just too high. For now, reserve names.
287
+ RESERVED_FIELD_NAMES = [
288
+ :class,
289
+ ].freeze
290
+
270
291
  protected def metaclass
271
292
  class << self; self; end
272
293
  end
@@ -277,6 +298,7 @@ module Stripe
277
298
 
278
299
  metaclass.instance_eval do
279
300
  keys.each do |k|
301
+ next if RESERVED_FIELD_NAMES.include?(k)
280
302
  next if protected_fields.include?(k)
281
303
  next if @@permanent_attributes.include?(k)
282
304
 
@@ -312,6 +334,7 @@ module Stripe
312
334
 
313
335
  metaclass.instance_eval do
314
336
  keys.each do |k|
337
+ next if RESERVED_FIELD_NAMES.include?(k)
315
338
  next if protected_fields.include?(k)
316
339
  next if @@permanent_attributes.include?(k)
317
340
 
@@ -1,63 +1,54 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- # StripeResponse encapsulates some vitals of a response that came back from
5
- # the Stripe API.
6
- class StripeResponse
7
- # Headers provides an access wrapper to an API response's header data. It
8
- # mainly exists so that we don't need to expose the entire
9
- # `Net::HTTPResponse` object while still getting some of its benefits like
10
- # case-insensitive access to header names and flattening of header values.
11
- class Headers
12
- # Initializes a Headers object from a Net::HTTP::HTTPResponse object.
13
- def self.from_net_http(resp)
14
- new(resp.to_hash)
15
- end
4
+ # Headers provides an access wrapper to an API response's header data. It
5
+ # mainly exists so that we don't need to expose the entire
6
+ # `Net::HTTPResponse` object while still getting some of its benefits like
7
+ # case-insensitive access to header names and flattening of header values.
8
+ class StripeResponseHeaders
9
+ # Initializes a Headers object from a Net::HTTP::HTTPResponse object.
10
+ def self.from_net_http(resp)
11
+ new(resp.to_hash)
12
+ end
16
13
 
17
- # `hash` is expected to be a hash mapping header names to arrays of
18
- # header values. This is the default format generated by calling
19
- # `#to_hash` on a `Net::HTTPResponse` object because headers can be
20
- # repeated multiple times. Using `#[]` will collapse values down to just
21
- # the first.
22
- def initialize(hash)
23
- if !hash.is_a?(Hash) ||
24
- !hash.keys.all? { |n| n.is_a?(String) } ||
25
- !hash.values.all? { |a| a.is_a?(Array) } ||
26
- !hash.values.all? { |a| a.all? { |v| v.is_a?(String) } }
27
- raise ArgumentError,
28
- "expect hash to be a map of string header names to arrays of " \
29
- "header values"
30
- end
14
+ # `hash` is expected to be a hash mapping header names to arrays of
15
+ # header values. This is the default format generated by calling
16
+ # `#to_hash` on a `Net::HTTPResponse` object because headers can be
17
+ # repeated multiple times. Using `#[]` will collapse values down to just
18
+ # the first.
19
+ def initialize(hash)
20
+ if !hash.is_a?(Hash) ||
21
+ !hash.keys.all? { |n| n.is_a?(String) } ||
22
+ !hash.values.all? { |a| a.is_a?(Array) } ||
23
+ !hash.values.all? { |a| a.all? { |v| v.is_a?(String) } }
24
+ raise ArgumentError,
25
+ "expect hash to be a map of string header names to arrays of " \
26
+ "header values"
27
+ end
31
28
 
32
- @hash = {}
29
+ @hash = {}
33
30
 
34
- # This shouldn't be strictly necessary because `Net::HTTPResponse` will
35
- # produce a hash with all headers downcased, but do it anyway just in
36
- # case an object of this class was constructed manually.
37
- #
38
- # Also has the effect of duplicating the hash, which is desirable for a
39
- # little extra object safety.
40
- hash.each do |k, v|
41
- @hash[k.downcase] = v
42
- end
31
+ # This shouldn't be strictly necessary because `Net::HTTPResponse` will
32
+ # produce a hash with all headers downcased, but do it anyway just in
33
+ # case an object of this class was constructed manually.
34
+ #
35
+ # Also has the effect of duplicating the hash, which is desirable for a
36
+ # little extra object safety.
37
+ hash.each do |k, v|
38
+ @hash[k.downcase] = v
43
39
  end
40
+ end
44
41
 
45
- def [](name)
46
- values = @hash[name.downcase]
47
- if values && values.count > 1
48
- warn("Duplicate header values for `#{name}`; returning only first")
49
- end
50
- values ? values.first : nil
42
+ def [](name)
43
+ values = @hash[name.downcase]
44
+ if values && values.count > 1
45
+ warn("Duplicate header values for `#{name}`; returning only first")
51
46
  end
47
+ values ? values.first : nil
52
48
  end
49
+ end
53
50
 
54
- # The data contained by the HTTP body of the response deserialized from
55
- # JSON.
56
- attr_accessor :data
57
-
58
- # The raw HTTP body of the response.
59
- attr_accessor :http_body
60
-
51
+ module StripeResponseBase
61
52
  # A Hash of the HTTP headers of the response.
62
53
  attr_accessor :http_headers
63
54
 
@@ -67,15 +58,52 @@ module Stripe
67
58
  # The Stripe request ID of the response.
68
59
  attr_accessor :request_id
69
60
 
61
+ def self.populate_for_net_http(resp, http_resp)
62
+ resp.http_headers = StripeResponseHeaders.from_net_http(http_resp)
63
+ resp.http_status = http_resp.code.to_i
64
+ resp.request_id = http_resp["request-id"]
65
+ end
66
+ end
67
+
68
+ # StripeResponse encapsulates some vitals of a response that came back from
69
+ # the Stripe API.
70
+ class StripeResponse
71
+ include StripeResponseBase
72
+ # The data contained by the HTTP body of the response deserialized from
73
+ # JSON.
74
+ attr_accessor :data
75
+
76
+ # The raw HTTP body of the response.
77
+ attr_accessor :http_body
78
+
70
79
  # Initializes a StripeResponse object from a Net::HTTP::HTTPResponse
71
80
  # object.
72
81
  def self.from_net_http(http_resp)
73
82
  resp = StripeResponse.new
74
83
  resp.data = JSON.parse(http_resp.body, symbolize_names: true)
75
84
  resp.http_body = http_resp.body
76
- resp.http_headers = Headers.from_net_http(http_resp)
77
- resp.http_status = http_resp.code.to_i
78
- resp.request_id = http_resp["request-id"]
85
+ StripeResponseBase.populate_for_net_http(resp, http_resp)
86
+ resp
87
+ end
88
+ end
89
+
90
+ # We have to alias StripeResponseHeaders to StripeResponse::Headers, as this
91
+ # class used to be embedded within StripeResponse and we want to be backwards
92
+ # compatible.
93
+ StripeResponse::Headers = StripeResponseHeaders
94
+
95
+ # StripeHeadersOnlyResponse includes only header-related vitals of the
96
+ # response. This is used for streaming requests where the response was read
97
+ # directly in a block and we explicitly don't want to store the body of the
98
+ # response in memory.
99
+ class StripeHeadersOnlyResponse
100
+ include StripeResponseBase
101
+
102
+ # Initializes a StripeHeadersOnlyResponse object from a
103
+ # Net::HTTP::HTTPResponse object.
104
+ def self.from_net_http(http_resp)
105
+ resp = StripeHeadersOnlyResponse.new
106
+ StripeResponseBase.populate_for_net_http(resp, http_resp)
79
107
  resp
80
108
  end
81
109
  end
data/lib/stripe/util.rb CHANGED
@@ -76,24 +76,30 @@ module Stripe
76
76
  end
77
77
 
78
78
  def self.log_error(message, data = {})
79
- if !Stripe.logger.nil? ||
80
- !Stripe.log_level.nil? && Stripe.log_level <= Stripe::LEVEL_ERROR
79
+ config = data.delete(:config) || Stripe.config
80
+ logger = config.logger || Stripe.logger
81
+ if !logger.nil? ||
82
+ !config.log_level.nil? && config.log_level <= Stripe::LEVEL_ERROR
81
83
  log_internal(message, data, color: :cyan, level: Stripe::LEVEL_ERROR,
82
84
  logger: Stripe.logger, out: $stderr)
83
85
  end
84
86
  end
85
87
 
86
88
  def self.log_info(message, data = {})
87
- if !Stripe.logger.nil? ||
88
- !Stripe.log_level.nil? && Stripe.log_level <= Stripe::LEVEL_INFO
89
+ config = data.delete(:config) || Stripe.config
90
+ logger = config.logger || Stripe.logger
91
+ if !logger.nil? ||
92
+ !config.log_level.nil? && config.log_level <= Stripe::LEVEL_INFO
89
93
  log_internal(message, data, color: :cyan, level: Stripe::LEVEL_INFO,
90
94
  logger: Stripe.logger, out: $stdout)
91
95
  end
92
96
  end
93
97
 
94
98
  def self.log_debug(message, data = {})
95
- if !Stripe.logger.nil? ||
96
- !Stripe.log_level.nil? && Stripe.log_level <= Stripe::LEVEL_DEBUG
99
+ config = data.delete(:config) || Stripe.config
100
+ logger = config.logger || Stripe.logger
101
+ if !logger.nil? ||
102
+ !config.log_level.nil? && config.log_level <= Stripe::LEVEL_DEBUG
97
103
  log_internal(message, data, color: :blue, level: Stripe::LEVEL_DEBUG,
98
104
  logger: Stripe.logger, out: $stdout)
99
105
  end
@@ -202,7 +208,9 @@ module Stripe
202
208
  { api_key: opts }
203
209
  when Hash
204
210
  check_api_key!(opts.fetch(:api_key)) if opts.key?(:api_key)
205
- opts.clone
211
+ # Explicitly use dup here instead of clone to avoid preserving freeze
212
+ # state on input params.
213
+ opts.dup
206
214
  else
207
215
  raise TypeError, "normalize_opts expects a string or a hash"
208
216
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "5.28.0"
4
+ VERSION = "5.38.0"
5
5
  end
data/lib/stripe.rb CHANGED
@@ -57,35 +57,36 @@ module Stripe
57
57
 
58
58
  @app_info = nil
59
59
 
60
- @configuration = Stripe::StripeConfiguration.setup
60
+ @config = Stripe::StripeConfiguration.setup
61
61
 
62
62
  class << self
63
63
  extend Forwardable
64
64
 
65
+ attr_reader :config
66
+
65
67
  # User configurable options
66
- def_delegators :@configuration, :api_key, :api_key=
67
- def_delegators :@configuration, :api_version, :api_version=
68
- def_delegators :@configuration, :stripe_account, :stripe_account=
69
- def_delegators :@configuration, :api_base, :api_base=
70
- def_delegators :@configuration, :uploads_base, :uploads_base=
71
- def_delegators :@configuration, :connect_base, :connect_base=
72
- def_delegators :@configuration, :open_timeout, :open_timeout=
73
- def_delegators :@configuration, :read_timeout, :read_timeout=
74
- def_delegators :@configuration, :write_timeout, :write_timeout=
75
- def_delegators :@configuration, :proxy, :proxy=
76
- def_delegators :@configuration, :verify_ssl_certs, :verify_ssl_certs=
77
- def_delegators :@configuration, :ca_bundle_path, :ca_bundle_path=
78
- def_delegators :@configuration, :log_level, :log_level=
79
- def_delegators :@configuration, :logger, :logger=
80
- def_delegators :@configuration, :max_network_retries, :max_network_retries=
81
- def_delegators :@configuration, :enable_telemetry=, :enable_telemetry?
68
+ def_delegators :@config, :api_key, :api_key=
69
+ def_delegators :@config, :api_version, :api_version=
70
+ def_delegators :@config, :stripe_account, :stripe_account=
71
+ def_delegators :@config, :api_base, :api_base=
72
+ def_delegators :@config, :uploads_base, :uploads_base=
73
+ def_delegators :@config, :connect_base, :connect_base=
74
+ def_delegators :@config, :open_timeout, :open_timeout=
75
+ def_delegators :@config, :read_timeout, :read_timeout=
76
+ def_delegators :@config, :write_timeout, :write_timeout=
77
+ def_delegators :@config, :proxy, :proxy=
78
+ def_delegators :@config, :verify_ssl_certs, :verify_ssl_certs=
79
+ def_delegators :@config, :ca_bundle_path, :ca_bundle_path=
80
+ def_delegators :@config, :log_level, :log_level=
81
+ def_delegators :@config, :logger, :logger=
82
+ def_delegators :@config, :max_network_retries, :max_network_retries=
83
+ def_delegators :@config, :enable_telemetry=, :enable_telemetry?
84
+ def_delegators :@config, :client_id=, :client_id
82
85
 
83
86
  # Internal configurations
84
- def_delegators :@configuration, :max_network_retry_delay
85
- def_delegators :@configuration, :initial_network_retry_delay
86
- def_delegators :@configuration, :ca_store
87
-
88
- attr_accessor :client_id
87
+ def_delegators :@config, :max_network_retry_delay
88
+ def_delegators :@config, :initial_network_retry_delay
89
+ def_delegators :@config, :ca_store
89
90
  end
90
91
 
91
92
  # Gets the application for a plugin that's identified some. See
data/stripe.gemspec CHANGED
@@ -26,8 +26,15 @@ Gem::Specification.new do |s|
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.28.0
4
+ version: 5.38.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-14 00:00:00.000000000 Z
11
+ date: 2021-08-10 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,15 +18,6 @@ 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
@@ -64,6 +55,7 @@ files:
64
55
  - lib/stripe/resources/balance.rb
65
56
  - lib/stripe/resources/balance_transaction.rb
66
57
  - lib/stripe/resources/bank_account.rb
58
+ - lib/stripe/resources/billing_portal/configuration.rb
67
59
  - lib/stripe/resources/billing_portal/session.rb
68
60
  - lib/stripe/resources/bitcoin_receiver.rb
69
61
  - lib/stripe/resources/bitcoin_transaction.rb
@@ -84,6 +76,8 @@ files:
84
76
  - lib/stripe/resources/exchange_rate.rb
85
77
  - lib/stripe/resources/file.rb
86
78
  - lib/stripe/resources/file_link.rb
79
+ - lib/stripe/resources/identity/verification_report.rb
80
+ - lib/stripe/resources/identity/verification_session.rb
87
81
  - lib/stripe/resources/invoice.rb
88
82
  - lib/stripe/resources/invoice_item.rb
89
83
  - lib/stripe/resources/invoice_line_item.rb
@@ -106,6 +100,7 @@ files:
106
100
  - lib/stripe/resources/price.rb
107
101
  - lib/stripe/resources/product.rb
108
102
  - lib/stripe/resources/promotion_code.rb
103
+ - lib/stripe/resources/quote.rb
109
104
  - lib/stripe/resources/radar/early_fraud_warning.rb
110
105
  - lib/stripe/resources/radar/value_list.rb
111
106
  - lib/stripe/resources/radar/value_list_item.rb
@@ -125,6 +120,7 @@ files:
125
120
  - lib/stripe/resources/subscription.rb
126
121
  - lib/stripe/resources/subscription_item.rb
127
122
  - lib/stripe/resources/subscription_schedule.rb
123
+ - lib/stripe/resources/tax_code.rb
128
124
  - lib/stripe/resources/tax_id.rb
129
125
  - lib/stripe/resources/tax_rate.rb
130
126
  - lib/stripe/resources/terminal/connection_token.rb
@@ -146,96 +142,6 @@ files:
146
142
  - lib/stripe/version.rb
147
143
  - lib/stripe/webhook.rb
148
144
  - stripe.gemspec
149
- - test/openapi/README.md
150
- - test/stripe/account_link_test.rb
151
- - test/stripe/account_test.rb
152
- - test/stripe/alipay_account_test.rb
153
- - test/stripe/api_operations_test.rb
154
- - test/stripe/api_resource_test.rb
155
- - test/stripe/apple_pay_domain_test.rb
156
- - test/stripe/application_fee_refund_test.rb
157
- - test/stripe/application_fee_test.rb
158
- - test/stripe/balance_test.rb
159
- - test/stripe/balance_transaction_test.rb
160
- - test/stripe/bank_account_test.rb
161
- - test/stripe/billing_portal/session_test.rb
162
- - test/stripe/capability_test.rb
163
- - test/stripe/charge_test.rb
164
- - test/stripe/checkout/session_test.rb
165
- - test/stripe/connection_manager_test.rb
166
- - test/stripe/country_spec_test.rb
167
- - test/stripe/coupon_test.rb
168
- - test/stripe/credit_note_test.rb
169
- - test/stripe/customer_balance_transaction_test.rb
170
- - test/stripe/customer_card_test.rb
171
- - test/stripe/customer_test.rb
172
- - test/stripe/dispute_test.rb
173
- - test/stripe/ephemeral_key_test.rb
174
- - test/stripe/errors_test.rb
175
- - test/stripe/exchange_rate_test.rb
176
- - test/stripe/file_link_test.rb
177
- - test/stripe/file_test.rb
178
- - test/stripe/instrumentation_test.rb
179
- - test/stripe/invoice_item_test.rb
180
- - test/stripe/invoice_line_item_test.rb
181
- - test/stripe/invoice_test.rb
182
- - test/stripe/issuing/authorization_test.rb
183
- - test/stripe/issuing/card_test.rb
184
- - test/stripe/issuing/cardholder_test.rb
185
- - test/stripe/issuing/dispute_test.rb
186
- - test/stripe/issuing/transaction_test.rb
187
- - test/stripe/list_object_test.rb
188
- - test/stripe/login_link_test.rb
189
- - test/stripe/mandate_test.rb
190
- - test/stripe/multipart_encoder_test.rb
191
- - test/stripe/oauth_test.rb
192
- - test/stripe/order_return_test.rb
193
- - test/stripe/order_test.rb
194
- - test/stripe/payment_intent_test.rb
195
- - test/stripe/payment_method_test.rb
196
- - test/stripe/payout_test.rb
197
- - test/stripe/person_test.rb
198
- - test/stripe/plan_test.rb
199
- - test/stripe/price_test.rb
200
- - test/stripe/product_test.rb
201
- - test/stripe/promotion_code_test.rb
202
- - test/stripe/radar/early_fraud_warning_test.rb
203
- - test/stripe/radar/value_list_item_test.rb
204
- - test/stripe/radar/value_list_test.rb
205
- - test/stripe/recipient_test.rb
206
- - test/stripe/refund_test.rb
207
- - test/stripe/reporting/report_run_test.rb
208
- - test/stripe/reporting/report_type_test.rb
209
- - test/stripe/reversal_test.rb
210
- - test/stripe/review_test.rb
211
- - test/stripe/setup_attempt_test.rb
212
- - test/stripe/setup_intent_test.rb
213
- - test/stripe/sigma/scheduled_query_run_test.rb
214
- - test/stripe/sku_test.rb
215
- - test/stripe/source_test.rb
216
- - test/stripe/stripe_client_test.rb
217
- - test/stripe/stripe_configuration_test.rb
218
- - test/stripe/stripe_object_test.rb
219
- - test/stripe/stripe_response_test.rb
220
- - test/stripe/subscription_item_test.rb
221
- - test/stripe/subscription_schedule_test.rb
222
- - test/stripe/subscription_test.rb
223
- - test/stripe/tax_id_test.rb
224
- - test/stripe/tax_rate_test.rb
225
- - test/stripe/terminal/connection_token_test.rb
226
- - test/stripe/terminal/location_test.rb
227
- - test/stripe/terminal/reader_test.rb
228
- - test/stripe/three_d_secure_test.rb
229
- - test/stripe/topup_test.rb
230
- - test/stripe/transfer_test.rb
231
- - test/stripe/usage_record_summary_test.rb
232
- - test/stripe/util_test.rb
233
- - test/stripe/webhook_endpoint_test.rb
234
- - test/stripe/webhook_test.rb
235
- - test/stripe_mock.rb
236
- - test/stripe_test.rb
237
- - test/test_data.rb
238
- - test/test_helper.rb
239
145
  homepage: https://stripe.com/docs/api/ruby
240
146
  licenses:
241
147
  - MIT
@@ -265,94 +171,4 @@ rubygems_version: 3.1.2
265
171
  signing_key:
266
172
  specification_version: 4
267
173
  summary: Ruby bindings for the Stripe API
268
- test_files:
269
- - test/openapi/README.md
270
- - test/stripe/account_link_test.rb
271
- - test/stripe/account_test.rb
272
- - test/stripe/alipay_account_test.rb
273
- - test/stripe/api_operations_test.rb
274
- - test/stripe/api_resource_test.rb
275
- - test/stripe/apple_pay_domain_test.rb
276
- - test/stripe/application_fee_refund_test.rb
277
- - test/stripe/application_fee_test.rb
278
- - test/stripe/balance_test.rb
279
- - test/stripe/balance_transaction_test.rb
280
- - test/stripe/bank_account_test.rb
281
- - test/stripe/billing_portal/session_test.rb
282
- - test/stripe/capability_test.rb
283
- - test/stripe/charge_test.rb
284
- - test/stripe/checkout/session_test.rb
285
- - test/stripe/connection_manager_test.rb
286
- - test/stripe/country_spec_test.rb
287
- - test/stripe/coupon_test.rb
288
- - test/stripe/credit_note_test.rb
289
- - test/stripe/customer_balance_transaction_test.rb
290
- - test/stripe/customer_card_test.rb
291
- - test/stripe/customer_test.rb
292
- - test/stripe/dispute_test.rb
293
- - test/stripe/ephemeral_key_test.rb
294
- - test/stripe/errors_test.rb
295
- - test/stripe/exchange_rate_test.rb
296
- - test/stripe/file_link_test.rb
297
- - test/stripe/file_test.rb
298
- - test/stripe/instrumentation_test.rb
299
- - test/stripe/invoice_item_test.rb
300
- - test/stripe/invoice_line_item_test.rb
301
- - test/stripe/invoice_test.rb
302
- - test/stripe/issuing/authorization_test.rb
303
- - test/stripe/issuing/card_test.rb
304
- - test/stripe/issuing/cardholder_test.rb
305
- - test/stripe/issuing/dispute_test.rb
306
- - test/stripe/issuing/transaction_test.rb
307
- - test/stripe/list_object_test.rb
308
- - test/stripe/login_link_test.rb
309
- - test/stripe/mandate_test.rb
310
- - test/stripe/multipart_encoder_test.rb
311
- - test/stripe/oauth_test.rb
312
- - test/stripe/order_return_test.rb
313
- - test/stripe/order_test.rb
314
- - test/stripe/payment_intent_test.rb
315
- - test/stripe/payment_method_test.rb
316
- - test/stripe/payout_test.rb
317
- - test/stripe/person_test.rb
318
- - test/stripe/plan_test.rb
319
- - test/stripe/price_test.rb
320
- - test/stripe/product_test.rb
321
- - test/stripe/promotion_code_test.rb
322
- - test/stripe/radar/early_fraud_warning_test.rb
323
- - test/stripe/radar/value_list_item_test.rb
324
- - test/stripe/radar/value_list_test.rb
325
- - test/stripe/recipient_test.rb
326
- - test/stripe/refund_test.rb
327
- - test/stripe/reporting/report_run_test.rb
328
- - test/stripe/reporting/report_type_test.rb
329
- - test/stripe/reversal_test.rb
330
- - test/stripe/review_test.rb
331
- - test/stripe/setup_attempt_test.rb
332
- - test/stripe/setup_intent_test.rb
333
- - test/stripe/sigma/scheduled_query_run_test.rb
334
- - test/stripe/sku_test.rb
335
- - test/stripe/source_test.rb
336
- - test/stripe/stripe_client_test.rb
337
- - test/stripe/stripe_configuration_test.rb
338
- - test/stripe/stripe_object_test.rb
339
- - test/stripe/stripe_response_test.rb
340
- - test/stripe/subscription_item_test.rb
341
- - test/stripe/subscription_schedule_test.rb
342
- - test/stripe/subscription_test.rb
343
- - test/stripe/tax_id_test.rb
344
- - test/stripe/tax_rate_test.rb
345
- - test/stripe/terminal/connection_token_test.rb
346
- - test/stripe/terminal/location_test.rb
347
- - test/stripe/terminal/reader_test.rb
348
- - test/stripe/three_d_secure_test.rb
349
- - test/stripe/topup_test.rb
350
- - test/stripe/transfer_test.rb
351
- - test/stripe/usage_record_summary_test.rb
352
- - test/stripe/util_test.rb
353
- - test/stripe/webhook_endpoint_test.rb
354
- - test/stripe/webhook_test.rb
355
- - test/stripe_mock.rb
356
- - test/stripe_test.rb
357
- - test/test_data.rb
358
- - test/test_helper.rb
174
+ 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/