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: 19eaf100f2daa9f68ac9bbd4489af46288c472434d22f81735258284e4d55da6
4
- data.tar.gz: 1d8305795bd9f57730e66a1215031e3f9ab41d88c2f84028aea64c2ca02523a7
3
+ metadata.gz: b9e99044909467134a19c5e0f273908fd94afbe72a40f50a5d81dfd4bf467d28
4
+ data.tar.gz: 0535e351b0d6899aa363f61bcd8c0ab9b3137389b4279bf9ff195250773c087d
5
5
  SHA512:
6
- metadata.gz: bec2d56f7974d78cf2b28bb418115d155fe53adf7bc159b778ea9468357a7acc0565604251813434d4bf89fc53d8cc1062f68b18200c17d639888ea619ce46f1
7
- data.tar.gz: f3a25306f8c628715898387c31ab940aa3011462c6243abba9398d5d93cf8829c4c2d8ea795ab78d6bbe51f375c3aef39d6f69d5a6dcf6a40b6b0fa9da6647d2
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
 
@@ -19,7 +19,7 @@ module GdsApi
19
19
  schema_name: options.fetch(:schema_name, "special_route"),
20
20
  title: options.fetch(:title),
21
21
  description: options.fetch(:description, ""),
22
- locale: "en",
22
+ locale: options.fetch(:locale, "en"),
23
23
  details: {},
24
24
  routes: [
25
25
  {
@@ -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: { subscriber_list_id: subscriber_list_id, address: address, frequency: frequency }.to_json,
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: { subscriber_list_id: subscriber_list_id, address: address, frequency: frequency }.to_json,
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: { subscriber_list_id: subscriber_list_id, address: address, frequency: frequency }.to_json,
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
 
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = "67.1.1".freeze
2
+ VERSION = "67.2.0".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gds-api-adapters
3
3
  version: !ruby/object:Gem::Version
4
- version: 67.1.1
4
+ version: 67.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev