gds-api-adapters 75.0.0 → 75.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gds_api/account_api.rb +5 -1
- data/lib/gds_api/test_helpers/account_api.rb +4 -2
- 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: 36e41430cc8105c52489b3ba8bde38b4027a124a4a0cc3ca4ddabf120dd97de8
|
4
|
+
data.tar.gz: c61130dc56390e9a6ff2962589686bb232abbd506b742c14d6d77a9f6ac7500a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b3b29f19b7f55cff24242a9370bfc3cc7b4392de6f9fe84e4d64067bdeabf56b8d35468f2556d86648efb5f7189e3c527203d63ace5ffd6745ad513701addd6
|
7
|
+
data.tar.gz: 5efaa1939f0b3c8644ee3e8c19dc208419cfc6344d3b644c506e76e87965923f3f1c1c9427dc1702be32560caeea38fee900ec5a06ee09b47533324bb3c9e8e0
|
data/lib/gds_api/account_api.rb
CHANGED
@@ -65,13 +65,17 @@ class GdsApi::AccountApi < GdsApi::Base
|
|
65
65
|
# @param [String, nil] email The user's current
|
66
66
|
# @param [Boolean, nil] email_verified Whether the user's current email address is verified
|
67
67
|
# @param [Boolean, nil] has_unconfirmed_email Whether the user has a new, pending, email address
|
68
|
+
# @param [Boolean, nil] cookie_consent Whether the user has consented to analytics cookies
|
69
|
+
# @param [Boolean, nil] feedback_consent Whether the user has consented to being contacted for feedback
|
68
70
|
#
|
69
71
|
# @return [Hash] The user's subject identifier and email attributes
|
70
|
-
def update_user_by_subject_identifier(subject_identifier:, email: nil, email_verified: nil, has_unconfirmed_email: nil)
|
72
|
+
def update_user_by_subject_identifier(subject_identifier:, email: nil, email_verified: nil, has_unconfirmed_email: nil, cookie_consent: nil, feedback_consent: nil)
|
71
73
|
params = {
|
72
74
|
email: email,
|
73
75
|
email_verified: email_verified,
|
74
76
|
has_unconfirmed_email: has_unconfirmed_email,
|
77
|
+
cookie_consent: cookie_consent,
|
78
|
+
feedback_consent: feedback_consent,
|
75
79
|
}.compact
|
76
80
|
|
77
81
|
patch_json("#{endpoint}/api/oidc-users/#{subject_identifier}", params)
|
@@ -125,16 +125,18 @@ module GdsApi
|
|
125
125
|
###########################################
|
126
126
|
# PATCH /api/oidc-users/:subject_identifier
|
127
127
|
###########################################
|
128
|
-
def stub_update_user_by_subject_identifier(subject_identifier:, email: nil, email_verified: nil, has_unconfirmed_email: nil, old_email: nil, old_email_verified: nil, old_has_unconfirmed_email: nil)
|
128
|
+
def stub_update_user_by_subject_identifier(subject_identifier:, email: nil, email_verified: nil, has_unconfirmed_email: nil, cookie_consent: nil, feedback_consent: nil, old_email: nil, old_email_verified: nil, old_has_unconfirmed_email: nil, old_cookie_consent: nil, old_feedback_consent: nil)
|
129
129
|
stub_account_api_request(
|
130
130
|
:patch,
|
131
131
|
"/api/oidc-users/#{subject_identifier}",
|
132
|
-
with: { body: hash_including({ email: email, email_verified: email_verified, has_unconfirmed_email: has_unconfirmed_email }.compact) },
|
132
|
+
with: { body: hash_including({ email: email, email_verified: email_verified, has_unconfirmed_email: has_unconfirmed_email, cookie_consent: cookie_consent, feedback_consent: feedback_consent }.compact) },
|
133
133
|
response_body: {
|
134
134
|
sub: subject_identifier,
|
135
135
|
email: email || old_email,
|
136
136
|
email_verified: email_verified || old_email_verified,
|
137
137
|
has_unconfirmed_email: has_unconfirmed_email || old_has_unconfirmed_email,
|
138
|
+
cookie_consent: cookie_consent || old_cookie_consent,
|
139
|
+
feedback_consent: feedback_consent || old_feedback_consent,
|
138
140
|
},
|
139
141
|
)
|
140
142
|
end
|
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: 75.
|
4
|
+
version: 75.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: 2021-
|
11
|
+
date: 2021-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|