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.
-
#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.
-
#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
#initialize(api_client = RolesApi.default) ⇒ RolesApi
Returns a new instance of RolesApi.
47 48 49 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 47 def initialize(api_client = RolesApi.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
45 46 47 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 45 def api_client @api_client end |
Instance Method Details
#create_role(account_id, body) ⇒ Role
Creates a role.
56 57 58 59 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 56 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.
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 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 66 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']) # 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 = @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.
109 110 111 112 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 109 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.
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 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 119 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']) # 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.
162 163 164 165 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 162 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.
173 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 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 173 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']) # 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
217 218 219 220 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 217 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
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 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 227 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[:'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']) # 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.
273 274 275 276 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 273 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.
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 315 316 317 318 319 320 321 322 |
# File 'lib/docusign_rooms/api/roles_api.rb', line 284 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']) # 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 = @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 |