Class: TripletexRubyClient::ProjecthourlyRatesApi
- Inherits:
-
Object
- Object
- TripletexRubyClient::ProjecthourlyRatesApi
- Defined in:
- lib/tripletex_ruby_client/api/projecthourly_rates_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete(id, opts = {}) ⇒ nil
Delete Project Hourly Rate.
-
#delete_by_ids(ids, opts = {}) ⇒ nil
Delete project hourly rates.
-
#delete_by_ids_with_http_info(ids, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete project hourly rates.
-
#delete_by_project_ids(ids, date, opts = {}) ⇒ ListResponseProject
Delete project hourly rates by project id.
-
#delete_by_project_ids_with_http_info(ids, date, opts = {}) ⇒ Array<(ListResponseProject, Fixnum, Hash)>
Delete project hourly rates by project id.
-
#delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete Project Hourly Rate.
-
#get(id, opts = {}) ⇒ ResponseWrapperProjectHourlyRate
Find project hourly rate by ID.
-
#get_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperProjectHourlyRate, Fixnum, Hash)>
Find project hourly rate by ID.
-
#initialize(api_client = ApiClient.default) ⇒ ProjecthourlyRatesApi
constructor
A new instance of ProjecthourlyRatesApi.
-
#post(opts = {}) ⇒ ResponseWrapperProjectHourlyRate
Create a project hourly rate.
-
#post_list(opts = {}) ⇒ ListResponseProjectHourlyRate
Create multiple project hourly rates.
-
#post_list_with_http_info(opts = {}) ⇒ Array<(ListResponseProjectHourlyRate, Fixnum, Hash)>
Create multiple project hourly rates.
-
#post_with_http_info(opts = {}) ⇒ Array<(ResponseWrapperProjectHourlyRate, Fixnum, Hash)>
Create a project hourly rate.
-
#put(id, opts = {}) ⇒ ResponseWrapperProjectHourlyRate
Update a project hourly rate.
-
#put_list(opts = {}) ⇒ ListResponseProjectHourlyRate
Update multiple project hourly rates.
-
#put_list_with_http_info(opts = {}) ⇒ Array<(ListResponseProjectHourlyRate, Fixnum, Hash)>
Update multiple project hourly rates.
-
#put_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperProjectHourlyRate, Fixnum, Hash)>
Update a project hourly rate.
-
#search(opts = {}) ⇒ ListResponseProjectHourlyRate
Find project hourly rates corresponding with sent data.
-
#search_with_http_info(opts = {}) ⇒ Array<(ListResponseProjectHourlyRate, Fixnum, Hash)>
Find project hourly rates corresponding with sent data.
-
#update_or_add_hour_rates(ids, opts = {}) ⇒ ListResponseProjectHourlyRate
Update or add the same project hourly rate from project overview.
-
#update_or_add_hour_rates_with_http_info(ids, opts = {}) ⇒ Array<(ListResponseProjectHourlyRate, Fixnum, Hash)>
Update or add the same project hourly rate from project overview.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ProjecthourlyRatesApi
Returns a new instance of ProjecthourlyRatesApi.
19 20 21 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_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/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete(id, opts = {}) ⇒ nil
Delete Project Hourly Rate
27 28 29 30 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 27 def delete(id, opts = {}) delete_with_http_info(id, opts) nil end |
#delete_by_ids(ids, opts = {}) ⇒ nil
Delete project hourly rates.
76 77 78 79 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 76 def delete_by_ids(ids, opts = {}) delete_by_ids_with_http_info(ids, opts) nil end |
#delete_by_ids_with_http_info(ids, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete project hourly rates.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 86 def delete_by_ids_with_http_info(ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjecthourlyRatesApi.delete_by_ids ...' end # verify the required parameter 'ids' is set if @api_client.config.client_side_validation && ids.nil? fail ArgumentError, "Missing the required parameter 'ids' when calling ProjecthourlyRatesApi.delete_by_ids" end # resource path local_var_path = '/project/hourlyRates/list' # query parameters query_params = {} query_params[:'ids'] = ids # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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: ProjecthourlyRatesApi#delete_by_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_by_project_ids(ids, date, opts = {}) ⇒ ListResponseProject
Delete project hourly rates by project id.
127 128 129 130 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 127 def delete_by_project_ids(ids, date, opts = {}) data, _status_code, _headers = delete_by_project_ids_with_http_info(ids, date, opts) data end |
#delete_by_project_ids_with_http_info(ids, date, opts = {}) ⇒ Array<(ListResponseProject, Fixnum, Hash)>
Delete project hourly rates by project id.
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 178 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 138 def delete_by_project_ids_with_http_info(ids, date, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjecthourlyRatesApi.delete_by_project_ids ...' end # verify the required parameter 'ids' is set if @api_client.config.client_side_validation && ids.nil? fail ArgumentError, "Missing the required parameter 'ids' when calling ProjecthourlyRatesApi.delete_by_project_ids" end # verify the required parameter 'date' is set if @api_client.config.client_side_validation && date.nil? fail ArgumentError, "Missing the required parameter 'date' when calling ProjecthourlyRatesApi.delete_by_project_ids" end # resource path local_var_path = '/project/hourlyRates/deleteByProjectIds' # query parameters query_params = {} query_params[:'ids'] = ids query_params[:'date'] = date # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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, :return_type => 'ListResponseProject') if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjecthourlyRatesApi#delete_by_project_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete Project Hourly Rate
37 38 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 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 37 def delete_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjecthourlyRatesApi.delete ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ProjecthourlyRatesApi.delete" end # resource path local_var_path = '/project/hourlyRates/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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: ProjecthourlyRatesApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get(id, opts = {}) ⇒ ResponseWrapperProjectHourlyRate
Find project hourly rate by ID.
185 186 187 188 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 185 def get(id, opts = {}) data, _status_code, _headers = get_with_http_info(id, opts) data end |
#get_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperProjectHourlyRate, Fixnum, Hash)>
Find project hourly rate by ID.
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 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 196 def get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjecthourlyRatesApi.get ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ProjecthourlyRatesApi.get" end # resource path local_var_path = '/project/hourlyRates/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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 => 'ResponseWrapperProjectHourlyRate') if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjecthourlyRatesApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post(opts = {}) ⇒ ResponseWrapperProjectHourlyRate
Create a project hourly rate.
237 238 239 240 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 237 def post(opts = {}) data, _status_code, _headers = post_with_http_info(opts) data end |
#post_list(opts = {}) ⇒ ListResponseProjectHourlyRate
Create multiple project hourly rates.
285 286 287 288 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 285 def post_list(opts = {}) data, _status_code, _headers = post_list_with_http_info(opts) data end |
#post_list_with_http_info(opts = {}) ⇒ Array<(ListResponseProjectHourlyRate, Fixnum, Hash)>
Create multiple project hourly rates.
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 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 295 def post_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjecthourlyRatesApi.post_list ...' end # resource path local_var_path = '/project/hourlyRates/list' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['tokenAuthScheme'] 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 => 'ListResponseProjectHourlyRate') if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjecthourlyRatesApi#post_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_with_http_info(opts = {}) ⇒ Array<(ResponseWrapperProjectHourlyRate, Fixnum, Hash)>
Create a project hourly rate.
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 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 247 def post_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjecthourlyRatesApi.post ...' end # resource path local_var_path = '/project/hourlyRates' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['tokenAuthScheme'] 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 => 'ResponseWrapperProjectHourlyRate') if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjecthourlyRatesApi#post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put(id, opts = {}) ⇒ ResponseWrapperProjectHourlyRate
Update a project hourly rate.
334 335 336 337 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 334 def put(id, opts = {}) data, _status_code, _headers = put_with_http_info(id, opts) data end |
#put_list(opts = {}) ⇒ ListResponseProjectHourlyRate
Update multiple project hourly rates.
387 388 389 390 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 387 def put_list(opts = {}) data, _status_code, _headers = put_list_with_http_info(opts) data end |
#put_list_with_http_info(opts = {}) ⇒ Array<(ListResponseProjectHourlyRate, Fixnum, Hash)>
Update multiple project hourly rates.
397 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 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 397 def put_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjecthourlyRatesApi.put_list ...' end # resource path local_var_path = '/project/hourlyRates/list' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['tokenAuthScheme'] 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 => 'ListResponseProjectHourlyRate') if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjecthourlyRatesApi#put_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperProjectHourlyRate, Fixnum, Hash)>
Update a project hourly rate.
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 378 379 380 381 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 345 def put_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjecthourlyRatesApi.put ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ProjecthourlyRatesApi.put" end # resource path local_var_path = '/project/hourlyRates/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['tokenAuthScheme'] 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 => 'ResponseWrapperProjectHourlyRate') if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjecthourlyRatesApi#put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search(opts = {}) ⇒ ListResponseProjectHourlyRate
Find project hourly rates corresponding with sent data.
444 445 446 447 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 444 def search(opts = {}) data, _status_code, _headers = search_with_http_info(opts) data end |
#search_with_http_info(opts = {}) ⇒ Array<(ListResponseProjectHourlyRate, Fixnum, Hash)>
Find project hourly rates corresponding with sent data.
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 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 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 463 def search_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjecthourlyRatesApi.search ...' end if @api_client.config.client_side_validation && opts[:'type'] && !['TYPE_PREDEFINED_HOURLY_RATES', 'TYPE_PROJECT_SPECIFIC_HOURLY_RATES', 'TYPE_FIXED_HOURLY_RATE'].include?(opts[:'type']) fail ArgumentError, 'invalid value for "type", must be one of TYPE_PREDEFINED_HOURLY_RATES, TYPE_PROJECT_SPECIFIC_HOURLY_RATES, TYPE_FIXED_HOURLY_RATE' end # resource path local_var_path = '/project/hourlyRates' # query parameters query_params = {} query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil? query_params[:'projectId'] = opts[:'project_id'] if !opts[:'project_id'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'startDateFrom'] = opts[:'start_date_from'] if !opts[:'start_date_from'].nil? query_params[:'startDateTo'] = opts[:'start_date_to'] if !opts[:'start_date_to'].nil? query_params[:'showInProjectOrder'] = opts[:'show_in_project_order'] if !opts[:'show_in_project_order'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'sorting'] = opts[:'sorting'] if !opts[:'sorting'].nil? query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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 => 'ListResponseProjectHourlyRate') if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjecthourlyRatesApi#search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_or_add_hour_rates(ids, opts = {}) ⇒ ListResponseProjectHourlyRate
Update or add the same project hourly rate from project overview.
513 514 515 516 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 513 def update_or_add_hour_rates(ids, opts = {}) data, _status_code, _headers = update_or_add_hour_rates_with_http_info(ids, opts) data end |
#update_or_add_hour_rates_with_http_info(ids, opts = {}) ⇒ Array<(ListResponseProjectHourlyRate, Fixnum, Hash)>
Update or add the same project hourly rate from project overview.
524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 |
# File 'lib/tripletex_ruby_client/api/projecthourly_rates_api.rb', line 524 def update_or_add_hour_rates_with_http_info(ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjecthourlyRatesApi.update_or_add_hour_rates ...' end # verify the required parameter 'ids' is set if @api_client.config.client_side_validation && ids.nil? fail ArgumentError, "Missing the required parameter 'ids' when calling ProjecthourlyRatesApi.update_or_add_hour_rates" end # resource path local_var_path = '/project/hourlyRates/updateOrAddHourRates' # query parameters query_params = {} query_params[:'ids'] = ids # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['tokenAuthScheme'] 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 => 'ListResponseProjectHourlyRate') if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjecthourlyRatesApi#update_or_add_hour_rates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |