dear-inventory-ruby 0.2.4 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +9 -4
- data/docs/InventoryApi.md +97 -1
- data/docs/SaleInvoice.md +11 -3
- data/docs/SaleInvoicePartial.md +41 -0
- data/docs/SaleInvoices.md +1 -1
- data/docs/SaleItem.md +77 -0
- data/docs/SaleList.md +21 -0
- data/docs/SalePaymentLine.md +29 -0
- data/lib/dear-inventory-ruby/api/inventory_api.rb +111 -0
- data/lib/dear-inventory-ruby/models/sale_invoice.rb +55 -21
- data/lib/dear-inventory-ruby/models/sale_invoice_partial.rb +351 -0
- data/lib/dear-inventory-ruby/models/sale_invoices.rb +1 -1
- data/lib/dear-inventory-ruby/models/sale_item.rb +507 -0
- data/lib/dear-inventory-ruby/models/sale_list.rb +229 -0
- data/lib/dear-inventory-ruby/models/sale_payment_line.rb +267 -0
- data/lib/dear-inventory-ruby/version.rb +1 -1
- data/lib/dear-inventory-ruby.rb +4 -0
- data/spec/.DS_Store +0 -0
- data/spec/api/inventory_api_spec.rb +29 -0
- data/spec/models/sale_invoice_partial_spec.rb +113 -0
- data/spec/models/sale_invoice_spec.rb +30 -6
- data/spec/models/sale_item_spec.rb +221 -0
- data/spec/models/sale_list_spec.rb +53 -0
- data/spec/models/sale_payment_line_spec.rb +77 -0
- metadata +18 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50a4ae53097c27d0470642a55cb37231e9979631a80c840fc2a942910ef28c64
|
4
|
+
data.tar.gz: 579d16e845ce5eb75d6ce150c17f65356bbed78ead663ed9e7dba55309a98bb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4c1f0fb8b4d565c519a78211c466a920752e85efe1d8686f9fdf75f6138fab24fa1266cc9bd19bf372e938455f3134b90cefea2a97a24682fdc23935d653155
|
7
|
+
data.tar.gz: ebe9b20decd6f28ecc4e84f0a3e32b7995001200751c72f2f34ddbdcb6a1ccf171d96dc0930fba813b426902455852ddba9519492fc6928d8d604f15809cf001
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## [0.2.7] - 2022-08-17
|
6
|
+
|
7
|
+
- Support parameter `ContactFilter` and `IncludeProductPrices` for the endpoint GET `/customer`
|
8
|
+
|
9
|
+
## [0.2.6] - 2022-07-14
|
10
|
+
|
11
|
+
- Update final totals of each invoice for the endpoint GET `/sale`
|
12
|
+
|
13
|
+
## [0.2.5] - 2022-05-26
|
14
|
+
|
15
|
+
- Add the new endpoint GET `/saleList`
|
16
|
+
|
5
17
|
## [0.2.4] - 2022-04-12
|
6
18
|
|
7
19
|
- Add the new endpoint GET `/sale`
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ This specifing endpoints for DEAR Inventory API
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: 2.0.0
|
10
|
-
- Package version: 0.2.
|
10
|
+
- Package version: 0.2.7
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [https://www.nhansg.com](https://www.nhansg.com)
|
13
13
|
|
@@ -24,16 +24,16 @@ gem build dear-inventory-ruby.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./dear-inventory-ruby-0.2.
|
27
|
+
gem install ./dear-inventory-ruby-0.2.7.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./dear-inventory-ruby-0.2.
|
30
|
+
(for development, run `gem install --dev ./dear-inventory-ruby-0.2.7.gem` to install the development dependencies)
|
31
31
|
|
32
32
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
33
33
|
|
34
34
|
Finally add this to the Gemfile:
|
35
35
|
|
36
|
-
gem 'dear-inventory-ruby', '~> 0.2.
|
36
|
+
gem 'dear-inventory-ruby', '~> 0.2.7'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -113,6 +113,7 @@ Class | Method | HTTP request | Description
|
|
113
113
|
*DearInventoryRuby::InventoryApi* | [**get_price_tiers**](docs/InventoryApi.md#get_price_tiers) | **GET** /ref/priceTier | Allows you to retrieve the Price Tiers
|
114
114
|
*DearInventoryRuby::InventoryApi* | [**get_sale**](docs/InventoryApi.md#get_sale) | **GET** /sale | Allows you to retrieve the Sale
|
115
115
|
*DearInventoryRuby::InventoryApi* | [**get_sale_invoices**](docs/InventoryApi.md#get_sale_invoices) | **GET** /sale/invoice | Allows you to retrieve the sale invoices
|
116
|
+
*DearInventoryRuby::InventoryApi* | [**get_sale_list**](docs/InventoryApi.md#get_sale_list) | **GET** /saleList | Allows you to retrieve the Sales based on conditions
|
116
117
|
*DearInventoryRuby::InventoryApi* | [**get_sale_order**](docs/InventoryApi.md#get_sale_order) | **GET** /sale/order | Allows you to retrieve the Sale Order
|
117
118
|
*DearInventoryRuby::InventoryApi* | [**get_sale_payment**](docs/InventoryApi.md#get_sale_payment) | **GET** /sale/payment | Allows you to retrieve the Sale Payments
|
118
119
|
*DearInventoryRuby::InventoryApi* | [**get_sale_quote**](docs/InventoryApi.md#get_sale_quote) | **GET** /sale/quote | Allows you to retrieve the Sale Quote
|
@@ -148,11 +149,15 @@ Class | Method | HTTP request | Description
|
|
148
149
|
- [DearInventoryRuby::SaleInvoiceAdditionalCharge](docs/SaleInvoiceAdditionalCharge.md)
|
149
150
|
- [DearInventoryRuby::SaleInvoiceDelete](docs/SaleInvoiceDelete.md)
|
150
151
|
- [DearInventoryRuby::SaleInvoiceLine](docs/SaleInvoiceLine.md)
|
152
|
+
- [DearInventoryRuby::SaleInvoicePartial](docs/SaleInvoicePartial.md)
|
151
153
|
- [DearInventoryRuby::SaleInvoicePost](docs/SaleInvoicePost.md)
|
152
154
|
- [DearInventoryRuby::SaleInvoices](docs/SaleInvoices.md)
|
155
|
+
- [DearInventoryRuby::SaleItem](docs/SaleItem.md)
|
156
|
+
- [DearInventoryRuby::SaleList](docs/SaleList.md)
|
153
157
|
- [DearInventoryRuby::SaleOrder](docs/SaleOrder.md)
|
154
158
|
- [DearInventoryRuby::SaleOrderLine](docs/SaleOrderLine.md)
|
155
159
|
- [DearInventoryRuby::SalePayment](docs/SalePayment.md)
|
160
|
+
- [DearInventoryRuby::SalePaymentLine](docs/SalePaymentLine.md)
|
156
161
|
- [DearInventoryRuby::SaleQuote](docs/SaleQuote.md)
|
157
162
|
- [DearInventoryRuby::SaleQuoteLine](docs/SaleQuoteLine.md)
|
158
163
|
- [DearInventoryRuby::ShippingAddress](docs/ShippingAddress.md)
|
data/docs/InventoryApi.md
CHANGED
@@ -25,6 +25,7 @@ Method | HTTP request | Description
|
|
25
25
|
[**get_price_tiers**](InventoryApi.md#get_price_tiers) | **GET** /ref/priceTier | Allows you to retrieve the Price Tiers
|
26
26
|
[**get_sale**](InventoryApi.md#get_sale) | **GET** /sale | Allows you to retrieve the Sale
|
27
27
|
[**get_sale_invoices**](InventoryApi.md#get_sale_invoices) | **GET** /sale/invoice | Allows you to retrieve the sale invoices
|
28
|
+
[**get_sale_list**](InventoryApi.md#get_sale_list) | **GET** /saleList | Allows you to retrieve the Sales based on conditions
|
28
29
|
[**get_sale_order**](InventoryApi.md#get_sale_order) | **GET** /sale/order | Allows you to retrieve the Sale Order
|
29
30
|
[**get_sale_payment**](InventoryApi.md#get_sale_payment) | **GET** /sale/payment | Allows you to retrieve the Sale Payments
|
30
31
|
[**get_sale_quote**](InventoryApi.md#get_sale_quote) | **GET** /sale/quote | Allows you to retrieve the Sale Quote
|
@@ -986,8 +987,10 @@ opts = {
|
|
986
987
|
limit: '100', # String | Default is 100
|
987
988
|
id: 'id_example', # String | Default is nil
|
988
989
|
name: 'name_example', # String | Default is nil
|
990
|
+
contact_filter: 'contact_filter_example', # String | Default is nil
|
989
991
|
modified_since: 'modified_since_example', # String | Default is nil
|
990
|
-
include_deprecated: 'false' # String | Default is false
|
992
|
+
include_deprecated: 'false', # String | Default is false
|
993
|
+
include_product_prices: 'false' # String | Default is false
|
991
994
|
}
|
992
995
|
|
993
996
|
begin
|
@@ -1008,8 +1011,10 @@ Name | Type | Description | Notes
|
|
1008
1011
|
**limit** | **String**| Default is 100 | [optional] [default to '100']
|
1009
1012
|
**id** | **String**| Default is nil | [optional]
|
1010
1013
|
**name** | **String**| Default is nil | [optional]
|
1014
|
+
**contact_filter** | **String**| Default is nil | [optional]
|
1011
1015
|
**modified_since** | **String**| Default is nil | [optional]
|
1012
1016
|
**include_deprecated** | **String**| Default is false | [optional] [default to 'false']
|
1017
|
+
**include_product_prices** | **String**| Default is false | [optional] [default to 'false']
|
1013
1018
|
|
1014
1019
|
### Return type
|
1015
1020
|
|
@@ -1330,6 +1335,97 @@ Name | Type | Description | Notes
|
|
1330
1335
|
- **Accept**: application/json
|
1331
1336
|
|
1332
1337
|
|
1338
|
+
## get_sale_list
|
1339
|
+
|
1340
|
+
> SaleList get_sale_list(opts)
|
1341
|
+
|
1342
|
+
Allows you to retrieve the Sales based on conditions
|
1343
|
+
|
1344
|
+
### Example
|
1345
|
+
|
1346
|
+
```ruby
|
1347
|
+
# load the gem
|
1348
|
+
require 'dear-inventory-ruby'
|
1349
|
+
# setup authorization
|
1350
|
+
DearInventoryRuby.configure do |config|
|
1351
|
+
# Configure API key authorization: accountID
|
1352
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
1353
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1354
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
1355
|
+
|
1356
|
+
# Configure API key authorization: appKey
|
1357
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
1358
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1359
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
1360
|
+
end
|
1361
|
+
|
1362
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
1363
|
+
opts = {
|
1364
|
+
page: '1', # String | Default is 1
|
1365
|
+
limit: '100', # String | Default is 100
|
1366
|
+
search: 'search_example', # String | Only return sales with search value contained in one of these fields: OrderNumber, Status, Customer, invoiceNumber, CustomerReference, CreditNoteNumber
|
1367
|
+
created_since: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Only return sales created after specified date. Date must follow ISO 8601 format.
|
1368
|
+
updated_since: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Only return sales changed after specified date. Date must follow ISO 8601 format.
|
1369
|
+
ship_by: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Only return sales with Ship By date on or before specified date, with not authorised Shipment. Date must follow ISO 8601 format.
|
1370
|
+
quote_status: 'quote_status_example', # String | Only return sales with specified quote status
|
1371
|
+
order_status: 'order_status_example', # String | Only return sales with specified order status
|
1372
|
+
combined_pick_status: 'combined_pick_status_example', # String | Only return sales with specified CombinedPickingStatus
|
1373
|
+
combined_pack_status: 'combined_pack_status_example', # String | Only return sales with specified CombinedPackingStatus
|
1374
|
+
combined_shipping_status: 'combined_shipping_status_example', # String | Only return sales with specified CombinedShippingStatus
|
1375
|
+
combined_invoice_status: 'combined_invoice_status_example', # String | Only return sales with specified CombinedInvoiceStatus
|
1376
|
+
credit_note_status: 'credit_note_status_example', # String | Only return sales with specified credit note status
|
1377
|
+
external_id: 'external_id_example', # String | Only return sales with specified External ID
|
1378
|
+
status: 'status_example', # String | Default is nil
|
1379
|
+
ready_for_shipping: true, # Boolean | Only return sales with 'Authorised' pack and not 'Authorised' shipping
|
1380
|
+
order_location_id: 'order_location_id_example' # String | Only return sales with specified Order Location ID
|
1381
|
+
}
|
1382
|
+
|
1383
|
+
begin
|
1384
|
+
#Allows you to retrieve the Sales based on conditions
|
1385
|
+
result = api_instance.get_sale_list(opts)
|
1386
|
+
p result
|
1387
|
+
rescue DearInventoryRuby::ApiError => e
|
1388
|
+
puts "Exception when calling InventoryApi->get_sale_list: #{e}"
|
1389
|
+
end
|
1390
|
+
```
|
1391
|
+
|
1392
|
+
### Parameters
|
1393
|
+
|
1394
|
+
|
1395
|
+
Name | Type | Description | Notes
|
1396
|
+
------------- | ------------- | ------------- | -------------
|
1397
|
+
**page** | **String**| Default is 1 | [optional] [default to '1']
|
1398
|
+
**limit** | **String**| Default is 100 | [optional] [default to '100']
|
1399
|
+
**search** | **String**| Only return sales with search value contained in one of these fields: OrderNumber, Status, Customer, invoiceNumber, CustomerReference, CreditNoteNumber | [optional]
|
1400
|
+
**created_since** | **DateTime**| Only return sales created after specified date. Date must follow ISO 8601 format. | [optional]
|
1401
|
+
**updated_since** | **DateTime**| Only return sales changed after specified date. Date must follow ISO 8601 format. | [optional]
|
1402
|
+
**ship_by** | **DateTime**| Only return sales with Ship By date on or before specified date, with not authorised Shipment. Date must follow ISO 8601 format. | [optional]
|
1403
|
+
**quote_status** | **String**| Only return sales with specified quote status | [optional]
|
1404
|
+
**order_status** | **String**| Only return sales with specified order status | [optional]
|
1405
|
+
**combined_pick_status** | **String**| Only return sales with specified CombinedPickingStatus | [optional]
|
1406
|
+
**combined_pack_status** | **String**| Only return sales with specified CombinedPackingStatus | [optional]
|
1407
|
+
**combined_shipping_status** | **String**| Only return sales with specified CombinedShippingStatus | [optional]
|
1408
|
+
**combined_invoice_status** | **String**| Only return sales with specified CombinedInvoiceStatus | [optional]
|
1409
|
+
**credit_note_status** | **String**| Only return sales with specified credit note status | [optional]
|
1410
|
+
**external_id** | **String**| Only return sales with specified External ID | [optional]
|
1411
|
+
**status** | **String**| Default is nil | [optional]
|
1412
|
+
**ready_for_shipping** | **Boolean**| Only return sales with 'Authorised' pack and not 'Authorised' shipping | [optional]
|
1413
|
+
**order_location_id** | **String**| Only return sales with specified Order Location ID | [optional]
|
1414
|
+
|
1415
|
+
### Return type
|
1416
|
+
|
1417
|
+
[**SaleList**](SaleList.md)
|
1418
|
+
|
1419
|
+
### Authorization
|
1420
|
+
|
1421
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
1422
|
+
|
1423
|
+
### HTTP request headers
|
1424
|
+
|
1425
|
+
- **Content-Type**: Not defined
|
1426
|
+
- **Accept**: application/json
|
1427
|
+
|
1428
|
+
|
1333
1429
|
## get_sale_order
|
1334
1430
|
|
1335
1431
|
> SaleOrder get_sale_order(opts)
|
data/docs/SaleInvoice.md
CHANGED
@@ -5,7 +5,6 @@
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**task_id** | **String** | Identifier of sale Invoice task |
|
8
|
-
**combine_additional_charges** | **Boolean** | If `true` then `additional charges` lines displayed in `Lines` array | [default to false]
|
9
8
|
**invoice_number** | **String** | Invoice Number (auto-generated) | [optional]
|
10
9
|
**memo** | **String** | Additional information for Invoice. | [optional]
|
11
10
|
**status** | **String** | Invoice status. Possible Values are values. For POST available values are DRAFT, AUTHORISED |
|
@@ -17,6 +16,11 @@ Name | Type | Description | Notes
|
|
17
16
|
**linked_fulfillment_number** | **Integer** | Number of Fulfilment linked to this invoice | [optional]
|
18
17
|
**lines** | [**Array<SaleInvoiceLine>**](SaleInvoiceLine.md) | | [optional]
|
19
18
|
**additional_charges** | [**Array<SaleInvoiceAdditionalCharge>**](SaleInvoiceAdditionalCharge.md) | | [optional]
|
19
|
+
**payments** | [**Array<SalePaymentLine>**](SalePaymentLine.md) | | [optional]
|
20
|
+
**total_before_tax** | **Float** | Decimal with up to 4 decimal places. Sum of Invoice lines and additional charges without taxes. | [optional]
|
21
|
+
**tax** | **Float** | Decimal with up to 4 decimal places. Sum of Invoice lines and additional charges taxes. | [optional]
|
22
|
+
**total** | **Float** | Decimal with up to 4 decimal places. Sum of Invoice lines and additional charges with taxes. | [optional]
|
23
|
+
**paid** | **Float** | Decimal with up to 4 decimal places. Sum of payments. | [optional]
|
20
24
|
|
21
25
|
## Code Sample
|
22
26
|
|
@@ -24,7 +28,6 @@ Name | Type | Description | Notes
|
|
24
28
|
require 'DearInventoryRuby'
|
25
29
|
|
26
30
|
instance = DearInventoryRuby::SaleInvoice.new(task_id: nil,
|
27
|
-
combine_additional_charges: nil,
|
28
31
|
invoice_number: nil,
|
29
32
|
memo: nil,
|
30
33
|
status: nil,
|
@@ -35,7 +38,12 @@ instance = DearInventoryRuby::SaleInvoice.new(task_id: nil,
|
|
35
38
|
billing_address_line2: nil,
|
36
39
|
linked_fulfillment_number: nil,
|
37
40
|
lines: nil,
|
38
|
-
additional_charges: nil
|
41
|
+
additional_charges: nil,
|
42
|
+
payments: nil,
|
43
|
+
total_before_tax: nil,
|
44
|
+
tax: nil,
|
45
|
+
total: nil,
|
46
|
+
paid: nil)
|
39
47
|
```
|
40
48
|
|
41
49
|
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# DearInventoryRuby::SaleInvoicePartial
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**task_id** | **String** | Identifier of sale Invoice task |
|
8
|
+
**combine_additional_charges** | **Boolean** | If `true` then `additional charges` lines displayed in `Lines` array | [optional] [default to false]
|
9
|
+
**invoice_number** | **String** | Invoice Number (auto-generated) | [optional]
|
10
|
+
**memo** | **String** | Additional information for Invoice. | [optional]
|
11
|
+
**status** | **String** | Invoice status. Possible Values are values. For POST available values are DRAFT, AUTHORISED |
|
12
|
+
**invoice_date** | **String** | Invoice Date. |
|
13
|
+
**invoice_due_date** | **String** | Invoice Due Date. |
|
14
|
+
**currency_conversion_rate** | **Float** | Decimal with up to 4 decimal places | [optional]
|
15
|
+
**billing_address_line1** | **String** | Billing Address Line 1 | [optional]
|
16
|
+
**billing_address_line2** | **String** | Billing Address Line 2 | [optional]
|
17
|
+
**linked_fulfillment_number** | **Integer** | Number of Fulfilment linked to this invoice | [optional]
|
18
|
+
**lines** | [**Array<SaleInvoiceLine>**](SaleInvoiceLine.md) | | [optional]
|
19
|
+
**additional_charges** | [**Array<SaleInvoiceAdditionalCharge>**](SaleInvoiceAdditionalCharge.md) | | [optional]
|
20
|
+
|
21
|
+
## Code Sample
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require 'DearInventoryRuby'
|
25
|
+
|
26
|
+
instance = DearInventoryRuby::SaleInvoicePartial.new(task_id: nil,
|
27
|
+
combine_additional_charges: nil,
|
28
|
+
invoice_number: nil,
|
29
|
+
memo: nil,
|
30
|
+
status: nil,
|
31
|
+
invoice_date: nil,
|
32
|
+
invoice_due_date: nil,
|
33
|
+
currency_conversion_rate: nil,
|
34
|
+
billing_address_line1: nil,
|
35
|
+
billing_address_line2: nil,
|
36
|
+
linked_fulfillment_number: nil,
|
37
|
+
lines: nil,
|
38
|
+
additional_charges: nil)
|
39
|
+
```
|
40
|
+
|
41
|
+
|
data/docs/SaleInvoices.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**sale_id** | **String** | Unique DEAR Sale ID |
|
8
|
-
**invoices** | [**Array<
|
8
|
+
**invoices** | [**Array<SaleInvoicePartial>**](SaleInvoicePartial.md) | Array of Invoices | [optional]
|
9
9
|
|
10
10
|
## Code Sample
|
11
11
|
|
data/docs/SaleItem.md
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
# DearInventoryRuby::SaleItem
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**sale_id** | **String** | Unique DEAR Sale identifier | [optional]
|
8
|
+
**order_number** | **String** | Sale Order number generated by DEAR | [optional]
|
9
|
+
**status** | **String** | Current sale status. Possible values are values | [optional]
|
10
|
+
**order_date** | **Date** | Date when Sale Order was created | [optional]
|
11
|
+
**invoice_date** | **Date** | Date when Invoice was issued | [optional]
|
12
|
+
**customer** | **String** | Name of the customer | [optional]
|
13
|
+
**customer_id** | **String** | Customer Identifier | [optional]
|
14
|
+
**invoice_number** | **String** | Invoice number generated by DEAR | [optional]
|
15
|
+
**customer_reference** | **String** | Optional Customer Reference (typically customer Purchase order number) supplied by the customer for the sale | [optional]
|
16
|
+
**invoice_amount** | **Float** | Total Invoice amount minus total Credit note amount in customer currency | [optional]
|
17
|
+
**paid_amount** | **Float** | Total Paid amount minus Refunded amount in customer currency | [optional]
|
18
|
+
**invoice_due_date** | **Date** | Date when invoice is due according to selected payment terms | [optional]
|
19
|
+
**ship_by** | **Date** | Date when shipment is due | [optional]
|
20
|
+
**base_currency** | **String** | 3 digit Base currency code (as configured in General Settings) | [optional]
|
21
|
+
**customer_currency** | **String** | 3 digit Customer currency code | [optional]
|
22
|
+
**credit_note_number** | **String** | Credit note number generated by DEAR. Is empty unless credit note is created | [optional]
|
23
|
+
**updated** | **Date** | Date when the sale was last created/updated last time | [optional]
|
24
|
+
**quote_status** | **String** | Sale Quote status. Possible Values are values | [optional]
|
25
|
+
**order_status** | **String** | Sale Order status. Possible Values are values | [optional]
|
26
|
+
**combined_picking_status** | **String** | Pick status. Possible Values are VOIDED, NOT AVAILABLE, PICKED, PICKING , NOT PICKED , PARTIALLY PICKED | [optional]
|
27
|
+
**combined_packing_status** | **String** | Pack status. Possible Values are VOIDED, NOT AVAILABLE, PACKED, PACKING, NOT PACKED, PARTIALLY PACKED | [optional]
|
28
|
+
**combined_shipping_status** | **String** | Ship status. Possible Values are VOIDED, NOT AVAILABLE, SHIPPED, SHIPPING , NOT SHIPPED , PARTIALLY SHIPPED | [optional]
|
29
|
+
**ful_filment_status** | **String** | Fulfilment status. Possible Values are FULFILLED, PARTIALLY FULFILLED, NOT AVAILABLE, NOT FULFILLED, VOIDED | [optional]
|
30
|
+
**combined_invoice_status** | **String** | Invoice status. Possible Values are VOIDED, DRAFT, AUTHORISED, NOT AVAILABLE, PAID | [optional]
|
31
|
+
**credit_note_status** | **String** | Credit Note status. Possible Values are VOIDED, DRAFT, AUTHORISED, NOT AVAILABLE | [optional]
|
32
|
+
**combined_payment_status** | **String** | Payment status. Possible Values are NOT REFUNDED, PREPAID, PARTIALLY PAID, UNPAID, PAID, VOIDED | [optional]
|
33
|
+
**type** | **String** | Type of Sale. Possible Values are Simple Sale, Advanced Sale , Service Sale | [optional]
|
34
|
+
**combined_tracking_numbers** | **String** | Tracking Numbers | [optional]
|
35
|
+
**source_channel** | **String** | Source of the sale. read-only field | [optional]
|
36
|
+
**external_id** | **String** | Custom field that is only available in API and allows to set arbitrary value for the sale for later search and any custom logic | [optional]
|
37
|
+
**order_location_id** | **String** | Sale Order Location ID | [optional]
|
38
|
+
|
39
|
+
## Code Sample
|
40
|
+
|
41
|
+
```ruby
|
42
|
+
require 'DearInventoryRuby'
|
43
|
+
|
44
|
+
instance = DearInventoryRuby::SaleItem.new(sale_id: nil,
|
45
|
+
order_number: nil,
|
46
|
+
status: nil,
|
47
|
+
order_date: nil,
|
48
|
+
invoice_date: nil,
|
49
|
+
customer: nil,
|
50
|
+
customer_id: nil,
|
51
|
+
invoice_number: nil,
|
52
|
+
customer_reference: nil,
|
53
|
+
invoice_amount: nil,
|
54
|
+
paid_amount: nil,
|
55
|
+
invoice_due_date: nil,
|
56
|
+
ship_by: nil,
|
57
|
+
base_currency: nil,
|
58
|
+
customer_currency: nil,
|
59
|
+
credit_note_number: nil,
|
60
|
+
updated: nil,
|
61
|
+
quote_status: nil,
|
62
|
+
order_status: nil,
|
63
|
+
combined_picking_status: nil,
|
64
|
+
combined_packing_status: nil,
|
65
|
+
combined_shipping_status: nil,
|
66
|
+
ful_filment_status: nil,
|
67
|
+
combined_invoice_status: nil,
|
68
|
+
credit_note_status: nil,
|
69
|
+
combined_payment_status: nil,
|
70
|
+
type: nil,
|
71
|
+
combined_tracking_numbers: nil,
|
72
|
+
source_channel: nil,
|
73
|
+
external_id: nil,
|
74
|
+
order_location_id: nil)
|
75
|
+
```
|
76
|
+
|
77
|
+
|
data/docs/SaleList.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# DearInventoryRuby::SaleList
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**total** | **Float** | Total | [optional]
|
8
|
+
**page** | **Float** | Page | [optional]
|
9
|
+
**sale_list** | [**Array<SaleItem>**](SaleItem.md) | Array of SaleItem | [optional]
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'DearInventoryRuby'
|
15
|
+
|
16
|
+
instance = DearInventoryRuby::SaleList.new(total: nil,
|
17
|
+
page: nil,
|
18
|
+
sale_list: nil)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# DearInventoryRuby::SalePaymentLine
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**id** | **String** | Identifier of payment. | [optional]
|
8
|
+
**reference** | **String** | Payment reference number. | [optional]
|
9
|
+
**amount** | **Float** | Decimal with up to 2 decimal places. Payment amount in customer currency. | [optional]
|
10
|
+
**date_paid** | **Date** | Date when payment has been made. | [optional]
|
11
|
+
**account** | **String** | Account Code of the bank/payment account from Chart of accounts. | [optional]
|
12
|
+
**currency_rate** | **Float** | Decimal with up to 4 decimal places. Currency Conversion rate expressed as number of Base currency units for one Customer currency unit. | [optional]
|
13
|
+
**date_created** | **Date** | Date of creation payment record. | [optional]
|
14
|
+
|
15
|
+
## Code Sample
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'DearInventoryRuby'
|
19
|
+
|
20
|
+
instance = DearInventoryRuby::SalePaymentLine.new(id: nil,
|
21
|
+
reference: nil,
|
22
|
+
amount: nil,
|
23
|
+
date_paid: nil,
|
24
|
+
account: nil,
|
25
|
+
currency_rate: nil,
|
26
|
+
date_created: nil)
|
27
|
+
```
|
28
|
+
|
29
|
+
|
@@ -973,8 +973,10 @@ module DearInventoryRuby
|
|
973
973
|
# @option opts [String] :limit Default is 100 (default to '100')
|
974
974
|
# @option opts [String] :id Default is nil
|
975
975
|
# @option opts [String] :name Default is nil
|
976
|
+
# @option opts [String] :contact_filter Default is nil
|
976
977
|
# @option opts [String] :modified_since Default is nil
|
977
978
|
# @option opts [String] :include_deprecated Default is false (default to 'false')
|
979
|
+
# @option opts [String] :include_product_prices Default is false (default to 'false')
|
978
980
|
# @return [Customers]
|
979
981
|
def get_customers(opts = {})
|
980
982
|
data, _status_code, _headers = get_customers_with_http_info(opts)
|
@@ -987,8 +989,10 @@ module DearInventoryRuby
|
|
987
989
|
# @option opts [String] :limit Default is 100
|
988
990
|
# @option opts [String] :id Default is nil
|
989
991
|
# @option opts [String] :name Default is nil
|
992
|
+
# @option opts [String] :contact_filter Default is nil
|
990
993
|
# @option opts [String] :modified_since Default is nil
|
991
994
|
# @option opts [String] :include_deprecated Default is false
|
995
|
+
# @option opts [String] :include_product_prices Default is false
|
992
996
|
# @return [Array<(Customers, Integer, Hash)>] Customers data, response status code and response headers
|
993
997
|
def get_customers_with_http_info(opts = {})
|
994
998
|
if @api_client.config.debugging
|
@@ -1003,8 +1007,10 @@ module DearInventoryRuby
|
|
1003
1007
|
query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1004
1008
|
query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?
|
1005
1009
|
query_params[:'Name'] = opts[:'name'] if !opts[:'name'].nil?
|
1010
|
+
query_params[:'ContactFilter'] = opts[:'contact_filter'] if !opts[:'contact_filter'].nil?
|
1006
1011
|
query_params[:'ModifiedSince'] = opts[:'modified_since'] if !opts[:'modified_since'].nil?
|
1007
1012
|
query_params[:'IncludeDeprecated'] = opts[:'include_deprecated'] if !opts[:'include_deprecated'].nil?
|
1013
|
+
query_params[:'IncludeProductPrices'] = opts[:'include_product_prices'] if !opts[:'include_product_prices'].nil?
|
1008
1014
|
|
1009
1015
|
# header parameters
|
1010
1016
|
header_params = opts[:header_params] || {}
|
@@ -1351,6 +1357,111 @@ module DearInventoryRuby
|
|
1351
1357
|
return data, status_code, headers
|
1352
1358
|
end
|
1353
1359
|
|
1360
|
+
# Allows you to retrieve the Sales based on conditions
|
1361
|
+
# @param [Hash] opts the optional parameters
|
1362
|
+
# @option opts [String] :page Default is 1 (default to '1')
|
1363
|
+
# @option opts [String] :limit Default is 100 (default to '100')
|
1364
|
+
# @option opts [String] :search Only return sales with search value contained in one of these fields: OrderNumber, Status, Customer, invoiceNumber, CustomerReference, CreditNoteNumber
|
1365
|
+
# @option opts [DateTime] :created_since Only return sales created after specified date. Date must follow ISO 8601 format.
|
1366
|
+
# @option opts [DateTime] :updated_since Only return sales changed after specified date. Date must follow ISO 8601 format.
|
1367
|
+
# @option opts [DateTime] :ship_by Only return sales with Ship By date on or before specified date, with not authorised Shipment. Date must follow ISO 8601 format.
|
1368
|
+
# @option opts [String] :quote_status Only return sales with specified quote status
|
1369
|
+
# @option opts [String] :order_status Only return sales with specified order status
|
1370
|
+
# @option opts [String] :combined_pick_status Only return sales with specified CombinedPickingStatus
|
1371
|
+
# @option opts [String] :combined_pack_status Only return sales with specified CombinedPackingStatus
|
1372
|
+
# @option opts [String] :combined_shipping_status Only return sales with specified CombinedShippingStatus
|
1373
|
+
# @option opts [String] :combined_invoice_status Only return sales with specified CombinedInvoiceStatus
|
1374
|
+
# @option opts [String] :credit_note_status Only return sales with specified credit note status
|
1375
|
+
# @option opts [String] :external_id Only return sales with specified External ID
|
1376
|
+
# @option opts [String] :status Default is nil
|
1377
|
+
# @option opts [Boolean] :ready_for_shipping Only return sales with 'Authorised' pack and not 'Authorised' shipping
|
1378
|
+
# @option opts [String] :order_location_id Only return sales with specified Order Location ID
|
1379
|
+
# @return [SaleList]
|
1380
|
+
def get_sale_list(opts = {})
|
1381
|
+
data, _status_code, _headers = get_sale_list_with_http_info(opts)
|
1382
|
+
data
|
1383
|
+
end
|
1384
|
+
|
1385
|
+
# Allows you to retrieve the Sales based on conditions
|
1386
|
+
# @param [Hash] opts the optional parameters
|
1387
|
+
# @option opts [String] :page Default is 1
|
1388
|
+
# @option opts [String] :limit Default is 100
|
1389
|
+
# @option opts [String] :search Only return sales with search value contained in one of these fields: OrderNumber, Status, Customer, invoiceNumber, CustomerReference, CreditNoteNumber
|
1390
|
+
# @option opts [DateTime] :created_since Only return sales created after specified date. Date must follow ISO 8601 format.
|
1391
|
+
# @option opts [DateTime] :updated_since Only return sales changed after specified date. Date must follow ISO 8601 format.
|
1392
|
+
# @option opts [DateTime] :ship_by Only return sales with Ship By date on or before specified date, with not authorised Shipment. Date must follow ISO 8601 format.
|
1393
|
+
# @option opts [String] :quote_status Only return sales with specified quote status
|
1394
|
+
# @option opts [String] :order_status Only return sales with specified order status
|
1395
|
+
# @option opts [String] :combined_pick_status Only return sales with specified CombinedPickingStatus
|
1396
|
+
# @option opts [String] :combined_pack_status Only return sales with specified CombinedPackingStatus
|
1397
|
+
# @option opts [String] :combined_shipping_status Only return sales with specified CombinedShippingStatus
|
1398
|
+
# @option opts [String] :combined_invoice_status Only return sales with specified CombinedInvoiceStatus
|
1399
|
+
# @option opts [String] :credit_note_status Only return sales with specified credit note status
|
1400
|
+
# @option opts [String] :external_id Only return sales with specified External ID
|
1401
|
+
# @option opts [String] :status Default is nil
|
1402
|
+
# @option opts [Boolean] :ready_for_shipping Only return sales with 'Authorised' pack and not 'Authorised' shipping
|
1403
|
+
# @option opts [String] :order_location_id Only return sales with specified Order Location ID
|
1404
|
+
# @return [Array<(SaleList, Integer, Hash)>] SaleList data, response status code and response headers
|
1405
|
+
def get_sale_list_with_http_info(opts = {})
|
1406
|
+
if @api_client.config.debugging
|
1407
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.get_sale_list ...'
|
1408
|
+
end
|
1409
|
+
# resource path
|
1410
|
+
local_var_path = '/saleList'
|
1411
|
+
|
1412
|
+
# query parameters
|
1413
|
+
query_params = opts[:query_params] || {}
|
1414
|
+
query_params[:'Page'] = opts[:'page'] if !opts[:'page'].nil?
|
1415
|
+
query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1416
|
+
query_params[:'Search'] = opts[:'search'] if !opts[:'search'].nil?
|
1417
|
+
query_params[:'CreatedSince'] = opts[:'created_since'] if !opts[:'created_since'].nil?
|
1418
|
+
query_params[:'UpdatedSince'] = opts[:'updated_since'] if !opts[:'updated_since'].nil?
|
1419
|
+
query_params[:'ShipBy'] = opts[:'ship_by'] if !opts[:'ship_by'].nil?
|
1420
|
+
query_params[:'QuoteStatus'] = opts[:'quote_status'] if !opts[:'quote_status'].nil?
|
1421
|
+
query_params[:'OrderStatus'] = opts[:'order_status'] if !opts[:'order_status'].nil?
|
1422
|
+
query_params[:'CombinedPickStatus'] = opts[:'combined_pick_status'] if !opts[:'combined_pick_status'].nil?
|
1423
|
+
query_params[:'CombinedPackStatus'] = opts[:'combined_pack_status'] if !opts[:'combined_pack_status'].nil?
|
1424
|
+
query_params[:'CombinedShippingStatus'] = opts[:'combined_shipping_status'] if !opts[:'combined_shipping_status'].nil?
|
1425
|
+
query_params[:'CombinedInvoiceStatus'] = opts[:'combined_invoice_status'] if !opts[:'combined_invoice_status'].nil?
|
1426
|
+
query_params[:'CreditNoteStatus'] = opts[:'credit_note_status'] if !opts[:'credit_note_status'].nil?
|
1427
|
+
query_params[:'ExternalID'] = opts[:'external_id'] if !opts[:'external_id'].nil?
|
1428
|
+
query_params[:'Status'] = opts[:'status'] if !opts[:'status'].nil?
|
1429
|
+
query_params[:'ReadyForShipping'] = opts[:'ready_for_shipping'] if !opts[:'ready_for_shipping'].nil?
|
1430
|
+
query_params[:'OrderLocationID'] = opts[:'order_location_id'] if !opts[:'order_location_id'].nil?
|
1431
|
+
|
1432
|
+
# header parameters
|
1433
|
+
header_params = opts[:header_params] || {}
|
1434
|
+
# HTTP header 'Accept' (if needed)
|
1435
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1436
|
+
|
1437
|
+
# form parameters
|
1438
|
+
form_params = opts[:form_params] || {}
|
1439
|
+
|
1440
|
+
# http body (model)
|
1441
|
+
post_body = opts[:body]
|
1442
|
+
|
1443
|
+
# return_type
|
1444
|
+
return_type = opts[:return_type] || 'SaleList'
|
1445
|
+
|
1446
|
+
# auth_names
|
1447
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
1448
|
+
|
1449
|
+
new_options = opts.merge(
|
1450
|
+
:header_params => header_params,
|
1451
|
+
:query_params => query_params,
|
1452
|
+
:form_params => form_params,
|
1453
|
+
:body => post_body,
|
1454
|
+
:auth_names => auth_names,
|
1455
|
+
:return_type => return_type
|
1456
|
+
)
|
1457
|
+
|
1458
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1459
|
+
if @api_client.config.debugging
|
1460
|
+
@api_client.config.logger.debug "API called: InventoryApi#get_sale_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1461
|
+
end
|
1462
|
+
return data, status_code, headers
|
1463
|
+
end
|
1464
|
+
|
1354
1465
|
# Allows you to retrieve the Sale Order
|
1355
1466
|
# @param [Hash] opts the optional parameters
|
1356
1467
|
# @option opts [String] :sale_id Unique DEAR Sale ID
|