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/InventoryApi.md
CHANGED
@@ -4,17 +4,582 @@ All URIs are relative to *https://inventory.dearsystems.com/ExternalApi/v2*
|
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
|
+
[**create_account**](InventoryApi.md#create_account) | **POST** /ref/account | Allows you to create an Account
|
7
8
|
[**create_customer**](InventoryApi.md#create_customer) | **POST** /customer | Allows you to create a customer
|
9
|
+
[**create_payment_term**](InventoryApi.md#create_payment_term) | **POST** /ref/paymentterm | Allows you to create a payment term
|
10
|
+
[**create_tax**](InventoryApi.md#create_tax) | **POST** /ref/tax | Allows you to create a tax
|
11
|
+
[**delete_account**](InventoryApi.md#delete_account) | **DELETE** /ref/account | Allows you to delete an Account
|
12
|
+
[**delete_payment_term**](InventoryApi.md#delete_payment_term) | **DELETE** /ref/paymentterm | Allows you to delete a payment term
|
13
|
+
[**get_accounts**](InventoryApi.md#get_accounts) | **GET** /ref/account | Allows you to retrieve the Chart of Accounts
|
8
14
|
[**get_customers**](InventoryApi.md#get_customers) | **GET** /customer | Allows you to retrieve the customers
|
15
|
+
[**get_me**](InventoryApi.md#get_me) | **GET** /me | Allows you to retrieve your information
|
16
|
+
[**get_payment_terms**](InventoryApi.md#get_payment_terms) | **GET** /ref/paymentterm | Allows you to retrieve the payment terms
|
17
|
+
[**get_taxes**](InventoryApi.md#get_taxes) | **GET** /ref/tax | Allows you to retrieve the taxes
|
18
|
+
[**update_account**](InventoryApi.md#update_account) | **PUT** /ref/account | Allows you to update an Account
|
9
19
|
[**update_customer**](InventoryApi.md#update_customer) | **PUT** /customer | Allows you to update a customer
|
20
|
+
[**update_payment_term**](InventoryApi.md#update_payment_term) | **PUT** /ref/paymentterm | Allows you to update a payment term
|
21
|
+
[**update_tax**](InventoryApi.md#update_tax) | **PUT** /ref/tax | Allows you to update a tax
|
10
22
|
|
11
23
|
|
12
24
|
|
25
|
+
## create_account
|
26
|
+
|
27
|
+
> Accounts create_account(account, opts)
|
28
|
+
|
29
|
+
Allows you to create an Account
|
30
|
+
|
31
|
+
### Example
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
# load the gem
|
35
|
+
require 'dear-inventory-ruby'
|
36
|
+
# setup authorization
|
37
|
+
DearInventoryRuby.configure do |config|
|
38
|
+
# Configure API key authorization: accountID
|
39
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
40
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
41
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
42
|
+
|
43
|
+
# Configure API key authorization: appKey
|
44
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
45
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
46
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
47
|
+
end
|
48
|
+
|
49
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
50
|
+
account = { "Code": "001", "Status": "ACTIVE", "Name": "Accounts Payable test", "Type": "CURRLIAB", "Description": "Outstanding invoices the company has received from suppliers but has not yet paid at balance date", "Class": "LIABILITY", "SystemAccount": "CREDITORS", } # Account | an Account object with properties to create
|
51
|
+
opts = {
|
52
|
+
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
53
|
+
}
|
54
|
+
|
55
|
+
begin
|
56
|
+
#Allows you to create an Account
|
57
|
+
result = api_instance.create_account(account, opts)
|
58
|
+
p result
|
59
|
+
rescue DearInventoryRuby::ApiError => e
|
60
|
+
puts "Exception when calling InventoryApi->create_account: #{e}"
|
61
|
+
end
|
62
|
+
```
|
63
|
+
|
64
|
+
### Parameters
|
65
|
+
|
66
|
+
|
67
|
+
Name | Type | Description | Notes
|
68
|
+
------------- | ------------- | ------------- | -------------
|
69
|
+
**account** | [**Account**](Account.md)| an Account object with properties to create |
|
70
|
+
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
71
|
+
|
72
|
+
### Return type
|
73
|
+
|
74
|
+
[**Accounts**](Accounts.md)
|
75
|
+
|
76
|
+
### Authorization
|
77
|
+
|
78
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
79
|
+
|
80
|
+
### HTTP request headers
|
81
|
+
|
82
|
+
- **Content-Type**: application/json
|
83
|
+
- **Accept**: application/json
|
84
|
+
|
85
|
+
|
13
86
|
## create_customer
|
14
87
|
|
15
|
-
> Customers create_customer(customer, opts)
|
88
|
+
> Customers create_customer(customer, opts)
|
89
|
+
|
90
|
+
Allows you to create a customer
|
91
|
+
|
92
|
+
### Example
|
93
|
+
|
94
|
+
```ruby
|
95
|
+
# load the gem
|
96
|
+
require 'dear-inventory-ruby'
|
97
|
+
# setup authorization
|
98
|
+
DearInventoryRuby.configure do |config|
|
99
|
+
# Configure API key authorization: accountID
|
100
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
101
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
102
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
103
|
+
|
104
|
+
# Configure API key authorization: appKey
|
105
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
106
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
107
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
108
|
+
end
|
109
|
+
|
110
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
111
|
+
customer = { "Name": "DIISR - Small Business Services customer", "Currency": "AUD", "PaymentTerm": "30 days", "Discount": 0, "TaxRule": "GST Free Exports", "Carrier": "DEFAULT Carrier", "SalesRepresentative": nil, "Location": "Main Warehouse", "Comments": nil, "AccountReceivable": "610", "RevenueAccount": "200", "PriceTier": "Tier 1", "TaxNumber": nil, "AdditionalAttribute1": nil, "AdditionalAttribute2": nil, "AdditionalAttribute3": nil, "AdditionalAttribute4": nil, "AdditionalAttribute5": nil, "AdditionalAttribute6": nil, "AdditionalAttribute7": nil, "AdditionalAttribute8": nil, "AdditionalAttribute9": nil, "AdditionalAttribute10": nil, "AttributeSet": nil, "Tags": nil, "Status": "Active", "Addresses": [ { "ID": "4bc4e423-d8af-454d-a186-4a827c15bd0b", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Line1": "L3, Southbank House", "Line2": "13 Gallery Ave", "City": "Melbourne", "State": "VIC", "Postcode": "3131", "Country": nil, "Type": "Business", "DefaultForType": true }, { "ID": "35cec087-04da-46b5-b3c8-c3a7311f2417", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Line1": "L3, Southbank House", "Line2": "13 Gallery Ave", "City": "Melbourne", "State": "VIC", "Postcode": "3131", "Country": nil, "Type": "Billing", "DefaultForType": true } ], "Contacts": [ { "ID": "1d62f59b-657d-423f-ad95-9ad9ec4f29a3", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Name": "Sheree Bond", "JobTitle": nil, "Phone": "0800 4389376", "MobilePhone": nil, "Fax": "03 4389379", "Email": "accounts@diisr.govt", "Website": nil, "Default": true, "Comment": nil, "IncludeInEmail": false } ] } # Customer | a customer object with properties to create
|
112
|
+
opts = {
|
113
|
+
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
114
|
+
}
|
115
|
+
|
116
|
+
begin
|
117
|
+
#Allows you to create a customer
|
118
|
+
result = api_instance.create_customer(customer, opts)
|
119
|
+
p result
|
120
|
+
rescue DearInventoryRuby::ApiError => e
|
121
|
+
puts "Exception when calling InventoryApi->create_customer: #{e}"
|
122
|
+
end
|
123
|
+
```
|
124
|
+
|
125
|
+
### Parameters
|
126
|
+
|
127
|
+
|
128
|
+
Name | Type | Description | Notes
|
129
|
+
------------- | ------------- | ------------- | -------------
|
130
|
+
**customer** | [**Customer**](Customer.md)| a customer object with properties to create |
|
131
|
+
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
132
|
+
|
133
|
+
### Return type
|
134
|
+
|
135
|
+
[**Customers**](Customers.md)
|
136
|
+
|
137
|
+
### Authorization
|
138
|
+
|
139
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
140
|
+
|
141
|
+
### HTTP request headers
|
142
|
+
|
143
|
+
- **Content-Type**: application/json
|
144
|
+
- **Accept**: application/json
|
145
|
+
|
146
|
+
|
147
|
+
## create_payment_term
|
148
|
+
|
149
|
+
> PaymentTerms create_payment_term(payment_term, opts)
|
150
|
+
|
151
|
+
Allows you to create a payment term
|
152
|
+
|
153
|
+
### Example
|
154
|
+
|
155
|
+
```ruby
|
156
|
+
# load the gem
|
157
|
+
require 'dear-inventory-ruby'
|
158
|
+
# setup authorization
|
159
|
+
DearInventoryRuby.configure do |config|
|
160
|
+
# Configure API key authorization: accountID
|
161
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
162
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
163
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
164
|
+
|
165
|
+
# Configure API key authorization: appKey
|
166
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
167
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
168
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
169
|
+
end
|
170
|
+
|
171
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
172
|
+
payment_term = { "Name": "5 days since end of month", "Duration": 5, "Method": "days since the end of the month", "IsActive": true, "IsDefault": false } # PaymentTerm | a payment term object with properties to create
|
173
|
+
opts = {
|
174
|
+
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
175
|
+
}
|
176
|
+
|
177
|
+
begin
|
178
|
+
#Allows you to create a payment term
|
179
|
+
result = api_instance.create_payment_term(payment_term, opts)
|
180
|
+
p result
|
181
|
+
rescue DearInventoryRuby::ApiError => e
|
182
|
+
puts "Exception when calling InventoryApi->create_payment_term: #{e}"
|
183
|
+
end
|
184
|
+
```
|
185
|
+
|
186
|
+
### Parameters
|
187
|
+
|
188
|
+
|
189
|
+
Name | Type | Description | Notes
|
190
|
+
------------- | ------------- | ------------- | -------------
|
191
|
+
**payment_term** | [**PaymentTerm**](PaymentTerm.md)| a payment term object with properties to create |
|
192
|
+
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
193
|
+
|
194
|
+
### Return type
|
195
|
+
|
196
|
+
[**PaymentTerms**](PaymentTerms.md)
|
197
|
+
|
198
|
+
### Authorization
|
199
|
+
|
200
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
201
|
+
|
202
|
+
### HTTP request headers
|
203
|
+
|
204
|
+
- **Content-Type**: application/json
|
205
|
+
- **Accept**: application/json
|
206
|
+
|
207
|
+
|
208
|
+
## create_tax
|
209
|
+
|
210
|
+
> Taxes create_tax(tax, opts)
|
211
|
+
|
212
|
+
Allows you to create a tax
|
213
|
+
|
214
|
+
### Example
|
215
|
+
|
216
|
+
```ruby
|
217
|
+
# load the gem
|
218
|
+
require 'dear-inventory-ruby'
|
219
|
+
# setup authorization
|
220
|
+
DearInventoryRuby.configure do |config|
|
221
|
+
# Configure API key authorization: accountID
|
222
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
223
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
224
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
225
|
+
|
226
|
+
# Configure API key authorization: appKey
|
227
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
228
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
229
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
230
|
+
end
|
231
|
+
|
232
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
233
|
+
tax = { "Name": "Post test", "Account": "800", "IsActive": true, "TaxInclusive": false, "TaxPercent": 35, "IsTaxForSale": true, "IsTaxForPurchase": true, "Components": [ { "Name": "Tax 1st", "Percent": "10.0000000000", "AccountCode": "800", "Compound": "1", "ComponentOrder": "1" }, { "Name": "Tax 2nd", "Percent": "15.0000000000", "AccountCode": "800", "Compound": "0", "ComponentOrder": "2" } ] } # Tax | a tax object with properties to create
|
234
|
+
opts = {
|
235
|
+
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
236
|
+
}
|
237
|
+
|
238
|
+
begin
|
239
|
+
#Allows you to create a tax
|
240
|
+
result = api_instance.create_tax(tax, opts)
|
241
|
+
p result
|
242
|
+
rescue DearInventoryRuby::ApiError => e
|
243
|
+
puts "Exception when calling InventoryApi->create_tax: #{e}"
|
244
|
+
end
|
245
|
+
```
|
246
|
+
|
247
|
+
### Parameters
|
248
|
+
|
249
|
+
|
250
|
+
Name | Type | Description | Notes
|
251
|
+
------------- | ------------- | ------------- | -------------
|
252
|
+
**tax** | [**Tax**](Tax.md)| a tax object with properties to create |
|
253
|
+
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
254
|
+
|
255
|
+
### Return type
|
256
|
+
|
257
|
+
[**Taxes**](Taxes.md)
|
258
|
+
|
259
|
+
### Authorization
|
260
|
+
|
261
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
262
|
+
|
263
|
+
### HTTP request headers
|
264
|
+
|
265
|
+
- **Content-Type**: application/json
|
266
|
+
- **Accept**: application/json
|
267
|
+
|
268
|
+
|
269
|
+
## delete_account
|
270
|
+
|
271
|
+
> Success delete_account(opts)
|
272
|
+
|
273
|
+
Allows you to delete an Account
|
274
|
+
|
275
|
+
### Example
|
276
|
+
|
277
|
+
```ruby
|
278
|
+
# load the gem
|
279
|
+
require 'dear-inventory-ruby'
|
280
|
+
# setup authorization
|
281
|
+
DearInventoryRuby.configure do |config|
|
282
|
+
# Configure API key authorization: accountID
|
283
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
284
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
285
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
286
|
+
|
287
|
+
# Configure API key authorization: appKey
|
288
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
289
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
290
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
291
|
+
end
|
292
|
+
|
293
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
294
|
+
opts = {
|
295
|
+
code: 'code_example' # String | Default is nil
|
296
|
+
}
|
297
|
+
|
298
|
+
begin
|
299
|
+
#Allows you to delete an Account
|
300
|
+
result = api_instance.delete_account(opts)
|
301
|
+
p result
|
302
|
+
rescue DearInventoryRuby::ApiError => e
|
303
|
+
puts "Exception when calling InventoryApi->delete_account: #{e}"
|
304
|
+
end
|
305
|
+
```
|
306
|
+
|
307
|
+
### Parameters
|
308
|
+
|
309
|
+
|
310
|
+
Name | Type | Description | Notes
|
311
|
+
------------- | ------------- | ------------- | -------------
|
312
|
+
**code** | **String**| Default is nil | [optional]
|
313
|
+
|
314
|
+
### Return type
|
315
|
+
|
316
|
+
[**Success**](Success.md)
|
317
|
+
|
318
|
+
### Authorization
|
319
|
+
|
320
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
321
|
+
|
322
|
+
### HTTP request headers
|
323
|
+
|
324
|
+
- **Content-Type**: Not defined
|
325
|
+
- **Accept**: application/json
|
326
|
+
|
327
|
+
|
328
|
+
## delete_payment_term
|
329
|
+
|
330
|
+
> Success delete_payment_term(opts)
|
331
|
+
|
332
|
+
Allows you to delete a payment term
|
333
|
+
|
334
|
+
### Example
|
335
|
+
|
336
|
+
```ruby
|
337
|
+
# load the gem
|
338
|
+
require 'dear-inventory-ruby'
|
339
|
+
# setup authorization
|
340
|
+
DearInventoryRuby.configure do |config|
|
341
|
+
# Configure API key authorization: accountID
|
342
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
343
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
344
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
345
|
+
|
346
|
+
# Configure API key authorization: appKey
|
347
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
348
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
349
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
350
|
+
end
|
351
|
+
|
352
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
353
|
+
opts = {
|
354
|
+
id: 'id_example' # String | Default is nil
|
355
|
+
}
|
356
|
+
|
357
|
+
begin
|
358
|
+
#Allows you to delete a payment term
|
359
|
+
result = api_instance.delete_payment_term(opts)
|
360
|
+
p result
|
361
|
+
rescue DearInventoryRuby::ApiError => e
|
362
|
+
puts "Exception when calling InventoryApi->delete_payment_term: #{e}"
|
363
|
+
end
|
364
|
+
```
|
365
|
+
|
366
|
+
### Parameters
|
367
|
+
|
368
|
+
|
369
|
+
Name | Type | Description | Notes
|
370
|
+
------------- | ------------- | ------------- | -------------
|
371
|
+
**id** | **String**| Default is nil | [optional]
|
372
|
+
|
373
|
+
### Return type
|
374
|
+
|
375
|
+
[**Success**](Success.md)
|
376
|
+
|
377
|
+
### Authorization
|
378
|
+
|
379
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
380
|
+
|
381
|
+
### HTTP request headers
|
382
|
+
|
383
|
+
- **Content-Type**: Not defined
|
384
|
+
- **Accept**: application/json
|
385
|
+
|
386
|
+
|
387
|
+
## get_accounts
|
388
|
+
|
389
|
+
> Accounts get_accounts(opts)
|
390
|
+
|
391
|
+
Allows you to retrieve the Chart of Accounts
|
392
|
+
|
393
|
+
### Example
|
394
|
+
|
395
|
+
```ruby
|
396
|
+
# load the gem
|
397
|
+
require 'dear-inventory-ruby'
|
398
|
+
# setup authorization
|
399
|
+
DearInventoryRuby.configure do |config|
|
400
|
+
# Configure API key authorization: accountID
|
401
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
402
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
403
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
404
|
+
|
405
|
+
# Configure API key authorization: appKey
|
406
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
407
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
408
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
409
|
+
end
|
410
|
+
|
411
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
412
|
+
opts = {
|
413
|
+
page: '1', # String | Default is 1
|
414
|
+
limit: '100', # String | Default is 100
|
415
|
+
code: 'code_example', # String | Default is nil
|
416
|
+
name: 'name_example', # String | Default is nil
|
417
|
+
type: 'type_example', # String | Default is nil
|
418
|
+
status: 'status_example' # String | Default is nil
|
419
|
+
}
|
420
|
+
|
421
|
+
begin
|
422
|
+
#Allows you to retrieve the Chart of Accounts
|
423
|
+
result = api_instance.get_accounts(opts)
|
424
|
+
p result
|
425
|
+
rescue DearInventoryRuby::ApiError => e
|
426
|
+
puts "Exception when calling InventoryApi->get_accounts: #{e}"
|
427
|
+
end
|
428
|
+
```
|
429
|
+
|
430
|
+
### Parameters
|
431
|
+
|
432
|
+
|
433
|
+
Name | Type | Description | Notes
|
434
|
+
------------- | ------------- | ------------- | -------------
|
435
|
+
**page** | **String**| Default is 1 | [optional] [default to '1']
|
436
|
+
**limit** | **String**| Default is 100 | [optional] [default to '100']
|
437
|
+
**code** | **String**| Default is nil | [optional]
|
438
|
+
**name** | **String**| Default is nil | [optional]
|
439
|
+
**type** | **String**| Default is nil | [optional]
|
440
|
+
**status** | **String**| Default is nil | [optional]
|
441
|
+
|
442
|
+
### Return type
|
443
|
+
|
444
|
+
[**Accounts**](Accounts.md)
|
445
|
+
|
446
|
+
### Authorization
|
447
|
+
|
448
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
449
|
+
|
450
|
+
### HTTP request headers
|
451
|
+
|
452
|
+
- **Content-Type**: Not defined
|
453
|
+
- **Accept**: application/json
|
454
|
+
|
455
|
+
|
456
|
+
## get_customers
|
457
|
+
|
458
|
+
> Customers get_customers(opts)
|
459
|
+
|
460
|
+
Allows you to retrieve the customers
|
461
|
+
|
462
|
+
### Example
|
463
|
+
|
464
|
+
```ruby
|
465
|
+
# load the gem
|
466
|
+
require 'dear-inventory-ruby'
|
467
|
+
# setup authorization
|
468
|
+
DearInventoryRuby.configure do |config|
|
469
|
+
# Configure API key authorization: accountID
|
470
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
471
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
472
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
473
|
+
|
474
|
+
# Configure API key authorization: appKey
|
475
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
476
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
477
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
478
|
+
end
|
479
|
+
|
480
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
481
|
+
opts = {
|
482
|
+
page: '1', # String | Default is 1
|
483
|
+
limit: '100', # String | Default is 100
|
484
|
+
id: 'id_example', # String | Default is nil
|
485
|
+
name: 'name_example', # String | Default is nil
|
486
|
+
modified_since: 'modified_since_example', # String | Default is nil
|
487
|
+
include_deprecated: 'false' # String | Default is false
|
488
|
+
}
|
489
|
+
|
490
|
+
begin
|
491
|
+
#Allows you to retrieve the customers
|
492
|
+
result = api_instance.get_customers(opts)
|
493
|
+
p result
|
494
|
+
rescue DearInventoryRuby::ApiError => e
|
495
|
+
puts "Exception when calling InventoryApi->get_customers: #{e}"
|
496
|
+
end
|
497
|
+
```
|
498
|
+
|
499
|
+
### Parameters
|
16
500
|
|
17
|
-
|
501
|
+
|
502
|
+
Name | Type | Description | Notes
|
503
|
+
------------- | ------------- | ------------- | -------------
|
504
|
+
**page** | **String**| Default is 1 | [optional] [default to '1']
|
505
|
+
**limit** | **String**| Default is 100 | [optional] [default to '100']
|
506
|
+
**id** | **String**| Default is nil | [optional]
|
507
|
+
**name** | **String**| Default is nil | [optional]
|
508
|
+
**modified_since** | **String**| Default is nil | [optional]
|
509
|
+
**include_deprecated** | **String**| Default is false | [optional] [default to 'false']
|
510
|
+
|
511
|
+
### Return type
|
512
|
+
|
513
|
+
[**Customers**](Customers.md)
|
514
|
+
|
515
|
+
### Authorization
|
516
|
+
|
517
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
518
|
+
|
519
|
+
### HTTP request headers
|
520
|
+
|
521
|
+
- **Content-Type**: Not defined
|
522
|
+
- **Accept**: application/json
|
523
|
+
|
524
|
+
|
525
|
+
## get_me
|
526
|
+
|
527
|
+
> Me get_me
|
528
|
+
|
529
|
+
Allows you to retrieve your information
|
530
|
+
|
531
|
+
### Example
|
532
|
+
|
533
|
+
```ruby
|
534
|
+
# load the gem
|
535
|
+
require 'dear-inventory-ruby'
|
536
|
+
# setup authorization
|
537
|
+
DearInventoryRuby.configure do |config|
|
538
|
+
# Configure API key authorization: accountID
|
539
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
540
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
541
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
542
|
+
|
543
|
+
# Configure API key authorization: appKey
|
544
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
545
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
546
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
547
|
+
end
|
548
|
+
|
549
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
550
|
+
|
551
|
+
begin
|
552
|
+
#Allows you to retrieve your information
|
553
|
+
result = api_instance.get_me
|
554
|
+
p result
|
555
|
+
rescue DearInventoryRuby::ApiError => e
|
556
|
+
puts "Exception when calling InventoryApi->get_me: #{e}"
|
557
|
+
end
|
558
|
+
```
|
559
|
+
|
560
|
+
### Parameters
|
561
|
+
|
562
|
+
This endpoint does not need any parameter.
|
563
|
+
|
564
|
+
### Return type
|
565
|
+
|
566
|
+
[**Me**](Me.md)
|
567
|
+
|
568
|
+
### Authorization
|
569
|
+
|
570
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
571
|
+
|
572
|
+
### HTTP request headers
|
573
|
+
|
574
|
+
- **Content-Type**: Not defined
|
575
|
+
- **Accept**: application/json
|
576
|
+
|
577
|
+
|
578
|
+
## get_payment_terms
|
579
|
+
|
580
|
+
> PaymentTerms get_payment_terms(opts)
|
581
|
+
|
582
|
+
Allows you to retrieve the payment terms
|
18
583
|
|
19
584
|
### Example
|
20
585
|
|
@@ -35,17 +600,22 @@ DearInventoryRuby.configure do |config|
|
|
35
600
|
end
|
36
601
|
|
37
602
|
api_instance = DearInventoryRuby::InventoryApi.new
|
38
|
-
customer = { "Name": "DIISR - Small Business Services customer", "Currency": "AUD", "PaymentTerm": "30 days", "Discount": 0, "TaxRule": "GST Free Exports", "Carrier": "DEFAULT Carrier", "SalesRepresentative": nil, "Location": "Main Warehouse", "Comments": nil, "AccountReceivable": "610", "RevenueAccount": "200", "PriceTier": "Tier 1", "TaxNumber": nil, "AdditionalAttribute1": nil, "AdditionalAttribute2": nil, "AdditionalAttribute3": nil, "AdditionalAttribute4": nil, "AdditionalAttribute5": nil, "AdditionalAttribute6": nil, "AdditionalAttribute7": nil, "AdditionalAttribute8": nil, "AdditionalAttribute9": nil, "AdditionalAttribute10": nil, "AttributeSet": nil, "Tags": nil, "Status": "Active", "Addresses": [ { "ID": "4bc4e423-d8af-454d-a186-4a827c15bd0b", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Line1": "L3, Southbank House", "Line2": "13 Gallery Ave", "City": "Melbourne", "State": "VIC", "Postcode": "3131", "Country": nil, "Type": "Business", "DefaultForType": true }, { "ID": "35cec087-04da-46b5-b3c8-c3a7311f2417", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Line1": "L3, Southbank House", "Line2": "13 Gallery Ave", "City": "Melbourne", "State": "VIC", "Postcode": "3131", "Country": nil, "Type": "Billing", "DefaultForType": true } ], "Contacts": [ { "ID": "1d62f59b-657d-423f-ad95-9ad9ec4f29a3", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Name": "Sheree Bond", "JobTitle": nil, "Phone": "0800 4389376", "MobilePhone": nil, "Fax": "03 4389379", "Email": "accounts@diisr.govt", "Website": nil, "Default": true, "Comment": nil, "IncludeInEmail": false } ] } # Customer | a Contact object with properties to create
|
39
603
|
opts = {
|
40
|
-
|
604
|
+
page: '1', # String | Default is 1
|
605
|
+
limit: '100', # String | Default is 100
|
606
|
+
id: 'id_example', # String | Default is nil
|
607
|
+
name: 'name_example', # String | Default is nil
|
608
|
+
method: 'method_example', # String | Default is nil
|
609
|
+
is_active: true, # Boolean | Default is nil
|
610
|
+
is_default: true # Boolean | Default is nil
|
41
611
|
}
|
42
612
|
|
43
613
|
begin
|
44
|
-
#Allows you to
|
45
|
-
result = api_instance.
|
614
|
+
#Allows you to retrieve the payment terms
|
615
|
+
result = api_instance.get_payment_terms(opts)
|
46
616
|
p result
|
47
617
|
rescue DearInventoryRuby::ApiError => e
|
48
|
-
puts "Exception when calling InventoryApi->
|
618
|
+
puts "Exception when calling InventoryApi->get_payment_terms: #{e}"
|
49
619
|
end
|
50
620
|
```
|
51
621
|
|
@@ -54,12 +624,17 @@ end
|
|
54
624
|
|
55
625
|
Name | Type | Description | Notes
|
56
626
|
------------- | ------------- | ------------- | -------------
|
57
|
-
**
|
58
|
-
**
|
627
|
+
**page** | **String**| Default is 1 | [optional] [default to '1']
|
628
|
+
**limit** | **String**| Default is 100 | [optional] [default to '100']
|
629
|
+
**id** | **String**| Default is nil | [optional]
|
630
|
+
**name** | **String**| Default is nil | [optional]
|
631
|
+
**method** | **String**| Default is nil | [optional]
|
632
|
+
**is_active** | **Boolean**| Default is nil | [optional]
|
633
|
+
**is_default** | **Boolean**| Default is nil | [optional]
|
59
634
|
|
60
635
|
### Return type
|
61
636
|
|
62
|
-
[**
|
637
|
+
[**PaymentTerms**](PaymentTerms.md)
|
63
638
|
|
64
639
|
### Authorization
|
65
640
|
|
@@ -67,15 +642,15 @@ Name | Type | Description | Notes
|
|
67
642
|
|
68
643
|
### HTTP request headers
|
69
644
|
|
70
|
-
- **Content-Type**:
|
645
|
+
- **Content-Type**: Not defined
|
71
646
|
- **Accept**: application/json
|
72
647
|
|
73
648
|
|
74
|
-
##
|
649
|
+
## get_taxes
|
75
650
|
|
76
|
-
>
|
651
|
+
> Taxes get_taxes(opts)
|
77
652
|
|
78
|
-
Allows you to retrieve the
|
653
|
+
Allows you to retrieve the taxes
|
79
654
|
|
80
655
|
### Example
|
81
656
|
|
@@ -101,16 +676,18 @@ opts = {
|
|
101
676
|
limit: '100', # String | Default is 100
|
102
677
|
id: 'id_example', # String | Default is nil
|
103
678
|
name: 'name_example', # String | Default is nil
|
104
|
-
|
105
|
-
|
679
|
+
is_active: true, # Boolean | Default is nil
|
680
|
+
is_tax_for_sale: true, # Boolean | Default is nil
|
681
|
+
is_tax_for_purchase: true, # Boolean | Default is nil
|
682
|
+
account: 'account_example' # String | Default is nil
|
106
683
|
}
|
107
684
|
|
108
685
|
begin
|
109
|
-
#Allows you to retrieve the
|
110
|
-
result = api_instance.
|
686
|
+
#Allows you to retrieve the taxes
|
687
|
+
result = api_instance.get_taxes(opts)
|
111
688
|
p result
|
112
689
|
rescue DearInventoryRuby::ApiError => e
|
113
|
-
puts "Exception when calling InventoryApi->
|
690
|
+
puts "Exception when calling InventoryApi->get_taxes: #{e}"
|
114
691
|
end
|
115
692
|
```
|
116
693
|
|
@@ -123,12 +700,14 @@ Name | Type | Description | Notes
|
|
123
700
|
**limit** | **String**| Default is 100 | [optional] [default to '100']
|
124
701
|
**id** | **String**| Default is nil | [optional]
|
125
702
|
**name** | **String**| Default is nil | [optional]
|
126
|
-
**
|
127
|
-
**
|
703
|
+
**is_active** | **Boolean**| Default is nil | [optional]
|
704
|
+
**is_tax_for_sale** | **Boolean**| Default is nil | [optional]
|
705
|
+
**is_tax_for_purchase** | **Boolean**| Default is nil | [optional]
|
706
|
+
**account** | **String**| Default is nil | [optional]
|
128
707
|
|
129
708
|
### Return type
|
130
709
|
|
131
|
-
[**
|
710
|
+
[**Taxes**](Taxes.md)
|
132
711
|
|
133
712
|
### Authorization
|
134
713
|
|
@@ -140,6 +719,67 @@ Name | Type | Description | Notes
|
|
140
719
|
- **Accept**: application/json
|
141
720
|
|
142
721
|
|
722
|
+
## update_account
|
723
|
+
|
724
|
+
> Accounts update_account(account, opts)
|
725
|
+
|
726
|
+
Allows you to update an Account
|
727
|
+
|
728
|
+
### Example
|
729
|
+
|
730
|
+
```ruby
|
731
|
+
# load the gem
|
732
|
+
require 'dear-inventory-ruby'
|
733
|
+
# setup authorization
|
734
|
+
DearInventoryRuby.configure do |config|
|
735
|
+
# Configure API key authorization: accountID
|
736
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
737
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
738
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
739
|
+
|
740
|
+
# Configure API key authorization: appKey
|
741
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
742
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
743
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
744
|
+
end
|
745
|
+
|
746
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
747
|
+
account = { "Code": "001", "Status": "ACTIVE", "Name": "Accounts Payable put test", "Type": "CURRLIAB", "Description": "Put test description", "Class": "LIABILITY", "SystemAccount": "CREDITORS" } # Account | an Account object with properties to update
|
748
|
+
opts = {
|
749
|
+
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
750
|
+
}
|
751
|
+
|
752
|
+
begin
|
753
|
+
#Allows you to update an Account
|
754
|
+
result = api_instance.update_account(account, opts)
|
755
|
+
p result
|
756
|
+
rescue DearInventoryRuby::ApiError => e
|
757
|
+
puts "Exception when calling InventoryApi->update_account: #{e}"
|
758
|
+
end
|
759
|
+
```
|
760
|
+
|
761
|
+
### Parameters
|
762
|
+
|
763
|
+
|
764
|
+
Name | Type | Description | Notes
|
765
|
+
------------- | ------------- | ------------- | -------------
|
766
|
+
**account** | [**Account**](Account.md)| an Account object with properties to update |
|
767
|
+
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
768
|
+
|
769
|
+
### Return type
|
770
|
+
|
771
|
+
[**Accounts**](Accounts.md)
|
772
|
+
|
773
|
+
### Authorization
|
774
|
+
|
775
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
776
|
+
|
777
|
+
### HTTP request headers
|
778
|
+
|
779
|
+
- **Content-Type**: application/json
|
780
|
+
- **Accept**: application/json
|
781
|
+
|
782
|
+
|
143
783
|
## update_customer
|
144
784
|
|
145
785
|
> Customers update_customer(customer, opts)
|
@@ -165,9 +805,9 @@ DearInventoryRuby.configure do |config|
|
|
165
805
|
end
|
166
806
|
|
167
807
|
api_instance = DearInventoryRuby::InventoryApi.new
|
168
|
-
customer = { "ID": "7d6b441a-3067-42b1-9b81-2def95df827b", "Name": "DIISR - Small Business Services customer", "Currency": "AUD", "PaymentTerm": "30 days", "Discount": 0, "TaxRule": "GST Free Exports", "Carrier": "DEFAULT Carrier", "SalesRepresentative": nil, "Location": "Main Warehouse", "Comments": nil, "AccountReceivable": "610", "RevenueAccount": "200", "PriceTier": "Tier 1", "TaxNumber": nil, "AdditionalAttribute1": nil, "AdditionalAttribute2": nil, "AdditionalAttribute3": nil, "AdditionalAttribute4": nil, "AdditionalAttribute5": nil, "AdditionalAttribute6": nil, "AdditionalAttribute7": nil, "AdditionalAttribute8": nil, "AdditionalAttribute9": nil, "AdditionalAttribute10": nil, "AttributeSet": nil, "Tags": nil, "Status": "Active", "Addresses": [ { "ID": "4bc4e423-d8af-454d-a186-4a827c15bd0b", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Line1": "L3, Southbank House", "Line2": "13 Gallery Ave", "City": "Melbourne", "State": "VIC", "Postcode": "3131", "Country": nil, "Type": "Business", "DefaultForType": true }, { "ID": "35cec087-04da-46b5-b3c8-c3a7311f2417", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Line1": "L3, Southbank House", "Line2": "13 Gallery Ave", "City": "Melbourne", "State": "VIC", "Postcode": "3131", "Country": nil, "Type": "Billing", "DefaultForType": true } ], "Contacts": [ { "ID": "1d62f59b-657d-423f-ad95-9ad9ec4f29a3", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Name": "Sheree Bond", "JobTitle": nil, "Phone": "0800 4389376", "MobilePhone": nil, "Fax": "03 4389379", "Email": "accounts@diisr.govt", "Website": nil, "Default": true, "Comment": nil, "IncludeInEmail": false } ] } # Customer | a
|
808
|
+
customer = { "ID": "7d6b441a-3067-42b1-9b81-2def95df827b", "Name": "DIISR - Small Business Services customer", "Currency": "AUD", "PaymentTerm": "30 days", "Discount": 0, "TaxRule": "GST Free Exports", "Carrier": "DEFAULT Carrier", "SalesRepresentative": nil, "Location": "Main Warehouse", "Comments": nil, "AccountReceivable": "610", "RevenueAccount": "200", "PriceTier": "Tier 1", "TaxNumber": nil, "AdditionalAttribute1": nil, "AdditionalAttribute2": nil, "AdditionalAttribute3": nil, "AdditionalAttribute4": nil, "AdditionalAttribute5": nil, "AdditionalAttribute6": nil, "AdditionalAttribute7": nil, "AdditionalAttribute8": nil, "AdditionalAttribute9": nil, "AdditionalAttribute10": nil, "AttributeSet": nil, "Tags": nil, "Status": "Active", "Addresses": [ { "ID": "4bc4e423-d8af-454d-a186-4a827c15bd0b", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Line1": "L3, Southbank House", "Line2": "13 Gallery Ave", "City": "Melbourne", "State": "VIC", "Postcode": "3131", "Country": nil, "Type": "Business", "DefaultForType": true }, { "ID": "35cec087-04da-46b5-b3c8-c3a7311f2417", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Line1": "L3, Southbank House", "Line2": "13 Gallery Ave", "City": "Melbourne", "State": "VIC", "Postcode": "3131", "Country": nil, "Type": "Billing", "DefaultForType": true } ], "Contacts": [ { "ID": "1d62f59b-657d-423f-ad95-9ad9ec4f29a3", "CustomerID": "4978c3ff-4382-4045-819b-2971480ddaf1", "Name": "Sheree Bond", "JobTitle": nil, "Phone": "0800 4389376", "MobilePhone": nil, "Fax": "03 4389379", "Email": "accounts@diisr.govt", "Website": nil, "Default": true, "Comment": nil, "IncludeInEmail": false } ] } # Customer | a customer object with properties to update
|
169
809
|
opts = {
|
170
|
-
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created
|
810
|
+
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
171
811
|
}
|
172
812
|
|
173
813
|
begin
|
@@ -184,8 +824,8 @@ end
|
|
184
824
|
|
185
825
|
Name | Type | Description | Notes
|
186
826
|
------------- | ------------- | ------------- | -------------
|
187
|
-
**customer** | [**Customer**](Customer.md)| a
|
188
|
-
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created
|
827
|
+
**customer** | [**Customer**](Customer.md)| a customer object with properties to update |
|
828
|
+
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
189
829
|
|
190
830
|
### Return type
|
191
831
|
|
@@ -200,3 +840,125 @@ Name | Type | Description | Notes
|
|
200
840
|
- **Content-Type**: application/json
|
201
841
|
- **Accept**: application/json
|
202
842
|
|
843
|
+
|
844
|
+
## update_payment_term
|
845
|
+
|
846
|
+
> PaymentTerms update_payment_term(payment_term, opts)
|
847
|
+
|
848
|
+
Allows you to update a payment term
|
849
|
+
|
850
|
+
### Example
|
851
|
+
|
852
|
+
```ruby
|
853
|
+
# load the gem
|
854
|
+
require 'dear-inventory-ruby'
|
855
|
+
# setup authorization
|
856
|
+
DearInventoryRuby.configure do |config|
|
857
|
+
# Configure API key authorization: accountID
|
858
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
859
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
860
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
861
|
+
|
862
|
+
# Configure API key authorization: appKey
|
863
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
864
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
865
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
866
|
+
end
|
867
|
+
|
868
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
869
|
+
payment_term = { "ID": "e6c25fa9-bb14-45b2-afe7-428e454663ef", "Name": "10 days since end of month", "Duration": 10, "Method": "days since the end of the month", "IsActive": true, "IsDefault": true } # PaymentTerm | a payment term object with properties to update
|
870
|
+
opts = {
|
871
|
+
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
872
|
+
}
|
873
|
+
|
874
|
+
begin
|
875
|
+
#Allows you to update a payment term
|
876
|
+
result = api_instance.update_payment_term(payment_term, opts)
|
877
|
+
p result
|
878
|
+
rescue DearInventoryRuby::ApiError => e
|
879
|
+
puts "Exception when calling InventoryApi->update_payment_term: #{e}"
|
880
|
+
end
|
881
|
+
```
|
882
|
+
|
883
|
+
### Parameters
|
884
|
+
|
885
|
+
|
886
|
+
Name | Type | Description | Notes
|
887
|
+
------------- | ------------- | ------------- | -------------
|
888
|
+
**payment_term** | [**PaymentTerm**](PaymentTerm.md)| a payment term object with properties to update |
|
889
|
+
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
890
|
+
|
891
|
+
### Return type
|
892
|
+
|
893
|
+
[**PaymentTerms**](PaymentTerms.md)
|
894
|
+
|
895
|
+
### Authorization
|
896
|
+
|
897
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
898
|
+
|
899
|
+
### HTTP request headers
|
900
|
+
|
901
|
+
- **Content-Type**: application/json
|
902
|
+
- **Accept**: application/json
|
903
|
+
|
904
|
+
|
905
|
+
## update_tax
|
906
|
+
|
907
|
+
> Taxes update_tax(tax, opts)
|
908
|
+
|
909
|
+
Allows you to update a tax
|
910
|
+
|
911
|
+
### Example
|
912
|
+
|
913
|
+
```ruby
|
914
|
+
# load the gem
|
915
|
+
require 'dear-inventory-ruby'
|
916
|
+
# setup authorization
|
917
|
+
DearInventoryRuby.configure do |config|
|
918
|
+
# Configure API key authorization: accountID
|
919
|
+
config.api_key['api-auth-accountid'] = 'YOUR API KEY'
|
920
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
921
|
+
#config.api_key_prefix['api-auth-accountid'] = 'Bearer'
|
922
|
+
|
923
|
+
# Configure API key authorization: appKey
|
924
|
+
config.api_key['api-auth-applicationkey'] = 'YOUR API KEY'
|
925
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
926
|
+
#config.api_key_prefix['api-auth-applicationkey'] = 'Bearer'
|
927
|
+
end
|
928
|
+
|
929
|
+
api_instance = DearInventoryRuby::InventoryApi.new
|
930
|
+
tax = { "ID": "24551562-ebd1-4294-a04a-3ab258f5e541", "Name": "PUT test", "Account": "800", "IsActive": true, "TaxInclusive": false, "TaxPercent": 55, "IsTaxForSale": true, "IsTaxForPurchase": true, "Components": [ { "ID": "0119E1C0-504A-429B-B4E2-4EEC02A9E88A", "Name": "Tax 1st", "Percent": "20.0000000000", "AccountCode": "800", "Compound": "1", "ComponentOrder": "1" }, { "ID": "0B6D5C0F-D8EF-41FF-86D2-A05E5616FC61", "Name": "Tax 2nd", "Percent": "35.0000000000", "AccountCode": "800", "Compound": "0", "ComponentOrder": "2" } ] } # Tax | a tax object with properties to update
|
931
|
+
opts = {
|
932
|
+
summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
|
933
|
+
}
|
934
|
+
|
935
|
+
begin
|
936
|
+
#Allows you to update a tax
|
937
|
+
result = api_instance.update_tax(tax, opts)
|
938
|
+
p result
|
939
|
+
rescue DearInventoryRuby::ApiError => e
|
940
|
+
puts "Exception when calling InventoryApi->update_tax: #{e}"
|
941
|
+
end
|
942
|
+
```
|
943
|
+
|
944
|
+
### Parameters
|
945
|
+
|
946
|
+
|
947
|
+
Name | Type | Description | Notes
|
948
|
+
------------- | ------------- | ------------- | -------------
|
949
|
+
**tax** | [**Tax**](Tax.md)| a tax object with properties to update |
|
950
|
+
**summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created objects and any with validation errors | [optional] [default to false]
|
951
|
+
|
952
|
+
### Return type
|
953
|
+
|
954
|
+
[**Taxes**](Taxes.md)
|
955
|
+
|
956
|
+
### Authorization
|
957
|
+
|
958
|
+
[accountID](../README.md#accountID), [appKey](../README.md#appKey)
|
959
|
+
|
960
|
+
### HTTP request headers
|
961
|
+
|
962
|
+
- **Content-Type**: application/json
|
963
|
+
- **Accept**: application/json
|
964
|
+
|