Class: DocuSign_Rooms::RolesApi
- Inherits:
-
Object
- Object
- DocuSign_Rooms::RolesApi
- Defined in:
- lib/docusign_rooms/api/roles_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_role(account_id, body) ⇒ Role
Creates a role.
-
#create_role_with_http_info(account_id, body) ⇒ Array<(Role, Fixnum, Hash)>
Creates a role.
-
#delete_role(role_id, account_id) ⇒ nil
Deletes the role with the given roleId.
-
#delete_role_with_http_info(role_id, account_id) ⇒ Array<(nil, Fixnum, Hash)>
Deletes the role with the given roleId.
-
#get_role(role_id, account_id, options = DocuSign_Rooms::GetRoleOptions.default) ⇒ Role
Get information about the role with the given roleId.
-
#get_role_with_http_info(role_id, account_id, options = DocuSign_Rooms::GetRoleOptions.default) ⇒ Array<(Role, Fixnum, Hash)>
Get information about the role with the given roleId.
-
#get_roles(account_id, options = DocuSign_Rooms::GetRolesOptions.default) ⇒ RoleSummaryList
Gets a paged-list of roles in your company Returns a list of roles associated with a company account.
-
#get_roles_with_http_info(account_id, options = DocuSign_Rooms::GetRolesOptions.default) ⇒ Array<(RoleSummaryList, Fixnum, Hash)>
Gets a paged-list of roles in your company Returns a list of roles associated with a company account.
-
#initialize(api_client = RolesApi.default) ⇒ RolesApi
constructor
A new instance of RolesApi.
-
#update_role(role_id, account_id, body) ⇒ Role
Updates the role with the given roleId.
-
#update_role_with_http_info(role_id, account_id, body) ⇒ Array<(Role, Fixnum, Hash)>
Updates the role with the given roleId.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
48 49 50 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 48 def api_client @api_client end |
Instance Method Details
#create_role(account_id, body) ⇒ Role
Creates a role. Creates a new company role in Rooms
59 60 61 62 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 59 def create_role(account_id, body) data, _status_code, _headers = create_role_with_http_info(account_id, body) return data end |
#create_role_with_http_info(account_id, body) ⇒ Array<(Role, Fixnum, Hash)>
Creates a role. Creates a new company role in Rooms
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 104 105 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 69 def create_role_with_http_info(account_id, body) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RolesApi.create_role ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling RolesApi.create_role" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/roles".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json', 'application/xml', 'text/xml', 'application/*+xml']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Role') if @api_client.config.debugging @api_client.config.logger.debug "API called: RolesApi#create_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_role(role_id, account_id) ⇒ nil
Deletes the role with the given roleId. Deletes a role from a company account in Rooms
112 113 114 115 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 112 def delete_role(role_id, account_id) delete_role_with_http_info(role_id, account_id) return nil end |
#delete_role_with_http_info(role_id, account_id) ⇒ Array<(nil, Fixnum, Hash)>
Deletes the role with the given roleId. Deletes a role from a company account in Rooms
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 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 122 def delete_role_with_http_info(role_id, account_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RolesApi.delete_role ..." end # verify the required parameter 'role_id' is set fail ArgumentError, "Missing the required parameter 'role_id' when calling RolesApi.delete_role" if role_id.nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling RolesApi.delete_role" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/roles/{roleId}".sub('{format}','json').sub('{' + 'roleId' + '}', role_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: RolesApi#delete_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_role(role_id, account_id, options = DocuSign_Rooms::GetRoleOptions.default) ⇒ Role
Get information about the role with the given roleId. Get information about the role with the given roleId.
167 168 169 170 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 167 def get_role(role_id, account_id, = DocuSign_Rooms::GetRoleOptions.default) data, _status_code, _headers = get_role_with_http_info(role_id, account_id, ) return data end |
#get_role_with_http_info(role_id, account_id, options = DocuSign_Rooms::GetRoleOptions.default) ⇒ Array<(Role, Fixnum, Hash)>
Get information about the role with the given roleId. Get information about the role with the given roleId.
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 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 178 def get_role_with_http_info(role_id, account_id, = DocuSign_Rooms::GetRoleOptions.default) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RolesApi.get_role ..." end # verify the required parameter 'role_id' is set fail ArgumentError, "Missing the required parameter 'role_id' when calling RolesApi.get_role" if role_id.nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling RolesApi.get_role" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/roles/{roleId}".sub('{format}','json').sub('{' + 'roleId' + '}', role_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} query_params[:'includeIsAssigned'] = .include_is_assigned if !.include_is_assigned.nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Role') if @api_client.config.debugging @api_client.config.logger.debug "API called: RolesApi#get_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_roles(account_id, options = DocuSign_Rooms::GetRolesOptions.default) ⇒ RoleSummaryList
Gets a paged-list of roles in your company Returns a list of roles associated with a company account
224 225 226 227 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 224 def get_roles(account_id, = DocuSign_Rooms::GetRolesOptions.default) data, _status_code, _headers = get_roles_with_http_info(account_id, ) return data end |
#get_roles_with_http_info(account_id, options = DocuSign_Rooms::GetRolesOptions.default) ⇒ Array<(RoleSummaryList, Fixnum, Hash)>
Gets a paged-list of roles in your company Returns a list of roles associated with a company account
234 235 236 237 238 239 240 241 242 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 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 234 def get_roles_with_http_info(account_id, = DocuSign_Rooms::GetRolesOptions.default) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RolesApi.get_roles ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling RolesApi.get_roles" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/roles".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} query_params[:'onlyAssignable'] = .only_assignable if !.only_assignable.nil? query_params[:'filterContext'] = .filter_context if !.filter_context.nil? query_params[:'filter'] = .filter if !.filter.nil? query_params[:'startPosition'] = .start_position if !.start_position.nil? query_params[:'count'] = .count if !.count.nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RoleSummaryList') if @api_client.config.debugging @api_client.config.logger.debug "API called: RolesApi#get_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_role(role_id, account_id, body) ⇒ Role
Updates the role with the given roleId. Updates the role with the given roleId.
283 284 285 286 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 283 def update_role(role_id, account_id, body) data, _status_code, _headers = update_role_with_http_info(role_id, account_id, body) return data end |
#update_role_with_http_info(role_id, account_id, body) ⇒ Array<(Role, Fixnum, Hash)>
Updates the role with the given roleId. Updates the role with the given roleId.
294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 294 def update_role_with_http_info(role_id, account_id, body) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RolesApi.update_role ..." end # verify the required parameter 'role_id' is set fail ArgumentError, "Missing the required parameter 'role_id' when calling RolesApi.update_role" if role_id.nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling RolesApi.update_role" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/roles/{roleId}".sub('{format}','json').sub('{' + 'roleId' + '}', role_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json', 'application/xml', 'text/xml', 'application/*+xml']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Role') if @api_client.config.debugging @api_client.config.logger.debug "API called: RolesApi#update_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |