gds-api-adapters 18.7.0 → 18.8.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
  SHA1:
3
- metadata.gz: 8d0f4332878715a42de2e7846febc632f15bd2d6
4
- data.tar.gz: 5154defd507e0f38ec248edf75501333044ba6de
3
+ metadata.gz: ea89fd438cbba6c673809179881a7bdbadd0e3dc
4
+ data.tar.gz: 208b3d3b4b5c4d9d9ba3d8bef0628c7c6a39ecff
5
5
  SHA512:
6
- metadata.gz: 8b745cb843cbc419af6f14b8f028ea4919fc6ff9bbcb35f772e7293b3b4262e764eb8920b666ec34b1f799b7a4122b9e502675a4b2d22cd20e95c48448fd604f
7
- data.tar.gz: 10b7672eb0e2095b16306f161e8aa82b156b874a68d96ccf5a4ab4d641cfcc81cbcc602b50e0f63631e97e12a135d437258bbd6c5082f61a33bc98d962af1561
6
+ metadata.gz: baed69aa1bf51bc65c263f0ced8c377fee6ba2d918b8e415299669f42f434bb3c32e182081396eb10a6cbfb4de9d8edc7411943f2280bea991656da57bea9d1a
7
+ data.tar.gz: f3505c6e0d17c9525f017ace7613f4660c64f9d5e10ced0655fe1a2754af3a185e3cf0ce6d638bf8cf31398b1a64a42fb3c9e77df3884759cb034bd91f266191
@@ -17,4 +17,9 @@ class GdsApi::SupportApi < GdsApi::Base
17
17
  date_string = date.strftime("%Y-%m-%d")
18
18
  get_json!("#{endpoint}/anonymous-feedback/problem-reports/#{date_string}/totals")
19
19
  end
20
+
21
+ def anonymous_feedback(options = {})
22
+ uri = "#{endpoint}/anonymous-feedback" + query_string(options)
23
+ get_json!(uri)
24
+ end
20
25
  end
@@ -1,3 +1,4 @@
1
+ require 'cgi'
1
2
  require 'plek'
2
3
 
3
4
  module GdsApi
@@ -34,6 +35,12 @@ module GdsApi
34
35
  def support_api_isnt_available
35
36
  stub_request(:post, /#{SUPPORT_API_ENDPOINT}\/.*/).to_return(:status => 503)
36
37
  end
38
+
39
+ def stub_anonymous_feedback(params, response_body = {})
40
+ stub_http_request(:get, "#{SUPPORT_API_ENDPOINT}/anonymous-feedback").
41
+ with(query: params).
42
+ to_return(status: 200, body: response_body.to_json)
43
+ end
37
44
  end
38
45
  end
39
46
  end
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '18.7.0'
2
+ VERSION = '18.8.0'
3
3
  end
@@ -63,4 +63,20 @@ describe GdsApi::SupportApi do
63
63
 
64
64
  assert_raises(GdsApi::HTTPServerError) { @api.create_service_feedback({}) }
65
65
  end
66
+
67
+ describe "GET /anonymous-feedback" do
68
+ it "fetches anonymous feedback" do
69
+ stub_get = stub_anonymous_feedback(
70
+ path_prefix: "/vat-rates",
71
+ page: 55,
72
+ )
73
+
74
+ result = @api.anonymous_feedback(
75
+ path_prefix: "/vat-rates",
76
+ page: 55,
77
+ )
78
+
79
+ assert_requested(stub_get)
80
+ end
81
+ end
66
82
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gds-api-adapters
3
3
  version: !ruby/object:Gem::Version
4
- version: 18.7.0
4
+ version: 18.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Stewart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-13 00:00:00.000000000 Z
11
+ date: 2015-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plek