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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31bf83bcb4878f37c0bcdc2abfed143d7c519917f906b6f7050efd74ee8e4ba9
4
- data.tar.gz: c8a3f7a8291672b91cdcd0b79abdd4fe1fbdff4ef122b966838d30bf81704729
3
+ metadata.gz: de00531ac569359b14ce994f975d62ff6ed9663d97e3bf857522ddae08841191
4
+ data.tar.gz: 93e8b0165e743413933cc1c1d97cf3bcd56e3168986aa8de67beb4b50f2682dd
5
5
  SHA512:
6
- metadata.gz: 94722b7cdca3fb32fa08f91b30d7fea9711a7c7c8fc6192b42d0c7746c08f24897bfc5903514b6d73147d76245e3d30c60dc49d877a98373384983accb24d641
7
- data.tar.gz: ebf961e85a6552e7f02f072c770ae25d4dd9f32e94ee8685d72d9fc6fa1916ff1f32f8f1a8bf1e2fc6753019b59c046a68e981632d8068d9521a049347376a4f
6
+ metadata.gz: e1422aeea2f2593ce2b3f96d5611eff442272fd1595b7db78465a23a656729d1db94d36b9dd12fbfcb4546081512696271c88aef31a7e78c24902413e2e32664
7
+ data.tar.gz: 154f852137b9765d3e67b16d66a5e880432bd2e1ded720dbea431b5ac7f6138697c8392b95c9c6667ae0c4b6f5c9babc716186bd29984c2785e94bbafaac1fd8
@@ -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.37.0
20
+ - STRIPE_MOCK_VERSION=0.38.0
21
21
 
22
22
  cache:
23
23
  directories:
@@ -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.0
1
+ 4.2.0
@@ -83,6 +83,7 @@ require "stripe/refund"
83
83
  require "stripe/reporting/report_run"
84
84
  require "stripe/reporting/report_type"
85
85
  require "stripe/reversal"
86
+ require "stripe/review"
86
87
  require "stripe/sigma/scheduled_query_run"
87
88
  require "stripe/sku"
88
89
  require "stripe/source"
@@ -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
@@ -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,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "4.1.0".freeze
4
+ VERSION = "4.2.0".freeze
5
5
  end
@@ -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
@@ -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.37.0".freeze
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.1.0
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-27 00:00:00.000000000 Z
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