workos 5.26.0 → 5.27.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: 70fb176f7fd3b899bb8c88f2123536778e2a026d97582de2e1beb9525b2bec5b
4
- data.tar.gz: 164650f3cdbe0181b9d249c69fc6bab6713f41bef3e419dbb8ce765211123068
3
+ metadata.gz: d4c13739c752d0a39953650ceaa9ce3b11975333deaee4c3308e68aaf498a81b
4
+ data.tar.gz: 0d1e38dab645be1e74296de37deeb02115e1ef8528c7a2d96a751b0ec8586312
5
5
  SHA512:
6
- metadata.gz: cd3a1e2254870e8d34ace357916f6a8287fefdfb0c89e9e82ed679e02460caad0f457a2a60c56fa19afefc9d74a92427603efc12c4a181c13fe27bf4b4babc27
7
- data.tar.gz: 89e8b4854838de9fc893c16380df4d0b75ef0fb68659b25cbca140310c4cc7dd00e371183c432d60d978548059a941a8410a2e143cefed6011b95be219f84d43
6
+ metadata.gz: f4b7db5351ad49b0c388213769e7d5fb32121eed25999ba75476691c41bc5bd1ce792910912843869440d7ae28734405233cca551d324fb5507d9dabd9c3c04d
7
+ data.tar.gz: d4fba87cbf558a37b3e563f189aeb00e93fad7bfe58fd93473fa615d190c5180756c5de19aa9a0510fc95bf3feb9719c7994d4cdb85b1e405679639d23e85e6b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- workos (5.26.0)
4
+ workos (5.27.0)
5
5
  encryptor (~> 3.0)
6
6
  jwt (~> 2.8)
7
7
 
data/lib/workos/user.rb CHANGED
@@ -8,7 +8,7 @@ module WorkOS
8
8
  include HashProvider
9
9
 
10
10
  attr_accessor :id, :email, :first_name, :last_name, :email_verified,
11
- :profile_picture_url, :external_id, :last_sign_in_at, :created_at, :updated_at
11
+ :profile_picture_url, :external_id, :locale, :last_sign_in_at, :created_at, :updated_at
12
12
 
13
13
  def initialize(json)
14
14
  hash = JSON.parse(json, symbolize_names: true)
@@ -20,6 +20,7 @@ module WorkOS
20
20
  @email_verified = hash[:email_verified]
21
21
  @profile_picture_url = hash[:profile_picture_url]
22
22
  @external_id = hash[:external_id]
23
+ @locale = hash[:locale]
23
24
  @last_sign_in_at = hash[:last_sign_in_at]
24
25
  @created_at = hash[:created_at]
25
26
  @updated_at = hash[:updated_at]
@@ -34,6 +35,7 @@ module WorkOS
34
35
  email_verified: email_verified,
35
36
  profile_picture_url: profile_picture_url,
36
37
  external_id: external_id,
38
+ locale: locale,
37
39
  last_sign_in_at: last_sign_in_at,
38
40
  created_at: created_at,
39
41
  updated_at: updated_at,
@@ -230,6 +230,7 @@ module WorkOS
230
230
  # @param [String] last_name The user's last name.
231
231
  # @param [Boolean] email_verified Whether the user's email address was previously verified.
232
232
  # @param [String] external_id The users's external ID
233
+ # @param [String] locale The user's locale.
233
234
  # @param [String] password The user's password.
234
235
  # @param [String] password_hash The user's hashed password.
235
236
  # @option [String] password_hash_type The algorithm originally used to hash the password.
@@ -243,6 +244,7 @@ module WorkOS
243
244
  last_name: :not_set,
244
245
  email_verified: :not_set,
245
246
  external_id: :not_set,
247
+ locale: :not_set,
246
248
  password: :not_set,
247
249
  password_hash: :not_set,
248
250
  password_hash_type: :not_set
@@ -255,6 +257,7 @@ module WorkOS
255
257
  last_name: last_name,
256
258
  email_verified: email_verified,
257
259
  external_id: external_id,
260
+ locale: locale,
258
261
  password: password,
259
262
  password_hash: password_hash,
260
263
  password_hash_type: password_hash_type,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WorkOS
4
- VERSION = '5.26.0'
4
+ VERSION = '5.27.0'
5
5
  end
@@ -442,6 +442,16 @@ describe WorkOS::UserManagement do
442
442
  end
443
443
  end
444
444
 
445
+ it 'can update user locale' do
446
+ VCR.use_cassette 'user_management/update_user/locale' do
447
+ user = described_class.update_user(
448
+ id: 'user_01K78B3ZB5B7119MYEXTQE5KNE',
449
+ locale: 'en-US',
450
+ )
451
+ expect(user.locale).to eq('en-US')
452
+ end
453
+ end
454
+
445
455
  it 'can update email addresses' do
446
456
  VCR.use_cassette 'user_management/update_user/email' do
447
457
  user = described_class.update_user(
@@ -462,6 +472,7 @@ describe WorkOS::UserManagement do
462
472
  expect(body).not_to have_key(:first_name)
463
473
  expect(body).not_to have_key(:last_name)
464
474
  expect(body).not_to have_key(:email)
475
+ expect(body).not_to have_key(:locale)
465
476
 
466
477
  # Return a mock request object
467
478
  double('request')
@@ -0,0 +1,76 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://api.workos.com/user_management/users/user_01K78B3ZB5B7119MYEXTQE5KNE
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"locale":"en-US"}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - WorkOS; ruby/3.1.4; arm64-darwin23; v5.25.0
18
+ Authorization:
19
+ - Bearer <API_KEY>
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Sat, 11 Oct 2025 00:40:19 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Cf-Ray:
34
+ - 98ca4e2ece4df13a-ORD
35
+ Cf-Cache-Status:
36
+ - DYNAMIC
37
+ Etag:
38
+ - W/"14b-avtqVpGgr9LY49Al2c3gzw62Mbc"
39
+ Strict-Transport-Security:
40
+ - max-age=15552000; includeSubDomains
41
+ Vary:
42
+ - Origin, Accept-Encoding
43
+ Access-Control-Allow-Credentials:
44
+ - 'true'
45
+ Content-Security-Policy:
46
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
47
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
48
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
49
+ Expect-Ct:
50
+ - max-age=0
51
+ Referrer-Policy:
52
+ - no-referrer
53
+ X-Content-Type-Options:
54
+ - nosniff
55
+ X-Dns-Prefetch-Control:
56
+ - 'off'
57
+ X-Download-Options:
58
+ - noopen
59
+ X-Frame-Options:
60
+ - SAMEORIGIN
61
+ X-Permitted-Cross-Domain-Policies:
62
+ - none
63
+ X-Request-Id:
64
+ - e9a5015e-44f0-4321-990a-66d2ba4a3e15
65
+ X-Xss-Protection:
66
+ - '0'
67
+ Set-Cookie:
68
+ - _cfuvid=IZBV12JrFjDy0rHr.O3LoIyI0iKnOHdGa_R3uam5bZI-1760143219077-0.0.1.1-604800000;
69
+ path=/; domain=.workos.com; HttpOnly; Secure; SameSite=None
70
+ Server:
71
+ - cloudflare
72
+ body:
73
+ encoding: ASCII-8BIT
74
+ string: '{"object":"user","id":"user_01K78B3ZB5B7119MYEXTQE5KNE","email":"test-locale@example.com","email_verified":false,"first_name":"Jane","last_name":"Doe","profile_picture_url":null,"metadata":{},"last_sign_in_at":null,"locale":"en-US","created_at":"2025-10-11T00:35:49.727Z","updated_at":"2025-10-11T00:40:19.051Z","external_id":null}'
75
+ recorded_at: Sat, 11 Oct 2025 00:40:19 GMT
76
+ recorded_with: VCR 6.3.1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workos
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.26.0
4
+ version: 5.27.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - WorkOS
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-10 00:00:00.000000000 Z
11
+ date: 2025-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: encryptor
@@ -381,6 +381,7 @@ files:
381
381
  - spec/support/fixtures/vcr_cassettes/user_management/update_organization_membership/valid_multiple_roles.yml
382
382
  - spec/support/fixtures/vcr_cassettes/user_management/update_user/email.yml
383
383
  - spec/support/fixtures/vcr_cassettes/user_management/update_user/invalid.yml
384
+ - spec/support/fixtures/vcr_cassettes/user_management/update_user/locale.yml
384
385
  - spec/support/fixtures/vcr_cassettes/user_management/update_user/valid.yml
385
386
  - spec/support/fixtures/vcr_cassettes/user_management/update_user_external_id_null.yml
386
387
  - spec/support/fixtures/vcr_cassettes/user_management/update_user_password/invalid.yml
@@ -614,6 +615,7 @@ test_files:
614
615
  - spec/support/fixtures/vcr_cassettes/user_management/update_organization_membership/valid_multiple_roles.yml
615
616
  - spec/support/fixtures/vcr_cassettes/user_management/update_user/email.yml
616
617
  - spec/support/fixtures/vcr_cassettes/user_management/update_user/invalid.yml
618
+ - spec/support/fixtures/vcr_cassettes/user_management/update_user/locale.yml
617
619
  - spec/support/fixtures/vcr_cassettes/user_management/update_user/valid.yml
618
620
  - spec/support/fixtures/vcr_cassettes/user_management/update_user_external_id_null.yml
619
621
  - spec/support/fixtures/vcr_cassettes/user_management/update_user_password/invalid.yml