dear-inventory-ruby 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/docs/Account.md +4 -2
- data/lib/dear-inventory-ruby/models/account.rb +22 -22
- data/lib/dear-inventory-ruby/version.rb +1 -1
- data/spec/models/account_spec.rb +6 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08b171f5661cd11f44abba7fb3baafaa42e3348db4c57f519181a78916a7c179'
|
4
|
+
data.tar.gz: 2afb2457cce6dafe81007899a281df7bd2043f1199591774d9eeef4c8c2f730e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e223e254efdfae01f7b8ec0f714fdb02f317f722d3f17d63bf977b3515b77340303e18975365621aafb75988be5f8d1e9da84cd64720f00d422433c8b67ebb19
|
7
|
+
data.tar.gz: 4bf4faf0dfcb47e58cd2f66f85d3b4479801cc3cf70464fd029d94be4c9ff73f8c6eb8ff238e05f99d327c90778f3289bd6d39bf8723fbd8251937e5d9766431
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ This specifing endpoints for DEAR Inventory API
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: 2.0.0
|
10
|
-
- Package version: 0.1.
|
10
|
+
- Package version: 0.1.8
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [https://www.nnhan.me](https://www.nnhan.me)
|
13
13
|
|
@@ -24,16 +24,16 @@ gem build dear-inventory-ruby.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./dear-inventory-ruby-0.1.
|
27
|
+
gem install ./dear-inventory-ruby-0.1.8.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./dear-inventory-ruby-0.1.
|
30
|
+
(for development, run `gem install --dev ./dear-inventory-ruby-0.1.8.gem` to install the development dependencies)
|
31
31
|
|
32
32
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
33
33
|
|
34
34
|
Finally add this to the Gemfile:
|
35
35
|
|
36
|
-
gem 'dear-inventory-ruby', '~> 0.1.
|
36
|
+
gem 'dear-inventory-ruby', '~> 0.1.8'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
data/docs/Account.md
CHANGED
@@ -6,11 +6,12 @@ Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**code** | **String** | Unique code of Account |
|
8
8
|
**name** | **String** | Account Name |
|
9
|
-
**type** | **String** |
|
9
|
+
**type** | **String** | Type |
|
10
10
|
**status** | **String** | Account status |
|
11
11
|
**description** | **String** | Account description | [optional]
|
12
12
|
**_class** | **String** | Should be one of the following values: `ASSET`, `LIABILITY`, `EXPENSE`, `EQUITY`, `REVENUE` | [optional]
|
13
|
-
**system_account** | **String** |
|
13
|
+
**system_account** | **String** | SystemAccount | [optional]
|
14
|
+
**system_account_code** | **String** | SystemAccountCode | [optional]
|
14
15
|
**for_payments** | **String** | Account status | [optional]
|
15
16
|
**display_name** | **String** | Account display name. Read-only. | [optional]
|
16
17
|
**old_code** | **String** | Read-only. | [optional]
|
@@ -31,6 +32,7 @@ instance = DearInventoryRuby::Account.new(code: null,
|
|
31
32
|
description: null,
|
32
33
|
_class: null,
|
33
34
|
system_account: null,
|
35
|
+
system_account_code: null,
|
34
36
|
for_payments: null,
|
35
37
|
display_name: null,
|
36
38
|
old_code: null,
|
@@ -20,7 +20,7 @@ module DearInventoryRuby
|
|
20
20
|
# Account Name
|
21
21
|
attr_accessor :name
|
22
22
|
|
23
|
-
#
|
23
|
+
# Type
|
24
24
|
attr_accessor :type
|
25
25
|
|
26
26
|
# Account status
|
@@ -32,9 +32,12 @@ module DearInventoryRuby
|
|
32
32
|
# Should be one of the following values: `ASSET`, `LIABILITY`, `EXPENSE`, `EQUITY`, `REVENUE`
|
33
33
|
attr_accessor :_class
|
34
34
|
|
35
|
-
#
|
35
|
+
# SystemAccount
|
36
36
|
attr_accessor :system_account
|
37
37
|
|
38
|
+
# SystemAccountCode
|
39
|
+
attr_accessor :system_account_code
|
40
|
+
|
38
41
|
# Account status
|
39
42
|
attr_accessor :for_payments
|
40
43
|
|
@@ -88,6 +91,7 @@ module DearInventoryRuby
|
|
88
91
|
:'description' => :'Description',
|
89
92
|
:'_class' => :'Class',
|
90
93
|
:'system_account' => :'SystemAccount',
|
94
|
+
:'system_account_code' => :'SystemAccountCode',
|
91
95
|
:'for_payments' => :'ForPayments',
|
92
96
|
:'display_name' => :'DisplayName',
|
93
97
|
:'old_code' => :'OldCode',
|
@@ -108,6 +112,7 @@ module DearInventoryRuby
|
|
108
112
|
:'description' => :'String',
|
109
113
|
:'_class' => :'String',
|
110
114
|
:'system_account' => :'String',
|
115
|
+
:'system_account_code' => :'String',
|
111
116
|
:'for_payments' => :'String',
|
112
117
|
:'display_name' => :'String',
|
113
118
|
:'old_code' => :'String',
|
@@ -167,6 +172,10 @@ module DearInventoryRuby
|
|
167
172
|
self.system_account = attributes[:'system_account']
|
168
173
|
end
|
169
174
|
|
175
|
+
if attributes.key?(:'system_account_code')
|
176
|
+
self.system_account_code = attributes[:'system_account_code']
|
177
|
+
end
|
178
|
+
|
170
179
|
if attributes.key?(:'for_payments')
|
171
180
|
self.for_payments = attributes[:'for_payments']
|
172
181
|
end
|
@@ -243,15 +252,11 @@ module DearInventoryRuby
|
|
243
252
|
return false if @name.nil?
|
244
253
|
return false if @name.to_s.length > 256
|
245
254
|
return false if @type.nil?
|
246
|
-
type_validator = EnumAttributeValidator.new('String', ["BANK", "CURRLIAB", "LIABILITY", "TERMLIA", "PAYGLIABILITY", "SUPERANNUATIONLIABILITY", "WAGESPAYABLELIABILITY"])
|
247
|
-
return false unless type_validator.valid?(@type)
|
248
255
|
return false if @type.to_s.length > 50
|
249
256
|
return false if @status.nil?
|
250
257
|
return false if @status.to_s.length > 50
|
251
258
|
_class_validator = EnumAttributeValidator.new('String', ["ASSET", "LIABILITY", "EXPENSE", "EQUITY", "REVENUE"])
|
252
259
|
return false unless _class_validator.valid?(@_class)
|
253
|
-
system_account_validator = EnumAttributeValidator.new('String', ["BANKCURRENCYGAIN", "CREDITORS", "DEBTORS", "GST", "GSTONIMPORTS", "HISTORICAL", "REALISEDCURRENCYGAIN", "RETAINEDEARNINGS", "ROUNDING", "TRACKINGTRANSFERS", "UNPAIDEXPCLM", "UNREALISEDCURRENCYGAIN", "WAGEPAYABLES"])
|
254
|
-
return false unless system_account_validator.valid?(@system_account)
|
255
260
|
true
|
256
261
|
end
|
257
262
|
|
@@ -283,13 +288,17 @@ module DearInventoryRuby
|
|
283
288
|
@name = name
|
284
289
|
end
|
285
290
|
|
286
|
-
# Custom attribute writer method
|
287
|
-
# @param [Object] type
|
291
|
+
# Custom attribute writer method with validation
|
292
|
+
# @param [Object] type Value to be assigned
|
288
293
|
def type=(type)
|
289
|
-
|
290
|
-
|
291
|
-
|
294
|
+
if type.nil?
|
295
|
+
fail ArgumentError, 'type cannot be nil'
|
296
|
+
end
|
297
|
+
|
298
|
+
if type.to_s.length > 50
|
299
|
+
fail ArgumentError, 'invalid value for "type", the character length must be smaller than or equal to 50.'
|
292
300
|
end
|
301
|
+
|
293
302
|
@type = type
|
294
303
|
end
|
295
304
|
|
@@ -317,16 +326,6 @@ module DearInventoryRuby
|
|
317
326
|
@_class = _class
|
318
327
|
end
|
319
328
|
|
320
|
-
# Custom attribute writer method checking allowed values (enum).
|
321
|
-
# @param [Object] system_account Object to be assigned
|
322
|
-
def system_account=(system_account)
|
323
|
-
validator = EnumAttributeValidator.new('String', ["BANKCURRENCYGAIN", "CREDITORS", "DEBTORS", "GST", "GSTONIMPORTS", "HISTORICAL", "REALISEDCURRENCYGAIN", "RETAINEDEARNINGS", "ROUNDING", "TRACKINGTRANSFERS", "UNPAIDEXPCLM", "UNREALISEDCURRENCYGAIN", "WAGEPAYABLES"])
|
324
|
-
unless validator.valid?(system_account)
|
325
|
-
fail ArgumentError, "invalid value for \"system_account\", must be one of #{validator.allowable_values}."
|
326
|
-
end
|
327
|
-
@system_account = system_account
|
328
|
-
end
|
329
|
-
|
330
329
|
# Checks equality by comparing each attribute.
|
331
330
|
# @param [Object] Object to be compared
|
332
331
|
def ==(o)
|
@@ -339,6 +338,7 @@ module DearInventoryRuby
|
|
339
338
|
description == o.description &&
|
340
339
|
_class == o._class &&
|
341
340
|
system_account == o.system_account &&
|
341
|
+
system_account_code == o.system_account_code &&
|
342
342
|
for_payments == o.for_payments &&
|
343
343
|
display_name == o.display_name &&
|
344
344
|
old_code == o.old_code &&
|
@@ -357,7 +357,7 @@ module DearInventoryRuby
|
|
357
357
|
# Calculates hash code according to all attributes.
|
358
358
|
# @return [Integer] Hash code
|
359
359
|
def hash
|
360
|
-
[code, name, type, status, description, _class, system_account, for_payments, display_name, old_code, bank, bank_account_number, bank_account_id, currency].hash
|
360
|
+
[code, name, type, status, description, _class, system_account, system_account_code, for_payments, display_name, old_code, bank, bank_account_number, bank_account_id, currency].hash
|
361
361
|
end
|
362
362
|
|
363
363
|
# Builds the object from hash
|
data/spec/models/account_spec.rb
CHANGED
@@ -47,10 +47,6 @@ describe 'Account' do
|
|
47
47
|
describe 'test attribute "type"' do
|
48
48
|
it 'should work' do
|
49
49
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["BANK", "CURRLIAB", "LIABILITY", "TERMLIA", "PAYGLIABILITY", "SUPERANNUATIONLIABILITY", "WAGESPAYABLELIABILITY"])
|
51
|
-
# validator.allowable_values.each do |value|
|
52
|
-
# expect { @instance.type = value }.not_to raise_error
|
53
|
-
# end
|
54
50
|
end
|
55
51
|
end
|
56
52
|
|
@@ -79,10 +75,12 @@ describe 'Account' do
|
|
79
75
|
describe 'test attribute "system_account"' do
|
80
76
|
it 'should work' do
|
81
77
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
describe 'test attribute "system_account_code"' do
|
82
|
+
it 'should work' do
|
83
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
86
84
|
end
|
87
85
|
end
|
88
86
|
|