kinde_sdk 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +119 -0
- data/LICENSE +21 -0
- data/README.md +342 -0
- data/Rakefile +10 -0
- data/kinde_api/.gitignore +39 -0
- data/kinde_api/.rspec +2 -0
- data/kinde_api/README.md +103 -0
- data/kinde_api/docs/AddOrganizationUsers200Response.md +22 -0
- data/kinde_api/docs/AddOrganizationUsersRequest.md +18 -0
- data/kinde_api/docs/ApiResult.md +18 -0
- data/kinde_api/docs/ConnectedAppsAccessToken.md +20 -0
- data/kinde_api/docs/ConnectedAppsApi.md +219 -0
- data/kinde_api/docs/ConnectedAppsAuthUrl.md +20 -0
- data/kinde_api/docs/CreateOrganization201Response.md +20 -0
- data/kinde_api/docs/CreateOrganizationRequest.md +20 -0
- data/kinde_api/docs/CreateUser200Response.md +22 -0
- data/kinde_api/docs/CreateUserRequest.md +20 -0
- data/kinde_api/docs/CreateUserRequestIdentitiesInner.md +20 -0
- data/kinde_api/docs/CreateUserRequestIdentitiesInnerDetails.md +18 -0
- data/kinde_api/docs/CreateUserRequestProfile.md +20 -0
- data/kinde_api/docs/EnvironmentsApi.md +216 -0
- data/kinde_api/docs/Error.md +20 -0
- data/kinde_api/docs/ErrorResponse.md +18 -0
- data/kinde_api/docs/FeatureFlagsApi.md +239 -0
- data/kinde_api/docs/GetOrganizationUsers200Response.md +24 -0
- data/kinde_api/docs/GetOrganizations200Response.md +24 -0
- data/kinde_api/docs/GetUsers200Response.md +24 -0
- data/kinde_api/docs/OAuthApi.md +141 -0
- data/kinde_api/docs/Organization.md +22 -0
- data/kinde_api/docs/OrganizationUser.md +26 -0
- data/kinde_api/docs/OrganizationsApi.md +671 -0
- data/kinde_api/docs/RemoveOrganizationUsers200Response.md +20 -0
- data/kinde_api/docs/RemoveOrganizationUsersRequest.md +18 -0
- data/kinde_api/docs/SuccessResponse.md +20 -0
- data/kinde_api/docs/UpdateUserRequest.md +22 -0
- data/kinde_api/docs/User.md +28 -0
- data/kinde_api/docs/UserIdentity.md +20 -0
- data/kinde_api/docs/UserIdentityResult.md +20 -0
- data/kinde_api/docs/UserProfile.md +26 -0
- data/kinde_api/docs/UserProfileV2.md +30 -0
- data/kinde_api/docs/UsersApi.md +603 -0
- data/kinde_api/lib/kinde_api/api/connected_apps_api.rb +221 -0
- data/kinde_api/lib/kinde_api/api/environments_api.rb +212 -0
- data/kinde_api/lib/kinde_api/api/feature_flags_api.rb +309 -0
- data/kinde_api/lib/kinde_api/api/o_auth_api.rb +136 -0
- data/kinde_api/lib/kinde_api/api/organizations_api.rb +634 -0
- data/kinde_api/lib/kinde_api/api/users_api.rb +560 -0
- data/kinde_api/lib/kinde_api/api_client.rb +397 -0
- data/kinde_api/lib/kinde_api/api_error.rb +58 -0
- data/kinde_api/lib/kinde_api/configuration.rb +295 -0
- data/kinde_api/lib/kinde_api/models/add_organization_users200_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/add_organization_users_request.rb +220 -0
- data/kinde_api/lib/kinde_api/models/api_result.rb +218 -0
- data/kinde_api/lib/kinde_api/models/connected_apps_access_token.rb +228 -0
- data/kinde_api/lib/kinde_api/models/connected_apps_auth_url.rb +228 -0
- data/kinde_api/lib/kinde_api/models/create_organization201_response.rb +228 -0
- data/kinde_api/lib/kinde_api/models/create_organization_request.rb +252 -0
- data/kinde_api/lib/kinde_api/models/create_user200_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/create_user_request.rb +229 -0
- data/kinde_api/lib/kinde_api/models/create_user_request_identities_inner.rb +228 -0
- data/kinde_api/lib/kinde_api/models/create_user_request_identities_inner_details.rb +219 -0
- data/kinde_api/lib/kinde_api/models/create_user_request_profile.rb +229 -0
- data/kinde_api/lib/kinde_api/models/error.rb +228 -0
- data/kinde_api/lib/kinde_api/models/error_response.rb +219 -0
- data/kinde_api/lib/kinde_api/models/get_organization_users200_response.rb +249 -0
- data/kinde_api/lib/kinde_api/models/get_organizations200_response.rb +249 -0
- data/kinde_api/lib/kinde_api/models/get_users200_response.rb +249 -0
- data/kinde_api/lib/kinde_api/models/organization.rb +235 -0
- data/kinde_api/lib/kinde_api/models/organization_user.rb +253 -0
- data/kinde_api/lib/kinde_api/models/remove_organization_users200_response.rb +228 -0
- data/kinde_api/lib/kinde_api/models/remove_organization_users_request.rb +220 -0
- data/kinde_api/lib/kinde_api/models/success_response.rb +226 -0
- data/kinde_api/lib/kinde_api/models/update_user_request.rb +238 -0
- data/kinde_api/lib/kinde_api/models/user.rb +269 -0
- data/kinde_api/lib/kinde_api/models/user_identity.rb +227 -0
- data/kinde_api/lib/kinde_api/models/user_identity_result.rb +229 -0
- data/kinde_api/lib/kinde_api/models/user_profile.rb +259 -0
- data/kinde_api/lib/kinde_api/models/user_profile_v2.rb +279 -0
- data/kinde_api/lib/kinde_api/version.rb +15 -0
- data/kinde_api/lib/kinde_api.rb +73 -0
- data/kinde_api/spec/api/connected_apps_api_spec.rb +72 -0
- data/kinde_api/spec/api/environments_api_spec.rb +71 -0
- data/kinde_api/spec/api/feature_flags_api_spec.rb +82 -0
- data/kinde_api/spec/api/o_auth_api_spec.rb +57 -0
- data/kinde_api/spec/api/organizations_api_spec.rb +154 -0
- data/kinde_api/spec/api/users_api_spec.rb +141 -0
- data/kinde_api/spec/api_client_spec.rb +229 -0
- data/kinde_api/spec/configuration_spec.rb +42 -0
- data/kinde_api/spec/models/add_organization_users200_response_spec.rb +46 -0
- data/kinde_api/spec/models/add_organization_users_request_spec.rb +34 -0
- data/kinde_api/spec/models/api_result_spec.rb +34 -0
- data/kinde_api/spec/models/connected_apps_access_token_spec.rb +40 -0
- data/kinde_api/spec/models/connected_apps_auth_url_spec.rb +40 -0
- data/kinde_api/spec/models/create_organization201_response_spec.rb +40 -0
- data/kinde_api/spec/models/create_organization_request_spec.rb +44 -0
- data/kinde_api/spec/models/create_user200_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_user_request_identities_inner_details_spec.rb +34 -0
- data/kinde_api/spec/models/create_user_request_identities_inner_spec.rb +40 -0
- data/kinde_api/spec/models/create_user_request_profile_spec.rb +40 -0
- data/kinde_api/spec/models/create_user_request_spec.rb +40 -0
- data/kinde_api/spec/models/error_response_spec.rb +34 -0
- data/kinde_api/spec/models/error_spec.rb +40 -0
- data/kinde_api/spec/models/get_organization_users200_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_organizations200_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_users200_response_spec.rb +52 -0
- data/kinde_api/spec/models/organization_spec.rb +46 -0
- data/kinde_api/spec/models/organization_user_spec.rb +58 -0
- data/kinde_api/spec/models/remove_organization_users200_response_spec.rb +40 -0
- data/kinde_api/spec/models/remove_organization_users_request_spec.rb +34 -0
- data/kinde_api/spec/models/success_response_spec.rb +40 -0
- data/kinde_api/spec/models/update_user_request_spec.rb +46 -0
- data/kinde_api/spec/models/user_identity_result_spec.rb +40 -0
- data/kinde_api/spec/models/user_identity_spec.rb +40 -0
- data/kinde_api/spec/models/user_profile_spec.rb +58 -0
- data/kinde_api/spec/models/user_profile_v2_spec.rb +70 -0
- data/kinde_api/spec/models/user_spec.rb +64 -0
- data/kinde_api/spec/spec_helper.rb +111 -0
- data/kinde_sdk.gemspec +33 -0
- data/lib/kinde_sdk/client.rb +49 -0
- data/lib/kinde_sdk/configuration.rb +50 -0
- data/lib/kinde_sdk/version.rb +3 -0
- data/lib/kinde_sdk.rb +109 -0
- data/openapitools.json +7 -0
- data/spec/kinde_sdk_spec.rb +105 -0
- data/spec/spec_helper.rb +82 -0
- metadata +291 -0
@@ -0,0 +1,634 @@
|
|
1
|
+
=begin
|
2
|
+
#Kinde Management API
|
3
|
+
|
4
|
+
#Provides endpoints to manage your Kinde Businesses
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1
|
7
|
+
Contact: support@kinde.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module KindeApi
|
16
|
+
class OrganizationsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Assign Users to an Organization
|
23
|
+
# Add existing users to an organization.
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [String] :code The organization's code.
|
26
|
+
# @option opts [AddOrganizationUsersRequest] :add_organization_users_request
|
27
|
+
# @return [AddOrganizationUsers200Response]
|
28
|
+
def add_organization_users(opts = {})
|
29
|
+
data, _status_code, _headers = add_organization_users_with_http_info(opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Assign Users to an Organization
|
34
|
+
# Add existing users to an organization.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @option opts [String] :code The organization's code.
|
37
|
+
# @option opts [AddOrganizationUsersRequest] :add_organization_users_request
|
38
|
+
# @return [Array<(AddOrganizationUsers200Response, Integer, Hash)>] AddOrganizationUsers200Response data, response status code and response headers
|
39
|
+
def add_organization_users_with_http_info(opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.add_organization_users ...'
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/api/v1/organization/users'
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = opts[:query_params] || {}
|
48
|
+
query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
|
49
|
+
|
50
|
+
# header parameters
|
51
|
+
header_params = opts[:header_params] || {}
|
52
|
+
# HTTP header 'Accept' (if needed)
|
53
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
54
|
+
# HTTP header 'Content-Type'
|
55
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
56
|
+
if !content_type.nil?
|
57
|
+
header_params['Content-Type'] = content_type
|
58
|
+
end
|
59
|
+
|
60
|
+
# form parameters
|
61
|
+
form_params = opts[:form_params] || {}
|
62
|
+
|
63
|
+
# http body (model)
|
64
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'add_organization_users_request'])
|
65
|
+
|
66
|
+
# return_type
|
67
|
+
return_type = opts[:debug_return_type] || 'AddOrganizationUsers200Response'
|
68
|
+
|
69
|
+
# auth_names
|
70
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
71
|
+
|
72
|
+
new_options = opts.merge(
|
73
|
+
:operation => :"OrganizationsApi.add_organization_users",
|
74
|
+
:header_params => header_params,
|
75
|
+
:query_params => query_params,
|
76
|
+
:form_params => form_params,
|
77
|
+
:body => post_body,
|
78
|
+
:auth_names => auth_names,
|
79
|
+
:return_type => return_type
|
80
|
+
)
|
81
|
+
|
82
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
83
|
+
if @api_client.config.debugging
|
84
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#add_organization_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
85
|
+
end
|
86
|
+
return data, status_code, headers
|
87
|
+
end
|
88
|
+
|
89
|
+
# Create Organization
|
90
|
+
# Create an organization.
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @option opts [CreateOrganizationRequest] :create_organization_request Organization details.
|
93
|
+
# @return [CreateOrganization201Response]
|
94
|
+
def create_organization(opts = {})
|
95
|
+
data, _status_code, _headers = create_organization_with_http_info(opts)
|
96
|
+
data
|
97
|
+
end
|
98
|
+
|
99
|
+
# Create Organization
|
100
|
+
# Create an organization.
|
101
|
+
# @param [Hash] opts the optional parameters
|
102
|
+
# @option opts [CreateOrganizationRequest] :create_organization_request Organization details.
|
103
|
+
# @return [Array<(CreateOrganization201Response, Integer, Hash)>] CreateOrganization201Response data, response status code and response headers
|
104
|
+
def create_organization_with_http_info(opts = {})
|
105
|
+
if @api_client.config.debugging
|
106
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.create_organization ...'
|
107
|
+
end
|
108
|
+
# resource path
|
109
|
+
local_var_path = '/api/v1/organization'
|
110
|
+
|
111
|
+
# query parameters
|
112
|
+
query_params = opts[:query_params] || {}
|
113
|
+
|
114
|
+
# header parameters
|
115
|
+
header_params = opts[:header_params] || {}
|
116
|
+
# HTTP header 'Accept' (if needed)
|
117
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
118
|
+
# HTTP header 'Content-Type'
|
119
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
120
|
+
if !content_type.nil?
|
121
|
+
header_params['Content-Type'] = content_type
|
122
|
+
end
|
123
|
+
|
124
|
+
# form parameters
|
125
|
+
form_params = opts[:form_params] || {}
|
126
|
+
|
127
|
+
# http body (model)
|
128
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_organization_request'])
|
129
|
+
|
130
|
+
# return_type
|
131
|
+
return_type = opts[:debug_return_type] || 'CreateOrganization201Response'
|
132
|
+
|
133
|
+
# auth_names
|
134
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
135
|
+
|
136
|
+
new_options = opts.merge(
|
137
|
+
:operation => :"OrganizationsApi.create_organization",
|
138
|
+
:header_params => header_params,
|
139
|
+
:query_params => query_params,
|
140
|
+
:form_params => form_params,
|
141
|
+
:body => post_body,
|
142
|
+
:auth_names => auth_names,
|
143
|
+
:return_type => return_type
|
144
|
+
)
|
145
|
+
|
146
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
147
|
+
if @api_client.config.debugging
|
148
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#create_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
149
|
+
end
|
150
|
+
return data, status_code, headers
|
151
|
+
end
|
152
|
+
|
153
|
+
# Delete organization feature flag override
|
154
|
+
# Delete organization feature flag override.
|
155
|
+
# @param org_code [String] The identifier for the organization.
|
156
|
+
# @param feature_flag_key [String] The identifier for the feature flag.
|
157
|
+
# @param [Hash] opts the optional parameters
|
158
|
+
# @return [SuccessResponse]
|
159
|
+
def delete_organization_feature_flag_override(org_code, feature_flag_key, opts = {})
|
160
|
+
data, _status_code, _headers = delete_organization_feature_flag_override_with_http_info(org_code, feature_flag_key, opts)
|
161
|
+
data
|
162
|
+
end
|
163
|
+
|
164
|
+
# Delete organization feature flag override
|
165
|
+
# Delete organization feature flag override.
|
166
|
+
# @param org_code [String] The identifier for the organization.
|
167
|
+
# @param feature_flag_key [String] The identifier for the feature flag.
|
168
|
+
# @param [Hash] opts the optional parameters
|
169
|
+
# @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
|
170
|
+
def delete_organization_feature_flag_override_with_http_info(org_code, feature_flag_key, opts = {})
|
171
|
+
if @api_client.config.debugging
|
172
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_organization_feature_flag_override ...'
|
173
|
+
end
|
174
|
+
# verify the required parameter 'org_code' is set
|
175
|
+
if @api_client.config.client_side_validation && org_code.nil?
|
176
|
+
fail ArgumentError, "Missing the required parameter 'org_code' when calling OrganizationsApi.delete_organization_feature_flag_override"
|
177
|
+
end
|
178
|
+
# verify the required parameter 'feature_flag_key' is set
|
179
|
+
if @api_client.config.client_side_validation && feature_flag_key.nil?
|
180
|
+
fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling OrganizationsApi.delete_organization_feature_flag_override"
|
181
|
+
end
|
182
|
+
# resource path
|
183
|
+
local_var_path = '/api/v1/organizations/{org_code}/feature_flags/{feature_flag_key}'.sub('{' + 'org_code' + '}', CGI.escape(org_code.to_s)).sub('{' + 'feature_flag_key' + '}', CGI.escape(feature_flag_key.to_s))
|
184
|
+
|
185
|
+
# query parameters
|
186
|
+
query_params = opts[:query_params] || {}
|
187
|
+
|
188
|
+
# header parameters
|
189
|
+
header_params = opts[:header_params] || {}
|
190
|
+
# HTTP header 'Accept' (if needed)
|
191
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
192
|
+
|
193
|
+
# form parameters
|
194
|
+
form_params = opts[:form_params] || {}
|
195
|
+
|
196
|
+
# http body (model)
|
197
|
+
post_body = opts[:debug_body]
|
198
|
+
|
199
|
+
# return_type
|
200
|
+
return_type = opts[:debug_return_type] || 'SuccessResponse'
|
201
|
+
|
202
|
+
# auth_names
|
203
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
204
|
+
|
205
|
+
new_options = opts.merge(
|
206
|
+
:operation => :"OrganizationsApi.delete_organization_feature_flag_override",
|
207
|
+
:header_params => header_params,
|
208
|
+
:query_params => query_params,
|
209
|
+
:form_params => form_params,
|
210
|
+
:body => post_body,
|
211
|
+
:auth_names => auth_names,
|
212
|
+
:return_type => return_type
|
213
|
+
)
|
214
|
+
|
215
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
216
|
+
if @api_client.config.debugging
|
217
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#delete_organization_feature_flag_override\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
218
|
+
end
|
219
|
+
return data, status_code, headers
|
220
|
+
end
|
221
|
+
|
222
|
+
# Delete all organization feature flag overrides
|
223
|
+
# Delete all organization feature flag overrides.
|
224
|
+
# @param org_code [String] The identifier for the organization.
|
225
|
+
# @param [Hash] opts the optional parameters
|
226
|
+
# @return [SuccessResponse]
|
227
|
+
def delete_organization_feature_flag_overrides(org_code, opts = {})
|
228
|
+
data, _status_code, _headers = delete_organization_feature_flag_overrides_with_http_info(org_code, opts)
|
229
|
+
data
|
230
|
+
end
|
231
|
+
|
232
|
+
# Delete all organization feature flag overrides
|
233
|
+
# Delete all organization feature flag overrides.
|
234
|
+
# @param org_code [String] The identifier for the organization.
|
235
|
+
# @param [Hash] opts the optional parameters
|
236
|
+
# @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
|
237
|
+
def delete_organization_feature_flag_overrides_with_http_info(org_code, opts = {})
|
238
|
+
if @api_client.config.debugging
|
239
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_organization_feature_flag_overrides ...'
|
240
|
+
end
|
241
|
+
# verify the required parameter 'org_code' is set
|
242
|
+
if @api_client.config.client_side_validation && org_code.nil?
|
243
|
+
fail ArgumentError, "Missing the required parameter 'org_code' when calling OrganizationsApi.delete_organization_feature_flag_overrides"
|
244
|
+
end
|
245
|
+
# resource path
|
246
|
+
local_var_path = '/api/v1/organizations/{org_code}/feature_flags'.sub('{' + 'org_code' + '}', CGI.escape(org_code.to_s))
|
247
|
+
|
248
|
+
# query parameters
|
249
|
+
query_params = opts[:query_params] || {}
|
250
|
+
|
251
|
+
# header parameters
|
252
|
+
header_params = opts[:header_params] || {}
|
253
|
+
# HTTP header 'Accept' (if needed)
|
254
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
255
|
+
|
256
|
+
# form parameters
|
257
|
+
form_params = opts[:form_params] || {}
|
258
|
+
|
259
|
+
# http body (model)
|
260
|
+
post_body = opts[:debug_body]
|
261
|
+
|
262
|
+
# return_type
|
263
|
+
return_type = opts[:debug_return_type] || 'SuccessResponse'
|
264
|
+
|
265
|
+
# auth_names
|
266
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
267
|
+
|
268
|
+
new_options = opts.merge(
|
269
|
+
:operation => :"OrganizationsApi.delete_organization_feature_flag_overrides",
|
270
|
+
:header_params => header_params,
|
271
|
+
:query_params => query_params,
|
272
|
+
:form_params => form_params,
|
273
|
+
:body => post_body,
|
274
|
+
:auth_names => auth_names,
|
275
|
+
:return_type => return_type
|
276
|
+
)
|
277
|
+
|
278
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
279
|
+
if @api_client.config.debugging
|
280
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#delete_organization_feature_flag_overrides\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
281
|
+
end
|
282
|
+
return data, status_code, headers
|
283
|
+
end
|
284
|
+
|
285
|
+
# Get Organization
|
286
|
+
# Gets an organization given the organization's code.
|
287
|
+
# @param [Hash] opts the optional parameters
|
288
|
+
# @option opts [String] :code The organization's code.
|
289
|
+
# @return [Organization]
|
290
|
+
def get_organization(opts = {})
|
291
|
+
data, _status_code, _headers = get_organization_with_http_info(opts)
|
292
|
+
data
|
293
|
+
end
|
294
|
+
|
295
|
+
# Get Organization
|
296
|
+
# Gets an organization given the organization's code.
|
297
|
+
# @param [Hash] opts the optional parameters
|
298
|
+
# @option opts [String] :code The organization's code.
|
299
|
+
# @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
|
300
|
+
def get_organization_with_http_info(opts = {})
|
301
|
+
if @api_client.config.debugging
|
302
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization ...'
|
303
|
+
end
|
304
|
+
# resource path
|
305
|
+
local_var_path = '/api/v1/organization'
|
306
|
+
|
307
|
+
# query parameters
|
308
|
+
query_params = opts[:query_params] || {}
|
309
|
+
query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
|
310
|
+
|
311
|
+
# header parameters
|
312
|
+
header_params = opts[:header_params] || {}
|
313
|
+
# HTTP header 'Accept' (if needed)
|
314
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
315
|
+
|
316
|
+
# form parameters
|
317
|
+
form_params = opts[:form_params] || {}
|
318
|
+
|
319
|
+
# http body (model)
|
320
|
+
post_body = opts[:debug_body]
|
321
|
+
|
322
|
+
# return_type
|
323
|
+
return_type = opts[:debug_return_type] || 'Organization'
|
324
|
+
|
325
|
+
# auth_names
|
326
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
327
|
+
|
328
|
+
new_options = opts.merge(
|
329
|
+
:operation => :"OrganizationsApi.get_organization",
|
330
|
+
:header_params => header_params,
|
331
|
+
:query_params => query_params,
|
332
|
+
:form_params => form_params,
|
333
|
+
:body => post_body,
|
334
|
+
:auth_names => auth_names,
|
335
|
+
:return_type => return_type
|
336
|
+
)
|
337
|
+
|
338
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
339
|
+
if @api_client.config.debugging
|
340
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#get_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
341
|
+
end
|
342
|
+
return data, status_code, headers
|
343
|
+
end
|
344
|
+
|
345
|
+
# List Organization Users
|
346
|
+
# Get users in an organization.
|
347
|
+
# @param [Hash] opts the optional parameters
|
348
|
+
# @option opts [String] :sort Field and order to sort the result by.
|
349
|
+
# @option opts [Integer] :page_size Number of results per page. Defaults to 10 if parameter not sent.
|
350
|
+
# @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
|
+
# @option opts [String] :permissions Filter by user permissions
|
353
|
+
# @return [GetOrganizationUsers200Response]
|
354
|
+
def get_organization_users(opts = {})
|
355
|
+
data, _status_code, _headers = get_organization_users_with_http_info(opts)
|
356
|
+
data
|
357
|
+
end
|
358
|
+
|
359
|
+
# List Organization Users
|
360
|
+
# Get users in an organization.
|
361
|
+
# @param [Hash] opts the optional parameters
|
362
|
+
# @option opts [String] :sort Field and order to sort the result by.
|
363
|
+
# @option opts [Integer] :page_size Number of results per page. Defaults to 10 if parameter not sent.
|
364
|
+
# @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
|
+
# @option opts [String] :permissions Filter by user permissions
|
367
|
+
# @return [Array<(GetOrganizationUsers200Response, Integer, Hash)>] GetOrganizationUsers200Response data, response status code and response headers
|
368
|
+
def get_organization_users_with_http_info(opts = {})
|
369
|
+
if @api_client.config.debugging
|
370
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization_users ...'
|
371
|
+
end
|
372
|
+
allowable_values = ["name_asc", "name_desc", "email_asc", "email_desc"]
|
373
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
374
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
375
|
+
end
|
376
|
+
# resource path
|
377
|
+
local_var_path = '/api/v1/organization/users'
|
378
|
+
|
379
|
+
# query parameters
|
380
|
+
query_params = opts[:query_params] || {}
|
381
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
382
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
383
|
+
query_params[:'next_token'] = opts[:'next_token'] if !opts[:'next_token'].nil?
|
384
|
+
query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
|
385
|
+
query_params[:'permissions'] = opts[:'permissions'] if !opts[:'permissions'].nil?
|
386
|
+
|
387
|
+
# header parameters
|
388
|
+
header_params = opts[:header_params] || {}
|
389
|
+
# HTTP header 'Accept' (if needed)
|
390
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
391
|
+
|
392
|
+
# form parameters
|
393
|
+
form_params = opts[:form_params] || {}
|
394
|
+
|
395
|
+
# http body (model)
|
396
|
+
post_body = opts[:debug_body]
|
397
|
+
|
398
|
+
# return_type
|
399
|
+
return_type = opts[:debug_return_type] || 'GetOrganizationUsers200Response'
|
400
|
+
|
401
|
+
# auth_names
|
402
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
403
|
+
|
404
|
+
new_options = opts.merge(
|
405
|
+
:operation => :"OrganizationsApi.get_organization_users",
|
406
|
+
:header_params => header_params,
|
407
|
+
:query_params => query_params,
|
408
|
+
:form_params => form_params,
|
409
|
+
:body => post_body,
|
410
|
+
:auth_names => auth_names,
|
411
|
+
:return_type => return_type
|
412
|
+
)
|
413
|
+
|
414
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
415
|
+
if @api_client.config.debugging
|
416
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#get_organization_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
417
|
+
end
|
418
|
+
return data, status_code, headers
|
419
|
+
end
|
420
|
+
|
421
|
+
# List Organizations
|
422
|
+
# Get a list of organizations.
|
423
|
+
# @param [Hash] opts the optional parameters
|
424
|
+
# @option opts [String] :sort Field and order to sort the result by.
|
425
|
+
# @option opts [Integer] :page_size Number of results per page. Defaults to 10 if parameter not sent.
|
426
|
+
# @option opts [String] :next_token A string to get the next page of results if there are more results.
|
427
|
+
# @return [GetOrganizations200Response]
|
428
|
+
def get_organizations(opts = {})
|
429
|
+
data, _status_code, _headers = get_organizations_with_http_info(opts)
|
430
|
+
data
|
431
|
+
end
|
432
|
+
|
433
|
+
# List Organizations
|
434
|
+
# Get a list of organizations.
|
435
|
+
# @param [Hash] opts the optional parameters
|
436
|
+
# @option opts [String] :sort Field and order to sort the result by.
|
437
|
+
# @option opts [Integer] :page_size Number of results per page. Defaults to 10 if parameter not sent.
|
438
|
+
# @option opts [String] :next_token A string to get the next page of results if there are more results.
|
439
|
+
# @return [Array<(GetOrganizations200Response, Integer, Hash)>] GetOrganizations200Response data, response status code and response headers
|
440
|
+
def get_organizations_with_http_info(opts = {})
|
441
|
+
if @api_client.config.debugging
|
442
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organizations ...'
|
443
|
+
end
|
444
|
+
allowable_values = ["name_asc", "name_desc", "email_asc", "email_desc"]
|
445
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
446
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
447
|
+
end
|
448
|
+
# resource path
|
449
|
+
local_var_path = '/api/v1/organizations'
|
450
|
+
|
451
|
+
# query parameters
|
452
|
+
query_params = opts[:query_params] || {}
|
453
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
454
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
455
|
+
query_params[:'next_token'] = opts[:'next_token'] if !opts[:'next_token'].nil?
|
456
|
+
|
457
|
+
# header parameters
|
458
|
+
header_params = opts[:header_params] || {}
|
459
|
+
# HTTP header 'Accept' (if needed)
|
460
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
461
|
+
|
462
|
+
# form parameters
|
463
|
+
form_params = opts[:form_params] || {}
|
464
|
+
|
465
|
+
# http body (model)
|
466
|
+
post_body = opts[:debug_body]
|
467
|
+
|
468
|
+
# return_type
|
469
|
+
return_type = opts[:debug_return_type] || 'GetOrganizations200Response'
|
470
|
+
|
471
|
+
# auth_names
|
472
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
473
|
+
|
474
|
+
new_options = opts.merge(
|
475
|
+
:operation => :"OrganizationsApi.get_organizations",
|
476
|
+
:header_params => header_params,
|
477
|
+
:query_params => query_params,
|
478
|
+
:form_params => form_params,
|
479
|
+
:body => post_body,
|
480
|
+
:auth_names => auth_names,
|
481
|
+
:return_type => return_type
|
482
|
+
)
|
483
|
+
|
484
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
485
|
+
if @api_client.config.debugging
|
486
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#get_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
487
|
+
end
|
488
|
+
return data, status_code, headers
|
489
|
+
end
|
490
|
+
|
491
|
+
# Remove Users from an Organization
|
492
|
+
# Remove existing users from an organization.
|
493
|
+
# @param [Hash] opts the optional parameters
|
494
|
+
# @option opts [String] :code The organization's code.
|
495
|
+
# @option opts [RemoveOrganizationUsersRequest] :remove_organization_users_request
|
496
|
+
# @return [RemoveOrganizationUsers200Response]
|
497
|
+
def remove_organization_users(opts = {})
|
498
|
+
data, _status_code, _headers = remove_organization_users_with_http_info(opts)
|
499
|
+
data
|
500
|
+
end
|
501
|
+
|
502
|
+
# Remove Users from an Organization
|
503
|
+
# Remove existing users from an organization.
|
504
|
+
# @param [Hash] opts the optional parameters
|
505
|
+
# @option opts [String] :code The organization's code.
|
506
|
+
# @option opts [RemoveOrganizationUsersRequest] :remove_organization_users_request
|
507
|
+
# @return [Array<(RemoveOrganizationUsers200Response, Integer, Hash)>] RemoveOrganizationUsers200Response data, response status code and response headers
|
508
|
+
def remove_organization_users_with_http_info(opts = {})
|
509
|
+
if @api_client.config.debugging
|
510
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.remove_organization_users ...'
|
511
|
+
end
|
512
|
+
# resource path
|
513
|
+
local_var_path = '/api/v1/organization/users'
|
514
|
+
|
515
|
+
# query parameters
|
516
|
+
query_params = opts[:query_params] || {}
|
517
|
+
query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
|
518
|
+
|
519
|
+
# header parameters
|
520
|
+
header_params = opts[:header_params] || {}
|
521
|
+
# HTTP header 'Accept' (if needed)
|
522
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
523
|
+
# HTTP header 'Content-Type'
|
524
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
525
|
+
if !content_type.nil?
|
526
|
+
header_params['Content-Type'] = content_type
|
527
|
+
end
|
528
|
+
|
529
|
+
# form parameters
|
530
|
+
form_params = opts[:form_params] || {}
|
531
|
+
|
532
|
+
# http body (model)
|
533
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'remove_organization_users_request'])
|
534
|
+
|
535
|
+
# return_type
|
536
|
+
return_type = opts[:debug_return_type] || 'RemoveOrganizationUsers200Response'
|
537
|
+
|
538
|
+
# auth_names
|
539
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
540
|
+
|
541
|
+
new_options = opts.merge(
|
542
|
+
:operation => :"OrganizationsApi.remove_organization_users",
|
543
|
+
:header_params => header_params,
|
544
|
+
:query_params => query_params,
|
545
|
+
:form_params => form_params,
|
546
|
+
:body => post_body,
|
547
|
+
:auth_names => auth_names,
|
548
|
+
:return_type => return_type
|
549
|
+
)
|
550
|
+
|
551
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
552
|
+
if @api_client.config.debugging
|
553
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#remove_organization_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
554
|
+
end
|
555
|
+
return data, status_code, headers
|
556
|
+
end
|
557
|
+
|
558
|
+
# Update organization feature flag override
|
559
|
+
# Update organization feature flag override.
|
560
|
+
# @param org_code [String] The identifier for the organization
|
561
|
+
# @param feature_flag_key [String] The identifier for the feature flag
|
562
|
+
# @param value [String] Override value
|
563
|
+
# @param [Hash] opts the optional parameters
|
564
|
+
# @return [SuccessResponse]
|
565
|
+
def update_organization_feature_flag_override(org_code, feature_flag_key, value, opts = {})
|
566
|
+
data, _status_code, _headers = update_organization_feature_flag_override_with_http_info(org_code, feature_flag_key, value, opts)
|
567
|
+
data
|
568
|
+
end
|
569
|
+
|
570
|
+
# Update organization feature flag override
|
571
|
+
# Update organization feature flag override.
|
572
|
+
# @param org_code [String] The identifier for the organization
|
573
|
+
# @param feature_flag_key [String] The identifier for the feature flag
|
574
|
+
# @param value [String] Override value
|
575
|
+
# @param [Hash] opts the optional parameters
|
576
|
+
# @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
|
577
|
+
def update_organization_feature_flag_override_with_http_info(org_code, feature_flag_key, value, opts = {})
|
578
|
+
if @api_client.config.debugging
|
579
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization_feature_flag_override ...'
|
580
|
+
end
|
581
|
+
# verify the required parameter 'org_code' is set
|
582
|
+
if @api_client.config.client_side_validation && org_code.nil?
|
583
|
+
fail ArgumentError, "Missing the required parameter 'org_code' when calling OrganizationsApi.update_organization_feature_flag_override"
|
584
|
+
end
|
585
|
+
# verify the required parameter 'feature_flag_key' is set
|
586
|
+
if @api_client.config.client_side_validation && feature_flag_key.nil?
|
587
|
+
fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling OrganizationsApi.update_organization_feature_flag_override"
|
588
|
+
end
|
589
|
+
# verify the required parameter 'value' is set
|
590
|
+
if @api_client.config.client_side_validation && value.nil?
|
591
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling OrganizationsApi.update_organization_feature_flag_override"
|
592
|
+
end
|
593
|
+
# resource path
|
594
|
+
local_var_path = '/api/v1/organizations/{org_code}/feature_flags/{feature_flag_key}'.sub('{' + 'org_code' + '}', CGI.escape(org_code.to_s)).sub('{' + 'feature_flag_key' + '}', CGI.escape(feature_flag_key.to_s))
|
595
|
+
|
596
|
+
# query parameters
|
597
|
+
query_params = opts[:query_params] || {}
|
598
|
+
query_params[:'value'] = value
|
599
|
+
|
600
|
+
# header parameters
|
601
|
+
header_params = opts[:header_params] || {}
|
602
|
+
# HTTP header 'Accept' (if needed)
|
603
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
604
|
+
|
605
|
+
# form parameters
|
606
|
+
form_params = opts[:form_params] || {}
|
607
|
+
|
608
|
+
# http body (model)
|
609
|
+
post_body = opts[:debug_body]
|
610
|
+
|
611
|
+
# return_type
|
612
|
+
return_type = opts[:debug_return_type] || 'SuccessResponse'
|
613
|
+
|
614
|
+
# auth_names
|
615
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
616
|
+
|
617
|
+
new_options = opts.merge(
|
618
|
+
:operation => :"OrganizationsApi.update_organization_feature_flag_override",
|
619
|
+
:header_params => header_params,
|
620
|
+
:query_params => query_params,
|
621
|
+
:form_params => form_params,
|
622
|
+
:body => post_body,
|
623
|
+
:auth_names => auth_names,
|
624
|
+
:return_type => return_type
|
625
|
+
)
|
626
|
+
|
627
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
628
|
+
if @api_client.config.debugging
|
629
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#update_organization_feature_flag_override\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
630
|
+
end
|
631
|
+
return data, status_code, headers
|
632
|
+
end
|
633
|
+
end
|
634
|
+
end
|