stripe 4.17.0 → 4.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.editorconfig +10 -0
- data/.travis.yml +2 -1
- data/.vscode/extensions.json +7 -0
- data/.vscode/settings.json +8 -0
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/lib/stripe.rb +1 -0
- data/lib/stripe/radar/early_fraud_warning.rb +11 -0
- data/lib/stripe/util.rb +1 -0
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/api_resource_test.rb +1 -1
- data/test/stripe/payment_intent_test.rb +2 -2
- data/test/stripe/radar/early_fraud_warning_test.rb +22 -0
- data/test/test_helper.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa4fff8f85be6e986db2d71a6bc50c8cfaf9fd64ad838c8538d0af66e0fddf31
|
4
|
+
data.tar.gz: '0494e9d502030d6c2410ccc3fc921cf465a7c2863307b74e33fe7ea842666cf7'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '07383793b058de60012ced7bebdcaee1b75a2ad6dff5df55c5cfefd933fffbdf18e1b332d7c40aaf8702067eedc41f62256daedf269d4d519f46c9b8005f7df5'
|
7
|
+
data.tar.gz: f7a5b758f8821c39c782c56a9472c46a104bd118af4aebd951bcef7edbe67aebd0eef779ca1fbb33fdc42de8e7f41a127d233cb48ae208e3b84d66c9e0de3178
|
data/.editorconfig
ADDED
data/.travis.yml
CHANGED
@@ -6,6 +6,7 @@ rvm:
|
|
6
6
|
- 2.3
|
7
7
|
- 2.4
|
8
8
|
- 2.5
|
9
|
+
- 2.6
|
9
10
|
- jruby-9.0.5.0
|
10
11
|
|
11
12
|
notifications:
|
@@ -17,7 +18,7 @@ sudo: false
|
|
17
18
|
env:
|
18
19
|
global:
|
19
20
|
# If changing this number, please also change it in `test/test_helper.rb`.
|
20
|
-
- STRIPE_MOCK_VERSION=0.
|
21
|
+
- STRIPE_MOCK_VERSION=0.57.0
|
21
22
|
|
22
23
|
cache:
|
23
24
|
directories:
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 4.18.0 - 2019-05-23
|
4
|
+
* [#783](https://github.com/stripe/stripe-ruby/pull/783) Add support for `radar.early_fraud_warning` resource
|
5
|
+
|
3
6
|
## 4.17.0 - 2019-05-14
|
4
7
|
* [#779](https://github.com/stripe/stripe-ruby/pull/779) Add support for the Capability resource and APIs
|
5
8
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.
|
1
|
+
4.18.0
|
data/lib/stripe.rb
CHANGED
data/lib/stripe/util.rb
CHANGED
@@ -91,6 +91,7 @@ module Stripe
|
|
91
91
|
Person::OBJECT_NAME => Person,
|
92
92
|
Plan::OBJECT_NAME => Plan,
|
93
93
|
Product::OBJECT_NAME => Product,
|
94
|
+
Radar::EarlyFraudWarning::OBJECT_NAME => Radar::EarlyFraudWarning,
|
94
95
|
Radar::ValueList::OBJECT_NAME => Radar::ValueList,
|
95
96
|
Radar::ValueListItem::OBJECT_NAME => Radar::ValueListItem,
|
96
97
|
Recipient::OBJECT_NAME => Recipient,
|
data/lib/stripe/version.rb
CHANGED
@@ -307,7 +307,7 @@ module Stripe
|
|
307
307
|
charges = Stripe::Charge.list.data
|
308
308
|
assert charges.is_a? Array
|
309
309
|
assert charges[0].is_a? Stripe::Charge
|
310
|
-
assert charges[0].
|
310
|
+
assert charges[0].payment_method_details.is_a?(Stripe::StripeObject)
|
311
311
|
end
|
312
312
|
|
313
313
|
should "passing in a stripe_account header should pass it through on call" do
|
@@ -87,7 +87,7 @@ module Stripe
|
|
87
87
|
should "confirm a payment_intent" do
|
88
88
|
payment_intent = Stripe::PaymentIntent.construct_from(id: "pi_123", object: "payment_intent")
|
89
89
|
payment_intent = payment_intent.confirm(
|
90
|
-
|
90
|
+
payment_method: "pm_123"
|
91
91
|
)
|
92
92
|
|
93
93
|
assert_requested :post, "#{Stripe.api_base}/v1/payment_intents/pi_123/confirm"
|
@@ -97,7 +97,7 @@ module Stripe
|
|
97
97
|
|
98
98
|
context ".confirm" do
|
99
99
|
should "confirm a payment_intent" do
|
100
|
-
payment_intent = Stripe::PaymentIntent.confirm("pi_123",
|
100
|
+
payment_intent = Stripe::PaymentIntent.confirm("pi_123", payment_method: "pm_123")
|
101
101
|
|
102
102
|
assert_requested :post, "#{Stripe.api_base}/v1/payment_intents/pi_123/confirm"
|
103
103
|
assert payment_intent.is_a?(Stripe::PaymentIntent)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require ::File.expand_path("../../../test_helper", __FILE__)
|
4
|
+
|
5
|
+
module Stripe
|
6
|
+
module Radar
|
7
|
+
class EarlyFraudWarningTest < Test::Unit::TestCase
|
8
|
+
should "be listable" do
|
9
|
+
warnings = Stripe::Radar::EarlyFraudWarning.list
|
10
|
+
assert_requested :get, "#{Stripe.api_base}/v1/radar/early_fraud_warnings"
|
11
|
+
assert warnings.data.is_a?(Array)
|
12
|
+
assert warnings.data[0].is_a?(Stripe::Radar::EarlyFraudWarning)
|
13
|
+
end
|
14
|
+
|
15
|
+
should "be retrievable" do
|
16
|
+
warning = Stripe::Radar::EarlyFraudWarning.retrieve("issfr_123")
|
17
|
+
assert_requested :get, "#{Stripe.api_base}/v1/radar/early_fraud_warnings/issfr_123"
|
18
|
+
assert warning.is_a?(Stripe::Radar::EarlyFraudWarning)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -17,7 +17,7 @@ require ::File.expand_path("../test_data", __FILE__)
|
|
17
17
|
require ::File.expand_path("../stripe_mock", __FILE__)
|
18
18
|
|
19
19
|
# If changing this number, please also change it in `.travis.yml`.
|
20
|
-
MOCK_MINIMUM_VERSION = "0.
|
20
|
+
MOCK_MINIMUM_VERSION = "0.57.0".freeze
|
21
21
|
MOCK_PORT = Stripe::StripeMock.start
|
22
22
|
|
23
23
|
# Disable all real network connections except those that are outgoing to
|
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.
|
4
|
+
version: 4.18.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-05-
|
11
|
+
date: 2019-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -46,12 +46,15 @@ executables:
|
|
46
46
|
extensions: []
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
|
+
- ".editorconfig"
|
49
50
|
- ".gitattributes"
|
50
51
|
- ".github/ISSUE_TEMPLATE.md"
|
51
52
|
- ".gitignore"
|
52
53
|
- ".rubocop.yml"
|
53
54
|
- ".rubocop_todo.yml"
|
54
55
|
- ".travis.yml"
|
56
|
+
- ".vscode/extensions.json"
|
57
|
+
- ".vscode/settings.json"
|
55
58
|
- CHANGELOG.md
|
56
59
|
- CONTRIBUTORS
|
57
60
|
- Gemfile
|
@@ -118,6 +121,7 @@ files:
|
|
118
121
|
- lib/stripe/person.rb
|
119
122
|
- lib/stripe/plan.rb
|
120
123
|
- lib/stripe/product.rb
|
124
|
+
- lib/stripe/radar/early_fraud_warning.rb
|
121
125
|
- lib/stripe/radar/value_list.rb
|
122
126
|
- lib/stripe/radar/value_list_item.rb
|
123
127
|
- lib/stripe/recipient.rb
|
@@ -202,6 +206,7 @@ files:
|
|
202
206
|
- test/stripe/person_test.rb
|
203
207
|
- test/stripe/plan_test.rb
|
204
208
|
- test/stripe/product_test.rb
|
209
|
+
- test/stripe/radar/early_fraud_warning_test.rb
|
205
210
|
- test/stripe/radar/value_list_item_test.rb
|
206
211
|
- test/stripe/radar/value_list_test.rb
|
207
212
|
- test/stripe/recipient_test.rb
|
@@ -309,6 +314,7 @@ test_files:
|
|
309
314
|
- test/stripe/person_test.rb
|
310
315
|
- test/stripe/plan_test.rb
|
311
316
|
- test/stripe/product_test.rb
|
317
|
+
- test/stripe/radar/early_fraud_warning_test.rb
|
312
318
|
- test/stripe/radar/value_list_item_test.rb
|
313
319
|
- test/stripe/radar/value_list_test.rb
|
314
320
|
- test/stripe/recipient_test.rb
|