dear-inventory-ruby 0.1.5 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -0
- data/Gemfile +1 -1
- data/README.md +32 -9
- data/dear-inventory-ruby.gemspec +1 -1
- data/docs/Account.md +45 -0
- data/docs/Accounts.md +21 -0
- data/docs/Address.md +11 -11
- data/docs/Contact.md +14 -10
- data/docs/Customer.md +40 -38
- data/docs/Customers.md +3 -3
- data/docs/DimensionsUnit.md +16 -0
- data/docs/Error.md +2 -2
- data/docs/InventoryApi.md +788 -26
- data/docs/Me.md +29 -0
- data/docs/PaymentTerm.md +27 -0
- data/docs/PaymentTerms.md +21 -0
- data/docs/Success.md +17 -0
- data/docs/Tax.md +33 -0
- data/docs/TaxComponent.md +23 -0
- data/docs/Taxes.md +21 -0
- data/docs/WeightUnit.md +16 -0
- data/lib/dear-inventory-ruby.rb +12 -1
- data/lib/dear-inventory-ruby/api/inventory_api.rb +827 -44
- data/lib/dear-inventory-ruby/api_client.rb +8 -6
- data/lib/dear-inventory-ruby/api_error.rb +1 -1
- data/lib/dear-inventory-ruby/configuration.rb +1 -1
- data/lib/dear-inventory-ruby/models/account.rb +477 -0
- data/lib/dear-inventory-ruby/models/accounts.rb +229 -0
- data/lib/dear-inventory-ruby/models/address.rb +11 -1
- data/lib/dear-inventory-ruby/models/contact.rb +34 -5
- data/lib/dear-inventory-ruby/models/currency_code.rb +1 -1
- data/lib/dear-inventory-ruby/models/customer.rb +56 -5
- data/lib/dear-inventory-ruby/models/customers.rb +1 -1
- data/lib/dear-inventory-ruby/models/dimensions_unit.rb +42 -0
- data/lib/dear-inventory-ruby/models/error.rb +1 -1
- data/lib/dear-inventory-ruby/models/me.rb +264 -0
- data/lib/dear-inventory-ruby/models/payment_term.rb +319 -0
- data/lib/dear-inventory-ruby/models/payment_terms.rb +229 -0
- data/lib/dear-inventory-ruby/models/success.rb +207 -0
- data/lib/dear-inventory-ruby/models/tax.rb +360 -0
- data/lib/dear-inventory-ruby/models/tax_component.rb +306 -0
- data/lib/dear-inventory-ruby/models/taxes.rb +229 -0
- data/lib/dear-inventory-ruby/models/weight_unit.rb +39 -0
- data/lib/dear-inventory-ruby/version.rb +2 -2
- data/spec/api/inventory_api_spec.rb +160 -5
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/account_spec.rb +129 -0
- data/spec/models/accounts_spec.rb +53 -0
- data/spec/models/address_spec.rb +1 -1
- data/spec/models/contact_spec.rb +13 -1
- data/spec/models/currency_code_spec.rb +1 -1
- data/spec/models/customer_spec.rb +7 -1
- data/spec/models/customers_spec.rb +1 -1
- data/spec/models/dimensions_unit_spec.rb +35 -0
- data/spec/models/error_spec.rb +1 -1
- data/spec/models/me_spec.rb +77 -0
- data/spec/models/payment_term_spec.rb +75 -0
- data/spec/models/payment_terms_spec.rb +53 -0
- data/spec/models/success_spec.rb +41 -0
- data/spec/models/tax_component_spec.rb +59 -0
- data/spec/models/tax_spec.rb +89 -0
- data/spec/models/taxes_spec.rb +53 -0
- data/spec/models/weight_unit_spec.rb +35 -0
- data/spec/spec_helper.rb +1 -1
- metadata +59 -15
data/docs/Me.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# DearInventoryRuby::Me
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**company** | **String** | Your company name | [optional]
|
8
|
+
**currency** | [**CurrencyCode**](CurrencyCode.md) | | [optional]
|
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]
|
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
|
+
**opening_balance_date** | **Date** | Date of opening balances in the system. Formatted in Tenant date format | [optional]
|
14
|
+
|
15
|
+
## Code Sample
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'DearInventoryRuby'
|
19
|
+
|
20
|
+
instance = DearInventoryRuby::Me.new(company: nil,
|
21
|
+
currency: nil,
|
22
|
+
time_zone: nil,
|
23
|
+
default_weight_units: nil,
|
24
|
+
default_dimensions_units: nil,
|
25
|
+
lock_date: nil,
|
26
|
+
opening_balance_date: nil)
|
27
|
+
```
|
28
|
+
|
29
|
+
|
data/docs/PaymentTerm.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# DearInventoryRuby::PaymentTerm
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**id** | **String** | Unique Payment Term ID | [optional]
|
8
|
+
**name** | **String** | Name of Payment Term |
|
9
|
+
**duration** | **String** | Minimum Payment Term duration in days | [optional]
|
10
|
+
**method** | **String** | Method of Payment Term. Should be one of the following values: `number of days`, `day of next month`, `last day of next month`, `days since the end of the month` | [optional]
|
11
|
+
**is_active** | **Boolean** | Points that Payment Term is Active. `True` as default for POST. | [optional] [default to true]
|
12
|
+
**is_default** | **Boolean** | Points that Payment Term is Default. `False` as default for POST. | [optional] [default to false]
|
13
|
+
|
14
|
+
## Code Sample
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'DearInventoryRuby'
|
18
|
+
|
19
|
+
instance = DearInventoryRuby::PaymentTerm.new(id: nil,
|
20
|
+
name: nil,
|
21
|
+
duration: nil,
|
22
|
+
method: nil,
|
23
|
+
is_active: nil,
|
24
|
+
is_default: nil)
|
25
|
+
```
|
26
|
+
|
27
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# DearInventoryRuby::PaymentTerms
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**total** | **String** | Total | [optional]
|
8
|
+
**page** | **String** | Page | [optional]
|
9
|
+
**payment_term_list** | [**Array<PaymentTerm>**](PaymentTerm.md) | Array of PaymentTerms | [optional]
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'DearInventoryRuby'
|
15
|
+
|
16
|
+
instance = DearInventoryRuby::PaymentTerms.new(total: nil,
|
17
|
+
page: nil,
|
18
|
+
payment_term_list: nil)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
data/docs/Success.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# DearInventoryRuby::Success
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**success** | **Boolean** | Success | [optional]
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'DearInventoryRuby'
|
13
|
+
|
14
|
+
instance = DearInventoryRuby::Success.new(success: nil)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
data/docs/Tax.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# DearInventoryRuby::Tax
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**id** | **String** | Unique ID | [optional]
|
8
|
+
**name** | **String** | Tax Name |
|
9
|
+
**account** | **String** | ChartOfAccount Code with Class == `LIABILITY` && Status == `ACTIVE` |
|
10
|
+
**is_active** | **Boolean** | Points that tax is Active | [default to true]
|
11
|
+
**tax_inclusive** | **Boolean** | Points that tax is Inclusive | [default to true]
|
12
|
+
**tax_percent** | **Float** | Tax percentage, should be between 0 and 100. Read-only | [optional]
|
13
|
+
**is_tax_for_sale** | **Boolean** | Points that tax is used for Sale | [optional] [default to true]
|
14
|
+
**is_tax_for_purchase** | **Boolean** | Points that tax is used for Purchase | [optional] [default to true]
|
15
|
+
**components** | [**Array<TaxComponent>**](TaxComponent.md) | List of Tax Components | [optional]
|
16
|
+
|
17
|
+
## Code Sample
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
require 'DearInventoryRuby'
|
21
|
+
|
22
|
+
instance = DearInventoryRuby::Tax.new(id: nil,
|
23
|
+
name: nil,
|
24
|
+
account: nil,
|
25
|
+
is_active: nil,
|
26
|
+
tax_inclusive: nil,
|
27
|
+
tax_percent: nil,
|
28
|
+
is_tax_for_sale: nil,
|
29
|
+
is_tax_for_purchase: nil,
|
30
|
+
components: nil)
|
31
|
+
```
|
32
|
+
|
33
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# DearInventoryRuby::TaxComponent
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | Name of product. Read-only. |
|
8
|
+
**percent** | **Float** | Cost. Required if product type is `Service`. Default value = 0. | [default to 0]
|
9
|
+
**account_code** | **String** | ChartOfAccount Code with Class == `LIABILITY` && Status == `ACTIVE` |
|
10
|
+
**component_order** | **Integer** | The order of sequence taxes components. |
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'DearInventoryRuby'
|
16
|
+
|
17
|
+
instance = DearInventoryRuby::TaxComponent.new(name: nil,
|
18
|
+
percent: nil,
|
19
|
+
account_code: nil,
|
20
|
+
component_order: nil)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
data/docs/Taxes.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# DearInventoryRuby::Taxes
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**total** | **String** | Total | [optional]
|
8
|
+
**page** | **String** | Page | [optional]
|
9
|
+
**tax_rule_list** | [**Array<Tax>**](Tax.md) | Array of Taxes | [optional]
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'DearInventoryRuby'
|
15
|
+
|
16
|
+
instance = DearInventoryRuby::Taxes.new(total: nil,
|
17
|
+
page: nil,
|
18
|
+
tax_rule_list: nil)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
data/docs/WeightUnit.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# DearInventoryRuby::WeightUnit
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
|
8
|
+
## Code Sample
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'DearInventoryRuby'
|
12
|
+
|
13
|
+
instance = DearInventoryRuby::WeightUnit.new()
|
14
|
+
```
|
15
|
+
|
16
|
+
|
data/lib/dear-inventory-ruby.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
7
7
|
Contact: nnhansg@gmail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -17,12 +17,23 @@ require 'dear-inventory-ruby/version'
|
|
17
17
|
require 'dear-inventory-ruby/configuration'
|
18
18
|
|
19
19
|
# Models
|
20
|
+
require 'dear-inventory-ruby/models/account'
|
21
|
+
require 'dear-inventory-ruby/models/accounts'
|
20
22
|
require 'dear-inventory-ruby/models/address'
|
21
23
|
require 'dear-inventory-ruby/models/contact'
|
22
24
|
require 'dear-inventory-ruby/models/currency_code'
|
23
25
|
require 'dear-inventory-ruby/models/customer'
|
24
26
|
require 'dear-inventory-ruby/models/customers'
|
27
|
+
require 'dear-inventory-ruby/models/dimensions_unit'
|
25
28
|
require 'dear-inventory-ruby/models/error'
|
29
|
+
require 'dear-inventory-ruby/models/me'
|
30
|
+
require 'dear-inventory-ruby/models/payment_term'
|
31
|
+
require 'dear-inventory-ruby/models/payment_terms'
|
32
|
+
require 'dear-inventory-ruby/models/success'
|
33
|
+
require 'dear-inventory-ruby/models/tax'
|
34
|
+
require 'dear-inventory-ruby/models/tax_component'
|
35
|
+
require 'dear-inventory-ruby/models/taxes'
|
36
|
+
require 'dear-inventory-ruby/models/weight_unit'
|
26
37
|
|
27
38
|
# APIs
|
28
39
|
require 'dear-inventory-ruby/api/inventory_api'
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
7
7
|
Contact: nnhansg@gmail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -19,51 +19,633 @@ module DearInventoryRuby
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Allows you to create an Account
|
23
|
+
# @param account [Account] an Account object with properties to create
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
26
|
+
# @return [Accounts]
|
27
|
+
def create_account(account, opts = {})
|
28
|
+
data, _status_code, _headers = create_account_with_http_info(account, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Allows you to create an Account
|
33
|
+
# @param account [Account] an Account object with properties to create
|
34
|
+
# @param [Hash] opts the optional parameters
|
35
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
36
|
+
# @return [Array<(Accounts, Integer, Hash)>] Accounts data, response status code and response headers
|
37
|
+
def create_account_with_http_info(account, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.create_account ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'account' is set
|
42
|
+
if @api_client.config.client_side_validation && account.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'account' when calling InventoryApi.create_account"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/ref/account'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
|
51
|
+
|
52
|
+
# header parameters
|
53
|
+
header_params = opts[:header_params] || {}
|
54
|
+
# HTTP header 'Accept' (if needed)
|
55
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
56
|
+
# HTTP header 'Content-Type'
|
57
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
58
|
+
|
59
|
+
# form parameters
|
60
|
+
form_params = opts[:form_params] || {}
|
61
|
+
|
62
|
+
# http body (model)
|
63
|
+
post_body = opts[:body] || @api_client.object_to_http_body(account)
|
64
|
+
|
65
|
+
# return_type
|
66
|
+
return_type = opts[:return_type] || 'Accounts'
|
67
|
+
|
68
|
+
# auth_names
|
69
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
70
|
+
|
71
|
+
new_options = opts.merge(
|
72
|
+
:header_params => header_params,
|
73
|
+
:query_params => query_params,
|
74
|
+
:form_params => form_params,
|
75
|
+
:body => post_body,
|
76
|
+
:auth_names => auth_names,
|
77
|
+
:return_type => return_type
|
78
|
+
)
|
79
|
+
|
80
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
81
|
+
if @api_client.config.debugging
|
82
|
+
@api_client.config.logger.debug "API called: InventoryApi#create_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
83
|
+
end
|
84
|
+
return data, status_code, headers
|
85
|
+
end
|
86
|
+
|
87
|
+
# Allows you to create a customer
|
88
|
+
# @param customer [Customer] a customer object with properties to create
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
91
|
+
# @return [Customers]
|
92
|
+
def create_customer(customer, opts = {})
|
93
|
+
data, _status_code, _headers = create_customer_with_http_info(customer, opts)
|
94
|
+
data
|
95
|
+
end
|
96
|
+
|
22
97
|
# Allows you to create a customer
|
23
|
-
# @param customer [Customer] a
|
98
|
+
# @param customer [Customer] a customer object with properties to create
|
99
|
+
# @param [Hash] opts the optional parameters
|
100
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
101
|
+
# @return [Array<(Customers, Integer, Hash)>] Customers data, response status code and response headers
|
102
|
+
def create_customer_with_http_info(customer, opts = {})
|
103
|
+
if @api_client.config.debugging
|
104
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.create_customer ...'
|
105
|
+
end
|
106
|
+
# verify the required parameter 'customer' is set
|
107
|
+
if @api_client.config.client_side_validation && customer.nil?
|
108
|
+
fail ArgumentError, "Missing the required parameter 'customer' when calling InventoryApi.create_customer"
|
109
|
+
end
|
110
|
+
# resource path
|
111
|
+
local_var_path = '/customer'
|
112
|
+
|
113
|
+
# query parameters
|
114
|
+
query_params = opts[:query_params] || {}
|
115
|
+
query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
|
116
|
+
|
117
|
+
# header parameters
|
118
|
+
header_params = opts[:header_params] || {}
|
119
|
+
# HTTP header 'Accept' (if needed)
|
120
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
121
|
+
# HTTP header 'Content-Type'
|
122
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
123
|
+
|
124
|
+
# form parameters
|
125
|
+
form_params = opts[:form_params] || {}
|
126
|
+
|
127
|
+
# http body (model)
|
128
|
+
post_body = opts[:body] || @api_client.object_to_http_body(customer)
|
129
|
+
|
130
|
+
# return_type
|
131
|
+
return_type = opts[:return_type] || 'Customers'
|
132
|
+
|
133
|
+
# auth_names
|
134
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
135
|
+
|
136
|
+
new_options = opts.merge(
|
137
|
+
:header_params => header_params,
|
138
|
+
:query_params => query_params,
|
139
|
+
:form_params => form_params,
|
140
|
+
:body => post_body,
|
141
|
+
:auth_names => auth_names,
|
142
|
+
:return_type => return_type
|
143
|
+
)
|
144
|
+
|
145
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
146
|
+
if @api_client.config.debugging
|
147
|
+
@api_client.config.logger.debug "API called: InventoryApi#create_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
148
|
+
end
|
149
|
+
return data, status_code, headers
|
150
|
+
end
|
151
|
+
|
152
|
+
# Allows you to create a payment term
|
153
|
+
# @param payment_term [PaymentTerm] a payment term object with properties to create
|
154
|
+
# @param [Hash] opts the optional parameters
|
155
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
156
|
+
# @return [PaymentTerms]
|
157
|
+
def create_payment_term(payment_term, opts = {})
|
158
|
+
data, _status_code, _headers = create_payment_term_with_http_info(payment_term, opts)
|
159
|
+
data
|
160
|
+
end
|
161
|
+
|
162
|
+
# Allows you to create a payment term
|
163
|
+
# @param payment_term [PaymentTerm] a payment term object with properties to create
|
164
|
+
# @param [Hash] opts the optional parameters
|
165
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
166
|
+
# @return [Array<(PaymentTerms, Integer, Hash)>] PaymentTerms data, response status code and response headers
|
167
|
+
def create_payment_term_with_http_info(payment_term, opts = {})
|
168
|
+
if @api_client.config.debugging
|
169
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.create_payment_term ...'
|
170
|
+
end
|
171
|
+
# verify the required parameter 'payment_term' is set
|
172
|
+
if @api_client.config.client_side_validation && payment_term.nil?
|
173
|
+
fail ArgumentError, "Missing the required parameter 'payment_term' when calling InventoryApi.create_payment_term"
|
174
|
+
end
|
175
|
+
# resource path
|
176
|
+
local_var_path = '/ref/paymentterm'
|
177
|
+
|
178
|
+
# query parameters
|
179
|
+
query_params = opts[:query_params] || {}
|
180
|
+
query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
|
181
|
+
|
182
|
+
# header parameters
|
183
|
+
header_params = opts[:header_params] || {}
|
184
|
+
# HTTP header 'Accept' (if needed)
|
185
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
186
|
+
# HTTP header 'Content-Type'
|
187
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
188
|
+
|
189
|
+
# form parameters
|
190
|
+
form_params = opts[:form_params] || {}
|
191
|
+
|
192
|
+
# http body (model)
|
193
|
+
post_body = opts[:body] || @api_client.object_to_http_body(payment_term)
|
194
|
+
|
195
|
+
# return_type
|
196
|
+
return_type = opts[:return_type] || 'PaymentTerms'
|
197
|
+
|
198
|
+
# auth_names
|
199
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
200
|
+
|
201
|
+
new_options = opts.merge(
|
202
|
+
:header_params => header_params,
|
203
|
+
:query_params => query_params,
|
204
|
+
:form_params => form_params,
|
205
|
+
:body => post_body,
|
206
|
+
:auth_names => auth_names,
|
207
|
+
:return_type => return_type
|
208
|
+
)
|
209
|
+
|
210
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
211
|
+
if @api_client.config.debugging
|
212
|
+
@api_client.config.logger.debug "API called: InventoryApi#create_payment_term\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
213
|
+
end
|
214
|
+
return data, status_code, headers
|
215
|
+
end
|
216
|
+
|
217
|
+
# Allows you to create a tax
|
218
|
+
# @param tax [Tax] a tax object with properties to create
|
219
|
+
# @param [Hash] opts the optional parameters
|
220
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
221
|
+
# @return [Taxes]
|
222
|
+
def create_tax(tax, opts = {})
|
223
|
+
data, _status_code, _headers = create_tax_with_http_info(tax, opts)
|
224
|
+
data
|
225
|
+
end
|
226
|
+
|
227
|
+
# Allows you to create a tax
|
228
|
+
# @param tax [Tax] a tax object with properties to create
|
229
|
+
# @param [Hash] opts the optional parameters
|
230
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
231
|
+
# @return [Array<(Taxes, Integer, Hash)>] Taxes data, response status code and response headers
|
232
|
+
def create_tax_with_http_info(tax, opts = {})
|
233
|
+
if @api_client.config.debugging
|
234
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.create_tax ...'
|
235
|
+
end
|
236
|
+
# verify the required parameter 'tax' is set
|
237
|
+
if @api_client.config.client_side_validation && tax.nil?
|
238
|
+
fail ArgumentError, "Missing the required parameter 'tax' when calling InventoryApi.create_tax"
|
239
|
+
end
|
240
|
+
# resource path
|
241
|
+
local_var_path = '/ref/tax'
|
242
|
+
|
243
|
+
# query parameters
|
244
|
+
query_params = opts[:query_params] || {}
|
245
|
+
query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
|
246
|
+
|
247
|
+
# header parameters
|
248
|
+
header_params = opts[:header_params] || {}
|
249
|
+
# HTTP header 'Accept' (if needed)
|
250
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
251
|
+
# HTTP header 'Content-Type'
|
252
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
253
|
+
|
254
|
+
# form parameters
|
255
|
+
form_params = opts[:form_params] || {}
|
256
|
+
|
257
|
+
# http body (model)
|
258
|
+
post_body = opts[:body] || @api_client.object_to_http_body(tax)
|
259
|
+
|
260
|
+
# return_type
|
261
|
+
return_type = opts[:return_type] || 'Taxes'
|
262
|
+
|
263
|
+
# auth_names
|
264
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
265
|
+
|
266
|
+
new_options = opts.merge(
|
267
|
+
:header_params => header_params,
|
268
|
+
:query_params => query_params,
|
269
|
+
:form_params => form_params,
|
270
|
+
:body => post_body,
|
271
|
+
:auth_names => auth_names,
|
272
|
+
:return_type => return_type
|
273
|
+
)
|
274
|
+
|
275
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
276
|
+
if @api_client.config.debugging
|
277
|
+
@api_client.config.logger.debug "API called: InventoryApi#create_tax\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
278
|
+
end
|
279
|
+
return data, status_code, headers
|
280
|
+
end
|
281
|
+
|
282
|
+
# Allows you to delete an Account
|
283
|
+
# @param [Hash] opts the optional parameters
|
284
|
+
# @option opts [String] :code Default is nil
|
285
|
+
# @return [Success]
|
286
|
+
def delete_account(opts = {})
|
287
|
+
data, _status_code, _headers = delete_account_with_http_info(opts)
|
288
|
+
data
|
289
|
+
end
|
290
|
+
|
291
|
+
# Allows you to delete an Account
|
292
|
+
# @param [Hash] opts the optional parameters
|
293
|
+
# @option opts [String] :code Default is nil
|
294
|
+
# @return [Array<(Success, Integer, Hash)>] Success data, response status code and response headers
|
295
|
+
def delete_account_with_http_info(opts = {})
|
296
|
+
if @api_client.config.debugging
|
297
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.delete_account ...'
|
298
|
+
end
|
299
|
+
# resource path
|
300
|
+
local_var_path = '/ref/account'
|
301
|
+
|
302
|
+
# query parameters
|
303
|
+
query_params = opts[:query_params] || {}
|
304
|
+
query_params[:'Code'] = opts[:'code'] if !opts[:'code'].nil?
|
305
|
+
|
306
|
+
# header parameters
|
307
|
+
header_params = opts[:header_params] || {}
|
308
|
+
# HTTP header 'Accept' (if needed)
|
309
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
310
|
+
|
311
|
+
# form parameters
|
312
|
+
form_params = opts[:form_params] || {}
|
313
|
+
|
314
|
+
# http body (model)
|
315
|
+
post_body = opts[:body]
|
316
|
+
|
317
|
+
# return_type
|
318
|
+
return_type = opts[:return_type] || 'Success'
|
319
|
+
|
320
|
+
# auth_names
|
321
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
322
|
+
|
323
|
+
new_options = opts.merge(
|
324
|
+
:header_params => header_params,
|
325
|
+
:query_params => query_params,
|
326
|
+
:form_params => form_params,
|
327
|
+
:body => post_body,
|
328
|
+
:auth_names => auth_names,
|
329
|
+
:return_type => return_type
|
330
|
+
)
|
331
|
+
|
332
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
333
|
+
if @api_client.config.debugging
|
334
|
+
@api_client.config.logger.debug "API called: InventoryApi#delete_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
335
|
+
end
|
336
|
+
return data, status_code, headers
|
337
|
+
end
|
338
|
+
|
339
|
+
# Allows you to delete a payment term
|
340
|
+
# @param [Hash] opts the optional parameters
|
341
|
+
# @option opts [String] :id Default is nil
|
342
|
+
# @return [Success]
|
343
|
+
def delete_payment_term(opts = {})
|
344
|
+
data, _status_code, _headers = delete_payment_term_with_http_info(opts)
|
345
|
+
data
|
346
|
+
end
|
347
|
+
|
348
|
+
# Allows you to delete a payment term
|
349
|
+
# @param [Hash] opts the optional parameters
|
350
|
+
# @option opts [String] :id Default is nil
|
351
|
+
# @return [Array<(Success, Integer, Hash)>] Success data, response status code and response headers
|
352
|
+
def delete_payment_term_with_http_info(opts = {})
|
353
|
+
if @api_client.config.debugging
|
354
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.delete_payment_term ...'
|
355
|
+
end
|
356
|
+
# resource path
|
357
|
+
local_var_path = '/ref/paymentterm'
|
358
|
+
|
359
|
+
# query parameters
|
360
|
+
query_params = opts[:query_params] || {}
|
361
|
+
query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?
|
362
|
+
|
363
|
+
# header parameters
|
364
|
+
header_params = opts[:header_params] || {}
|
365
|
+
# HTTP header 'Accept' (if needed)
|
366
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
367
|
+
|
368
|
+
# form parameters
|
369
|
+
form_params = opts[:form_params] || {}
|
370
|
+
|
371
|
+
# http body (model)
|
372
|
+
post_body = opts[:body]
|
373
|
+
|
374
|
+
# return_type
|
375
|
+
return_type = opts[:return_type] || 'Success'
|
376
|
+
|
377
|
+
# auth_names
|
378
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
379
|
+
|
380
|
+
new_options = opts.merge(
|
381
|
+
:header_params => header_params,
|
382
|
+
:query_params => query_params,
|
383
|
+
:form_params => form_params,
|
384
|
+
:body => post_body,
|
385
|
+
:auth_names => auth_names,
|
386
|
+
:return_type => return_type
|
387
|
+
)
|
388
|
+
|
389
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
390
|
+
if @api_client.config.debugging
|
391
|
+
@api_client.config.logger.debug "API called: InventoryApi#delete_payment_term\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
392
|
+
end
|
393
|
+
return data, status_code, headers
|
394
|
+
end
|
395
|
+
|
396
|
+
# Allows you to retrieve the Chart of Accounts
|
397
|
+
# @param [Hash] opts the optional parameters
|
398
|
+
# @option opts [String] :page Default is 1 (default to '1')
|
399
|
+
# @option opts [String] :limit Default is 100 (default to '100')
|
400
|
+
# @option opts [String] :code Default is nil
|
401
|
+
# @option opts [String] :name Default is nil
|
402
|
+
# @option opts [String] :type Default is nil
|
403
|
+
# @option opts [String] :status Default is nil
|
404
|
+
# @return [Accounts]
|
405
|
+
def get_accounts(opts = {})
|
406
|
+
data, _status_code, _headers = get_accounts_with_http_info(opts)
|
407
|
+
data
|
408
|
+
end
|
409
|
+
|
410
|
+
# Allows you to retrieve the Chart of Accounts
|
411
|
+
# @param [Hash] opts the optional parameters
|
412
|
+
# @option opts [String] :page Default is 1
|
413
|
+
# @option opts [String] :limit Default is 100
|
414
|
+
# @option opts [String] :code Default is nil
|
415
|
+
# @option opts [String] :name Default is nil
|
416
|
+
# @option opts [String] :type Default is nil
|
417
|
+
# @option opts [String] :status Default is nil
|
418
|
+
# @return [Array<(Accounts, Integer, Hash)>] Accounts data, response status code and response headers
|
419
|
+
def get_accounts_with_http_info(opts = {})
|
420
|
+
if @api_client.config.debugging
|
421
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.get_accounts ...'
|
422
|
+
end
|
423
|
+
# resource path
|
424
|
+
local_var_path = '/ref/account'
|
425
|
+
|
426
|
+
# query parameters
|
427
|
+
query_params = opts[:query_params] || {}
|
428
|
+
query_params[:'Page'] = opts[:'page'] if !opts[:'page'].nil?
|
429
|
+
query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
430
|
+
query_params[:'Code'] = opts[:'code'] if !opts[:'code'].nil?
|
431
|
+
query_params[:'Name'] = opts[:'name'] if !opts[:'name'].nil?
|
432
|
+
query_params[:'Type'] = opts[:'type'] if !opts[:'type'].nil?
|
433
|
+
query_params[:'Status'] = opts[:'status'] if !opts[:'status'].nil?
|
434
|
+
|
435
|
+
# header parameters
|
436
|
+
header_params = opts[:header_params] || {}
|
437
|
+
# HTTP header 'Accept' (if needed)
|
438
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
439
|
+
|
440
|
+
# form parameters
|
441
|
+
form_params = opts[:form_params] || {}
|
442
|
+
|
443
|
+
# http body (model)
|
444
|
+
post_body = opts[:body]
|
445
|
+
|
446
|
+
# return_type
|
447
|
+
return_type = opts[:return_type] || 'Accounts'
|
448
|
+
|
449
|
+
# auth_names
|
450
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
451
|
+
|
452
|
+
new_options = opts.merge(
|
453
|
+
:header_params => header_params,
|
454
|
+
:query_params => query_params,
|
455
|
+
:form_params => form_params,
|
456
|
+
:body => post_body,
|
457
|
+
:auth_names => auth_names,
|
458
|
+
:return_type => return_type
|
459
|
+
)
|
460
|
+
|
461
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
462
|
+
if @api_client.config.debugging
|
463
|
+
@api_client.config.logger.debug "API called: InventoryApi#get_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
464
|
+
end
|
465
|
+
return data, status_code, headers
|
466
|
+
end
|
467
|
+
|
468
|
+
# Allows you to retrieve the customers
|
469
|
+
# @param [Hash] opts the optional parameters
|
470
|
+
# @option opts [String] :page Default is 1 (default to '1')
|
471
|
+
# @option opts [String] :limit Default is 100 (default to '100')
|
472
|
+
# @option opts [String] :id Default is nil
|
473
|
+
# @option opts [String] :name Default is nil
|
474
|
+
# @option opts [String] :modified_since Default is nil
|
475
|
+
# @option opts [String] :include_deprecated Default is false (default to 'false')
|
476
|
+
# @return [Customers]
|
477
|
+
def get_customers(opts = {})
|
478
|
+
data, _status_code, _headers = get_customers_with_http_info(opts)
|
479
|
+
data
|
480
|
+
end
|
481
|
+
|
482
|
+
# Allows you to retrieve the customers
|
483
|
+
# @param [Hash] opts the optional parameters
|
484
|
+
# @option opts [String] :page Default is 1
|
485
|
+
# @option opts [String] :limit Default is 100
|
486
|
+
# @option opts [String] :id Default is nil
|
487
|
+
# @option opts [String] :name Default is nil
|
488
|
+
# @option opts [String] :modified_since Default is nil
|
489
|
+
# @option opts [String] :include_deprecated Default is false
|
490
|
+
# @return [Array<(Customers, Integer, Hash)>] Customers data, response status code and response headers
|
491
|
+
def get_customers_with_http_info(opts = {})
|
492
|
+
if @api_client.config.debugging
|
493
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.get_customers ...'
|
494
|
+
end
|
495
|
+
# resource path
|
496
|
+
local_var_path = '/customer'
|
497
|
+
|
498
|
+
# query parameters
|
499
|
+
query_params = opts[:query_params] || {}
|
500
|
+
query_params[:'Page'] = opts[:'page'] if !opts[:'page'].nil?
|
501
|
+
query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
502
|
+
query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?
|
503
|
+
query_params[:'Name'] = opts[:'name'] if !opts[:'name'].nil?
|
504
|
+
query_params[:'ModifiedSince'] = opts[:'modified_since'] if !opts[:'modified_since'].nil?
|
505
|
+
query_params[:'IncludeDeprecated'] = opts[:'include_deprecated'] if !opts[:'include_deprecated'].nil?
|
506
|
+
|
507
|
+
# header parameters
|
508
|
+
header_params = opts[:header_params] || {}
|
509
|
+
# HTTP header 'Accept' (if needed)
|
510
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
511
|
+
|
512
|
+
# form parameters
|
513
|
+
form_params = opts[:form_params] || {}
|
514
|
+
|
515
|
+
# http body (model)
|
516
|
+
post_body = opts[:body]
|
517
|
+
|
518
|
+
# return_type
|
519
|
+
return_type = opts[:return_type] || 'Customers'
|
520
|
+
|
521
|
+
# auth_names
|
522
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
523
|
+
|
524
|
+
new_options = opts.merge(
|
525
|
+
:header_params => header_params,
|
526
|
+
:query_params => query_params,
|
527
|
+
:form_params => form_params,
|
528
|
+
:body => post_body,
|
529
|
+
:auth_names => auth_names,
|
530
|
+
:return_type => return_type
|
531
|
+
)
|
532
|
+
|
533
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
534
|
+
if @api_client.config.debugging
|
535
|
+
@api_client.config.logger.debug "API called: InventoryApi#get_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
536
|
+
end
|
537
|
+
return data, status_code, headers
|
538
|
+
end
|
539
|
+
|
540
|
+
# Allows you to retrieve your information
|
24
541
|
# @param [Hash] opts the optional parameters
|
25
|
-
# @
|
26
|
-
|
27
|
-
|
28
|
-
data, _status_code, _headers = create_customer_with_http_info(customer, opts)
|
542
|
+
# @return [Me]
|
543
|
+
def get_me(opts = {})
|
544
|
+
data, _status_code, _headers = get_me_with_http_info(opts)
|
29
545
|
data
|
30
546
|
end
|
31
547
|
|
32
|
-
# Allows you to
|
33
|
-
# @param customer [Customer] a Contact object with properties to create
|
548
|
+
# Allows you to retrieve your information
|
34
549
|
# @param [Hash] opts the optional parameters
|
35
|
-
# @
|
36
|
-
|
37
|
-
def create_customer_with_http_info(customer, opts = {})
|
550
|
+
# @return [Array<(Me, Integer, Hash)>] Me data, response status code and response headers
|
551
|
+
def get_me_with_http_info(opts = {})
|
38
552
|
if @api_client.config.debugging
|
39
|
-
@api_client.config.logger.debug 'Calling API: InventoryApi.
|
553
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.get_me ...'
|
40
554
|
end
|
41
|
-
#
|
42
|
-
|
43
|
-
|
555
|
+
# resource path
|
556
|
+
local_var_path = '/me'
|
557
|
+
|
558
|
+
# query parameters
|
559
|
+
query_params = opts[:query_params] || {}
|
560
|
+
|
561
|
+
# header parameters
|
562
|
+
header_params = opts[:header_params] || {}
|
563
|
+
# HTTP header 'Accept' (if needed)
|
564
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
565
|
+
|
566
|
+
# form parameters
|
567
|
+
form_params = opts[:form_params] || {}
|
568
|
+
|
569
|
+
# http body (model)
|
570
|
+
post_body = opts[:body]
|
571
|
+
|
572
|
+
# return_type
|
573
|
+
return_type = opts[:return_type] || 'Me'
|
574
|
+
|
575
|
+
# auth_names
|
576
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
577
|
+
|
578
|
+
new_options = opts.merge(
|
579
|
+
:header_params => header_params,
|
580
|
+
:query_params => query_params,
|
581
|
+
:form_params => form_params,
|
582
|
+
:body => post_body,
|
583
|
+
:auth_names => auth_names,
|
584
|
+
:return_type => return_type
|
585
|
+
)
|
586
|
+
|
587
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
588
|
+
if @api_client.config.debugging
|
589
|
+
@api_client.config.logger.debug "API called: InventoryApi#get_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
590
|
+
end
|
591
|
+
return data, status_code, headers
|
592
|
+
end
|
593
|
+
|
594
|
+
# Allows you to retrieve the payment terms
|
595
|
+
# @param [Hash] opts the optional parameters
|
596
|
+
# @option opts [String] :page Default is 1 (default to '1')
|
597
|
+
# @option opts [String] :limit Default is 100 (default to '100')
|
598
|
+
# @option opts [String] :id Default is nil
|
599
|
+
# @option opts [String] :name Default is nil
|
600
|
+
# @option opts [String] :method Default is nil
|
601
|
+
# @option opts [Boolean] :is_active Default is nil
|
602
|
+
# @option opts [Boolean] :is_default Default is nil
|
603
|
+
# @return [PaymentTerms]
|
604
|
+
def get_payment_terms(opts = {})
|
605
|
+
data, _status_code, _headers = get_payment_terms_with_http_info(opts)
|
606
|
+
data
|
607
|
+
end
|
608
|
+
|
609
|
+
# Allows you to retrieve the payment terms
|
610
|
+
# @param [Hash] opts the optional parameters
|
611
|
+
# @option opts [String] :page Default is 1
|
612
|
+
# @option opts [String] :limit Default is 100
|
613
|
+
# @option opts [String] :id Default is nil
|
614
|
+
# @option opts [String] :name Default is nil
|
615
|
+
# @option opts [String] :method Default is nil
|
616
|
+
# @option opts [Boolean] :is_active Default is nil
|
617
|
+
# @option opts [Boolean] :is_default Default is nil
|
618
|
+
# @return [Array<(PaymentTerms, Integer, Hash)>] PaymentTerms data, response status code and response headers
|
619
|
+
def get_payment_terms_with_http_info(opts = {})
|
620
|
+
if @api_client.config.debugging
|
621
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.get_payment_terms ...'
|
44
622
|
end
|
45
623
|
# resource path
|
46
|
-
local_var_path = '/
|
624
|
+
local_var_path = '/ref/paymentterm'
|
47
625
|
|
48
626
|
# query parameters
|
49
627
|
query_params = opts[:query_params] || {}
|
50
|
-
query_params[:'
|
628
|
+
query_params[:'Page'] = opts[:'page'] if !opts[:'page'].nil?
|
629
|
+
query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
630
|
+
query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?
|
631
|
+
query_params[:'Name'] = opts[:'name'] if !opts[:'name'].nil?
|
632
|
+
query_params[:'Method'] = opts[:'method'] if !opts[:'method'].nil?
|
633
|
+
query_params[:'IsActive'] = opts[:'is_active'] if !opts[:'is_active'].nil?
|
634
|
+
query_params[:'IsDefault'] = opts[:'is_default'] if !opts[:'is_default'].nil?
|
51
635
|
|
52
636
|
# header parameters
|
53
637
|
header_params = opts[:header_params] || {}
|
54
638
|
# HTTP header 'Accept' (if needed)
|
55
639
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
56
|
-
# HTTP header 'Content-Type'
|
57
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
58
640
|
|
59
641
|
# form parameters
|
60
642
|
form_params = opts[:form_params] || {}
|
61
643
|
|
62
644
|
# http body (model)
|
63
|
-
post_body = opts[:body]
|
645
|
+
post_body = opts[:body]
|
64
646
|
|
65
647
|
# return_type
|
66
|
-
return_type = opts[:return_type] || '
|
648
|
+
return_type = opts[:return_type] || 'PaymentTerms'
|
67
649
|
|
68
650
|
# auth_names
|
69
651
|
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
@@ -77,42 +659,46 @@ module DearInventoryRuby
|
|
77
659
|
:return_type => return_type
|
78
660
|
)
|
79
661
|
|
80
|
-
data, status_code, headers = @api_client.call_api(:
|
662
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
81
663
|
if @api_client.config.debugging
|
82
|
-
@api_client.config.logger.debug "API called: InventoryApi#
|
664
|
+
@api_client.config.logger.debug "API called: InventoryApi#get_payment_terms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
83
665
|
end
|
84
666
|
return data, status_code, headers
|
85
667
|
end
|
86
668
|
|
87
|
-
# Allows you to retrieve the
|
669
|
+
# Allows you to retrieve the taxes
|
88
670
|
# @param [Hash] opts the optional parameters
|
89
671
|
# @option opts [String] :page Default is 1 (default to '1')
|
90
672
|
# @option opts [String] :limit Default is 100 (default to '100')
|
91
673
|
# @option opts [String] :id Default is nil
|
92
674
|
# @option opts [String] :name Default is nil
|
93
|
-
# @option opts [
|
94
|
-
# @option opts [
|
95
|
-
# @
|
96
|
-
|
97
|
-
|
675
|
+
# @option opts [Boolean] :is_active Default is nil
|
676
|
+
# @option opts [Boolean] :is_tax_for_sale Default is nil
|
677
|
+
# @option opts [Boolean] :is_tax_for_purchase Default is nil
|
678
|
+
# @option opts [String] :account Default is nil
|
679
|
+
# @return [Taxes]
|
680
|
+
def get_taxes(opts = {})
|
681
|
+
data, _status_code, _headers = get_taxes_with_http_info(opts)
|
98
682
|
data
|
99
683
|
end
|
100
684
|
|
101
|
-
# Allows you to retrieve the
|
685
|
+
# Allows you to retrieve the taxes
|
102
686
|
# @param [Hash] opts the optional parameters
|
103
687
|
# @option opts [String] :page Default is 1
|
104
688
|
# @option opts [String] :limit Default is 100
|
105
689
|
# @option opts [String] :id Default is nil
|
106
690
|
# @option opts [String] :name Default is nil
|
107
|
-
# @option opts [
|
108
|
-
# @option opts [
|
109
|
-
# @
|
110
|
-
|
691
|
+
# @option opts [Boolean] :is_active Default is nil
|
692
|
+
# @option opts [Boolean] :is_tax_for_sale Default is nil
|
693
|
+
# @option opts [Boolean] :is_tax_for_purchase Default is nil
|
694
|
+
# @option opts [String] :account Default is nil
|
695
|
+
# @return [Array<(Taxes, Integer, Hash)>] Taxes data, response status code and response headers
|
696
|
+
def get_taxes_with_http_info(opts = {})
|
111
697
|
if @api_client.config.debugging
|
112
|
-
@api_client.config.logger.debug 'Calling API: InventoryApi.
|
698
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.get_taxes ...'
|
113
699
|
end
|
114
700
|
# resource path
|
115
|
-
local_var_path = '/
|
701
|
+
local_var_path = '/ref/tax'
|
116
702
|
|
117
703
|
# query parameters
|
118
704
|
query_params = opts[:query_params] || {}
|
@@ -120,8 +706,10 @@ module DearInventoryRuby
|
|
120
706
|
query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
121
707
|
query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?
|
122
708
|
query_params[:'Name'] = opts[:'name'] if !opts[:'name'].nil?
|
123
|
-
query_params[:'
|
124
|
-
query_params[:'
|
709
|
+
query_params[:'IsActive'] = opts[:'is_active'] if !opts[:'is_active'].nil?
|
710
|
+
query_params[:'IsTaxForSale'] = opts[:'is_tax_for_sale'] if !opts[:'is_tax_for_sale'].nil?
|
711
|
+
query_params[:'IsTaxForPurchase'] = opts[:'is_tax_for_purchase'] if !opts[:'is_tax_for_purchase'].nil?
|
712
|
+
query_params[:'Account'] = opts[:'account'] if !opts[:'account'].nil?
|
125
713
|
|
126
714
|
# header parameters
|
127
715
|
header_params = opts[:header_params] || {}
|
@@ -135,7 +723,7 @@ module DearInventoryRuby
|
|
135
723
|
post_body = opts[:body]
|
136
724
|
|
137
725
|
# return_type
|
138
|
-
return_type = opts[:return_type] || '
|
726
|
+
return_type = opts[:return_type] || 'Taxes'
|
139
727
|
|
140
728
|
# auth_names
|
141
729
|
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
@@ -151,15 +739,80 @@ module DearInventoryRuby
|
|
151
739
|
|
152
740
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
153
741
|
if @api_client.config.debugging
|
154
|
-
@api_client.config.logger.debug "API called: InventoryApi#
|
742
|
+
@api_client.config.logger.debug "API called: InventoryApi#get_taxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
743
|
+
end
|
744
|
+
return data, status_code, headers
|
745
|
+
end
|
746
|
+
|
747
|
+
# Allows you to update an Account
|
748
|
+
# @param account [Account] an Account object with properties to update
|
749
|
+
# @param [Hash] opts the optional parameters
|
750
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
751
|
+
# @return [Accounts]
|
752
|
+
def update_account(account, opts = {})
|
753
|
+
data, _status_code, _headers = update_account_with_http_info(account, opts)
|
754
|
+
data
|
755
|
+
end
|
756
|
+
|
757
|
+
# Allows you to update an Account
|
758
|
+
# @param account [Account] an Account object with properties to update
|
759
|
+
# @param [Hash] opts the optional parameters
|
760
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
761
|
+
# @return [Array<(Accounts, Integer, Hash)>] Accounts data, response status code and response headers
|
762
|
+
def update_account_with_http_info(account, opts = {})
|
763
|
+
if @api_client.config.debugging
|
764
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.update_account ...'
|
765
|
+
end
|
766
|
+
# verify the required parameter 'account' is set
|
767
|
+
if @api_client.config.client_side_validation && account.nil?
|
768
|
+
fail ArgumentError, "Missing the required parameter 'account' when calling InventoryApi.update_account"
|
769
|
+
end
|
770
|
+
# resource path
|
771
|
+
local_var_path = '/ref/account'
|
772
|
+
|
773
|
+
# query parameters
|
774
|
+
query_params = opts[:query_params] || {}
|
775
|
+
query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
|
776
|
+
|
777
|
+
# header parameters
|
778
|
+
header_params = opts[:header_params] || {}
|
779
|
+
# HTTP header 'Accept' (if needed)
|
780
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
781
|
+
# HTTP header 'Content-Type'
|
782
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
783
|
+
|
784
|
+
# form parameters
|
785
|
+
form_params = opts[:form_params] || {}
|
786
|
+
|
787
|
+
# http body (model)
|
788
|
+
post_body = opts[:body] || @api_client.object_to_http_body(account)
|
789
|
+
|
790
|
+
# return_type
|
791
|
+
return_type = opts[:return_type] || 'Accounts'
|
792
|
+
|
793
|
+
# auth_names
|
794
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
795
|
+
|
796
|
+
new_options = opts.merge(
|
797
|
+
:header_params => header_params,
|
798
|
+
:query_params => query_params,
|
799
|
+
:form_params => form_params,
|
800
|
+
:body => post_body,
|
801
|
+
:auth_names => auth_names,
|
802
|
+
:return_type => return_type
|
803
|
+
)
|
804
|
+
|
805
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
806
|
+
if @api_client.config.debugging
|
807
|
+
@api_client.config.logger.debug "API called: InventoryApi#update_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
155
808
|
end
|
156
809
|
return data, status_code, headers
|
157
810
|
end
|
158
811
|
|
159
812
|
# Allows you to update a customer
|
160
|
-
# @param customer [Customer] a
|
813
|
+
# @param customer [Customer] a customer object with properties to update
|
161
814
|
# @param [Hash] opts the optional parameters
|
162
|
-
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created
|
815
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
163
816
|
# @return [Customers]
|
164
817
|
def update_customer(customer, opts = {})
|
165
818
|
data, _status_code, _headers = update_customer_with_http_info(customer, opts)
|
@@ -167,9 +820,9 @@ module DearInventoryRuby
|
|
167
820
|
end
|
168
821
|
|
169
822
|
# Allows you to update a customer
|
170
|
-
# @param customer [Customer] a
|
823
|
+
# @param customer [Customer] a customer object with properties to update
|
171
824
|
# @param [Hash] opts the optional parameters
|
172
|
-
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created
|
825
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
173
826
|
# @return [Array<(Customers, Integer, Hash)>] Customers data, response status code and response headers
|
174
827
|
def update_customer_with_http_info(customer, opts = {})
|
175
828
|
if @api_client.config.debugging
|
@@ -220,5 +873,135 @@ module DearInventoryRuby
|
|
220
873
|
end
|
221
874
|
return data, status_code, headers
|
222
875
|
end
|
876
|
+
|
877
|
+
# Allows you to update a payment term
|
878
|
+
# @param payment_term [PaymentTerm] a payment term object with properties to update
|
879
|
+
# @param [Hash] opts the optional parameters
|
880
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
881
|
+
# @return [PaymentTerms]
|
882
|
+
def update_payment_term(payment_term, opts = {})
|
883
|
+
data, _status_code, _headers = update_payment_term_with_http_info(payment_term, opts)
|
884
|
+
data
|
885
|
+
end
|
886
|
+
|
887
|
+
# Allows you to update a payment term
|
888
|
+
# @param payment_term [PaymentTerm] a payment term object with properties to update
|
889
|
+
# @param [Hash] opts the optional parameters
|
890
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
891
|
+
# @return [Array<(PaymentTerms, Integer, Hash)>] PaymentTerms data, response status code and response headers
|
892
|
+
def update_payment_term_with_http_info(payment_term, opts = {})
|
893
|
+
if @api_client.config.debugging
|
894
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.update_payment_term ...'
|
895
|
+
end
|
896
|
+
# verify the required parameter 'payment_term' is set
|
897
|
+
if @api_client.config.client_side_validation && payment_term.nil?
|
898
|
+
fail ArgumentError, "Missing the required parameter 'payment_term' when calling InventoryApi.update_payment_term"
|
899
|
+
end
|
900
|
+
# resource path
|
901
|
+
local_var_path = '/ref/paymentterm'
|
902
|
+
|
903
|
+
# query parameters
|
904
|
+
query_params = opts[:query_params] || {}
|
905
|
+
query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
|
906
|
+
|
907
|
+
# header parameters
|
908
|
+
header_params = opts[:header_params] || {}
|
909
|
+
# HTTP header 'Accept' (if needed)
|
910
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
911
|
+
# HTTP header 'Content-Type'
|
912
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
913
|
+
|
914
|
+
# form parameters
|
915
|
+
form_params = opts[:form_params] || {}
|
916
|
+
|
917
|
+
# http body (model)
|
918
|
+
post_body = opts[:body] || @api_client.object_to_http_body(payment_term)
|
919
|
+
|
920
|
+
# return_type
|
921
|
+
return_type = opts[:return_type] || 'PaymentTerms'
|
922
|
+
|
923
|
+
# auth_names
|
924
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
925
|
+
|
926
|
+
new_options = opts.merge(
|
927
|
+
:header_params => header_params,
|
928
|
+
:query_params => query_params,
|
929
|
+
:form_params => form_params,
|
930
|
+
:body => post_body,
|
931
|
+
:auth_names => auth_names,
|
932
|
+
:return_type => return_type
|
933
|
+
)
|
934
|
+
|
935
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
936
|
+
if @api_client.config.debugging
|
937
|
+
@api_client.config.logger.debug "API called: InventoryApi#update_payment_term\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
938
|
+
end
|
939
|
+
return data, status_code, headers
|
940
|
+
end
|
941
|
+
|
942
|
+
# Allows you to update a tax
|
943
|
+
# @param tax [Tax] a tax object with properties to update
|
944
|
+
# @param [Hash] opts the optional parameters
|
945
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
|
946
|
+
# @return [Taxes]
|
947
|
+
def update_tax(tax, opts = {})
|
948
|
+
data, _status_code, _headers = update_tax_with_http_info(tax, opts)
|
949
|
+
data
|
950
|
+
end
|
951
|
+
|
952
|
+
# Allows you to update a tax
|
953
|
+
# @param tax [Tax] a tax object with properties to update
|
954
|
+
# @param [Hash] opts the optional parameters
|
955
|
+
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
956
|
+
# @return [Array<(Taxes, Integer, Hash)>] Taxes data, response status code and response headers
|
957
|
+
def update_tax_with_http_info(tax, opts = {})
|
958
|
+
if @api_client.config.debugging
|
959
|
+
@api_client.config.logger.debug 'Calling API: InventoryApi.update_tax ...'
|
960
|
+
end
|
961
|
+
# verify the required parameter 'tax' is set
|
962
|
+
if @api_client.config.client_side_validation && tax.nil?
|
963
|
+
fail ArgumentError, "Missing the required parameter 'tax' when calling InventoryApi.update_tax"
|
964
|
+
end
|
965
|
+
# resource path
|
966
|
+
local_var_path = '/ref/tax'
|
967
|
+
|
968
|
+
# query parameters
|
969
|
+
query_params = opts[:query_params] || {}
|
970
|
+
query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
|
971
|
+
|
972
|
+
# header parameters
|
973
|
+
header_params = opts[:header_params] || {}
|
974
|
+
# HTTP header 'Accept' (if needed)
|
975
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
976
|
+
# HTTP header 'Content-Type'
|
977
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
978
|
+
|
979
|
+
# form parameters
|
980
|
+
form_params = opts[:form_params] || {}
|
981
|
+
|
982
|
+
# http body (model)
|
983
|
+
post_body = opts[:body] || @api_client.object_to_http_body(tax)
|
984
|
+
|
985
|
+
# return_type
|
986
|
+
return_type = opts[:return_type] || 'Taxes'
|
987
|
+
|
988
|
+
# auth_names
|
989
|
+
auth_names = opts[:auth_names] || ['accountID', 'appKey']
|
990
|
+
|
991
|
+
new_options = opts.merge(
|
992
|
+
:header_params => header_params,
|
993
|
+
:query_params => query_params,
|
994
|
+
:form_params => form_params,
|
995
|
+
:body => post_body,
|
996
|
+
:auth_names => auth_names,
|
997
|
+
:return_type => return_type
|
998
|
+
)
|
999
|
+
|
1000
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1001
|
+
if @api_client.config.debugging
|
1002
|
+
@api_client.config.logger.debug "API called: InventoryApi#update_tax\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1003
|
+
end
|
1004
|
+
return data, status_code, headers
|
1005
|
+
end
|
223
1006
|
end
|
224
1007
|
end
|