kinde_sdk 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +103 -19
- data/kinde_api/README.md +58 -23
- data/kinde_api/docs/AddOrganizationUsersRequest.md +1 -1
- data/kinde_api/docs/AddOrganizationUsersRequestUsersInner.md +22 -0
- data/kinde_api/docs/{AddOrganizationUsers200Response.md → AddOrganizationUsersResponse.md} +2 -2
- data/kinde_api/docs/Application.md +20 -0
- data/kinde_api/docs/CallbacksApi.md +219 -0
- data/kinde_api/docs/ConnectedAppsApi.md +9 -9
- data/kinde_api/docs/CreateOrganizationRequest.md +11 -1
- data/kinde_api/docs/CreateOrganizationResponse.md +22 -0
- data/kinde_api/docs/CreateOrganizationResponseOrganization.md +18 -0
- data/kinde_api/docs/CreateOrganizationUserRoleRequest.md +18 -0
- data/kinde_api/docs/CreatePermissionRequest.md +22 -0
- data/kinde_api/docs/CreateRoleRequest.md +24 -0
- data/kinde_api/docs/CreateSubscriberSuccessResponse.md +18 -0
- data/kinde_api/docs/CreateSubscriberSuccessResponseSubscriber.md +18 -0
- data/kinde_api/docs/{CreateUser200Response.md → CreateUserResponse.md} +2 -2
- data/kinde_api/docs/EnvironmentsApi.md +71 -4
- data/kinde_api/docs/FeatureFlagsApi.md +9 -11
- data/kinde_api/docs/GetApplicationsResponse.md +24 -0
- data/kinde_api/docs/GetEnvironmentFeatureFlagsResponse.md +24 -0
- data/kinde_api/docs/GetOrganizationFeatureFlagsResponse.md +22 -0
- data/kinde_api/docs/GetOrganizationFeatureFlagsResponseFeatureFlagsValue.md +20 -0
- data/kinde_api/docs/{GetOrganizations200Response.md → GetOrganizationsResponse.md} +2 -2
- data/kinde_api/docs/GetOrganizationsUserRolesResponse.md +24 -0
- data/kinde_api/docs/{GetOrganizationUsers200Response.md → GetOrganizationsUsersResponse.md} +2 -2
- data/kinde_api/docs/GetRedirectCallbackUrlsResponse.md +18 -0
- data/kinde_api/docs/OrganizationUser.md +3 -1
- data/kinde_api/docs/OrganizationUserRole.md +22 -0
- data/kinde_api/docs/OrganizationsApi.md +494 -59
- data/kinde_api/docs/Permissions.md +22 -0
- data/kinde_api/docs/PermissionsApi.md +229 -0
- data/kinde_api/docs/RedirectCallbackUrls.md +18 -0
- data/kinde_api/docs/Roles.md +22 -0
- data/kinde_api/docs/RolesApi.md +229 -0
- data/kinde_api/docs/SubscribersApi.md +229 -0
- data/kinde_api/docs/UpdateOrganizationRequest.md +28 -0
- data/kinde_api/docs/UpdateOrganizationUsersRequest.md +18 -0
- data/kinde_api/docs/UpdateOrganizationUsersRequestUsersInner.md +24 -0
- data/kinde_api/docs/UpdateOrganizationUsersResponse.md +24 -0
- data/kinde_api/docs/UpdateUserRequest.md +3 -1
- data/kinde_api/docs/User.md +15 -1
- data/kinde_api/docs/UserIdentityResult.md +1 -3
- data/kinde_api/docs/UserProfile.md +3 -1
- data/kinde_api/docs/UserProfileV2.md +6 -2
- data/kinde_api/docs/UsersApi.md +31 -259
- data/kinde_api/docs/{GetUsers200Response.md → UsersResponse.md} +2 -2
- data/kinde_api/lib/kinde_api/api/callbacks_api.rb +221 -0
- data/kinde_api/lib/kinde_api/api/connected_apps_api.rb +8 -8
- data/kinde_api/lib/kinde_api/api/environments_api.rb +61 -4
- data/kinde_api/lib/kinde_api/api/feature_flags_api.rb +8 -15
- data/kinde_api/lib/kinde_api/api/organizations_api.rb +492 -57
- data/kinde_api/lib/kinde_api/api/permissions_api.rb +226 -0
- data/kinde_api/lib/kinde_api/api/roles_api.rb +226 -0
- data/kinde_api/lib/kinde_api/api/subscribers_api.rb +228 -0
- data/kinde_api/lib/kinde_api/api/users_api.rb +30 -233
- data/kinde_api/lib/kinde_api/api_client.rb +1 -13
- data/kinde_api/lib/kinde_api/configuration.rb +3 -77
- data/kinde_api/lib/kinde_api/models/add_organization_users_request.rb +2 -2
- data/kinde_api/lib/kinde_api/models/add_organization_users_request_users_inner.rb +242 -0
- data/kinde_api/lib/kinde_api/models/{add_organization_users200_response.rb → add_organization_users_response.rb} +3 -3
- data/kinde_api/lib/kinde_api/models/application.rb +226 -0
- data/kinde_api/lib/kinde_api/models/create_organization_request.rb +54 -4
- data/kinde_api/lib/kinde_api/models/{remove_organization_users200_response.rb → create_organization_response.rb} +19 -12
- data/kinde_api/lib/kinde_api/models/{create_organization201_response.rb → create_organization_response_organization.rb} +8 -18
- data/kinde_api/lib/kinde_api/models/create_organization_user_role_request.rb +218 -0
- data/kinde_api/lib/kinde_api/models/create_permission_request.rb +238 -0
- data/kinde_api/lib/kinde_api/models/create_role_request.rb +248 -0
- data/kinde_api/lib/kinde_api/models/create_subscriber_success_response.rb +217 -0
- data/kinde_api/lib/kinde_api/models/create_subscriber_success_response_subscriber.rb +218 -0
- data/kinde_api/lib/kinde_api/models/create_user_request_identities_inner.rb +34 -0
- data/kinde_api/lib/kinde_api/models/{create_user200_response.rb → create_user_response.rb} +3 -3
- data/kinde_api/lib/kinde_api/models/get_applications_response.rb +249 -0
- data/kinde_api/lib/kinde_api/models/get_environment_feature_flags_response.rb +250 -0
- data/kinde_api/lib/kinde_api/models/get_organization_feature_flags_response.rb +240 -0
- data/kinde_api/lib/kinde_api/models/get_organization_feature_flags_response_feature_flags_value.rb +260 -0
- data/kinde_api/lib/kinde_api/models/{get_organizations200_response.rb → get_organizations_response.rb} +3 -3
- data/kinde_api/lib/kinde_api/models/get_organizations_user_roles_response.rb +249 -0
- data/kinde_api/lib/kinde_api/models/{get_organization_users200_response.rb → get_organizations_users_response.rb} +3 -3
- data/kinde_api/lib/kinde_api/models/get_redirect_callback_urls_response.rb +220 -0
- data/kinde_api/lib/kinde_api/models/organization_user.rb +15 -4
- data/kinde_api/lib/kinde_api/models/organization_user_role.rb +235 -0
- data/kinde_api/lib/kinde_api/models/permissions.rb +238 -0
- data/kinde_api/lib/kinde_api/models/redirect_callback_urls.rb +220 -0
- data/kinde_api/lib/kinde_api/models/roles.rb +238 -0
- data/kinde_api/lib/kinde_api/models/update_organization_request.rb +268 -0
- data/kinde_api/lib/kinde_api/models/{remove_organization_users_request.rb → update_organization_users_request.rb} +5 -5
- data/kinde_api/lib/kinde_api/models/update_organization_users_request_users_inner.rb +252 -0
- data/kinde_api/lib/kinde_api/models/update_organization_users_response.rb +250 -0
- data/kinde_api/lib/kinde_api/models/update_user_request.rb +14 -4
- data/kinde_api/lib/kinde_api/models/user.rb +79 -5
- data/kinde_api/lib/kinde_api/models/user_identity_result.rb +4 -14
- data/kinde_api/lib/kinde_api/models/user_profile.rb +14 -4
- data/kinde_api/lib/kinde_api/models/user_profile_v2.rb +25 -5
- data/kinde_api/lib/kinde_api/models/{get_users200_response.rb → users_response.rb} +3 -3
- data/kinde_api/lib/kinde_api.rb +32 -8
- data/kinde_api/spec/api/callbacks_api_spec.rb +73 -0
- data/kinde_api/spec/api/connected_apps_api_spec.rb +1 -1
- data/kinde_api/spec/api/environments_api_spec.rb +11 -0
- data/kinde_api/spec/api/feature_flags_api_spec.rb +1 -2
- data/kinde_api/spec/api/organizations_api_spec.rb +93 -14
- data/kinde_api/spec/api/permissions_api_spec.rb +74 -0
- data/kinde_api/spec/api/roles_api_spec.rb +74 -0
- data/kinde_api/spec/api/subscribers_api_spec.rb +76 -0
- data/kinde_api/spec/api/users_api_spec.rb +6 -47
- data/kinde_api/spec/api_client_spec.rb +0 -12
- data/kinde_api/spec/models/add_organization_users_request_users_inner_spec.rb +46 -0
- data/kinde_api/spec/models/{add_organization_users200_response_spec.rb → add_organization_users_response_spec.rb} +6 -6
- data/kinde_api/spec/models/{remove_organization_users200_response_spec.rb → application_spec.rb} +8 -8
- data/kinde_api/spec/models/create_organization_request_spec.rb +30 -0
- data/kinde_api/spec/models/create_organization_response_organization_spec.rb +34 -0
- data/kinde_api/spec/models/{create_organization201_response_spec.rb → create_organization_response_spec.rb} +13 -7
- data/kinde_api/spec/models/create_organization_user_role_request_spec.rb +34 -0
- data/kinde_api/spec/models/create_permission_request_spec.rb +46 -0
- data/kinde_api/spec/models/create_role_request_spec.rb +52 -0
- data/kinde_api/spec/models/create_subscriber_success_response_spec.rb +34 -0
- data/kinde_api/spec/models/create_subscriber_success_response_subscriber_spec.rb +34 -0
- data/kinde_api/spec/models/create_user_request_identities_inner_spec.rb +4 -0
- data/kinde_api/spec/models/{create_user200_response_spec.rb → create_user_response_spec.rb} +6 -6
- data/kinde_api/spec/models/get_applications_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_environment_feature_flags_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_organization_feature_flags_response_feature_flags_value_spec.rb +44 -0
- data/kinde_api/spec/models/get_organization_feature_flags_response_spec.rb +46 -0
- data/kinde_api/spec/models/{get_organizations200_response_spec.rb → get_organizations_response_spec.rb} +6 -6
- data/kinde_api/spec/models/get_organizations_user_roles_response_spec.rb +52 -0
- data/kinde_api/spec/models/{get_organization_users200_response_spec.rb → get_organizations_users_response_spec.rb} +6 -6
- data/kinde_api/spec/models/get_redirect_callback_urls_response_spec.rb +34 -0
- data/kinde_api/spec/models/organization_user_role_spec.rb +46 -0
- data/kinde_api/spec/models/organization_user_spec.rb +6 -0
- data/kinde_api/spec/models/permissions_spec.rb +46 -0
- data/kinde_api/spec/models/redirect_callback_urls_spec.rb +34 -0
- data/kinde_api/spec/models/roles_spec.rb +46 -0
- data/kinde_api/spec/models/update_organization_request_spec.rb +64 -0
- data/kinde_api/spec/models/{remove_organization_users_request_spec.rb → update_organization_users_request_spec.rb} +6 -6
- data/kinde_api/spec/models/update_organization_users_request_users_inner_spec.rb +52 -0
- data/kinde_api/spec/models/update_organization_users_response_spec.rb +52 -0
- data/kinde_api/spec/models/update_user_request_spec.rb +6 -0
- data/kinde_api/spec/models/user_identity_result_spec.rb +0 -6
- data/kinde_api/spec/models/user_profile_spec.rb +6 -0
- data/kinde_api/spec/models/user_profile_v2_spec.rb +12 -0
- data/kinde_api/spec/models/user_spec.rb +42 -0
- data/kinde_api/spec/models/{get_users200_response_spec.rb → users_response_spec.rb} +6 -6
- data/kinde_sdk.gemspec +1 -1
- data/lib/kinde_sdk/client/feature_flags.rb +64 -0
- data/lib/kinde_sdk/client/permissions.rb +20 -0
- data/lib/kinde_sdk/client.rb +33 -18
- data/lib/kinde_sdk/configuration.rb +0 -2
- data/lib/kinde_sdk/version.rb +1 -1
- data/lib/kinde_sdk.rb +27 -12
- data/spec/kinde_sdk_spec.rb +131 -5
- data/spec/spec_helper.rb +2 -0
- metadata +134 -36
- data/kinde_api/docs/CreateOrganization201Response.md +0 -20
- data/kinde_api/docs/RemoveOrganizationUsers200Response.md +0 -20
- data/kinde_api/docs/RemoveOrganizationUsersRequest.md +0 -18
@@ -19,38 +19,41 @@ module KindeApi
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
#
|
22
|
+
# Add Organization Users
|
23
23
|
# Add existing users to an organization.
|
24
|
+
# @param org_code [String] The organization's code.
|
24
25
|
# @param [Hash] opts the optional parameters
|
25
|
-
# @option opts [String] :code The organization's code.
|
26
26
|
# @option opts [AddOrganizationUsersRequest] :add_organization_users_request
|
27
|
-
# @return [
|
28
|
-
def add_organization_users(opts = {})
|
29
|
-
data, _status_code, _headers = add_organization_users_with_http_info(opts)
|
27
|
+
# @return [AddOrganizationUsersResponse]
|
28
|
+
def add_organization_users(org_code, opts = {})
|
29
|
+
data, _status_code, _headers = add_organization_users_with_http_info(org_code, opts)
|
30
30
|
data
|
31
31
|
end
|
32
32
|
|
33
|
-
#
|
33
|
+
# Add Organization Users
|
34
34
|
# Add existing users to an organization.
|
35
|
+
# @param org_code [String] The organization's code.
|
35
36
|
# @param [Hash] opts the optional parameters
|
36
|
-
# @option opts [String] :code The organization's code.
|
37
37
|
# @option opts [AddOrganizationUsersRequest] :add_organization_users_request
|
38
|
-
# @return [Array<(
|
39
|
-
def add_organization_users_with_http_info(opts = {})
|
38
|
+
# @return [Array<(AddOrganizationUsersResponse, Integer, Hash)>] AddOrganizationUsersResponse data, response status code and response headers
|
39
|
+
def add_organization_users_with_http_info(org_code, opts = {})
|
40
40
|
if @api_client.config.debugging
|
41
41
|
@api_client.config.logger.debug 'Calling API: OrganizationsApi.add_organization_users ...'
|
42
42
|
end
|
43
|
+
# verify the required parameter 'org_code' is set
|
44
|
+
if @api_client.config.client_side_validation && org_code.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'org_code' when calling OrganizationsApi.add_organization_users"
|
46
|
+
end
|
43
47
|
# resource path
|
44
|
-
local_var_path = '/api/v1/
|
48
|
+
local_var_path = '/api/v1/organizations/{org_code}/users'.sub('{' + 'org_code' + '}', CGI.escape(org_code.to_s))
|
45
49
|
|
46
50
|
# query parameters
|
47
51
|
query_params = opts[:query_params] || {}
|
48
|
-
query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
|
49
52
|
|
50
53
|
# header parameters
|
51
54
|
header_params = opts[:header_params] || {}
|
52
55
|
# HTTP header 'Accept' (if needed)
|
53
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
54
57
|
# HTTP header 'Content-Type'
|
55
58
|
content_type = @api_client.select_header_content_type(['application/json'])
|
56
59
|
if !content_type.nil?
|
@@ -64,7 +67,7 @@ module KindeApi
|
|
64
67
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'add_organization_users_request'])
|
65
68
|
|
66
69
|
# return_type
|
67
|
-
return_type = opts[:debug_return_type] || '
|
70
|
+
return_type = opts[:debug_return_type] || 'AddOrganizationUsersResponse'
|
68
71
|
|
69
72
|
# auth_names
|
70
73
|
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
@@ -90,7 +93,7 @@ module KindeApi
|
|
90
93
|
# Create an organization.
|
91
94
|
# @param [Hash] opts the optional parameters
|
92
95
|
# @option opts [CreateOrganizationRequest] :create_organization_request Organization details.
|
93
|
-
# @return [
|
96
|
+
# @return [CreateOrganizationResponse]
|
94
97
|
def create_organization(opts = {})
|
95
98
|
data, _status_code, _headers = create_organization_with_http_info(opts)
|
96
99
|
data
|
@@ -100,7 +103,7 @@ module KindeApi
|
|
100
103
|
# Create an organization.
|
101
104
|
# @param [Hash] opts the optional parameters
|
102
105
|
# @option opts [CreateOrganizationRequest] :create_organization_request Organization details.
|
103
|
-
# @return [Array<(
|
106
|
+
# @return [Array<(CreateOrganizationResponse, Integer, Hash)>] CreateOrganizationResponse data, response status code and response headers
|
104
107
|
def create_organization_with_http_info(opts = {})
|
105
108
|
if @api_client.config.debugging
|
106
109
|
@api_client.config.logger.debug 'Calling API: OrganizationsApi.create_organization ...'
|
@@ -114,7 +117,7 @@ module KindeApi
|
|
114
117
|
# header parameters
|
115
118
|
header_params = opts[:header_params] || {}
|
116
119
|
# HTTP header 'Accept' (if needed)
|
117
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
120
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
118
121
|
# HTTP header 'Content-Type'
|
119
122
|
content_type = @api_client.select_header_content_type(['application/json'])
|
120
123
|
if !content_type.nil?
|
@@ -128,7 +131,7 @@ module KindeApi
|
|
128
131
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_organization_request'])
|
129
132
|
|
130
133
|
# return_type
|
131
|
-
return_type = opts[:debug_return_type] || '
|
134
|
+
return_type = opts[:debug_return_type] || 'CreateOrganizationResponse'
|
132
135
|
|
133
136
|
# auth_names
|
134
137
|
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
@@ -150,6 +153,86 @@ module KindeApi
|
|
150
153
|
return data, status_code, headers
|
151
154
|
end
|
152
155
|
|
156
|
+
# Add Organization User Role
|
157
|
+
# Add role to an organization user.
|
158
|
+
# @param org_code [String] The organization's code.
|
159
|
+
# @param user_id [String] The user's id.
|
160
|
+
# @param create_organization_user_role_request [CreateOrganizationUserRoleRequest] Role details.
|
161
|
+
# @param [Hash] opts the optional parameters
|
162
|
+
# @return [SuccessResponse]
|
163
|
+
def create_organization_user_role(org_code, user_id, create_organization_user_role_request, opts = {})
|
164
|
+
data, _status_code, _headers = create_organization_user_role_with_http_info(org_code, user_id, create_organization_user_role_request, opts)
|
165
|
+
data
|
166
|
+
end
|
167
|
+
|
168
|
+
# Add Organization User Role
|
169
|
+
# Add role to an organization user.
|
170
|
+
# @param org_code [String] The organization's code.
|
171
|
+
# @param user_id [String] The user's id.
|
172
|
+
# @param create_organization_user_role_request [CreateOrganizationUserRoleRequest] Role details.
|
173
|
+
# @param [Hash] opts the optional parameters
|
174
|
+
# @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
|
175
|
+
def create_organization_user_role_with_http_info(org_code, user_id, create_organization_user_role_request, opts = {})
|
176
|
+
if @api_client.config.debugging
|
177
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.create_organization_user_role ...'
|
178
|
+
end
|
179
|
+
# verify the required parameter 'org_code' is set
|
180
|
+
if @api_client.config.client_side_validation && org_code.nil?
|
181
|
+
fail ArgumentError, "Missing the required parameter 'org_code' when calling OrganizationsApi.create_organization_user_role"
|
182
|
+
end
|
183
|
+
# verify the required parameter 'user_id' is set
|
184
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
185
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling OrganizationsApi.create_organization_user_role"
|
186
|
+
end
|
187
|
+
# verify the required parameter 'create_organization_user_role_request' is set
|
188
|
+
if @api_client.config.client_side_validation && create_organization_user_role_request.nil?
|
189
|
+
fail ArgumentError, "Missing the required parameter 'create_organization_user_role_request' when calling OrganizationsApi.create_organization_user_role"
|
190
|
+
end
|
191
|
+
# resource path
|
192
|
+
local_var_path = '/api/v1/organizations/{org_code}/users/{user_id}/roles'.sub('{' + 'org_code' + '}', CGI.escape(org_code.to_s)).sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
193
|
+
|
194
|
+
# query parameters
|
195
|
+
query_params = opts[:query_params] || {}
|
196
|
+
|
197
|
+
# header parameters
|
198
|
+
header_params = opts[:header_params] || {}
|
199
|
+
# HTTP header 'Accept' (if needed)
|
200
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
201
|
+
# HTTP header 'Content-Type'
|
202
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
203
|
+
if !content_type.nil?
|
204
|
+
header_params['Content-Type'] = content_type
|
205
|
+
end
|
206
|
+
|
207
|
+
# form parameters
|
208
|
+
form_params = opts[:form_params] || {}
|
209
|
+
|
210
|
+
# http body (model)
|
211
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_organization_user_role_request)
|
212
|
+
|
213
|
+
# return_type
|
214
|
+
return_type = opts[:debug_return_type] || 'SuccessResponse'
|
215
|
+
|
216
|
+
# auth_names
|
217
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
218
|
+
|
219
|
+
new_options = opts.merge(
|
220
|
+
:operation => :"OrganizationsApi.create_organization_user_role",
|
221
|
+
:header_params => header_params,
|
222
|
+
:query_params => query_params,
|
223
|
+
:form_params => form_params,
|
224
|
+
:body => post_body,
|
225
|
+
:auth_names => auth_names,
|
226
|
+
:return_type => return_type
|
227
|
+
)
|
228
|
+
|
229
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
230
|
+
if @api_client.config.debugging
|
231
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#create_organization_user_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
232
|
+
end
|
233
|
+
return data, status_code, headers
|
234
|
+
end
|
235
|
+
|
153
236
|
# Delete organization feature flag override
|
154
237
|
# Delete organization feature flag override.
|
155
238
|
# @param org_code [String] The identifier for the organization.
|
@@ -188,7 +271,7 @@ module KindeApi
|
|
188
271
|
# header parameters
|
189
272
|
header_params = opts[:header_params] || {}
|
190
273
|
# HTTP header 'Accept' (if needed)
|
191
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
274
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
192
275
|
|
193
276
|
# form parameters
|
194
277
|
form_params = opts[:form_params] || {}
|
@@ -251,7 +334,7 @@ module KindeApi
|
|
251
334
|
# header parameters
|
252
335
|
header_params = opts[:header_params] || {}
|
253
336
|
# HTTP header 'Accept' (if needed)
|
254
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
337
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
255
338
|
|
256
339
|
# form parameters
|
257
340
|
form_params = opts[:form_params] || {}
|
@@ -282,6 +365,81 @@ module KindeApi
|
|
282
365
|
return data, status_code, headers
|
283
366
|
end
|
284
367
|
|
368
|
+
# Delete Organization User Role
|
369
|
+
# Delete role for an organization user.
|
370
|
+
# @param org_code [String] The organization's code.
|
371
|
+
# @param user_id [String] The user's id.
|
372
|
+
# @param role_id [String] The role id.
|
373
|
+
# @param [Hash] opts the optional parameters
|
374
|
+
# @return [SuccessResponse]
|
375
|
+
def delete_organization_user_role(org_code, user_id, role_id, opts = {})
|
376
|
+
data, _status_code, _headers = delete_organization_user_role_with_http_info(org_code, user_id, role_id, opts)
|
377
|
+
data
|
378
|
+
end
|
379
|
+
|
380
|
+
# Delete Organization User Role
|
381
|
+
# Delete role for an organization user.
|
382
|
+
# @param org_code [String] The organization's code.
|
383
|
+
# @param user_id [String] The user's id.
|
384
|
+
# @param role_id [String] The role id.
|
385
|
+
# @param [Hash] opts the optional parameters
|
386
|
+
# @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
|
387
|
+
def delete_organization_user_role_with_http_info(org_code, user_id, role_id, opts = {})
|
388
|
+
if @api_client.config.debugging
|
389
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_organization_user_role ...'
|
390
|
+
end
|
391
|
+
# verify the required parameter 'org_code' is set
|
392
|
+
if @api_client.config.client_side_validation && org_code.nil?
|
393
|
+
fail ArgumentError, "Missing the required parameter 'org_code' when calling OrganizationsApi.delete_organization_user_role"
|
394
|
+
end
|
395
|
+
# verify the required parameter 'user_id' is set
|
396
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
397
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling OrganizationsApi.delete_organization_user_role"
|
398
|
+
end
|
399
|
+
# verify the required parameter 'role_id' is set
|
400
|
+
if @api_client.config.client_side_validation && role_id.nil?
|
401
|
+
fail ArgumentError, "Missing the required parameter 'role_id' when calling OrganizationsApi.delete_organization_user_role"
|
402
|
+
end
|
403
|
+
# resource path
|
404
|
+
local_var_path = '/api/v1/organizations/{org_code}/users/{user_id}/roles/{role_id}'.sub('{' + 'org_code' + '}', CGI.escape(org_code.to_s)).sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s)).sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s))
|
405
|
+
|
406
|
+
# query parameters
|
407
|
+
query_params = opts[:query_params] || {}
|
408
|
+
|
409
|
+
# header parameters
|
410
|
+
header_params = opts[:header_params] || {}
|
411
|
+
# HTTP header 'Accept' (if needed)
|
412
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
413
|
+
|
414
|
+
# form parameters
|
415
|
+
form_params = opts[:form_params] || {}
|
416
|
+
|
417
|
+
# http body (model)
|
418
|
+
post_body = opts[:debug_body]
|
419
|
+
|
420
|
+
# return_type
|
421
|
+
return_type = opts[:debug_return_type] || 'SuccessResponse'
|
422
|
+
|
423
|
+
# auth_names
|
424
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
425
|
+
|
426
|
+
new_options = opts.merge(
|
427
|
+
:operation => :"OrganizationsApi.delete_organization_user_role",
|
428
|
+
:header_params => header_params,
|
429
|
+
:query_params => query_params,
|
430
|
+
:form_params => form_params,
|
431
|
+
:body => post_body,
|
432
|
+
:auth_names => auth_names,
|
433
|
+
:return_type => return_type
|
434
|
+
)
|
435
|
+
|
436
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
437
|
+
if @api_client.config.debugging
|
438
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#delete_organization_user_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
439
|
+
end
|
440
|
+
return data, status_code, headers
|
441
|
+
end
|
442
|
+
|
285
443
|
# Get Organization
|
286
444
|
# Gets an organization given the organization's code.
|
287
445
|
# @param [Hash] opts the optional parameters
|
@@ -311,7 +469,7 @@ module KindeApi
|
|
311
469
|
# header parameters
|
312
470
|
header_params = opts[:header_params] || {}
|
313
471
|
# HTTP header 'Accept' (if needed)
|
314
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
472
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
315
473
|
|
316
474
|
# form parameters
|
317
475
|
form_params = opts[:form_params] || {}
|
@@ -342,52 +500,187 @@ module KindeApi
|
|
342
500
|
return data, status_code, headers
|
343
501
|
end
|
344
502
|
|
503
|
+
# List organization feature flags
|
504
|
+
# Get all organization feature flags.
|
505
|
+
# @param org_code [String] The identifier for the organization.
|
506
|
+
# @param [Hash] opts the optional parameters
|
507
|
+
# @return [GetOrganizationFeatureFlagsResponse]
|
508
|
+
def get_organization_feature_flags(org_code, opts = {})
|
509
|
+
data, _status_code, _headers = get_organization_feature_flags_with_http_info(org_code, opts)
|
510
|
+
data
|
511
|
+
end
|
512
|
+
|
513
|
+
# List organization feature flags
|
514
|
+
# Get all organization feature flags.
|
515
|
+
# @param org_code [String] The identifier for the organization.
|
516
|
+
# @param [Hash] opts the optional parameters
|
517
|
+
# @return [Array<(GetOrganizationFeatureFlagsResponse, Integer, Hash)>] GetOrganizationFeatureFlagsResponse data, response status code and response headers
|
518
|
+
def get_organization_feature_flags_with_http_info(org_code, opts = {})
|
519
|
+
if @api_client.config.debugging
|
520
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization_feature_flags ...'
|
521
|
+
end
|
522
|
+
# verify the required parameter 'org_code' is set
|
523
|
+
if @api_client.config.client_side_validation && org_code.nil?
|
524
|
+
fail ArgumentError, "Missing the required parameter 'org_code' when calling OrganizationsApi.get_organization_feature_flags"
|
525
|
+
end
|
526
|
+
# resource path
|
527
|
+
local_var_path = '/api/v1/organizations/{org_code}/feature_flags'.sub('{' + 'org_code' + '}', CGI.escape(org_code.to_s))
|
528
|
+
|
529
|
+
# query parameters
|
530
|
+
query_params = opts[:query_params] || {}
|
531
|
+
|
532
|
+
# header parameters
|
533
|
+
header_params = opts[:header_params] || {}
|
534
|
+
# HTTP header 'Accept' (if needed)
|
535
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
536
|
+
|
537
|
+
# form parameters
|
538
|
+
form_params = opts[:form_params] || {}
|
539
|
+
|
540
|
+
# http body (model)
|
541
|
+
post_body = opts[:debug_body]
|
542
|
+
|
543
|
+
# return_type
|
544
|
+
return_type = opts[:debug_return_type] || 'GetOrganizationFeatureFlagsResponse'
|
545
|
+
|
546
|
+
# auth_names
|
547
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
548
|
+
|
549
|
+
new_options = opts.merge(
|
550
|
+
:operation => :"OrganizationsApi.get_organization_feature_flags",
|
551
|
+
:header_params => header_params,
|
552
|
+
:query_params => query_params,
|
553
|
+
:form_params => form_params,
|
554
|
+
:body => post_body,
|
555
|
+
:auth_names => auth_names,
|
556
|
+
:return_type => return_type
|
557
|
+
)
|
558
|
+
|
559
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
560
|
+
if @api_client.config.debugging
|
561
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#get_organization_feature_flags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
562
|
+
end
|
563
|
+
return data, status_code, headers
|
564
|
+
end
|
565
|
+
|
566
|
+
# List Organization User Roles
|
567
|
+
# Get roles for an organization user.
|
568
|
+
# @param org_code [String] The organization's code.
|
569
|
+
# @param user_id [String] The user's id.
|
570
|
+
# @param [Hash] opts the optional parameters
|
571
|
+
# @return [GetOrganizationsUserRolesResponse]
|
572
|
+
def get_organization_user_roles(org_code, user_id, opts = {})
|
573
|
+
data, _status_code, _headers = get_organization_user_roles_with_http_info(org_code, user_id, opts)
|
574
|
+
data
|
575
|
+
end
|
576
|
+
|
577
|
+
# List Organization User Roles
|
578
|
+
# Get roles for an organization user.
|
579
|
+
# @param org_code [String] The organization's code.
|
580
|
+
# @param user_id [String] The user's id.
|
581
|
+
# @param [Hash] opts the optional parameters
|
582
|
+
# @return [Array<(GetOrganizationsUserRolesResponse, Integer, Hash)>] GetOrganizationsUserRolesResponse data, response status code and response headers
|
583
|
+
def get_organization_user_roles_with_http_info(org_code, user_id, opts = {})
|
584
|
+
if @api_client.config.debugging
|
585
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization_user_roles ...'
|
586
|
+
end
|
587
|
+
# verify the required parameter 'org_code' is set
|
588
|
+
if @api_client.config.client_side_validation && org_code.nil?
|
589
|
+
fail ArgumentError, "Missing the required parameter 'org_code' when calling OrganizationsApi.get_organization_user_roles"
|
590
|
+
end
|
591
|
+
# verify the required parameter 'user_id' is set
|
592
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
593
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling OrganizationsApi.get_organization_user_roles"
|
594
|
+
end
|
595
|
+
# resource path
|
596
|
+
local_var_path = '/api/v1/organizations/{org_code}/users/{user_id}/roles'.sub('{' + 'org_code' + '}', CGI.escape(org_code.to_s)).sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
597
|
+
|
598
|
+
# query parameters
|
599
|
+
query_params = opts[:query_params] || {}
|
600
|
+
|
601
|
+
# header parameters
|
602
|
+
header_params = opts[:header_params] || {}
|
603
|
+
# HTTP header 'Accept' (if needed)
|
604
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
605
|
+
|
606
|
+
# form parameters
|
607
|
+
form_params = opts[:form_params] || {}
|
608
|
+
|
609
|
+
# http body (model)
|
610
|
+
post_body = opts[:debug_body]
|
611
|
+
|
612
|
+
# return_type
|
613
|
+
return_type = opts[:debug_return_type] || 'GetOrganizationsUserRolesResponse'
|
614
|
+
|
615
|
+
# auth_names
|
616
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
617
|
+
|
618
|
+
new_options = opts.merge(
|
619
|
+
:operation => :"OrganizationsApi.get_organization_user_roles",
|
620
|
+
:header_params => header_params,
|
621
|
+
:query_params => query_params,
|
622
|
+
:form_params => form_params,
|
623
|
+
:body => post_body,
|
624
|
+
:auth_names => auth_names,
|
625
|
+
:return_type => return_type
|
626
|
+
)
|
627
|
+
|
628
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
629
|
+
if @api_client.config.debugging
|
630
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#get_organization_user_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
631
|
+
end
|
632
|
+
return data, status_code, headers
|
633
|
+
end
|
634
|
+
|
345
635
|
# List Organization Users
|
346
636
|
# Get users in an organization.
|
637
|
+
# @param org_code [String] The organization's code.
|
347
638
|
# @param [Hash] opts the optional parameters
|
348
639
|
# @option opts [String] :sort Field and order to sort the result by.
|
349
640
|
# @option opts [Integer] :page_size Number of results per page. Defaults to 10 if parameter not sent.
|
350
641
|
# @option opts [String] :next_token A string to get the next page of results if there are more results.
|
351
|
-
# @option opts [String] :code The organization's code.
|
352
642
|
# @option opts [String] :permissions Filter by user permissions
|
353
|
-
# @return [
|
354
|
-
def get_organization_users(opts = {})
|
355
|
-
data, _status_code, _headers = get_organization_users_with_http_info(opts)
|
643
|
+
# @return [GetOrganizationsUsersResponse]
|
644
|
+
def get_organization_users(org_code, opts = {})
|
645
|
+
data, _status_code, _headers = get_organization_users_with_http_info(org_code, opts)
|
356
646
|
data
|
357
647
|
end
|
358
648
|
|
359
649
|
# List Organization Users
|
360
650
|
# Get users in an organization.
|
651
|
+
# @param org_code [String] The organization's code.
|
361
652
|
# @param [Hash] opts the optional parameters
|
362
653
|
# @option opts [String] :sort Field and order to sort the result by.
|
363
654
|
# @option opts [Integer] :page_size Number of results per page. Defaults to 10 if parameter not sent.
|
364
655
|
# @option opts [String] :next_token A string to get the next page of results if there are more results.
|
365
|
-
# @option opts [String] :code The organization's code.
|
366
656
|
# @option opts [String] :permissions Filter by user permissions
|
367
|
-
# @return [Array<(
|
368
|
-
def get_organization_users_with_http_info(opts = {})
|
657
|
+
# @return [Array<(GetOrganizationsUsersResponse, Integer, Hash)>] GetOrganizationsUsersResponse data, response status code and response headers
|
658
|
+
def get_organization_users_with_http_info(org_code, opts = {})
|
369
659
|
if @api_client.config.debugging
|
370
660
|
@api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization_users ...'
|
371
661
|
end
|
662
|
+
# verify the required parameter 'org_code' is set
|
663
|
+
if @api_client.config.client_side_validation && org_code.nil?
|
664
|
+
fail ArgumentError, "Missing the required parameter 'org_code' when calling OrganizationsApi.get_organization_users"
|
665
|
+
end
|
372
666
|
allowable_values = ["name_asc", "name_desc", "email_asc", "email_desc"]
|
373
667
|
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
374
668
|
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
375
669
|
end
|
376
670
|
# resource path
|
377
|
-
local_var_path = '/api/v1/
|
671
|
+
local_var_path = '/api/v1/organizations/{org_code}/users'.sub('{' + 'org_code' + '}', CGI.escape(org_code.to_s))
|
378
672
|
|
379
673
|
# query parameters
|
380
674
|
query_params = opts[:query_params] || {}
|
381
675
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
382
676
|
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
383
677
|
query_params[:'next_token'] = opts[:'next_token'] if !opts[:'next_token'].nil?
|
384
|
-
query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
|
385
678
|
query_params[:'permissions'] = opts[:'permissions'] if !opts[:'permissions'].nil?
|
386
679
|
|
387
680
|
# header parameters
|
388
681
|
header_params = opts[:header_params] || {}
|
389
682
|
# HTTP header 'Accept' (if needed)
|
390
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
683
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
391
684
|
|
392
685
|
# form parameters
|
393
686
|
form_params = opts[:form_params] || {}
|
@@ -396,7 +689,7 @@ module KindeApi
|
|
396
689
|
post_body = opts[:debug_body]
|
397
690
|
|
398
691
|
# return_type
|
399
|
-
return_type = opts[:debug_return_type] || '
|
692
|
+
return_type = opts[:debug_return_type] || 'GetOrganizationsUsersResponse'
|
400
693
|
|
401
694
|
# auth_names
|
402
695
|
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
@@ -424,7 +717,7 @@ module KindeApi
|
|
424
717
|
# @option opts [String] :sort Field and order to sort the result by.
|
425
718
|
# @option opts [Integer] :page_size Number of results per page. Defaults to 10 if parameter not sent.
|
426
719
|
# @option opts [String] :next_token A string to get the next page of results if there are more results.
|
427
|
-
# @return [
|
720
|
+
# @return [GetOrganizationsResponse]
|
428
721
|
def get_organizations(opts = {})
|
429
722
|
data, _status_code, _headers = get_organizations_with_http_info(opts)
|
430
723
|
data
|
@@ -436,7 +729,7 @@ module KindeApi
|
|
436
729
|
# @option opts [String] :sort Field and order to sort the result by.
|
437
730
|
# @option opts [Integer] :page_size Number of results per page. Defaults to 10 if parameter not sent.
|
438
731
|
# @option opts [String] :next_token A string to get the next page of results if there are more results.
|
439
|
-
# @return [Array<(
|
732
|
+
# @return [Array<(GetOrganizationsResponse, Integer, Hash)>] GetOrganizationsResponse data, response status code and response headers
|
440
733
|
def get_organizations_with_http_info(opts = {})
|
441
734
|
if @api_client.config.debugging
|
442
735
|
@api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organizations ...'
|
@@ -457,7 +750,7 @@ module KindeApi
|
|
457
750
|
# header parameters
|
458
751
|
header_params = opts[:header_params] || {}
|
459
752
|
# HTTP header 'Accept' (if needed)
|
460
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
753
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
461
754
|
|
462
755
|
# form parameters
|
463
756
|
form_params = opts[:form_params] || {}
|
@@ -466,7 +759,7 @@ module KindeApi
|
|
466
759
|
post_body = opts[:debug_body]
|
467
760
|
|
468
761
|
# return_type
|
469
|
-
return_type = opts[:debug_return_type] || '
|
762
|
+
return_type = opts[:debug_return_type] || 'GetOrganizationsResponse'
|
470
763
|
|
471
764
|
# auth_names
|
472
765
|
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
@@ -488,38 +781,110 @@ module KindeApi
|
|
488
781
|
return data, status_code, headers
|
489
782
|
end
|
490
783
|
|
491
|
-
# Remove
|
492
|
-
# Remove
|
784
|
+
# Remove Organization User
|
785
|
+
# Remove user from an organization.
|
786
|
+
# @param org_code [String] The organization's code.
|
787
|
+
# @param user_id [String] The user's id.
|
493
788
|
# @param [Hash] opts the optional parameters
|
494
|
-
# @
|
495
|
-
|
496
|
-
|
497
|
-
def remove_organization_users(opts = {})
|
498
|
-
data, _status_code, _headers = remove_organization_users_with_http_info(opts)
|
789
|
+
# @return [SuccessResponse]
|
790
|
+
def remove_organization_user(org_code, user_id, opts = {})
|
791
|
+
data, _status_code, _headers = remove_organization_user_with_http_info(org_code, user_id, opts)
|
499
792
|
data
|
500
793
|
end
|
501
794
|
|
502
|
-
# Remove
|
503
|
-
# Remove
|
795
|
+
# Remove Organization User
|
796
|
+
# Remove user from an organization.
|
797
|
+
# @param org_code [String] The organization's code.
|
798
|
+
# @param user_id [String] The user's id.
|
504
799
|
# @param [Hash] opts the optional parameters
|
505
|
-
# @
|
506
|
-
|
507
|
-
# @return [Array<(RemoveOrganizationUsers200Response, Integer, Hash)>] RemoveOrganizationUsers200Response data, response status code and response headers
|
508
|
-
def remove_organization_users_with_http_info(opts = {})
|
800
|
+
# @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
|
801
|
+
def remove_organization_user_with_http_info(org_code, user_id, opts = {})
|
509
802
|
if @api_client.config.debugging
|
510
|
-
@api_client.config.logger.debug 'Calling API: OrganizationsApi.
|
803
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.remove_organization_user ...'
|
804
|
+
end
|
805
|
+
# verify the required parameter 'org_code' is set
|
806
|
+
if @api_client.config.client_side_validation && org_code.nil?
|
807
|
+
fail ArgumentError, "Missing the required parameter 'org_code' when calling OrganizationsApi.remove_organization_user"
|
808
|
+
end
|
809
|
+
# verify the required parameter 'user_id' is set
|
810
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
811
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling OrganizationsApi.remove_organization_user"
|
511
812
|
end
|
512
813
|
# resource path
|
513
|
-
local_var_path = '/api/v1/
|
814
|
+
local_var_path = '/api/v1/organizations/{org_code}/users/{user_id}'.sub('{' + 'org_code' + '}', CGI.escape(org_code.to_s)).sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
514
815
|
|
515
816
|
# query parameters
|
516
817
|
query_params = opts[:query_params] || {}
|
517
|
-
query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
|
518
818
|
|
519
819
|
# header parameters
|
520
820
|
header_params = opts[:header_params] || {}
|
521
821
|
# HTTP header 'Accept' (if needed)
|
522
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
822
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
823
|
+
|
824
|
+
# form parameters
|
825
|
+
form_params = opts[:form_params] || {}
|
826
|
+
|
827
|
+
# http body (model)
|
828
|
+
post_body = opts[:debug_body]
|
829
|
+
|
830
|
+
# return_type
|
831
|
+
return_type = opts[:debug_return_type] || 'SuccessResponse'
|
832
|
+
|
833
|
+
# auth_names
|
834
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
835
|
+
|
836
|
+
new_options = opts.merge(
|
837
|
+
:operation => :"OrganizationsApi.remove_organization_user",
|
838
|
+
:header_params => header_params,
|
839
|
+
:query_params => query_params,
|
840
|
+
:form_params => form_params,
|
841
|
+
:body => post_body,
|
842
|
+
:auth_names => auth_names,
|
843
|
+
:return_type => return_type
|
844
|
+
)
|
845
|
+
|
846
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
847
|
+
if @api_client.config.debugging
|
848
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#remove_organization_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
849
|
+
end
|
850
|
+
return data, status_code, headers
|
851
|
+
end
|
852
|
+
|
853
|
+
# Update Organization
|
854
|
+
# Update an organization.
|
855
|
+
# @param org_code [String] The identifier for the organization.
|
856
|
+
# @param [Hash] opts the optional parameters
|
857
|
+
# @option opts [UpdateOrganizationRequest] :update_organization_request Organization details.
|
858
|
+
# @return [nil]
|
859
|
+
def update_organization(org_code, opts = {})
|
860
|
+
update_organization_with_http_info(org_code, opts)
|
861
|
+
nil
|
862
|
+
end
|
863
|
+
|
864
|
+
# Update Organization
|
865
|
+
# Update an organization.
|
866
|
+
# @param org_code [String] The identifier for the organization.
|
867
|
+
# @param [Hash] opts the optional parameters
|
868
|
+
# @option opts [UpdateOrganizationRequest] :update_organization_request Organization details.
|
869
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
870
|
+
def update_organization_with_http_info(org_code, opts = {})
|
871
|
+
if @api_client.config.debugging
|
872
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization ...'
|
873
|
+
end
|
874
|
+
# verify the required parameter 'org_code' is set
|
875
|
+
if @api_client.config.client_side_validation && org_code.nil?
|
876
|
+
fail ArgumentError, "Missing the required parameter 'org_code' when calling OrganizationsApi.update_organization"
|
877
|
+
end
|
878
|
+
# resource path
|
879
|
+
local_var_path = '/api/v1/organization/{org_code}'.sub('{' + 'org_code' + '}', CGI.escape(org_code.to_s))
|
880
|
+
|
881
|
+
# query parameters
|
882
|
+
query_params = opts[:query_params] || {}
|
883
|
+
|
884
|
+
# header parameters
|
885
|
+
header_params = opts[:header_params] || {}
|
886
|
+
# HTTP header 'Accept' (if needed)
|
887
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
523
888
|
# HTTP header 'Content-Type'
|
524
889
|
content_type = @api_client.select_header_content_type(['application/json'])
|
525
890
|
if !content_type.nil?
|
@@ -530,16 +895,16 @@ module KindeApi
|
|
530
895
|
form_params = opts[:form_params] || {}
|
531
896
|
|
532
897
|
# http body (model)
|
533
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'
|
898
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_organization_request'])
|
534
899
|
|
535
900
|
# return_type
|
536
|
-
return_type = opts[:debug_return_type]
|
901
|
+
return_type = opts[:debug_return_type]
|
537
902
|
|
538
903
|
# auth_names
|
539
904
|
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
540
905
|
|
541
906
|
new_options = opts.merge(
|
542
|
-
:operation => :"OrganizationsApi.
|
907
|
+
:operation => :"OrganizationsApi.update_organization",
|
543
908
|
:header_params => header_params,
|
544
909
|
:query_params => query_params,
|
545
910
|
:form_params => form_params,
|
@@ -550,7 +915,7 @@ module KindeApi
|
|
550
915
|
|
551
916
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
552
917
|
if @api_client.config.debugging
|
553
|
-
@api_client.config.logger.debug "API called: OrganizationsApi#
|
918
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#update_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
554
919
|
end
|
555
920
|
return data, status_code, headers
|
556
921
|
end
|
@@ -600,7 +965,7 @@ module KindeApi
|
|
600
965
|
# header parameters
|
601
966
|
header_params = opts[:header_params] || {}
|
602
967
|
# HTTP header 'Accept' (if needed)
|
603
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
968
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
604
969
|
|
605
970
|
# form parameters
|
606
971
|
form_params = opts[:form_params] || {}
|
@@ -630,5 +995,75 @@ module KindeApi
|
|
630
995
|
end
|
631
996
|
return data, status_code, headers
|
632
997
|
end
|
998
|
+
|
999
|
+
# Update organization users
|
1000
|
+
# Update users that belong to an organization.
|
1001
|
+
# @param org_code [String] The organization's code.
|
1002
|
+
# @param [Hash] opts the optional parameters
|
1003
|
+
# @option opts [UpdateOrganizationUsersRequest] :update_organization_users_request
|
1004
|
+
# @return [UpdateOrganizationUsersResponse]
|
1005
|
+
def update_organization_users(org_code, opts = {})
|
1006
|
+
data, _status_code, _headers = update_organization_users_with_http_info(org_code, opts)
|
1007
|
+
data
|
1008
|
+
end
|
1009
|
+
|
1010
|
+
# Update organization users
|
1011
|
+
# Update users that belong to an organization.
|
1012
|
+
# @param org_code [String] The organization's code.
|
1013
|
+
# @param [Hash] opts the optional parameters
|
1014
|
+
# @option opts [UpdateOrganizationUsersRequest] :update_organization_users_request
|
1015
|
+
# @return [Array<(UpdateOrganizationUsersResponse, Integer, Hash)>] UpdateOrganizationUsersResponse data, response status code and response headers
|
1016
|
+
def update_organization_users_with_http_info(org_code, opts = {})
|
1017
|
+
if @api_client.config.debugging
|
1018
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization_users ...'
|
1019
|
+
end
|
1020
|
+
# verify the required parameter 'org_code' is set
|
1021
|
+
if @api_client.config.client_side_validation && org_code.nil?
|
1022
|
+
fail ArgumentError, "Missing the required parameter 'org_code' when calling OrganizationsApi.update_organization_users"
|
1023
|
+
end
|
1024
|
+
# resource path
|
1025
|
+
local_var_path = '/api/v1/organizations/{org_code}/users'.sub('{' + 'org_code' + '}', CGI.escape(org_code.to_s))
|
1026
|
+
|
1027
|
+
# query parameters
|
1028
|
+
query_params = opts[:query_params] || {}
|
1029
|
+
|
1030
|
+
# header parameters
|
1031
|
+
header_params = opts[:header_params] || {}
|
1032
|
+
# HTTP header 'Accept' (if needed)
|
1033
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
1034
|
+
# HTTP header 'Content-Type'
|
1035
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1036
|
+
if !content_type.nil?
|
1037
|
+
header_params['Content-Type'] = content_type
|
1038
|
+
end
|
1039
|
+
|
1040
|
+
# form parameters
|
1041
|
+
form_params = opts[:form_params] || {}
|
1042
|
+
|
1043
|
+
# http body (model)
|
1044
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_organization_users_request'])
|
1045
|
+
|
1046
|
+
# return_type
|
1047
|
+
return_type = opts[:debug_return_type] || 'UpdateOrganizationUsersResponse'
|
1048
|
+
|
1049
|
+
# auth_names
|
1050
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
1051
|
+
|
1052
|
+
new_options = opts.merge(
|
1053
|
+
:operation => :"OrganizationsApi.update_organization_users",
|
1054
|
+
:header_params => header_params,
|
1055
|
+
:query_params => query_params,
|
1056
|
+
:form_params => form_params,
|
1057
|
+
:body => post_body,
|
1058
|
+
:auth_names => auth_names,
|
1059
|
+
:return_type => return_type
|
1060
|
+
)
|
1061
|
+
|
1062
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
1063
|
+
if @api_client.config.debugging
|
1064
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#update_organization_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1065
|
+
end
|
1066
|
+
return data, status_code, headers
|
1067
|
+
end
|
633
1068
|
end
|
634
1069
|
end
|