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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d3a140d2d3cb343cb427df5438201a04e82a8eb71cb352241955e4ae70ca6c3
4
- data.tar.gz: d6bac1ffd1f4b9b5210bdd684b443fd6c12f1cc8084a854e728c8893f1dc768f
3
+ metadata.gz: aa4fff8f85be6e986db2d71a6bc50c8cfaf9fd64ad838c8538d0af66e0fddf31
4
+ data.tar.gz: '0494e9d502030d6c2410ccc3fc921cf465a7c2863307b74e33fe7ea842666cf7'
5
5
  SHA512:
6
- metadata.gz: 2d88469f61576501ebe5e9795381aba16fa4452eae217c4721abe8159468a8489ad54a18e09384c337f3fdebae4a3e5e5d0ae100f3587c491c880472d4cdd7f3
7
- data.tar.gz: 575ab9b320e2dd5642964ad6a0b125d6c28cac9cfaa98260bb86b4489369e5413531bf26a285b85dd68f2d5afbace0beabd754f967b4aaa9c295d6644bcab058
6
+ metadata.gz: '07383793b058de60012ced7bebdcaee1b75a2ad6dff5df55c5cfefd933fffbdf18e1b332d7c40aaf8702067eedc41f62256daedf269d4d519f46c9b8005f7df5'
7
+ data.tar.gz: f7a5b758f8821c39c782c56a9472c46a104bd118af4aebd951bcef7edbe67aebd0eef779ca1fbb33fdc42de8e7f41a127d233cb48ae208e3b84d66c9e0de3178
@@ -0,0 +1,10 @@
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
@@ -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.56.0
21
+ - STRIPE_MOCK_VERSION=0.57.0
21
22
 
22
23
  cache:
23
24
  directories:
@@ -0,0 +1,7 @@
1
+ {
2
+ "recommendations": [
3
+ "rebornix.ruby",
4
+ "misogi.ruby-rubocop",
5
+ "EditorConfig.editorconfig"
6
+ ]
7
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "editor.formatOnSave": true,
3
+ "files.trimTrailingWhitespace": true,
4
+
5
+ // Rubocop settings
6
+ "ruby.rubocop.configFilePath": ".rubocop.yml",
7
+ "ruby.rubocop.onSave": true
8
+ }
@@ -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.17.0
1
+ 4.18.0
@@ -81,6 +81,7 @@ require "stripe/payout"
81
81
  require "stripe/person"
82
82
  require "stripe/plan"
83
83
  require "stripe/product"
84
+ require "stripe/radar/early_fraud_warning"
84
85
  require "stripe/radar/value_list"
85
86
  require "stripe/radar/value_list_item"
86
87
  require "stripe/recipient"
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stripe
4
+ module Radar
5
+ class EarlyFraudWarning < APIResource
6
+ extend Stripe::APIOperations::List
7
+
8
+ OBJECT_NAME = "radar.early_fraud_warning".freeze
9
+ end
10
+ end
11
+ end
@@ -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,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "4.17.0".freeze
4
+ VERSION = "4.18.0".freeze
5
5
  end
@@ -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].source.is_a?(Stripe::StripeObject)
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
- source: "src_123"
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", source: "src_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
@@ -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.56.0".freeze
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.17.0
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-14 00:00:00.000000000 Z
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