Class: DearInventoryRuby::InventoryApi

Inherits:
Object
  • Object
show all
Defined in:
lib/dear-inventory-ruby/api/inventory_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ InventoryApi

Returns a new instance of InventoryApi.



19
20
21
# File 'lib/dear-inventory-ruby/api/inventory_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/dear-inventory-ruby/api/inventory_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_account(account, opts = {}) ⇒ Accounts

Allows you to create an Account

Parameters:

  • account (Account)

    an Account object with properties to create

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)

Returns:



27
28
29
30
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 27

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

#create_account_with_http_info(account, opts = {}) ⇒ Array<(Accounts, Integer, Hash)>

Allows you to create an Account

Parameters:

  • account (Account)

    an Account object with properties to create

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors

Returns:

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

    Accounts data, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 37

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.create_account ...'
  end
  # verify the required parameter 'account' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account' when calling InventoryApi.create_account"
  end
  # resource path
  local_var_path = '/ref/account'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Accounts' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#create_customer(customer, opts = {}) ⇒ Customers

Allows you to create a customer

Parameters:

  • customer (Customer)

    a customer object with properties to create

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)

Returns:



92
93
94
95
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 92

def create_customer(customer, opts = {})
  data, _status_code, _headers = create_customer_with_http_info(customer, opts)
  data
end

#create_customer_with_http_info(customer, opts = {}) ⇒ Array<(Customers, Integer, Hash)>

Allows you to create a customer

Parameters:

  • customer (Customer)

    a customer object with properties to create

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors

Returns:

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

    Customers data, response status code and response headers



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
142
143
144
145
146
147
148
149
150
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 102

def create_customer_with_http_info(customer, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.create_customer ...'
  end
  # verify the required parameter 'customer' is set
  if @api_client.config.client_side_validation && customer.nil?
    fail ArgumentError, "Missing the required parameter 'customer' when calling InventoryApi.create_customer"
  end
  # resource path
  local_var_path = '/customer'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Customers' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#create_payment_term(payment_term, opts = {}) ⇒ PaymentTerms

Allows you to create a payment term

Parameters:

  • payment_term (PaymentTerm)

    a payment term object with properties to create

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)

Returns:



157
158
159
160
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 157

def create_payment_term(payment_term, opts = {})
  data, _status_code, _headers = create_payment_term_with_http_info(payment_term, opts)
  data
end

#create_payment_term_with_http_info(payment_term, opts = {}) ⇒ Array<(PaymentTerms, Integer, Hash)>

Allows you to create a payment term

Parameters:

  • payment_term (PaymentTerm)

    a payment term object with properties to create

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors

Returns:

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

    PaymentTerms data, response status code and response headers



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
209
210
211
212
213
214
215
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 167

def create_payment_term_with_http_info(payment_term, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.create_payment_term ...'
  end
  # verify the required parameter 'payment_term' is set
  if @api_client.config.client_side_validation && payment_term.nil?
    fail ArgumentError, "Missing the required parameter 'payment_term' when calling InventoryApi.create_payment_term"
  end
  # resource path
  local_var_path = '/ref/paymentterm'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'PaymentTerms' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#create_sale_invoice(sale_invoice_post, opts = {}) ⇒ SaleInvoices

Allows you to create a sale invoice

Parameters:

  • sale_invoice_post (SaleInvoicePost)

    a Sale Invoice object with properties to create

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)

Returns:



222
223
224
225
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 222

def create_sale_invoice(sale_invoice_post, opts = {})
  data, _status_code, _headers = create_sale_invoice_with_http_info(sale_invoice_post, opts)
  data
end

#create_sale_invoice_with_http_info(sale_invoice_post, opts = {}) ⇒ Array<(SaleInvoices, Integer, Hash)>

Allows you to create a sale invoice

Parameters:

  • sale_invoice_post (SaleInvoicePost)

    a Sale Invoice object with properties to create

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors

Returns:

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

    SaleInvoices data, response status code and response headers



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
276
277
278
279
280
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 232

def create_sale_invoice_with_http_info(sale_invoice_post, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.create_sale_invoice ...'
  end
  # verify the required parameter 'sale_invoice_post' is set
  if @api_client.config.client_side_validation && sale_invoice_post.nil?
    fail ArgumentError, "Missing the required parameter 'sale_invoice_post' when calling InventoryApi.create_sale_invoice"
  end
  # resource path
  local_var_path = '/sale/invoice'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'SaleInvoices' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#create_sale_order(sale_order, opts = {}) ⇒ SaleOrder

Allows you to create a Sale Order

Parameters:

  • sale_order (SaleOrder)

    a Sale Order object with properties to create

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)

Returns:



287
288
289
290
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 287

def create_sale_order(sale_order, opts = {})
  data, _status_code, _headers = create_sale_order_with_http_info(sale_order, opts)
  data
end

#create_sale_order_with_http_info(sale_order, opts = {}) ⇒ Array<(SaleOrder, Integer, Hash)>

Allows you to create a Sale Order

Parameters:

  • sale_order (SaleOrder)

    a Sale Order object with properties to create

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors

Returns:

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

    SaleOrder data, response status code and response headers



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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 297

def create_sale_order_with_http_info(sale_order, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.create_sale_order ...'
  end
  # verify the required parameter 'sale_order' is set
  if @api_client.config.client_side_validation && sale_order.nil?
    fail ArgumentError, "Missing the required parameter 'sale_order' when calling InventoryApi.create_sale_order"
  end
  # resource path
  local_var_path = '/sale/order'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'SaleOrder' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#create_sale_payment(sale_payment, opts = {}) ⇒ SalePayment

Allows you to create a Sale Payment

Parameters:

  • sale_payment (SalePayment)

    a Sale Payment object with properties to create

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)

Returns:



352
353
354
355
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 352

def create_sale_payment(sale_payment, opts = {})
  data, _status_code, _headers = create_sale_payment_with_http_info(sale_payment, opts)
  data
end

#create_sale_payment_with_http_info(sale_payment, opts = {}) ⇒ Array<(SalePayment, Integer, Hash)>

Allows you to create a Sale Payment

Parameters:

  • sale_payment (SalePayment)

    a Sale Payment object with properties to create

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors

Returns:

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

    SalePayment data, response status code and response headers



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
410
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 362

def create_sale_payment_with_http_info(sale_payment, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.create_sale_payment ...'
  end
  # verify the required parameter 'sale_payment' is set
  if @api_client.config.client_side_validation && sale_payment.nil?
    fail ArgumentError, "Missing the required parameter 'sale_payment' when calling InventoryApi.create_sale_payment"
  end
  # resource path
  local_var_path = '/sale/payment'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'SalePayment' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#create_sale_quote(sale_quote, opts = {}) ⇒ SaleQuote

Allows you to create a Sale Quote

Parameters:

  • sale_quote (SaleQuote)

    a Sale Quote object with properties to create

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)

Returns:



417
418
419
420
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 417

def create_sale_quote(sale_quote, opts = {})
  data, _status_code, _headers = create_sale_quote_with_http_info(sale_quote, opts)
  data
end

#create_sale_quote_with_http_info(sale_quote, opts = {}) ⇒ Array<(SaleQuote, Integer, Hash)>

Allows you to create a Sale Quote

Parameters:

  • sale_quote (SaleQuote)

    a Sale Quote object with properties to create

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors

Returns:

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

    SaleQuote data, response status code and response headers



427
428
429
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
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 427

def create_sale_quote_with_http_info(sale_quote, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.create_sale_quote ...'
  end
  # verify the required parameter 'sale_quote' is set
  if @api_client.config.client_side_validation && sale_quote.nil?
    fail ArgumentError, "Missing the required parameter 'sale_quote' when calling InventoryApi.create_sale_quote"
  end
  # resource path
  local_var_path = '/sale/quote'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'SaleQuote' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#create_tax(tax, opts = {}) ⇒ Taxes

Allows you to create a tax

Parameters:

  • tax (Tax)

    a tax object with properties to create

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)

Returns:



482
483
484
485
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 482

def create_tax(tax, opts = {})
  data, _status_code, _headers = create_tax_with_http_info(tax, opts)
  data
end

#create_tax_with_http_info(tax, opts = {}) ⇒ Array<(Taxes, Integer, Hash)>

Allows you to create a tax

Parameters:

  • tax (Tax)

    a tax object with properties to create

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors

Returns:

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

    Taxes data, response status code and response headers



492
493
494
495
496
497
498
499
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
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 492

def create_tax_with_http_info(tax, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.create_tax ...'
  end
  # verify the required parameter 'tax' is set
  if @api_client.config.client_side_validation && tax.nil?
    fail ArgumentError, "Missing the required parameter 'tax' when calling InventoryApi.create_tax"
  end
  # resource path
  local_var_path = '/ref/tax'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Taxes' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#create_webhook(webhook, opts = {}) ⇒ Webhook

Allows you to create a Webhook

Parameters:

  • webhook (Webhook)

    a webhook object with properties to create

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)

Returns:



547
548
549
550
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 547

def create_webhook(webhook, opts = {})
  data, _status_code, _headers = create_webhook_with_http_info(webhook, opts)
  data
end

#create_webhook_with_http_info(webhook, opts = {}) ⇒ Array<(Webhook, Integer, Hash)>

Allows you to create a Webhook

Parameters:

  • webhook (Webhook)

    a webhook object with properties to create

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors

Returns:

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

    Webhook data, response status code and response headers



557
558
559
560
561
562
563
564
565
566
567
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
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 557

def create_webhook_with_http_info(webhook, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.create_webhook ...'
  end
  # verify the required parameter 'webhook' is set
  if @api_client.config.client_side_validation && webhook.nil?
    fail ArgumentError, "Missing the required parameter 'webhook' when calling InventoryApi.create_webhook"
  end
  # resource path
  local_var_path = '/webhooks'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Webhook' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#delete_account(opts = {}) ⇒ Success

Allows you to delete an Account

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :code (String)

    Default is nil

Returns:



611
612
613
614
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 611

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

#delete_account_with_http_info(opts = {}) ⇒ Array<(Success, Integer, Hash)>

Allows you to delete an Account

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :code (String)

    Default is nil

Returns:

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

    Success data, response status code and response headers



620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
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
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 620

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.delete_account ...'
  end
  # resource path
  local_var_path = '/ref/account'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'Code'] = opts[:'code'] if !opts[:'code'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Success' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#delete_payment_term(opts = {}) ⇒ Success

Allows you to delete a payment term

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    Default is nil

Returns:



668
669
670
671
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 668

def delete_payment_term(opts = {})
  data, _status_code, _headers = delete_payment_term_with_http_info(opts)
  data
end

#delete_payment_term_with_http_info(opts = {}) ⇒ Array<(Success, Integer, Hash)>

Allows you to delete a payment term

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    Default is nil

Returns:

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

    Success data, response status code and response headers



677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 677

def delete_payment_term_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.delete_payment_term ...'
  end
  # resource path
  local_var_path = '/ref/paymentterm'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Success' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#delete_sale_invoice(opts = {}) ⇒ SaleInvoices

Allows you to delete a sale invoice

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :task_id (String)

    ID of Sale task to Void or Undo

  • :void (Boolean)

    Default is false (default to false)

Returns:



726
727
728
729
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 726

def delete_sale_invoice(opts = {})
  data, _status_code, _headers = delete_sale_invoice_with_http_info(opts)
  data
end

#delete_sale_invoice_with_http_info(opts = {}) ⇒ Array<(SaleInvoices, Integer, Hash)>

Allows you to delete a sale invoice

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :task_id (String)

    ID of Sale task to Void or Undo

  • :void (Boolean)

    Default is false

Returns:

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

    SaleInvoices data, response status code and response headers



736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 736

def delete_sale_invoice_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.delete_sale_invoice ...'
  end
  # resource path
  local_var_path = '/sale/invoice'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'TaskID'] = opts[:'task_id'] if !opts[:'task_id'].nil?
  query_params[:'Void'] = opts[:'void'] if !opts[:'void'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'SaleInvoices' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#delete_sale_payment(opts = {}) ⇒ Success

Allows you to delete a sale payment

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    Default is nil

Returns:



785
786
787
788
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 785

def delete_sale_payment(opts = {})
  data, _status_code, _headers = delete_sale_payment_with_http_info(opts)
  data
end

#delete_sale_payment_with_http_info(opts = {}) ⇒ Array<(Success, Integer, Hash)>

Allows you to delete a sale payment

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    Default is nil

Returns:

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

    Success data, response status code and response headers



794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 794

def delete_sale_payment_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.delete_sale_payment ...'
  end
  # resource path
  local_var_path = '/sale/payment'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Success' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#delete_webhook(opts = {}) ⇒ Webhooks

Allows you to delete a webhook

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    Default is nil

Returns:



842
843
844
845
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 842

def delete_webhook(opts = {})
  data, _status_code, _headers = delete_webhook_with_http_info(opts)
  data
end

#delete_webhook_with_http_info(opts = {}) ⇒ Array<(Webhooks, Integer, Hash)>

Allows you to delete a webhook

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    Default is nil

Returns:

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

    Webhooks data, response status code and response headers



851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 851

def delete_webhook_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.delete_webhook ...'
  end
  # resource path
  local_var_path = '/webhooks'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Webhooks' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#get_accounts(opts = {}) ⇒ Accounts

Allows you to retrieve the Chart of Accounts

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (String)

    Default is 1 (default to ‘1’)

  • :limit (String)

    Default is 100 (default to ‘100’)

  • :code (String)

    Default is nil

  • :name (String)

    Default is nil

  • :_class (String)

    Default is nil

  • :type (String)

    Default is nil

  • :status (String)

    Default is nil

Returns:



905
906
907
908
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 905

def get_accounts(opts = {})
  data, _status_code, _headers = get_accounts_with_http_info(opts)
  data
end

#get_accounts_with_http_info(opts = {}) ⇒ Array<(Accounts, Integer, Hash)>

Allows you to retrieve the Chart of Accounts

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (String)

    Default is 1

  • :limit (String)

    Default is 100

  • :code (String)

    Default is nil

  • :name (String)

    Default is nil

  • :_class (String)

    Default is nil

  • :type (String)

    Default is nil

  • :status (String)

    Default is nil

Returns:

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

    Accounts data, response status code and response headers



920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 920

def get_accounts_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.get_accounts ...'
  end
  # resource path
  local_var_path = '/ref/account'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'Page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'Code'] = opts[:'code'] if !opts[:'code'].nil?
  query_params[:'Name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'Class'] = opts[:'_class'] if !opts[:'_class'].nil?
  query_params[:'Type'] = opts[:'type'] if !opts[:'type'].nil?
  query_params[:'Status'] = opts[:'status'] if !opts[:'status'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Accounts' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#get_carriers(opts = {}) ⇒ Carriers

Allows you to retrieve the carriers

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (String)

    Default is 1 (default to ‘1’)

  • :limit (String)

    Default is 100 (default to ‘100’)

  • :carrier_id (String)

    Only return Carrier with the specific CarrierID

  • :description (String)

    Only return Carriers that start with the specific Description

Returns:



977
978
979
980
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 977

def get_carriers(opts = {})
  data, _status_code, _headers = get_carriers_with_http_info(opts)
  data
end

#get_carriers_with_http_info(opts = {}) ⇒ Array<(Carriers, Integer, Hash)>

Allows you to retrieve the carriers

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (String)

    Default is 1

  • :limit (String)

    Default is 100

  • :carrier_id (String)

    Only return Carrier with the specific CarrierID

  • :description (String)

    Only return Carriers that start with the specific Description

Returns:

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

    Carriers data, response status code and response headers



989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 989

def get_carriers_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.get_carriers ...'
  end
  # resource path
  local_var_path = '/ref/carrier'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'Page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'CarrierID'] = opts[:'carrier_id'] if !opts[:'carrier_id'].nil?
  query_params[:'Description'] = opts[:'description'] if !opts[:'description'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Carriers' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#get_customers(opts = {}) ⇒ Customers

Allows you to retrieve the customers

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (String)

    Default is 1 (default to ‘1’)

  • :limit (String)

    Default is 100 (default to ‘100’)

  • :id (String)

    Default is nil

  • :name (String)

    Default is nil

  • :contact_filter (String)

    Default is nil

  • :modified_since (String)

    Default is nil

  • :include_deprecated (Boolean)

    Default is false (default to false)

  • :include_product_prices (Boolean)

    Default is false (default to false)

Returns:



1047
1048
1049
1050
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1047

def get_customers(opts = {})
  data, _status_code, _headers = get_customers_with_http_info(opts)
  data
end

#get_customers_with_http_info(opts = {}) ⇒ Array<(Customers, Integer, Hash)>

Allows you to retrieve the customers

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (String)

    Default is 1

  • :limit (String)

    Default is 100

  • :id (String)

    Default is nil

  • :name (String)

    Default is nil

  • :contact_filter (String)

    Default is nil

  • :modified_since (String)

    Default is nil

  • :include_deprecated (Boolean)

    Default is false

  • :include_product_prices (Boolean)

    Default is false

Returns:

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

    Customers data, response status code and response headers



1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1063

def get_customers_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.get_customers ...'
  end
  # resource path
  local_var_path = '/customer'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'Page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'Name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'ContactFilter'] = opts[:'contact_filter'] if !opts[:'contact_filter'].nil?
  query_params[:'ModifiedSince'] = opts[:'modified_since'] if !opts[:'modified_since'].nil?
  query_params[:'IncludeDeprecated'] = opts[:'include_deprecated'] if !opts[:'include_deprecated'].nil?
  query_params[:'IncludeProductPrices'] = opts[:'include_product_prices'] if !opts[:'include_product_prices'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Customers' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#get_locations(opts = {}) ⇒ Locations

Allows you to retrieve the locations

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (String)

    Default is 1 (default to ‘1’)

  • :limit (String)

    Default is 100 (default to ‘100’)

  • :id (String)

    Default is nil

  • :deprecated (Boolean)

    Default is false (default to false)

  • :name (String)

    Default is nil

Returns:



1122
1123
1124
1125
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1122

def get_locations(opts = {})
  data, _status_code, _headers = get_locations_with_http_info(opts)
  data
end

#get_locations_with_http_info(opts = {}) ⇒ Array<(Locations, Integer, Hash)>

Allows you to retrieve the locations

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (String)

    Default is 1

  • :limit (String)

    Default is 100

  • :id (String)

    Default is nil

  • :deprecated (Boolean)

    Default is false

  • :name (String)

    Default is nil

Returns:

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

    Locations data, response status code and response headers



1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1135

def get_locations_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.get_locations ...'
  end
  # resource path
  local_var_path = '/ref/location'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'Page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'Deprecated'] = opts[:'deprecated'] if !opts[:'deprecated'].nil?
  query_params[:'Name'] = opts[:'name'] if !opts[:'name'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Locations' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#get_me(opts = {}) ⇒ Me

Allows you to retrieve your information

Parameters:

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

    the optional parameters

Returns:



1186
1187
1188
1189
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1186

def get_me(opts = {})
  data, _status_code, _headers = get_me_with_http_info(opts)
  data
end

#get_me_contacts(opts = {}) ⇒ MeContacts

Allows you to retrieve the me contacts (Sales Representatives)

Parameters:

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

    the optional parameters

Returns:



1240
1241
1242
1243
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1240

def get_me_contacts(opts = {})
  data, _status_code, _headers = get_me_contacts_with_http_info(opts)
  data
end

#get_me_contacts_with_http_info(opts = {}) ⇒ Array<(MeContacts, Integer, Hash)>

Allows you to retrieve the me contacts (Sales Representatives)

Parameters:

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

    the optional parameters

Returns:

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

    MeContacts data, response status code and response headers



1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1248

def get_me_contacts_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.get_me_contacts ...'
  end
  # resource path
  local_var_path = '/me/contacts'

  # 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/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'MeContacts' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#get_me_with_http_info(opts = {}) ⇒ Array<(Me, Integer, Hash)>

Allows you to retrieve your information

Parameters:

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

    the optional parameters

Returns:

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

    Me data, response status code and response headers



1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1194

def get_me_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.get_me ...'
  end
  # resource path
  local_var_path = '/me'

  # 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/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Me' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#get_payment_terms(opts = {}) ⇒ PaymentTerms

Allows you to retrieve the payment terms

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (String)

    Default is 1 (default to ‘1’)

  • :limit (String)

    Default is 100 (default to ‘100’)

  • :id (String)

    Default is nil

  • :name (String)

    Default is nil

  • :method (String)

    Default is nil

  • :is_active (Boolean)

    Default is nil

  • :is_default (Boolean)

    Default is nil

Returns:



1301
1302
1303
1304
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1301

def get_payment_terms(opts = {})
  data, _status_code, _headers = get_payment_terms_with_http_info(opts)
  data
end

#get_payment_terms_with_http_info(opts = {}) ⇒ Array<(PaymentTerms, Integer, Hash)>

Allows you to retrieve the payment terms

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (String)

    Default is 1

  • :limit (String)

    Default is 100

  • :id (String)

    Default is nil

  • :name (String)

    Default is nil

  • :method (String)

    Default is nil

  • :is_active (Boolean)

    Default is nil

  • :is_default (Boolean)

    Default is nil

Returns:

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

    PaymentTerms data, response status code and response headers



1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1316

def get_payment_terms_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.get_payment_terms ...'
  end
  # resource path
  local_var_path = '/ref/paymentterm'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'Page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'Name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'Method'] = opts[:'method'] if !opts[:'method'].nil?
  query_params[:'IsActive'] = opts[:'is_active'] if !opts[:'is_active'].nil?
  query_params[:'IsDefault'] = opts[:'is_default'] if !opts[:'is_default'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PaymentTerms' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#get_price_tiers(opts = {}) ⇒ PriceTiers

Allows you to retrieve the Price Tiers

Parameters:

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

    the optional parameters

Returns:



1369
1370
1371
1372
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1369

def get_price_tiers(opts = {})
  data, _status_code, _headers = get_price_tiers_with_http_info(opts)
  data
end

#get_price_tiers_with_http_info(opts = {}) ⇒ Array<(PriceTiers, Integer, Hash)>

Allows you to retrieve the Price Tiers

Parameters:

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

    the optional parameters

Returns:

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

    PriceTiers data, response status code and response headers



1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1377

def get_price_tiers_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.get_price_tiers ...'
  end
  # resource path
  local_var_path = '/ref/priceTier'

  # 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/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PriceTiers' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#get_sale(opts = {}) ⇒ Sale

Allows you to retrieve the Sale

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    Default is nil

  • :combine_additional_charges (Boolean)

    Show additional charges in &#39;Lines&#39; array (default to false)

  • :hide_inventory_movements (Boolean)

    Hide inventory movements (Default &#x3D; false) (default to false)

  • :include_transactions (Boolean)

    Show related transactions (Default &#x3D; false) (default to false)

Returns:



1427
1428
1429
1430
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1427

def get_sale(opts = {})
  data, _status_code, _headers = get_sale_with_http_info(opts)
  data
end

#get_sale_invoices(opts = {}) ⇒ SaleInvoices

Allows you to retrieve the sale invoices

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :sale_id (String)

    Unique DEAR Sale ID

  • :combine_additional_charges (Boolean)

    Show additional charges in &#39;Lines&#39; array (default to false)

  • :include_product_info (Boolean)

    Show all used products in additional array (default to false)

Returns:



1492
1493
1494
1495
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1492

def get_sale_invoices(opts = {})
  data, _status_code, _headers = get_sale_invoices_with_http_info(opts)
  data
end

#get_sale_invoices_with_http_info(opts = {}) ⇒ Array<(SaleInvoices, Integer, Hash)>

Allows you to retrieve the sale invoices

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :sale_id (String)

    Unique DEAR Sale ID

  • :combine_additional_charges (Boolean)

    Show additional charges in &#39;Lines&#39; array

  • :include_product_info (Boolean)

    Show all used products in additional array

Returns:

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

    SaleInvoices data, response status code and response headers



1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1503

def get_sale_invoices_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.get_sale_invoices ...'
  end
  # resource path
  local_var_path = '/sale/invoice'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'SaleID'] = opts[:'sale_id'] if !opts[:'sale_id'].nil?
  query_params[:'CombineAdditionalCharges'] = opts[:'combine_additional_charges'] if !opts[:'combine_additional_charges'].nil?
  query_params[:'IncludeProductInfo'] = opts[:'include_product_info'] if !opts[:'include_product_info'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'SaleInvoices' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#get_sale_list(opts = {}) ⇒ SaleList

Allows you to retrieve the Sales based on conditions

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (String)

    Default is 1 (default to ‘1’)

  • :limit (String)

    Default is 100 (default to ‘100’)

  • :search (String)

    Only return sales with search value contained in one of these fields: OrderNumber, Status, Customer, invoiceNumber, CustomerReference, CreditNoteNumber

  • :created_since (DateTime)

    Only return sales created after specified date. Date must follow ISO 8601 format.

  • :updated_since (DateTime)

    Only return sales changed after specified date. Date must follow ISO 8601 format.

  • :ship_by (DateTime)

    Only return sales with Ship By date on or before specified date, with not authorised Shipment. Date must follow ISO 8601 format.

  • :quote_status (String)

    Only return sales with specified quote status

  • :order_status (String)

    Only return sales with specified order status

  • :combined_pick_status (String)

    Only return sales with specified CombinedPickingStatus

  • :combined_pack_status (String)

    Only return sales with specified CombinedPackingStatus

  • :combined_shipping_status (String)

    Only return sales with specified CombinedShippingStatus

  • :combined_invoice_status (String)

    Only return sales with specified CombinedInvoiceStatus

  • :credit_note_status (String)

    Only return sales with specified credit note status

  • :external_id (String)

    Only return sales with specified External ID

  • :status (String)

    Default is nil

  • :ready_for_shipping (Boolean)

    Only return sales with &#39;Authorised&#39; pack and not &#39;Authorised&#39; shipping

  • :order_location_id (String)

    Only return sales with specified Order Location ID

Returns:



1569
1570
1571
1572
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1569

def get_sale_list(opts = {})
  data, _status_code, _headers = get_sale_list_with_http_info(opts)
  data
end

#get_sale_list_with_http_info(opts = {}) ⇒ Array<(SaleList, Integer, Hash)>

Allows you to retrieve the Sales based on conditions

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (String)

    Default is 1

  • :limit (String)

    Default is 100

  • :search (String)

    Only return sales with search value contained in one of these fields: OrderNumber, Status, Customer, invoiceNumber, CustomerReference, CreditNoteNumber

  • :created_since (DateTime)

    Only return sales created after specified date. Date must follow ISO 8601 format.

  • :updated_since (DateTime)

    Only return sales changed after specified date. Date must follow ISO 8601 format.

  • :ship_by (DateTime)

    Only return sales with Ship By date on or before specified date, with not authorised Shipment. Date must follow ISO 8601 format.

  • :quote_status (String)

    Only return sales with specified quote status

  • :order_status (String)

    Only return sales with specified order status

  • :combined_pick_status (String)

    Only return sales with specified CombinedPickingStatus

  • :combined_pack_status (String)

    Only return sales with specified CombinedPackingStatus

  • :combined_shipping_status (String)

    Only return sales with specified CombinedShippingStatus

  • :combined_invoice_status (String)

    Only return sales with specified CombinedInvoiceStatus

  • :credit_note_status (String)

    Only return sales with specified credit note status

  • :external_id (String)

    Only return sales with specified External ID

  • :status (String)

    Default is nil

  • :ready_for_shipping (Boolean)

    Only return sales with &#39;Authorised&#39; pack and not &#39;Authorised&#39; shipping

  • :order_location_id (String)

    Only return sales with specified Order Location ID

Returns:

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

    SaleList data, response status code and response headers



1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1594

def get_sale_list_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.get_sale_list ...'
  end
  # resource path
  local_var_path = '/saleList'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'Page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'Search'] = opts[:'search'] if !opts[:'search'].nil?
  query_params[:'CreatedSince'] = opts[:'created_since'] if !opts[:'created_since'].nil?
  query_params[:'UpdatedSince'] = opts[:'updated_since'] if !opts[:'updated_since'].nil?
  query_params[:'ShipBy'] = opts[:'ship_by'] if !opts[:'ship_by'].nil?
  query_params[:'QuoteStatus'] = opts[:'quote_status'] if !opts[:'quote_status'].nil?
  query_params[:'OrderStatus'] = opts[:'order_status'] if !opts[:'order_status'].nil?
  query_params[:'CombinedPickStatus'] = opts[:'combined_pick_status'] if !opts[:'combined_pick_status'].nil?
  query_params[:'CombinedPackStatus'] = opts[:'combined_pack_status'] if !opts[:'combined_pack_status'].nil?
  query_params[:'CombinedShippingStatus'] = opts[:'combined_shipping_status'] if !opts[:'combined_shipping_status'].nil?
  query_params[:'CombinedInvoiceStatus'] = opts[:'combined_invoice_status'] if !opts[:'combined_invoice_status'].nil?
  query_params[:'CreditNoteStatus'] = opts[:'credit_note_status'] if !opts[:'credit_note_status'].nil?
  query_params[:'ExternalID'] = opts[:'external_id'] if !opts[:'external_id'].nil?
  query_params[:'Status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'ReadyForShipping'] = opts[:'ready_for_shipping'] if !opts[:'ready_for_shipping'].nil?
  query_params[:'OrderLocationID'] = opts[:'order_location_id'] if !opts[:'order_location_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'SaleList' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#get_sale_order(opts = {}) ⇒ SaleOrder

Allows you to retrieve the Sale Order

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :sale_id (String)

    Unique DEAR Sale ID

  • :combine_additional_charges (Boolean)

    Show additional charges in &#39;Lines&#39; array (default to false)

  • :include_product_info (Boolean)

    Show all used products in additional array (default to false)

Returns:



1660
1661
1662
1663
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1660

def get_sale_order(opts = {})
  data, _status_code, _headers = get_sale_order_with_http_info(opts)
  data
end

#get_sale_order_with_http_info(opts = {}) ⇒ Array<(SaleOrder, Integer, Hash)>

Allows you to retrieve the Sale Order

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :sale_id (String)

    Unique DEAR Sale ID

  • :combine_additional_charges (Boolean)

    Show additional charges in &#39;Lines&#39; array

  • :include_product_info (Boolean)

    Show all used products in additional array

Returns:

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

    SaleOrder data, response status code and response headers



1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1671

def get_sale_order_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.get_sale_order ...'
  end
  # resource path
  local_var_path = '/sale/order'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'SaleID'] = opts[:'sale_id'] if !opts[:'sale_id'].nil?
  query_params[:'CombineAdditionalCharges'] = opts[:'combine_additional_charges'] if !opts[:'combine_additional_charges'].nil?
  query_params[:'IncludeProductInfo'] = opts[:'include_product_info'] if !opts[:'include_product_info'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'SaleOrder' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#get_sale_payment(opts = {}) ⇒ Array<SalePayment>

Allows you to retrieve the Sale Payments

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :sale_id (String)

    Unique DEAR Sale ID

Returns:



1721
1722
1723
1724
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1721

def get_sale_payment(opts = {})
  data, _status_code, _headers = get_sale_payment_with_http_info(opts)
  data
end

#get_sale_payment_with_http_info(opts = {}) ⇒ Array<(Array<SalePayment>, Integer, Hash)>

Allows you to retrieve the Sale Payments

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :sale_id (String)

    Unique DEAR Sale ID

Returns:

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

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



1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1730

def get_sale_payment_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.get_sale_payment ...'
  end
  # resource path
  local_var_path = '/sale/payment'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'SaleID'] = opts[:'sale_id'] if !opts[:'sale_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Array<SalePayment>' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#get_sale_quote(opts = {}) ⇒ SaleQuote

Allows you to retrieve the Sale Quote

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :sale_id (String)

    Unique DEAR Sale ID

  • :combine_additional_charges (Boolean)

    Show additional charges in &#39;Lines&#39; array (default to false)

  • :include_product_info (Boolean)

    Show all used products in additional array (default to false)

Returns:



1780
1781
1782
1783
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1780

def get_sale_quote(opts = {})
  data, _status_code, _headers = get_sale_quote_with_http_info(opts)
  data
end

#get_sale_quote_with_http_info(opts = {}) ⇒ Array<(SaleQuote, Integer, Hash)>

Allows you to retrieve the Sale Quote

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :sale_id (String)

    Unique DEAR Sale ID

  • :combine_additional_charges (Boolean)

    Show additional charges in &#39;Lines&#39; array

  • :include_product_info (Boolean)

    Show all used products in additional array

Returns:

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

    SaleQuote data, response status code and response headers



1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1791

def get_sale_quote_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.get_sale_quote ...'
  end
  # resource path
  local_var_path = '/sale/quote'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'SaleID'] = opts[:'sale_id'] if !opts[:'sale_id'].nil?
  query_params[:'CombineAdditionalCharges'] = opts[:'combine_additional_charges'] if !opts[:'combine_additional_charges'].nil?
  query_params[:'IncludeProductInfo'] = opts[:'include_product_info'] if !opts[:'include_product_info'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'SaleQuote' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#get_sale_with_http_info(opts = {}) ⇒ Array<(Sale, Integer, Hash)>

Allows you to retrieve the Sale

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    Default is nil

  • :combine_additional_charges (Boolean)

    Show additional charges in &#39;Lines&#39; array

  • :hide_inventory_movements (Boolean)

    Hide inventory movements (Default &#x3D; false)

  • :include_transactions (Boolean)

    Show related transactions (Default &#x3D; false)

Returns:

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

    Sale data, response status code and response headers



1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1439

def get_sale_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.get_sale ...'
  end
  # resource path
  local_var_path = '/sale'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'CombineAdditionalCharges'] = opts[:'combine_additional_charges'] if !opts[:'combine_additional_charges'].nil?
  query_params[:'HideInventoryMovements'] = opts[:'hide_inventory_movements'] if !opts[:'hide_inventory_movements'].nil?
  query_params[:'IncludeTransactions'] = opts[:'include_transactions'] if !opts[:'include_transactions'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Sale' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#get_taxes(opts = {}) ⇒ Taxes

Allows you to retrieve the taxes

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (String)

    Default is 1 (default to ‘1’)

  • :limit (String)

    Default is 100 (default to ‘100’)

  • :id (String)

    Default is nil

  • :name (String)

    Default is nil

  • :is_active (Boolean)

    Default is nil

  • :is_tax_for_sale (Boolean)

    Default is nil

  • :is_tax_for_purchase (Boolean)

    Default is nil

  • :account (String)

    Default is nil

Returns:



1848
1849
1850
1851
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1848

def get_taxes(opts = {})
  data, _status_code, _headers = get_taxes_with_http_info(opts)
  data
end

#get_taxes_with_http_info(opts = {}) ⇒ Array<(Taxes, Integer, Hash)>

Allows you to retrieve the taxes

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (String)

    Default is 1

  • :limit (String)

    Default is 100

  • :id (String)

    Default is nil

  • :name (String)

    Default is nil

  • :is_active (Boolean)

    Default is nil

  • :is_tax_for_sale (Boolean)

    Default is nil

  • :is_tax_for_purchase (Boolean)

    Default is nil

  • :account (String)

    Default is nil

Returns:

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

    Taxes data, response status code and response headers



1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1864

def get_taxes_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.get_taxes ...'
  end
  # resource path
  local_var_path = '/ref/tax'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'Page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'Name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'IsActive'] = opts[:'is_active'] if !opts[:'is_active'].nil?
  query_params[:'IsTaxForSale'] = opts[:'is_tax_for_sale'] if !opts[:'is_tax_for_sale'].nil?
  query_params[:'IsTaxForPurchase'] = opts[:'is_tax_for_purchase'] if !opts[:'is_tax_for_purchase'].nil?
  query_params[:'Account'] = opts[:'account'] if !opts[:'account'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Taxes' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#get_webhooks(opts = {}) ⇒ Webhooks

Allows you to retrieve the Webhooks

Parameters:

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

    the optional parameters

Returns:



1918
1919
1920
1921
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1918

def get_webhooks(opts = {})
  data, _status_code, _headers = get_webhooks_with_http_info(opts)
  data
end

#get_webhooks_with_http_info(opts = {}) ⇒ Array<(Webhooks, Integer, Hash)>

Allows you to retrieve the Webhooks

Parameters:

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

    the optional parameters

Returns:

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

    Webhooks data, response status code and response headers



1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1926

def get_webhooks_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.get_webhooks ...'
  end
  # resource path
  local_var_path = '/webhooks'

  # 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/json'])

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

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Webhooks' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#update_account(account, opts = {}) ⇒ Accounts

Allows you to update an Account

Parameters:

  • account (Account)

    an Account object with properties to update

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)

Returns:



1974
1975
1976
1977
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1974

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

#update_account_with_http_info(account, opts = {}) ⇒ Array<(Accounts, Integer, Hash)>

Allows you to update an Account

Parameters:

  • account (Account)

    an Account object with properties to update

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors

Returns:

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

    Accounts data, response status code and response headers



1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 1984

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.update_account ...'
  end
  # verify the required parameter 'account' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account' when calling InventoryApi.update_account"
  end
  # resource path
  local_var_path = '/ref/account'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Accounts' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#update_customer(customer, opts = {}) ⇒ Customers

Allows you to update a customer

Parameters:

  • customer (Customer)

    a customer object with properties to update

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)

Returns:



2039
2040
2041
2042
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 2039

def update_customer(customer, opts = {})
  data, _status_code, _headers = update_customer_with_http_info(customer, opts)
  data
end

#update_customer_with_http_info(customer, opts = {}) ⇒ Array<(Customers, Integer, Hash)>

Allows you to update a customer

Parameters:

  • customer (Customer)

    a customer object with properties to update

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors

Returns:

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

    Customers data, response status code and response headers



2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 2049

def update_customer_with_http_info(customer, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.update_customer ...'
  end
  # verify the required parameter 'customer' is set
  if @api_client.config.client_side_validation && customer.nil?
    fail ArgumentError, "Missing the required parameter 'customer' when calling InventoryApi.update_customer"
  end
  # resource path
  local_var_path = '/customer'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Customers' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#update_payment_term(payment_term, opts = {}) ⇒ PaymentTerms

Allows you to update a payment term

Parameters:

  • payment_term (PaymentTerm)

    a payment term object with properties to update

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)

Returns:



2104
2105
2106
2107
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 2104

def update_payment_term(payment_term, opts = {})
  data, _status_code, _headers = update_payment_term_with_http_info(payment_term, opts)
  data
end

#update_payment_term_with_http_info(payment_term, opts = {}) ⇒ Array<(PaymentTerms, Integer, Hash)>

Allows you to update a payment term

Parameters:

  • payment_term (PaymentTerm)

    a payment term object with properties to update

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors

Returns:

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

    PaymentTerms data, response status code and response headers



2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 2114

def update_payment_term_with_http_info(payment_term, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.update_payment_term ...'
  end
  # verify the required parameter 'payment_term' is set
  if @api_client.config.client_side_validation && payment_term.nil?
    fail ArgumentError, "Missing the required parameter 'payment_term' when calling InventoryApi.update_payment_term"
  end
  # resource path
  local_var_path = '/ref/paymentterm'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'PaymentTerms' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#update_sale_payment(sale_payment, opts = {}) ⇒ SalePayment

Allows you to update a sale payment

Parameters:

  • sale_payment (SalePayment)

    a sale payment object with properties to update

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)

Returns:



2169
2170
2171
2172
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 2169

def update_sale_payment(sale_payment, opts = {})
  data, _status_code, _headers = update_sale_payment_with_http_info(sale_payment, opts)
  data
end

#update_sale_payment_with_http_info(sale_payment, opts = {}) ⇒ Array<(SalePayment, Integer, Hash)>

Allows you to update a sale payment

Parameters:

  • sale_payment (SalePayment)

    a sale payment object with properties to update

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors

Returns:

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

    SalePayment data, response status code and response headers



2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 2179

def update_sale_payment_with_http_info(sale_payment, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.update_sale_payment ...'
  end
  # verify the required parameter 'sale_payment' is set
  if @api_client.config.client_side_validation && sale_payment.nil?
    fail ArgumentError, "Missing the required parameter 'sale_payment' when calling InventoryApi.update_sale_payment"
  end
  # resource path
  local_var_path = '/sale/payment'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'SalePayment' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#update_tax(tax, opts = {}) ⇒ Taxes

Allows you to update a tax

Parameters:

  • tax (Tax)

    a tax object with properties to update

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)

Returns:



2234
2235
2236
2237
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 2234

def update_tax(tax, opts = {})
  data, _status_code, _headers = update_tax_with_http_info(tax, opts)
  data
end

#update_tax_with_http_info(tax, opts = {}) ⇒ Array<(Taxes, Integer, Hash)>

Allows you to update a tax

Parameters:

  • tax (Tax)

    a tax object with properties to update

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors

Returns:

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

    Taxes data, response status code and response headers



2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 2244

def update_tax_with_http_info(tax, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.update_tax ...'
  end
  # verify the required parameter 'tax' is set
  if @api_client.config.client_side_validation && tax.nil?
    fail ArgumentError, "Missing the required parameter 'tax' when calling InventoryApi.update_tax"
  end
  # resource path
  local_var_path = '/ref/tax'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Taxes' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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

#update_webhook(webhook, opts = {}) ⇒ Webhook

Allows you to update a webhook

Parameters:

  • webhook (Webhook)

    a webhook object with properties to update

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)

Returns:



2299
2300
2301
2302
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 2299

def update_webhook(webhook, opts = {})
  data, _status_code, _headers = update_webhook_with_http_info(webhook, opts)
  data
end

#update_webhook_with_http_info(webhook, opts = {}) ⇒ Array<(Webhook, Integer, Hash)>

Allows you to update a webhook

Parameters:

  • webhook (Webhook)

    a webhook object with properties to update

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

    the optional parameters

Options Hash (opts):

  • :summarize_errors (Boolean)

    If false return 200 OK and mix of successfully created objects and any with validation errors

Returns:

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

    Webhook data, response status code and response headers



2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
# File 'lib/dear-inventory-ruby/api/inventory_api.rb', line 2309

def update_webhook_with_http_info(webhook, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InventoryApi.update_webhook ...'
  end
  # verify the required parameter 'webhook' is set
  if @api_client.config.client_side_validation && webhook.nil?
    fail ArgumentError, "Missing the required parameter 'webhook' when calling InventoryApi.update_webhook"
  end
  # resource path
  local_var_path = '/webhooks'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Webhook' 

  # auth_names
  auth_names = opts[:auth_names] || ['accountID', 'appKey']

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