gds-api-adapters 67.1.1 → 67.2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9e99044909467134a19c5e0f273908fd94afbe72a40f50a5d81dfd4bf467d28
|
4
|
+
data.tar.gz: 0535e351b0d6899aa363f61bcd8c0ab9b3137389b4279bf9ff195250773c087d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 796c442ffe778c4377f476db1fdae0d52592c776687aa4d52bc4e3e7f3f3a33fe7cd9e48e40af52e532943fe5b0549cf335ae516d7d4dd149e767f26b7142b7c
|
7
|
+
data.tar.gz: 3b37865fca30c9e7ff47bd9e8f64fe4579065b48a325eb59cad29a4722170873049c16373f4708c9601e015269875de3ec88612d2a84d64943337e6494aea9fa
|
@@ -116,12 +116,13 @@ class GdsApi::EmailAlertApi < GdsApi::Base
|
|
116
116
|
# Subscribe
|
117
117
|
#
|
118
118
|
# @return [Hash] subscription_id
|
119
|
-
def subscribe(subscriber_list_id:, address:, frequency: "immediately")
|
119
|
+
def subscribe(subscriber_list_id:, address:, frequency: "immediately", skip_confirmation_email: false)
|
120
120
|
post_json(
|
121
121
|
"#{endpoint}/subscriptions",
|
122
122
|
subscriber_list_id: subscriber_list_id,
|
123
123
|
address: address,
|
124
124
|
frequency: frequency,
|
125
|
+
skip_confirmation_email: skip_confirmation_email,
|
125
126
|
)
|
126
127
|
end
|
127
128
|
|
@@ -218,24 +218,37 @@ module GdsApi
|
|
218
218
|
.to_return(status: 404)
|
219
219
|
end
|
220
220
|
|
221
|
-
def stub_email_alert_api_creates_a_subscription(subscriber_list_id, address, frequency, returned_subscription_id)
|
221
|
+
def stub_email_alert_api_creates_a_subscription(subscriber_list_id, address, frequency, returned_subscription_id, skip_confirmation_email: false)
|
222
222
|
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriptions")
|
223
223
|
.with(
|
224
|
-
body: {
|
224
|
+
body: {
|
225
|
+
subscriber_list_id: subscriber_list_id,
|
226
|
+
address: address,
|
227
|
+
frequency: frequency,
|
228
|
+
skip_confirmation_email: skip_confirmation_email,
|
229
|
+
}.to_json,
|
225
230
|
).to_return(status: 201, body: { id: returned_subscription_id }.to_json)
|
226
231
|
end
|
227
232
|
|
228
233
|
def stub_email_alert_api_creates_an_existing_subscription(subscriber_list_id, address, frequency, returned_subscription_id)
|
229
234
|
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriptions")
|
230
235
|
.with(
|
231
|
-
body:
|
236
|
+
body: hash_including(
|
237
|
+
subscriber_list_id: subscriber_list_id,
|
238
|
+
address: address,
|
239
|
+
frequency: frequency,
|
240
|
+
),
|
232
241
|
).to_return(status: 200, body: { id: returned_subscription_id }.to_json)
|
233
242
|
end
|
234
243
|
|
235
244
|
def stub_email_alert_api_refuses_to_create_subscription(subscriber_list_id, address, frequency)
|
236
245
|
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriptions")
|
237
246
|
.with(
|
238
|
-
body:
|
247
|
+
body: hash_including(
|
248
|
+
subscriber_list_id: subscriber_list_id,
|
249
|
+
address: address,
|
250
|
+
frequency: frequency,
|
251
|
+
),
|
239
252
|
).to_return(status: 422)
|
240
253
|
end
|
241
254
|
|
data/lib/gds_api/version.rb
CHANGED