stripe 4.18.0 → 4.18.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +11 -1
- data/.rubocop_todo.yml +3 -15
- data/CHANGELOG.md +3 -0
- data/Gemfile +3 -1
- data/VERSION +1 -1
- data/lib/stripe.rb +5 -3
- data/lib/stripe/account.rb +31 -17
- data/lib/stripe/alipay_account.rb +10 -3
- data/lib/stripe/api_operations/nested_resource.rb +12 -6
- data/lib/stripe/api_operations/request.rb +3 -7
- data/lib/stripe/api_operations/save.rb +1 -3
- data/lib/stripe/api_resource.rb +11 -3
- data/lib/stripe/application_fee.rb +2 -1
- data/lib/stripe/application_fee_refund.rb +11 -3
- data/lib/stripe/bank_account.rb +16 -4
- data/lib/stripe/bitcoin_receiver.rb +2 -1
- data/lib/stripe/capability.rb +10 -3
- data/lib/stripe/card.rb +16 -5
- data/lib/stripe/charge.rb +4 -6
- data/lib/stripe/customer.rb +5 -7
- data/lib/stripe/ephemeral_key.rb +4 -1
- data/lib/stripe/errors.rb +8 -8
- data/lib/stripe/invoice.rb +2 -1
- data/lib/stripe/list_object.rb +9 -4
- data/lib/stripe/login_link.rb +4 -1
- data/lib/stripe/order.rb +3 -5
- data/lib/stripe/person.rb +7 -2
- data/lib/stripe/reversal.rb +10 -3
- data/lib/stripe/singleton_api_resource.rb +3 -1
- data/lib/stripe/source.rb +4 -2
- data/lib/stripe/stripe_client.rb +84 -65
- data/lib/stripe/stripe_object.rb +50 -36
- data/lib/stripe/subscription.rb +1 -3
- data/lib/stripe/subscription_item.rb +2 -1
- data/lib/stripe/subscription_schedule_revision.rb +13 -4
- data/lib/stripe/tax_id.rb +7 -3
- data/lib/stripe/transfer.rb +2 -1
- data/lib/stripe/usage_record.rb +12 -3
- data/lib/stripe/util.rb +40 -24
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe/webhook.rb +4 -2
- data/stripe.gemspec +4 -2
- data/test/stripe/account_link_test.rb +1 -1
- data/test/stripe/account_test.rb +1 -1
- data/test/stripe/alipay_account_test.rb +1 -1
- data/test/stripe/api_operations_test.rb +1 -2
- data/test/stripe/api_resource_test.rb +5 -8
- data/test/stripe/apple_pay_domain_test.rb +1 -1
- data/test/stripe/application_fee_refund_test.rb +1 -1
- data/test/stripe/application_fee_test.rb +1 -1
- data/test/stripe/balance_test.rb +1 -1
- data/test/stripe/bank_account_test.rb +1 -1
- data/test/stripe/capability_test.rb +1 -1
- data/test/stripe/charge_test.rb +1 -1
- data/test/stripe/checkout/session_test.rb +1 -1
- data/test/stripe/country_spec_test.rb +1 -1
- data/test/stripe/coupon_test.rb +1 -1
- data/test/stripe/credit_note_test.rb +1 -1
- data/test/stripe/customer_card_test.rb +1 -1
- data/test/stripe/customer_test.rb +1 -1
- data/test/stripe/dispute_test.rb +1 -1
- data/test/stripe/ephemeral_key_test.rb +1 -1
- data/test/stripe/errors_test.rb +1 -1
- data/test/stripe/exchange_rate_test.rb +1 -1
- data/test/stripe/file_link_test.rb +1 -1
- data/test/stripe/file_test.rb +1 -1
- data/test/stripe/file_upload_test.rb +1 -1
- data/test/stripe/invoice_item_test.rb +1 -1
- data/test/stripe/invoice_line_item_test.rb +1 -1
- data/test/stripe/invoice_test.rb +1 -1
- data/test/stripe/issuer_fraud_record_test.rb +1 -1
- data/test/stripe/issuing/authorization_test.rb +1 -1
- data/test/stripe/issuing/card_test.rb +1 -1
- data/test/stripe/issuing/cardholder_test.rb +1 -1
- data/test/stripe/issuing/dispute_test.rb +1 -1
- data/test/stripe/issuing/transaction_test.rb +1 -1
- data/test/stripe/list_object_test.rb +1 -1
- data/test/stripe/login_link_test.rb +1 -1
- data/test/stripe/oauth_test.rb +1 -1
- data/test/stripe/order_return_test.rb +1 -1
- data/test/stripe/order_test.rb +8 -1
- data/test/stripe/payment_intent_test.rb +1 -1
- data/test/stripe/payment_method_test.rb +1 -1
- data/test/stripe/payout_test.rb +1 -1
- data/test/stripe/person_test.rb +1 -1
- data/test/stripe/plan_test.rb +1 -1
- data/test/stripe/product_test.rb +1 -1
- data/test/stripe/radar/early_fraud_warning_test.rb +1 -1
- data/test/stripe/radar/value_list_item_test.rb +1 -1
- data/test/stripe/radar/value_list_test.rb +1 -1
- data/test/stripe/recipient_test.rb +1 -1
- data/test/stripe/refund_test.rb +1 -1
- data/test/stripe/reporting/report_run_test.rb +1 -1
- data/test/stripe/reporting/report_type_test.rb +1 -1
- data/test/stripe/reversal_test.rb +1 -1
- data/test/stripe/review_test.rb +1 -1
- data/test/stripe/sigma/scheduled_query_run_test.rb +1 -1
- data/test/stripe/sku_test.rb +1 -1
- data/test/stripe/source_test.rb +1 -1
- data/test/stripe/source_transaction_test.rb +1 -1
- data/test/stripe/stripe_client_test.rb +1 -1
- data/test/stripe/stripe_object_test.rb +1 -1
- data/test/stripe/stripe_response_test.rb +1 -1
- data/test/stripe/subscription_item_test.rb +1 -1
- data/test/stripe/subscription_schedule_revision_test.rb +1 -1
- data/test/stripe/subscription_schedule_test.rb +1 -1
- data/test/stripe/subscription_test.rb +1 -1
- data/test/stripe/tax_id_test.rb +1 -1
- data/test/stripe/tax_rate_test.rb +1 -1
- data/test/stripe/terminal/connection_token_test.rb +1 -1
- data/test/stripe/terminal/location_test.rb +1 -1
- data/test/stripe/terminal/reader_test.rb +1 -1
- data/test/stripe/three_d_secure_test.rb +1 -1
- data/test/stripe/topup_test.rb +1 -1
- data/test/stripe/transfer_test.rb +1 -1
- data/test/stripe/usage_record_summary_test.rb +1 -1
- data/test/stripe/usage_record_test.rb +1 -1
- data/test/stripe/util_test.rb +1 -1
- data/test/stripe/webhook_endpoint_test.rb +1 -1
- data/test/stripe/webhook_test.rb +2 -2
- data/test/stripe_test.rb +1 -1
- data/test/test_helper.rb +4 -6
- metadata +2 -2
data/test/stripe/payout_test.rb
CHANGED
data/test/stripe/person_test.rb
CHANGED
data/test/stripe/plan_test.rb
CHANGED
data/test/stripe/product_test.rb
CHANGED
data/test/stripe/refund_test.rb
CHANGED
data/test/stripe/review_test.rb
CHANGED
data/test/stripe/sku_test.rb
CHANGED
data/test/stripe/source_test.rb
CHANGED
data/test/stripe/tax_id_test.rb
CHANGED
data/test/stripe/topup_test.rb
CHANGED
data/test/stripe/util_test.rb
CHANGED
data/test/stripe/webhook_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require ::File.expand_path("
|
3
|
+
require ::File.expand_path("../test_helper", __dir__)
|
4
4
|
|
5
5
|
module Stripe
|
6
6
|
class WebhookTest < Test::Unit::TestCase
|
@@ -46,7 +46,7 @@ module Stripe
|
|
46
46
|
|
47
47
|
context ".verify_signature_header" do
|
48
48
|
should "raise a SignatureVerificationError when the header does not have the expected format" do
|
49
|
-
header =
|
49
|
+
header = "i'm not even a real signature header"
|
50
50
|
e = assert_raises(Stripe::SignatureVerificationError) do
|
51
51
|
Stripe::Webhook::Signature.verify_header(EVENT_PAYLOAD, header, "secret")
|
52
52
|
end
|
data/test/stripe_test.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -11,10 +11,10 @@ require "shoulda/context"
|
|
11
11
|
require "timecop"
|
12
12
|
require "webmock/test_unit"
|
13
13
|
|
14
|
-
PROJECT_ROOT = ::File.expand_path("
|
14
|
+
PROJECT_ROOT = ::File.expand_path("../", __dir__)
|
15
15
|
|
16
|
-
require ::File.expand_path("
|
17
|
-
require ::File.expand_path("
|
16
|
+
require ::File.expand_path("test_data", __dir__)
|
17
|
+
require ::File.expand_path("stripe_mock", __dir__)
|
18
18
|
|
19
19
|
# If changing this number, please also change it in `.travis.yml`.
|
20
20
|
MOCK_MINIMUM_VERSION = "0.57.0".freeze
|
@@ -63,9 +63,7 @@ module Test
|
|
63
63
|
Stripe.api_key = nil
|
64
64
|
end
|
65
65
|
|
66
|
-
private
|
67
|
-
|
68
|
-
def stub_connect
|
66
|
+
private def stub_connect
|
69
67
|
stub_request(:any, /^#{Stripe.connect_base}/).to_return(body: "{}")
|
70
68
|
end
|
71
69
|
end
|
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: 4.18.
|
4
|
+
version: 4.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|