gds-api-adapters 67.2.1 → 68.0.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 +0 -3
- data/lib/gds_api/test_helpers/email_alert_api.rb +23 -21
- 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: d65f642d5b2a1a78b79cada08224db09ac522eed4c6f2a096916ae076f0c6328
|
4
|
+
data.tar.gz: 314f7be8b8aea542036199fae93de9b9c7c7f3e18b1d5234b0872c26c3ae35f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8269a099df5843b9bc45dabad688a59461b9fcb7b50c876b69981ee8fc919db8e318421a9ac478dacff2f4bb0a73e0675589686bfaf878e024f06a17117d351d
|
7
|
+
data.tar.gz: 426d5db6c08678e134ecbd84b315f2cb22df30a5fcbcb3e1de89ff980d5edebcd75b229e6cb4ef95c4a7f86c78f3909452246376a7fb5750ec63fcaf1d4d3831
|
@@ -24,7 +24,6 @@ class GdsApi::EmailAlertApi < GdsApi::Base
|
|
24
24
|
document_type = attributes["document_type"]
|
25
25
|
email_document_supertype = attributes["email_document_supertype"]
|
26
26
|
government_document_supertype = attributes["government_document_supertype"]
|
27
|
-
gov_delivery_id = attributes["gov_delivery_id"]
|
28
27
|
combine_mode = attributes["combine_mode"]
|
29
28
|
|
30
29
|
if tags && links
|
@@ -38,7 +37,6 @@ class GdsApi::EmailAlertApi < GdsApi::Base
|
|
38
37
|
params[:document_type] = document_type if document_type
|
39
38
|
params[:email_document_supertype] = email_document_supertype if email_document_supertype
|
40
39
|
params[:government_document_supertype] = government_document_supertype if government_document_supertype
|
41
|
-
params[:gov_delivery_id] = gov_delivery_id if gov_delivery_id
|
42
40
|
params[:combine_mode] = combine_mode if combine_mode
|
43
41
|
|
44
42
|
query_string = nested_query_string(params)
|
@@ -131,7 +129,6 @@ class GdsApi::EmailAlertApi < GdsApi::Base
|
|
131
129
|
# @return [Hash] subscriber_list: {
|
132
130
|
# id
|
133
131
|
# title
|
134
|
-
# gov_delivery_id
|
135
132
|
# created_at
|
136
133
|
# updated_at
|
137
134
|
# document_type
|
@@ -218,27 +218,31 @@ module GdsApi
|
|
218
218
|
.to_return(status: 404)
|
219
219
|
end
|
220
220
|
|
221
|
-
def stub_email_alert_api_creates_a_subscription(
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
221
|
+
def stub_email_alert_api_creates_a_subscription(
|
222
|
+
subscriber_list_id: nil,
|
223
|
+
address: nil,
|
224
|
+
frequency: nil,
|
225
|
+
returned_subscription_id: nil,
|
226
|
+
skip_confirmation_email: false,
|
227
|
+
subscriber_id: nil
|
228
|
+
)
|
229
|
+
response = get_subscription_response(
|
230
|
+
returned_subscription_id,
|
231
|
+
frequency: frequency,
|
232
|
+
subscriber_list_id: subscriber_list_id,
|
233
|
+
subscriber_id: subscriber_id,
|
234
|
+
)
|
235
|
+
|
236
|
+
request_params = {
|
237
|
+
subscriber_list_id: subscriber_list_id,
|
238
|
+
address: address,
|
239
|
+
frequency: frequency,
|
240
|
+
skip_confirmation_email: skip_confirmation_email,
|
241
|
+
}
|
232
242
|
|
233
|
-
def stub_email_alert_api_creates_an_existing_subscription(subscriber_list_id, address, frequency, returned_subscription_id)
|
234
243
|
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriptions")
|
235
|
-
.with(
|
236
|
-
|
237
|
-
subscriber_list_id: subscriber_list_id,
|
238
|
-
address: address,
|
239
|
-
frequency: frequency,
|
240
|
-
),
|
241
|
-
).to_return(status: 200, body: { id: returned_subscription_id }.to_json)
|
244
|
+
.with(body: hash_including(request_params.compact))
|
245
|
+
.to_return(status: 200, body: response.to_json)
|
242
246
|
end
|
243
247
|
|
244
248
|
def stub_email_alert_api_refuses_to_create_subscription(subscriber_list_id, address, frequency)
|
@@ -394,7 +398,6 @@ module GdsApi
|
|
394
398
|
document_type = attributes["document_type"]
|
395
399
|
email_document_supertype = attributes["email_document_supertype"]
|
396
400
|
government_document_supertype = attributes["government_document_supertype"]
|
397
|
-
gov_delivery_id = attributes["gov_delivery_id"]
|
398
401
|
content_purpose_supergroup = attributes["content_purpose_supergroup"]
|
399
402
|
combine_mode = attributes["combine_mode"]
|
400
403
|
|
@@ -404,7 +407,6 @@ module GdsApi
|
|
404
407
|
params[:document_type] = document_type if document_type
|
405
408
|
params[:email_document_supertype] = email_document_supertype if email_document_supertype
|
406
409
|
params[:government_document_supertype] = government_document_supertype if government_document_supertype
|
407
|
-
params[:gov_delivery_id] = gov_delivery_id if gov_delivery_id
|
408
410
|
params[:content_purpose_supergroup] = content_purpose_supergroup if content_purpose_supergroup
|
409
411
|
params[:combine_mode] = combine_mode if combine_mode
|
410
412
|
|
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:
|
4
|
+
version: 68.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: 2020-12-
|
11
|
+
date: 2020-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|