Class: ConnectWise::ExpenseReportsApi
- Inherits:
-
Object
- Object
- ConnectWise::ExpenseReportsApi
- Defined in:
- lib/connect_wise/api/expense_reports_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_expense_reports(client_id, opts = {}) ⇒ Array<ExpenseReport>
Get List of ExpenseReport.
-
#get_expense_reports_by_id(id, client_id, opts = {}) ⇒ ExpenseReport
Get ExpenseReport.
-
#get_expense_reports_by_id_with_http_info(id, client_id, opts = {}) ⇒ Array<(ExpenseReport, Integer, Hash)>
Get ExpenseReport.
-
#get_expense_reports_count(client_id, opts = {}) ⇒ Count
Get Count of ExpenseReport.
-
#get_expense_reports_count_with_http_info(client_id, opts = {}) ⇒ Array<(Count, Integer, Hash)>
Get Count of ExpenseReport.
-
#get_expense_reports_with_http_info(client_id, opts = {}) ⇒ Array<(Array<ExpenseReport>, Integer, Hash)>
Get List of ExpenseReport.
-
#initialize(api_client = ApiClient.default) ⇒ ExpenseReportsApi
constructor
A new instance of ExpenseReportsApi.
-
#post_expense_reports_by_id_reverse(id, client_id, opts = {}) ⇒ SuccessResponse
Post SuccessResponse.
-
#post_expense_reports_by_id_reverse_with_http_info(id, client_id, opts = {}) ⇒ Array<(SuccessResponse, Integer, Hash)>
Post SuccessResponse.
-
#post_expense_reports_by_id_submit(id, client_id, opts = {}) ⇒ SuccessResponse
Post SuccessResponse.
-
#post_expense_reports_by_id_submit_with_http_info(id, client_id, opts = {}) ⇒ Array<(SuccessResponse, Integer, Hash)>
Post SuccessResponse.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ExpenseReportsApi
Returns a new instance of ExpenseReportsApi.
17 18 19 |
# File 'lib/connect_wise/api/expense_reports_api.rb', line 17 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
15 16 17 |
# File 'lib/connect_wise/api/expense_reports_api.rb', line 15 def api_client @api_client end |
Instance Method Details
#get_expense_reports(client_id, opts = {}) ⇒ Array<ExpenseReport>
Get List of ExpenseReport
33 34 35 36 |
# File 'lib/connect_wise/api/expense_reports_api.rb', line 33 def get_expense_reports(client_id, opts = {}) data, _status_code, _headers = get_expense_reports_with_http_info(client_id, opts) data end |
#get_expense_reports_by_id(id, client_id, opts = {}) ⇒ ExpenseReport
Get ExpenseReport
115 116 117 118 |
# File 'lib/connect_wise/api/expense_reports_api.rb', line 115 def get_expense_reports_by_id(id, client_id, opts = {}) data, _status_code, _headers = get_expense_reports_by_id_with_http_info(id, client_id, opts) data end |
#get_expense_reports_by_id_with_http_info(id, client_id, opts = {}) ⇒ Array<(ExpenseReport, Integer, Hash)>
Get ExpenseReport
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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/connect_wise/api/expense_reports_api.rb', line 133 def get_expense_reports_by_id_with_http_info(id, client_id, opts = {}) @api_client.config.logger.debug 'Calling API: ExpenseReportsApi.get_expense_reports_by_id ...' if @api_client.config.debugging # verify the required parameter 'id' is set raise ArgumentError, "Missing the required parameter 'id' when calling ExpenseReportsApi.get_expense_reports_by_id" if @api_client.config.client_side_validation && id.nil? # verify the required parameter 'client_id' is set raise ArgumentError, "Missing the required parameter 'client_id' when calling ExpenseReportsApi.get_expense_reports_by_id" if @api_client.config.client_side_validation && client_id.nil? # resource path local_var_path = '/expense/reports/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:conditions] = opts[:conditions] unless opts[:conditions].nil? query_params[:childConditions] = opts[:child_conditions] unless opts[:child_conditions].nil? query_params[:customFieldConditions] = opts[:custom_field_conditions] unless opts[:custom_field_conditions].nil? query_params[:orderBy] = opts[:order_by] unless opts[:order_by].nil? query_params[:fields] = opts[:fields] unless opts[:fields].nil? query_params[:page] = opts[:page] unless opts[:page].nil? query_params[:pageSize] = opts[:page_size] unless opts[:page_size].nil? query_params[:pageId] = opts[:page_id] unless opts[:page_id].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.connectwise.com+json; version=2022.1']) header_params[:clientId] = client_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ExpenseReport' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( operation: :'ExpenseReportsApi.get_expense_reports_by_id', header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) @api_client.config.logger.debug "API called: ExpenseReportsApi#get_expense_reports_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging [data, status_code, headers] end |
#get_expense_reports_count(client_id, opts = {}) ⇒ Count
Get Count of ExpenseReport
199 200 201 202 |
# File 'lib/connect_wise/api/expense_reports_api.rb', line 199 def get_expense_reports_count(client_id, opts = {}) data, _status_code, _headers = get_expense_reports_count_with_http_info(client_id, opts) data end |
#get_expense_reports_count_with_http_info(client_id, opts = {}) ⇒ Array<(Count, Integer, Hash)>
Get Count of ExpenseReport
216 217 218 219 220 221 222 223 224 225 226 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 266 |
# File 'lib/connect_wise/api/expense_reports_api.rb', line 216 def get_expense_reports_count_with_http_info(client_id, opts = {}) @api_client.config.logger.debug 'Calling API: ExpenseReportsApi.get_expense_reports_count ...' if @api_client.config.debugging # verify the required parameter 'client_id' is set raise ArgumentError, "Missing the required parameter 'client_id' when calling ExpenseReportsApi.get_expense_reports_count" if @api_client.config.client_side_validation && client_id.nil? # resource path local_var_path = '/expense/reports/count' # query parameters query_params = opts[:query_params] || {} query_params[:conditions] = opts[:conditions] unless opts[:conditions].nil? query_params[:childConditions] = opts[:child_conditions] unless opts[:child_conditions].nil? query_params[:customFieldConditions] = opts[:custom_field_conditions] unless opts[:custom_field_conditions].nil? query_params[:orderBy] = opts[:order_by] unless opts[:order_by].nil? query_params[:fields] = opts[:fields] unless opts[:fields].nil? query_params[:page] = opts[:page] unless opts[:page].nil? query_params[:pageSize] = opts[:page_size] unless opts[:page_size].nil? query_params[:pageId] = opts[:page_id] unless opts[:page_id].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.connectwise.com+json; version=2022.1']) header_params[:clientId] = client_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Count' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( operation: :'ExpenseReportsApi.get_expense_reports_count', header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) @api_client.config.logger.debug "API called: ExpenseReportsApi#get_expense_reports_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging [data, status_code, headers] end |
#get_expense_reports_with_http_info(client_id, opts = {}) ⇒ Array<(Array<ExpenseReport>, Integer, Hash)>
Get List of ExpenseReport
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 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 |
# File 'lib/connect_wise/api/expense_reports_api.rb', line 50 def get_expense_reports_with_http_info(client_id, opts = {}) @api_client.config.logger.debug 'Calling API: ExpenseReportsApi.get_expense_reports ...' if @api_client.config.debugging # verify the required parameter 'client_id' is set raise ArgumentError, "Missing the required parameter 'client_id' when calling ExpenseReportsApi.get_expense_reports" if @api_client.config.client_side_validation && client_id.nil? # resource path local_var_path = '/expense/reports' # query parameters query_params = opts[:query_params] || {} query_params[:conditions] = opts[:conditions] unless opts[:conditions].nil? query_params[:childConditions] = opts[:child_conditions] unless opts[:child_conditions].nil? query_params[:customFieldConditions] = opts[:custom_field_conditions] unless opts[:custom_field_conditions].nil? query_params[:orderBy] = opts[:order_by] unless opts[:order_by].nil? query_params[:fields] = opts[:fields] unless opts[:fields].nil? query_params[:page] = opts[:page] unless opts[:page].nil? query_params[:pageSize] = opts[:page_size] unless opts[:page_size].nil? query_params[:pageId] = opts[:page_id] unless opts[:page_id].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.connectwise.com+json; version=2022.1']) header_params[:clientId] = client_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ExpenseReport>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( operation: :'ExpenseReportsApi.get_expense_reports', header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) @api_client.config.logger.debug "API called: ExpenseReportsApi#get_expense_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging [data, status_code, headers] end |
#post_expense_reports_by_id_reverse(id, client_id, opts = {}) ⇒ SuccessResponse
Post SuccessResponse
273 274 275 276 |
# File 'lib/connect_wise/api/expense_reports_api.rb', line 273 def post_expense_reports_by_id_reverse(id, client_id, opts = {}) data, _status_code, _headers = post_expense_reports_by_id_reverse_with_http_info(id, client_id, opts) data end |
#post_expense_reports_by_id_reverse_with_http_info(id, client_id, opts = {}) ⇒ Array<(SuccessResponse, Integer, Hash)>
Post SuccessResponse
283 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 323 324 325 326 327 |
# File 'lib/connect_wise/api/expense_reports_api.rb', line 283 def post_expense_reports_by_id_reverse_with_http_info(id, client_id, opts = {}) @api_client.config.logger.debug 'Calling API: ExpenseReportsApi.post_expense_reports_by_id_reverse ...' if @api_client.config.debugging # verify the required parameter 'id' is set raise ArgumentError, "Missing the required parameter 'id' when calling ExpenseReportsApi.post_expense_reports_by_id_reverse" if @api_client.config.client_side_validation && id.nil? # verify the required parameter 'client_id' is set raise ArgumentError, "Missing the required parameter 'client_id' when calling ExpenseReportsApi.post_expense_reports_by_id_reverse" if @api_client.config.client_side_validation && client_id.nil? # resource path local_var_path = '/expense/reports/{id}/reverse'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.connectwise.com+json; version=2022.1']) header_params[:clientId] = client_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SuccessResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( operation: :'ExpenseReportsApi.post_expense_reports_by_id_reverse', header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) @api_client.config.logger.debug "API called: ExpenseReportsApi#post_expense_reports_by_id_reverse\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging [data, status_code, headers] end |
#post_expense_reports_by_id_submit(id, client_id, opts = {}) ⇒ SuccessResponse
Post SuccessResponse
334 335 336 337 |
# File 'lib/connect_wise/api/expense_reports_api.rb', line 334 def post_expense_reports_by_id_submit(id, client_id, opts = {}) data, _status_code, _headers = post_expense_reports_by_id_submit_with_http_info(id, client_id, opts) data end |
#post_expense_reports_by_id_submit_with_http_info(id, client_id, opts = {}) ⇒ Array<(SuccessResponse, Integer, Hash)>
Post SuccessResponse
344 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 382 383 384 385 386 387 388 |
# File 'lib/connect_wise/api/expense_reports_api.rb', line 344 def post_expense_reports_by_id_submit_with_http_info(id, client_id, opts = {}) @api_client.config.logger.debug 'Calling API: ExpenseReportsApi.post_expense_reports_by_id_submit ...' if @api_client.config.debugging # verify the required parameter 'id' is set raise ArgumentError, "Missing the required parameter 'id' when calling ExpenseReportsApi.post_expense_reports_by_id_submit" if @api_client.config.client_side_validation && id.nil? # verify the required parameter 'client_id' is set raise ArgumentError, "Missing the required parameter 'client_id' when calling ExpenseReportsApi.post_expense_reports_by_id_submit" if @api_client.config.client_side_validation && client_id.nil? # resource path local_var_path = '/expense/reports/{id}/submit'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.connectwise.com+json; version=2022.1']) header_params[:clientId] = client_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SuccessResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( operation: :'ExpenseReportsApi.post_expense_reports_by_id_submit', header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) @api_client.config.logger.debug "API called: ExpenseReportsApi#post_expense_reports_by_id_submit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging [data, status_code, headers] end |