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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b27f3bf8bc54c02f89ff04ad80072cf86c1ba1d95db2357d2482a672c8827153
4
- data.tar.gz: 3f844ce567de1e21d65ab7eb060c4ef14a32232ca6f25c65e716ba76c5cf7b3c
3
+ metadata.gz: 38f810909fdefc6bef3a480ea082ec17b2630b0854d12aee08536b0bbdbdfcac
4
+ data.tar.gz: 33af1bf79c6e5bde3c550c7660859cb656a990230e85314ff38831098b94006b
5
5
  SHA512:
6
- metadata.gz: cfb5a0af973752f54a6ab6dbfd7ac50d834b705bded0db5eadc90c1659ec931f64bd9a779a7f0cc0c06dd460165c4b21562e66e5c98db3ebd088c9eeee3fe463
7
- data.tar.gz: 388370503c86d1b7fd38539493b1b2934d029940ea3a5bce3c9300739bd2ad62a952c8523be05b29e700501d7821a6bd0442d2a6257d4d1b5b208ce9a11c2104
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
 
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '51.0.0'.freeze
2
+ VERSION = '51.1.0'.freeze
3
3
  end
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.0.0
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-12 00:00:00.000000000 Z
11
+ date: 2018-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plek