dear-inventory-ruby 0.1.16 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -10
- data/README.md +32 -7
- data/dear-inventory-ruby.gemspec +1 -1
- 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/Me.md +1 -1
- 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/account.rb +0 -34
- data/lib/dear-inventory-ruby/models/address.rb +28 -115
- data/lib/dear-inventory-ruby/models/customer.rb +1 -35
- data/lib/dear-inventory-ruby/models/external_header.rb +217 -0
- data/lib/dear-inventory-ruby/models/me.rb +2 -1
- data/lib/dear-inventory-ruby/models/payment_term.rb +0 -34
- 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 -2
- data/spec/api/inventory_api_spec.rb +166 -0
- data/spec/models/account_spec.rb +0 -4
- data/spec/models/address_spec.rb +7 -13
- data/spec/models/customer_spec.rb +0 -4
- data/spec/models/external_header_spec.rb +47 -0
- data/spec/models/payment_term_spec.rb +0 -4
- 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/{currency_code_spec.rb → webhooks_spec.rb} +12 -6
- metadata +63 -14
- data/docs/CurrencyCode.md +0 -16
- data/docs/DimensionsUnit.md +0 -16
- data/lib/dear-inventory-ruby/models/currency_code.rb +0 -196
- data/lib/dear-inventory-ruby/models/dimensions_unit.rb +0 -42
- data/spec/.DS_Store +0 -0
- data/spec/models/dimensions_unit_spec.rb +0 -35
data/docs/InventoryApi.md
CHANGED
@@ -7,20 +7,34 @@ Method | HTTP request | Description
|
|
7
7
|
[**create_account**](InventoryApi.md#create_account) | **POST** /ref/account | Allows you to create an Account
|
8
8
|
[**create_customer**](InventoryApi.md#create_customer) | **POST** /customer | Allows you to create a customer
|
9
9
|
[**create_payment_term**](InventoryApi.md#create_payment_term) | **POST** /ref/paymentterm | Allows you to create a payment term
|
10
|
+
[**create_sale_invoice**](InventoryApi.md#create_sale_invoice) | **POST** /sale/invoice | Allows you to create a sale invoice
|
11
|
+
[**create_sale_order**](InventoryApi.md#create_sale_order) | **POST** /sale/order | Allows you to create a Sale Order
|
12
|
+
[**create_sale_payment**](InventoryApi.md#create_sale_payment) | **POST** /sale/payment | Allows you to create a Sale Payment
|
13
|
+
[**create_sale_quote**](InventoryApi.md#create_sale_quote) | **POST** /sale/quote | Allows you to create a Sale Quote
|
10
14
|
[**create_tax**](InventoryApi.md#create_tax) | **POST** /ref/tax | Allows you to create a tax
|
15
|
+
[**create_webhooks**](InventoryApi.md#create_webhooks) | **POST** /webhooks | Allows you to create a Webhook
|
11
16
|
[**delete_account**](InventoryApi.md#delete_account) | **DELETE** /ref/account | Allows you to delete an Account
|
12
17
|
[**delete_payment_term**](InventoryApi.md#delete_payment_term) | **DELETE** /ref/paymentterm | Allows you to delete a payment term
|
18
|
+
[**delete_sale_invoice**](InventoryApi.md#delete_sale_invoice) | **DELETE** /sale/invoice | Allows you to delete a sale invoice
|
19
|
+
[**delete_sale_payment**](InventoryApi.md#delete_sale_payment) | **DELETE** /sale/payment | Allows you to delete a sale payment
|
20
|
+
[**delete_webhook**](InventoryApi.md#delete_webhook) | **DELETE** /webhooks | Allows you to delete a webhook
|
13
21
|
[**get_accounts**](InventoryApi.md#get_accounts) | **GET** /ref/account | Allows you to retrieve the Chart of Accounts
|
14
22
|
[**get_customers**](InventoryApi.md#get_customers) | **GET** /customer | Allows you to retrieve the customers
|
15
23
|
[**get_me**](InventoryApi.md#get_me) | **GET** /me | Allows you to retrieve your information
|
16
24
|
[**get_payment_terms**](InventoryApi.md#get_payment_terms) | **GET** /ref/paymentterm | Allows you to retrieve the payment terms
|
17
25
|
[**get_price_tiers**](InventoryApi.md#get_price_tiers) | **GET** /ref/priceTier | Allows you to retrieve the Price Tiers
|
18
26
|
[**get_sale_invoices**](InventoryApi.md#get_sale_invoices) | **GET** /sale/invoice | Allows you to retrieve the sale invoices
|
27
|
+
[**get_sale_order**](InventoryApi.md#get_sale_order) | **GET** /sale/order | Allows you to retrieve the Sale Order
|
28
|
+
[**get_sale_payment**](InventoryApi.md#get_sale_payment) | **GET** /sale/payment | Allows you to retrieve the Sale Payments
|
29
|
+
[**get_sale_quote**](InventoryApi.md#get_sale_quote) | **GET** /sale/quote | Allows you to retrieve the Sale Quote
|
19
30
|
[**get_taxes**](InventoryApi.md#get_taxes) | **GET** /ref/tax | Allows you to retrieve the taxes
|
31
|
+
[**get_webhooks**](InventoryApi.md#get_webhooks) | **GET** /webhooks | Allows you to retrieve the Webhooks
|
20
32
|
[**update_account**](InventoryApi.md#update_account) | **PUT** /ref/account | Allows you to update an Account
|
21
33
|
[**update_customer**](InventoryApi.md#update_customer) | **PUT** /customer | Allows you to update a customer
|
22
34
|
[**update_payment_term**](InventoryApi.md#update_payment_term) | **PUT** /ref/paymentterm | Allows you to update a payment term
|
35
|
+
[**update_sale_payment**](InventoryApi.md#update_sale_payment) | **PUT** /sale/payment | Allows you to update a sale payment
|
23
36
|
[**update_tax**](InventoryApi.md#update_tax) | **PUT** /ref/tax | Allows you to update a tax
|
37
|
+
[**update_webhook**](InventoryApi.md#update_webhook) | **PUT** /webhooks | Allows you to update a webhook
|
24
38
|
|
25
39
|
|
26
40
|
|
@@ -207,6 +221,250 @@ Name | Type | Description | Notes
|
|
207
221
|
- **Accept**: application/json
|
208
222
|
|
209
223
|
|
224
|
+
## create_sale_invoice
|
225
|
+
|
226
|
+
> SaleInvoices create_sale_invoice(sale_invoice_post, opts)
|
227
|
+
|
228
|
+
Allows you to create a sale invoice
|
229
|
+
|
230
|
+
### Example
|
231
|
+
|
232
|
+
```ruby
|
233
|
+
# load the gem
|
234
|
+
require 'dear-inventory-ruby'
|
235
|
+
# setup authorization
|
236
|
+
DearInventoryRuby.configure do |config|
|
237
|
+
# Configure API key authorization: accountID
|
238
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
239
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
240
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
241
|
+
|
242
|
+
# Configure API key authorization: appKey
|
243
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
244
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
245
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
246
|
+
end
|
247
|
+
|
248
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
249
|
+
sale_invoice_post = { "SaleID": "916ab4c0-6ccb-4c93-873d-0603859050e4", "TaskID": "b039f19e-66f8-4309-a4b1-abf928303c88", "CombineAdditionalCharges": false, "Memo": "", "Status": "DRAFT", "InvoiceDate": "2017-11-22T00:00:00Z", "InvoiceDueDate": "2017-12-22T00:00:00Z", "CurrencyConversionRate": 1, "BillingAddressLine1": "3 Park Street Industrial Village Southbank", "BillingAddressLine2": "Melbourne VIC 3331", "LinkedFulfillmentNumber": "1", "Lines": [ { "ProductID": "4aadd8f6-4d3d-46ca-acbb-1a9a662f9bc1", "SKU": "Bread", "Name": "Baked Bread", "Quantity": 1, "Price": 8, "Discount": 0, "Tax": 0, "Total": 8, "AverageCost": 5, "TaxRule": "Tax on Sales", "Account": "200", "Comment": "" } ], "AdditionalCharges": [ { "Description": "Desktop/network support via phone. Per month fixed fee for minimum 20 hours/month.", "Quantity": 1, "Price": 350, "Discount": 0, "Tax": 0, "Total": 350, "TaxRule": "Tax on Sales", "Account": "200", "Comment": "" } ] } # SaleInvoicePost | a Sale Invoice object with properties to create
|
250
|
+
opts = {
|
251
|
+
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
252
|
+
}
|
253
|
+
|
254
|
+
begin
|
255
|
+
#Allows you to create a sale invoice
|
256
|
+
result = api_instance.create_sale_invoice(sale_invoice_post, opts)
|
257
|
+
p result
|
258
|
+
rescue DearInventoryRuby::ApiError => e
|
259
|
+
puts "Exception when calling InventoryApi->create_sale_invoice: #{e}"
|
260
|
+
end
|
261
|
+
```
|
262
|
+
|
263
|
+
### Parameters
|
264
|
+
|
265
|
+
|
266
|
+
Name | Type | Description | Notes
|
267
|
+
------------- | ------------- | ------------- | -------------
|
268
|
+
**sale_invoice_post** | [**SaleInvoicePost**](SaleInvoicePost.md)| a Sale Invoice object with properties to create |
|
269
|
+
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
270
|
+
|
271
|
+
### Return type
|
272
|
+
|
273
|
+
[**SaleInvoices**](SaleInvoices.md)
|
274
|
+
|
275
|
+
### Authorization
|
276
|
+
|
277
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
278
|
+
|
279
|
+
### HTTP request headers
|
280
|
+
|
281
|
+
- **Content-Type**: application/json
|
282
|
+
- **Accept**: application/json
|
283
|
+
|
284
|
+
|
285
|
+
## create_sale_order
|
286
|
+
|
287
|
+
> SaleOrder create_sale_order(sale_order, opts)
|
288
|
+
|
289
|
+
Allows you to create a Sale Order
|
290
|
+
|
291
|
+
### Example
|
292
|
+
|
293
|
+
```ruby
|
294
|
+
# load the gem
|
295
|
+
require 'dear-inventory-ruby'
|
296
|
+
# setup authorization
|
297
|
+
DearInventoryRuby.configure do |config|
|
298
|
+
# Configure API key authorization: accountID
|
299
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
300
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
301
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
302
|
+
|
303
|
+
# Configure API key authorization: appKey
|
304
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
305
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
306
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
307
|
+
end
|
308
|
+
|
309
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
310
|
+
sale_order = { "SaleID": "916ab4c0-6ccb-4c93-873d-0603859050e4", "Memo": "", "Status": "DRAFT", "AutoPickPackShipMode": "NOPICK", "Lines": [ { "ProductID": "4aadd8f6-4d3d-46ca-acbb-1a9a662f9bc1", "SKU": "Bread", "Name": "Baked Bread", "Quantity": 1, "Price": 8, "Discount": 0, "Tax": 0, "AverageCost": 5, "TaxRule": "Tax on Sales", "Comment": "", "DropShip": false, "BackorderQuantity": 0, "Total": 8 } ], "AdditionalCharges": [ { "Description": "Desktop/network support via phone. Per month fixed fee for minimum 20 hours/month.", "Price": 350, "Quantity": 1, "Discount": 0, "Tax": 0, "Total": 350, "TaxRule": "Tax on Sales", "Comment": "" } ], "TotalBeforeTax": 358, "Tax": 0, "Total": 358 } # SaleOrder | a Sale Order object with properties to create
|
311
|
+
opts = {
|
312
|
+
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
313
|
+
}
|
314
|
+
|
315
|
+
begin
|
316
|
+
#Allows you to create a Sale Order
|
317
|
+
result = api_instance.create_sale_order(sale_order, opts)
|
318
|
+
p result
|
319
|
+
rescue DearInventoryRuby::ApiError => e
|
320
|
+
puts "Exception when calling InventoryApi->create_sale_order: #{e}"
|
321
|
+
end
|
322
|
+
```
|
323
|
+
|
324
|
+
### Parameters
|
325
|
+
|
326
|
+
|
327
|
+
Name | Type | Description | Notes
|
328
|
+
------------- | ------------- | ------------- | -------------
|
329
|
+
**sale_order** | [**SaleOrder**](SaleOrder.md)| a Sale Order object with properties to create |
|
330
|
+
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
331
|
+
|
332
|
+
### Return type
|
333
|
+
|
334
|
+
[**SaleOrder**](SaleOrder.md)
|
335
|
+
|
336
|
+
### Authorization
|
337
|
+
|
338
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
339
|
+
|
340
|
+
### HTTP request headers
|
341
|
+
|
342
|
+
- **Content-Type**: application/json
|
343
|
+
- **Accept**: application/json
|
344
|
+
|
345
|
+
|
346
|
+
## create_sale_payment
|
347
|
+
|
348
|
+
> SalePayment create_sale_payment(sale_payment, opts)
|
349
|
+
|
350
|
+
Allows you to create a Sale Payment
|
351
|
+
|
352
|
+
### Example
|
353
|
+
|
354
|
+
```ruby
|
355
|
+
# load the gem
|
356
|
+
require 'dear-inventory-ruby'
|
357
|
+
# setup authorization
|
358
|
+
DearInventoryRuby.configure do |config|
|
359
|
+
# Configure API key authorization: accountID
|
360
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
361
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
362
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
363
|
+
|
364
|
+
# Configure API key authorization: appKey
|
365
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
366
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
367
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
368
|
+
end
|
369
|
+
|
370
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
371
|
+
sale_payment = { "TaskID": "4733ba69-21c5-48f5-95e5-307aa9889747", "Type": "Payment", "Reference": "", "Amount": 1, "DatePaid": "2017-11-30T00:00:00Z", "Account": "718", "CurrencyRate": 1 } # SalePayment | a Sale Payment object with properties to create
|
372
|
+
opts = {
|
373
|
+
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
374
|
+
}
|
375
|
+
|
376
|
+
begin
|
377
|
+
#Allows you to create a Sale Payment
|
378
|
+
result = api_instance.create_sale_payment(sale_payment, opts)
|
379
|
+
p result
|
380
|
+
rescue DearInventoryRuby::ApiError => e
|
381
|
+
puts "Exception when calling InventoryApi->create_sale_payment: #{e}"
|
382
|
+
end
|
383
|
+
```
|
384
|
+
|
385
|
+
### Parameters
|
386
|
+
|
387
|
+
|
388
|
+
Name | Type | Description | Notes
|
389
|
+
------------- | ------------- | ------------- | -------------
|
390
|
+
**sale_payment** | [**SalePayment**](SalePayment.md)| a Sale Payment object with properties to create |
|
391
|
+
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
392
|
+
|
393
|
+
### Return type
|
394
|
+
|
395
|
+
[**SalePayment**](SalePayment.md)
|
396
|
+
|
397
|
+
### Authorization
|
398
|
+
|
399
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
400
|
+
|
401
|
+
### HTTP request headers
|
402
|
+
|
403
|
+
- **Content-Type**: application/json
|
404
|
+
- **Accept**: application/json
|
405
|
+
|
406
|
+
|
407
|
+
## create_sale_quote
|
408
|
+
|
409
|
+
> SaleQuote create_sale_quote(sale_quote, opts)
|
410
|
+
|
411
|
+
Allows you to create a Sale Quote
|
412
|
+
|
413
|
+
### Example
|
414
|
+
|
415
|
+
```ruby
|
416
|
+
# load the gem
|
417
|
+
require 'dear-inventory-ruby'
|
418
|
+
# setup authorization
|
419
|
+
DearInventoryRuby.configure do |config|
|
420
|
+
# Configure API key authorization: accountID
|
421
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
422
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
423
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
424
|
+
|
425
|
+
# Configure API key authorization: appKey
|
426
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
427
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
428
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
429
|
+
end
|
430
|
+
|
431
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
432
|
+
sale_quote = { "SaleID": "916ab4c0-6ccb-4c93-873d-0603859050e4", "CombineAdditionalCharges": false, "Memo": "", "Status": "AUTHORISED", "Prepayments": [], "Lines": [ { "ProductID": "4aadd8f6-4d3d-46ca-acbb-1a9a662f9bc1", "SKU": "Bread", "Name": "Baked Bread", "Quantity": 1, "Price": 8, "Discount": 0, "Tax": 0, "AverageCost": 5, "TaxRule": "Tax on Sales", "Comment": "", "Total": 8 } ], "AdditionalCharges": [ { "Description": "Desktop/network support via phone. Per month fixed fee for minimum 20 hours/month.", "Price": 350, "Quantity": 1, "Discount": 0, "Tax": 0, "Total": 350, "TaxRule": "Tax on Sales", "Comment": "" } ] } # SaleQuote | a Sale Quote object with properties to create
|
433
|
+
opts = {
|
434
|
+
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
435
|
+
}
|
436
|
+
|
437
|
+
begin
|
438
|
+
#Allows you to create a Sale Quote
|
439
|
+
result = api_instance.create_sale_quote(sale_quote, opts)
|
440
|
+
p result
|
441
|
+
rescue DearInventoryRuby::ApiError => e
|
442
|
+
puts "Exception when calling InventoryApi->create_sale_quote: #{e}"
|
443
|
+
end
|
444
|
+
```
|
445
|
+
|
446
|
+
### Parameters
|
447
|
+
|
448
|
+
|
449
|
+
Name | Type | Description | Notes
|
450
|
+
------------- | ------------- | ------------- | -------------
|
451
|
+
**sale_quote** | [**SaleQuote**](SaleQuote.md)| a Sale Quote object with properties to create |
|
452
|
+
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
453
|
+
|
454
|
+
### Return type
|
455
|
+
|
456
|
+
[**SaleQuote**](SaleQuote.md)
|
457
|
+
|
458
|
+
### Authorization
|
459
|
+
|
460
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
461
|
+
|
462
|
+
### HTTP request headers
|
463
|
+
|
464
|
+
- **Content-Type**: application/json
|
465
|
+
- **Accept**: application/json
|
466
|
+
|
467
|
+
|
210
468
|
## create_tax
|
211
469
|
|
212
470
|
> Taxes create_tax(tax, opts)
|
@@ -268,11 +526,633 @@ Name | Type | Description | Notes
|
|
268
526
|
- **Accept**: application/json
|
269
527
|
|
270
528
|
|
271
|
-
##
|
529
|
+
## create_webhooks
|
530
|
+
|
531
|
+
> Webhooks create_webhooks(webhook, opts)
|
532
|
+
|
533
|
+
Allows you to create a Webhook
|
534
|
+
|
535
|
+
### Example
|
536
|
+
|
537
|
+
```ruby
|
538
|
+
# load the gem
|
539
|
+
require 'dear-inventory-ruby'
|
540
|
+
# setup authorization
|
541
|
+
DearInventoryRuby.configure do |config|
|
542
|
+
# Configure API key authorization: accountID
|
543
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
544
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
545
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
546
|
+
|
547
|
+
# Configure API key authorization: appKey
|
548
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
549
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
550
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
551
|
+
end
|
552
|
+
|
553
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
554
|
+
webhook = { "Type": "Sale/OrderAuthorised", "IsActive": true, "ExternalURL": "https://hookb.in/Zn8950P7", "ExternalAuthorizationType": "basicauth", "ExternalUserName": "Hello", "ExternalPassword": "123", "ExternalBearerToken": "", "ExternalHeaders": [ { "Key": "Key", "Value": "123" }, { "Key": "6", "Value": "0" } ] } # Webhook | a webhook object with properties to create
|
555
|
+
opts = {
|
556
|
+
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
557
|
+
}
|
558
|
+
|
559
|
+
begin
|
560
|
+
#Allows you to create a Webhook
|
561
|
+
result = api_instance.create_webhooks(webhook, opts)
|
562
|
+
p result
|
563
|
+
rescue DearInventoryRuby::ApiError => e
|
564
|
+
puts "Exception when calling InventoryApi->create_webhooks: #{e}"
|
565
|
+
end
|
566
|
+
```
|
567
|
+
|
568
|
+
### Parameters
|
569
|
+
|
570
|
+
|
571
|
+
Name | Type | Description | Notes
|
572
|
+
------------- | ------------- | ------------- | -------------
|
573
|
+
**webhook** | [**Webhook**](Webhook.md)| a webhook object with properties to create |
|
574
|
+
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
575
|
+
|
576
|
+
### Return type
|
577
|
+
|
578
|
+
[**Webhooks**](Webhooks.md)
|
579
|
+
|
580
|
+
### Authorization
|
581
|
+
|
582
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
583
|
+
|
584
|
+
### HTTP request headers
|
585
|
+
|
586
|
+
- **Content-Type**: application/json
|
587
|
+
- **Accept**: application/json
|
588
|
+
|
589
|
+
|
590
|
+
## delete_account
|
591
|
+
|
592
|
+
> Success delete_account(opts)
|
593
|
+
|
594
|
+
Allows you to delete an Account
|
595
|
+
|
596
|
+
### Example
|
597
|
+
|
598
|
+
```ruby
|
599
|
+
# load the gem
|
600
|
+
require 'dear-inventory-ruby'
|
601
|
+
# setup authorization
|
602
|
+
DearInventoryRuby.configure do |config|
|
603
|
+
# Configure API key authorization: accountID
|
604
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
605
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
606
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
607
|
+
|
608
|
+
# Configure API key authorization: appKey
|
609
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
610
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
611
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
612
|
+
end
|
613
|
+
|
614
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
615
|
+
opts = {
|
616
|
+
code: 'code_example' # String | Default is nil
|
617
|
+
}
|
618
|
+
|
619
|
+
begin
|
620
|
+
#Allows you to delete an Account
|
621
|
+
result = api_instance.delete_account(opts)
|
622
|
+
p result
|
623
|
+
rescue DearInventoryRuby::ApiError => e
|
624
|
+
puts "Exception when calling InventoryApi->delete_account: #{e}"
|
625
|
+
end
|
626
|
+
```
|
627
|
+
|
628
|
+
### Parameters
|
629
|
+
|
630
|
+
|
631
|
+
Name | Type | Description | Notes
|
632
|
+
------------- | ------------- | ------------- | -------------
|
633
|
+
**code** | **String**| Default is nil | [optional]
|
634
|
+
|
635
|
+
### Return type
|
636
|
+
|
637
|
+
[**Success**](Success.md)
|
638
|
+
|
639
|
+
### Authorization
|
640
|
+
|
641
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
642
|
+
|
643
|
+
### HTTP request headers
|
644
|
+
|
645
|
+
- **Content-Type**: Not defined
|
646
|
+
- **Accept**: application/json
|
647
|
+
|
648
|
+
|
649
|
+
## delete_payment_term
|
650
|
+
|
651
|
+
> Success delete_payment_term(opts)
|
652
|
+
|
653
|
+
Allows you to delete a payment term
|
654
|
+
|
655
|
+
### Example
|
656
|
+
|
657
|
+
```ruby
|
658
|
+
# load the gem
|
659
|
+
require 'dear-inventory-ruby'
|
660
|
+
# setup authorization
|
661
|
+
DearInventoryRuby.configure do |config|
|
662
|
+
# Configure API key authorization: accountID
|
663
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
664
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
665
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
666
|
+
|
667
|
+
# Configure API key authorization: appKey
|
668
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
669
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
670
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
671
|
+
end
|
672
|
+
|
673
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
674
|
+
opts = {
|
675
|
+
id: 'id_example' # String | Default is nil
|
676
|
+
}
|
677
|
+
|
678
|
+
begin
|
679
|
+
#Allows you to delete a payment term
|
680
|
+
result = api_instance.delete_payment_term(opts)
|
681
|
+
p result
|
682
|
+
rescue DearInventoryRuby::ApiError => e
|
683
|
+
puts "Exception when calling InventoryApi->delete_payment_term: #{e}"
|
684
|
+
end
|
685
|
+
```
|
686
|
+
|
687
|
+
### Parameters
|
688
|
+
|
689
|
+
|
690
|
+
Name | Type | Description | Notes
|
691
|
+
------------- | ------------- | ------------- | -------------
|
692
|
+
**id** | **String**| Default is nil | [optional]
|
693
|
+
|
694
|
+
### Return type
|
695
|
+
|
696
|
+
[**Success**](Success.md)
|
697
|
+
|
698
|
+
### Authorization
|
699
|
+
|
700
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
701
|
+
|
702
|
+
### HTTP request headers
|
703
|
+
|
704
|
+
- **Content-Type**: Not defined
|
705
|
+
- **Accept**: application/json
|
706
|
+
|
707
|
+
|
708
|
+
## delete_sale_invoice
|
709
|
+
|
710
|
+
> SaleInvoices delete_sale_invoice(opts)
|
711
|
+
|
712
|
+
Allows you to delete a sale invoice
|
713
|
+
|
714
|
+
### Example
|
715
|
+
|
716
|
+
```ruby
|
717
|
+
# load the gem
|
718
|
+
require 'dear-inventory-ruby'
|
719
|
+
# setup authorization
|
720
|
+
DearInventoryRuby.configure do |config|
|
721
|
+
# Configure API key authorization: accountID
|
722
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
723
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
724
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
725
|
+
|
726
|
+
# Configure API key authorization: appKey
|
727
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
728
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
729
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
730
|
+
end
|
731
|
+
|
732
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
733
|
+
opts = {
|
734
|
+
id: 'id_example', # String | Default is nil
|
735
|
+
void: false # Boolean | Default is false
|
736
|
+
}
|
737
|
+
|
738
|
+
begin
|
739
|
+
#Allows you to delete a sale invoice
|
740
|
+
result = api_instance.delete_sale_invoice(opts)
|
741
|
+
p result
|
742
|
+
rescue DearInventoryRuby::ApiError => e
|
743
|
+
puts "Exception when calling InventoryApi->delete_sale_invoice: #{e}"
|
744
|
+
end
|
745
|
+
```
|
746
|
+
|
747
|
+
### Parameters
|
748
|
+
|
749
|
+
|
750
|
+
Name | Type | Description | Notes
|
751
|
+
------------- | ------------- | ------------- | -------------
|
752
|
+
**id** | **String**| Default is nil | [optional]
|
753
|
+
**void** | **Boolean**| Default is false | [optional] [default to false]
|
754
|
+
|
755
|
+
### Return type
|
756
|
+
|
757
|
+
[**SaleInvoices**](SaleInvoices.md)
|
758
|
+
|
759
|
+
### Authorization
|
760
|
+
|
761
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
762
|
+
|
763
|
+
### HTTP request headers
|
764
|
+
|
765
|
+
- **Content-Type**: Not defined
|
766
|
+
- **Accept**: application/json
|
767
|
+
|
768
|
+
|
769
|
+
## delete_sale_payment
|
770
|
+
|
771
|
+
> Success delete_sale_payment(opts)
|
772
|
+
|
773
|
+
Allows you to delete a sale payment
|
774
|
+
|
775
|
+
### Example
|
776
|
+
|
777
|
+
```ruby
|
778
|
+
# load the gem
|
779
|
+
require 'dear-inventory-ruby'
|
780
|
+
# setup authorization
|
781
|
+
DearInventoryRuby.configure do |config|
|
782
|
+
# Configure API key authorization: accountID
|
783
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
784
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
785
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
786
|
+
|
787
|
+
# Configure API key authorization: appKey
|
788
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
789
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
790
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
791
|
+
end
|
792
|
+
|
793
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
794
|
+
opts = {
|
795
|
+
id: 'id_example' # String | Default is nil
|
796
|
+
}
|
797
|
+
|
798
|
+
begin
|
799
|
+
#Allows you to delete a sale payment
|
800
|
+
result = api_instance.delete_sale_payment(opts)
|
801
|
+
p result
|
802
|
+
rescue DearInventoryRuby::ApiError => e
|
803
|
+
puts "Exception when calling InventoryApi->delete_sale_payment: #{e}"
|
804
|
+
end
|
805
|
+
```
|
806
|
+
|
807
|
+
### Parameters
|
808
|
+
|
809
|
+
|
810
|
+
Name | Type | Description | Notes
|
811
|
+
------------- | ------------- | ------------- | -------------
|
812
|
+
**id** | **String**| Default is nil | [optional]
|
813
|
+
|
814
|
+
### Return type
|
815
|
+
|
816
|
+
[**Success**](Success.md)
|
817
|
+
|
818
|
+
### Authorization
|
819
|
+
|
820
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
821
|
+
|
822
|
+
### HTTP request headers
|
823
|
+
|
824
|
+
- **Content-Type**: Not defined
|
825
|
+
- **Accept**: application/json
|
826
|
+
|
827
|
+
|
828
|
+
## delete_webhook
|
829
|
+
|
830
|
+
> Webhooks delete_webhook(opts)
|
831
|
+
|
832
|
+
Allows you to delete a webhook
|
833
|
+
|
834
|
+
### Example
|
835
|
+
|
836
|
+
```ruby
|
837
|
+
# load the gem
|
838
|
+
require 'dear-inventory-ruby'
|
839
|
+
# setup authorization
|
840
|
+
DearInventoryRuby.configure do |config|
|
841
|
+
# Configure API key authorization: accountID
|
842
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
843
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
844
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
845
|
+
|
846
|
+
# Configure API key authorization: appKey
|
847
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
848
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
849
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
850
|
+
end
|
851
|
+
|
852
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
853
|
+
opts = {
|
854
|
+
id: 'id_example' # String | Default is nil
|
855
|
+
}
|
856
|
+
|
857
|
+
begin
|
858
|
+
#Allows you to delete a webhook
|
859
|
+
result = api_instance.delete_webhook(opts)
|
860
|
+
p result
|
861
|
+
rescue DearInventoryRuby::ApiError => e
|
862
|
+
puts "Exception when calling InventoryApi->delete_webhook: #{e}"
|
863
|
+
end
|
864
|
+
```
|
865
|
+
|
866
|
+
### Parameters
|
867
|
+
|
868
|
+
|
869
|
+
Name | Type | Description | Notes
|
870
|
+
------------- | ------------- | ------------- | -------------
|
871
|
+
**id** | **String**| Default is nil | [optional]
|
872
|
+
|
873
|
+
### Return type
|
874
|
+
|
875
|
+
[**Webhooks**](Webhooks.md)
|
876
|
+
|
877
|
+
### Authorization
|
878
|
+
|
879
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
880
|
+
|
881
|
+
### HTTP request headers
|
882
|
+
|
883
|
+
- **Content-Type**: Not defined
|
884
|
+
- **Accept**: application/json
|
885
|
+
|
886
|
+
|
887
|
+
## get_accounts
|
888
|
+
|
889
|
+
> Accounts get_accounts(opts)
|
890
|
+
|
891
|
+
Allows you to retrieve the Chart of Accounts
|
892
|
+
|
893
|
+
### Example
|
894
|
+
|
895
|
+
```ruby
|
896
|
+
# load the gem
|
897
|
+
require 'dear-inventory-ruby'
|
898
|
+
# setup authorization
|
899
|
+
DearInventoryRuby.configure do |config|
|
900
|
+
# Configure API key authorization: accountID
|
901
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
902
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
903
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
904
|
+
|
905
|
+
# Configure API key authorization: appKey
|
906
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
907
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
908
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
909
|
+
end
|
910
|
+
|
911
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
912
|
+
opts = {
|
913
|
+
page: '1', # String | Default is 1
|
914
|
+
limit: '100', # String | Default is 100
|
915
|
+
code: 'code_example', # String | Default is nil
|
916
|
+
name: 'name_example', # String | Default is nil
|
917
|
+
_class: '_class_example', # String | Default is nil
|
918
|
+
type: 'type_example', # String | Default is nil
|
919
|
+
status: 'status_example' # String | Default is nil
|
920
|
+
}
|
921
|
+
|
922
|
+
begin
|
923
|
+
#Allows you to retrieve the Chart of Accounts
|
924
|
+
result = api_instance.get_accounts(opts)
|
925
|
+
p result
|
926
|
+
rescue DearInventoryRuby::ApiError => e
|
927
|
+
puts "Exception when calling InventoryApi->get_accounts: #{e}"
|
928
|
+
end
|
929
|
+
```
|
930
|
+
|
931
|
+
### Parameters
|
932
|
+
|
933
|
+
|
934
|
+
Name | Type | Description | Notes
|
935
|
+
------------- | ------------- | ------------- | -------------
|
936
|
+
**page** | **String**| Default is 1 | [optional] [default to '1']
|
937
|
+
**limit** | **String**| Default is 100 | [optional] [default to '100']
|
938
|
+
**code** | **String**| Default is nil | [optional]
|
939
|
+
**name** | **String**| Default is nil | [optional]
|
940
|
+
**_class** | **String**| Default is nil | [optional]
|
941
|
+
**type** | **String**| Default is nil | [optional]
|
942
|
+
**status** | **String**| Default is nil | [optional]
|
943
|
+
|
944
|
+
### Return type
|
945
|
+
|
946
|
+
[**Accounts**](Accounts.md)
|
947
|
+
|
948
|
+
### Authorization
|
949
|
+
|
950
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
951
|
+
|
952
|
+
### HTTP request headers
|
953
|
+
|
954
|
+
- **Content-Type**: Not defined
|
955
|
+
- **Accept**: application/json
|
956
|
+
|
957
|
+
|
958
|
+
## get_customers
|
959
|
+
|
960
|
+
> Customers get_customers(opts)
|
961
|
+
|
962
|
+
Allows you to retrieve the customers
|
963
|
+
|
964
|
+
### Example
|
965
|
+
|
966
|
+
```ruby
|
967
|
+
# load the gem
|
968
|
+
require 'dear-inventory-ruby'
|
969
|
+
# setup authorization
|
970
|
+
DearInventoryRuby.configure do |config|
|
971
|
+
# Configure API key authorization: accountID
|
972
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
973
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
974
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
975
|
+
|
976
|
+
# Configure API key authorization: appKey
|
977
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
978
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
979
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
980
|
+
end
|
981
|
+
|
982
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
983
|
+
opts = {
|
984
|
+
page: '1', # String | Default is 1
|
985
|
+
limit: '100', # String | Default is 100
|
986
|
+
id: 'id_example', # String | Default is nil
|
987
|
+
name: 'name_example', # String | Default is nil
|
988
|
+
modified_since: 'modified_since_example', # String | Default is nil
|
989
|
+
include_deprecated: 'false' # String | Default is false
|
990
|
+
}
|
991
|
+
|
992
|
+
begin
|
993
|
+
#Allows you to retrieve the customers
|
994
|
+
result = api_instance.get_customers(opts)
|
995
|
+
p result
|
996
|
+
rescue DearInventoryRuby::ApiError => e
|
997
|
+
puts "Exception when calling InventoryApi->get_customers: #{e}"
|
998
|
+
end
|
999
|
+
```
|
1000
|
+
|
1001
|
+
### Parameters
|
1002
|
+
|
1003
|
+
|
1004
|
+
Name | Type | Description | Notes
|
1005
|
+
------------- | ------------- | ------------- | -------------
|
1006
|
+
**page** | **String**| Default is 1 | [optional] [default to '1']
|
1007
|
+
**limit** | **String**| Default is 100 | [optional] [default to '100']
|
1008
|
+
**id** | **String**| Default is nil | [optional]
|
1009
|
+
**name** | **String**| Default is nil | [optional]
|
1010
|
+
**modified_since** | **String**| Default is nil | [optional]
|
1011
|
+
**include_deprecated** | **String**| Default is false | [optional] [default to 'false']
|
1012
|
+
|
1013
|
+
### Return type
|
1014
|
+
|
1015
|
+
[**Customers**](Customers.md)
|
1016
|
+
|
1017
|
+
### Authorization
|
1018
|
+
|
1019
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
1020
|
+
|
1021
|
+
### HTTP request headers
|
1022
|
+
|
1023
|
+
- **Content-Type**: Not defined
|
1024
|
+
- **Accept**: application/json
|
1025
|
+
|
1026
|
+
|
1027
|
+
## get_me
|
1028
|
+
|
1029
|
+
> Me get_me
|
1030
|
+
|
1031
|
+
Allows you to retrieve your information
|
1032
|
+
|
1033
|
+
### Example
|
1034
|
+
|
1035
|
+
```ruby
|
1036
|
+
# load the gem
|
1037
|
+
require 'dear-inventory-ruby'
|
1038
|
+
# setup authorization
|
1039
|
+
DearInventoryRuby.configure do |config|
|
1040
|
+
# Configure API key authorization: accountID
|
1041
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
1042
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1043
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
1044
|
+
|
1045
|
+
# Configure API key authorization: appKey
|
1046
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
1047
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1048
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
1049
|
+
end
|
1050
|
+
|
1051
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
1052
|
+
|
1053
|
+
begin
|
1054
|
+
#Allows you to retrieve your information
|
1055
|
+
result = api_instance.get_me
|
1056
|
+
p result
|
1057
|
+
rescue DearInventoryRuby::ApiError => e
|
1058
|
+
puts "Exception when calling InventoryApi->get_me: #{e}"
|
1059
|
+
end
|
1060
|
+
```
|
1061
|
+
|
1062
|
+
### Parameters
|
1063
|
+
|
1064
|
+
This endpoint does not need any parameter.
|
1065
|
+
|
1066
|
+
### Return type
|
1067
|
+
|
1068
|
+
[**Me**](Me.md)
|
1069
|
+
|
1070
|
+
### Authorization
|
1071
|
+
|
1072
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
1073
|
+
|
1074
|
+
### HTTP request headers
|
1075
|
+
|
1076
|
+
- **Content-Type**: Not defined
|
1077
|
+
- **Accept**: application/json
|
1078
|
+
|
1079
|
+
|
1080
|
+
## get_payment_terms
|
1081
|
+
|
1082
|
+
> PaymentTerms get_payment_terms(opts)
|
1083
|
+
|
1084
|
+
Allows you to retrieve the payment terms
|
1085
|
+
|
1086
|
+
### Example
|
1087
|
+
|
1088
|
+
```ruby
|
1089
|
+
# load the gem
|
1090
|
+
require 'dear-inventory-ruby'
|
1091
|
+
# setup authorization
|
1092
|
+
DearInventoryRuby.configure do |config|
|
1093
|
+
# Configure API key authorization: accountID
|
1094
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
1095
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1096
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
1097
|
+
|
1098
|
+
# Configure API key authorization: appKey
|
1099
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
1100
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1101
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
1102
|
+
end
|
1103
|
+
|
1104
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
1105
|
+
opts = {
|
1106
|
+
page: '1', # String | Default is 1
|
1107
|
+
limit: '100', # String | Default is 100
|
1108
|
+
id: 'id_example', # String | Default is nil
|
1109
|
+
name: 'name_example', # String | Default is nil
|
1110
|
+
method: 'method_example', # String | Default is nil
|
1111
|
+
is_active: true, # Boolean | Default is nil
|
1112
|
+
is_default: true # Boolean | Default is nil
|
1113
|
+
}
|
1114
|
+
|
1115
|
+
begin
|
1116
|
+
#Allows you to retrieve the payment terms
|
1117
|
+
result = api_instance.get_payment_terms(opts)
|
1118
|
+
p result
|
1119
|
+
rescue DearInventoryRuby::ApiError => e
|
1120
|
+
puts "Exception when calling InventoryApi->get_payment_terms: #{e}"
|
1121
|
+
end
|
1122
|
+
```
|
1123
|
+
|
1124
|
+
### Parameters
|
1125
|
+
|
1126
|
+
|
1127
|
+
Name | Type | Description | Notes
|
1128
|
+
------------- | ------------- | ------------- | -------------
|
1129
|
+
**page** | **String**| Default is 1 | [optional] [default to '1']
|
1130
|
+
**limit** | **String**| Default is 100 | [optional] [default to '100']
|
1131
|
+
**id** | **String**| Default is nil | [optional]
|
1132
|
+
**name** | **String**| Default is nil | [optional]
|
1133
|
+
**method** | **String**| Default is nil | [optional]
|
1134
|
+
**is_active** | **Boolean**| Default is nil | [optional]
|
1135
|
+
**is_default** | **Boolean**| Default is nil | [optional]
|
1136
|
+
|
1137
|
+
### Return type
|
1138
|
+
|
1139
|
+
[**PaymentTerms**](PaymentTerms.md)
|
1140
|
+
|
1141
|
+
### Authorization
|
1142
|
+
|
1143
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
1144
|
+
|
1145
|
+
### HTTP request headers
|
1146
|
+
|
1147
|
+
- **Content-Type**: Not defined
|
1148
|
+
- **Accept**: application/json
|
1149
|
+
|
1150
|
+
|
1151
|
+
## get_price_tiers
|
272
1152
|
|
273
|
-
>
|
1153
|
+
> PriceTiers get_price_tiers
|
274
1154
|
|
275
|
-
Allows you to
|
1155
|
+
Allows you to retrieve the Price Tiers
|
276
1156
|
|
277
1157
|
### Example
|
278
1158
|
|
@@ -293,29 +1173,23 @@ DearInventoryRuby.configure do |config|
|
|
293
1173
|
end
|
294
1174
|
|
295
1175
|
api_instance = DearInventoryRuby::InventoryApi.new
|
296
|
-
opts = {
|
297
|
-
code: 'code_example' # String | Default is nil
|
298
|
-
}
|
299
1176
|
|
300
1177
|
begin
|
301
|
-
#Allows you to
|
302
|
-
result = api_instance.
|
1178
|
+
#Allows you to retrieve the Price Tiers
|
1179
|
+
result = api_instance.get_price_tiers
|
303
1180
|
p result
|
304
1181
|
rescue DearInventoryRuby::ApiError => e
|
305
|
-
puts "Exception when calling InventoryApi->
|
1182
|
+
puts "Exception when calling InventoryApi->get_price_tiers: #{e}"
|
306
1183
|
end
|
307
1184
|
```
|
308
1185
|
|
309
1186
|
### Parameters
|
310
1187
|
|
311
|
-
|
312
|
-
Name | Type | Description | Notes
|
313
|
-
------------- | ------------- | ------------- | -------------
|
314
|
-
**code** | **String**| Default is nil | [optional]
|
1188
|
+
This endpoint does not need any parameter.
|
315
1189
|
|
316
1190
|
### Return type
|
317
1191
|
|
318
|
-
[**
|
1192
|
+
[**PriceTiers**](PriceTiers.md)
|
319
1193
|
|
320
1194
|
### Authorization
|
321
1195
|
|
@@ -327,11 +1201,11 @@ Name | Type | Description | Notes
|
|
327
1201
|
- **Accept**: application/json
|
328
1202
|
|
329
1203
|
|
330
|
-
##
|
1204
|
+
## get_sale_invoices
|
331
1205
|
|
332
|
-
>
|
1206
|
+
> SaleInvoices get_sale_invoices(opts)
|
333
1207
|
|
334
|
-
Allows you to
|
1208
|
+
Allows you to retrieve the sale invoices
|
335
1209
|
|
336
1210
|
### Example
|
337
1211
|
|
@@ -353,15 +1227,17 @@ end
|
|
353
1227
|
|
354
1228
|
api_instance = DearInventoryRuby::InventoryApi.new
|
355
1229
|
opts = {
|
356
|
-
|
1230
|
+
sale_id: 'sale_id_example', # String | Unique DEAR Sale ID
|
1231
|
+
combine_additional_charges: false, # Boolean | Show additional charges in 'Lines' array
|
1232
|
+
include_product_info: false # Boolean | Show all used products in additional array
|
357
1233
|
}
|
358
1234
|
|
359
1235
|
begin
|
360
|
-
#Allows you to
|
361
|
-
result = api_instance.
|
1236
|
+
#Allows you to retrieve the sale invoices
|
1237
|
+
result = api_instance.get_sale_invoices(opts)
|
362
1238
|
p result
|
363
1239
|
rescue DearInventoryRuby::ApiError => e
|
364
|
-
puts "Exception when calling InventoryApi->
|
1240
|
+
puts "Exception when calling InventoryApi->get_sale_invoices: #{e}"
|
365
1241
|
end
|
366
1242
|
```
|
367
1243
|
|
@@ -370,11 +1246,13 @@ end
|
|
370
1246
|
|
371
1247
|
Name | Type | Description | Notes
|
372
1248
|
------------- | ------------- | ------------- | -------------
|
373
|
-
**
|
1249
|
+
**sale_id** | **String**| Unique DEAR Sale ID | [optional]
|
1250
|
+
**combine_additional_charges** | **Boolean**| Show additional charges in 'Lines' array | [optional] [default to false]
|
1251
|
+
**include_product_info** | **Boolean**| Show all used products in additional array | [optional] [default to false]
|
374
1252
|
|
375
1253
|
### Return type
|
376
1254
|
|
377
|
-
[**
|
1255
|
+
[**SaleInvoices**](SaleInvoices.md)
|
378
1256
|
|
379
1257
|
### Authorization
|
380
1258
|
|
@@ -386,11 +1264,11 @@ Name | Type | Description | Notes
|
|
386
1264
|
- **Accept**: application/json
|
387
1265
|
|
388
1266
|
|
389
|
-
##
|
1267
|
+
## get_sale_order
|
390
1268
|
|
391
|
-
>
|
1269
|
+
> SaleOrder get_sale_order(opts)
|
392
1270
|
|
393
|
-
Allows you to retrieve the
|
1271
|
+
Allows you to retrieve the Sale Order
|
394
1272
|
|
395
1273
|
### Example
|
396
1274
|
|
@@ -412,20 +1290,17 @@ end
|
|
412
1290
|
|
413
1291
|
api_instance = DearInventoryRuby::InventoryApi.new
|
414
1292
|
opts = {
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
name: 'name_example', # String | Default is nil
|
419
|
-
type: 'type_example', # String | Default is nil
|
420
|
-
status: 'status_example' # String | Default is nil
|
1293
|
+
sale_id: 'sale_id_example', # String | Unique DEAR Sale ID
|
1294
|
+
combine_additional_charges: false, # Boolean | Show additional charges in 'Lines' array
|
1295
|
+
include_product_info: false # Boolean | Show all used products in additional array
|
421
1296
|
}
|
422
1297
|
|
423
1298
|
begin
|
424
|
-
#Allows you to retrieve the
|
425
|
-
result = api_instance.
|
1299
|
+
#Allows you to retrieve the Sale Order
|
1300
|
+
result = api_instance.get_sale_order(opts)
|
426
1301
|
p result
|
427
1302
|
rescue DearInventoryRuby::ApiError => e
|
428
|
-
puts "Exception when calling InventoryApi->
|
1303
|
+
puts "Exception when calling InventoryApi->get_sale_order: #{e}"
|
429
1304
|
end
|
430
1305
|
```
|
431
1306
|
|
@@ -434,16 +1309,13 @@ end
|
|
434
1309
|
|
435
1310
|
Name | Type | Description | Notes
|
436
1311
|
------------- | ------------- | ------------- | -------------
|
437
|
-
**
|
438
|
-
**
|
439
|
-
**
|
440
|
-
**name** | **String**| Default is nil | [optional]
|
441
|
-
**type** | **String**| Default is nil | [optional]
|
442
|
-
**status** | **String**| Default is nil | [optional]
|
1312
|
+
**sale_id** | **String**| Unique DEAR Sale ID | [optional]
|
1313
|
+
**combine_additional_charges** | **Boolean**| Show additional charges in 'Lines' array | [optional] [default to false]
|
1314
|
+
**include_product_info** | **Boolean**| Show all used products in additional array | [optional] [default to false]
|
443
1315
|
|
444
1316
|
### Return type
|
445
1317
|
|
446
|
-
[**
|
1318
|
+
[**SaleOrder**](SaleOrder.md)
|
447
1319
|
|
448
1320
|
### Authorization
|
449
1321
|
|
@@ -455,11 +1327,11 @@ Name | Type | Description | Notes
|
|
455
1327
|
- **Accept**: application/json
|
456
1328
|
|
457
1329
|
|
458
|
-
##
|
1330
|
+
## get_sale_payment
|
459
1331
|
|
460
|
-
>
|
1332
|
+
> Array<SalePayment> get_sale_payment(opts)
|
461
1333
|
|
462
|
-
Allows you to retrieve the
|
1334
|
+
Allows you to retrieve the Sale Payments
|
463
1335
|
|
464
1336
|
### Example
|
465
1337
|
|
@@ -481,20 +1353,15 @@ end
|
|
481
1353
|
|
482
1354
|
api_instance = DearInventoryRuby::InventoryApi.new
|
483
1355
|
opts = {
|
484
|
-
|
485
|
-
limit: '100', # String | Default is 100
|
486
|
-
id: 'id_example', # String | Default is nil
|
487
|
-
name: 'name_example', # String | Default is nil
|
488
|
-
modified_since: 'modified_since_example', # String | Default is nil
|
489
|
-
include_deprecated: 'false' # String | Default is false
|
1356
|
+
sale_id: 'sale_id_example' # String | Unique DEAR Sale ID
|
490
1357
|
}
|
491
1358
|
|
492
1359
|
begin
|
493
|
-
#Allows you to retrieve the
|
494
|
-
result = api_instance.
|
1360
|
+
#Allows you to retrieve the Sale Payments
|
1361
|
+
result = api_instance.get_sale_payment(opts)
|
495
1362
|
p result
|
496
1363
|
rescue DearInventoryRuby::ApiError => e
|
497
|
-
puts "Exception when calling InventoryApi->
|
1364
|
+
puts "Exception when calling InventoryApi->get_sale_payment: #{e}"
|
498
1365
|
end
|
499
1366
|
```
|
500
1367
|
|
@@ -503,16 +1370,11 @@ end
|
|
503
1370
|
|
504
1371
|
Name | Type | Description | Notes
|
505
1372
|
------------- | ------------- | ------------- | -------------
|
506
|
-
**
|
507
|
-
**limit** | **String**| Default is 100 | [optional] [default to '100']
|
508
|
-
**id** | **String**| Default is nil | [optional]
|
509
|
-
**name** | **String**| Default is nil | [optional]
|
510
|
-
**modified_since** | **String**| Default is nil | [optional]
|
511
|
-
**include_deprecated** | **String**| Default is false | [optional] [default to 'false']
|
1373
|
+
**sale_id** | **String**| Unique DEAR Sale ID | [optional]
|
512
1374
|
|
513
1375
|
### Return type
|
514
1376
|
|
515
|
-
[**
|
1377
|
+
[**Array<SalePayment>**](SalePayment.md)
|
516
1378
|
|
517
1379
|
### Authorization
|
518
1380
|
|
@@ -524,11 +1386,11 @@ Name | Type | Description | Notes
|
|
524
1386
|
- **Accept**: application/json
|
525
1387
|
|
526
1388
|
|
527
|
-
##
|
1389
|
+
## get_sale_quote
|
528
1390
|
|
529
|
-
>
|
1391
|
+
> SaleQuote get_sale_quote(opts)
|
530
1392
|
|
531
|
-
Allows you to retrieve
|
1393
|
+
Allows you to retrieve the Sale Quote
|
532
1394
|
|
533
1395
|
### Example
|
534
1396
|
|
@@ -549,23 +1411,33 @@ DearInventoryRuby.configure do |config|
|
|
549
1411
|
end
|
550
1412
|
|
551
1413
|
api_instance = DearInventoryRuby::InventoryApi.new
|
1414
|
+
opts = {
|
1415
|
+
sale_id: 'sale_id_example', # String | Unique DEAR Sale ID
|
1416
|
+
combine_additional_charges: false, # Boolean | Show additional charges in 'Lines' array
|
1417
|
+
include_product_info: false # Boolean | Show all used products in additional array
|
1418
|
+
}
|
552
1419
|
|
553
1420
|
begin
|
554
|
-
#Allows you to retrieve
|
555
|
-
result = api_instance.
|
1421
|
+
#Allows you to retrieve the Sale Quote
|
1422
|
+
result = api_instance.get_sale_quote(opts)
|
556
1423
|
p result
|
557
1424
|
rescue DearInventoryRuby::ApiError => e
|
558
|
-
puts "Exception when calling InventoryApi->
|
1425
|
+
puts "Exception when calling InventoryApi->get_sale_quote: #{e}"
|
559
1426
|
end
|
560
1427
|
```
|
561
1428
|
|
562
1429
|
### Parameters
|
563
1430
|
|
564
|
-
|
1431
|
+
|
1432
|
+
Name | Type | Description | Notes
|
1433
|
+
------------- | ------------- | ------------- | -------------
|
1434
|
+
**sale_id** | **String**| Unique DEAR Sale ID | [optional]
|
1435
|
+
**combine_additional_charges** | **Boolean**| Show additional charges in 'Lines' array | [optional] [default to false]
|
1436
|
+
**include_product_info** | **Boolean**| Show all used products in additional array | [optional] [default to false]
|
565
1437
|
|
566
1438
|
### Return type
|
567
1439
|
|
568
|
-
[**
|
1440
|
+
[**SaleQuote**](SaleQuote.md)
|
569
1441
|
|
570
1442
|
### Authorization
|
571
1443
|
|
@@ -577,11 +1449,11 @@ This endpoint does not need any parameter.
|
|
577
1449
|
- **Accept**: application/json
|
578
1450
|
|
579
1451
|
|
580
|
-
##
|
1452
|
+
## get_taxes
|
581
1453
|
|
582
|
-
>
|
1454
|
+
> Taxes get_taxes(opts)
|
583
1455
|
|
584
|
-
Allows you to retrieve the
|
1456
|
+
Allows you to retrieve the taxes
|
585
1457
|
|
586
1458
|
### Example
|
587
1459
|
|
@@ -607,17 +1479,18 @@ opts = {
|
|
607
1479
|
limit: '100', # String | Default is 100
|
608
1480
|
id: 'id_example', # String | Default is nil
|
609
1481
|
name: 'name_example', # String | Default is nil
|
610
|
-
method: 'method_example', # String | Default is nil
|
611
1482
|
is_active: true, # Boolean | Default is nil
|
612
|
-
|
1483
|
+
is_tax_for_sale: true, # Boolean | Default is nil
|
1484
|
+
is_tax_for_purchase: true, # Boolean | Default is nil
|
1485
|
+
account: 'account_example' # String | Default is nil
|
613
1486
|
}
|
614
1487
|
|
615
1488
|
begin
|
616
|
-
#Allows you to retrieve the
|
617
|
-
result = api_instance.
|
1489
|
+
#Allows you to retrieve the taxes
|
1490
|
+
result = api_instance.get_taxes(opts)
|
618
1491
|
p result
|
619
1492
|
rescue DearInventoryRuby::ApiError => e
|
620
|
-
puts "Exception when calling InventoryApi->
|
1493
|
+
puts "Exception when calling InventoryApi->get_taxes: #{e}"
|
621
1494
|
end
|
622
1495
|
```
|
623
1496
|
|
@@ -630,13 +1503,14 @@ Name | Type | Description | Notes
|
|
630
1503
|
**limit** | **String**| Default is 100 | [optional] [default to '100']
|
631
1504
|
**id** | **String**| Default is nil | [optional]
|
632
1505
|
**name** | **String**| Default is nil | [optional]
|
633
|
-
**method** | **String**| Default is nil | [optional]
|
634
1506
|
**is_active** | **Boolean**| Default is nil | [optional]
|
635
|
-
**
|
1507
|
+
**is_tax_for_sale** | **Boolean**| Default is nil | [optional]
|
1508
|
+
**is_tax_for_purchase** | **Boolean**| Default is nil | [optional]
|
1509
|
+
**account** | **String**| Default is nil | [optional]
|
636
1510
|
|
637
1511
|
### Return type
|
638
1512
|
|
639
|
-
[**
|
1513
|
+
[**Taxes**](Taxes.md)
|
640
1514
|
|
641
1515
|
### Authorization
|
642
1516
|
|
@@ -648,11 +1522,11 @@ Name | Type | Description | Notes
|
|
648
1522
|
- **Accept**: application/json
|
649
1523
|
|
650
1524
|
|
651
|
-
##
|
1525
|
+
## get_webhooks
|
652
1526
|
|
653
|
-
>
|
1527
|
+
> Webhooks get_webhooks
|
654
1528
|
|
655
|
-
Allows you to retrieve the
|
1529
|
+
Allows you to retrieve the Webhooks
|
656
1530
|
|
657
1531
|
### Example
|
658
1532
|
|
@@ -675,11 +1549,11 @@ end
|
|
675
1549
|
api_instance = DearInventoryRuby::InventoryApi.new
|
676
1550
|
|
677
1551
|
begin
|
678
|
-
#Allows you to retrieve the
|
679
|
-
result = api_instance.
|
1552
|
+
#Allows you to retrieve the Webhooks
|
1553
|
+
result = api_instance.get_webhooks
|
680
1554
|
p result
|
681
1555
|
rescue DearInventoryRuby::ApiError => e
|
682
|
-
puts "Exception when calling InventoryApi->
|
1556
|
+
puts "Exception when calling InventoryApi->get_webhooks: #{e}"
|
683
1557
|
end
|
684
1558
|
```
|
685
1559
|
|
@@ -689,7 +1563,7 @@ This endpoint does not need any parameter.
|
|
689
1563
|
|
690
1564
|
### Return type
|
691
1565
|
|
692
|
-
[**
|
1566
|
+
[**Webhooks**](Webhooks.md)
|
693
1567
|
|
694
1568
|
### Authorization
|
695
1569
|
|
@@ -701,11 +1575,11 @@ This endpoint does not need any parameter.
|
|
701
1575
|
- **Accept**: application/json
|
702
1576
|
|
703
1577
|
|
704
|
-
##
|
1578
|
+
## update_account
|
705
1579
|
|
706
|
-
>
|
1580
|
+
> Accounts update_account(account, opts)
|
707
1581
|
|
708
|
-
Allows you to
|
1582
|
+
Allows you to update an Account
|
709
1583
|
|
710
1584
|
### Example
|
711
1585
|
|
@@ -726,18 +1600,17 @@ DearInventoryRuby.configure do |config|
|
|
726
1600
|
end
|
727
1601
|
|
728
1602
|
api_instance = DearInventoryRuby::InventoryApi.new
|
1603
|
+
account = { "Code": "001", "Status": "ACTIVE", "Name": "Accounts Payable put test", "Type": "CURRLIAB", "Description": "Put test description", "Class": "LIABILITY", "SystemAccount": "CREDITORS" } # Account | an Account object with properties to update
|
729
1604
|
opts = {
|
730
|
-
|
731
|
-
combine_additional_charges: false, # Boolean | Show additional charges in 'Lines' array
|
732
|
-
include_product_info: false # Boolean | Show all used products in additional array
|
1605
|
+
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
733
1606
|
}
|
734
1607
|
|
735
1608
|
begin
|
736
|
-
#Allows you to
|
737
|
-
result = api_instance.
|
1609
|
+
#Allows you to update an Account
|
1610
|
+
result = api_instance.update_account(account, opts)
|
738
1611
|
p result
|
739
1612
|
rescue DearInventoryRuby::ApiError => e
|
740
|
-
puts "Exception when calling InventoryApi->
|
1613
|
+
puts "Exception when calling InventoryApi->update_account: #{e}"
|
741
1614
|
end
|
742
1615
|
```
|
743
1616
|
|
@@ -746,13 +1619,12 @@ end
|
|
746
1619
|
|
747
1620
|
Name | Type | Description | Notes
|
748
1621
|
------------- | ------------- | ------------- | -------------
|
749
|
-
**
|
750
|
-
**
|
751
|
-
**include_product_info** | **Boolean**| Show all used products in additional array | [optional] [default to false]
|
1622
|
+
**account** | [**Account**](Account.md)| an Account object with properties to update |
|
1623
|
+
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
752
1624
|
|
753
1625
|
### Return type
|
754
1626
|
|
755
|
-
[**
|
1627
|
+
[**Accounts**](Accounts.md)
|
756
1628
|
|
757
1629
|
### Authorization
|
758
1630
|
|
@@ -760,15 +1632,15 @@ Name | Type | Description | Notes
|
|
760
1632
|
|
761
1633
|
### HTTP request headers
|
762
1634
|
|
763
|
-
- **Content-Type**:
|
1635
|
+
- **Content-Type**: application/json
|
764
1636
|
- **Accept**: application/json
|
765
1637
|
|
766
1638
|
|
767
|
-
##
|
1639
|
+
## update_customer
|
768
1640
|
|
769
|
-
>
|
1641
|
+
> Customers update_customer(customer, opts)
|
770
1642
|
|
771
|
-
Allows you to
|
1643
|
+
Allows you to update a customer
|
772
1644
|
|
773
1645
|
### Example
|
774
1646
|
|
@@ -789,23 +1661,17 @@ DearInventoryRuby.configure do |config|
|
|
789
1661
|
end
|
790
1662
|
|
791
1663
|
api_instance = DearInventoryRuby::InventoryApi.new
|
1664
|
+
customer = { "ID": "7d6b441a-3067-42b1-9b81-2def95df827b", "Name": "DIISR - Small Business Services customer", "Currency": "AUD", "PaymentTerm": "30 days", "Discount": 0, "TaxRule": "GST Free Exports", "Carrier": "DEFAULT Carrier", "SalesRepresentative": nil, "Location": "Main Warehouse", "Comments": nil, "AccountReceivable": "610", "RevenueAccount": "200", "PriceTier": "Tier 1", "TaxNumber": nil, "AdditionalAttribute1": nil, "AdditionalAttribute2": nil, "AdditionalAttribute3": nil, "AdditionalAttribute4": nil, "AdditionalAttribute5": nil, "AdditionalAttribute6": nil, "AdditionalAttribute7": nil, "AdditionalAttribute8": nil, "AdditionalAttribute9": nil, "AdditionalAttribute10": nil, "AttributeSet": nil, "Tags": nil, "Status": "Active", "Addresses": [ { "ID": "4bc4e423-d8af-454d-a186-4a827c15bd0b", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Line1": "L3, Southbank House", "Line2": "13 Gallery Ave", "City": "Melbourne", "State": "VIC", "Postcode": "3131", "Country": nil, "Type": "Business", "DefaultForType": true }, { "ID": "35cec087-04da-46b5-b3c8-c3a7311f2417", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Line1": "L3, Southbank House", "Line2": "13 Gallery Ave", "City": "Melbourne", "State": "VIC", "Postcode": "3131", "Country": nil, "Type": "Billing", "DefaultForType": true } ], "Contacts": [ { "ID": "1d62f59b-657d-423f-ad95-9ad9ec4f29a3", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Name": "Sheree Bond", "JobTitle": nil, "Phone": "0800 4389376", "MobilePhone": nil, "Fax": "03 4389379", "Email": "accounts@diisr.govt", "Website": nil, "Default": true, "Comment": nil, "IncludeInEmail": false } ] } # Customer | a customer object with properties to update
|
792
1665
|
opts = {
|
793
|
-
|
794
|
-
limit: '100', # String | Default is 100
|
795
|
-
id: 'id_example', # String | Default is nil
|
796
|
-
name: 'name_example', # String | Default is nil
|
797
|
-
is_active: true, # Boolean | Default is nil
|
798
|
-
is_tax_for_sale: true, # Boolean | Default is nil
|
799
|
-
is_tax_for_purchase: true, # Boolean | Default is nil
|
800
|
-
account: 'account_example' # String | Default is nil
|
1666
|
+
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
801
1667
|
}
|
802
1668
|
|
803
1669
|
begin
|
804
|
-
#Allows you to
|
805
|
-
result = api_instance.
|
1670
|
+
#Allows you to update a customer
|
1671
|
+
result = api_instance.update_customer(customer, opts)
|
806
1672
|
p result
|
807
1673
|
rescue DearInventoryRuby::ApiError => e
|
808
|
-
puts "Exception when calling InventoryApi->
|
1674
|
+
puts "Exception when calling InventoryApi->update_customer: #{e}"
|
809
1675
|
end
|
810
1676
|
```
|
811
1677
|
|
@@ -814,18 +1680,12 @@ end
|
|
814
1680
|
|
815
1681
|
Name | Type | Description | Notes
|
816
1682
|
------------- | ------------- | ------------- | -------------
|
817
|
-
**
|
818
|
-
**
|
819
|
-
**id** | **String**| Default is nil | [optional]
|
820
|
-
**name** | **String**| Default is nil | [optional]
|
821
|
-
**is_active** | **Boolean**| Default is nil | [optional]
|
822
|
-
**is_tax_for_sale** | **Boolean**| Default is nil | [optional]
|
823
|
-
**is_tax_for_purchase** | **Boolean**| Default is nil | [optional]
|
824
|
-
**account** | **String**| Default is nil | [optional]
|
1683
|
+
**customer** | [**Customer**](Customer.md)| a customer object with properties to update |
|
1684
|
+
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
825
1685
|
|
826
1686
|
### Return type
|
827
1687
|
|
828
|
-
[**
|
1688
|
+
[**Customers**](Customers.md)
|
829
1689
|
|
830
1690
|
### Authorization
|
831
1691
|
|
@@ -833,15 +1693,15 @@ Name | Type | Description | Notes
|
|
833
1693
|
|
834
1694
|
### HTTP request headers
|
835
1695
|
|
836
|
-
- **Content-Type**:
|
1696
|
+
- **Content-Type**: application/json
|
837
1697
|
- **Accept**: application/json
|
838
1698
|
|
839
1699
|
|
840
|
-
##
|
1700
|
+
## update_payment_term
|
841
1701
|
|
842
|
-
>
|
1702
|
+
> PaymentTerms update_payment_term(payment_term, opts)
|
843
1703
|
|
844
|
-
Allows you to update
|
1704
|
+
Allows you to update a payment term
|
845
1705
|
|
846
1706
|
### Example
|
847
1707
|
|
@@ -862,17 +1722,17 @@ DearInventoryRuby.configure do |config|
|
|
862
1722
|
end
|
863
1723
|
|
864
1724
|
api_instance = DearInventoryRuby::InventoryApi.new
|
865
|
-
|
1725
|
+
payment_term = { "ID": "e6c25fa9-bb14-45b2-afe7-428e454663ef", "Name": "10 days since end of month", "Duration": 10, "Method": "days since the end of the month", "IsActive": true, "IsDefault": true } # PaymentTerm | a payment term object with properties to update
|
866
1726
|
opts = {
|
867
1727
|
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
868
1728
|
}
|
869
1729
|
|
870
1730
|
begin
|
871
|
-
#Allows you to update
|
872
|
-
result = api_instance.
|
1731
|
+
#Allows you to update a payment term
|
1732
|
+
result = api_instance.update_payment_term(payment_term, opts)
|
873
1733
|
p result
|
874
1734
|
rescue DearInventoryRuby::ApiError => e
|
875
|
-
puts "Exception when calling InventoryApi->
|
1735
|
+
puts "Exception when calling InventoryApi->update_payment_term: #{e}"
|
876
1736
|
end
|
877
1737
|
```
|
878
1738
|
|
@@ -881,12 +1741,12 @@ end
|
|
881
1741
|
|
882
1742
|
Name | Type | Description | Notes
|
883
1743
|
------------- | ------------- | ------------- | -------------
|
884
|
-
**
|
1744
|
+
**payment_term** | [**PaymentTerm**](PaymentTerm.md)| a payment term object with properties to update |
|
885
1745
|
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
886
1746
|
|
887
1747
|
### Return type
|
888
1748
|
|
889
|
-
[**
|
1749
|
+
[**PaymentTerms**](PaymentTerms.md)
|
890
1750
|
|
891
1751
|
### Authorization
|
892
1752
|
|
@@ -898,11 +1758,11 @@ Name | Type | Description | Notes
|
|
898
1758
|
- **Accept**: application/json
|
899
1759
|
|
900
1760
|
|
901
|
-
##
|
1761
|
+
## update_sale_payment
|
902
1762
|
|
903
|
-
>
|
1763
|
+
> SalePayment update_sale_payment(sale_payment, opts)
|
904
1764
|
|
905
|
-
Allows you to update a
|
1765
|
+
Allows you to update a sale payment
|
906
1766
|
|
907
1767
|
### Example
|
908
1768
|
|
@@ -923,17 +1783,17 @@ DearInventoryRuby.configure do |config|
|
|
923
1783
|
end
|
924
1784
|
|
925
1785
|
api_instance = DearInventoryRuby::InventoryApi.new
|
926
|
-
|
1786
|
+
sale_payment = { "ID": "ee093a0c-d177-9728-1df5-628a61a939e4", "Reference": "", "Amount": 357, "DatePaid": "2017-11-30T00:00:00Z", "Account": "718", "CurrencyRate": 1, } # SalePayment | a sale payment object with properties to update
|
927
1787
|
opts = {
|
928
1788
|
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
929
1789
|
}
|
930
1790
|
|
931
1791
|
begin
|
932
|
-
#Allows you to update a
|
933
|
-
result = api_instance.
|
1792
|
+
#Allows you to update a sale payment
|
1793
|
+
result = api_instance.update_sale_payment(sale_payment, opts)
|
934
1794
|
p result
|
935
1795
|
rescue DearInventoryRuby::ApiError => e
|
936
|
-
puts "Exception when calling InventoryApi->
|
1796
|
+
puts "Exception when calling InventoryApi->update_sale_payment: #{e}"
|
937
1797
|
end
|
938
1798
|
```
|
939
1799
|
|
@@ -942,12 +1802,12 @@ end
|
|
942
1802
|
|
943
1803
|
Name | Type | Description | Notes
|
944
1804
|
------------- | ------------- | ------------- | -------------
|
945
|
-
**
|
1805
|
+
**sale_payment** | [**SalePayment**](SalePayment.md)| a sale payment object with properties to update |
|
946
1806
|
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
947
1807
|
|
948
1808
|
### Return type
|
949
1809
|
|
950
|
-
[**
|
1810
|
+
[**SalePayment**](SalePayment.md)
|
951
1811
|
|
952
1812
|
### Authorization
|
953
1813
|
|
@@ -959,11 +1819,11 @@ Name | Type | Description | Notes
|
|
959
1819
|
- **Accept**: application/json
|
960
1820
|
|
961
1821
|
|
962
|
-
##
|
1822
|
+
## update_tax
|
963
1823
|
|
964
|
-
>
|
1824
|
+
> Taxes update_tax(tax, opts)
|
965
1825
|
|
966
|
-
Allows you to update a
|
1826
|
+
Allows you to update a tax
|
967
1827
|
|
968
1828
|
### Example
|
969
1829
|
|
@@ -984,17 +1844,17 @@ DearInventoryRuby.configure do |config|
|
|
984
1844
|
end
|
985
1845
|
|
986
1846
|
api_instance = DearInventoryRuby::InventoryApi.new
|
987
|
-
|
1847
|
+
tax = { "ID": "24551562-ebd1-4294-a04a-3ab258f5e541", "Name": "PUT test", "Account": "800", "IsActive": true, "TaxInclusive": false, "TaxPercent": 55, "IsTaxForSale": true, "IsTaxForPurchase": true, "Components": [ { "ID": "0119E1C0-504A-429B-B4E2-4EEC02A9E88A", "Name": "Tax 1st", "Percent": "20.0000000000", "AccountCode": "800", "Compound": "1", "ComponentOrder": "1" }, { "ID": "0B6D5C0F-D8EF-41FF-86D2-A05E5616FC61", "Name": "Tax 2nd", "Percent": "35.0000000000", "AccountCode": "800", "Compound": "0", "ComponentOrder": "2" } ] } # Tax | a tax object with properties to update
|
988
1848
|
opts = {
|
989
1849
|
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
990
1850
|
}
|
991
1851
|
|
992
1852
|
begin
|
993
|
-
#Allows you to update a
|
994
|
-
result = api_instance.
|
1853
|
+
#Allows you to update a tax
|
1854
|
+
result = api_instance.update_tax(tax, opts)
|
995
1855
|
p result
|
996
1856
|
rescue DearInventoryRuby::ApiError => e
|
997
|
-
puts "Exception when calling InventoryApi->
|
1857
|
+
puts "Exception when calling InventoryApi->update_tax: #{e}"
|
998
1858
|
end
|
999
1859
|
```
|
1000
1860
|
|
@@ -1003,12 +1863,12 @@ end
|
|
1003
1863
|
|
1004
1864
|
Name | Type | Description | Notes
|
1005
1865
|
------------- | ------------- | ------------- | -------------
|
1006
|
-
**
|
1866
|
+
**tax** | [**Tax**](Tax.md)| a tax object with properties to update |
|
1007
1867
|
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
1008
1868
|
|
1009
1869
|
### Return type
|
1010
1870
|
|
1011
|
-
[**
|
1871
|
+
[**Taxes**](Taxes.md)
|
1012
1872
|
|
1013
1873
|
### Authorization
|
1014
1874
|
|
@@ -1020,11 +1880,11 @@ Name | Type | Description | Notes
|
|
1020
1880
|
- **Accept**: application/json
|
1021
1881
|
|
1022
1882
|
|
1023
|
-
##
|
1883
|
+
## update_webhook
|
1024
1884
|
|
1025
|
-
>
|
1885
|
+
> Webhooks update_webhook(webhook, opts)
|
1026
1886
|
|
1027
|
-
Allows you to update a
|
1887
|
+
Allows you to update a webhook
|
1028
1888
|
|
1029
1889
|
### Example
|
1030
1890
|
|
@@ -1045,17 +1905,17 @@ DearInventoryRuby.configure do |config|
|
|
1045
1905
|
end
|
1046
1906
|
|
1047
1907
|
api_instance = DearInventoryRuby::InventoryApi.new
|
1048
|
-
|
1908
|
+
webhook = { "ID": "1cf8cb83-bf39-494b-87f9-1252b684d6d5", "Type": "Sale/OrderAuthorised", "Name": "Sale order has been authorised", "IsActive": true, "ExternalURL": "https://hookb.in/Zn8950P7", "ExternalAuthorizationType": "basicauth", "ExternalUserName": "Hello", "ExternalPassword": "123", "ExternalBearerToken": nil, "ExternalHeaders": [ { "Key": "Key", "Value": "123" }, { "Key": "6", "Value": "0" }, { "Key": "New Key", "Value": "New Value" } ] } # Webhook | a webhook object with properties to update
|
1049
1909
|
opts = {
|
1050
1910
|
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
1051
1911
|
}
|
1052
1912
|
|
1053
1913
|
begin
|
1054
|
-
#Allows you to update a
|
1055
|
-
result = api_instance.
|
1914
|
+
#Allows you to update a webhook
|
1915
|
+
result = api_instance.update_webhook(webhook, opts)
|
1056
1916
|
p result
|
1057
1917
|
rescue DearInventoryRuby::ApiError => e
|
1058
|
-
puts "Exception when calling InventoryApi->
|
1918
|
+
puts "Exception when calling InventoryApi->update_webhook: #{e}"
|
1059
1919
|
end
|
1060
1920
|
```
|
1061
1921
|
|
@@ -1064,12 +1924,12 @@ end
|
|
1064
1924
|
|
1065
1925
|
Name | Type | Description | Notes
|
1066
1926
|
------------- | ------------- | ------------- | -------------
|
1067
|
-
**
|
1927
|
+
**webhook** | [**Webhook**](Webhook.md)| a webhook object with properties to update |
|
1068
1928
|
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
1069
1929
|
|
1070
1930
|
### Return type
|
1071
1931
|
|
1072
|
-
[**
|
1932
|
+
[**Webhooks**](Webhooks.md)
|
1073
1933
|
|
1074
1934
|
### Authorization
|
1075
1935
|
|