stripe 4.0.3 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d48581c1171216fe7ef9531bec2b538d86c9efa3
4
- data.tar.gz: 52b3b1afca13937918ba3e18b3bbdceeece78119
2
+ SHA256:
3
+ metadata.gz: 31bf83bcb4878f37c0bcdc2abfed143d7c519917f906b6f7050efd74ee8e4ba9
4
+ data.tar.gz: c8a3f7a8291672b91cdcd0b79abdd4fe1fbdff4ef122b966838d30bf81704729
5
5
  SHA512:
6
- metadata.gz: 23ed293fa6fe762582cb8eb6fc544324e15d414775a7cd7c7ccd43ab2d0eef8b1686a1d2acdd65c31a90b94c503e6a29212df7fd61a2b0ddbb5b8fa6a8a2da15
7
- data.tar.gz: 8682b7258691c520754931d7a3e09b4c9cb2291c96f01753f8fbcbb81f307aa8fedcdc64272a312be50b0675499a6c6f59028899070b5193bc050612d4393c12
6
+ metadata.gz: 94722b7cdca3fb32fa08f91b30d7fea9711a7c7c8fc6192b42d0c7746c08f24897bfc5903514b6d73147d76245e3d30c60dc49d877a98373384983accb24d641
7
+ data.tar.gz: ebf961e85a6552e7f02f072c770ae25d4dd9f32e94ee8685d72d9fc6fa1916ff1f32f8f1a8bf1e2fc6753019b59c046a68e981632d8068d9521a049347376a4f
@@ -17,7 +17,7 @@ sudo: false
17
17
  env:
18
18
  global:
19
19
  # If changing this number, please also change it in `test/test_helper.rb`.
20
- - STRIPE_MOCK_VERSION=0.35.0
20
+ - STRIPE_MOCK_VERSION=0.37.0
21
21
 
22
22
  cache:
23
23
  directories:
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.1.0 - 2018-11-27
4
+ * [#695](https://github.com/stripe/stripe-ruby/pull/695) Add support for `ValueList` and `ValueListItem` for Radar
5
+
3
6
  ## 4.0.3 - 2018-11-19
4
7
  * [#703](https://github.com/stripe/stripe-ruby/pull/703) Don't use `Net::HTTP::Persistent` on Windows where it's not well supported
5
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.0.3
1
+ 4.1.0
@@ -75,6 +75,8 @@ require "stripe/payout"
75
75
  require "stripe/person"
76
76
  require "stripe/plan"
77
77
  require "stripe/product"
78
+ require "stripe/radar/value_list"
79
+ require "stripe/radar/value_list_item"
78
80
  require "stripe/recipient"
79
81
  require "stripe/recipient_transfer"
80
82
  require "stripe/refund"
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stripe
4
+ module Radar
5
+ class ValueList < Stripe::APIResource
6
+ extend Stripe::APIOperations::Create
7
+ include Stripe::APIOperations::Delete
8
+ extend Stripe::APIOperations::List
9
+ include Stripe::APIOperations::Save
10
+
11
+ OBJECT_NAME = "radar.value_list".freeze
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stripe
4
+ module Radar
5
+ class ValueListItem < Stripe::APIResource
6
+ extend Stripe::APIOperations::Create
7
+ include Stripe::APIOperations::Delete
8
+ extend Stripe::APIOperations::List
9
+
10
+ OBJECT_NAME = "radar.value_list_item".freeze
11
+ end
12
+ end
13
+ end
@@ -85,6 +85,8 @@ module Stripe
85
85
  Person::OBJECT_NAME => Person,
86
86
  Plan::OBJECT_NAME => Plan,
87
87
  Product::OBJECT_NAME => Product,
88
+ Radar::ValueList::OBJECT_NAME => Radar::ValueList,
89
+ Radar::ValueListItem::OBJECT_NAME => Radar::ValueListItem,
88
90
  Recipient::OBJECT_NAME => Recipient,
89
91
  RecipientTransfer::OBJECT_NAME => RecipientTransfer,
90
92
  Refund::OBJECT_NAME => Refund,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "4.0.3".freeze
4
+ VERSION = "4.1.0".freeze
5
5
  end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require ::File.expand_path("../../../test_helper", __FILE__)
4
+
5
+ module Stripe
6
+ module Radar
7
+ class ValueListItemTest < Test::Unit::TestCase
8
+ should "be listable" do
9
+ items = Stripe::Radar::ValueListItem.list(value_list: "rsl_123")
10
+ assert_requested :get, "#{Stripe.api_base}/v1/radar/value_list_items?value_list=rsl_123"
11
+ assert items.data.is_a?(Array)
12
+ assert items.first.is_a?(Stripe::Radar::ValueListItem)
13
+ end
14
+
15
+ should "be retrievable" do
16
+ item = Stripe::Radar::ValueListItem.retrieve("rsli_123")
17
+ assert_requested :get, "#{Stripe.api_base}/v1/radar/value_list_items/rsli_123"
18
+ assert item.is_a?(Stripe::Radar::ValueListItem)
19
+ end
20
+
21
+ should "be creatable" do
22
+ item = Stripe::Radar::ValueListItem.create(
23
+ value_list: "rsl_123",
24
+ value: "value"
25
+ )
26
+ assert_requested :post, "#{Stripe.api_base}/v1/radar/value_list_items"
27
+ assert item.is_a?(Stripe::Radar::ValueListItem)
28
+ end
29
+
30
+ should "be deletable" do
31
+ list = Stripe::Radar::ValueListItem.retrieve("rsli_123")
32
+ list = list.delete
33
+ assert_requested :delete, "#{Stripe.api_base}/v1/radar/value_list_items/rsli_123"
34
+ assert list.is_a?(Stripe::Radar::ValueListItem)
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ require ::File.expand_path("../../../test_helper", __FILE__)
4
+
5
+ module Stripe
6
+ module Radar
7
+ class ValueListTest < Test::Unit::TestCase
8
+ should "be listable" do
9
+ lists = Stripe::Radar::ValueList.list
10
+ assert_requested :get, "#{Stripe.api_base}/v1/radar/value_lists"
11
+ assert lists.data.is_a?(Array)
12
+ assert lists.first.is_a?(Stripe::Radar::ValueList)
13
+ end
14
+
15
+ should "be retrievable" do
16
+ list = Stripe::Radar::ValueList.retrieve("rsl_123")
17
+ assert_requested :get, "#{Stripe.api_base}/v1/radar/value_lists/rsl_123"
18
+ assert list.is_a?(Stripe::Radar::ValueList)
19
+ end
20
+
21
+ should "be creatable" do
22
+ list = Stripe::Radar::ValueList.create(
23
+ alias: "list_alias",
24
+ name: "list_name"
25
+ )
26
+ assert_requested :post, "#{Stripe.api_base}/v1/radar/value_lists"
27
+ assert list.is_a?(Stripe::Radar::ValueList)
28
+ end
29
+
30
+ should "be saveable" do
31
+ list = Stripe::Radar::ValueList.retrieve("rsl_123")
32
+ list.metadata["key"] = "value"
33
+ list.save
34
+ assert_requested :post, "#{Stripe.api_base}/v1/radar/value_lists/rsl_123"
35
+ end
36
+
37
+ should "be updateable" do
38
+ list = Stripe::Radar::ValueList.update("rsl_123", metadata: { key: "value" })
39
+ assert_requested :post, "#{Stripe.api_base}/v1/radar/value_lists/rsl_123"
40
+ assert list.is_a?(Stripe::Radar::ValueList)
41
+ end
42
+
43
+ should "be deletable" do
44
+ list = Stripe::Radar::ValueList.retrieve("rsl_123")
45
+ list = list.delete
46
+ assert_requested :delete, "#{Stripe.api_base}/v1/radar/value_lists/rsl_123"
47
+ assert list.is_a?(Stripe::Radar::ValueList)
48
+ end
49
+ end
50
+ end
51
+ end
@@ -16,7 +16,7 @@ PROJECT_ROOT = ::File.expand_path("../../", __FILE__)
16
16
  require ::File.expand_path("../test_data", __FILE__)
17
17
 
18
18
  # If changing this number, please also change it in `.travis.yml`.
19
- MOCK_MINIMUM_VERSION = "0.35.0".freeze
19
+ MOCK_MINIMUM_VERSION = "0.37.0".freeze
20
20
  MOCK_PORT = ENV["STRIPE_MOCK_PORT"] || 12_111
21
21
 
22
22
  # 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.0.3
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-19 00:00:00.000000000 Z
11
+ date: 2018-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -112,6 +112,8 @@ files:
112
112
  - lib/stripe/person.rb
113
113
  - lib/stripe/plan.rb
114
114
  - lib/stripe/product.rb
115
+ - lib/stripe/radar/value_list.rb
116
+ - lib/stripe/radar/value_list_item.rb
115
117
  - lib/stripe/recipient.rb
116
118
  - lib/stripe/recipient_transfer.rb
117
119
  - lib/stripe/refund.rb
@@ -188,6 +190,8 @@ files:
188
190
  - test/stripe/person_test.rb
189
191
  - test/stripe/plan_test.rb
190
192
  - test/stripe/product_test.rb
193
+ - test/stripe/radar/value_list_item_test.rb
194
+ - test/stripe/radar/value_list_test.rb
191
195
  - test/stripe/recipient_test.rb
192
196
  - test/stripe/refund_test.rb
193
197
  - test/stripe/reporting/report_run_test.rb
@@ -237,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
241
  version: '0'
238
242
  requirements: []
239
243
  rubyforge_project:
240
- rubygems_version: 2.6.14
244
+ rubygems_version: 2.7.8
241
245
  signing_key:
242
246
  specification_version: 4
243
247
  summary: Ruby bindings for the Stripe API
@@ -288,6 +292,8 @@ test_files:
288
292
  - test/stripe/person_test.rb
289
293
  - test/stripe/plan_test.rb
290
294
  - test/stripe/product_test.rb
295
+ - test/stripe/radar/value_list_item_test.rb
296
+ - test/stripe/radar/value_list_test.rb
291
297
  - test/stripe/recipient_test.rb
292
298
  - test/stripe/refund_test.rb
293
299
  - test/stripe/reporting/report_run_test.rb