gds-api-adapters 77.1.0 → 78.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 +3 -3
- data/lib/gds_api/test_helpers/email_alert_api.rb +12 -12
- data/lib/gds_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a423ee043ccb33b30d2d1a0f12b0a5f43d14018b774afa6270f24626062f696
|
4
|
+
data.tar.gz: e18aa2ed41343e430781063d9a8e85584213781758a245f8c818849c9d51e30d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2113447106f41212696c5daf6e048c1bf0df7feac8b524d63a437f8113d8cb4cf9e2a9910e898c55a6501d7495548ff131142a4cdccf3e4287b327be54320a4d
|
7
|
+
data.tar.gz: 74a1d841906f75f5f9f045f8157e8bf40ace3a4e12e6b30226d07e3e1959267d4b66821e72e2d0812cb1ee951b1a99724e71b60bbf8e057bd8aea7ee60622153
|
@@ -250,12 +250,12 @@ class GdsApi::EmailAlertApi < GdsApi::Base
|
|
250
250
|
# Unsubscribe all users for a subscription list
|
251
251
|
# optionally send a notification email explaining the reason
|
252
252
|
#
|
253
|
-
# @param [string]
|
253
|
+
# @param [string] slug Identifier for the subscription list
|
254
254
|
# @param [string] (optional) body Optional email body to send to alert users they are being unsubscribed
|
255
255
|
# @param [string] (optional) sender_message_id A UUID to prevent multiple emails for the same event
|
256
|
-
def bulk_unsubscribe(
|
256
|
+
def bulk_unsubscribe(slug:, body: nil, sender_message_id: nil)
|
257
257
|
post_json(
|
258
|
-
"#{endpoint}/subscriber-lists/#{
|
258
|
+
"#{endpoint}/subscriber-lists/#{slug}/bulk-unsubscribe",
|
259
259
|
{
|
260
260
|
body: body,
|
261
261
|
sender_message_id: sender_message_id,
|
@@ -408,13 +408,13 @@ module GdsApi
|
|
408
408
|
.to_return(status: 404)
|
409
409
|
end
|
410
410
|
|
411
|
-
def stub_email_alert_api_bulk_unsubscribe(
|
412
|
-
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriber-lists/#{
|
411
|
+
def stub_email_alert_api_bulk_unsubscribe(slug:)
|
412
|
+
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriber-lists/#{slug}/bulk-unsubscribe")
|
413
413
|
.to_return(status: 202)
|
414
414
|
end
|
415
415
|
|
416
|
-
def stub_email_alert_api_bulk_unsubscribe_with_message(
|
417
|
-
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriber-lists/#{
|
416
|
+
def stub_email_alert_api_bulk_unsubscribe_with_message(slug:, body:, sender_message_id:)
|
417
|
+
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriber-lists/#{slug}/bulk-unsubscribe")
|
418
418
|
.with(
|
419
419
|
body: {
|
420
420
|
body: body,
|
@@ -423,13 +423,13 @@ module GdsApi
|
|
423
423
|
).to_return(status: 202)
|
424
424
|
end
|
425
425
|
|
426
|
-
def stub_email_alert_api_bulk_unsubscribe_not_found(
|
427
|
-
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriber-lists/#{
|
426
|
+
def stub_email_alert_api_bulk_unsubscribe_not_found(slug:)
|
427
|
+
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriber-lists/#{slug}/bulk-unsubscribe")
|
428
428
|
.to_return(status: 404)
|
429
429
|
end
|
430
430
|
|
431
|
-
def stub_email_alert_api_bulk_unsubscribe_not_found_with_message(
|
432
|
-
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriber-lists/#{
|
431
|
+
def stub_email_alert_api_bulk_unsubscribe_not_found_with_message(slug:, body:, sender_message_id:)
|
432
|
+
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriber-lists/#{slug}/bulk-unsubscribe")
|
433
433
|
.with(
|
434
434
|
body: {
|
435
435
|
body: body,
|
@@ -438,8 +438,8 @@ module GdsApi
|
|
438
438
|
).to_return(status: 404)
|
439
439
|
end
|
440
440
|
|
441
|
-
def stub_email_alert_api_bulk_unsubscribe_conflict_with_message(
|
442
|
-
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriber-lists/#{
|
441
|
+
def stub_email_alert_api_bulk_unsubscribe_conflict_with_message(slug:, body:, sender_message_id:)
|
442
|
+
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriber-lists/#{slug}/bulk-unsubscribe")
|
443
443
|
.with(
|
444
444
|
body: {
|
445
445
|
body: body,
|
@@ -448,8 +448,8 @@ module GdsApi
|
|
448
448
|
).to_return(status: 409)
|
449
449
|
end
|
450
450
|
|
451
|
-
def stub_email_alert_api_bulk_unsubscribe_bad_request(
|
452
|
-
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriber-lists/#{
|
451
|
+
def stub_email_alert_api_bulk_unsubscribe_bad_request(slug:, body:)
|
452
|
+
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/subscriber-lists/#{slug}/bulk-unsubscribe")
|
453
453
|
.with(
|
454
454
|
body: { body: body }.to_json,
|
455
455
|
).to_return(status: 422)
|
data/lib/gds_api/version.rb
CHANGED