dear-inventory-ruby 0.1.12 → 0.1.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -2
  3. data/README.md +9 -7
  4. data/docs/Customer.md +1 -1
  5. data/docs/InventoryApi.md +64 -0
  6. data/docs/Me.md +3 -3
  7. data/docs/PriceTiers.md +2 -2
  8. data/docs/SaleInvoice.md +41 -0
  9. data/docs/SaleInvoiceAdditionalCharge.md +33 -0
  10. data/docs/SaleInvoiceLine.md +39 -0
  11. data/docs/SaleInvoices.md +19 -0
  12. data/lib/dear-inventory-ruby.rb +4 -3
  13. data/lib/dear-inventory-ruby/api/inventory_api.rb +63 -0
  14. data/lib/dear-inventory-ruby/models/account.rb +0 -34
  15. data/lib/dear-inventory-ruby/models/customer.rb +2 -35
  16. data/lib/dear-inventory-ruby/models/me.rb +6 -3
  17. data/lib/dear-inventory-ruby/models/payment_term.rb +0 -34
  18. data/lib/dear-inventory-ruby/models/price_tiers.rb +8 -8
  19. data/lib/dear-inventory-ruby/models/sale_invoice.rb +356 -0
  20. data/lib/dear-inventory-ruby/models/sale_invoice_additional_charge.rb +317 -0
  21. data/lib/dear-inventory-ruby/models/sale_invoice_line.rb +342 -0
  22. data/lib/dear-inventory-ruby/models/sale_invoices.rb +224 -0
  23. data/lib/dear-inventory-ruby/version.rb +1 -1
  24. data/spec/.DS_Store +0 -0
  25. data/spec/api/inventory_api_spec.rb +13 -0
  26. data/spec/models/account_spec.rb +0 -4
  27. data/spec/models/customer_spec.rb +0 -4
  28. data/spec/models/payment_term_spec.rb +0 -4
  29. data/spec/models/price_tiers_spec.rb +1 -1
  30. data/spec/models/sale_invoice_additional_charge_spec.rb +89 -0
  31. data/spec/models/sale_invoice_line_spec.rb +107 -0
  32. data/spec/models/sale_invoice_spec.rb +113 -0
  33. data/spec/models/sale_invoices_spec.rb +47 -0
  34. metadata +23 -18
  35. data/docs/CurrencyCode.md +0 -16
  36. data/docs/DimensionsUnit.md +0 -16
  37. data/docs/WeightUnit.md +0 -16
  38. data/lib/dear-inventory-ruby/models/currency_code.rb +0 -196
  39. data/lib/dear-inventory-ruby/models/dimensions_unit.rb +0 -42
  40. data/lib/dear-inventory-ruby/models/weight_unit.rb +0 -39
  41. data/spec/models/currency_code_spec.rb +0 -35
  42. data/spec/models/dimensions_unit_spec.rb +0 -35
  43. data/spec/models/weight_unit_spec.rb +0 -35
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7798e799cbf4fa681aad8ee42427c13fb6da8fd45e72b6c6feeb69af8ba371f
4
- data.tar.gz: 2121bc741a44a0af49b783443b0e554fcb140461c615e74fd59918b14dc3d5b8
3
+ metadata.gz: 006be1c3b63051c309b4b632785951a40094ef9938c03b8bcb517dc5c6fc8d18
4
+ data.tar.gz: 744d7099d7ceaa2a41d988d03bf2f92f8d961b9d7e7a7f1ac90b5800a9dd0f68
5
5
  SHA512:
6
- metadata.gz: e7a495a34bf3bfaec919ce61024002f81ab698dd085b4104a4454db4366f1dd9d3ff9c0bfc5de35e6613337fd93fe8ff4db0c61d814e6fa121c10c2548e0e94f
7
- data.tar.gz: 67eb1ebfda865b6888d4e4737705cc27641d571e50d39ec5e48ee323c6cb4bb4bb8b236654335db827c2ed9e25ffb92fe38b047d0aec5aa6d8c316338ec29204
6
+ metadata.gz: 391dcc662d1fb7227d86b3f305174ec012f107f2154a6cbbe0e19cc27c5ecbecb947708fab816676dbcbaca4ebc1a2eab7a2d6af95c8fe13662368087a84f840
7
+ data.tar.gz: 57377d70ea6345f8822be25d5224c94b57754bb184df24f24d532669ea8f598881732e63afa7d8cb435b66780d4914b25c017a78bf92fe1cdc2b9cc4e566097e
data/CHANGELOG.md CHANGED
@@ -2,10 +2,30 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.1.17] - 2021-05-25
6
+
7
+ - Remove all `ENUM`.
8
+
9
+ ## [0.1.16] - 2021-05-14
10
+
11
+ - Remove require `ENUM` for `WeightUnit`.
12
+
13
+ ## [0.1.15] - 2021-02-22
14
+
15
+ - Add new endpoint GET `/sale/invoice` and some related models.
16
+
17
+ ## [0.1.14] - 2021-05-01
18
+
19
+ - Remove validation `Currency` for `Customer` and `Me` models.
20
+
21
+ ## [0.1.13] - 2020-10-28
22
+
23
+ - Update `PriceTiersList` to `PriceTiers`.
24
+
5
25
  ## [0.1.12] - 2020-10-28
6
26
 
7
- - Add new endpoint and model: PriceTier
8
- - Endpoint GET PriceTiers
27
+ - Add new endpoint and model: `PriceTier`
28
+ - Endpoint GET `PriceTiers`
9
29
 
10
30
  ## [0.1.11] - 2020-09-21
11
31
 
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.1.12
10
+ - Package version: 0.1.17
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [https://www.nnhan.me](https://www.nnhan.me)
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.1.12.gem
27
+ gem install ./dear-inventory-ruby-0.1.17.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./dear-inventory-ruby-0.1.12.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./dear-inventory-ruby-0.1.17.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.1.12'
36
+ gem 'dear-inventory-ruby', '~> 0.1.17'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -103,6 +103,7 @@ Class | Method | HTTP request | Description
103
103
  *DearInventoryRuby::InventoryApi* | [**get_me**](docs/InventoryApi.md#get_me) | **GET** /me | Allows you to retrieve your information
104
104
  *DearInventoryRuby::InventoryApi* | [**get_payment_terms**](docs/InventoryApi.md#get_payment_terms) | **GET** /ref/paymentterm | Allows you to retrieve the payment terms
105
105
  *DearInventoryRuby::InventoryApi* | [**get_price_tiers**](docs/InventoryApi.md#get_price_tiers) | **GET** /ref/priceTier | Allows you to retrieve the Price Tiers
106
+ *DearInventoryRuby::InventoryApi* | [**get_sale_invoices**](docs/InventoryApi.md#get_sale_invoices) | **GET** /sale/invoice | Allows you to retrieve the sale invoices
106
107
  *DearInventoryRuby::InventoryApi* | [**get_taxes**](docs/InventoryApi.md#get_taxes) | **GET** /ref/tax | Allows you to retrieve the taxes
107
108
  *DearInventoryRuby::InventoryApi* | [**update_account**](docs/InventoryApi.md#update_account) | **PUT** /ref/account | Allows you to update an Account
108
109
  *DearInventoryRuby::InventoryApi* | [**update_customer**](docs/InventoryApi.md#update_customer) | **PUT** /customer | Allows you to update a customer
@@ -116,21 +117,22 @@ Class | Method | HTTP request | Description
116
117
  - [DearInventoryRuby::Accounts](docs/Accounts.md)
117
118
  - [DearInventoryRuby::Address](docs/Address.md)
118
119
  - [DearInventoryRuby::Contact](docs/Contact.md)
119
- - [DearInventoryRuby::CurrencyCode](docs/CurrencyCode.md)
120
120
  - [DearInventoryRuby::Customer](docs/Customer.md)
121
121
  - [DearInventoryRuby::Customers](docs/Customers.md)
122
- - [DearInventoryRuby::DimensionsUnit](docs/DimensionsUnit.md)
123
122
  - [DearInventoryRuby::Error](docs/Error.md)
124
123
  - [DearInventoryRuby::Me](docs/Me.md)
125
124
  - [DearInventoryRuby::PaymentTerm](docs/PaymentTerm.md)
126
125
  - [DearInventoryRuby::PaymentTerms](docs/PaymentTerms.md)
127
126
  - [DearInventoryRuby::PriceTier](docs/PriceTier.md)
128
127
  - [DearInventoryRuby::PriceTiers](docs/PriceTiers.md)
128
+ - [DearInventoryRuby::SaleInvoice](docs/SaleInvoice.md)
129
+ - [DearInventoryRuby::SaleInvoiceAdditionalCharge](docs/SaleInvoiceAdditionalCharge.md)
130
+ - [DearInventoryRuby::SaleInvoiceLine](docs/SaleInvoiceLine.md)
131
+ - [DearInventoryRuby::SaleInvoices](docs/SaleInvoices.md)
129
132
  - [DearInventoryRuby::Success](docs/Success.md)
130
133
  - [DearInventoryRuby::Tax](docs/Tax.md)
131
134
  - [DearInventoryRuby::TaxComponent](docs/TaxComponent.md)
132
135
  - [DearInventoryRuby::Taxes](docs/Taxes.md)
133
- - [DearInventoryRuby::WeightUnit](docs/WeightUnit.md)
134
136
 
135
137
 
136
138
  ## Documentation for Authorization
data/docs/Customer.md CHANGED
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
7
7
  **id** | **String** | Unique Customer ID | [optional]
8
8
  **name** | **String** | Name of Customer |
9
9
  **status** | **String** | Points that Customer is Active. Available values are Active and Deprecated. Required for POST |
10
- **currency** | [**CurrencyCode**](CurrencyCode.md) | |
10
+ **currency** | **String** | Currency code of Customer |
11
11
  **payment_term** | **String** | Payment term |
12
12
  **account_receivable** | **String** | Account receivable code of Customer |
13
13
  **revenue_account** | **String** | Sale account code of Customer |
data/docs/InventoryApi.md CHANGED
@@ -15,6 +15,7 @@ Method | HTTP request | Description
15
15
  [**get_me**](InventoryApi.md#get_me) | **GET** /me | Allows you to retrieve your information
16
16
  [**get_payment_terms**](InventoryApi.md#get_payment_terms) | **GET** /ref/paymentterm | Allows you to retrieve the payment terms
17
17
  [**get_price_tiers**](InventoryApi.md#get_price_tiers) | **GET** /ref/priceTier | Allows you to retrieve the Price Tiers
18
+ [**get_sale_invoices**](InventoryApi.md#get_sale_invoices) | **GET** /sale/invoice | Allows you to retrieve the sale invoices
18
19
  [**get_taxes**](InventoryApi.md#get_taxes) | **GET** /ref/tax | Allows you to retrieve the taxes
19
20
  [**update_account**](InventoryApi.md#update_account) | **PUT** /ref/account | Allows you to update an Account
20
21
  [**update_customer**](InventoryApi.md#update_customer) | **PUT** /customer | Allows you to update a customer
@@ -700,6 +701,69 @@ This endpoint does not need any parameter.
700
701
  - **Accept**: application/json
701
702
 
702
703
 
704
+ ## get_sale_invoices
705
+
706
+ > SaleInvoices get_sale_invoices(opts)
707
+
708
+ Allows you to retrieve the sale invoices
709
+
710
+ ### Example
711
+
712
+ ```ruby
713
+ # load the gem
714
+ require 'dear-inventory-ruby'
715
+ # setup authorization
716
+ DearInventoryRuby.configure do |config|
717
+ # Configure API key authorization: accountID
718
+ config.api_key['api-auth-accountid'] = 'YOUR API KEY'
719
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
720
+ #config.api_key_prefix['api-auth-accountid'] = 'Bearer'
721
+
722
+ # Configure API key authorization: appKey
723
+ config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
724
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
725
+ #config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
726
+ end
727
+
728
+ api_instance = DearInventoryRuby::InventoryApi.new
729
+ opts = {
730
+ sale_id: 'sale_id_example', # String | Unique DEAR Sale ID
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
733
+ }
734
+
735
+ begin
736
+ #Allows you to retrieve the sale invoices
737
+ result = api_instance.get_sale_invoices(opts)
738
+ p result
739
+ rescue DearInventoryRuby::ApiError => e
740
+ puts "Exception when calling InventoryApi->get_sale_invoices: #{e}"
741
+ end
742
+ ```
743
+
744
+ ### Parameters
745
+
746
+
747
+ Name | Type | Description | Notes
748
+ ------------- | ------------- | ------------- | -------------
749
+ **sale_id** | **String**| Unique DEAR Sale ID | [optional]
750
+ **combine_additional_charges** | **Boolean**| Show additional charges in 'Lines' array | [optional] [default to false]
751
+ **include_product_info** | **Boolean**| Show all used products in additional array | [optional] [default to false]
752
+
753
+ ### Return type
754
+
755
+ [**SaleInvoices**](SaleInvoices.md)
756
+
757
+ ### Authorization
758
+
759
+ [accountID](../README.md#accountID), [appKey](../README.md#appKey)
760
+
761
+ ### HTTP request headers
762
+
763
+ - **Content-Type**: Not defined
764
+ - **Accept**: application/json
765
+
766
+
703
767
  ## get_taxes
704
768
 
705
769
  > Taxes get_taxes(opts)
data/docs/Me.md CHANGED
@@ -5,10 +5,10 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **company** | **String** | Your company name | [optional]
8
- **currency** | [**CurrencyCode**](CurrencyCode.md) | | [optional]
8
+ **currency** | **String** | Your company base currency | [optional]
9
9
  **time_zone** | **String** | Time Zone where your company located | [optional]
10
- **default_weight_units** | [**WeightUnit**](WeightUnit.md) | | [optional]
11
- **default_dimensions_units** | [**DimensionsUnit**](DimensionsUnit.md) | | [optional]
10
+ **default_weight_units** | **String** | Unit of measure for unit weight | [optional]
11
+ **default_dimensions_units** | **String** | Unit of measure for unit length/width/height | [optional]
12
12
  **lock_date** | **Date** | Financial settings option. Indicates date period start from what you can change transactional data. Formatted in Tenant date format | [optional]
13
13
  **opening_balance_date** | **Date** | Date of opening balances in the system. Formatted in Tenant date format | [optional]
14
14
 
data/docs/PriceTiers.md CHANGED
@@ -4,14 +4,14 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **price_tiers_list** | [**Array<PriceTier>**](PriceTier.md) | Array of PriceTiers | [optional]
7
+ **price_tiers** | [**Array<PriceTier>**](PriceTier.md) | Array of PriceTiers | [optional]
8
8
 
9
9
  ## Code Sample
10
10
 
11
11
  ```ruby
12
12
  require 'DearInventoryRuby'
13
13
 
14
- instance = DearInventoryRuby::PriceTiers.new(price_tiers_list: nil)
14
+ instance = DearInventoryRuby::PriceTiers.new(price_tiers: nil)
15
15
  ```
16
16
 
17
17
 
@@ -0,0 +1,41 @@
1
+ # DearInventoryRuby::SaleInvoice
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 | [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::SaleInvoice.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
+
@@ -0,0 +1,33 @@
1
+ # DearInventoryRuby::SaleInvoiceAdditionalCharge
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **description** | **String** | Name of Service Product referenced by this Line |
8
+ **quantity** | **Float** | Product or service quantity. Minimal value is 1. |
9
+ **price** | **Float** | Price per unit in Customer currency |
10
+ **discount** | **Float** | Discount. Value between 0 and 100. For free items discount is 100. Default value is 0 | [optional]
11
+ **tax** | **Float** | Tax |
12
+ **total** | **Float** | Line Total.For validation | [optional]
13
+ **tax_rule** | **Float** | Line Tax Rule name. |
14
+ **account** | **Float** | Revenue account |
15
+ **comment** | **Float** | Comment | [optional]
16
+
17
+ ## Code Sample
18
+
19
+ ```ruby
20
+ require 'DearInventoryRuby'
21
+
22
+ instance = DearInventoryRuby::SaleInvoiceAdditionalCharge.new(description: nil,
23
+ quantity: nil,
24
+ price: nil,
25
+ discount: nil,
26
+ tax: nil,
27
+ total: nil,
28
+ tax_rule: nil,
29
+ account: nil,
30
+ comment: nil)
31
+ ```
32
+
33
+
@@ -0,0 +1,39 @@
1
+ # DearInventoryRuby::SaleInvoiceLine
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **product_id** | **String** | Product identifier referenced by this Line. Required If CombineAdditionalCharges param exist for this endpoint and it have values = false |
8
+ **sku** | **String** | Product SKU referenced by this Line. Required If CombineAdditionalCharges param exist for this endpoint and it have values = false |
9
+ **name** | **String** | Product Name referenced by this Line |
10
+ **quantity** | **Float** | Product or service quantity. Minimal value is 1. |
11
+ **price** | **Float** | Price per unit in Customer currency |
12
+ **discount** | **Float** | Discount. Value between 0 and 100. For free items discount is 100. Default value is 0 | [optional]
13
+ **tax** | **Float** | Tax | [optional]
14
+ **total** | **Float** | Line Total. For validation | [optional]
15
+ **average_cost** | **Float** | Average product cost | [optional]
16
+ **tax_rule** | **String** | Line Tax Rule name. | [optional]
17
+ **account** | **String** | Revenue account | [optional]
18
+ **comment** | **String** | Comment for this line | [optional]
19
+
20
+ ## Code Sample
21
+
22
+ ```ruby
23
+ require 'DearInventoryRuby'
24
+
25
+ instance = DearInventoryRuby::SaleInvoiceLine.new(product_id: nil,
26
+ sku: nil,
27
+ name: nil,
28
+ quantity: nil,
29
+ price: nil,
30
+ discount: nil,
31
+ tax: nil,
32
+ total: nil,
33
+ average_cost: nil,
34
+ tax_rule: nil,
35
+ account: nil,
36
+ comment: nil)
37
+ ```
38
+
39
+
@@ -0,0 +1,19 @@
1
+ # DearInventoryRuby::SaleInvoices
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **sale_id** | **String** | Unique DEAR Sale ID |
8
+ **invoices** | [**Array<SaleInvoice>**](SaleInvoice.md) | Array of Invoices | [optional]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'DearInventoryRuby'
14
+
15
+ instance = DearInventoryRuby::SaleInvoices.new(sale_id: nil,
16
+ invoices: nil)
17
+ ```
18
+
19
+
@@ -21,21 +21,22 @@ require 'dear-inventory-ruby/models/account'
21
21
  require 'dear-inventory-ruby/models/accounts'
22
22
  require 'dear-inventory-ruby/models/address'
23
23
  require 'dear-inventory-ruby/models/contact'
24
- require 'dear-inventory-ruby/models/currency_code'
25
24
  require 'dear-inventory-ruby/models/customer'
26
25
  require 'dear-inventory-ruby/models/customers'
27
- require 'dear-inventory-ruby/models/dimensions_unit'
28
26
  require 'dear-inventory-ruby/models/error'
29
27
  require 'dear-inventory-ruby/models/me'
30
28
  require 'dear-inventory-ruby/models/payment_term'
31
29
  require 'dear-inventory-ruby/models/payment_terms'
32
30
  require 'dear-inventory-ruby/models/price_tier'
33
31
  require 'dear-inventory-ruby/models/price_tiers'
32
+ require 'dear-inventory-ruby/models/sale_invoice'
33
+ require 'dear-inventory-ruby/models/sale_invoice_additional_charge'
34
+ require 'dear-inventory-ruby/models/sale_invoice_line'
35
+ require 'dear-inventory-ruby/models/sale_invoices'
34
36
  require 'dear-inventory-ruby/models/success'
35
37
  require 'dear-inventory-ruby/models/tax'
36
38
  require 'dear-inventory-ruby/models/tax_component'
37
39
  require 'dear-inventory-ruby/models/taxes'
38
- require 'dear-inventory-ruby/models/weight_unit'
39
40
 
40
41
  # APIs
41
42
  require 'dear-inventory-ruby/api/inventory_api'
@@ -720,6 +720,69 @@ module DearInventoryRuby
720
720
  return data, status_code, headers
721
721
  end
722
722
 
723
+ # Allows you to retrieve the sale invoices
724
+ # @param [Hash] opts the optional parameters
725
+ # @option opts [String] :sale_id Unique DEAR Sale ID
726
+ # @option opts [Boolean] :combine_additional_charges Show additional charges in 'Lines' array (default to false)
727
+ # @option opts [Boolean] :include_product_info Show all used products in additional array (default to false)
728
+ # @return [SaleInvoices]
729
+ def get_sale_invoices(opts = {})
730
+ data, _status_code, _headers = get_sale_invoices_with_http_info(opts)
731
+ data
732
+ end
733
+
734
+ # Allows you to retrieve the sale invoices
735
+ # @param [Hash] opts the optional parameters
736
+ # @option opts [String] :sale_id Unique DEAR Sale ID
737
+ # @option opts [Boolean] :combine_additional_charges Show additional charges in 'Lines' array
738
+ # @option opts [Boolean] :include_product_info Show all used products in additional array
739
+ # @return [Array<(SaleInvoices, Integer, Hash)>] SaleInvoices data, response status code and response headers
740
+ def get_sale_invoices_with_http_info(opts = {})
741
+ if @api_client.config.debugging
742
+ @api_client.config.logger.debug 'Calling API: InventoryApi.get_sale_invoices ...'
743
+ end
744
+ # resource path
745
+ local_var_path = '/sale/invoice'
746
+
747
+ # query parameters
748
+ query_params = opts[:query_params] || {}
749
+ query_params[:'SaleID'] = opts[:'sale_id'] if !opts[:'sale_id'].nil?
750
+ query_params[:'CombineAdditionalCharges'] = opts[:'combine_additional_charges'] if !opts[:'combine_additional_charges'].nil?
751
+ query_params[:'IncludeProductInfo'] = opts[:'include_product_info'] if !opts[:'include_product_info'].nil?
752
+
753
+ # header parameters
754
+ header_params = opts[:header_params] || {}
755
+ # HTTP header 'Accept' (if needed)
756
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
757
+
758
+ # form parameters
759
+ form_params = opts[:form_params] || {}
760
+
761
+ # http body (model)
762
+ post_body = opts[:body]
763
+
764
+ # return_type
765
+ return_type = opts[:return_type] || 'SaleInvoices'
766
+
767
+ # auth_names
768
+ auth_names = opts[:auth_names] || ['accountID', 'appKey']
769
+
770
+ new_options = opts.merge(
771
+ :header_params => header_params,
772
+ :query_params => query_params,
773
+ :form_params => form_params,
774
+ :body => post_body,
775
+ :auth_names => auth_names,
776
+ :return_type => return_type
777
+ )
778
+
779
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
780
+ if @api_client.config.debugging
781
+ @api_client.config.logger.debug "API called: InventoryApi#get_sale_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
782
+ end
783
+ return data, status_code, headers
784
+ end
785
+
723
786
  # Allows you to retrieve the taxes
724
787
  # @param [Hash] opts the optional parameters
725
788
  # @option opts [String] :page Default is 1 (default to '1')