dear-inventory-ruby 0.1.18 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +30 -10
- data/README.md +32 -5
- data/docs/Address.md +10 -12
- data/docs/Customer.md +1 -1
- data/docs/ExternalHeader.md +19 -0
- data/docs/InventoryApi.md +1021 -161
- data/docs/SaleAdditionalCharge.md +31 -0
- data/docs/SaleInvoice.md +1 -1
- data/docs/SaleInvoiceAdditionalCharge.md +3 -3
- data/docs/SaleInvoiceDelete.md +19 -0
- data/docs/SaleInvoiceLine.md +2 -2
- data/docs/SaleInvoicePost.md +41 -0
- data/docs/SaleOrder.md +35 -0
- data/docs/SaleOrderLine.md +41 -0
- data/docs/SalePayment.md +43 -0
- data/docs/SaleQuote.md +33 -0
- data/docs/SaleQuoteLine.md +37 -0
- data/docs/ShippingAddress.md +37 -0
- data/docs/SupplierCustomerAddress.md +33 -0
- data/docs/Webhook.md +35 -0
- data/docs/Webhooks.md +17 -0
- data/lib/dear-inventory-ruby/api/inventory_api.rb +988 -119
- data/lib/dear-inventory-ruby/models/address.rb +28 -115
- data/lib/dear-inventory-ruby/models/customer.rb +1 -1
- data/lib/dear-inventory-ruby/models/external_header.rb +217 -0
- data/lib/dear-inventory-ruby/models/sale_additional_charge.rb +302 -0
- data/lib/dear-inventory-ruby/models/sale_invoice.rb +1 -1
- data/lib/dear-inventory-ruby/models/sale_invoice_additional_charge.rb +3 -3
- data/lib/dear-inventory-ruby/models/sale_invoice_delete.rb +224 -0
- data/lib/dear-inventory-ruby/models/sale_invoice_line.rb +0 -10
- data/lib/dear-inventory-ruby/models/sale_invoice_post.rb +361 -0
- data/lib/dear-inventory-ruby/models/sale_order.rb +336 -0
- data/lib/dear-inventory-ruby/models/sale_order_line.rb +342 -0
- data/lib/dear-inventory-ruby/models/sale_payment.rb +337 -0
- data/lib/dear-inventory-ruby/models/sale_quote.rb +326 -0
- data/lib/dear-inventory-ruby/models/sale_quote_line.rb +322 -0
- data/lib/dear-inventory-ruby/models/shipping_address.rb +317 -0
- data/lib/dear-inventory-ruby/models/supplier_customer_address.rb +374 -0
- data/lib/dear-inventory-ruby/models/webhook.rb +319 -0
- data/lib/dear-inventory-ruby/models/webhooks.rb +209 -0
- data/lib/dear-inventory-ruby/version.rb +1 -1
- data/lib/dear-inventory-ruby.rb +13 -0
- data/spec/api/inventory_api_spec.rb +166 -0
- data/spec/models/address_spec.rb +7 -13
- data/spec/models/external_header_spec.rb +47 -0
- data/spec/models/sale_additional_charge_spec.rb +83 -0
- data/spec/models/sale_invoice_delete_spec.rb +47 -0
- data/spec/models/sale_invoice_post_spec.rb +113 -0
- data/spec/models/sale_order_line_spec.rb +113 -0
- data/spec/models/sale_order_spec.rb +95 -0
- data/spec/models/sale_payment_spec.rb +119 -0
- data/spec/models/sale_quote_line_spec.rb +101 -0
- data/spec/models/sale_quote_spec.rb +89 -0
- data/spec/models/shipping_address_spec.rb +101 -0
- data/spec/models/supplier_customer_address_spec.rb +89 -0
- data/spec/models/webhook_spec.rb +95 -0
- data/spec/models/webhooks_spec.rb +41 -0
- metadata +55 -4
- data/spec/.DS_Store +0 -0
@@ -214,51 +214,550 @@ module DearInventoryRuby
|
|
214
214
|
return data, status_code, headers
|
215
215
|
end
|
216
216
|
|
217
|
+
# Allows you to create a sale invoice
|
218
|
+
# @param sale_invoice_post [SaleInvoicePost] a Sale Invoice object with properties to create
|
219
|
+
# @param [Hash] opts the optional parameters
|
220
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
221
|
+
# @return [SaleInvoices]
|
222
|
+
def create_sale_invoice(sale_invoice_post, opts = {})
|
223
|
+
data, _status_code, _headers = create_sale_invoice_with_http_info(sale_invoice_post, opts)
|
224
|
+
data
|
225
|
+
end
|
226
|
+
|
227
|
+
# Allows you to create a sale invoice
|
228
|
+
# @param sale_invoice_post [SaleInvoicePost] a Sale Invoice object with properties to create
|
229
|
+
# @param [Hash] opts the optional parameters
|
230
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
231
|
+
# @return [Array<(SaleInvoices, Integer, Hash)>] SaleInvoices data, response status code and response headers
|
232
|
+
def create_sale_invoice_with_http_info(sale_invoice_post, opts = {})
|
233
|
+
if @api_client.config.debugging
|
234
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.create_sale_invoice ...'
|
235
|
+
end
|
236
|
+
# verify the required parameter 'sale_invoice_post' is set
|
237
|
+
if @api_client.config.client_side_validation && sale_invoice_post.nil?
|
238
|
+
fail ArgumentError, "Missing the required parameter 'sale_invoice_post' when calling InventoryApi.create_sale_invoice"
|
239
|
+
end
|
240
|
+
# resource path
|
241
|
+
local_var_path = '/sale/invoice'
|
242
|
+
|
243
|
+
# query parameters
|
244
|
+
query_params = opts[:query_params] || {}
|
245
|
+
query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
|
246
|
+
|
247
|
+
# header parameters
|
248
|
+
header_params = opts[:header_params] || {}
|
249
|
+
# HTTP header 'Accept' (if needed)
|
250
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
251
|
+
# HTTP header 'Content-Type'
|
252
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
253
|
+
|
254
|
+
# form parameters
|
255
|
+
form_params = opts[:form_params] || {}
|
256
|
+
|
257
|
+
# http body (model)
|
258
|
+
post_body = opts[:body] || @api_client.object_to_http_body(sale_invoice_post)
|
259
|
+
|
260
|
+
# return_type
|
261
|
+
return_type = opts[:return_type] || 'SaleInvoices'
|
262
|
+
|
263
|
+
# auth_names
|
264
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
265
|
+
|
266
|
+
new_options = opts.merge(
|
267
|
+
:header_params => header_params,
|
268
|
+
:query_params => query_params,
|
269
|
+
:form_params => form_params,
|
270
|
+
:body => post_body,
|
271
|
+
:auth_names => auth_names,
|
272
|
+
:return_type => return_type
|
273
|
+
)
|
274
|
+
|
275
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
276
|
+
if @api_client.config.debugging
|
277
|
+
@api_client.config.logger.debug "API called: InventoryApi#create_sale_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
278
|
+
end
|
279
|
+
return data, status_code, headers
|
280
|
+
end
|
281
|
+
|
282
|
+
# Allows you to create a Sale Order
|
283
|
+
# @param sale_order [SaleOrder] a Sale Order object with properties to create
|
284
|
+
# @param [Hash] opts the optional parameters
|
285
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
286
|
+
# @return [SaleOrder]
|
287
|
+
def create_sale_order(sale_order, opts = {})
|
288
|
+
data, _status_code, _headers = create_sale_order_with_http_info(sale_order, opts)
|
289
|
+
data
|
290
|
+
end
|
291
|
+
|
292
|
+
# Allows you to create a Sale Order
|
293
|
+
# @param sale_order [SaleOrder] a Sale Order object with properties to create
|
294
|
+
# @param [Hash] opts the optional parameters
|
295
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
296
|
+
# @return [Array<(SaleOrder, Integer, Hash)>] SaleOrder data, response status code and response headers
|
297
|
+
def create_sale_order_with_http_info(sale_order, opts = {})
|
298
|
+
if @api_client.config.debugging
|
299
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.create_sale_order ...'
|
300
|
+
end
|
301
|
+
# verify the required parameter 'sale_order' is set
|
302
|
+
if @api_client.config.client_side_validation && sale_order.nil?
|
303
|
+
fail ArgumentError, "Missing the required parameter 'sale_order' when calling InventoryApi.create_sale_order"
|
304
|
+
end
|
305
|
+
# resource path
|
306
|
+
local_var_path = '/sale/order'
|
307
|
+
|
308
|
+
# query parameters
|
309
|
+
query_params = opts[:query_params] || {}
|
310
|
+
query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
|
311
|
+
|
312
|
+
# header parameters
|
313
|
+
header_params = opts[:header_params] || {}
|
314
|
+
# HTTP header 'Accept' (if needed)
|
315
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
316
|
+
# HTTP header 'Content-Type'
|
317
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
318
|
+
|
319
|
+
# form parameters
|
320
|
+
form_params = opts[:form_params] || {}
|
321
|
+
|
322
|
+
# http body (model)
|
323
|
+
post_body = opts[:body] || @api_client.object_to_http_body(sale_order)
|
324
|
+
|
325
|
+
# return_type
|
326
|
+
return_type = opts[:return_type] || 'SaleOrder'
|
327
|
+
|
328
|
+
# auth_names
|
329
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
330
|
+
|
331
|
+
new_options = opts.merge(
|
332
|
+
:header_params => header_params,
|
333
|
+
:query_params => query_params,
|
334
|
+
:form_params => form_params,
|
335
|
+
:body => post_body,
|
336
|
+
:auth_names => auth_names,
|
337
|
+
:return_type => return_type
|
338
|
+
)
|
339
|
+
|
340
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
341
|
+
if @api_client.config.debugging
|
342
|
+
@api_client.config.logger.debug "API called: InventoryApi#create_sale_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
343
|
+
end
|
344
|
+
return data, status_code, headers
|
345
|
+
end
|
346
|
+
|
347
|
+
# Allows you to create a Sale Payment
|
348
|
+
# @param sale_payment [SalePayment] a Sale Payment object with properties to create
|
349
|
+
# @param [Hash] opts the optional parameters
|
350
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
351
|
+
# @return [SalePayment]
|
352
|
+
def create_sale_payment(sale_payment, opts = {})
|
353
|
+
data, _status_code, _headers = create_sale_payment_with_http_info(sale_payment, opts)
|
354
|
+
data
|
355
|
+
end
|
356
|
+
|
357
|
+
# Allows you to create a Sale Payment
|
358
|
+
# @param sale_payment [SalePayment] a Sale Payment object with properties to create
|
359
|
+
# @param [Hash] opts the optional parameters
|
360
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
361
|
+
# @return [Array<(SalePayment, Integer, Hash)>] SalePayment data, response status code and response headers
|
362
|
+
def create_sale_payment_with_http_info(sale_payment, opts = {})
|
363
|
+
if @api_client.config.debugging
|
364
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.create_sale_payment ...'
|
365
|
+
end
|
366
|
+
# verify the required parameter 'sale_payment' is set
|
367
|
+
if @api_client.config.client_side_validation && sale_payment.nil?
|
368
|
+
fail ArgumentError, "Missing the required parameter 'sale_payment' when calling InventoryApi.create_sale_payment"
|
369
|
+
end
|
370
|
+
# resource path
|
371
|
+
local_var_path = '/sale/payment'
|
372
|
+
|
373
|
+
# query parameters
|
374
|
+
query_params = opts[:query_params] || {}
|
375
|
+
query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
|
376
|
+
|
377
|
+
# header parameters
|
378
|
+
header_params = opts[:header_params] || {}
|
379
|
+
# HTTP header 'Accept' (if needed)
|
380
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
381
|
+
# HTTP header 'Content-Type'
|
382
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
383
|
+
|
384
|
+
# form parameters
|
385
|
+
form_params = opts[:form_params] || {}
|
386
|
+
|
387
|
+
# http body (model)
|
388
|
+
post_body = opts[:body] || @api_client.object_to_http_body(sale_payment)
|
389
|
+
|
390
|
+
# return_type
|
391
|
+
return_type = opts[:return_type] || 'SalePayment'
|
392
|
+
|
393
|
+
# auth_names
|
394
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
395
|
+
|
396
|
+
new_options = opts.merge(
|
397
|
+
:header_params => header_params,
|
398
|
+
:query_params => query_params,
|
399
|
+
:form_params => form_params,
|
400
|
+
:body => post_body,
|
401
|
+
:auth_names => auth_names,
|
402
|
+
:return_type => return_type
|
403
|
+
)
|
404
|
+
|
405
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
406
|
+
if @api_client.config.debugging
|
407
|
+
@api_client.config.logger.debug "API called: InventoryApi#create_sale_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
408
|
+
end
|
409
|
+
return data, status_code, headers
|
410
|
+
end
|
411
|
+
|
412
|
+
# Allows you to create a Sale Quote
|
413
|
+
# @param sale_quote [SaleQuote] a Sale Quote object with properties to create
|
414
|
+
# @param [Hash] opts the optional parameters
|
415
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
416
|
+
# @return [SaleQuote]
|
417
|
+
def create_sale_quote(sale_quote, opts = {})
|
418
|
+
data, _status_code, _headers = create_sale_quote_with_http_info(sale_quote, opts)
|
419
|
+
data
|
420
|
+
end
|
421
|
+
|
422
|
+
# Allows you to create a Sale Quote
|
423
|
+
# @param sale_quote [SaleQuote] a Sale Quote object with properties to create
|
424
|
+
# @param [Hash] opts the optional parameters
|
425
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
426
|
+
# @return [Array<(SaleQuote, Integer, Hash)>] SaleQuote data, response status code and response headers
|
427
|
+
def create_sale_quote_with_http_info(sale_quote, opts = {})
|
428
|
+
if @api_client.config.debugging
|
429
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.create_sale_quote ...'
|
430
|
+
end
|
431
|
+
# verify the required parameter 'sale_quote' is set
|
432
|
+
if @api_client.config.client_side_validation && sale_quote.nil?
|
433
|
+
fail ArgumentError, "Missing the required parameter 'sale_quote' when calling InventoryApi.create_sale_quote"
|
434
|
+
end
|
435
|
+
# resource path
|
436
|
+
local_var_path = '/sale/quote'
|
437
|
+
|
438
|
+
# query parameters
|
439
|
+
query_params = opts[:query_params] || {}
|
440
|
+
query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
|
441
|
+
|
442
|
+
# header parameters
|
443
|
+
header_params = opts[:header_params] || {}
|
444
|
+
# HTTP header 'Accept' (if needed)
|
445
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
446
|
+
# HTTP header 'Content-Type'
|
447
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
448
|
+
|
449
|
+
# form parameters
|
450
|
+
form_params = opts[:form_params] || {}
|
451
|
+
|
452
|
+
# http body (model)
|
453
|
+
post_body = opts[:body] || @api_client.object_to_http_body(sale_quote)
|
454
|
+
|
455
|
+
# return_type
|
456
|
+
return_type = opts[:return_type] || 'SaleQuote'
|
457
|
+
|
458
|
+
# auth_names
|
459
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
460
|
+
|
461
|
+
new_options = opts.merge(
|
462
|
+
:header_params => header_params,
|
463
|
+
:query_params => query_params,
|
464
|
+
:form_params => form_params,
|
465
|
+
:body => post_body,
|
466
|
+
:auth_names => auth_names,
|
467
|
+
:return_type => return_type
|
468
|
+
)
|
469
|
+
|
470
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
471
|
+
if @api_client.config.debugging
|
472
|
+
@api_client.config.logger.debug "API called: InventoryApi#create_sale_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
473
|
+
end
|
474
|
+
return data, status_code, headers
|
475
|
+
end
|
476
|
+
|
217
477
|
# Allows you to create a tax
|
218
478
|
# @param tax [Tax] a tax object with properties to create
|
219
479
|
# @param [Hash] opts the optional parameters
|
220
|
-
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
221
|
-
# @return [Taxes]
|
222
|
-
def create_tax(tax, opts = {})
|
223
|
-
data, _status_code, _headers = create_tax_with_http_info(tax, opts)
|
480
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
481
|
+
# @return [Taxes]
|
482
|
+
def create_tax(tax, opts = {})
|
483
|
+
data, _status_code, _headers = create_tax_with_http_info(tax, opts)
|
484
|
+
data
|
485
|
+
end
|
486
|
+
|
487
|
+
# Allows you to create a tax
|
488
|
+
# @param tax [Tax] a tax object with properties to create
|
489
|
+
# @param [Hash] opts the optional parameters
|
490
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
491
|
+
# @return [Array<(Taxes, Integer, Hash)>] Taxes data, response status code and response headers
|
492
|
+
def create_tax_with_http_info(tax, opts = {})
|
493
|
+
if @api_client.config.debugging
|
494
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.create_tax ...'
|
495
|
+
end
|
496
|
+
# verify the required parameter 'tax' is set
|
497
|
+
if @api_client.config.client_side_validation && tax.nil?
|
498
|
+
fail ArgumentError, "Missing the required parameter 'tax' when calling InventoryApi.create_tax"
|
499
|
+
end
|
500
|
+
# resource path
|
501
|
+
local_var_path = '/ref/tax'
|
502
|
+
|
503
|
+
# query parameters
|
504
|
+
query_params = opts[:query_params] || {}
|
505
|
+
query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
|
506
|
+
|
507
|
+
# header parameters
|
508
|
+
header_params = opts[:header_params] || {}
|
509
|
+
# HTTP header 'Accept' (if needed)
|
510
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
511
|
+
# HTTP header 'Content-Type'
|
512
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
513
|
+
|
514
|
+
# form parameters
|
515
|
+
form_params = opts[:form_params] || {}
|
516
|
+
|
517
|
+
# http body (model)
|
518
|
+
post_body = opts[:body] || @api_client.object_to_http_body(tax)
|
519
|
+
|
520
|
+
# return_type
|
521
|
+
return_type = opts[:return_type] || 'Taxes'
|
522
|
+
|
523
|
+
# auth_names
|
524
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
525
|
+
|
526
|
+
new_options = opts.merge(
|
527
|
+
:header_params => header_params,
|
528
|
+
:query_params => query_params,
|
529
|
+
:form_params => form_params,
|
530
|
+
:body => post_body,
|
531
|
+
:auth_names => auth_names,
|
532
|
+
:return_type => return_type
|
533
|
+
)
|
534
|
+
|
535
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
536
|
+
if @api_client.config.debugging
|
537
|
+
@api_client.config.logger.debug "API called: InventoryApi#create_tax\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
538
|
+
end
|
539
|
+
return data, status_code, headers
|
540
|
+
end
|
541
|
+
|
542
|
+
# Allows you to create a Webhook
|
543
|
+
# @param webhook [Webhook] a webhook object with properties to create
|
544
|
+
# @param [Hash] opts the optional parameters
|
545
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
546
|
+
# @return [Webhooks]
|
547
|
+
def create_webhook(webhook, opts = {})
|
548
|
+
data, _status_code, _headers = create_webhook_with_http_info(webhook, opts)
|
549
|
+
data
|
550
|
+
end
|
551
|
+
|
552
|
+
# Allows you to create a Webhook
|
553
|
+
# @param webhook [Webhook] a webhook object with properties to create
|
554
|
+
# @param [Hash] opts the optional parameters
|
555
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
556
|
+
# @return [Array<(Webhooks, Integer, Hash)>] Webhooks data, response status code and response headers
|
557
|
+
def create_webhook_with_http_info(webhook, opts = {})
|
558
|
+
if @api_client.config.debugging
|
559
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.create_webhook ...'
|
560
|
+
end
|
561
|
+
# verify the required parameter 'webhook' is set
|
562
|
+
if @api_client.config.client_side_validation && webhook.nil?
|
563
|
+
fail ArgumentError, "Missing the required parameter 'webhook' when calling InventoryApi.create_webhook"
|
564
|
+
end
|
565
|
+
# resource path
|
566
|
+
local_var_path = '/webhooks'
|
567
|
+
|
568
|
+
# query parameters
|
569
|
+
query_params = opts[:query_params] || {}
|
570
|
+
query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
|
571
|
+
|
572
|
+
# header parameters
|
573
|
+
header_params = opts[:header_params] || {}
|
574
|
+
# HTTP header 'Accept' (if needed)
|
575
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
576
|
+
# HTTP header 'Content-Type'
|
577
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
578
|
+
|
579
|
+
# form parameters
|
580
|
+
form_params = opts[:form_params] || {}
|
581
|
+
|
582
|
+
# http body (model)
|
583
|
+
post_body = opts[:body] || @api_client.object_to_http_body(webhook)
|
584
|
+
|
585
|
+
# return_type
|
586
|
+
return_type = opts[:return_type] || 'Webhooks'
|
587
|
+
|
588
|
+
# auth_names
|
589
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
590
|
+
|
591
|
+
new_options = opts.merge(
|
592
|
+
:header_params => header_params,
|
593
|
+
:query_params => query_params,
|
594
|
+
:form_params => form_params,
|
595
|
+
:body => post_body,
|
596
|
+
:auth_names => auth_names,
|
597
|
+
:return_type => return_type
|
598
|
+
)
|
599
|
+
|
600
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
601
|
+
if @api_client.config.debugging
|
602
|
+
@api_client.config.logger.debug "API called: InventoryApi#create_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
603
|
+
end
|
604
|
+
return data, status_code, headers
|
605
|
+
end
|
606
|
+
|
607
|
+
# Allows you to delete an Account
|
608
|
+
# @param [Hash] opts the optional parameters
|
609
|
+
# @option opts [String] :code Default is nil
|
610
|
+
# @return [Success]
|
611
|
+
def delete_account(opts = {})
|
612
|
+
data, _status_code, _headers = delete_account_with_http_info(opts)
|
613
|
+
data
|
614
|
+
end
|
615
|
+
|
616
|
+
# Allows you to delete an Account
|
617
|
+
# @param [Hash] opts the optional parameters
|
618
|
+
# @option opts [String] :code Default is nil
|
619
|
+
# @return [Array<(Success, Integer, Hash)>] Success data, response status code and response headers
|
620
|
+
def delete_account_with_http_info(opts = {})
|
621
|
+
if @api_client.config.debugging
|
622
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.delete_account ...'
|
623
|
+
end
|
624
|
+
# resource path
|
625
|
+
local_var_path = '/ref/account'
|
626
|
+
|
627
|
+
# query parameters
|
628
|
+
query_params = opts[:query_params] || {}
|
629
|
+
query_params[:'Code'] = opts[:'code'] if !opts[:'code'].nil?
|
630
|
+
|
631
|
+
# header parameters
|
632
|
+
header_params = opts[:header_params] || {}
|
633
|
+
# HTTP header 'Accept' (if needed)
|
634
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
635
|
+
|
636
|
+
# form parameters
|
637
|
+
form_params = opts[:form_params] || {}
|
638
|
+
|
639
|
+
# http body (model)
|
640
|
+
post_body = opts[:body]
|
641
|
+
|
642
|
+
# return_type
|
643
|
+
return_type = opts[:return_type] || 'Success'
|
644
|
+
|
645
|
+
# auth_names
|
646
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
647
|
+
|
648
|
+
new_options = opts.merge(
|
649
|
+
:header_params => header_params,
|
650
|
+
:query_params => query_params,
|
651
|
+
:form_params => form_params,
|
652
|
+
:body => post_body,
|
653
|
+
:auth_names => auth_names,
|
654
|
+
:return_type => return_type
|
655
|
+
)
|
656
|
+
|
657
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
658
|
+
if @api_client.config.debugging
|
659
|
+
@api_client.config.logger.debug "API called: InventoryApi#delete_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
660
|
+
end
|
661
|
+
return data, status_code, headers
|
662
|
+
end
|
663
|
+
|
664
|
+
# Allows you to delete a payment term
|
665
|
+
# @param [Hash] opts the optional parameters
|
666
|
+
# @option opts [String] :id Default is nil
|
667
|
+
# @return [Success]
|
668
|
+
def delete_payment_term(opts = {})
|
669
|
+
data, _status_code, _headers = delete_payment_term_with_http_info(opts)
|
670
|
+
data
|
671
|
+
end
|
672
|
+
|
673
|
+
# Allows you to delete a payment term
|
674
|
+
# @param [Hash] opts the optional parameters
|
675
|
+
# @option opts [String] :id Default is nil
|
676
|
+
# @return [Array<(Success, Integer, Hash)>] Success data, response status code and response headers
|
677
|
+
def delete_payment_term_with_http_info(opts = {})
|
678
|
+
if @api_client.config.debugging
|
679
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.delete_payment_term ...'
|
680
|
+
end
|
681
|
+
# resource path
|
682
|
+
local_var_path = '/ref/paymentterm'
|
683
|
+
|
684
|
+
# query parameters
|
685
|
+
query_params = opts[:query_params] || {}
|
686
|
+
query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?
|
687
|
+
|
688
|
+
# header parameters
|
689
|
+
header_params = opts[:header_params] || {}
|
690
|
+
# HTTP header 'Accept' (if needed)
|
691
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
692
|
+
|
693
|
+
# form parameters
|
694
|
+
form_params = opts[:form_params] || {}
|
695
|
+
|
696
|
+
# http body (model)
|
697
|
+
post_body = opts[:body]
|
698
|
+
|
699
|
+
# return_type
|
700
|
+
return_type = opts[:return_type] || 'Success'
|
701
|
+
|
702
|
+
# auth_names
|
703
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
704
|
+
|
705
|
+
new_options = opts.merge(
|
706
|
+
:header_params => header_params,
|
707
|
+
:query_params => query_params,
|
708
|
+
:form_params => form_params,
|
709
|
+
:body => post_body,
|
710
|
+
:auth_names => auth_names,
|
711
|
+
:return_type => return_type
|
712
|
+
)
|
713
|
+
|
714
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
715
|
+
if @api_client.config.debugging
|
716
|
+
@api_client.config.logger.debug "API called: InventoryApi#delete_payment_term\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
717
|
+
end
|
718
|
+
return data, status_code, headers
|
719
|
+
end
|
720
|
+
|
721
|
+
# Allows you to delete a sale invoice
|
722
|
+
# @param [Hash] opts the optional parameters
|
723
|
+
# @option opts [String] :task_id ID of Sale task to Void or Undo
|
724
|
+
# @option opts [Boolean] :void Default is false (default to false)
|
725
|
+
# @return [SaleInvoices]
|
726
|
+
def delete_sale_invoice(opts = {})
|
727
|
+
data, _status_code, _headers = delete_sale_invoice_with_http_info(opts)
|
224
728
|
data
|
225
729
|
end
|
226
730
|
|
227
|
-
# Allows you to
|
228
|
-
# @param tax [Tax] a tax object with properties to create
|
731
|
+
# Allows you to delete a sale invoice
|
229
732
|
# @param [Hash] opts the optional parameters
|
230
|
-
# @option opts [
|
231
|
-
# @
|
232
|
-
|
733
|
+
# @option opts [String] :task_id ID of Sale task to Void or Undo
|
734
|
+
# @option opts [Boolean] :void Default is false
|
735
|
+
# @return [Array<(SaleInvoices, Integer, Hash)>] SaleInvoices data, response status code and response headers
|
736
|
+
def delete_sale_invoice_with_http_info(opts = {})
|
233
737
|
if @api_client.config.debugging
|
234
|
-
@api_client.config.logger.debug 'Calling API: InventoryApi.
|
235
|
-
end
|
236
|
-
# verify the required parameter 'tax' is set
|
237
|
-
if @api_client.config.client_side_validation && tax.nil?
|
238
|
-
fail ArgumentError, "Missing the required parameter 'tax' when calling InventoryApi.create_tax"
|
738
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.delete_sale_invoice ...'
|
239
739
|
end
|
240
740
|
# resource path
|
241
|
-
local_var_path = '/
|
741
|
+
local_var_path = '/sale/invoice'
|
242
742
|
|
243
743
|
# query parameters
|
244
744
|
query_params = opts[:query_params] || {}
|
245
|
-
query_params[:'
|
745
|
+
query_params[:'TaskID'] = opts[:'task_id'] if !opts[:'task_id'].nil?
|
746
|
+
query_params[:'Void'] = opts[:'void'] if !opts[:'void'].nil?
|
246
747
|
|
247
748
|
# header parameters
|
248
749
|
header_params = opts[:header_params] || {}
|
249
750
|
# HTTP header 'Accept' (if needed)
|
250
751
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
251
|
-
# HTTP header 'Content-Type'
|
252
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
253
752
|
|
254
753
|
# form parameters
|
255
754
|
form_params = opts[:form_params] || {}
|
256
755
|
|
257
756
|
# http body (model)
|
258
|
-
post_body = opts[:body]
|
757
|
+
post_body = opts[:body]
|
259
758
|
|
260
759
|
# return_type
|
261
|
-
return_type = opts[:return_type] || '
|
760
|
+
return_type = opts[:return_type] || 'SaleInvoices'
|
262
761
|
|
263
762
|
# auth_names
|
264
763
|
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
@@ -272,36 +771,36 @@ module DearInventoryRuby
|
|
272
771
|
:return_type => return_type
|
273
772
|
)
|
274
773
|
|
275
|
-
data, status_code, headers = @api_client.call_api(:
|
774
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
276
775
|
if @api_client.config.debugging
|
277
|
-
@api_client.config.logger.debug "API called: InventoryApi#
|
776
|
+
@api_client.config.logger.debug "API called: InventoryApi#delete_sale_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
278
777
|
end
|
279
778
|
return data, status_code, headers
|
280
779
|
end
|
281
780
|
|
282
|
-
# Allows you to delete
|
781
|
+
# Allows you to delete a sale payment
|
283
782
|
# @param [Hash] opts the optional parameters
|
284
|
-
# @option opts [String] :
|
783
|
+
# @option opts [String] :id Default is nil
|
285
784
|
# @return [Success]
|
286
|
-
def
|
287
|
-
data, _status_code, _headers =
|
785
|
+
def delete_sale_payment(opts = {})
|
786
|
+
data, _status_code, _headers = delete_sale_payment_with_http_info(opts)
|
288
787
|
data
|
289
788
|
end
|
290
789
|
|
291
|
-
# Allows you to delete
|
790
|
+
# Allows you to delete a sale payment
|
292
791
|
# @param [Hash] opts the optional parameters
|
293
|
-
# @option opts [String] :
|
792
|
+
# @option opts [String] :id Default is nil
|
294
793
|
# @return [Array<(Success, Integer, Hash)>] Success data, response status code and response headers
|
295
|
-
def
|
794
|
+
def delete_sale_payment_with_http_info(opts = {})
|
296
795
|
if @api_client.config.debugging
|
297
|
-
@api_client.config.logger.debug 'Calling API: InventoryApi.
|
796
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.delete_sale_payment ...'
|
298
797
|
end
|
299
798
|
# resource path
|
300
|
-
local_var_path = '/
|
799
|
+
local_var_path = '/sale/payment'
|
301
800
|
|
302
801
|
# query parameters
|
303
802
|
query_params = opts[:query_params] || {}
|
304
|
-
query_params[:'
|
803
|
+
query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?
|
305
804
|
|
306
805
|
# header parameters
|
307
806
|
header_params = opts[:header_params] || {}
|
@@ -331,30 +830,30 @@ module DearInventoryRuby
|
|
331
830
|
|
332
831
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
333
832
|
if @api_client.config.debugging
|
334
|
-
@api_client.config.logger.debug "API called: InventoryApi#
|
833
|
+
@api_client.config.logger.debug "API called: InventoryApi#delete_sale_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
335
834
|
end
|
336
835
|
return data, status_code, headers
|
337
836
|
end
|
338
837
|
|
339
|
-
# Allows you to delete a
|
838
|
+
# Allows you to delete a webhook
|
340
839
|
# @param [Hash] opts the optional parameters
|
341
840
|
# @option opts [String] :id Default is nil
|
342
|
-
# @return [
|
343
|
-
def
|
344
|
-
data, _status_code, _headers =
|
841
|
+
# @return [Webhooks]
|
842
|
+
def delete_webhook(opts = {})
|
843
|
+
data, _status_code, _headers = delete_webhook_with_http_info(opts)
|
345
844
|
data
|
346
845
|
end
|
347
846
|
|
348
|
-
# Allows you to delete a
|
847
|
+
# Allows you to delete a webhook
|
349
848
|
# @param [Hash] opts the optional parameters
|
350
849
|
# @option opts [String] :id Default is nil
|
351
|
-
# @return [Array<(
|
352
|
-
def
|
850
|
+
# @return [Array<(Webhooks, Integer, Hash)>] Webhooks data, response status code and response headers
|
851
|
+
def delete_webhook_with_http_info(opts = {})
|
353
852
|
if @api_client.config.debugging
|
354
|
-
@api_client.config.logger.debug 'Calling API: InventoryApi.
|
853
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.delete_webhook ...'
|
355
854
|
end
|
356
855
|
# resource path
|
357
|
-
local_var_path = '/
|
856
|
+
local_var_path = '/webhooks'
|
358
857
|
|
359
858
|
# query parameters
|
360
859
|
query_params = opts[:query_params] || {}
|
@@ -372,7 +871,7 @@ module DearInventoryRuby
|
|
372
871
|
post_body = opts[:body]
|
373
872
|
|
374
873
|
# return_type
|
375
|
-
return_type = opts[:return_type] || '
|
874
|
+
return_type = opts[:return_type] || 'Webhooks'
|
376
875
|
|
377
876
|
# auth_names
|
378
877
|
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
@@ -388,7 +887,7 @@ module DearInventoryRuby
|
|
388
887
|
|
389
888
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
390
889
|
if @api_client.config.debugging
|
391
|
-
@api_client.config.logger.debug "API called: InventoryApi#
|
890
|
+
@api_client.config.logger.debug "API called: InventoryApi#delete_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
392
891
|
end
|
393
892
|
return data, status_code, headers
|
394
893
|
end
|
@@ -399,6 +898,7 @@ module DearInventoryRuby
|
|
399
898
|
# @option opts [String] :limit Default is 100 (default to '100')
|
400
899
|
# @option opts [String] :code Default is nil
|
401
900
|
# @option opts [String] :name Default is nil
|
901
|
+
# @option opts [String] :_class Default is nil
|
402
902
|
# @option opts [String] :type Default is nil
|
403
903
|
# @option opts [String] :status Default is nil
|
404
904
|
# @return [Accounts]
|
@@ -413,6 +913,7 @@ module DearInventoryRuby
|
|
413
913
|
# @option opts [String] :limit Default is 100
|
414
914
|
# @option opts [String] :code Default is nil
|
415
915
|
# @option opts [String] :name Default is nil
|
916
|
+
# @option opts [String] :_class Default is nil
|
416
917
|
# @option opts [String] :type Default is nil
|
417
918
|
# @option opts [String] :status Default is nil
|
418
919
|
# @return [Array<(Accounts, Integer, Hash)>] Accounts data, response status code and response headers
|
@@ -429,6 +930,7 @@ module DearInventoryRuby
|
|
429
930
|
query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
430
931
|
query_params[:'Code'] = opts[:'code'] if !opts[:'code'].nil?
|
431
932
|
query_params[:'Name'] = opts[:'name'] if !opts[:'name'].nil?
|
933
|
+
query_params[:'Class'] = opts[:'_class'] if !opts[:'_class'].nil?
|
432
934
|
query_params[:'Type'] = opts[:'type'] if !opts[:'type'].nil?
|
433
935
|
query_params[:'Status'] = opts[:'status'] if !opts[:'status'].nil?
|
434
936
|
|
@@ -490,19 +992,202 @@ module DearInventoryRuby
|
|
490
992
|
# @return [Array<(Customers, Integer, Hash)>] Customers data, response status code and response headers
|
491
993
|
def get_customers_with_http_info(opts = {})
|
492
994
|
if @api_client.config.debugging
|
493
|
-
@api_client.config.logger.debug 'Calling API: InventoryApi.get_customers ...'
|
995
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.get_customers ...'
|
996
|
+
end
|
997
|
+
# resource path
|
998
|
+
local_var_path = '/customer'
|
999
|
+
|
1000
|
+
# query parameters
|
1001
|
+
query_params = opts[:query_params] || {}
|
1002
|
+
query_params[:'Page'] = opts[:'page'] if !opts[:'page'].nil?
|
1003
|
+
query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1004
|
+
query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?
|
1005
|
+
query_params[:'Name'] = opts[:'name'] if !opts[:'name'].nil?
|
1006
|
+
query_params[:'ModifiedSince'] = opts[:'modified_since'] if !opts[:'modified_since'].nil?
|
1007
|
+
query_params[:'IncludeDeprecated'] = opts[:'include_deprecated'] if !opts[:'include_deprecated'].nil?
|
1008
|
+
|
1009
|
+
# header parameters
|
1010
|
+
header_params = opts[:header_params] || {}
|
1011
|
+
# HTTP header 'Accept' (if needed)
|
1012
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1013
|
+
|
1014
|
+
# form parameters
|
1015
|
+
form_params = opts[:form_params] || {}
|
1016
|
+
|
1017
|
+
# http body (model)
|
1018
|
+
post_body = opts[:body]
|
1019
|
+
|
1020
|
+
# return_type
|
1021
|
+
return_type = opts[:return_type] || 'Customers'
|
1022
|
+
|
1023
|
+
# auth_names
|
1024
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
1025
|
+
|
1026
|
+
new_options = opts.merge(
|
1027
|
+
:header_params => header_params,
|
1028
|
+
:query_params => query_params,
|
1029
|
+
:form_params => form_params,
|
1030
|
+
:body => post_body,
|
1031
|
+
:auth_names => auth_names,
|
1032
|
+
:return_type => return_type
|
1033
|
+
)
|
1034
|
+
|
1035
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1036
|
+
if @api_client.config.debugging
|
1037
|
+
@api_client.config.logger.debug "API called: InventoryApi#get_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1038
|
+
end
|
1039
|
+
return data, status_code, headers
|
1040
|
+
end
|
1041
|
+
|
1042
|
+
# Allows you to retrieve your information
|
1043
|
+
# @param [Hash] opts the optional parameters
|
1044
|
+
# @return [Me]
|
1045
|
+
def get_me(opts = {})
|
1046
|
+
data, _status_code, _headers = get_me_with_http_info(opts)
|
1047
|
+
data
|
1048
|
+
end
|
1049
|
+
|
1050
|
+
# Allows you to retrieve your information
|
1051
|
+
# @param [Hash] opts the optional parameters
|
1052
|
+
# @return [Array<(Me, Integer, Hash)>] Me data, response status code and response headers
|
1053
|
+
def get_me_with_http_info(opts = {})
|
1054
|
+
if @api_client.config.debugging
|
1055
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.get_me ...'
|
1056
|
+
end
|
1057
|
+
# resource path
|
1058
|
+
local_var_path = '/me'
|
1059
|
+
|
1060
|
+
# query parameters
|
1061
|
+
query_params = opts[:query_params] || {}
|
1062
|
+
|
1063
|
+
# header parameters
|
1064
|
+
header_params = opts[:header_params] || {}
|
1065
|
+
# HTTP header 'Accept' (if needed)
|
1066
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1067
|
+
|
1068
|
+
# form parameters
|
1069
|
+
form_params = opts[:form_params] || {}
|
1070
|
+
|
1071
|
+
# http body (model)
|
1072
|
+
post_body = opts[:body]
|
1073
|
+
|
1074
|
+
# return_type
|
1075
|
+
return_type = opts[:return_type] || 'Me'
|
1076
|
+
|
1077
|
+
# auth_names
|
1078
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
1079
|
+
|
1080
|
+
new_options = opts.merge(
|
1081
|
+
:header_params => header_params,
|
1082
|
+
:query_params => query_params,
|
1083
|
+
:form_params => form_params,
|
1084
|
+
:body => post_body,
|
1085
|
+
:auth_names => auth_names,
|
1086
|
+
:return_type => return_type
|
1087
|
+
)
|
1088
|
+
|
1089
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1090
|
+
if @api_client.config.debugging
|
1091
|
+
@api_client.config.logger.debug "API called: InventoryApi#get_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1092
|
+
end
|
1093
|
+
return data, status_code, headers
|
1094
|
+
end
|
1095
|
+
|
1096
|
+
# Allows you to retrieve the payment terms
|
1097
|
+
# @param [Hash] opts the optional parameters
|
1098
|
+
# @option opts [String] :page Default is 1 (default to '1')
|
1099
|
+
# @option opts [String] :limit Default is 100 (default to '100')
|
1100
|
+
# @option opts [String] :id Default is nil
|
1101
|
+
# @option opts [String] :name Default is nil
|
1102
|
+
# @option opts [String] :method Default is nil
|
1103
|
+
# @option opts [Boolean] :is_active Default is nil
|
1104
|
+
# @option opts [Boolean] :is_default Default is nil
|
1105
|
+
# @return [PaymentTerms]
|
1106
|
+
def get_payment_terms(opts = {})
|
1107
|
+
data, _status_code, _headers = get_payment_terms_with_http_info(opts)
|
1108
|
+
data
|
1109
|
+
end
|
1110
|
+
|
1111
|
+
# Allows you to retrieve the payment terms
|
1112
|
+
# @param [Hash] opts the optional parameters
|
1113
|
+
# @option opts [String] :page Default is 1
|
1114
|
+
# @option opts [String] :limit Default is 100
|
1115
|
+
# @option opts [String] :id Default is nil
|
1116
|
+
# @option opts [String] :name Default is nil
|
1117
|
+
# @option opts [String] :method Default is nil
|
1118
|
+
# @option opts [Boolean] :is_active Default is nil
|
1119
|
+
# @option opts [Boolean] :is_default Default is nil
|
1120
|
+
# @return [Array<(PaymentTerms, Integer, Hash)>] PaymentTerms data, response status code and response headers
|
1121
|
+
def get_payment_terms_with_http_info(opts = {})
|
1122
|
+
if @api_client.config.debugging
|
1123
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.get_payment_terms ...'
|
1124
|
+
end
|
1125
|
+
# resource path
|
1126
|
+
local_var_path = '/ref/paymentterm'
|
1127
|
+
|
1128
|
+
# query parameters
|
1129
|
+
query_params = opts[:query_params] || {}
|
1130
|
+
query_params[:'Page'] = opts[:'page'] if !opts[:'page'].nil?
|
1131
|
+
query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1132
|
+
query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?
|
1133
|
+
query_params[:'Name'] = opts[:'name'] if !opts[:'name'].nil?
|
1134
|
+
query_params[:'Method'] = opts[:'method'] if !opts[:'method'].nil?
|
1135
|
+
query_params[:'IsActive'] = opts[:'is_active'] if !opts[:'is_active'].nil?
|
1136
|
+
query_params[:'IsDefault'] = opts[:'is_default'] if !opts[:'is_default'].nil?
|
1137
|
+
|
1138
|
+
# header parameters
|
1139
|
+
header_params = opts[:header_params] || {}
|
1140
|
+
# HTTP header 'Accept' (if needed)
|
1141
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1142
|
+
|
1143
|
+
# form parameters
|
1144
|
+
form_params = opts[:form_params] || {}
|
1145
|
+
|
1146
|
+
# http body (model)
|
1147
|
+
post_body = opts[:body]
|
1148
|
+
|
1149
|
+
# return_type
|
1150
|
+
return_type = opts[:return_type] || 'PaymentTerms'
|
1151
|
+
|
1152
|
+
# auth_names
|
1153
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
1154
|
+
|
1155
|
+
new_options = opts.merge(
|
1156
|
+
:header_params => header_params,
|
1157
|
+
:query_params => query_params,
|
1158
|
+
:form_params => form_params,
|
1159
|
+
:body => post_body,
|
1160
|
+
:auth_names => auth_names,
|
1161
|
+
:return_type => return_type
|
1162
|
+
)
|
1163
|
+
|
1164
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1165
|
+
if @api_client.config.debugging
|
1166
|
+
@api_client.config.logger.debug "API called: InventoryApi#get_payment_terms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1167
|
+
end
|
1168
|
+
return data, status_code, headers
|
1169
|
+
end
|
1170
|
+
|
1171
|
+
# Allows you to retrieve the Price Tiers
|
1172
|
+
# @param [Hash] opts the optional parameters
|
1173
|
+
# @return [PriceTiers]
|
1174
|
+
def get_price_tiers(opts = {})
|
1175
|
+
data, _status_code, _headers = get_price_tiers_with_http_info(opts)
|
1176
|
+
data
|
1177
|
+
end
|
1178
|
+
|
1179
|
+
# Allows you to retrieve the Price Tiers
|
1180
|
+
# @param [Hash] opts the optional parameters
|
1181
|
+
# @return [Array<(PriceTiers, Integer, Hash)>] PriceTiers data, response status code and response headers
|
1182
|
+
def get_price_tiers_with_http_info(opts = {})
|
1183
|
+
if @api_client.config.debugging
|
1184
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.get_price_tiers ...'
|
494
1185
|
end
|
495
1186
|
# resource path
|
496
|
-
local_var_path = '/
|
1187
|
+
local_var_path = '/ref/priceTier'
|
497
1188
|
|
498
1189
|
# query parameters
|
499
1190
|
query_params = opts[:query_params] || {}
|
500
|
-
query_params[:'Page'] = opts[:'page'] if !opts[:'page'].nil?
|
501
|
-
query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
502
|
-
query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?
|
503
|
-
query_params[:'Name'] = opts[:'name'] if !opts[:'name'].nil?
|
504
|
-
query_params[:'ModifiedSince'] = opts[:'modified_since'] if !opts[:'modified_since'].nil?
|
505
|
-
query_params[:'IncludeDeprecated'] = opts[:'include_deprecated'] if !opts[:'include_deprecated'].nil?
|
506
1191
|
|
507
1192
|
# header parameters
|
508
1193
|
header_params = opts[:header_params] || {}
|
@@ -516,7 +1201,7 @@ module DearInventoryRuby
|
|
516
1201
|
post_body = opts[:body]
|
517
1202
|
|
518
1203
|
# return_type
|
519
|
-
return_type = opts[:return_type] || '
|
1204
|
+
return_type = opts[:return_type] || 'PriceTiers'
|
520
1205
|
|
521
1206
|
# auth_names
|
522
1207
|
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
@@ -532,31 +1217,40 @@ module DearInventoryRuby
|
|
532
1217
|
|
533
1218
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
534
1219
|
if @api_client.config.debugging
|
535
|
-
@api_client.config.logger.debug "API called: InventoryApi#
|
1220
|
+
@api_client.config.logger.debug "API called: InventoryApi#get_price_tiers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
536
1221
|
end
|
537
1222
|
return data, status_code, headers
|
538
1223
|
end
|
539
1224
|
|
540
|
-
# Allows you to retrieve
|
1225
|
+
# Allows you to retrieve the sale invoices
|
541
1226
|
# @param [Hash] opts the optional parameters
|
542
|
-
# @
|
543
|
-
|
544
|
-
|
1227
|
+
# @option opts [String] :sale_id Unique DEAR Sale ID
|
1228
|
+
# @option opts [Boolean] :combine_additional_charges Show additional charges in 'Lines' array (default to false)
|
1229
|
+
# @option opts [Boolean] :include_product_info Show all used products in additional array (default to false)
|
1230
|
+
# @return [SaleInvoices]
|
1231
|
+
def get_sale_invoices(opts = {})
|
1232
|
+
data, _status_code, _headers = get_sale_invoices_with_http_info(opts)
|
545
1233
|
data
|
546
1234
|
end
|
547
1235
|
|
548
|
-
# Allows you to retrieve
|
1236
|
+
# Allows you to retrieve the sale invoices
|
549
1237
|
# @param [Hash] opts the optional parameters
|
550
|
-
# @
|
551
|
-
|
1238
|
+
# @option opts [String] :sale_id Unique DEAR Sale ID
|
1239
|
+
# @option opts [Boolean] :combine_additional_charges Show additional charges in 'Lines' array
|
1240
|
+
# @option opts [Boolean] :include_product_info Show all used products in additional array
|
1241
|
+
# @return [Array<(SaleInvoices, Integer, Hash)>] SaleInvoices data, response status code and response headers
|
1242
|
+
def get_sale_invoices_with_http_info(opts = {})
|
552
1243
|
if @api_client.config.debugging
|
553
|
-
@api_client.config.logger.debug 'Calling API: InventoryApi.
|
1244
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.get_sale_invoices ...'
|
554
1245
|
end
|
555
1246
|
# resource path
|
556
|
-
local_var_path = '/
|
1247
|
+
local_var_path = '/sale/invoice'
|
557
1248
|
|
558
1249
|
# query parameters
|
559
1250
|
query_params = opts[:query_params] || {}
|
1251
|
+
query_params[:'SaleID'] = opts[:'sale_id'] if !opts[:'sale_id'].nil?
|
1252
|
+
query_params[:'CombineAdditionalCharges'] = opts[:'combine_additional_charges'] if !opts[:'combine_additional_charges'].nil?
|
1253
|
+
query_params[:'IncludeProductInfo'] = opts[:'include_product_info'] if !opts[:'include_product_info'].nil?
|
560
1254
|
|
561
1255
|
# header parameters
|
562
1256
|
header_params = opts[:header_params] || {}
|
@@ -570,7 +1264,7 @@ module DearInventoryRuby
|
|
570
1264
|
post_body = opts[:body]
|
571
1265
|
|
572
1266
|
# return_type
|
573
|
-
return_type = opts[:return_type] || '
|
1267
|
+
return_type = opts[:return_type] || 'SaleInvoices'
|
574
1268
|
|
575
1269
|
# auth_names
|
576
1270
|
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
@@ -586,52 +1280,40 @@ module DearInventoryRuby
|
|
586
1280
|
|
587
1281
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
588
1282
|
if @api_client.config.debugging
|
589
|
-
@api_client.config.logger.debug "API called: InventoryApi#
|
1283
|
+
@api_client.config.logger.debug "API called: InventoryApi#get_sale_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
590
1284
|
end
|
591
1285
|
return data, status_code, headers
|
592
1286
|
end
|
593
1287
|
|
594
|
-
# Allows you to retrieve the
|
1288
|
+
# Allows you to retrieve the Sale Order
|
595
1289
|
# @param [Hash] opts the optional parameters
|
596
|
-
# @option opts [String] :
|
597
|
-
# @option opts [
|
598
|
-
# @option opts [
|
599
|
-
# @
|
600
|
-
|
601
|
-
|
602
|
-
# @option opts [Boolean] :is_default Default is nil
|
603
|
-
# @return [PaymentTerms]
|
604
|
-
def get_payment_terms(opts = {})
|
605
|
-
data, _status_code, _headers = get_payment_terms_with_http_info(opts)
|
1290
|
+
# @option opts [String] :sale_id Unique DEAR Sale ID
|
1291
|
+
# @option opts [Boolean] :combine_additional_charges Show additional charges in 'Lines' array (default to false)
|
1292
|
+
# @option opts [Boolean] :include_product_info Show all used products in additional array (default to false)
|
1293
|
+
# @return [SaleOrder]
|
1294
|
+
def get_sale_order(opts = {})
|
1295
|
+
data, _status_code, _headers = get_sale_order_with_http_info(opts)
|
606
1296
|
data
|
607
1297
|
end
|
608
1298
|
|
609
|
-
# Allows you to retrieve the
|
1299
|
+
# Allows you to retrieve the Sale Order
|
610
1300
|
# @param [Hash] opts the optional parameters
|
611
|
-
# @option opts [String] :
|
612
|
-
# @option opts [
|
613
|
-
# @option opts [
|
614
|
-
# @
|
615
|
-
|
616
|
-
# @option opts [Boolean] :is_active Default is nil
|
617
|
-
# @option opts [Boolean] :is_default Default is nil
|
618
|
-
# @return [Array<(PaymentTerms, Integer, Hash)>] PaymentTerms data, response status code and response headers
|
619
|
-
def get_payment_terms_with_http_info(opts = {})
|
1301
|
+
# @option opts [String] :sale_id Unique DEAR Sale ID
|
1302
|
+
# @option opts [Boolean] :combine_additional_charges Show additional charges in 'Lines' array
|
1303
|
+
# @option opts [Boolean] :include_product_info Show all used products in additional array
|
1304
|
+
# @return [Array<(SaleOrder, Integer, Hash)>] SaleOrder data, response status code and response headers
|
1305
|
+
def get_sale_order_with_http_info(opts = {})
|
620
1306
|
if @api_client.config.debugging
|
621
|
-
@api_client.config.logger.debug 'Calling API: InventoryApi.
|
1307
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.get_sale_order ...'
|
622
1308
|
end
|
623
1309
|
# resource path
|
624
|
-
local_var_path = '/
|
1310
|
+
local_var_path = '/sale/order'
|
625
1311
|
|
626
1312
|
# query parameters
|
627
1313
|
query_params = opts[:query_params] || {}
|
628
|
-
query_params[:'
|
629
|
-
query_params[:'
|
630
|
-
query_params[:'
|
631
|
-
query_params[:'Name'] = opts[:'name'] if !opts[:'name'].nil?
|
632
|
-
query_params[:'Method'] = opts[:'method'] if !opts[:'method'].nil?
|
633
|
-
query_params[:'IsActive'] = opts[:'is_active'] if !opts[:'is_active'].nil?
|
634
|
-
query_params[:'IsDefault'] = opts[:'is_default'] if !opts[:'is_default'].nil?
|
1314
|
+
query_params[:'SaleID'] = opts[:'sale_id'] if !opts[:'sale_id'].nil?
|
1315
|
+
query_params[:'CombineAdditionalCharges'] = opts[:'combine_additional_charges'] if !opts[:'combine_additional_charges'].nil?
|
1316
|
+
query_params[:'IncludeProductInfo'] = opts[:'include_product_info'] if !opts[:'include_product_info'].nil?
|
635
1317
|
|
636
1318
|
# header parameters
|
637
1319
|
header_params = opts[:header_params] || {}
|
@@ -645,7 +1327,7 @@ module DearInventoryRuby
|
|
645
1327
|
post_body = opts[:body]
|
646
1328
|
|
647
1329
|
# return_type
|
648
|
-
return_type = opts[:return_type] || '
|
1330
|
+
return_type = opts[:return_type] || 'SaleOrder'
|
649
1331
|
|
650
1332
|
# auth_names
|
651
1333
|
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
@@ -661,31 +1343,34 @@ module DearInventoryRuby
|
|
661
1343
|
|
662
1344
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
663
1345
|
if @api_client.config.debugging
|
664
|
-
@api_client.config.logger.debug "API called: InventoryApi#
|
1346
|
+
@api_client.config.logger.debug "API called: InventoryApi#get_sale_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
665
1347
|
end
|
666
1348
|
return data, status_code, headers
|
667
1349
|
end
|
668
1350
|
|
669
|
-
# Allows you to retrieve the
|
1351
|
+
# Allows you to retrieve the Sale Payments
|
670
1352
|
# @param [Hash] opts the optional parameters
|
671
|
-
# @
|
672
|
-
|
673
|
-
|
1353
|
+
# @option opts [String] :sale_id Unique DEAR Sale ID
|
1354
|
+
# @return [Array<SalePayment>]
|
1355
|
+
def get_sale_payment(opts = {})
|
1356
|
+
data, _status_code, _headers = get_sale_payment_with_http_info(opts)
|
674
1357
|
data
|
675
1358
|
end
|
676
1359
|
|
677
|
-
# Allows you to retrieve the
|
1360
|
+
# Allows you to retrieve the Sale Payments
|
678
1361
|
# @param [Hash] opts the optional parameters
|
679
|
-
# @
|
680
|
-
|
1362
|
+
# @option opts [String] :sale_id Unique DEAR Sale ID
|
1363
|
+
# @return [Array<(Array<SalePayment>, Integer, Hash)>] Array<SalePayment> data, response status code and response headers
|
1364
|
+
def get_sale_payment_with_http_info(opts = {})
|
681
1365
|
if @api_client.config.debugging
|
682
|
-
@api_client.config.logger.debug 'Calling API: InventoryApi.
|
1366
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.get_sale_payment ...'
|
683
1367
|
end
|
684
1368
|
# resource path
|
685
|
-
local_var_path = '/
|
1369
|
+
local_var_path = '/sale/payment'
|
686
1370
|
|
687
1371
|
# query parameters
|
688
1372
|
query_params = opts[:query_params] || {}
|
1373
|
+
query_params[:'SaleID'] = opts[:'sale_id'] if !opts[:'sale_id'].nil?
|
689
1374
|
|
690
1375
|
# header parameters
|
691
1376
|
header_params = opts[:header_params] || {}
|
@@ -699,7 +1384,7 @@ module DearInventoryRuby
|
|
699
1384
|
post_body = opts[:body]
|
700
1385
|
|
701
1386
|
# return_type
|
702
|
-
return_type = opts[:return_type] || '
|
1387
|
+
return_type = opts[:return_type] || 'Array<SalePayment>'
|
703
1388
|
|
704
1389
|
# auth_names
|
705
1390
|
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
@@ -715,34 +1400,34 @@ module DearInventoryRuby
|
|
715
1400
|
|
716
1401
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
717
1402
|
if @api_client.config.debugging
|
718
|
-
@api_client.config.logger.debug "API called: InventoryApi#
|
1403
|
+
@api_client.config.logger.debug "API called: InventoryApi#get_sale_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
719
1404
|
end
|
720
1405
|
return data, status_code, headers
|
721
1406
|
end
|
722
1407
|
|
723
|
-
# Allows you to retrieve the
|
1408
|
+
# Allows you to retrieve the Sale Quote
|
724
1409
|
# @param [Hash] opts the optional parameters
|
725
1410
|
# @option opts [String] :sale_id Unique DEAR Sale ID
|
726
1411
|
# @option opts [Boolean] :combine_additional_charges Show additional charges in 'Lines' array (default to false)
|
727
1412
|
# @option opts [Boolean] :include_product_info Show all used products in additional array (default to false)
|
728
|
-
# @return [
|
729
|
-
def
|
730
|
-
data, _status_code, _headers =
|
1413
|
+
# @return [SaleQuote]
|
1414
|
+
def get_sale_quote(opts = {})
|
1415
|
+
data, _status_code, _headers = get_sale_quote_with_http_info(opts)
|
731
1416
|
data
|
732
1417
|
end
|
733
1418
|
|
734
|
-
# Allows you to retrieve the
|
1419
|
+
# Allows you to retrieve the Sale Quote
|
735
1420
|
# @param [Hash] opts the optional parameters
|
736
1421
|
# @option opts [String] :sale_id Unique DEAR Sale ID
|
737
1422
|
# @option opts [Boolean] :combine_additional_charges Show additional charges in 'Lines' array
|
738
1423
|
# @option opts [Boolean] :include_product_info Show all used products in additional array
|
739
|
-
# @return [Array<(
|
740
|
-
def
|
1424
|
+
# @return [Array<(SaleQuote, Integer, Hash)>] SaleQuote data, response status code and response headers
|
1425
|
+
def get_sale_quote_with_http_info(opts = {})
|
741
1426
|
if @api_client.config.debugging
|
742
|
-
@api_client.config.logger.debug 'Calling API: InventoryApi.
|
1427
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.get_sale_quote ...'
|
743
1428
|
end
|
744
1429
|
# resource path
|
745
|
-
local_var_path = '/sale/
|
1430
|
+
local_var_path = '/sale/quote'
|
746
1431
|
|
747
1432
|
# query parameters
|
748
1433
|
query_params = opts[:query_params] || {}
|
@@ -762,7 +1447,7 @@ module DearInventoryRuby
|
|
762
1447
|
post_body = opts[:body]
|
763
1448
|
|
764
1449
|
# return_type
|
765
|
-
return_type = opts[:return_type] || '
|
1450
|
+
return_type = opts[:return_type] || 'SaleQuote'
|
766
1451
|
|
767
1452
|
# auth_names
|
768
1453
|
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
@@ -778,7 +1463,7 @@ module DearInventoryRuby
|
|
778
1463
|
|
779
1464
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
780
1465
|
if @api_client.config.debugging
|
781
|
-
@api_client.config.logger.debug "API called: InventoryApi#
|
1466
|
+
@api_client.config.logger.debug "API called: InventoryApi#get_sale_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
782
1467
|
end
|
783
1468
|
return data, status_code, headers
|
784
1469
|
end
|
@@ -861,6 +1546,60 @@ module DearInventoryRuby
|
|
861
1546
|
return data, status_code, headers
|
862
1547
|
end
|
863
1548
|
|
1549
|
+
# Allows you to retrieve the Webhooks
|
1550
|
+
# @param [Hash] opts the optional parameters
|
1551
|
+
# @return [Webhooks]
|
1552
|
+
def get_webhooks(opts = {})
|
1553
|
+
data, _status_code, _headers = get_webhooks_with_http_info(opts)
|
1554
|
+
data
|
1555
|
+
end
|
1556
|
+
|
1557
|
+
# Allows you to retrieve the Webhooks
|
1558
|
+
# @param [Hash] opts the optional parameters
|
1559
|
+
# @return [Array<(Webhooks, Integer, Hash)>] Webhooks data, response status code and response headers
|
1560
|
+
def get_webhooks_with_http_info(opts = {})
|
1561
|
+
if @api_client.config.debugging
|
1562
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.get_webhooks ...'
|
1563
|
+
end
|
1564
|
+
# resource path
|
1565
|
+
local_var_path = '/webhooks'
|
1566
|
+
|
1567
|
+
# query parameters
|
1568
|
+
query_params = opts[:query_params] || {}
|
1569
|
+
|
1570
|
+
# header parameters
|
1571
|
+
header_params = opts[:header_params] || {}
|
1572
|
+
# HTTP header 'Accept' (if needed)
|
1573
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1574
|
+
|
1575
|
+
# form parameters
|
1576
|
+
form_params = opts[:form_params] || {}
|
1577
|
+
|
1578
|
+
# http body (model)
|
1579
|
+
post_body = opts[:body]
|
1580
|
+
|
1581
|
+
# return_type
|
1582
|
+
return_type = opts[:return_type] || 'Webhooks'
|
1583
|
+
|
1584
|
+
# auth_names
|
1585
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
1586
|
+
|
1587
|
+
new_options = opts.merge(
|
1588
|
+
:header_params => header_params,
|
1589
|
+
:query_params => query_params,
|
1590
|
+
:form_params => form_params,
|
1591
|
+
:body => post_body,
|
1592
|
+
:auth_names => auth_names,
|
1593
|
+
:return_type => return_type
|
1594
|
+
)
|
1595
|
+
|
1596
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1597
|
+
if @api_client.config.debugging
|
1598
|
+
@api_client.config.logger.debug "API called: InventoryApi#get_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1599
|
+
end
|
1600
|
+
return data, status_code, headers
|
1601
|
+
end
|
1602
|
+
|
864
1603
|
# Allows you to update an Account
|
865
1604
|
# @param account [Account] an Account object with properties to update
|
866
1605
|
# @param [Hash] opts the optional parameters
|
@@ -1056,6 +1795,71 @@ module DearInventoryRuby
|
|
1056
1795
|
return data, status_code, headers
|
1057
1796
|
end
|
1058
1797
|
|
1798
|
+
# Allows you to update a sale payment
|
1799
|
+
# @param sale_payment [SalePayment] a sale payment object with properties to update
|
1800
|
+
# @param [Hash] opts the optional parameters
|
1801
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
1802
|
+
# @return [SalePayment]
|
1803
|
+
def update_sale_payment(sale_payment, opts = {})
|
1804
|
+
data, _status_code, _headers = update_sale_payment_with_http_info(sale_payment, opts)
|
1805
|
+
data
|
1806
|
+
end
|
1807
|
+
|
1808
|
+
# Allows you to update a sale payment
|
1809
|
+
# @param sale_payment [SalePayment] a sale payment object with properties to update
|
1810
|
+
# @param [Hash] opts the optional parameters
|
1811
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
1812
|
+
# @return [Array<(SalePayment, Integer, Hash)>] SalePayment data, response status code and response headers
|
1813
|
+
def update_sale_payment_with_http_info(sale_payment, opts = {})
|
1814
|
+
if @api_client.config.debugging
|
1815
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.update_sale_payment ...'
|
1816
|
+
end
|
1817
|
+
# verify the required parameter 'sale_payment' is set
|
1818
|
+
if @api_client.config.client_side_validation && sale_payment.nil?
|
1819
|
+
fail ArgumentError, "Missing the required parameter 'sale_payment' when calling InventoryApi.update_sale_payment"
|
1820
|
+
end
|
1821
|
+
# resource path
|
1822
|
+
local_var_path = '/sale/payment'
|
1823
|
+
|
1824
|
+
# query parameters
|
1825
|
+
query_params = opts[:query_params] || {}
|
1826
|
+
query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
|
1827
|
+
|
1828
|
+
# header parameters
|
1829
|
+
header_params = opts[:header_params] || {}
|
1830
|
+
# HTTP header 'Accept' (if needed)
|
1831
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1832
|
+
# HTTP header 'Content-Type'
|
1833
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1834
|
+
|
1835
|
+
# form parameters
|
1836
|
+
form_params = opts[:form_params] || {}
|
1837
|
+
|
1838
|
+
# http body (model)
|
1839
|
+
post_body = opts[:body] || @api_client.object_to_http_body(sale_payment)
|
1840
|
+
|
1841
|
+
# return_type
|
1842
|
+
return_type = opts[:return_type] || 'SalePayment'
|
1843
|
+
|
1844
|
+
# auth_names
|
1845
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
1846
|
+
|
1847
|
+
new_options = opts.merge(
|
1848
|
+
:header_params => header_params,
|
1849
|
+
:query_params => query_params,
|
1850
|
+
:form_params => form_params,
|
1851
|
+
:body => post_body,
|
1852
|
+
:auth_names => auth_names,
|
1853
|
+
:return_type => return_type
|
1854
|
+
)
|
1855
|
+
|
1856
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1857
|
+
if @api_client.config.debugging
|
1858
|
+
@api_client.config.logger.debug "API called: InventoryApi#update_sale_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1859
|
+
end
|
1860
|
+
return data, status_code, headers
|
1861
|
+
end
|
1862
|
+
|
1059
1863
|
# Allows you to update a tax
|
1060
1864
|
# @param tax [Tax] a tax object with properties to update
|
1061
1865
|
# @param [Hash] opts the optional parameters
|
@@ -1120,5 +1924,70 @@ module DearInventoryRuby
|
|
1120
1924
|
end
|
1121
1925
|
return data, status_code, headers
|
1122
1926
|
end
|
1927
|
+
|
1928
|
+
# Allows you to update a webhook
|
1929
|
+
# @param webhook [Webhook] a webhook object with properties to update
|
1930
|
+
# @param [Hash] opts the optional parameters
|
1931
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
1932
|
+
# @return [Webhooks]
|
1933
|
+
def update_webhook(webhook, opts = {})
|
1934
|
+
data, _status_code, _headers = update_webhook_with_http_info(webhook, opts)
|
1935
|
+
data
|
1936
|
+
end
|
1937
|
+
|
1938
|
+
# Allows you to update a webhook
|
1939
|
+
# @param webhook [Webhook] a webhook object with properties to update
|
1940
|
+
# @param [Hash] opts the optional parameters
|
1941
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
1942
|
+
# @return [Array<(Webhooks, Integer, Hash)>] Webhooks data, response status code and response headers
|
1943
|
+
def update_webhook_with_http_info(webhook, opts = {})
|
1944
|
+
if @api_client.config.debugging
|
1945
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.update_webhook ...'
|
1946
|
+
end
|
1947
|
+
# verify the required parameter 'webhook' is set
|
1948
|
+
if @api_client.config.client_side_validation && webhook.nil?
|
1949
|
+
fail ArgumentError, "Missing the required parameter 'webhook' when calling InventoryApi.update_webhook"
|
1950
|
+
end
|
1951
|
+
# resource path
|
1952
|
+
local_var_path = '/webhooks'
|
1953
|
+
|
1954
|
+
# query parameters
|
1955
|
+
query_params = opts[:query_params] || {}
|
1956
|
+
query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
|
1957
|
+
|
1958
|
+
# header parameters
|
1959
|
+
header_params = opts[:header_params] || {}
|
1960
|
+
# HTTP header 'Accept' (if needed)
|
1961
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1962
|
+
# HTTP header 'Content-Type'
|
1963
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1964
|
+
|
1965
|
+
# form parameters
|
1966
|
+
form_params = opts[:form_params] || {}
|
1967
|
+
|
1968
|
+
# http body (model)
|
1969
|
+
post_body = opts[:body] || @api_client.object_to_http_body(webhook)
|
1970
|
+
|
1971
|
+
# return_type
|
1972
|
+
return_type = opts[:return_type] || 'Webhooks'
|
1973
|
+
|
1974
|
+
# auth_names
|
1975
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
1976
|
+
|
1977
|
+
new_options = opts.merge(
|
1978
|
+
:header_params => header_params,
|
1979
|
+
:query_params => query_params,
|
1980
|
+
:form_params => form_params,
|
1981
|
+
:body => post_body,
|
1982
|
+
:auth_names => auth_names,
|
1983
|
+
:return_type => return_type
|
1984
|
+
)
|
1985
|
+
|
1986
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1987
|
+
if @api_client.config.debugging
|
1988
|
+
@api_client.config.logger.debug "API called: InventoryApi#update_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1989
|
+
end
|
1990
|
+
return data, status_code, headers
|
1991
|
+
end
|
1123
1992
|
end
|
1124
1993
|
end
|