stripe 1.27.2 → 5.33.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +942 -0
  3. data/CODE_OF_CONDUCT.md +77 -0
  4. data/Gemfile +29 -4
  5. data/History.txt +1 -361
  6. data/README.md +349 -0
  7. data/Rakefile +33 -3
  8. data/VERSION +1 -1
  9. data/bin/stripe-console +14 -5
  10. data/lib/data/ca-certificates.crt +4016 -5138
  11. data/lib/stripe.rb +102 -320
  12. data/lib/stripe/api_operations/create.rb +5 -9
  13. data/lib/stripe/api_operations/delete.rb +32 -4
  14. data/lib/stripe/api_operations/list.rb +11 -9
  15. data/lib/stripe/api_operations/nested_resource.rb +73 -0
  16. data/lib/stripe/api_operations/request.rb +66 -11
  17. data/lib/stripe/api_operations/save.rb +97 -0
  18. data/lib/stripe/api_resource.rb +96 -12
  19. data/lib/stripe/connection_manager.rb +164 -0
  20. data/lib/stripe/error_object.rb +94 -0
  21. data/lib/stripe/errors.rb +177 -0
  22. data/lib/stripe/instrumentation.rb +82 -0
  23. data/lib/stripe/list_object.rb +118 -13
  24. data/lib/stripe/multipart_encoder.rb +131 -0
  25. data/lib/stripe/oauth.rb +65 -0
  26. data/lib/stripe/object_types.rb +104 -0
  27. data/lib/stripe/resources.rb +87 -0
  28. data/lib/stripe/resources/account.rb +170 -0
  29. data/lib/stripe/resources/account_link.rb +10 -0
  30. data/lib/stripe/resources/alipay_account.rb +34 -0
  31. data/lib/stripe/resources/apple_pay_domain.rb +17 -0
  32. data/lib/stripe/resources/application_fee.rb +14 -0
  33. data/lib/stripe/resources/application_fee_refund.rb +30 -0
  34. data/lib/stripe/resources/balance.rb +8 -0
  35. data/lib/stripe/resources/balance_transaction.rb +10 -0
  36. data/lib/stripe/resources/bank_account.rb +43 -0
  37. data/lib/stripe/resources/billing_portal/configuration.rb +14 -0
  38. data/lib/stripe/resources/billing_portal/session.rb +12 -0
  39. data/lib/stripe/resources/bitcoin_receiver.rb +24 -0
  40. data/lib/stripe/resources/bitcoin_transaction.rb +15 -0
  41. data/lib/stripe/resources/capability.rb +33 -0
  42. data/lib/stripe/resources/card.rb +38 -0
  43. data/lib/stripe/resources/charge.rb +23 -0
  44. data/lib/stripe/resources/checkout/session.rb +16 -0
  45. data/lib/stripe/resources/country_spec.rb +10 -0
  46. data/lib/stripe/resources/coupon.rb +13 -0
  47. data/lib/stripe/resources/credit_note.rb +33 -0
  48. data/lib/stripe/resources/credit_note_line_item.rb +7 -0
  49. data/lib/stripe/resources/customer.rb +41 -0
  50. data/lib/stripe/resources/customer_balance_transaction.rb +30 -0
  51. data/lib/stripe/resources/discount.rb +7 -0
  52. data/lib/stripe/resources/dispute.rb +22 -0
  53. data/lib/stripe/resources/ephemeral_key.rb +20 -0
  54. data/lib/stripe/resources/event.rb +10 -0
  55. data/lib/stripe/resources/exchange_rate.rb +10 -0
  56. data/lib/stripe/resources/file.rb +36 -0
  57. data/lib/stripe/resources/file_link.rb +12 -0
  58. data/lib/stripe/resources/identity/verification_report.rb +12 -0
  59. data/lib/stripe/resources/identity/verification_session.rb +35 -0
  60. data/lib/stripe/resources/invoice.rb +74 -0
  61. data/lib/stripe/resources/invoice_item.rb +13 -0
  62. data/lib/stripe/resources/invoice_line_item.rb +7 -0
  63. data/lib/stripe/resources/issuing/authorization.rb +34 -0
  64. data/lib/stripe/resources/issuing/card.rb +25 -0
  65. data/lib/stripe/resources/issuing/card_details.rb +9 -0
  66. data/lib/stripe/resources/issuing/cardholder.rb +14 -0
  67. data/lib/stripe/resources/issuing/dispute.rb +25 -0
  68. data/lib/stripe/resources/issuing/transaction.rb +13 -0
  69. data/lib/stripe/resources/line_item.rb +7 -0
  70. data/lib/stripe/resources/login_link.rb +14 -0
  71. data/lib/stripe/resources/mandate.rb +8 -0
  72. data/lib/stripe/resources/order.rb +33 -0
  73. data/lib/stripe/resources/order_return.rb +10 -0
  74. data/lib/stripe/resources/payment_intent.rb +43 -0
  75. data/lib/stripe/resources/payment_method.rb +33 -0
  76. data/lib/stripe/resources/payout.rb +33 -0
  77. data/lib/stripe/resources/person.rb +31 -0
  78. data/lib/stripe/resources/plan.rb +13 -0
  79. data/lib/stripe/resources/price.rb +12 -0
  80. data/lib/stripe/resources/product.rb +13 -0
  81. data/lib/stripe/resources/promotion_code.rb +12 -0
  82. data/lib/stripe/resources/radar/early_fraud_warning.rb +12 -0
  83. data/lib/stripe/resources/radar/value_list.rb +15 -0
  84. data/lib/stripe/resources/radar/value_list_item.rb +14 -0
  85. data/lib/stripe/resources/recipient.rb +14 -0
  86. data/lib/stripe/resources/recipient_transfer.rb +7 -0
  87. data/lib/stripe/resources/refund.rb +12 -0
  88. data/lib/stripe/resources/reporting/report_run.rb +13 -0
  89. data/lib/stripe/resources/reporting/report_type.rb +13 -0
  90. data/lib/stripe/resources/reversal.rb +29 -0
  91. data/lib/stripe/resources/review.rb +21 -0
  92. data/lib/stripe/resources/setup_attempt.rb +10 -0
  93. data/lib/stripe/resources/setup_intent.rb +33 -0
  94. data/lib/stripe/resources/sigma/scheduled_query_run.rb +16 -0
  95. data/lib/stripe/resources/sku.rb +13 -0
  96. data/lib/stripe/resources/source.rb +47 -0
  97. data/lib/stripe/resources/source_transaction.rb +7 -0
  98. data/lib/stripe/resources/subscription.rb +26 -0
  99. data/lib/stripe/resources/subscription_item.rb +26 -0
  100. data/lib/stripe/resources/subscription_schedule.rb +33 -0
  101. data/lib/stripe/resources/tax_id.rb +26 -0
  102. data/lib/stripe/resources/tax_rate.rb +12 -0
  103. data/lib/stripe/resources/terminal/connection_token.rb +12 -0
  104. data/lib/stripe/resources/terminal/location.rb +15 -0
  105. data/lib/stripe/resources/terminal/reader.rb +15 -0
  106. data/lib/stripe/resources/three_d_secure.rb +14 -0
  107. data/lib/stripe/resources/token.rb +10 -0
  108. data/lib/stripe/resources/topup.rb +23 -0
  109. data/lib/stripe/resources/transfer.rb +27 -0
  110. data/lib/stripe/resources/usage_record.rb +7 -0
  111. data/lib/stripe/resources/usage_record_summary.rb +7 -0
  112. data/lib/stripe/resources/webhook_endpoint.rb +13 -0
  113. data/lib/stripe/singleton_api_resource.rb +13 -7
  114. data/lib/stripe/stripe_client.rb +989 -0
  115. data/lib/stripe/stripe_configuration.rb +194 -0
  116. data/lib/stripe/stripe_object.rb +481 -148
  117. data/lib/stripe/stripe_response.rb +82 -0
  118. data/lib/stripe/util.rb +265 -70
  119. data/lib/stripe/version.rb +3 -1
  120. data/lib/stripe/webhook.rb +121 -0
  121. data/stripe.gemspec +35 -21
  122. metadata +118 -198
  123. data/.gitignore +0 -4
  124. data/.travis.yml +0 -22
  125. data/README.rdoc +0 -43
  126. data/gemfiles/default-with-activesupport.gemfile +0 -10
  127. data/gemfiles/json.gemfile +0 -12
  128. data/gemfiles/yajl.gemfile +0 -12
  129. data/lib/stripe/account.rb +0 -39
  130. data/lib/stripe/api_operations/update.rb +0 -19
  131. data/lib/stripe/application_fee.rb +0 -20
  132. data/lib/stripe/application_fee_refund.rb +0 -14
  133. data/lib/stripe/balance.rb +0 -4
  134. data/lib/stripe/balance_transaction.rb +0 -9
  135. data/lib/stripe/bank_account.rb +0 -19
  136. data/lib/stripe/bitcoin_receiver.rb +0 -20
  137. data/lib/stripe/bitcoin_transaction.rb +0 -9
  138. data/lib/stripe/card.rb +0 -21
  139. data/lib/stripe/charge.rb +0 -62
  140. data/lib/stripe/coupon.rb +0 -8
  141. data/lib/stripe/customer.rb +0 -75
  142. data/lib/stripe/dispute.rb +0 -16
  143. data/lib/stripe/errors/api_connection_error.rb +0 -4
  144. data/lib/stripe/errors/api_error.rb +0 -4
  145. data/lib/stripe/errors/authentication_error.rb +0 -4
  146. data/lib/stripe/errors/card_error.rb +0 -12
  147. data/lib/stripe/errors/invalid_request_error.rb +0 -11
  148. data/lib/stripe/errors/rate_limit_error.rb +0 -4
  149. data/lib/stripe/errors/stripe_error.rb +0 -26
  150. data/lib/stripe/event.rb +0 -5
  151. data/lib/stripe/file_upload.rb +0 -22
  152. data/lib/stripe/invoice.rb +0 -27
  153. data/lib/stripe/invoice_item.rb +0 -8
  154. data/lib/stripe/order.rb +0 -19
  155. data/lib/stripe/plan.rb +0 -8
  156. data/lib/stripe/product.rb +0 -16
  157. data/lib/stripe/recipient.rb +0 -12
  158. data/lib/stripe/refund.rb +0 -7
  159. data/lib/stripe/reversal.rb +0 -14
  160. data/lib/stripe/sku.rb +0 -8
  161. data/lib/stripe/subscription.rb +0 -25
  162. data/lib/stripe/token.rb +0 -5
  163. data/lib/stripe/transfer.rb +0 -17
  164. data/test/stripe/account_test.rb +0 -118
  165. data/test/stripe/api_resource_test.rb +0 -632
  166. data/test/stripe/application_fee_refund_test.rb +0 -47
  167. data/test/stripe/application_fee_test.rb +0 -22
  168. data/test/stripe/balance_test.rb +0 -11
  169. data/test/stripe/bitcoin_receiver_test.rb +0 -61
  170. data/test/stripe/bitcoin_transaction_test.rb +0 -29
  171. data/test/stripe/charge_refund_test.rb +0 -55
  172. data/test/stripe/charge_test.rb +0 -118
  173. data/test/stripe/coupon_test.rb +0 -20
  174. data/test/stripe/customer_card_test.rb +0 -63
  175. data/test/stripe/customer_test.rb +0 -88
  176. data/test/stripe/dispute_test.rb +0 -45
  177. data/test/stripe/file_upload_test.rb +0 -28
  178. data/test/stripe/invoice_test.rb +0 -40
  179. data/test/stripe/list_object_test.rb +0 -16
  180. data/test/stripe/metadata_test.rb +0 -129
  181. data/test/stripe/order_test.rb +0 -52
  182. data/test/stripe/product_test.rb +0 -41
  183. data/test/stripe/recipient_card_test.rb +0 -57
  184. data/test/stripe/refund_test.rb +0 -55
  185. data/test/stripe/reversal_test.rb +0 -47
  186. data/test/stripe/sku_test.rb +0 -24
  187. data/test/stripe/stripe_object_test.rb +0 -28
  188. data/test/stripe/subscription_test.rb +0 -72
  189. data/test/stripe/transfer_test.rb +0 -25
  190. data/test/stripe/util_test.rb +0 -34
  191. data/test/test_data.rb +0 -666
  192. data/test/test_helper.rb +0 -41
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Stripe
2
- VERSION = '1.27.2'
4
+ VERSION = "5.33.0"
3
5
  end
@@ -0,0 +1,121 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stripe
4
+ module Webhook
5
+ DEFAULT_TOLERANCE = 300
6
+
7
+ # Initializes an Event object from a JSON payload.
8
+ #
9
+ # This may raise JSON::ParserError if the payload is not valid JSON, or
10
+ # SignatureVerificationError if the signature verification fails.
11
+ def self.construct_event(payload, sig_header, secret,
12
+ tolerance: DEFAULT_TOLERANCE)
13
+ Signature.verify_header(payload, sig_header, secret, tolerance: tolerance)
14
+
15
+ # It's a good idea to parse the payload only after verifying it. We use
16
+ # `symbolize_names` so it would otherwise be technically possible to
17
+ # flood a target's memory if they were on an older version of Ruby that
18
+ # doesn't GC symbols. It also decreases the likelihood that we receive a
19
+ # bad payload that fails to parse and throws an exception.
20
+ data = JSON.parse(payload, symbolize_names: true)
21
+ Event.construct_from(data)
22
+ end
23
+
24
+ module Signature
25
+ EXPECTED_SCHEME = "v1"
26
+
27
+ # Computes a webhook signature given a time (probably the current time),
28
+ # a payload, and a signing secret.
29
+ def self.compute_signature(timestamp, payload, secret)
30
+ raise ArgumentError, "timestamp should be an instance of Time" \
31
+ unless timestamp.is_a?(Time)
32
+ raise ArgumentError, "payload should be a string" \
33
+ unless payload.is_a?(String)
34
+ raise ArgumentError, "secret should be a string" \
35
+ unless secret.is_a?(String)
36
+
37
+ timestamped_payload = "#{timestamp.to_i}.#{payload}"
38
+ OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new("sha256"), secret,
39
+ timestamped_payload)
40
+ end
41
+
42
+ # Generates a value that would be added to a `Stripe-Signature` for a
43
+ # given webhook payload.
44
+ #
45
+ # Note that this isn't needed to verify webhooks in any way, and is
46
+ # mainly here for use in test cases (those that are both within this
47
+ # project and without).
48
+ def self.generate_header(timestamp, signature, scheme: EXPECTED_SCHEME)
49
+ raise ArgumentError, "timestamp should be an instance of Time" \
50
+ unless timestamp.is_a?(Time)
51
+ raise ArgumentError, "signature should be a string" \
52
+ unless signature.is_a?(String)
53
+ raise ArgumentError, "scheme should be a string" \
54
+ unless scheme.is_a?(String)
55
+
56
+ "t=#{timestamp.to_i},#{scheme}=#{signature}"
57
+ end
58
+
59
+ # Extracts the timestamp and the signature(s) with the desired scheme
60
+ # from the header
61
+ def self.get_timestamp_and_signatures(header, scheme)
62
+ list_items = header.split(/,\s*/).map { |i| i.split("=", 2) }
63
+ timestamp = Integer(list_items.select { |i| i[0] == "t" }[0][1])
64
+ signatures = list_items.select { |i| i[0] == scheme }.map { |i| i[1] }
65
+ [Time.at(timestamp), signatures]
66
+ end
67
+ private_class_method :get_timestamp_and_signatures
68
+
69
+ # Verifies the signature header for a given payload.
70
+ #
71
+ # Raises a SignatureVerificationError in the following cases:
72
+ # - the header does not match the expected format
73
+ # - no signatures found with the expected scheme
74
+ # - no signatures matching the expected signature
75
+ # - a tolerance is provided and the timestamp is not within the
76
+ # tolerance
77
+ #
78
+ # Returns true otherwise
79
+ def self.verify_header(payload, header, secret, tolerance: nil)
80
+ begin
81
+ timestamp, signatures =
82
+ get_timestamp_and_signatures(header, EXPECTED_SCHEME)
83
+
84
+ # TODO: Try to knock over this blanket rescue as it can unintentionally
85
+ # swallow many valid errors. Instead, try to validate an incoming
86
+ # header one piece at a time, and error with a known exception class if
87
+ # any part is found to be invalid. Rescue that class here.
88
+ rescue StandardError
89
+ raise SignatureVerificationError.new(
90
+ "Unable to extract timestamp and signatures from header",
91
+ header, http_body: payload
92
+ )
93
+ end
94
+
95
+ if signatures.empty?
96
+ raise SignatureVerificationError.new(
97
+ "No signatures found with expected scheme #{EXPECTED_SCHEME}",
98
+ header, http_body: payload
99
+ )
100
+ end
101
+
102
+ expected_sig = compute_signature(timestamp, payload, secret)
103
+ unless signatures.any? { |s| Util.secure_compare(expected_sig, s) }
104
+ raise SignatureVerificationError.new(
105
+ "No signatures found matching the expected signature for payload",
106
+ header, http_body: payload
107
+ )
108
+ end
109
+
110
+ if tolerance && timestamp < Time.now - tolerance
111
+ raise SignatureVerificationError.new(
112
+ "Timestamp outside the tolerance zone (#{Time.at(timestamp)})",
113
+ header, http_body: payload
114
+ )
115
+ end
116
+
117
+ true
118
+ end
119
+ end
120
+ end
121
+ end
data/stripe.gemspec CHANGED
@@ -1,27 +1,41 @@
1
- $:.unshift(File.join(File.dirname(__FILE__), 'lib'))
1
+ # frozen_string_literal: true
2
2
 
3
- require 'stripe/version'
3
+ $LOAD_PATH.unshift(::File.join(::File.dirname(__FILE__), "lib"))
4
4
 
5
- spec = Gem::Specification.new do |s|
6
- s.name = 'stripe'
7
- s.version = Stripe::VERSION
8
- s.summary = 'Ruby bindings for the Stripe API'
9
- s.description = 'Stripe is the easiest way to accept payments online. See https://stripe.com for details.'
10
- s.authors = ['Ross Boucher', 'Greg Brockman']
11
- s.email = ['boucher@stripe.com', 'gdb@stripe.com']
12
- s.homepage = 'https://stripe.com/api'
13
- s.license = 'MIT'
5
+ require "stripe/version"
14
6
 
15
- s.add_dependency('rest-client', '~> 1.4')
16
- s.add_dependency('json', '~> 1.8.1')
7
+ Gem::Specification.new do |s|
8
+ s.name = "stripe"
9
+ s.version = Stripe::VERSION
10
+ s.required_ruby_version = ">= 2.3.0"
11
+ s.summary = "Ruby bindings for the Stripe API"
12
+ s.description = "Stripe is the easiest way to accept payments online. " \
13
+ "See https://stripe.com for details."
14
+ s.author = "Stripe"
15
+ s.email = "support@stripe.com"
16
+ s.homepage = "https://stripe.com/docs/api/ruby"
17
+ s.license = "MIT"
17
18
 
18
- s.add_development_dependency('mocha', '~> 0.13.2')
19
- s.add_development_dependency('shoulda', '~> 3.4.0')
20
- s.add_development_dependency('test-unit')
21
- s.add_development_dependency('rake')
19
+ s.metadata = {
20
+ "bug_tracker_uri" => "https://github.com/stripe/stripe-ruby/issues",
21
+ "changelog_uri" =>
22
+ "https://github.com/stripe/stripe-ruby/blob/master/CHANGELOG.md",
23
+ "documentation_uri" => "https://stripe.com/docs/api/ruby",
24
+ "github_repo" => "ssh://github.com/stripe/stripe-ruby",
25
+ "homepage_uri" => "https://stripe.com/docs/api/ruby",
26
+ "source_code_uri" => "https://github.com/stripe/stripe-ruby",
27
+ }
22
28
 
23
- s.files = `git ls-files`.split("\n")
24
- s.test_files = `git ls-files -- test/*`.split("\n")
25
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
26
- s.require_paths = ['lib']
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) }
38
+ s.executables = `git ls-files -- bin/*`.split("\n")
39
+ .map { |f| ::File.basename(f) }
40
+ s.require_paths = ["lib"]
27
41
  end
metadata CHANGED
@@ -1,204 +1,155 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.27.2
4
+ version: 5.33.0
5
5
  platform: ruby
6
6
  authors:
7
- - Ross Boucher
8
- - Greg Brockman
7
+ - Stripe
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2015-09-25 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: rest-client
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - "~>"
19
- - !ruby/object:Gem::Version
20
- version: '1.4'
21
- type: :runtime
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - "~>"
26
- - !ruby/object:Gem::Version
27
- version: '1.4'
28
- - !ruby/object:Gem::Dependency
29
- name: json
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - "~>"
33
- - !ruby/object:Gem::Version
34
- version: 1.8.1
35
- type: :runtime
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - "~>"
40
- - !ruby/object:Gem::Version
41
- version: 1.8.1
42
- - !ruby/object:Gem::Dependency
43
- name: mocha
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - "~>"
47
- - !ruby/object:Gem::Version
48
- version: 0.13.2
49
- type: :development
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - "~>"
54
- - !ruby/object:Gem::Version
55
- version: 0.13.2
56
- - !ruby/object:Gem::Dependency
57
- name: shoulda
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - "~>"
61
- - !ruby/object:Gem::Version
62
- version: 3.4.0
63
- type: :development
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - "~>"
68
- - !ruby/object:Gem::Version
69
- version: 3.4.0
70
- - !ruby/object:Gem::Dependency
71
- name: test-unit
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: '0'
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- version: '0'
84
- - !ruby/object:Gem::Dependency
85
- name: rake
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: '0'
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- version: '0'
11
+ date: 2021-05-19 00:00:00.000000000 Z
12
+ dependencies: []
98
13
  description: Stripe is the easiest way to accept payments online. See https://stripe.com
99
14
  for details.
100
- email:
101
- - boucher@stripe.com
102
- - gdb@stripe.com
15
+ email: support@stripe.com
103
16
  executables:
104
17
  - stripe-console
105
18
  extensions: []
106
19
  extra_rdoc_files: []
107
20
  files:
108
- - ".gitignore"
109
- - ".travis.yml"
21
+ - CHANGELOG.md
22
+ - CODE_OF_CONDUCT.md
110
23
  - CONTRIBUTORS
111
24
  - Gemfile
112
25
  - History.txt
113
26
  - LICENSE
114
- - README.rdoc
27
+ - README.md
115
28
  - Rakefile
116
29
  - VERSION
117
30
  - bin/stripe-console
118
- - gemfiles/default-with-activesupport.gemfile
119
- - gemfiles/json.gemfile
120
- - gemfiles/yajl.gemfile
121
31
  - lib/data/ca-certificates.crt
122
32
  - lib/stripe.rb
123
- - lib/stripe/account.rb
124
33
  - lib/stripe/api_operations/create.rb
125
34
  - lib/stripe/api_operations/delete.rb
126
35
  - lib/stripe/api_operations/list.rb
36
+ - lib/stripe/api_operations/nested_resource.rb
127
37
  - lib/stripe/api_operations/request.rb
128
- - lib/stripe/api_operations/update.rb
38
+ - lib/stripe/api_operations/save.rb
129
39
  - lib/stripe/api_resource.rb
130
- - lib/stripe/application_fee.rb
131
- - lib/stripe/application_fee_refund.rb
132
- - lib/stripe/balance.rb
133
- - lib/stripe/balance_transaction.rb
134
- - lib/stripe/bank_account.rb
135
- - lib/stripe/bitcoin_receiver.rb
136
- - lib/stripe/bitcoin_transaction.rb
137
- - lib/stripe/card.rb
138
- - lib/stripe/charge.rb
139
- - lib/stripe/coupon.rb
140
- - lib/stripe/customer.rb
141
- - lib/stripe/dispute.rb
142
- - lib/stripe/errors/api_connection_error.rb
143
- - lib/stripe/errors/api_error.rb
144
- - lib/stripe/errors/authentication_error.rb
145
- - lib/stripe/errors/card_error.rb
146
- - lib/stripe/errors/invalid_request_error.rb
147
- - lib/stripe/errors/rate_limit_error.rb
148
- - lib/stripe/errors/stripe_error.rb
149
- - lib/stripe/event.rb
150
- - lib/stripe/file_upload.rb
151
- - lib/stripe/invoice.rb
152
- - lib/stripe/invoice_item.rb
40
+ - lib/stripe/connection_manager.rb
41
+ - lib/stripe/error_object.rb
42
+ - lib/stripe/errors.rb
43
+ - lib/stripe/instrumentation.rb
153
44
  - lib/stripe/list_object.rb
154
- - lib/stripe/order.rb
155
- - lib/stripe/plan.rb
156
- - lib/stripe/product.rb
157
- - lib/stripe/recipient.rb
158
- - lib/stripe/refund.rb
159
- - lib/stripe/reversal.rb
45
+ - lib/stripe/multipart_encoder.rb
46
+ - lib/stripe/oauth.rb
47
+ - lib/stripe/object_types.rb
48
+ - lib/stripe/resources.rb
49
+ - lib/stripe/resources/account.rb
50
+ - lib/stripe/resources/account_link.rb
51
+ - lib/stripe/resources/alipay_account.rb
52
+ - lib/stripe/resources/apple_pay_domain.rb
53
+ - lib/stripe/resources/application_fee.rb
54
+ - lib/stripe/resources/application_fee_refund.rb
55
+ - lib/stripe/resources/balance.rb
56
+ - lib/stripe/resources/balance_transaction.rb
57
+ - lib/stripe/resources/bank_account.rb
58
+ - lib/stripe/resources/billing_portal/configuration.rb
59
+ - lib/stripe/resources/billing_portal/session.rb
60
+ - lib/stripe/resources/bitcoin_receiver.rb
61
+ - lib/stripe/resources/bitcoin_transaction.rb
62
+ - lib/stripe/resources/capability.rb
63
+ - lib/stripe/resources/card.rb
64
+ - lib/stripe/resources/charge.rb
65
+ - lib/stripe/resources/checkout/session.rb
66
+ - lib/stripe/resources/country_spec.rb
67
+ - lib/stripe/resources/coupon.rb
68
+ - lib/stripe/resources/credit_note.rb
69
+ - lib/stripe/resources/credit_note_line_item.rb
70
+ - lib/stripe/resources/customer.rb
71
+ - lib/stripe/resources/customer_balance_transaction.rb
72
+ - lib/stripe/resources/discount.rb
73
+ - lib/stripe/resources/dispute.rb
74
+ - lib/stripe/resources/ephemeral_key.rb
75
+ - lib/stripe/resources/event.rb
76
+ - lib/stripe/resources/exchange_rate.rb
77
+ - lib/stripe/resources/file.rb
78
+ - lib/stripe/resources/file_link.rb
79
+ - lib/stripe/resources/identity/verification_report.rb
80
+ - lib/stripe/resources/identity/verification_session.rb
81
+ - lib/stripe/resources/invoice.rb
82
+ - lib/stripe/resources/invoice_item.rb
83
+ - lib/stripe/resources/invoice_line_item.rb
84
+ - lib/stripe/resources/issuing/authorization.rb
85
+ - lib/stripe/resources/issuing/card.rb
86
+ - lib/stripe/resources/issuing/card_details.rb
87
+ - lib/stripe/resources/issuing/cardholder.rb
88
+ - lib/stripe/resources/issuing/dispute.rb
89
+ - lib/stripe/resources/issuing/transaction.rb
90
+ - lib/stripe/resources/line_item.rb
91
+ - lib/stripe/resources/login_link.rb
92
+ - lib/stripe/resources/mandate.rb
93
+ - lib/stripe/resources/order.rb
94
+ - lib/stripe/resources/order_return.rb
95
+ - lib/stripe/resources/payment_intent.rb
96
+ - lib/stripe/resources/payment_method.rb
97
+ - lib/stripe/resources/payout.rb
98
+ - lib/stripe/resources/person.rb
99
+ - lib/stripe/resources/plan.rb
100
+ - lib/stripe/resources/price.rb
101
+ - lib/stripe/resources/product.rb
102
+ - lib/stripe/resources/promotion_code.rb
103
+ - lib/stripe/resources/radar/early_fraud_warning.rb
104
+ - lib/stripe/resources/radar/value_list.rb
105
+ - lib/stripe/resources/radar/value_list_item.rb
106
+ - lib/stripe/resources/recipient.rb
107
+ - lib/stripe/resources/recipient_transfer.rb
108
+ - lib/stripe/resources/refund.rb
109
+ - lib/stripe/resources/reporting/report_run.rb
110
+ - lib/stripe/resources/reporting/report_type.rb
111
+ - lib/stripe/resources/reversal.rb
112
+ - lib/stripe/resources/review.rb
113
+ - lib/stripe/resources/setup_attempt.rb
114
+ - lib/stripe/resources/setup_intent.rb
115
+ - lib/stripe/resources/sigma/scheduled_query_run.rb
116
+ - lib/stripe/resources/sku.rb
117
+ - lib/stripe/resources/source.rb
118
+ - lib/stripe/resources/source_transaction.rb
119
+ - lib/stripe/resources/subscription.rb
120
+ - lib/stripe/resources/subscription_item.rb
121
+ - lib/stripe/resources/subscription_schedule.rb
122
+ - lib/stripe/resources/tax_id.rb
123
+ - lib/stripe/resources/tax_rate.rb
124
+ - lib/stripe/resources/terminal/connection_token.rb
125
+ - lib/stripe/resources/terminal/location.rb
126
+ - lib/stripe/resources/terminal/reader.rb
127
+ - lib/stripe/resources/three_d_secure.rb
128
+ - lib/stripe/resources/token.rb
129
+ - lib/stripe/resources/topup.rb
130
+ - lib/stripe/resources/transfer.rb
131
+ - lib/stripe/resources/usage_record.rb
132
+ - lib/stripe/resources/usage_record_summary.rb
133
+ - lib/stripe/resources/webhook_endpoint.rb
160
134
  - lib/stripe/singleton_api_resource.rb
161
- - lib/stripe/sku.rb
135
+ - lib/stripe/stripe_client.rb
136
+ - lib/stripe/stripe_configuration.rb
162
137
  - lib/stripe/stripe_object.rb
163
- - lib/stripe/subscription.rb
164
- - lib/stripe/token.rb
165
- - lib/stripe/transfer.rb
138
+ - lib/stripe/stripe_response.rb
166
139
  - lib/stripe/util.rb
167
140
  - lib/stripe/version.rb
141
+ - lib/stripe/webhook.rb
168
142
  - stripe.gemspec
169
- - test/stripe/account_test.rb
170
- - test/stripe/api_resource_test.rb
171
- - test/stripe/application_fee_refund_test.rb
172
- - test/stripe/application_fee_test.rb
173
- - test/stripe/balance_test.rb
174
- - test/stripe/bitcoin_receiver_test.rb
175
- - test/stripe/bitcoin_transaction_test.rb
176
- - test/stripe/charge_refund_test.rb
177
- - test/stripe/charge_test.rb
178
- - test/stripe/coupon_test.rb
179
- - test/stripe/customer_card_test.rb
180
- - test/stripe/customer_test.rb
181
- - test/stripe/dispute_test.rb
182
- - test/stripe/file_upload_test.rb
183
- - test/stripe/invoice_test.rb
184
- - test/stripe/list_object_test.rb
185
- - test/stripe/metadata_test.rb
186
- - test/stripe/order_test.rb
187
- - test/stripe/product_test.rb
188
- - test/stripe/recipient_card_test.rb
189
- - test/stripe/refund_test.rb
190
- - test/stripe/reversal_test.rb
191
- - test/stripe/sku_test.rb
192
- - test/stripe/stripe_object_test.rb
193
- - test/stripe/subscription_test.rb
194
- - test/stripe/transfer_test.rb
195
- - test/stripe/util_test.rb
196
- - test/test_data.rb
197
- - test/test_helper.rb
198
- homepage: https://stripe.com/api
143
+ homepage: https://stripe.com/docs/api/ruby
199
144
  licenses:
200
145
  - MIT
201
- metadata: {}
146
+ metadata:
147
+ bug_tracker_uri: https://github.com/stripe/stripe-ruby/issues
148
+ changelog_uri: https://github.com/stripe/stripe-ruby/blob/master/CHANGELOG.md
149
+ documentation_uri: https://stripe.com/docs/api/ruby
150
+ github_repo: ssh://github.com/stripe/stripe-ruby
151
+ homepage_uri: https://stripe.com/docs/api/ruby
152
+ source_code_uri: https://github.com/stripe/stripe-ruby
202
153
  post_install_message:
203
154
  rdoc_options: []
204
155
  require_paths:
@@ -207,46 +158,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
207
158
  requirements:
208
159
  - - ">="
209
160
  - !ruby/object:Gem::Version
210
- version: '0'
161
+ version: 2.3.0
211
162
  required_rubygems_version: !ruby/object:Gem::Requirement
212
163
  requirements:
213
164
  - - ">="
214
165
  - !ruby/object:Gem::Version
215
166
  version: '0'
216
167
  requirements: []
217
- rubyforge_project:
218
- rubygems_version: 2.2.2
168
+ rubygems_version: 3.1.2
219
169
  signing_key:
220
170
  specification_version: 4
221
171
  summary: Ruby bindings for the Stripe API
222
- test_files:
223
- - test/stripe/account_test.rb
224
- - test/stripe/api_resource_test.rb
225
- - test/stripe/application_fee_refund_test.rb
226
- - test/stripe/application_fee_test.rb
227
- - test/stripe/balance_test.rb
228
- - test/stripe/bitcoin_receiver_test.rb
229
- - test/stripe/bitcoin_transaction_test.rb
230
- - test/stripe/charge_refund_test.rb
231
- - test/stripe/charge_test.rb
232
- - test/stripe/coupon_test.rb
233
- - test/stripe/customer_card_test.rb
234
- - test/stripe/customer_test.rb
235
- - test/stripe/dispute_test.rb
236
- - test/stripe/file_upload_test.rb
237
- - test/stripe/invoice_test.rb
238
- - test/stripe/list_object_test.rb
239
- - test/stripe/metadata_test.rb
240
- - test/stripe/order_test.rb
241
- - test/stripe/product_test.rb
242
- - test/stripe/recipient_card_test.rb
243
- - test/stripe/refund_test.rb
244
- - test/stripe/reversal_test.rb
245
- - test/stripe/sku_test.rb
246
- - test/stripe/stripe_object_test.rb
247
- - test/stripe/subscription_test.rb
248
- - test/stripe/transfer_test.rb
249
- - test/stripe/util_test.rb
250
- - test/test_data.rb
251
- - test/test_helper.rb
252
- has_rdoc:
172
+ test_files: []