quake_timesheets_client 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -21
  3. data/build.sh +1 -1
  4. data/docs/ApprovalTypesApi.md +36 -38
  5. data/docs/ApprovalsApi.md +36 -40
  6. data/docs/CreateApprovalTypesInput.md +22 -0
  7. data/docs/CreateApprovalsInput.md +24 -0
  8. data/docs/CreateDatasetsInput.md +18 -0
  9. data/docs/CreateEntriesInput.md +28 -0
  10. data/docs/CreatePeopleInput.md +20 -0
  11. data/docs/DatasetsApi.md +51 -49
  12. data/docs/EntriesApi.md +52 -72
  13. data/docs/PeopleApi.md +36 -36
  14. data/docs/UpdateEntriesInput.md +28 -0
  15. data/lib/quake_timesheets_client.rb +7 -1
  16. data/lib/quake_timesheets_client/api/approval_types_api.rb +33 -52
  17. data/lib/quake_timesheets_client/api/approvals_api.rb +34 -65
  18. data/lib/quake_timesheets_client/api/datasets_api.rb +45 -50
  19. data/lib/quake_timesheets_client/api/entries_api.rb +53 -93
  20. data/lib/quake_timesheets_client/api/people_api.rb +33 -45
  21. data/lib/quake_timesheets_client/api_client.rb +1 -1
  22. data/lib/quake_timesheets_client/api_error.rb +1 -1
  23. data/lib/quake_timesheets_client/configuration.rb +1 -1
  24. data/lib/quake_timesheets_client/models/approval.rb +1 -1
  25. data/lib/quake_timesheets_client/models/approval_type.rb +1 -1
  26. data/lib/quake_timesheets_client/models/create_approval_types_input.rb +254 -0
  27. data/lib/quake_timesheets_client/models/create_approvals_input.rb +304 -0
  28. data/lib/quake_timesheets_client/models/create_datasets_input.rb +224 -0
  29. data/lib/quake_timesheets_client/models/create_entries_input.rb +301 -0
  30. data/lib/quake_timesheets_client/models/create_people_input.rb +239 -0
  31. data/lib/quake_timesheets_client/models/dataset.rb +1 -1
  32. data/lib/quake_timesheets_client/models/entry.rb +1 -1
  33. data/lib/quake_timesheets_client/models/person.rb +1 -1
  34. data/lib/quake_timesheets_client/models/update_entries_input.rb +301 -0
  35. data/lib/quake_timesheets_client/version.rb +2 -2
  36. data/quake_timesheets_client.gemspec +1 -1
  37. data/ruby.config.yaml +1 -1
  38. data/spec/api_client_spec.rb +1 -1
  39. data/spec/configuration_spec.rb +1 -1
  40. data/spec/models/create_approval_types_input_spec.rb +46 -0
  41. data/spec/models/create_approvals_input_spec.rb +56 -0
  42. data/spec/models/create_datasets_input_spec.rb +34 -0
  43. data/spec/models/create_entries_input_spec.rb +68 -0
  44. data/spec/models/create_people_input_spec.rb +40 -0
  45. data/spec/models/update_entries_input_spec.rb +68 -0
  46. data/spec/spec_helper.rb +1 -1
  47. metadata +26 -2
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #TimesheetsApi (params in:formData)
2
+ #TimesheetsApi (params in:body)
3
3
 
4
4
  # <p>Another API description</p>
5
5
 
@@ -19,20 +19,22 @@ module Quake::Timesheets
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # List all available datasets
22
+ # Create a new Dataset record
23
23
  # @param [Hash] opts the optional parameters
24
- # @return [Array<Dataset>]
25
- def get_api_v1_datasets(opts = {})
26
- data, _status_code, _headers = get_api_v1_datasets_with_http_info(opts)
24
+ # @option opts [CreateDatasetsInput] :create_datasets_input
25
+ # @return [Dataset]
26
+ def create_datasets(opts = {})
27
+ data, _status_code, _headers = create_datasets_with_http_info(opts)
27
28
  data
28
29
  end
29
30
 
30
- # List all available datasets
31
+ # Create a new Dataset record
31
32
  # @param [Hash] opts the optional parameters
32
- # @return [Array<(Array<Dataset>, Integer, Hash)>] Array<Dataset> data, response status code and response headers
33
- def get_api_v1_datasets_with_http_info(opts = {})
33
+ # @option opts [CreateDatasetsInput] :create_datasets_input
34
+ # @return [Array<(Dataset, Integer, Hash)>] Dataset data, response status code and response headers
35
+ def create_datasets_with_http_info(opts = {})
34
36
  if @api_client.config.debugging
35
- @api_client.config.logger.debug 'Calling API: DatasetsApi.get_api_v1_datasets ...'
37
+ @api_client.config.logger.debug 'Calling API: DatasetsApi.create_datasets ...'
36
38
  end
37
39
  # resource path
38
40
  local_var_path = '/api/v1/datasets'
@@ -44,21 +46,23 @@ module Quake::Timesheets
44
46
  header_params = opts[:header_params] || {}
45
47
  # HTTP header 'Accept' (if needed)
46
48
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
49
+ # HTTP header 'Content-Type'
50
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
47
51
 
48
52
  # form parameters
49
53
  form_params = opts[:form_params] || {}
50
54
 
51
55
  # http body (model)
52
- post_body = opts[:debug_body]
56
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_datasets_input'])
53
57
 
54
58
  # return_type
55
- return_type = opts[:debug_return_type] || 'Array<Dataset>'
59
+ return_type = opts[:debug_return_type] || 'Dataset'
56
60
 
57
61
  # auth_names
58
62
  auth_names = opts[:debug_auth_names] || ['authToken']
59
63
 
60
64
  new_options = opts.merge(
61
- :operation => :"DatasetsApi.get_api_v1_datasets",
65
+ :operation => :"DatasetsApi.create_datasets",
62
66
  :header_params => header_params,
63
67
  :query_params => query_params,
64
68
  :form_params => form_params,
@@ -67,36 +71,30 @@ module Quake::Timesheets
67
71
  :return_type => return_type
68
72
  )
69
73
 
70
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
74
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
71
75
  if @api_client.config.debugging
72
- @api_client.config.logger.debug "API called: DatasetsApi#get_api_v1_datasets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
76
+ @api_client.config.logger.debug "API called: DatasetsApi#create_datasets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
77
  end
74
78
  return data, status_code, headers
75
79
  end
76
80
 
77
- # Show details about a specific dataset
78
- # @param id [String] ID of the dataset
81
+ # List all available datasets
79
82
  # @param [Hash] opts the optional parameters
80
- # @return [Dataset]
81
- def get_api_v1_datasets_id(id, opts = {})
82
- data, _status_code, _headers = get_api_v1_datasets_id_with_http_info(id, opts)
83
+ # @return [Array<Dataset>]
84
+ def index_datasets(opts = {})
85
+ data, _status_code, _headers = index_datasets_with_http_info(opts)
83
86
  data
84
87
  end
85
88
 
86
- # Show details about a specific dataset
87
- # @param id [String] ID of the dataset
89
+ # List all available datasets
88
90
  # @param [Hash] opts the optional parameters
89
- # @return [Array<(Dataset, Integer, Hash)>] Dataset data, response status code and response headers
90
- def get_api_v1_datasets_id_with_http_info(id, opts = {})
91
+ # @return [Array<(Array<Dataset>, Integer, Hash)>] Array<Dataset> data, response status code and response headers
92
+ def index_datasets_with_http_info(opts = {})
91
93
  if @api_client.config.debugging
92
- @api_client.config.logger.debug 'Calling API: DatasetsApi.get_api_v1_datasets_id ...'
93
- end
94
- # verify the required parameter 'id' is set
95
- if @api_client.config.client_side_validation && id.nil?
96
- fail ArgumentError, "Missing the required parameter 'id' when calling DatasetsApi.get_api_v1_datasets_id"
94
+ @api_client.config.logger.debug 'Calling API: DatasetsApi.index_datasets ...'
97
95
  end
98
96
  # resource path
99
- local_var_path = '/api/v1/datasets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
97
+ local_var_path = '/api/v1/datasets'
100
98
 
101
99
  # query parameters
102
100
  query_params = opts[:query_params] || {}
@@ -113,13 +111,13 @@ module Quake::Timesheets
113
111
  post_body = opts[:debug_body]
114
112
 
115
113
  # return_type
116
- return_type = opts[:debug_return_type] || 'Dataset'
114
+ return_type = opts[:debug_return_type] || 'Array<Dataset>'
117
115
 
118
116
  # auth_names
119
117
  auth_names = opts[:debug_auth_names] || ['authToken']
120
118
 
121
119
  new_options = opts.merge(
122
- :operation => :"DatasetsApi.get_api_v1_datasets_id",
120
+ :operation => :"DatasetsApi.index_datasets",
123
121
  :header_params => header_params,
124
122
  :query_params => query_params,
125
123
  :form_params => form_params,
@@ -130,34 +128,34 @@ module Quake::Timesheets
130
128
 
131
129
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
132
130
  if @api_client.config.debugging
133
- @api_client.config.logger.debug "API called: DatasetsApi#get_api_v1_datasets_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
131
+ @api_client.config.logger.debug "API called: DatasetsApi#index_datasets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
134
132
  end
135
133
  return data, status_code, headers
136
134
  end
137
135
 
138
- # Create a new Dataset record
139
- # @param name [String] Name for the Dataset object
136
+ # Show details about a specific dataset
137
+ # @param id [String] ID of the dataset
140
138
  # @param [Hash] opts the optional parameters
141
139
  # @return [Dataset]
142
- def post_api_v1_datasets(name, opts = {})
143
- data, _status_code, _headers = post_api_v1_datasets_with_http_info(name, opts)
140
+ def show_datasets(id, opts = {})
141
+ data, _status_code, _headers = show_datasets_with_http_info(id, opts)
144
142
  data
145
143
  end
146
144
 
147
- # Create a new Dataset record
148
- # @param name [String] Name for the Dataset object
145
+ # Show details about a specific dataset
146
+ # @param id [String] ID of the dataset
149
147
  # @param [Hash] opts the optional parameters
150
148
  # @return [Array<(Dataset, Integer, Hash)>] Dataset data, response status code and response headers
151
- def post_api_v1_datasets_with_http_info(name, opts = {})
149
+ def show_datasets_with_http_info(id, opts = {})
152
150
  if @api_client.config.debugging
153
- @api_client.config.logger.debug 'Calling API: DatasetsApi.post_api_v1_datasets ...'
151
+ @api_client.config.logger.debug 'Calling API: DatasetsApi.show_datasets ...'
154
152
  end
155
- # verify the required parameter 'name' is set
156
- if @api_client.config.client_side_validation && name.nil?
157
- fail ArgumentError, "Missing the required parameter 'name' when calling DatasetsApi.post_api_v1_datasets"
153
+ # verify the required parameter 'id' is set
154
+ if @api_client.config.client_side_validation && id.nil?
155
+ fail ArgumentError, "Missing the required parameter 'id' when calling DatasetsApi.show_datasets"
158
156
  end
159
157
  # resource path
160
- local_var_path = '/api/v1/datasets'
158
+ local_var_path = '/api/v1/datasets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
161
159
 
162
160
  # query parameters
163
161
  query_params = opts[:query_params] || {}
@@ -166,12 +164,9 @@ module Quake::Timesheets
166
164
  header_params = opts[:header_params] || {}
167
165
  # HTTP header 'Accept' (if needed)
168
166
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
169
- # HTTP header 'Content-Type'
170
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded', 'multipart/form-data'])
171
167
 
172
168
  # form parameters
173
169
  form_params = opts[:form_params] || {}
174
- form_params['name'] = name
175
170
 
176
171
  # http body (model)
177
172
  post_body = opts[:debug_body]
@@ -183,7 +178,7 @@ module Quake::Timesheets
183
178
  auth_names = opts[:debug_auth_names] || ['authToken']
184
179
 
185
180
  new_options = opts.merge(
186
- :operation => :"DatasetsApi.post_api_v1_datasets",
181
+ :operation => :"DatasetsApi.show_datasets",
187
182
  :header_params => header_params,
188
183
  :query_params => query_params,
189
184
  :form_params => form_params,
@@ -192,9 +187,9 @@ module Quake::Timesheets
192
187
  :return_type => return_type
193
188
  )
194
189
 
195
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
190
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
196
191
  if @api_client.config.debugging
197
- @api_client.config.logger.debug "API called: DatasetsApi#post_api_v1_datasets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
192
+ @api_client.config.logger.debug "API called: DatasetsApi#show_datasets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
198
193
  end
199
194
  return data, status_code, headers
200
195
  end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #TimesheetsApi (params in:formData)
2
+ #TimesheetsApi (params in:body)
3
3
 
4
4
  # <p>Another API description</p>
5
5
 
@@ -19,58 +19,50 @@ module Quake::Timesheets
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Search for entries matching filters
22
+ # Create a new Entry
23
23
  # @param [Hash] opts the optional parameters
24
- # @option opts [String] :dataset_id Filter to the entries belonging to one of the identified datasets
25
- # @option opts [String] :person_id Filter to the entries belonging to one of the identified people
26
- # @option opts [String] :from_date Return only entries after this DateTime (inclusive)
27
- # @option opts [String] :to_date Return only entries before this DateTime (inclusive)
28
- # @return [Array<Entry>]
29
- def get_api_v1_entries(opts = {})
30
- data, _status_code, _headers = get_api_v1_entries_with_http_info(opts)
24
+ # @option opts [CreateEntriesInput] :create_entries_input
25
+ # @return [Entry]
26
+ def create_entries(opts = {})
27
+ data, _status_code, _headers = create_entries_with_http_info(opts)
31
28
  data
32
29
  end
33
30
 
34
- # Search for entries matching filters
31
+ # Create a new Entry
35
32
  # @param [Hash] opts the optional parameters
36
- # @option opts [String] :dataset_id Filter to the entries belonging to one of the identified datasets
37
- # @option opts [String] :person_id Filter to the entries belonging to one of the identified people
38
- # @option opts [String] :from_date Return only entries after this DateTime (inclusive)
39
- # @option opts [String] :to_date Return only entries before this DateTime (inclusive)
40
- # @return [Array<(Array<Entry>, Integer, Hash)>] Array<Entry> data, response status code and response headers
41
- def get_api_v1_entries_with_http_info(opts = {})
33
+ # @option opts [CreateEntriesInput] :create_entries_input
34
+ # @return [Array<(Entry, Integer, Hash)>] Entry data, response status code and response headers
35
+ def create_entries_with_http_info(opts = {})
42
36
  if @api_client.config.debugging
43
- @api_client.config.logger.debug 'Calling API: EntriesApi.get_api_v1_entries ...'
37
+ @api_client.config.logger.debug 'Calling API: EntriesApi.create_entries ...'
44
38
  end
45
39
  # resource path
46
40
  local_var_path = '/api/v1/entries'
47
41
 
48
42
  # query parameters
49
43
  query_params = opts[:query_params] || {}
50
- query_params[:'dataset_id'] = opts[:'dataset_id'] if !opts[:'dataset_id'].nil?
51
- query_params[:'person_id'] = opts[:'person_id'] if !opts[:'person_id'].nil?
52
- query_params[:'from_date'] = opts[:'from_date'] if !opts[:'from_date'].nil?
53
- query_params[:'to_date'] = opts[:'to_date'] if !opts[:'to_date'].nil?
54
44
 
55
45
  # header parameters
56
46
  header_params = opts[:header_params] || {}
57
47
  # HTTP header 'Accept' (if needed)
58
48
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
49
+ # HTTP header 'Content-Type'
50
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
59
51
 
60
52
  # form parameters
61
53
  form_params = opts[:form_params] || {}
62
54
 
63
55
  # http body (model)
64
- post_body = opts[:debug_body]
56
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_entries_input'])
65
57
 
66
58
  # return_type
67
- return_type = opts[:debug_return_type] || 'Array<Entry>'
59
+ return_type = opts[:debug_return_type] || 'Entry'
68
60
 
69
61
  # auth_names
70
62
  auth_names = opts[:debug_auth_names] || ['authToken']
71
63
 
72
64
  new_options = opts.merge(
73
- :operation => :"EntriesApi.get_api_v1_entries",
65
+ :operation => :"EntriesApi.create_entries",
74
66
  :header_params => header_params,
75
67
  :query_params => query_params,
76
68
  :form_params => form_params,
@@ -79,77 +71,65 @@ module Quake::Timesheets
79
71
  :return_type => return_type
80
72
  )
81
73
 
82
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
74
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
83
75
  if @api_client.config.debugging
84
- @api_client.config.logger.debug "API called: EntriesApi#get_api_v1_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
76
+ @api_client.config.logger.debug "API called: EntriesApi#create_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
77
  end
86
78
  return data, status_code, headers
87
79
  end
88
80
 
89
- # Create a new Entry
81
+ # Search for entries matching filters
90
82
  # @param [Hash] opts the optional parameters
91
- # @option opts [String] :person_id ID of the person to which this entry pertains
92
- # @option opts [String] :start_at Time period at which this entry starts
93
- # @option opts [String] :end_at Time period at which this entry ends
94
- # @option opts [Float] :quantity
95
- # @option opts [String] :unit
96
- # @option opts [String] :external_reference Unique identifier of the activity this Entry relates to
97
- # @return [Entry]
98
- def post_api_v1_entries(opts = {})
99
- data, _status_code, _headers = post_api_v1_entries_with_http_info(opts)
83
+ # @option opts [String] :dataset_id Filter to the entries belonging to one of the identified datasets
84
+ # @option opts [String] :person_id Filter to the entries belonging to one of the identified people
85
+ # @option opts [String] :from_date Return only entries after this DateTime (inclusive)
86
+ # @option opts [String] :to_date Return only entries before this DateTime (inclusive)
87
+ # @return [Array<Entry>]
88
+ def index_entries(opts = {})
89
+ data, _status_code, _headers = index_entries_with_http_info(opts)
100
90
  data
101
91
  end
102
92
 
103
- # Create a new Entry
93
+ # Search for entries matching filters
104
94
  # @param [Hash] opts the optional parameters
105
- # @option opts [String] :person_id ID of the person to which this entry pertains
106
- # @option opts [String] :start_at Time period at which this entry starts
107
- # @option opts [String] :end_at Time period at which this entry ends
108
- # @option opts [Float] :quantity
109
- # @option opts [String] :unit
110
- # @option opts [String] :external_reference Unique identifier of the activity this Entry relates to
111
- # @return [Array<(Entry, Integer, Hash)>] Entry data, response status code and response headers
112
- def post_api_v1_entries_with_http_info(opts = {})
95
+ # @option opts [String] :dataset_id Filter to the entries belonging to one of the identified datasets
96
+ # @option opts [String] :person_id Filter to the entries belonging to one of the identified people
97
+ # @option opts [String] :from_date Return only entries after this DateTime (inclusive)
98
+ # @option opts [String] :to_date Return only entries before this DateTime (inclusive)
99
+ # @return [Array<(Array<Entry>, Integer, Hash)>] Array<Entry> data, response status code and response headers
100
+ def index_entries_with_http_info(opts = {})
113
101
  if @api_client.config.debugging
114
- @api_client.config.logger.debug 'Calling API: EntriesApi.post_api_v1_entries ...'
115
- end
116
- allowable_values = ["hour", "day", "week", "month", "other"]
117
- if @api_client.config.client_side_validation && opts[:'unit'] && !allowable_values.include?(opts[:'unit'])
118
- fail ArgumentError, "invalid value for \"unit\", must be one of #{allowable_values}"
102
+ @api_client.config.logger.debug 'Calling API: EntriesApi.index_entries ...'
119
103
  end
120
104
  # resource path
121
105
  local_var_path = '/api/v1/entries'
122
106
 
123
107
  # query parameters
124
108
  query_params = opts[:query_params] || {}
109
+ query_params[:'dataset_id'] = opts[:'dataset_id'] if !opts[:'dataset_id'].nil?
110
+ query_params[:'person_id'] = opts[:'person_id'] if !opts[:'person_id'].nil?
111
+ query_params[:'from_date'] = opts[:'from_date'] if !opts[:'from_date'].nil?
112
+ query_params[:'to_date'] = opts[:'to_date'] if !opts[:'to_date'].nil?
125
113
 
126
114
  # header parameters
127
115
  header_params = opts[:header_params] || {}
128
116
  # HTTP header 'Accept' (if needed)
129
117
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
130
- # HTTP header 'Content-Type'
131
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded', 'multipart/form-data'])
132
118
 
133
119
  # form parameters
134
120
  form_params = opts[:form_params] || {}
135
- form_params['person_id'] = opts[:'person_id'] if !opts[:'person_id'].nil?
136
- form_params['start_at'] = opts[:'start_at'] if !opts[:'start_at'].nil?
137
- form_params['end_at'] = opts[:'end_at'] if !opts[:'end_at'].nil?
138
- form_params['quantity'] = opts[:'quantity'] if !opts[:'quantity'].nil?
139
- form_params['unit'] = opts[:'unit'] if !opts[:'unit'].nil?
140
- form_params['external_reference'] = opts[:'external_reference'] if !opts[:'external_reference'].nil?
141
121
 
142
122
  # http body (model)
143
123
  post_body = opts[:debug_body]
144
124
 
145
125
  # return_type
146
- return_type = opts[:debug_return_type] || 'Entry'
126
+ return_type = opts[:debug_return_type] || 'Array<Entry>'
147
127
 
148
128
  # auth_names
149
129
  auth_names = opts[:debug_auth_names] || ['authToken']
150
130
 
151
131
  new_options = opts.merge(
152
- :operation => :"EntriesApi.post_api_v1_entries",
132
+ :operation => :"EntriesApi.index_entries",
153
133
  :header_params => header_params,
154
134
  :query_params => query_params,
155
135
  :form_params => form_params,
@@ -158,9 +138,9 @@ module Quake::Timesheets
158
138
  :return_type => return_type
159
139
  )
160
140
 
161
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
141
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
162
142
  if @api_client.config.debugging
163
- @api_client.config.logger.debug "API called: EntriesApi#post_api_v1_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
143
+ @api_client.config.logger.debug "API called: EntriesApi#index_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
164
144
  end
165
145
  return data, status_code, headers
166
146
  end
@@ -168,39 +148,25 @@ module Quake::Timesheets
168
148
  # Update an existing Entry
169
149
  # @param id [String] The ID for the Entry
170
150
  # @param [Hash] opts the optional parameters
171
- # @option opts [String] :person_id ID of the person to which this entry pertains
172
- # @option opts [String] :start_at Time period at which this entry starts
173
- # @option opts [String] :end_at Time period at which this entry ends
174
- # @option opts [Float] :quantity
175
- # @option opts [String] :unit
176
- # @option opts [String] :external_reference Unique identifier of the activity this Entry relates to
151
+ # @option opts [UpdateEntriesInput] :update_entries_input
177
152
  # @return [Entry]
178
- def post_api_v1_entries_id(id, opts = {})
179
- data, _status_code, _headers = post_api_v1_entries_id_with_http_info(id, opts)
153
+ def update_entries(id, opts = {})
154
+ data, _status_code, _headers = update_entries_with_http_info(id, opts)
180
155
  data
181
156
  end
182
157
 
183
158
  # Update an existing Entry
184
159
  # @param id [String] The ID for the Entry
185
160
  # @param [Hash] opts the optional parameters
186
- # @option opts [String] :person_id ID of the person to which this entry pertains
187
- # @option opts [String] :start_at Time period at which this entry starts
188
- # @option opts [String] :end_at Time period at which this entry ends
189
- # @option opts [Float] :quantity
190
- # @option opts [String] :unit
191
- # @option opts [String] :external_reference Unique identifier of the activity this Entry relates to
161
+ # @option opts [UpdateEntriesInput] :update_entries_input
192
162
  # @return [Array<(Entry, Integer, Hash)>] Entry data, response status code and response headers
193
- def post_api_v1_entries_id_with_http_info(id, opts = {})
163
+ def update_entries_with_http_info(id, opts = {})
194
164
  if @api_client.config.debugging
195
- @api_client.config.logger.debug 'Calling API: EntriesApi.post_api_v1_entries_id ...'
165
+ @api_client.config.logger.debug 'Calling API: EntriesApi.update_entries ...'
196
166
  end
197
167
  # verify the required parameter 'id' is set
198
168
  if @api_client.config.client_side_validation && id.nil?
199
- fail ArgumentError, "Missing the required parameter 'id' when calling EntriesApi.post_api_v1_entries_id"
200
- end
201
- allowable_values = ["hour", "day", "week", "month", "other"]
202
- if @api_client.config.client_side_validation && opts[:'unit'] && !allowable_values.include?(opts[:'unit'])
203
- fail ArgumentError, "invalid value for \"unit\", must be one of #{allowable_values}"
169
+ fail ArgumentError, "Missing the required parameter 'id' when calling EntriesApi.update_entries"
204
170
  end
205
171
  # resource path
206
172
  local_var_path = '/api/v1/entries/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
@@ -213,19 +179,13 @@ module Quake::Timesheets
213
179
  # HTTP header 'Accept' (if needed)
214
180
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
215
181
  # HTTP header 'Content-Type'
216
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded', 'multipart/form-data'])
182
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
217
183
 
218
184
  # form parameters
219
185
  form_params = opts[:form_params] || {}
220
- form_params['person_id'] = opts[:'person_id'] if !opts[:'person_id'].nil?
221
- form_params['start_at'] = opts[:'start_at'] if !opts[:'start_at'].nil?
222
- form_params['end_at'] = opts[:'end_at'] if !opts[:'end_at'].nil?
223
- form_params['quantity'] = opts[:'quantity'] if !opts[:'quantity'].nil?
224
- form_params['unit'] = opts[:'unit'] if !opts[:'unit'].nil?
225
- form_params['external_reference'] = opts[:'external_reference'] if !opts[:'external_reference'].nil?
226
186
 
227
187
  # http body (model)
228
- post_body = opts[:debug_body]
188
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_entries_input'])
229
189
 
230
190
  # return_type
231
191
  return_type = opts[:debug_return_type] || 'Entry'
@@ -234,7 +194,7 @@ module Quake::Timesheets
234
194
  auth_names = opts[:debug_auth_names] || ['authToken']
235
195
 
236
196
  new_options = opts.merge(
237
- :operation => :"EntriesApi.post_api_v1_entries_id",
197
+ :operation => :"EntriesApi.update_entries",
238
198
  :header_params => header_params,
239
199
  :query_params => query_params,
240
200
  :form_params => form_params,
@@ -245,7 +205,7 @@ module Quake::Timesheets
245
205
 
246
206
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
247
207
  if @api_client.config.debugging
248
- @api_client.config.logger.debug "API called: EntriesApi#post_api_v1_entries_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
208
+ @api_client.config.logger.debug "API called: EntriesApi#update_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
249
209
  end
250
210
  return data, status_code, headers
251
211
  end