Skip to content

Commit c111492

Browse files
authored
Add organization id param to list connections API (#74)
* Add organization id param to list connections API * Fix rubocop error * Fix rubocop error and bump minor version
1 parent 54e0702 commit c111492

File tree

5 files changed

+91
-3
lines changed

5 files changed

+91
-3
lines changed

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
workos (0.10.0)
4+
workos (0.10.1)
55
sorbet-runtime (~> 0.5)
66

77
GEM
@@ -54,7 +54,7 @@ GEM
5454
simplecov-html (0.12.2)
5555
sorbet (0.5.5560)
5656
sorbet-static (= 0.5.5560)
57-
sorbet-runtime (0.5.6189)
57+
sorbet-runtime (0.5.6300)
5858
sorbet-static (0.5.5560-universal-darwin-14)
5959
unicode-display_width (1.6.0)
6060
vcr (5.0.0)

lib/workos/sso.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ def create_connection(source:)
203203
# provider descriptor.
204204
# @option options [String] domain The domain of the connection to be
205205
# retrieved.
206+
# @option options [String] organization_id The id of the organization
207+
# of the connections to be retrieved.
206208
# @option options [String] limit Maximum number of records to return.
207209
# @option options [String] before Pagination cursor to receive records
208210
# before a provided Connection ID.

lib/workos/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# typed: strong
33

44
module WorkOS
5-
VERSION = '0.10.0'
5+
VERSION = '0.10.1'
66
end

spec/lib/workos/sso_spec.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,20 @@
397397
end
398398
end
399399

400+
context 'with organization_id option' do
401+
it 'returns connections' do
402+
VCR.use_cassette('sso/list_connections_with_organization_id_param') do
403+
connections = WorkOS::SSO.list_connections(
404+
organization_id: 'org_01EGS4P7QR31EZ4YWD1Z1XA176',
405+
)
406+
expect(connections.size).to eq(1)
407+
expect(connections.first['organization_id']).to eq(
408+
'org_01EGS4P7QR31EZ4YWD1Z1XA176',
409+
)
410+
end
411+
end
412+
end
413+
400414
context 'with limit option' do
401415
it 'returns connections' do
402416
VCR.use_cassette('sso/list_connections_with_limit_param') do

spec/support/fixtures/vcr_cassettes/sso/list_connections_with_organization_id_param.yml

Lines changed: 72 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)