vortex-ruby-sdk 1.6.0 → 1.8.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: c4007275edb1f0eeffa2386fa04e11236f7a12402ad3169c729f4d5bd73faa6b
4
- data.tar.gz: 0ce765593b51887883c4de24671481fcca207285e4314625914b485f199d65b5
3
+ metadata.gz: d8b96f994327d61bfa1cb19ee512a9da227762c0212413cb3de3871e9bc26b56
4
+ data.tar.gz: f3750eb0f15fd83a76d5b15da5adf1b39f004b657abb3ac79b811ba56980dce3
5
5
  SHA512:
6
- metadata.gz: c537cdd1f516a455cd01e648d5f6e62fc7ece380d604480d4b618b0168186fbd01f441b4bf6072c48bf8ad367a5a45bdf287b81d6f337c2e0cbeddcf7fb2667c
7
- data.tar.gz: fa0e660c5faf465511c1fa5fb43fdd6ee8648d35ed95e96c48e2efb79d79586186be4dc39c90a8c9397dcfbd86581565cca8cfccc794cf3ed52e490793f30ac4
6
+ metadata.gz: 73d8968550bb227d4c49fa888e454e3307c8797a33b6812f6cff9b00e48ee144a0396c32492f858e5c8ae02e2a558ecdc56ca192a18dfc4f0d17d81cd57654ea
7
+ data.tar.gz: ab1f06dea51572aa0853ad271cdff44afdb2d502bddedaef32d4c9e3502c74810006af768fe670a8e1a7f8094c9516557e7f006fc0513e3c9764e6d57472c731
data/README.md CHANGED
@@ -58,8 +58,8 @@ jwt = client.generate_jwt(user: user)
58
58
  # Get invitations by target
59
59
  invitations = client.get_invitations_by_target('email', 'user@example.com')
60
60
 
61
- # Accept invitations
62
- client.accept_invitations(['inv1', 'inv2'], { type: 'email', value: 'user@example.com' })
61
+ # Accept an invitation
62
+ client.accept_invitation('inv-123', { email: 'user@example.com' })
63
63
 
64
64
  # Get invitations by group
65
65
  group_invitations = client.get_invitations_by_group('team', 'team1')
@@ -170,7 +170,7 @@ All methods match the functionality of other Vortex SDKs:
170
170
  - `get_invitations_by_target(target_type, target_value)` - Get invitations by target
171
171
  - `get_invitation(invitation_id)` - Get specific invitation
172
172
  - `revoke_invitation(invitation_id)` - Revoke invitation
173
- - `accept_invitations(invitation_ids, target)` - Accept invitations
173
+ - `accept_invitation(invitation_id, user)` - Accept an invitation
174
174
  - `get_invitations_by_group(group_type, group_id)` - Get group invitations
175
175
  - `delete_invitations_by_group(group_type, group_id)` - Delete group invitations
176
176
  - `reinvite(invitation_id)` - Reinvite user
data/lib/vortex/client.rb CHANGED
@@ -95,6 +95,11 @@ module Vortex
95
95
  payload[:adminScopes] = user[:admin_scopes]
96
96
  end
97
97
 
98
+ # Add allowedEmailDomains if present (for domain-restricted invitations)
99
+ if user[:allowed_email_domains] && !user[:allowed_email_domains].empty?
100
+ payload[:allowedEmailDomains] = user[:allowed_email_domains]
101
+ end
102
+
98
103
  # Add any additional properties from attributes
99
104
  if attributes && !attributes.empty?
100
105
  payload.merge!(attributes)
@@ -248,6 +253,22 @@ module Vortex
248
253
  raise VortexError, "Failed to accept invitations: #{e.message}"
249
254
  end
250
255
 
256
+ # Accept a single invitation (recommended method)
257
+ #
258
+ # This is the recommended method for accepting invitations.
259
+ #
260
+ # @param invitation_id [String] Single invitation ID to accept
261
+ # @param user [Hash] User hash with :email and/or :phone
262
+ # @return [Hash] The accepted invitation result
263
+ # @raise [VortexError] If the request fails
264
+ #
265
+ # @example
266
+ # user = { email: 'user@example.com', name: 'John Doe' }
267
+ # result = client.accept_invitation('inv-123', user)
268
+ def accept_invitation(invitation_id, user)
269
+ accept_invitations([invitation_id], user)
270
+ end
271
+
251
272
  # Get invitations by group
252
273
  #
253
274
  # @param group_type [String] The group type
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Vortex
4
- VERSION = '1.6.0'
4
+ VERSION = '1.8.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vortex-ruby-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vortex Software
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-02-05 00:00:00.000000000 Z
11
+ date: 2026-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday