stripe 4.1.0 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/lib/stripe.rb +1 -0
- data/lib/stripe/review.rb +14 -0
- data/lib/stripe/util.rb +1 -0
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/review_test.rb +27 -0
- data/test/test_helper.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de00531ac569359b14ce994f975d62ff6ed9663d97e3bf857522ddae08841191
|
4
|
+
data.tar.gz: 93e8b0165e743413933cc1c1d97cf3bcd56e3168986aa8de67beb4b50f2682dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1422aeea2f2593ce2b3f96d5611eff442272fd1595b7db78465a23a656729d1db94d36b9dd12fbfcb4546081512696271c88aef31a7e78c24902413e2e32664
|
7
|
+
data.tar.gz: 154f852137b9765d3e67b16d66a5e880432bd2e1ded720dbea431b5ac7f6138697c8392b95c9c6667ae0c4b6f5c9babc716186bd29984c2785e94bbafaac1fd8
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 4.2.0 - 2018-11-28
|
4
|
+
* [#705](https://github.com/stripe/stripe-ruby/pull/705) Add support for the `Review` APIs
|
5
|
+
|
3
6
|
## 4.1.0 - 2018-11-27
|
4
7
|
* [#695](https://github.com/stripe/stripe-ruby/pull/695) Add support for `ValueList` and `ValueListItem` for Radar
|
5
8
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.
|
1
|
+
4.2.0
|
data/lib/stripe.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Stripe
|
4
|
+
class Review < APIResource
|
5
|
+
extend Stripe::APIOperations::List
|
6
|
+
|
7
|
+
OBJECT_NAME = "review".freeze
|
8
|
+
|
9
|
+
def approve(params = {}, opts = {})
|
10
|
+
resp, opts = request(:post, resource_url + "/approve", params, opts)
|
11
|
+
initialize_from(resp.data, opts)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/stripe/util.rb
CHANGED
@@ -93,6 +93,7 @@ module Stripe
|
|
93
93
|
Reporting::ReportRun::OBJECT_NAME => Reporting::ReportRun,
|
94
94
|
Reporting::ReportType::OBJECT_NAME => Reporting::ReportType,
|
95
95
|
Reversal::OBJECT_NAME => Reversal,
|
96
|
+
Review::OBJECT_NAME => Review,
|
96
97
|
SKU::OBJECT_NAME => SKU,
|
97
98
|
Sigma::ScheduledQueryRun::OBJECT_NAME => Sigma::ScheduledQueryRun,
|
98
99
|
Source::OBJECT_NAME => Source,
|
data/lib/stripe/version.rb
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require ::File.expand_path("../../test_helper", __FILE__)
|
4
|
+
|
5
|
+
module Stripe
|
6
|
+
class ReviewTest < Test::Unit::TestCase
|
7
|
+
should "be listable" do
|
8
|
+
reviews = Stripe::Review.list
|
9
|
+
assert_requested :get, "#{Stripe.api_base}/v1/reviews"
|
10
|
+
assert reviews.data.is_a?(Array)
|
11
|
+
assert reviews.first.is_a?(Stripe::Review)
|
12
|
+
end
|
13
|
+
|
14
|
+
should "be retrievable" do
|
15
|
+
review = Stripe::Review.retrieve("prv_123")
|
16
|
+
assert_requested :get, "#{Stripe.api_base}/v1/reviews/prv_123"
|
17
|
+
assert review.is_a?(Stripe::Review)
|
18
|
+
end
|
19
|
+
|
20
|
+
should "be approvable" do
|
21
|
+
review = Stripe::Review.retrieve("prv_123")
|
22
|
+
review.approve
|
23
|
+
assert_requested :post, "#{Stripe.api_base}/v1/reviews/prv_123/approve"
|
24
|
+
assert review.is_a?(Stripe::Review)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -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.
|
19
|
+
MOCK_MINIMUM_VERSION = "0.38.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.
|
4
|
+
version: 4.2.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-
|
11
|
+
date: 2018-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -120,6 +120,7 @@ files:
|
|
120
120
|
- lib/stripe/reporting/report_run.rb
|
121
121
|
- lib/stripe/reporting/report_type.rb
|
122
122
|
- lib/stripe/reversal.rb
|
123
|
+
- lib/stripe/review.rb
|
123
124
|
- lib/stripe/sigma/scheduled_query_run.rb
|
124
125
|
- lib/stripe/singleton_api_resource.rb
|
125
126
|
- lib/stripe/sku.rb
|
@@ -197,6 +198,7 @@ files:
|
|
197
198
|
- test/stripe/reporting/report_run_test.rb
|
198
199
|
- test/stripe/reporting/report_type_test.rb
|
199
200
|
- test/stripe/reversal_test.rb
|
201
|
+
- test/stripe/review_test.rb
|
200
202
|
- test/stripe/sigma/scheduled_query_run_test.rb
|
201
203
|
- test/stripe/sku_test.rb
|
202
204
|
- test/stripe/source_test.rb
|
@@ -299,6 +301,7 @@ test_files:
|
|
299
301
|
- test/stripe/reporting/report_run_test.rb
|
300
302
|
- test/stripe/reporting/report_type_test.rb
|
301
303
|
- test/stripe/reversal_test.rb
|
304
|
+
- test/stripe/review_test.rb
|
302
305
|
- test/stripe/sigma/scheduled_query_run_test.rb
|
303
306
|
- test/stripe/sku_test.rb
|
304
307
|
- test/stripe/source_test.rb
|