Class: TripletexRubyClient::ProjectperiodApi

Inherits:
Object
  • Object
show all
Defined in:
lib/tripletex_ruby_client/api/projectperiod_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ProjectperiodApi

Returns a new instance of ProjectperiodApi.



19
20
21
# File 'lib/tripletex_ruby_client/api/projectperiod_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/tripletex_ruby_client/api/projectperiod_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_budget_status(id, opts = {}) ⇒ ResponseWrapperProjectBudgetStatus

Get the budget status for the project period

Parameters:

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (String)

    Fields filter pattern

Returns:



28
29
30
31
# File 'lib/tripletex_ruby_client/api/projectperiod_api.rb', line 28

def get_budget_status(id, opts = {})
  data, _status_code, _headers = get_budget_status_with_http_info(id, opts)
  data
end

#get_budget_status_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperProjectBudgetStatus, Fixnum, Hash)>

Get the budget status for the project period

Parameters:

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (String)

    Fields filter pattern

Returns:



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
# File 'lib/tripletex_ruby_client/api/projectperiod_api.rb', line 39

def get_budget_status_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectperiodApi.get_budget_status ...'
  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 ProjectperiodApi.get_budget_status"
  end
  # resource path
  local_var_path = '/project/{id}/period/budgetStatus'.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 => 'ResponseWrapperProjectBudgetStatus')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectperiodApi#get_budget_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#hourlist_report(date_from, date_to, id, opts = {}) ⇒ ResponseWrapperProjectPeriodHourlyReport

Find hourlist report by project period.

Parameters:

  • date_from

    Format is yyyy-MM-dd (from and incl.).

  • date_to

    Format is yyyy-MM-dd (to and excl.).

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (String)

    Fields filter pattern

Returns:



83
84
85
86
# File 'lib/tripletex_ruby_client/api/projectperiod_api.rb', line 83

def hourlist_report(date_from, date_to, id, opts = {})
  data, _status_code, _headers = hourlist_report_with_http_info(date_from, date_to, id, opts)
  data
end

#hourlist_report_with_http_info(date_from, date_to, id, opts = {}) ⇒ Array<(ResponseWrapperProjectPeriodHourlyReport, Fixnum, Hash)>

Find hourlist report by project period.

Parameters:

  • date_from

    Format is yyyy-MM-dd (from and incl.).

  • date_to

    Format is yyyy-MM-dd (to and excl.).

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (String)

    Fields filter pattern

Returns:



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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/tripletex_ruby_client/api/projectperiod_api.rb', line 96

def hourlist_report_with_http_info(date_from, date_to, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectperiodApi.hourlist_report ...'
  end
  # verify the required parameter 'date_from' is set
  if @api_client.config.client_side_validation && date_from.nil?
    fail ArgumentError, "Missing the required parameter 'date_from' when calling ProjectperiodApi.hourlist_report"
  end
  # verify the required parameter 'date_to' is set
  if @api_client.config.client_side_validation && date_to.nil?
    fail ArgumentError, "Missing the required parameter 'date_to' when calling ProjectperiodApi.hourlist_report"
  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 ProjectperiodApi.hourlist_report"
  end
  # resource path
  local_var_path = '/project/{id}/period/hourlistReport'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}
  query_params[:'dateFrom'] = date_from
  query_params[:'dateTo'] = date_to
  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 => 'ResponseWrapperProjectPeriodHourlyReport')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectperiodApi#hourlist_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#invoiced(date_from, date_to, id, opts = {}) ⇒ ResponseWrapperProjectPeriodInvoiced

Find invoiced info by project period.

Parameters:

  • date_from

    Format is yyyy-MM-dd (from and incl.).

  • date_to

    Format is yyyy-MM-dd (to and excl.).

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (String)

    Fields filter pattern

Returns:



150
151
152
153
# File 'lib/tripletex_ruby_client/api/projectperiod_api.rb', line 150

def invoiced(date_from, date_to, id, opts = {})
  data, _status_code, _headers = invoiced_with_http_info(date_from, date_to, id, opts)
  data
end

#invoiced_with_http_info(date_from, date_to, id, opts = {}) ⇒ Array<(ResponseWrapperProjectPeriodInvoiced, Fixnum, Hash)>

Find invoiced info by project period.

Parameters:

  • date_from

    Format is yyyy-MM-dd (from and incl.).

  • date_to

    Format is yyyy-MM-dd (to and excl.).

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (String)

    Fields filter pattern

Returns:



163
164
165
166
167
168
169
170
171
172
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
# File 'lib/tripletex_ruby_client/api/projectperiod_api.rb', line 163

def invoiced_with_http_info(date_from, date_to, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectperiodApi.invoiced ...'
  end
  # verify the required parameter 'date_from' is set
  if @api_client.config.client_side_validation && date_from.nil?
    fail ArgumentError, "Missing the required parameter 'date_from' when calling ProjectperiodApi.invoiced"
  end
  # verify the required parameter 'date_to' is set
  if @api_client.config.client_side_validation && date_to.nil?
    fail ArgumentError, "Missing the required parameter 'date_to' when calling ProjectperiodApi.invoiced"
  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 ProjectperiodApi.invoiced"
  end
  # resource path
  local_var_path = '/project/{id}/period/invoiced'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}
  query_params[:'dateFrom'] = date_from
  query_params[:'dateTo'] = date_to
  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 => 'ResponseWrapperProjectPeriodInvoiced')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectperiodApi#invoiced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#invoicing_reserve(date_from, date_to, id, opts = {}) ⇒ ResponseWrapperProjectPeriodInvoicingReserve

Find invoicing reserve by project period.

Parameters:

  • date_from

    Format is yyyy-MM-dd (from and incl.).

  • date_to

    Format is yyyy-MM-dd (to and excl.).

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (String)

    Fields filter pattern

Returns:



217
218
219
220
# File 'lib/tripletex_ruby_client/api/projectperiod_api.rb', line 217

def invoicing_reserve(date_from, date_to, id, opts = {})
  data, _status_code, _headers = invoicing_reserve_with_http_info(date_from, date_to, id, opts)
  data
end

#invoicing_reserve_with_http_info(date_from, date_to, id, opts = {}) ⇒ Array<(ResponseWrapperProjectPeriodInvoicingReserve, Fixnum, Hash)>

Find invoicing reserve by project period.

Parameters:

  • date_from

    Format is yyyy-MM-dd (from and incl.).

  • date_to

    Format is yyyy-MM-dd (to and excl.).

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (String)

    Fields filter pattern

Returns:



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
266
267
268
269
270
271
272
273
274
275
# File 'lib/tripletex_ruby_client/api/projectperiod_api.rb', line 230

def invoicing_reserve_with_http_info(date_from, date_to, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectperiodApi.invoicing_reserve ...'
  end
  # verify the required parameter 'date_from' is set
  if @api_client.config.client_side_validation && date_from.nil?
    fail ArgumentError, "Missing the required parameter 'date_from' when calling ProjectperiodApi.invoicing_reserve"
  end
  # verify the required parameter 'date_to' is set
  if @api_client.config.client_side_validation && date_to.nil?
    fail ArgumentError, "Missing the required parameter 'date_to' when calling ProjectperiodApi.invoicing_reserve"
  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 ProjectperiodApi.invoicing_reserve"
  end
  # resource path
  local_var_path = '/project/{id}/period/invoicingReserve'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}
  query_params[:'dateFrom'] = date_from
  query_params[:'dateTo'] = date_to
  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 => 'ResponseWrapperProjectPeriodInvoicingReserve')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectperiodApi#invoicing_reserve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#monthly_status(date_from, date_to, id, opts = {}) ⇒ ListResponseProjectPeriodMonthlyStatus

Find overall status by project period.

Parameters:

  • date_from

    Format is yyyy-MM-dd (from and incl.).

  • date_to

    Format is yyyy-MM-dd (to and excl.).

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (Integer)

    From index (default to 0)

  • :count (Integer)

    Number of elements to return (default to 1000)

  • :sorting (String)

    Sorting pattern

  • :fields (String)

    Fields filter pattern

Returns:



287
288
289
290
# File 'lib/tripletex_ruby_client/api/projectperiod_api.rb', line 287

def monthly_status(date_from, date_to, id, opts = {})
  data, _status_code, _headers = monthly_status_with_http_info(date_from, date_to, id, opts)
  data
end

#monthly_status_with_http_info(date_from, date_to, id, opts = {}) ⇒ Array<(ListResponseProjectPeriodMonthlyStatus, Fixnum, Hash)>

Find overall status by project period.

Parameters:

  • date_from

    Format is yyyy-MM-dd (from and incl.).

  • date_to

    Format is yyyy-MM-dd (to and excl.).

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (Integer)

    From index

  • :count (Integer)

    Number of elements to return

  • :sorting (String)

    Sorting pattern

  • :fields (String)

    Fields filter pattern

Returns:



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
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
# File 'lib/tripletex_ruby_client/api/projectperiod_api.rb', line 303

def monthly_status_with_http_info(date_from, date_to, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectperiodApi.monthly_status ...'
  end
  # verify the required parameter 'date_from' is set
  if @api_client.config.client_side_validation && date_from.nil?
    fail ArgumentError, "Missing the required parameter 'date_from' when calling ProjectperiodApi.monthly_status"
  end
  # verify the required parameter 'date_to' is set
  if @api_client.config.client_side_validation && date_to.nil?
    fail ArgumentError, "Missing the required parameter 'date_to' when calling ProjectperiodApi.monthly_status"
  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 ProjectperiodApi.monthly_status"
  end
  # resource path
  local_var_path = '/project/{id}/period/monthlyStatus'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}
  query_params[:'dateFrom'] = date_from
  query_params[:'dateTo'] = date_to
  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 => 'ListResponseProjectPeriodMonthlyStatus')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectperiodApi#monthly_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#overall_status(date_from, date_to, id, opts = {}) ⇒ ResponseWrapperProjectPeriodOverallStatus

Find overall status by project period.

Parameters:

  • date_from

    Format is yyyy-MM-dd (from and incl.).

  • date_to

    Format is yyyy-MM-dd (to and excl.).

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (String)

    Fields filter pattern

Returns:



360
361
362
363
# File 'lib/tripletex_ruby_client/api/projectperiod_api.rb', line 360

def overall_status(date_from, date_to, id, opts = {})
  data, _status_code, _headers = overall_status_with_http_info(date_from, date_to, id, opts)
  data
end

#overall_status_with_http_info(date_from, date_to, id, opts = {}) ⇒ Array<(ResponseWrapperProjectPeriodOverallStatus, Fixnum, Hash)>

Find overall status by project period.

Parameters:

  • date_from

    Format is yyyy-MM-dd (from and incl.).

  • date_to

    Format is yyyy-MM-dd (to and excl.).

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (String)

    Fields filter pattern

Returns:



373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'lib/tripletex_ruby_client/api/projectperiod_api.rb', line 373

def overall_status_with_http_info(date_from, date_to, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectperiodApi.overall_status ...'
  end
  # verify the required parameter 'date_from' is set
  if @api_client.config.client_side_validation && date_from.nil?
    fail ArgumentError, "Missing the required parameter 'date_from' when calling ProjectperiodApi.overall_status"
  end
  # verify the required parameter 'date_to' is set
  if @api_client.config.client_side_validation && date_to.nil?
    fail ArgumentError, "Missing the required parameter 'date_to' when calling ProjectperiodApi.overall_status"
  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 ProjectperiodApi.overall_status"
  end
  # resource path
  local_var_path = '/project/{id}/period/overallStatus'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}
  query_params[:'dateFrom'] = date_from
  query_params[:'dateTo'] = date_to
  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 => 'ResponseWrapperProjectPeriodOverallStatus')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectperiodApi#overall_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end