dear-inventory-ruby 0.1.13 → 0.1.18

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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -1
  3. data/README.md +9 -7
  4. data/dear-inventory-ruby.gemspec +1 -1
  5. data/docs/Customer.md +1 -1
  6. data/docs/InventoryApi.md +64 -0
  7. data/docs/Me.md +3 -3
  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/sale_invoice.rb +356 -0
  19. data/lib/dear-inventory-ruby/models/sale_invoice_additional_charge.rb +317 -0
  20. data/lib/dear-inventory-ruby/models/sale_invoice_line.rb +342 -0
  21. data/lib/dear-inventory-ruby/models/sale_invoices.rb +224 -0
  22. data/lib/dear-inventory-ruby/version.rb +1 -1
  23. data/spec/.DS_Store +0 -0
  24. data/spec/api/inventory_api_spec.rb +13 -0
  25. data/spec/models/account_spec.rb +0 -4
  26. data/spec/models/customer_spec.rb +0 -4
  27. data/spec/models/payment_term_spec.rb +0 -4
  28. data/spec/models/sale_invoice_additional_charge_spec.rb +89 -0
  29. data/spec/models/sale_invoice_line_spec.rb +107 -0
  30. data/spec/models/sale_invoice_spec.rb +113 -0
  31. data/spec/models/sale_invoices_spec.rb +47 -0
  32. metadata +31 -21
  33. data/docs/CurrencyCode.md +0 -16
  34. data/docs/DimensionsUnit.md +0 -16
  35. data/docs/WeightUnit.md +0 -16
  36. data/lib/dear-inventory-ruby/models/currency_code.rb +0 -196
  37. data/lib/dear-inventory-ruby/models/dimensions_unit.rb +0 -42
  38. data/lib/dear-inventory-ruby/models/weight_unit.rb +0 -39
  39. data/pkg/dear-inventory-ruby-0.1.13.gem +0 -0
  40. data/spec/models/currency_code_spec.rb +0 -35
  41. data/spec/models/dimensions_unit_spec.rb +0 -35
  42. data/spec/models/weight_unit_spec.rb +0 -35
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0af23156a4744800a3c923beb2fe310fa2f5974554353272c795a183348848c9
4
- data.tar.gz: 655be8b59ad6e919d15aeac99580014fcff3673dcbe5e466639ddf502d504f61
3
+ metadata.gz: cff684dd76d942c6f1eff1dfd0b834b9e1f5ead3a5f39609166f3ceb0471181c
4
+ data.tar.gz: a7e928c0607ca7b3eb72541204e64846931980ea83a69734ad18ec2519615e66
5
5
  SHA512:
6
- metadata.gz: 7b132a8a063cdc4d2e49ba2aaf7474d9155d96e1379e79a31ec68f25bf3d0a63559267b86876db90665907c279f3631bdbb101896e35ae77724069ee3afd2be6
7
- data.tar.gz: 5bdcc0d48eb6c3d1c8ad191156ca7a09c82d993b13031697ad602d9fc11b6e4c137ca89d31759b2a03c0750b577526cafe5d8d8b3d6398f7f5ca9a0351b63304
6
+ metadata.gz: 1e4cd8059857d997c9ec08aa14b6b8e53f40b81f55787b66b65f67ce0057a544a0e2589693cbd27c47df5cec3dc7f685f82c3d41681fec40ffcf229f56dfc7ec
7
+ data.tar.gz: 6865232594b5d166393a08917487f3f9d19d339594b14806d662d4594a94ca5cd1007792c693550f7ebb0c79d7403ae48ae644e40e933daa35c494ffdca3ded7
data/CHANGELOG.md CHANGED
@@ -2,9 +2,29 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.1.18] - 2021-06-07
6
+
7
+ - Update `faraday` version.
8
+
9
+ ## [0.1.17] - 2021-05-25
10
+
11
+ - Remove all `ENUM`.
12
+
13
+ ## [0.1.16] - 2021-05-14
14
+
15
+ - Remove require `ENUM` for `WeightUnit`.
16
+
17
+ ## [0.1.15] - 2021-02-22
18
+
19
+ - Add new endpoint GET `/sale/invoice` and some related models.
20
+
21
+ ## [0.1.14] - 2021-05-01
22
+
23
+ - Remove validation `Currency` for `Customer` and `Me` models.
24
+
5
25
  ## [0.1.13] - 2020-10-28
6
26
 
7
- - Update `PriceTiersList` to `PriceTiers`
27
+ - Update `PriceTiersList` to `PriceTiers`.
8
28
 
9
29
  ## [0.1.12] - 2020-10-28
10
30
 
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.13
10
+ - Package version: 0.1.18
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.13.gem
27
+ gem install ./dear-inventory-ruby-0.1.18.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./dear-inventory-ruby-0.1.13.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./dear-inventory-ruby-0.1.18.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.13'
36
+ gem 'dear-inventory-ruby', '~> 0.1.18'
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
@@ -33,7 +33,7 @@ Gem::Specification.new do |s|
33
33
 
34
34
  s.required_ruby_version = ">= 1.9"
35
35
 
36
- s.add_runtime_dependency 'faraday', '>= 0.14.0'
36
+ s.add_runtime_dependency 'faraday', '~> 1.0', '>= 1.0.1'
37
37
  s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
38
38
 
39
39
  s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
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
 
@@ -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')