gds-api-adapters 60.0.0 → 60.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 +4 -4
- data/lib/gds_api/email_alert_api.rb +7 -2
- data/lib/gds_api/test_helpers/email_alert_api.rb +2 -2
- data/lib/gds_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f6e86134fcd469124f73b675186a67d2c0fc7a231579e9c9ce5f0d5de21fb5d
|
4
|
+
data.tar.gz: a5d21c8c4872e3ad3e2d6db819373297e754cdbc6f223e0c05b49ab122fc7cf4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ca67d3c42622f1ebdbf593308bed09e15b1f0cf5ccdd4d8578ad0a41d1cb988a9768e5d66c89a46c6456edeb57ca0dc53363031d366636cc8a8033971b8941d
|
7
|
+
data.tar.gz: 231dc67bf3244e8b3ebdaffea3e7460a57b8b8fa2fe17c69886a6b04f7cade3399c2d5b60bd296995b91d8a5debcb1897f1a53ce9ffdd18bfcfc516bc3f80337
|
@@ -183,10 +183,15 @@ class GdsApi::EmailAlertApi < GdsApi::Base
|
|
183
183
|
# Get Subscriptions for a Subscriber
|
184
184
|
#
|
185
185
|
# @param [integer] Subscriber id
|
186
|
+
# @param [string] Subscription order - title, created_at
|
186
187
|
#
|
187
188
|
# @return [Hash] subscriber, subscriptions
|
188
|
-
def get_subscriptions(id:)
|
189
|
-
|
189
|
+
def get_subscriptions(id:, order: nil)
|
190
|
+
if order
|
191
|
+
get_json("#{endpoint}/subscribers/#{id}/subscriptions?order=#{order}")
|
192
|
+
else
|
193
|
+
get_json("#{endpoint}/subscribers/#{id}/subscriptions")
|
194
|
+
end
|
190
195
|
end
|
191
196
|
|
192
197
|
# Patch a Subscriber
|
@@ -32,8 +32,8 @@ module GdsApi
|
|
32
32
|
.to_return(status: 404)
|
33
33
|
end
|
34
34
|
|
35
|
-
def stub_email_alert_api_has_subscriber_subscriptions(id, address)
|
36
|
-
stub_request(:get, "#{EMAIL_ALERT_API_ENDPOINT}/subscribers/#{id}/subscriptions")
|
35
|
+
def stub_email_alert_api_has_subscriber_subscriptions(id, address, order)
|
36
|
+
stub_request(:get, "#{EMAIL_ALERT_API_ENDPOINT}/subscribers/#{id}/subscriptions?order=#{order}")
|
37
37
|
.to_return(
|
38
38
|
status: 200,
|
39
39
|
body: get_subscriber_subscriptions_response(id, address).to_json,
|
data/lib/gds_api/version.rb
CHANGED
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: 60.
|
4
|
+
version: 60.1.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: 2019-
|
11
|
+
date: 2019-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|