Class: Mudbase::MultiRoleFeatureApi
- Inherits:
-
Object
- Object
- Mudbase::MultiRoleFeatureApi
- Defined in:
- lib/mudbase/api/multi_role_feature_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_custom_role(project_id, add_custom_role_request, opts = {}) ⇒ UpdateMultiRoleSettings200Response
Add custom role Add a custom role to a project with specific permissions and signup endpoint.
-
#add_custom_role_with_http_info(project_id, add_custom_role_request, opts = {}) ⇒ Array<(UpdateMultiRoleSettings200Response, Integer, Hash)>
Add custom role Add a custom role to a project with specific permissions and signup endpoint.
-
#get_available_roles(project_id, opts = {}) ⇒ GetAvailableRoles200Response
Get available roles for signup Get all available roles for user signup in a project.
-
#get_available_roles_with_http_info(project_id, opts = {}) ⇒ Array<(GetAvailableRoles200Response, Integer, Hash)>
Get available roles for signup Get all available roles for user signup in a project.
-
#get_multi_role_config(project_id, opts = {}) ⇒ GetMultiRoleConfig200Response
Get multi-role feature configuration Get the ready-to-use multi-role system configuration for a project.
-
#get_multi_role_config_with_http_info(project_id, opts = {}) ⇒ Array<(GetMultiRoleConfig200Response, Integer, Hash)>
Get multi-role feature configuration Get the ready-to-use multi-role system configuration for a project.
-
#initialize(api_client = ApiClient.default) ⇒ MultiRoleFeatureApi
constructor
A new instance of MultiRoleFeatureApi.
-
#oauth_signup_with_role(role, provider, project_id, opts = {}) ⇒ LinkOAuthProvider200Response
OAuth signup with specific role Public endpoint that initiates OAuth signup flow with a specific role assigned during registration.
-
#oauth_signup_with_role_with_http_info(role, provider, project_id, opts = {}) ⇒ Array<(LinkOAuthProvider200Response, Integer, Hash)>
OAuth signup with specific role Public endpoint that initiates OAuth signup flow with a specific role assigned during registration.
-
#register_with_role(role, register_with_role_request, opts = {}) ⇒ nil
Register user with specific role (Local Auth) Public endpoint for user registration with a specific role.
-
#register_with_role_with_http_info(role, 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.
-
#toggle_role(project_id, role_slug, toggle_role_request, opts = {}) ⇒ UpdateMultiRoleSettings200Response
Toggle role on/off Enable or disable a role for the project.
-
#toggle_role_with_http_info(project_id, role_slug, toggle_role_request, opts = {}) ⇒ Array<(UpdateMultiRoleSettings200Response, Integer, Hash)>
Toggle role on/off Enable or disable a role for the project.
-
#update_collection_permissions(project_id, role_slug, collection_id, update_collection_permissions_request, opts = {}) ⇒ UpdateMultiRoleSettings200Response
Update collection permissions for a role Update collection-specific permissions for a role in a project.
-
#update_collection_permissions_with_http_info(project_id, role_slug, collection_id, update_collection_permissions_request, opts = {}) ⇒ Array<(UpdateMultiRoleSettings200Response, Integer, Hash)>
Update collection permissions for a role Update collection-specific permissions for a role in a project.
-
#update_multi_role_settings(project_id, update_multi_role_settings_request, opts = {}) ⇒ UpdateMultiRoleSettings200Response
Update multi-role feature settings Update multi-role feature settings for a project, including enabling/disabling the feature and configuring default roles.
-
#update_multi_role_settings_with_http_info(project_id, update_multi_role_settings_request, opts = {}) ⇒ Array<(UpdateMultiRoleSettings200Response, Integer, Hash)>
Update multi-role feature settings Update multi-role feature settings for a project, including enabling/disabling the feature and configuring default roles.
-
#update_project_role(project_id, role_slug, update_project_role_request, opts = {}) ⇒ UpdateMultiRoleSettings200Response
Update role configuration Update an existing role’s metadata and requirements (name, description, hierarchy, approval/payment/KYC flags).
-
#update_project_role_with_http_info(project_id, role_slug, update_project_role_request, opts = {}) ⇒ Array<(UpdateMultiRoleSettings200Response, Integer, Hash)>
Update role configuration Update an existing role's metadata and requirements (name, description, hierarchy, approval/payment/KYC flags).
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ MultiRoleFeatureApi
Returns a new instance of MultiRoleFeatureApi.
19 20 21 |
# File 'lib/mudbase/api/multi_role_feature_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_feature_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_custom_role(project_id, add_custom_role_request, opts = {}) ⇒ UpdateMultiRoleSettings200Response
Add custom role Add a custom role to a project with specific permissions and signup endpoint. Accepts ProjectBearerAuth (JWT) or ApiKeyAuth (X-API-Key).
28 29 30 31 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 28 def add_custom_role(project_id, add_custom_role_request, opts = {}) data, _status_code, _headers = add_custom_role_with_http_info(project_id, add_custom_role_request, opts) data end |
#add_custom_role_with_http_info(project_id, add_custom_role_request, opts = {}) ⇒ Array<(UpdateMultiRoleSettings200Response, Integer, Hash)>
Add custom role Add a custom role to a project with specific permissions and signup endpoint. Accepts ProjectBearerAuth (JWT) or ApiKeyAuth (X-API-Key).
39 40 41 42 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 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 39 def add_custom_role_with_http_info(project_id, add_custom_role_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.add_custom_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 MultiRoleFeatureApi.add_custom_role" end # verify the required parameter 'add_custom_role_request' is set if @api_client.config.client_side_validation && add_custom_role_request.nil? fail ArgumentError, "Missing the required parameter 'add_custom_role_request' when calling MultiRoleFeatureApi.add_custom_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(add_custom_role_request) # return_type return_type = opts[:debug_return_type] || 'UpdateMultiRoleSettings200Response' # auth_names auth_names = opts[:debug_auth_names] || ['ProjectBearerAuth'] = opts.merge( :operation => :"MultiRoleFeatureApi.add_custom_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: MultiRoleFeatureApi#add_custom_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_available_roles(project_id, opts = {}) ⇒ GetAvailableRoles200Response
Get available roles for signup Get all available roles for user signup in a project. Accepts ProjectBearerAuth (JWT) or ApiKeyAuth (X-API-Key).
101 102 103 104 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 101 def get_available_roles(project_id, opts = {}) data, _status_code, _headers = get_available_roles_with_http_info(project_id, opts) data end |
#get_available_roles_with_http_info(project_id, opts = {}) ⇒ Array<(GetAvailableRoles200Response, Integer, Hash)>
Get available roles for signup Get all available roles for user signup in a project. Accepts ProjectBearerAuth (JWT) or ApiKeyAuth (X-API-Key).
111 112 113 114 115 116 117 118 119 120 121 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 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 111 def get_available_roles_with_http_info(project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.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 MultiRoleFeatureApi.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] || 'GetAvailableRoles200Response' # auth_names auth_names = opts[:debug_auth_names] || ['ProjectBearerAuth'] = opts.merge( :operation => :"MultiRoleFeatureApi.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: MultiRoleFeatureApi#get_available_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_multi_role_config(project_id, opts = {}) ⇒ GetMultiRoleConfig200Response
Get multi-role feature configuration Get the ready-to-use multi-role system configuration for a project
164 165 166 167 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 164 def get_multi_role_config(project_id, opts = {}) data, _status_code, _headers = get_multi_role_config_with_http_info(project_id, opts) data end |
#get_multi_role_config_with_http_info(project_id, opts = {}) ⇒ Array<(GetMultiRoleConfig200Response, Integer, Hash)>
Get multi-role feature configuration Get the ready-to-use multi-role system configuration for a project
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 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 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 174 def get_multi_role_config_with_http_info(project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.get_multi_role_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 MultiRoleFeatureApi.get_multi_role_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] || 'GetMultiRoleConfig200Response' # auth_names auth_names = opts[:debug_auth_names] || ['ProjectBearerAuth'] = opts.merge( :operation => :"MultiRoleFeatureApi.get_multi_role_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: MultiRoleFeatureApi#get_multi_role_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#oauth_signup_with_role(role, provider, project_id, opts = {}) ⇒ LinkOAuthProvider200Response
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.
230 231 232 233 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 230 def oauth_signup_with_role(role, provider, project_id, opts = {}) data, _status_code, _headers = oauth_signup_with_role_with_http_info(role, provider, project_id, opts) data end |
#oauth_signup_with_role_with_http_info(role, provider, project_id, opts = {}) ⇒ Array<(LinkOAuthProvider200Response, 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.
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 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 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 243 def oauth_signup_with_role_with_http_info(role, provider, project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.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 MultiRoleFeatureApi.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 MultiRoleFeatureApi.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 MultiRoleFeatureApi.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] || 'LinkOAuthProvider200Response' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"MultiRoleFeatureApi.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: MultiRoleFeatureApi#oauth_signup_with_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#register_with_role(role, 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.
311 312 313 314 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 311 def register_with_role(role, register_with_role_request, opts = {}) register_with_role_with_http_info(role, register_with_role_request, opts) nil end |
#register_with_role_with_http_info(role, 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.
322 323 324 325 326 327 328 329 330 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_feature_api.rb', line 322 def register_with_role_with_http_info(role, register_with_role_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.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 MultiRoleFeatureApi.register_with_role" end # verify the required parameter 'register_with_role_request' is set if @api_client.config.client_side_validation && register_with_role_request.nil? fail ArgumentError, "Missing the required parameter 'register_with_role_request' when calling MultiRoleFeatureApi.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(register_with_role_request) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"MultiRoleFeatureApi.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: MultiRoleFeatureApi#register_with_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#toggle_role(project_id, role_slug, toggle_role_request, opts = {}) ⇒ UpdateMultiRoleSettings200Response
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_feature_api.rb', line 386 def toggle_role(project_id, role_slug, toggle_role_request, opts = {}) data, _status_code, _headers = toggle_role_with_http_info(project_id, role_slug, toggle_role_request, opts) data end |
#toggle_role_with_http_info(project_id, role_slug, toggle_role_request, opts = {}) ⇒ Array<(UpdateMultiRoleSettings200Response, 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_feature_api.rb', line 398 def toggle_role_with_http_info(project_id, role_slug, toggle_role_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.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 MultiRoleFeatureApi.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 MultiRoleFeatureApi.toggle_role" end # verify the required parameter 'toggle_role_request' is set if @api_client.config.client_side_validation && toggle_role_request.nil? fail ArgumentError, "Missing the required parameter 'toggle_role_request' when calling MultiRoleFeatureApi.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(toggle_role_request) # return_type return_type = opts[:debug_return_type] || 'UpdateMultiRoleSettings200Response' # auth_names auth_names = opts[:debug_auth_names] || ['ProjectBearerAuth'] = opts.merge( :operation => :"MultiRoleFeatureApi.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: MultiRoleFeatureApi#toggle_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_collection_permissions(project_id, role_slug, collection_id, update_collection_permissions_request, opts = {}) ⇒ UpdateMultiRoleSettings200Response
Update collection permissions for a role Update collection-specific permissions for a role in a project. Accepts ProjectBearerAuth (JWT) or ApiKeyAuth (X-API-Key).
467 468 469 470 |
# File 'lib/mudbase/api/multi_role_feature_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 |
#update_collection_permissions_with_http_info(project_id, role_slug, collection_id, update_collection_permissions_request, opts = {}) ⇒ Array<(UpdateMultiRoleSettings200Response, Integer, Hash)>
Update collection permissions for a role Update collection-specific permissions for a role in a project. Accepts ProjectBearerAuth (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_feature_api.rb', line 480 def (project_id, role_slug, collection_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.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 MultiRoleFeatureApi.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 MultiRoleFeatureApi.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 MultiRoleFeatureApi.update_collection_permissions" end # verify the required parameter 'update_collection_permissions_request' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'update_collection_permissions_request' when calling MultiRoleFeatureApi.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] || 'UpdateMultiRoleSettings200Response' # auth_names auth_names = opts[:debug_auth_names] || ['ProjectBearerAuth'] = opts.merge( :operation => :"MultiRoleFeatureApi.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: MultiRoleFeatureApi#update_collection_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_multi_role_settings(project_id, update_multi_role_settings_request, opts = {}) ⇒ UpdateMultiRoleSettings200Response
Update multi-role feature settings Update multi-role feature settings for a project, including enabling/disabling the feature and configuring default roles. Accepts ProjectBearerAuth (JWT) or ApiKeyAuth (X-API-Key).
551 552 553 554 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 551 def update_multi_role_settings(project_id, update_multi_role_settings_request, opts = {}) data, _status_code, _headers = update_multi_role_settings_with_http_info(project_id, update_multi_role_settings_request, opts) data end |
#update_multi_role_settings_with_http_info(project_id, update_multi_role_settings_request, opts = {}) ⇒ Array<(UpdateMultiRoleSettings200Response, 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 ProjectBearerAuth (JWT) or ApiKeyAuth (X-API-Key).
562 563 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 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 562 def update_multi_role_settings_with_http_info(project_id, update_multi_role_settings_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.update_multi_role_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 MultiRoleFeatureApi.update_multi_role_settings" end # verify the required parameter 'update_multi_role_settings_request' is set if @api_client.config.client_side_validation && update_multi_role_settings_request.nil? fail ArgumentError, "Missing the required parameter 'update_multi_role_settings_request' when calling MultiRoleFeatureApi.update_multi_role_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(update_multi_role_settings_request) # return_type return_type = opts[:debug_return_type] || 'UpdateMultiRoleSettings200Response' # auth_names auth_names = opts[:debug_auth_names] || ['ProjectBearerAuth'] = opts.merge( :operation => :"MultiRoleFeatureApi.update_multi_role_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: MultiRoleFeatureApi#update_multi_role_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_project_role(project_id, role_slug, update_project_role_request, opts = {}) ⇒ UpdateMultiRoleSettings200Response
Update role configuration Update an existing role’s metadata and requirements (name, description, hierarchy, approval/payment/KYC flags).
626 627 628 629 |
# File 'lib/mudbase/api/multi_role_feature_api.rb', line 626 def update_project_role(project_id, role_slug, update_project_role_request, opts = {}) data, _status_code, _headers = update_project_role_with_http_info(project_id, role_slug, update_project_role_request, opts) data end |
#update_project_role_with_http_info(project_id, role_slug, update_project_role_request, opts = {}) ⇒ Array<(UpdateMultiRoleSettings200Response, Integer, Hash)>
Update role configuration Update an existing role's metadata and requirements (name, description, hierarchy, approval/payment/KYC flags).
638 639 640 641 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_feature_api.rb', line 638 def update_project_role_with_http_info(project_id, role_slug, update_project_role_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MultiRoleFeatureApi.update_project_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 MultiRoleFeatureApi.update_project_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 MultiRoleFeatureApi.update_project_role" end # verify the required parameter 'update_project_role_request' is set if @api_client.config.client_side_validation && update_project_role_request.nil? fail ArgumentError, "Missing the required parameter 'update_project_role_request' when calling MultiRoleFeatureApi.update_project_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(update_project_role_request) # return_type return_type = opts[:debug_return_type] || 'UpdateMultiRoleSettings200Response' # auth_names auth_names = opts[:debug_auth_names] || ['ProjectBearerAuth'] = opts.merge( :operation => :"MultiRoleFeatureApi.update_project_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: MultiRoleFeatureApi#update_project_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |