gds-api-adapters 92.0.0 → 93.0.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: fa430c81b388aeac9ba84ad16f9749119037eb12a189c80004c7c789f813f158
4
- data.tar.gz: e01b6cd9c760f72f8c542206de12770e44b75bc18252480b10d84fb046d5ac0d
3
+ metadata.gz: 246d3e19fde013596f00176c8025ab518b83e9b3afef59157c777dba6e451a7c
4
+ data.tar.gz: '0885d4cbe7e587559f96ce6078253fc7095298cd37ec77657a1e2c2d97babfac'
5
5
  SHA512:
6
- metadata.gz: 2cd5ab36cbac5f9b4854ce5658b6f41a8e43780d2b0a9e6ed08d59b2e1fccbf95950d259c7e344ea48b09986ff8a205cfea0caf19890ec780fcba50a25e2d472
7
- data.tar.gz: 314e8b47ec5457681aa8e0048331340d24bef56c7c7221f6308015c75cf878579ac41615d80e855fc96350322d7b6fc03921455caffef887873ea3f11b42721b
6
+ metadata.gz: 2190ae98455514fca011b28685647f7d6093a6691c9e83e107f4f8cd89089ac0aabd37b69a7ef804aafa29d6e598155e179474b3ec32c01cf312ebba8fff9759
7
+ data.tar.gz: a55f13f83aa86b865a9d0c4e7090b9489ae1158f0fad3fc526be83417f27a08c726588b182ea0a25c69eea08ebc2b98d07b338637354f7d5be1f441fbbae5895
@@ -94,6 +94,19 @@ class GdsApi::EmailAlertApi < GdsApi::Base
94
94
  get_json("#{endpoint}/subscriber-lists/#{uri_encode(slug)}")
95
95
  end
96
96
 
97
+ # Get a Subscriber List
98
+ #
99
+ # @param [path] path of page for subscriber list
100
+ #
101
+ # @return [Hash] {
102
+ # subscriber_list_count
103
+ # all_notify_count
104
+ # }
105
+
106
+ def get_subscriber_list_metrics(path:)
107
+ get_json("#{endpoint}/subscriber-lists/metrics#{path}")
108
+ end
109
+
97
110
  # Get a Subscription
98
111
  #
99
112
  # @return [Hash] subscription: {
@@ -6,7 +6,7 @@ module GdsApi
6
6
  end
7
7
 
8
8
  def headers
9
- header_data.reject { |_k, v| (v.nil? || v.empty?) }
9
+ header_data.reject { |_k, v| v.nil? || v.empty? }
10
10
  end
11
11
 
12
12
  def clear_headers
@@ -1,10 +1,6 @@
1
1
  require_relative "base"
2
2
 
3
3
  class GdsApi::Support < GdsApi::Base
4
- def create_foi_request(request_details)
5
- post_json("#{base_url}/foi_requests", foi_request: request_details)
6
- end
7
-
8
4
  def create_named_contact(request_details)
9
5
  post_json("#{base_url}/named_contacts", named_contact: request_details)
10
6
  end
@@ -164,6 +164,16 @@ module GdsApi
164
164
  stub_request(:any, %r{\A#{EMAIL_ALERT_API_ENDPOINT}})
165
165
  end
166
166
 
167
+ def stub_get_subscriber_list_metrics(path:, response:)
168
+ stub_request(:get, "#{EMAIL_ALERT_API_ENDPOINT}/subscriber-lists/metrics#{path}")
169
+ .to_return(status: 200, body: response)
170
+ end
171
+
172
+ def stub_get_subscriber_list_metrics_not_found(path:)
173
+ stub_request(:get, "#{EMAIL_ALERT_API_ENDPOINT}/subscriber-lists/metrics#{path}")
174
+ .to_return(status: 404)
175
+ end
176
+
167
177
  def assert_email_alert_api_content_change_created(attributes = nil)
168
178
  if attributes
169
179
  matcher = lambda do |request|
@@ -97,7 +97,7 @@ module GdsApi
97
97
 
98
98
  def convert_to_query_string_params(parameters)
99
99
  # convert nil to an empty string, otherwise query param is not expressed correctly
100
- parameters.each { |key, _value| parameters[key] = "" if parameters[key].nil? }
100
+ parameters.each_key { |key| parameters[key] = "" if parameters[key].nil? }
101
101
  parameters
102
102
  end
103
103
 
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = "92.0.0".freeze
2
+ VERSION = "93.0.0".freeze
3
3
  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: 92.0.0
4
+ version: 93.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-15 00:00:00.000000000 Z
11
+ date: 2024-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -268,14 +268,14 @@ dependencies:
268
268
  requirements:
269
269
  - - '='
270
270
  - !ruby/object:Gem::Version
271
- version: 4.12.0
271
+ version: 4.13.0
272
272
  type: :development
273
273
  prerelease: false
274
274
  version_requirements: !ruby/object:Gem::Requirement
275
275
  requirements:
276
276
  - - '='
277
277
  - !ruby/object:Gem::Version
278
- version: 4.12.0
278
+ version: 4.13.0
279
279
  - !ruby/object:Gem::Dependency
280
280
  name: simplecov
281
281
  requirement: !ruby/object:Gem::Requirement
@@ -417,7 +417,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
417
417
  - !ruby/object:Gem::Version
418
418
  version: '0'
419
419
  requirements: []
420
- rubygems_version: 3.4.22
420
+ rubygems_version: 3.5.5
421
421
  signing_key:
422
422
  specification_version: 4
423
423
  summary: Adapters to work with GDS APIs