gds-api-adapters 60.0.0 → 60.1.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: 1a761a4156a0af6763014d9994f5543a23c6c33ea6ff2745ba5bddb28eb1965c
4
- data.tar.gz: 5a3946e67f7de853cc33d204050263b3127890baf511585579b23acdec5a8e0e
3
+ metadata.gz: 8f6e86134fcd469124f73b675186a67d2c0fc7a231579e9c9ce5f0d5de21fb5d
4
+ data.tar.gz: a5d21c8c4872e3ad3e2d6db819373297e754cdbc6f223e0c05b49ab122fc7cf4
5
5
  SHA512:
6
- metadata.gz: cfb3c6776af3f5a8da321b023b0019d44cba7a5a62d22411430c805fae76fc13ab015b5293fbe72f6e4a73f0b20905b4d06398d9fcd4a016ac8f4c87cc208131
7
- data.tar.gz: eb4891111d7024a646b57ea991ec8f46445ca4859a16853492a0887ef6e1eb881723c98abf724831fd61777061363e5e0dba8c698c77cc5079218ab1396bc66f
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
- get_json("#{endpoint}/subscribers/#{id}/subscriptions")
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,
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '60.0.0'.freeze
2
+ VERSION = '60.1.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: 60.0.0
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-08-23 00:00:00.000000000 Z
11
+ date: 2019-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable