Class: ConnectWise::PurchaseOrderLineItemsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/connect_wise/api/purchase_order_line_items_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ PurchaseOrderLineItemsApi

Returns a new instance of PurchaseOrderLineItemsApi.



17
18
19
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 17

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



15
16
17
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 15

def api_client
  @api_client
end

Instance Method Details

#delete_procurement_purchaseorders_by_parent_id_lineitems_bulk(parent_id, client_id, id_collection, opts = {}) ⇒ BulkResult

Delete BulkResult

Parameters:

  • parent_id (Integer)

    purchaseorderId

  • client_id (String)
  • id_collection (IdCollection)

    purchaseOrderLineItems

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

    the optional parameters

Returns:



27
28
29
30
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 27

def delete_procurement_purchaseorders_by_parent_id_lineitems_bulk(parent_id, client_id, id_collection, opts = {})
  data, _status_code, _headers = delete_procurement_purchaseorders_by_parent_id_lineitems_bulk_with_http_info(parent_id, client_id, id_collection, opts)
  data
end

#delete_procurement_purchaseorders_by_parent_id_lineitems_bulk_with_http_info(parent_id, client_id, id_collection, opts = {}) ⇒ Array<(BulkResult, Integer, Hash)>

Delete BulkResult

Parameters:

  • parent_id (Integer)

    purchaseorderId

  • client_id (String)
  • id_collection (IdCollection)

    purchaseOrderLineItems

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

    the optional parameters

Returns:

  • (Array<(BulkResult, Integer, Hash)>)

    BulkResult data, response status code and response headers

Raises:

  • (ArgumentError)


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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 38

def delete_procurement_purchaseorders_by_parent_id_lineitems_bulk_with_http_info(parent_id, client_id, id_collection, opts = {})
  @api_client.config.logger.debug 'Calling API: PurchaseOrderLineItemsApi.delete_procurement_purchaseorders_by_parent_id_lineitems_bulk ...' if @api_client.config.debugging
  # verify the required parameter 'parent_id' is set
  raise ArgumentError, "Missing the required parameter 'parent_id' when calling PurchaseOrderLineItemsApi.delete_procurement_purchaseorders_by_parent_id_lineitems_bulk" if @api_client.config.client_side_validation && parent_id.nil?
  # verify the required parameter 'client_id' is set
  raise ArgumentError, "Missing the required parameter 'client_id' when calling PurchaseOrderLineItemsApi.delete_procurement_purchaseorders_by_parent_id_lineitems_bulk" if @api_client.config.client_side_validation && client_id.nil?
  # verify the required parameter 'id_collection' is set
  raise ArgumentError, "Missing the required parameter 'id_collection' when calling PurchaseOrderLineItemsApi.delete_procurement_purchaseorders_by_parent_id_lineitems_bulk" if @api_client.config.client_side_validation && id_collection.nil?

  # resource path
  local_var_path = '/procurement/purchaseorders/{parentId}/lineitems/bulk'.sub('{' + 'parentId' + '}', CGI.escape(parent_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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  header_params['Content-Type'] = content_type unless content_type.nil?
  header_params[:clientId] = client_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(id_collection)

  # return_type
  return_type = opts[:debug_return_type] || 'BulkResult'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    operation: :'PurchaseOrderLineItemsApi.delete_procurement_purchaseorders_by_parent_id_lineitems_bulk',
    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(:DELETE, local_var_path, new_options)
  @api_client.config.logger.debug "API called: PurchaseOrderLineItemsApi#delete_procurement_purchaseorders_by_parent_id_lineitems_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#delete_procurement_purchaseorders_by_parent_id_lineitems_by_id(id, parent_id, client_id, opts = {}) ⇒ nil

Delete PurchaseOrderLineItem

Parameters:

  • id (Integer)

    lineitemId

  • parent_id (Integer)

    purchaseorderId

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

    the optional parameters

Returns:

  • (nil)


95
96
97
98
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 95

def delete_procurement_purchaseorders_by_parent_id_lineitems_by_id(id, parent_id, client_id, opts = {})
  delete_procurement_purchaseorders_by_parent_id_lineitems_by_id_with_http_info(id, parent_id, client_id, opts)
  nil
end

#delete_procurement_purchaseorders_by_parent_id_lineitems_by_id_with_http_info(id, parent_id, client_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete PurchaseOrderLineItem

Parameters:

  • id (Integer)

    lineitemId

  • parent_id (Integer)

    purchaseorderId

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

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers

Raises:

  • (ArgumentError)


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
142
143
144
145
146
147
148
149
150
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 106

def delete_procurement_purchaseorders_by_parent_id_lineitems_by_id_with_http_info(id, parent_id, client_id, opts = {})
  @api_client.config.logger.debug 'Calling API: PurchaseOrderLineItemsApi.delete_procurement_purchaseorders_by_parent_id_lineitems_by_id ...' if @api_client.config.debugging
  # verify the required parameter 'id' is set
  raise ArgumentError, "Missing the required parameter 'id' when calling PurchaseOrderLineItemsApi.delete_procurement_purchaseorders_by_parent_id_lineitems_by_id" if @api_client.config.client_side_validation && id.nil?
  # verify the required parameter 'parent_id' is set
  raise ArgumentError, "Missing the required parameter 'parent_id' when calling PurchaseOrderLineItemsApi.delete_procurement_purchaseorders_by_parent_id_lineitems_by_id" if @api_client.config.client_side_validation && parent_id.nil?
  # verify the required parameter 'client_id' is set
  raise ArgumentError, "Missing the required parameter 'client_id' when calling PurchaseOrderLineItemsApi.delete_procurement_purchaseorders_by_parent_id_lineitems_by_id" if @api_client.config.client_side_validation && client_id.nil?

  # resource path
  local_var_path = '/procurement/purchaseorders/{parentId}/lineitems/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'parentId' + '}', CGI.escape(parent_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  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]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    operation: :'PurchaseOrderLineItemsApi.delete_procurement_purchaseorders_by_parent_id_lineitems_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(:DELETE, local_var_path, new_options)
  @api_client.config.logger.debug "API called: PurchaseOrderLineItemsApi#delete_procurement_purchaseorders_by_parent_id_lineitems_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#get_procurement_purchaseorders_by_parent_id_lineitems(parent_id, client_id, opts = {}) ⇒ Array<PurchaseOrderLineItem>

Get List of PurchaseOrderLineItem

Parameters:

  • parent_id (Integer)

    purchaseorderId

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

    the optional parameters

Options Hash (opts):

  • :conditions (String)
  • :child_conditions (String)
  • :custom_field_conditions (String)
  • :order_by (String)
  • :fields (String)
  • :page (Integer)
  • :page_size (Integer)
  • :page_id (Integer)

Returns:



165
166
167
168
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 165

def get_procurement_purchaseorders_by_parent_id_lineitems(parent_id, client_id, opts = {})
  data, _status_code, _headers = get_procurement_purchaseorders_by_parent_id_lineitems_with_http_info(parent_id, client_id, opts)
  data
end

#get_procurement_purchaseorders_by_parent_id_lineitems_by_id(id, parent_id, client_id, opts = {}) ⇒ PurchaseOrderLineItem

Get PurchaseOrderLineItem

Parameters:

  • id (Integer)

    lineitemId

  • parent_id (Integer)

    purchaseorderId

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

    the optional parameters

Options Hash (opts):

  • :conditions (String)
  • :child_conditions (String)
  • :custom_field_conditions (String)
  • :order_by (String)
  • :fields (String)
  • :page (Integer)
  • :page_size (Integer)
  • :page_id (Integer)

Returns:



251
252
253
254
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 251

def get_procurement_purchaseorders_by_parent_id_lineitems_by_id(id, parent_id, client_id, opts = {})
  data, _status_code, _headers = get_procurement_purchaseorders_by_parent_id_lineitems_by_id_with_http_info(id, parent_id, client_id, opts)
  data
end

#get_procurement_purchaseorders_by_parent_id_lineitems_by_id_with_http_info(id, parent_id, client_id, opts = {}) ⇒ Array<(PurchaseOrderLineItem, Integer, Hash)>

Get PurchaseOrderLineItem

Parameters:

  • id (Integer)

    lineitemId

  • parent_id (Integer)

    purchaseorderId

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

    the optional parameters

Options Hash (opts):

  • :conditions (String)
  • :child_conditions (String)
  • :custom_field_conditions (String)
  • :order_by (String)
  • :fields (String)
  • :page (Integer)
  • :page_size (Integer)
  • :page_id (Integer)

Returns:

  • (Array<(PurchaseOrderLineItem, Integer, Hash)>)

    PurchaseOrderLineItem data, response status code and response headers

Raises:

  • (ArgumentError)


270
271
272
273
274
275
276
277
278
279
280
281
282
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
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 270

def get_procurement_purchaseorders_by_parent_id_lineitems_by_id_with_http_info(id, parent_id, client_id, opts = {})
  @api_client.config.logger.debug 'Calling API: PurchaseOrderLineItemsApi.get_procurement_purchaseorders_by_parent_id_lineitems_by_id ...' if @api_client.config.debugging
  # verify the required parameter 'id' is set
  raise ArgumentError, "Missing the required parameter 'id' when calling PurchaseOrderLineItemsApi.get_procurement_purchaseorders_by_parent_id_lineitems_by_id" if @api_client.config.client_side_validation && id.nil?
  # verify the required parameter 'parent_id' is set
  raise ArgumentError, "Missing the required parameter 'parent_id' when calling PurchaseOrderLineItemsApi.get_procurement_purchaseorders_by_parent_id_lineitems_by_id" if @api_client.config.client_side_validation && parent_id.nil?
  # verify the required parameter 'client_id' is set
  raise ArgumentError, "Missing the required parameter 'client_id' when calling PurchaseOrderLineItemsApi.get_procurement_purchaseorders_by_parent_id_lineitems_by_id" if @api_client.config.client_side_validation && client_id.nil?

  # resource path
  local_var_path = '/procurement/purchaseorders/{parentId}/lineitems/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'parentId' + '}', CGI.escape(parent_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] || 'PurchaseOrderLineItem'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    operation: :'PurchaseOrderLineItemsApi.get_procurement_purchaseorders_by_parent_id_lineitems_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, new_options)
  @api_client.config.logger.debug "API called: PurchaseOrderLineItemsApi#get_procurement_purchaseorders_by_parent_id_lineitems_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#get_procurement_purchaseorders_by_parent_id_lineitems_count(parent_id, client_id, opts = {}) ⇒ Count

Get Count of PurchaseOrderLineItem

Parameters:

  • parent_id (Integer)

    purchaseorderId

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

    the optional parameters

Options Hash (opts):

  • :conditions (String)
  • :child_conditions (String)
  • :custom_field_conditions (String)
  • :order_by (String)
  • :fields (String)
  • :page (Integer)
  • :page_size (Integer)
  • :page_id (Integer)

Returns:



339
340
341
342
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 339

def get_procurement_purchaseorders_by_parent_id_lineitems_count(parent_id, client_id, opts = {})
  data, _status_code, _headers = get_procurement_purchaseorders_by_parent_id_lineitems_count_with_http_info(parent_id, client_id, opts)
  data
end

#get_procurement_purchaseorders_by_parent_id_lineitems_count_with_http_info(parent_id, client_id, opts = {}) ⇒ Array<(Count, Integer, Hash)>

Get Count of PurchaseOrderLineItem

Parameters:

  • parent_id (Integer)

    purchaseorderId

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

    the optional parameters

Options Hash (opts):

  • :conditions (String)
  • :child_conditions (String)
  • :custom_field_conditions (String)
  • :order_by (String)
  • :fields (String)
  • :page (Integer)
  • :page_size (Integer)
  • :page_id (Integer)

Returns:

  • (Array<(Count, Integer, Hash)>)

    Count data, response status code and response headers

Raises:

  • (ArgumentError)


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
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 357

def get_procurement_purchaseorders_by_parent_id_lineitems_count_with_http_info(parent_id, client_id, opts = {})
  @api_client.config.logger.debug 'Calling API: PurchaseOrderLineItemsApi.get_procurement_purchaseorders_by_parent_id_lineitems_count ...' if @api_client.config.debugging
  # verify the required parameter 'parent_id' is set
  raise ArgumentError, "Missing the required parameter 'parent_id' when calling PurchaseOrderLineItemsApi.get_procurement_purchaseorders_by_parent_id_lineitems_count" if @api_client.config.client_side_validation && parent_id.nil?
  # verify the required parameter 'client_id' is set
  raise ArgumentError, "Missing the required parameter 'client_id' when calling PurchaseOrderLineItemsApi.get_procurement_purchaseorders_by_parent_id_lineitems_count" if @api_client.config.client_side_validation && client_id.nil?

  # resource path
  local_var_path = '/procurement/purchaseorders/{parentId}/lineitems/count'.sub('{' + 'parentId' + '}', CGI.escape(parent_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] || 'Count'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    operation: :'PurchaseOrderLineItemsApi.get_procurement_purchaseorders_by_parent_id_lineitems_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, new_options)
  @api_client.config.logger.debug "API called: PurchaseOrderLineItemsApi#get_procurement_purchaseorders_by_parent_id_lineitems_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#get_procurement_purchaseorders_by_parent_id_lineitems_with_http_info(parent_id, client_id, opts = {}) ⇒ Array<(Array<PurchaseOrderLineItem>, Integer, Hash)>

Get List of PurchaseOrderLineItem

Parameters:

  • parent_id (Integer)

    purchaseorderId

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

    the optional parameters

Options Hash (opts):

  • :conditions (String)
  • :child_conditions (String)
  • :custom_field_conditions (String)
  • :order_by (String)
  • :fields (String)
  • :page (Integer)
  • :page_size (Integer)
  • :page_id (Integer)

Returns:

  • (Array<(Array<PurchaseOrderLineItem>, Integer, Hash)>)

    Array<PurchaseOrderLineItem> data, response status code and response headers

Raises:

  • (ArgumentError)


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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 183

def get_procurement_purchaseorders_by_parent_id_lineitems_with_http_info(parent_id, client_id, opts = {})
  @api_client.config.logger.debug 'Calling API: PurchaseOrderLineItemsApi.get_procurement_purchaseorders_by_parent_id_lineitems ...' if @api_client.config.debugging
  # verify the required parameter 'parent_id' is set
  raise ArgumentError, "Missing the required parameter 'parent_id' when calling PurchaseOrderLineItemsApi.get_procurement_purchaseorders_by_parent_id_lineitems" if @api_client.config.client_side_validation && parent_id.nil?
  # verify the required parameter 'client_id' is set
  raise ArgumentError, "Missing the required parameter 'client_id' when calling PurchaseOrderLineItemsApi.get_procurement_purchaseorders_by_parent_id_lineitems" if @api_client.config.client_side_validation && client_id.nil?

  # resource path
  local_var_path = '/procurement/purchaseorders/{parentId}/lineitems'.sub('{' + 'parentId' + '}', CGI.escape(parent_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] || 'Array<PurchaseOrderLineItem>'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    operation: :'PurchaseOrderLineItemsApi.get_procurement_purchaseorders_by_parent_id_lineitems',
    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, new_options)
  @api_client.config.logger.debug "API called: PurchaseOrderLineItemsApi#get_procurement_purchaseorders_by_parent_id_lineitems\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#patch_procurement_purchaseorders_by_parent_id_lineitems_by_id(id, parent_id, client_id, patch_operation, opts = {}) ⇒ PurchaseOrderLineItem

Patch PurchaseOrderLineItem

Parameters:

  • id (Integer)

    lineitemId

  • parent_id (Integer)

    purchaseorderId

  • client_id (String)
  • patch_operation (Array<PatchOperation>)

    List of PatchOperation

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

    the optional parameters

Returns:



418
419
420
421
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 418

def patch_procurement_purchaseorders_by_parent_id_lineitems_by_id(id, parent_id, client_id, patch_operation, opts = {})
  data, _status_code, _headers = patch_procurement_purchaseorders_by_parent_id_lineitems_by_id_with_http_info(id, parent_id, client_id, patch_operation, opts)
  data
end

#patch_procurement_purchaseorders_by_parent_id_lineitems_by_id_with_http_info(id, parent_id, client_id, patch_operation, opts = {}) ⇒ Array<(PurchaseOrderLineItem, Integer, Hash)>

Patch PurchaseOrderLineItem

Parameters:

  • id (Integer)

    lineitemId

  • parent_id (Integer)

    purchaseorderId

  • client_id (String)
  • patch_operation (Array<PatchOperation>)

    List of PatchOperation

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

    the optional parameters

Returns:

  • (Array<(PurchaseOrderLineItem, Integer, Hash)>)

    PurchaseOrderLineItem data, response status code and response headers

Raises:

  • (ArgumentError)


430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 430

def patch_procurement_purchaseorders_by_parent_id_lineitems_by_id_with_http_info(id, parent_id, client_id, patch_operation, opts = {})
  @api_client.config.logger.debug 'Calling API: PurchaseOrderLineItemsApi.patch_procurement_purchaseorders_by_parent_id_lineitems_by_id ...' if @api_client.config.debugging
  # verify the required parameter 'id' is set
  raise ArgumentError, "Missing the required parameter 'id' when calling PurchaseOrderLineItemsApi.patch_procurement_purchaseorders_by_parent_id_lineitems_by_id" if @api_client.config.client_side_validation && id.nil?
  # verify the required parameter 'parent_id' is set
  raise ArgumentError, "Missing the required parameter 'parent_id' when calling PurchaseOrderLineItemsApi.patch_procurement_purchaseorders_by_parent_id_lineitems_by_id" if @api_client.config.client_side_validation && parent_id.nil?
  # verify the required parameter 'client_id' is set
  raise ArgumentError, "Missing the required parameter 'client_id' when calling PurchaseOrderLineItemsApi.patch_procurement_purchaseorders_by_parent_id_lineitems_by_id" if @api_client.config.client_side_validation && client_id.nil?
  # verify the required parameter 'patch_operation' is set
  raise ArgumentError, "Missing the required parameter 'patch_operation' when calling PurchaseOrderLineItemsApi.patch_procurement_purchaseorders_by_parent_id_lineitems_by_id" if @api_client.config.client_side_validation && patch_operation.nil?

  # resource path
  local_var_path = '/procurement/purchaseorders/{parentId}/lineitems/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'parentId' + '}', CGI.escape(parent_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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  header_params['Content-Type'] = content_type unless content_type.nil?
  header_params[:clientId] = client_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_operation)

  # return_type
  return_type = opts[:debug_return_type] || 'PurchaseOrderLineItem'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    operation: :'PurchaseOrderLineItemsApi.patch_procurement_purchaseorders_by_parent_id_lineitems_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(:PATCH, local_var_path, new_options)
  @api_client.config.logger.debug "API called: PurchaseOrderLineItemsApi#patch_procurement_purchaseorders_by_parent_id_lineitems_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#post_procurement_purchaseorders_by_parent_id_lineitems(parent_id, client_id, purchase_order_line_item, opts = {}) ⇒ PurchaseOrderLineItem

Post PurchaseOrderLineItem

Parameters:

  • parent_id (Integer)

    purchaseorderId

  • client_id (String)
  • purchase_order_line_item (PurchaseOrderLineItem)

    purchaseOrderLineItem

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

    the optional parameters

Returns:



489
490
491
492
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 489

def post_procurement_purchaseorders_by_parent_id_lineitems(parent_id, client_id, purchase_order_line_item, opts = {})
  data, _status_code, _headers = post_procurement_purchaseorders_by_parent_id_lineitems_with_http_info(parent_id, client_id, purchase_order_line_item, opts)
  data
end

#post_procurement_purchaseorders_by_parent_id_lineitems_bulk(parent_id, client_id, purchase_order_line_item, opts = {}) ⇒ BulkResult

Post BulkResult

Parameters:

  • parent_id (Integer)

    purchaseorderId

  • client_id (String)
  • purchase_order_line_item (Array<PurchaseOrderLineItem>)

    List of PurchaseOrderLineItem

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

    the optional parameters

Returns:



557
558
559
560
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 557

def post_procurement_purchaseorders_by_parent_id_lineitems_bulk(parent_id, client_id, purchase_order_line_item, opts = {})
  data, _status_code, _headers = post_procurement_purchaseorders_by_parent_id_lineitems_bulk_with_http_info(parent_id, client_id, purchase_order_line_item, opts)
  data
end

#post_procurement_purchaseorders_by_parent_id_lineitems_bulk_with_http_info(parent_id, client_id, purchase_order_line_item, opts = {}) ⇒ Array<(BulkResult, Integer, Hash)>

Post BulkResult

Parameters:

  • parent_id (Integer)

    purchaseorderId

  • client_id (String)
  • purchase_order_line_item (Array<PurchaseOrderLineItem>)

    List of PurchaseOrderLineItem

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

    the optional parameters

Returns:

  • (Array<(BulkResult, Integer, Hash)>)

    BulkResult data, response status code and response headers

Raises:

  • (ArgumentError)


568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 568

def post_procurement_purchaseorders_by_parent_id_lineitems_bulk_with_http_info(parent_id, client_id, purchase_order_line_item, opts = {})
  @api_client.config.logger.debug 'Calling API: PurchaseOrderLineItemsApi.post_procurement_purchaseorders_by_parent_id_lineitems_bulk ...' if @api_client.config.debugging
  # verify the required parameter 'parent_id' is set
  raise ArgumentError, "Missing the required parameter 'parent_id' when calling PurchaseOrderLineItemsApi.post_procurement_purchaseorders_by_parent_id_lineitems_bulk" if @api_client.config.client_side_validation && parent_id.nil?
  # verify the required parameter 'client_id' is set
  raise ArgumentError, "Missing the required parameter 'client_id' when calling PurchaseOrderLineItemsApi.post_procurement_purchaseorders_by_parent_id_lineitems_bulk" if @api_client.config.client_side_validation && client_id.nil?
  # verify the required parameter 'purchase_order_line_item' is set
  raise ArgumentError, "Missing the required parameter 'purchase_order_line_item' when calling PurchaseOrderLineItemsApi.post_procurement_purchaseorders_by_parent_id_lineitems_bulk" if @api_client.config.client_side_validation && purchase_order_line_item.nil?

  # resource path
  local_var_path = '/procurement/purchaseorders/{parentId}/lineitems/bulk'.sub('{' + 'parentId' + '}', CGI.escape(parent_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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  header_params['Content-Type'] = content_type unless content_type.nil?
  header_params[:clientId] = client_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(purchase_order_line_item)

  # return_type
  return_type = opts[:debug_return_type] || 'BulkResult'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    operation: :'PurchaseOrderLineItemsApi.post_procurement_purchaseorders_by_parent_id_lineitems_bulk',
    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, new_options)
  @api_client.config.logger.debug "API called: PurchaseOrderLineItemsApi#post_procurement_purchaseorders_by_parent_id_lineitems_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#post_procurement_purchaseorders_by_parent_id_lineitems_with_http_info(parent_id, client_id, purchase_order_line_item, opts = {}) ⇒ Array<(PurchaseOrderLineItem, Integer, Hash)>

Post PurchaseOrderLineItem

Parameters:

  • parent_id (Integer)

    purchaseorderId

  • client_id (String)
  • purchase_order_line_item (PurchaseOrderLineItem)

    purchaseOrderLineItem

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

    the optional parameters

Returns:

  • (Array<(PurchaseOrderLineItem, Integer, Hash)>)

    PurchaseOrderLineItem data, response status code and response headers

Raises:

  • (ArgumentError)


500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
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
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 500

def post_procurement_purchaseorders_by_parent_id_lineitems_with_http_info(parent_id, client_id, purchase_order_line_item, opts = {})
  @api_client.config.logger.debug 'Calling API: PurchaseOrderLineItemsApi.post_procurement_purchaseorders_by_parent_id_lineitems ...' if @api_client.config.debugging
  # verify the required parameter 'parent_id' is set
  raise ArgumentError, "Missing the required parameter 'parent_id' when calling PurchaseOrderLineItemsApi.post_procurement_purchaseorders_by_parent_id_lineitems" if @api_client.config.client_side_validation && parent_id.nil?
  # verify the required parameter 'client_id' is set
  raise ArgumentError, "Missing the required parameter 'client_id' when calling PurchaseOrderLineItemsApi.post_procurement_purchaseorders_by_parent_id_lineitems" if @api_client.config.client_side_validation && client_id.nil?
  # verify the required parameter 'purchase_order_line_item' is set
  raise ArgumentError, "Missing the required parameter 'purchase_order_line_item' when calling PurchaseOrderLineItemsApi.post_procurement_purchaseorders_by_parent_id_lineitems" if @api_client.config.client_side_validation && purchase_order_line_item.nil?

  # resource path
  local_var_path = '/procurement/purchaseorders/{parentId}/lineitems'.sub('{' + 'parentId' + '}', CGI.escape(parent_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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  header_params['Content-Type'] = content_type unless content_type.nil?
  header_params[:clientId] = client_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(purchase_order_line_item)

  # return_type
  return_type = opts[:debug_return_type] || 'PurchaseOrderLineItem'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    operation: :'PurchaseOrderLineItemsApi.post_procurement_purchaseorders_by_parent_id_lineitems',
    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, new_options)
  @api_client.config.logger.debug "API called: PurchaseOrderLineItemsApi#post_procurement_purchaseorders_by_parent_id_lineitems\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#put_procurement_purchaseorders_by_parent_id_lineitems_bulk(parent_id, client_id, purchase_order_line_item, opts = {}) ⇒ BulkResult

Put BulkResult

Parameters:

  • parent_id (Integer)

    purchaseorderId

  • client_id (String)
  • purchase_order_line_item (Array<PurchaseOrderLineItem>)

    List of PurchaseOrderLineItem

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

    the optional parameters

Returns:



625
626
627
628
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 625

def put_procurement_purchaseorders_by_parent_id_lineitems_bulk(parent_id, client_id, purchase_order_line_item, opts = {})
  data, _status_code, _headers = put_procurement_purchaseorders_by_parent_id_lineitems_bulk_with_http_info(parent_id, client_id, purchase_order_line_item, opts)
  data
end

#put_procurement_purchaseorders_by_parent_id_lineitems_bulk_with_http_info(parent_id, client_id, purchase_order_line_item, opts = {}) ⇒ Array<(BulkResult, Integer, Hash)>

Put BulkResult

Parameters:

  • parent_id (Integer)

    purchaseorderId

  • client_id (String)
  • purchase_order_line_item (Array<PurchaseOrderLineItem>)

    List of PurchaseOrderLineItem

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

    the optional parameters

Returns:

  • (Array<(BulkResult, Integer, Hash)>)

    BulkResult data, response status code and response headers

Raises:

  • (ArgumentError)


636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 636

def put_procurement_purchaseorders_by_parent_id_lineitems_bulk_with_http_info(parent_id, client_id, purchase_order_line_item, opts = {})
  @api_client.config.logger.debug 'Calling API: PurchaseOrderLineItemsApi.put_procurement_purchaseorders_by_parent_id_lineitems_bulk ...' if @api_client.config.debugging
  # verify the required parameter 'parent_id' is set
  raise ArgumentError, "Missing the required parameter 'parent_id' when calling PurchaseOrderLineItemsApi.put_procurement_purchaseorders_by_parent_id_lineitems_bulk" if @api_client.config.client_side_validation && parent_id.nil?
  # verify the required parameter 'client_id' is set
  raise ArgumentError, "Missing the required parameter 'client_id' when calling PurchaseOrderLineItemsApi.put_procurement_purchaseorders_by_parent_id_lineitems_bulk" if @api_client.config.client_side_validation && client_id.nil?
  # verify the required parameter 'purchase_order_line_item' is set
  raise ArgumentError, "Missing the required parameter 'purchase_order_line_item' when calling PurchaseOrderLineItemsApi.put_procurement_purchaseorders_by_parent_id_lineitems_bulk" if @api_client.config.client_side_validation && purchase_order_line_item.nil?

  # resource path
  local_var_path = '/procurement/purchaseorders/{parentId}/lineitems/bulk'.sub('{' + 'parentId' + '}', CGI.escape(parent_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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  header_params['Content-Type'] = content_type unless content_type.nil?
  header_params[:clientId] = client_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(purchase_order_line_item)

  # return_type
  return_type = opts[:debug_return_type] || 'BulkResult'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    operation: :'PurchaseOrderLineItemsApi.put_procurement_purchaseorders_by_parent_id_lineitems_bulk',
    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(:PUT, local_var_path, new_options)
  @api_client.config.logger.debug "API called: PurchaseOrderLineItemsApi#put_procurement_purchaseorders_by_parent_id_lineitems_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#put_procurement_purchaseorders_by_parent_id_lineitems_by_id(id, parent_id, client_id, purchase_order_line_item, opts = {}) ⇒ PurchaseOrderLineItem

Put PurchaseOrderLineItem

Parameters:

  • id (Integer)

    lineitemId

  • parent_id (Integer)

    purchaseorderId

  • client_id (String)
  • purchase_order_line_item (PurchaseOrderLineItem)

    purchaseOrderLineItem

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

    the optional parameters

Returns:



694
695
696
697
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 694

def put_procurement_purchaseorders_by_parent_id_lineitems_by_id(id, parent_id, client_id, purchase_order_line_item, opts = {})
  data, _status_code, _headers = put_procurement_purchaseorders_by_parent_id_lineitems_by_id_with_http_info(id, parent_id, client_id, purchase_order_line_item, opts)
  data
end

#put_procurement_purchaseorders_by_parent_id_lineitems_by_id_with_http_info(id, parent_id, client_id, purchase_order_line_item, opts = {}) ⇒ Array<(PurchaseOrderLineItem, Integer, Hash)>

Put PurchaseOrderLineItem

Parameters:

  • id (Integer)

    lineitemId

  • parent_id (Integer)

    purchaseorderId

  • client_id (String)
  • purchase_order_line_item (PurchaseOrderLineItem)

    purchaseOrderLineItem

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

    the optional parameters

Returns:

  • (Array<(PurchaseOrderLineItem, Integer, Hash)>)

    PurchaseOrderLineItem data, response status code and response headers

Raises:

  • (ArgumentError)


706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
# File 'lib/connect_wise/api/purchase_order_line_items_api.rb', line 706

def put_procurement_purchaseorders_by_parent_id_lineitems_by_id_with_http_info(id, parent_id, client_id, purchase_order_line_item, opts = {})
  @api_client.config.logger.debug 'Calling API: PurchaseOrderLineItemsApi.put_procurement_purchaseorders_by_parent_id_lineitems_by_id ...' if @api_client.config.debugging
  # verify the required parameter 'id' is set
  raise ArgumentError, "Missing the required parameter 'id' when calling PurchaseOrderLineItemsApi.put_procurement_purchaseorders_by_parent_id_lineitems_by_id" if @api_client.config.client_side_validation && id.nil?
  # verify the required parameter 'parent_id' is set
  raise ArgumentError, "Missing the required parameter 'parent_id' when calling PurchaseOrderLineItemsApi.put_procurement_purchaseorders_by_parent_id_lineitems_by_id" if @api_client.config.client_side_validation && parent_id.nil?
  # verify the required parameter 'client_id' is set
  raise ArgumentError, "Missing the required parameter 'client_id' when calling PurchaseOrderLineItemsApi.put_procurement_purchaseorders_by_parent_id_lineitems_by_id" if @api_client.config.client_side_validation && client_id.nil?
  # verify the required parameter 'purchase_order_line_item' is set
  raise ArgumentError, "Missing the required parameter 'purchase_order_line_item' when calling PurchaseOrderLineItemsApi.put_procurement_purchaseorders_by_parent_id_lineitems_by_id" if @api_client.config.client_side_validation && purchase_order_line_item.nil?

  # resource path
  local_var_path = '/procurement/purchaseorders/{parentId}/lineitems/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'parentId' + '}', CGI.escape(parent_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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  header_params['Content-Type'] = content_type unless content_type.nil?
  header_params[:clientId] = client_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(purchase_order_line_item)

  # return_type
  return_type = opts[:debug_return_type] || 'PurchaseOrderLineItem'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    operation: :'PurchaseOrderLineItemsApi.put_procurement_purchaseorders_by_parent_id_lineitems_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(:PUT, local_var_path, new_options)
  @api_client.config.logger.debug "API called: PurchaseOrderLineItemsApi#put_procurement_purchaseorders_by_parent_id_lineitems_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end