gds-api-adapters 51.0.0 → 51.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 +2 -1
- data/lib/gds_api/test_helpers/email_alert_api.rb +6 -6
- 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: 38f810909fdefc6bef3a480ea082ec17b2630b0854d12aee08536b0bbdbdfcac
|
4
|
+
data.tar.gz: 33af1bf79c6e5bde3c550c7660859cb656a990230e85314ff38831098b94006b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f5082b7456afd0d88dfd6d569e7e418de0da5ffdc28645e9cb3f80a88c2496cff4ef6e9543f53b44ed9e11f0864b38a5f60f7f3222628d25beb134e84cff4e2
|
7
|
+
data.tar.gz: e8fecd15baa08a4896aca15b025ad4944b479d38f485d43474f19bd8624f210628ff4782e69bc532f17ee7c93e0da647a8f1c2df2a46ec37b91625937e6fe3b8
|
@@ -100,11 +100,12 @@ class GdsApi::EmailAlertApi < GdsApi::Base
|
|
100
100
|
# Subscribe
|
101
101
|
#
|
102
102
|
# @return [Hash] subscription_id
|
103
|
-
def subscribe(subscribable_id:, address:)
|
103
|
+
def subscribe(subscribable_id:, address:, frequency: "immediately")
|
104
104
|
post_json(
|
105
105
|
"#{endpoint}/subscriptions",
|
106
106
|
subscribable_id: subscribable_id,
|
107
107
|
address: address,
|
108
|
+
frequency: frequency,
|
108
109
|
)
|
109
110
|
end
|
110
111
|
|
@@ -105,24 +105,24 @@ module GdsApi
|
|
105
105
|
.to_return(status: 404)
|
106
106
|
end
|
107
107
|
|
108
|
-
def email_alert_api_creates_a_subscription(subscribable_id, address, returned_subscription_id)
|
108
|
+
def email_alert_api_creates_a_subscription(subscribable_id, address, frequency, returned_subscription_id)
|
109
109
|
stub_request(:post, subscribe_url)
|
110
110
|
.with(
|
111
|
-
body: { subscribable_id: subscribable_id, address: address }.to_json
|
111
|
+
body: { subscribable_id: subscribable_id, address: address, frequency: frequency }.to_json
|
112
112
|
).to_return(status: 201, body: { subscription_id: returned_subscription_id }.to_json)
|
113
113
|
end
|
114
114
|
|
115
|
-
def email_alert_api_creates_an_existing_subscription(subscribable_id, address, returned_subscription_id)
|
115
|
+
def email_alert_api_creates_an_existing_subscription(subscribable_id, address, frequency, returned_subscription_id)
|
116
116
|
stub_request(:post, subscribe_url)
|
117
117
|
.with(
|
118
|
-
body: { subscribable_id: subscribable_id, address: address }.to_json
|
118
|
+
body: { subscribable_id: subscribable_id, address: address, frequency: frequency }.to_json
|
119
119
|
).to_return(status: 200, body: { subscription_id: returned_subscription_id }.to_json)
|
120
120
|
end
|
121
121
|
|
122
|
-
def email_alert_api_refuses_to_create_subscription(subscribable_id, address)
|
122
|
+
def email_alert_api_refuses_to_create_subscription(subscribable_id, address, frequency)
|
123
123
|
stub_request(:post, subscribe_url)
|
124
124
|
.with(
|
125
|
-
body: { subscribable_id: subscribable_id, address: address }.to_json
|
125
|
+
body: { subscribable_id: subscribable_id, address: address, frequency: frequency }.to_json
|
126
126
|
).to_return(status: 422)
|
127
127
|
end
|
128
128
|
|
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: 51.
|
4
|
+
version: 51.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: 2018-01-
|
11
|
+
date: 2018-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: plek
|