Class: Mudbase::MultiRoleApi
- Inherits:
-
Object
- Object
- Mudbase::MultiRoleApi
- Defined in:
- lib/mudbase/api/multi_role_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#auth_oauth_signup_with_role(role, provider, project_id, opts = {}) ⇒ UsersLinkOAuthProvider200Response
OAuth signup with specific role Public endpoint that initiates OAuth signup flow with a specific role assigned during registration.
-
#auth_oauth_signup_with_role_with_http_info(role, provider, project_id, opts = {}) ⇒ Array<(UsersLinkOAuthProvider200Response, Integer, Hash)>
OAuth signup with specific role Public endpoint that initiates OAuth signup flow with a specific role assigned during registration.
-
#auth_register_with_role(role, auth_register_with_role_request, opts = {}) ⇒ nil
Register user with specific role (Local Auth) Public endpoint for user registration with a specific role.
-
#auth_register_with_role_with_http_info(role, auth_register_with_role_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Register user with specific role (Local Auth) Public endpoint for user registration with a specific role.
-
#initialize(api_client = ApiClient.default) ⇒ MultiRoleApi
constructor
A new instance of MultiRoleApi.
-
#multi_role_add_role(project_id, multi_role_add_role_request, opts = {}) ⇒ MultiRoleUpdateSettings200Response
Add custom role Add a custom role to a project with specific permissions and signup endpoint.
-
#multi_role_add_role_with_http_info(project_id, multi_role_add_role_request, opts = {}) ⇒ Array<(MultiRoleUpdateSettings200Response, Integer, Hash)>
Add custom role Add a custom role to a project with specific permissions and signup endpoint.
-
#multi_role_get_available_roles(project_id, opts = {}) ⇒ MultiRoleGetAvailableRoles200Response
Get available roles for signup Get all available roles for user signup in a project.
-
#multi_role_get_available_roles_with_http_info(project_id, opts = {}) ⇒ Array<(MultiRoleGetAvailableRoles200Response, Integer, Hash)>
Get available roles for signup Get all available roles for user signup in a project.
-
#multi_role_get_config(project_id, opts = {}) ⇒ MultiRoleGetConfig200Response
Get multi-role feature configuration Get the ready-to-use multi-role system configuration for a project.
-
#multi_role_get_config_with_http_info(project_id, opts = {}) ⇒ Array<(MultiRoleGetConfig200Response, Integer, Hash)>
Get multi-role feature configuration Get the ready-to-use multi-role system configuration for a project.
-
#multi_role_toggle_role(project_id, role_slug, multi_role_toggle_role_request, opts = {}) ⇒ MultiRoleUpdateSettings200Response
Toggle role on/off Enable or disable a role for the project.
-
#multi_role_toggle_role_with_http_info(project_id, role_slug, multi_role_toggle_role_request, opts = {}) ⇒ Array<(MultiRoleUpdateSettings200Response, Integer, Hash)>
Toggle role on/off Enable or disable a role for the project.
-
#multi_role_update_collection_permissions(project_id, role_slug, collection_id, multi_role_update_collection_permissions_request, opts = {}) ⇒ MultiRoleUpdateSettings200Response
Update collection permissions for a role Update collection-specific permissions for a role in a project.
-
#multi_role_update_collection_permissions_with_http_info(project_id, role_slug, collection_id, multi_role_update_collection_permissions_request, opts = {}) ⇒ Array<(MultiRoleUpdateSettings200Response, Integer, Hash)>
Update collection permissions for a role Update collection-specific permissions for a role in a project.
-
#multi_role_update_role(project_id, role_slug, multi_role_update_role_request, opts = {}) ⇒ MultiRoleUpdateSettings200Response
Update role configuration Update an existing role’s metadata and requirements (name, description, hierarchy, approval/payment/KYC flags).
-
#multi_role_update_role_with_http_info(project_id, role_slug, multi_role_update_role_request, opts = {}) ⇒ Array<(MultiRoleUpdateSettings200Response, Integer, Hash)>
Update role configuration Update an existing role's metadata and requirements (name, description, hierarchy, approval/payment/KYC flags).
-
#multi_role_update_settings(project_id, multi_role_update_settings_request, opts = {}) ⇒ MultiRoleUpdateSettings200Response
Update multi-role feature settings Update multi-role feature settings for a project, including enabling/disabling the feature and configuring default roles.
-
#multi_role_update_settings_with_http_info(project_id, multi_role_update_settings_request, opts = {}) ⇒ Array<(MultiRoleUpdateSettings200Response, Integer, Hash)>
Update multi-role feature settings Update multi-role feature settings for a project, including enabling/disabling the feature and configuring default roles.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ MultiRoleApi
Returns a new instance of MultiRoleApi.
19 20 21 |
# File 'lib/mudbase/api/multi_role_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/mudbase/api/multi_role_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#auth_oauth_signup_with_role(role, provider, project_id, opts = {}) ⇒ UsersLinkOAuthProvider200Response
OAuth signup with specific role Public endpoint that initiates OAuth signup flow with a specific role assigned during registration. The OAuth provider must be configured and enabled for the project first. The role must be available for signup in the project’s multi-role configuration. After successful OAuth authentication, the user will be created with the specified role. No authentication required - this is a public signup endpoint.
30 31 32 33 |
# File 'lib/mudbase/api/multi_role_api.rb', line 30 def auth_oauth_signup_with_role(role, provider, project_id, opts = {}) data, _status_code, _headers = auth_oauth_signup_with_role_with_http_info(role, provider, project_id, opts) data end |
#auth_oauth_signup_with_role_with_http_info(role, provider, project_id, opts = {}) ⇒ Array<(UsersLinkOAuthProvider200Response, Integer, Hash)>
OAuth signup with specific role Public endpoint that initiates OAuth signup flow with a specific role assigned during registration. The OAuth provider must be configured and enabled for the project first. The role must be available for signup in the project's multi-role configuration. After successful OAuth authentication, the user will be created with the specified role. No authentication required - this is a public signup endpoint.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/mudbase/api/multi_role_api.rb', line 43 def auth_oauth_signup_with_role_with_http_info(role, provider, project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleApi.auth_oauth_signup_with_role ...' end # verify the required parameter 'role' is set if @api_client.config.client_side_validation && role.nil? fail ArgumentError, "Missing the required parameter 'role' when calling MultiRoleApi.auth_oauth_signup_with_role" end # verify the required parameter 'provider' is set if @api_client.config.client_side_validation && provider.nil? fail ArgumentError, "Missing the required parameter 'provider' when calling MultiRoleApi.auth_oauth_signup_with_role" end # verify enum value allowable_values = ["google", "github", "facebook", "microsoft", "apple", "twitter", "discord", "linkedin", "dropbox", "slack", "reddit", "twitch", "figma", "zoom", "bitbucket", "salesforce", "shopify", "line", "spotify", "strava", "paypal", "asana", "trello", "okta", "gitea", "yandex", "yahoo", "vk", "meetup"] if @api_client.config.client_side_validation && !allowable_values.include?(provider) fail ArgumentError, "invalid value for \"provider\", must be one of #{allowable_values}" end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleApi.auth_oauth_signup_with_role" end # resource path local_var_path = '/api/auth/oauth/signup/{role}/{provider}/{projectId}'.sub('{' + 'role' + '}', CGI.escape(role.to_s)).sub('{' + 'provider' + '}', CGI.escape(provider.to_s)).sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'redirect_url'] = opts[:'redirect_url'] if !opts[:'redirect_url'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsersLinkOAuthProvider200Response' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"MultiRoleApi.auth_oauth_signup_with_role", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleApi#auth_oauth_signup_with_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#auth_register_with_role(role, auth_register_with_role_request, opts = {}) ⇒ nil
Register user with specific role (Local Auth) Public endpoint for user registration with a specific role. The role is specified in the URL path (e.g., /signup/customer, /signup/vendor). No authentication required - this is a public signup endpoint.
111 112 113 114 |
# File 'lib/mudbase/api/multi_role_api.rb', line 111 def auth_register_with_role(role, auth_register_with_role_request, opts = {}) auth_register_with_role_with_http_info(role, auth_register_with_role_request, opts) nil end |
#auth_register_with_role_with_http_info(role, auth_register_with_role_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Register user with specific role (Local Auth) Public endpoint for user registration with a specific role. The role is specified in the URL path (e.g., /signup/customer, /signup/vendor). No authentication required - this is a public signup endpoint.
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/mudbase/api/multi_role_api.rb', line 122 def auth_register_with_role_with_http_info(role, auth_register_with_role_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleApi.auth_register_with_role ...' end # verify the required parameter 'role' is set if @api_client.config.client_side_validation && role.nil? fail ArgumentError, "Missing the required parameter 'role' when calling MultiRoleApi.auth_register_with_role" end # verify the required parameter 'auth_register_with_role_request' is set if @api_client.config.client_side_validation && auth_register_with_role_request.nil? fail ArgumentError, "Missing the required parameter 'auth_register_with_role_request' when calling MultiRoleApi.auth_register_with_role" end # resource path local_var_path = '/api/auth/local/signup/{role}'.sub('{' + 'role' + '}', CGI.escape(role.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(auth_register_with_role_request) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"MultiRoleApi.auth_register_with_role", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleApi#auth_register_with_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#multi_role_add_role(project_id, multi_role_add_role_request, opts = {}) ⇒ MultiRoleUpdateSettings200Response
Add custom role Add a custom role to a project with specific permissions and signup endpoint. Accepts BearerToken (JWT) or ApiKeyAuth (X-API-Key).
185 186 187 188 |
# File 'lib/mudbase/api/multi_role_api.rb', line 185 def multi_role_add_role(project_id, multi_role_add_role_request, opts = {}) data, _status_code, _headers = multi_role_add_role_with_http_info(project_id, multi_role_add_role_request, opts) data end |
#multi_role_add_role_with_http_info(project_id, multi_role_add_role_request, opts = {}) ⇒ Array<(MultiRoleUpdateSettings200Response, Integer, Hash)>
Add custom role Add a custom role to a project with specific permissions and signup endpoint. Accepts BearerToken (JWT) or ApiKeyAuth (X-API-Key).
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/mudbase/api/multi_role_api.rb', line 196 def multi_role_add_role_with_http_info(project_id, multi_role_add_role_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleApi.multi_role_add_role ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleApi.multi_role_add_role" end # verify the required parameter 'multi_role_add_role_request' is set if @api_client.config.client_side_validation && multi_role_add_role_request.nil? fail ArgumentError, "Missing the required parameter 'multi_role_add_role_request' when calling MultiRoleApi.multi_role_add_role" end # resource path local_var_path = '/api/projects/{projectId}/multi-role/roles'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(multi_role_add_role_request) # return_type return_type = opts[:debug_return_type] || 'MultiRoleUpdateSettings200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerToken'] = opts.merge( :operation => :"MultiRoleApi.multi_role_add_role", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleApi#multi_role_add_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#multi_role_get_available_roles(project_id, opts = {}) ⇒ MultiRoleGetAvailableRoles200Response
Get available roles for signup Get all available roles for user signup in a project. Accepts BearerToken (JWT) or ApiKeyAuth (X-API-Key).
258 259 260 261 |
# File 'lib/mudbase/api/multi_role_api.rb', line 258 def multi_role_get_available_roles(project_id, opts = {}) data, _status_code, _headers = multi_role_get_available_roles_with_http_info(project_id, opts) data end |
#multi_role_get_available_roles_with_http_info(project_id, opts = {}) ⇒ Array<(MultiRoleGetAvailableRoles200Response, Integer, Hash)>
Get available roles for signup Get all available roles for user signup in a project. Accepts BearerToken (JWT) or ApiKeyAuth (X-API-Key).
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 |
# File 'lib/mudbase/api/multi_role_api.rb', line 268 def multi_role_get_available_roles_with_http_info(project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleApi.multi_role_get_available_roles ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleApi.multi_role_get_available_roles" end # resource path local_var_path = '/api/projects/{projectId}/multi-role/roles/available'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MultiRoleGetAvailableRoles200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerToken'] = opts.merge( :operation => :"MultiRoleApi.multi_role_get_available_roles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleApi#multi_role_get_available_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#multi_role_get_config(project_id, opts = {}) ⇒ MultiRoleGetConfig200Response
Get multi-role feature configuration Get the ready-to-use multi-role system configuration for a project
321 322 323 324 |
# File 'lib/mudbase/api/multi_role_api.rb', line 321 def multi_role_get_config(project_id, opts = {}) data, _status_code, _headers = multi_role_get_config_with_http_info(project_id, opts) data end |
#multi_role_get_config_with_http_info(project_id, opts = {}) ⇒ Array<(MultiRoleGetConfig200Response, Integer, Hash)>
Get multi-role feature configuration Get the ready-to-use multi-role system configuration for a project
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 |
# File 'lib/mudbase/api/multi_role_api.rb', line 331 def multi_role_get_config_with_http_info(project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleApi.multi_role_get_config ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleApi.multi_role_get_config" end # resource path local_var_path = '/api/projects/{projectId}/multi-role'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MultiRoleGetConfig200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerToken'] = opts.merge( :operation => :"MultiRoleApi.multi_role_get_config", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleApi#multi_role_get_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#multi_role_toggle_role(project_id, role_slug, multi_role_toggle_role_request, opts = {}) ⇒ MultiRoleUpdateSettings200Response
Toggle role on/off Enable or disable a role for the project. When disabled, the role is no longer available for signup or assignment.
386 387 388 389 |
# File 'lib/mudbase/api/multi_role_api.rb', line 386 def multi_role_toggle_role(project_id, role_slug, multi_role_toggle_role_request, opts = {}) data, _status_code, _headers = multi_role_toggle_role_with_http_info(project_id, role_slug, multi_role_toggle_role_request, opts) data end |
#multi_role_toggle_role_with_http_info(project_id, role_slug, multi_role_toggle_role_request, opts = {}) ⇒ Array<(MultiRoleUpdateSettings200Response, Integer, Hash)>
Toggle role on/off Enable or disable a role for the project. When disabled, the role is no longer available for signup or assignment.
398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 |
# File 'lib/mudbase/api/multi_role_api.rb', line 398 def multi_role_toggle_role_with_http_info(project_id, role_slug, multi_role_toggle_role_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleApi.multi_role_toggle_role ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleApi.multi_role_toggle_role" end # verify the required parameter 'role_slug' is set if @api_client.config.client_side_validation && role_slug.nil? fail ArgumentError, "Missing the required parameter 'role_slug' when calling MultiRoleApi.multi_role_toggle_role" end # verify the required parameter 'multi_role_toggle_role_request' is set if @api_client.config.client_side_validation && multi_role_toggle_role_request.nil? fail ArgumentError, "Missing the required parameter 'multi_role_toggle_role_request' when calling MultiRoleApi.multi_role_toggle_role" end # resource path local_var_path = '/api/projects/{projectId}/multi-role/roles/{roleSlug}/toggle'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)).sub('{' + 'roleSlug' + '}', CGI.escape(role_slug.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(multi_role_toggle_role_request) # return_type return_type = opts[:debug_return_type] || 'MultiRoleUpdateSettings200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerToken'] = opts.merge( :operation => :"MultiRoleApi.multi_role_toggle_role", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleApi#multi_role_toggle_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#multi_role_update_collection_permissions(project_id, role_slug, collection_id, multi_role_update_collection_permissions_request, opts = {}) ⇒ MultiRoleUpdateSettings200Response
Update collection permissions for a role Update collection-specific permissions for a role in a project. Accepts BearerToken (JWT) or ApiKeyAuth (X-API-Key).
467 468 469 470 |
# File 'lib/mudbase/api/multi_role_api.rb', line 467 def (project_id, role_slug, collection_id, , opts = {}) data, _status_code, _headers = (project_id, role_slug, collection_id, , opts) data end |
#multi_role_update_collection_permissions_with_http_info(project_id, role_slug, collection_id, multi_role_update_collection_permissions_request, opts = {}) ⇒ Array<(MultiRoleUpdateSettings200Response, Integer, Hash)>
Update collection permissions for a role Update collection-specific permissions for a role in a project. Accepts BearerToken (JWT) or ApiKeyAuth (X-API-Key).
480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 |
# File 'lib/mudbase/api/multi_role_api.rb', line 480 def (project_id, role_slug, collection_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleApi.multi_role_update_collection_permissions ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleApi.multi_role_update_collection_permissions" end # verify the required parameter 'role_slug' is set if @api_client.config.client_side_validation && role_slug.nil? fail ArgumentError, "Missing the required parameter 'role_slug' when calling MultiRoleApi.multi_role_update_collection_permissions" end # verify the required parameter 'collection_id' is set if @api_client.config.client_side_validation && collection_id.nil? fail ArgumentError, "Missing the required parameter 'collection_id' when calling MultiRoleApi.multi_role_update_collection_permissions" end # verify the required parameter 'multi_role_update_collection_permissions_request' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'multi_role_update_collection_permissions_request' when calling MultiRoleApi.multi_role_update_collection_permissions" end # resource path local_var_path = '/api/projects/{projectId}/multi-role/roles/{roleSlug}/collections/{collectionId}/permissions'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)).sub('{' + 'roleSlug' + '}', CGI.escape(role_slug.to_s)).sub('{' + 'collectionId' + '}', CGI.escape(collection_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body() # return_type return_type = opts[:debug_return_type] || 'MultiRoleUpdateSettings200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerToken'] = opts.merge( :operation => :"MultiRoleApi.multi_role_update_collection_permissions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleApi#multi_role_update_collection_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#multi_role_update_role(project_id, role_slug, multi_role_update_role_request, opts = {}) ⇒ MultiRoleUpdateSettings200Response
Update role configuration Update an existing role’s metadata and requirements (name, description, hierarchy, approval/payment/KYC flags).
552 553 554 555 |
# File 'lib/mudbase/api/multi_role_api.rb', line 552 def multi_role_update_role(project_id, role_slug, multi_role_update_role_request, opts = {}) data, _status_code, _headers = multi_role_update_role_with_http_info(project_id, role_slug, multi_role_update_role_request, opts) data end |
#multi_role_update_role_with_http_info(project_id, role_slug, multi_role_update_role_request, opts = {}) ⇒ Array<(MultiRoleUpdateSettings200Response, Integer, Hash)>
Update role configuration Update an existing role's metadata and requirements (name, description, hierarchy, approval/payment/KYC flags).
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 |
# File 'lib/mudbase/api/multi_role_api.rb', line 564 def multi_role_update_role_with_http_info(project_id, role_slug, multi_role_update_role_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleApi.multi_role_update_role ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleApi.multi_role_update_role" end # verify the required parameter 'role_slug' is set if @api_client.config.client_side_validation && role_slug.nil? fail ArgumentError, "Missing the required parameter 'role_slug' when calling MultiRoleApi.multi_role_update_role" end # verify the required parameter 'multi_role_update_role_request' is set if @api_client.config.client_side_validation && multi_role_update_role_request.nil? fail ArgumentError, "Missing the required parameter 'multi_role_update_role_request' when calling MultiRoleApi.multi_role_update_role" end # resource path local_var_path = '/api/projects/{projectId}/multi-role/roles/{roleSlug}'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)).sub('{' + 'roleSlug' + '}', CGI.escape(role_slug.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(multi_role_update_role_request) # return_type return_type = opts[:debug_return_type] || 'MultiRoleUpdateSettings200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerToken'] = opts.merge( :operation => :"MultiRoleApi.multi_role_update_role", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleApi#multi_role_update_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#multi_role_update_settings(project_id, multi_role_update_settings_request, opts = {}) ⇒ MultiRoleUpdateSettings200Response
Update multi-role feature settings Update multi-role feature settings for a project, including enabling/disabling the feature and configuring default roles. Accepts BearerToken (JWT) or ApiKeyAuth (X-API-Key).
631 632 633 634 |
# File 'lib/mudbase/api/multi_role_api.rb', line 631 def multi_role_update_settings(project_id, multi_role_update_settings_request, opts = {}) data, _status_code, _headers = multi_role_update_settings_with_http_info(project_id, multi_role_update_settings_request, opts) data end |
#multi_role_update_settings_with_http_info(project_id, multi_role_update_settings_request, opts = {}) ⇒ Array<(MultiRoleUpdateSettings200Response, Integer, Hash)>
Update multi-role feature settings Update multi-role feature settings for a project, including enabling/disabling the feature and configuring default roles. Accepts BearerToken (JWT) or ApiKeyAuth (X-API-Key).
642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 |
# File 'lib/mudbase/api/multi_role_api.rb', line 642 def multi_role_update_settings_with_http_info(project_id, multi_role_update_settings_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleApi.multi_role_update_settings ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling MultiRoleApi.multi_role_update_settings" end # verify the required parameter 'multi_role_update_settings_request' is set if @api_client.config.client_side_validation && multi_role_update_settings_request.nil? fail ArgumentError, "Missing the required parameter 'multi_role_update_settings_request' when calling MultiRoleApi.multi_role_update_settings" end # resource path local_var_path = '/api/projects/{projectId}/multi-role/settings'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(multi_role_update_settings_request) # return_type return_type = opts[:debug_return_type] || 'MultiRoleUpdateSettings200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerToken'] = opts.merge( :operation => :"MultiRoleApi.multi_role_update_settings", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MultiRoleApi#multi_role_update_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |