stripe 5.29.1 → 5.33.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/Gemfile +0 -1
  4. data/README.md +0 -1
  5. data/VERSION +1 -1
  6. data/lib/stripe.rb +23 -21
  7. data/lib/stripe/connection_manager.rb +10 -8
  8. data/lib/stripe/oauth.rb +4 -3
  9. data/lib/stripe/object_types.rb +3 -0
  10. data/lib/stripe/resources.rb +3 -0
  11. data/lib/stripe/resources/account.rb +3 -8
  12. data/lib/stripe/resources/billing_portal/configuration.rb +14 -0
  13. data/lib/stripe/resources/file.rb +2 -1
  14. data/lib/stripe/resources/identity/verification_report.rb +12 -0
  15. data/lib/stripe/resources/identity/verification_session.rb +35 -0
  16. data/lib/stripe/stripe_client.rb +131 -64
  17. data/lib/stripe/stripe_configuration.rb +25 -9
  18. data/lib/stripe/stripe_object.rb +23 -0
  19. data/lib/stripe/util.rb +12 -6
  20. data/lib/stripe/version.rb +1 -1
  21. data/stripe.gemspec +9 -2
  22. metadata +9 -195
  23. data/.editorconfig +0 -10
  24. data/.gitattributes +0 -4
  25. data/.github/ISSUE_TEMPLATE.md +0 -5
  26. data/.gitignore +0 -8
  27. data/.rubocop.yml +0 -80
  28. data/.rubocop_todo.yml +0 -33
  29. data/.travis.yml +0 -38
  30. data/.vscode/extensions.json +0 -7
  31. data/.vscode/settings.json +0 -8
  32. data/test/openapi/README.md +0 -9
  33. data/test/stripe/account_link_test.rb +0 -18
  34. data/test/stripe/account_test.rb +0 -412
  35. data/test/stripe/alipay_account_test.rb +0 -37
  36. data/test/stripe/api_operations_test.rb +0 -80
  37. data/test/stripe/api_resource_test.rb +0 -646
  38. data/test/stripe/apple_pay_domain_test.rb +0 -46
  39. data/test/stripe/application_fee_refund_test.rb +0 -37
  40. data/test/stripe/application_fee_test.rb +0 -58
  41. data/test/stripe/balance_test.rb +0 -13
  42. data/test/stripe/balance_transaction_test.rb +0 -20
  43. data/test/stripe/bank_account_test.rb +0 -36
  44. data/test/stripe/billing_portal/session_test.rb +0 -18
  45. data/test/stripe/capability_test.rb +0 -45
  46. data/test/stripe/charge_test.rb +0 -64
  47. data/test/stripe/checkout/session_test.rb +0 -53
  48. data/test/stripe/connection_manager_test.rb +0 -167
  49. data/test/stripe/country_spec_test.rb +0 -20
  50. data/test/stripe/coupon_test.rb +0 -61
  51. data/test/stripe/credit_note_test.rb +0 -90
  52. data/test/stripe/customer_balance_transaction_test.rb +0 -37
  53. data/test/stripe/customer_card_test.rb +0 -48
  54. data/test/stripe/customer_test.rb +0 -226
  55. data/test/stripe/dispute_test.rb +0 -51
  56. data/test/stripe/ephemeral_key_test.rb +0 -93
  57. data/test/stripe/errors_test.rb +0 -53
  58. data/test/stripe/exchange_rate_test.rb +0 -20
  59. data/test/stripe/file_link_test.rb +0 -41
  60. data/test/stripe/file_test.rb +0 -87
  61. data/test/stripe/instrumentation_test.rb +0 -74
  62. data/test/stripe/invoice_item_test.rb +0 -66
  63. data/test/stripe/invoice_line_item_test.rb +0 -8
  64. data/test/stripe/invoice_test.rb +0 -229
  65. data/test/stripe/issuing/authorization_test.rb +0 -72
  66. data/test/stripe/issuing/card_test.rb +0 -74
  67. data/test/stripe/issuing/cardholder_test.rb +0 -53
  68. data/test/stripe/issuing/dispute_test.rb +0 -54
  69. data/test/stripe/issuing/transaction_test.rb +0 -48
  70. data/test/stripe/list_object_test.rb +0 -202
  71. data/test/stripe/login_link_test.rb +0 -37
  72. data/test/stripe/mandate_test.rb +0 -14
  73. data/test/stripe/multipart_encoder_test.rb +0 -130
  74. data/test/stripe/oauth_test.rb +0 -104
  75. data/test/stripe/order_return_test.rb +0 -21
  76. data/test/stripe/order_test.rb +0 -82
  77. data/test/stripe/payment_intent_test.rb +0 -107
  78. data/test/stripe/payment_method_test.rb +0 -84
  79. data/test/stripe/payout_test.rb +0 -72
  80. data/test/stripe/person_test.rb +0 -46
  81. data/test/stripe/plan_test.rb +0 -98
  82. data/test/stripe/price_test.rb +0 -48
  83. data/test/stripe/product_test.rb +0 -58
  84. data/test/stripe/promotion_code_test.rb +0 -42
  85. data/test/stripe/radar/early_fraud_warning_test.rb +0 -22
  86. data/test/stripe/radar/value_list_item_test.rb +0 -48
  87. data/test/stripe/radar/value_list_test.rb +0 -61
  88. data/test/stripe/recipient_test.rb +0 -62
  89. data/test/stripe/refund_test.rb +0 -39
  90. data/test/stripe/reporting/report_run_test.rb +0 -33
  91. data/test/stripe/reporting/report_type_test.rb +0 -22
  92. data/test/stripe/reversal_test.rb +0 -43
  93. data/test/stripe/review_test.rb +0 -27
  94. data/test/stripe/setup_attempt_test.rb +0 -16
  95. data/test/stripe/setup_intent_test.rb +0 -84
  96. data/test/stripe/sigma/scheduled_query_run_test.rb +0 -22
  97. data/test/stripe/sku_test.rb +0 -60
  98. data/test/stripe/source_test.rb +0 -119
  99. data/test/stripe/stripe_client_test.rb +0 -1291
  100. data/test/stripe/stripe_configuration_test.rb +0 -131
  101. data/test/stripe/stripe_object_test.rb +0 -500
  102. data/test/stripe/stripe_response_test.rb +0 -95
  103. data/test/stripe/subscription_item_test.rb +0 -84
  104. data/test/stripe/subscription_schedule_test.rb +0 -82
  105. data/test/stripe/subscription_test.rb +0 -80
  106. data/test/stripe/tax_id_test.rb +0 -31
  107. data/test/stripe/tax_rate_test.rb +0 -43
  108. data/test/stripe/terminal/connection_token_test.rb +0 -16
  109. data/test/stripe/terminal/location_test.rb +0 -68
  110. data/test/stripe/terminal/reader_test.rb +0 -62
  111. data/test/stripe/three_d_secure_test.rb +0 -23
  112. data/test/stripe/topup_test.rb +0 -62
  113. data/test/stripe/transfer_test.rb +0 -88
  114. data/test/stripe/usage_record_summary_test.rb +0 -29
  115. data/test/stripe/util_test.rb +0 -402
  116. data/test/stripe/webhook_endpoint_test.rb +0 -59
  117. data/test/stripe/webhook_test.rb +0 -135
  118. data/test/stripe_mock.rb +0 -78
  119. data/test/stripe_test.rb +0 -132
  120. data/test/test_data.rb +0 -61
  121. data/test/test_helper.rb +0 -77
data/test/test_helper.rb DELETED
@@ -1,77 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "coveralls"
4
- Coveralls.wear!("test_frameworks")
5
-
6
- require "stripe"
7
- require "test/unit"
8
- require "mocha/setup"
9
- require "stringio"
10
- require "shoulda/context"
11
- require "webmock/test_unit"
12
-
13
- PROJECT_ROOT = ::File.expand_path("../", __dir__)
14
-
15
- require ::File.expand_path("test_data", __dir__)
16
- require ::File.expand_path("stripe_mock", __dir__)
17
-
18
- # If changing this number, please also change it in `.travis.yml`.
19
- MOCK_MINIMUM_VERSION = "0.101.0"
20
- MOCK_PORT = Stripe::StripeMock.start
21
-
22
- # Disable all real network connections except those that are outgoing to
23
- # stripe-mock.
24
- WebMock.disable_net_connect!(allow: "localhost:#{MOCK_PORT}")
25
-
26
- # Try one initial test connection to stripe-mock so that if there's a problem
27
- # we can print one error and fail fast so that it's more clear to the user how
28
- # they should fix the problem.
29
- begin
30
- resp = Net::HTTP.get_response(URI("http://localhost:#{MOCK_PORT}/"))
31
- version = resp["Stripe-Mock-Version"]
32
-
33
- if version.nil?
34
- abort("Couldn't find `Stripe-Mock-Version` in response from " \
35
- "`localhost:#{MOCK_PORT}`. Is the service running there stripe-mock?")
36
- end
37
-
38
- if version != "master" &&
39
- Gem::Version.new(version) < Gem::Version.new(MOCK_MINIMUM_VERSION)
40
- abort("Your version of stripe-mock (#{version}) is too old. The minimum " \
41
- "version to run this test suite is #{MOCK_MINIMUM_VERSION}. Please " \
42
- "see its repository for upgrade instructions.")
43
- end
44
- rescue Errno::ECONNREFUSED
45
- abort("Couldn't reach stripe-mock at `localhost:#{MOCK_PORT}`. Is " \
46
- "it running? Please see README for setup instructions.")
47
- end
48
-
49
- Test::Unit.at_exit do
50
- Stripe::StripeMock.stop
51
- end
52
-
53
- module Test
54
- module Unit
55
- class TestCase
56
- include Stripe::TestData
57
- include Mocha
58
-
59
- WRITE_TIMEOUT_SUPPORTED = Net::HTTP.instance_methods.include?(:write_timeout=)
60
-
61
- setup do
62
- Stripe.api_key = "sk_test_123"
63
- Stripe.api_base = "http://localhost:#{MOCK_PORT}"
64
-
65
- stub_connect
66
- end
67
-
68
- teardown do
69
- Stripe.api_key = nil
70
- end
71
-
72
- private def stub_connect
73
- stub_request(:any, /^#{Stripe.connect_base}/).to_return(body: "{}")
74
- end
75
- end
76
- end
77
- end