dear-inventory-ruby 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ff6fd2166dfaa0d47768c396b6d0950f8641cb4217a9b550fda86a2c10e596a
4
- data.tar.gz: 7c5bb9ac261515780aa137e756c0ed97e61df92bc00bbde6fc5c757565468ada
3
+ metadata.gz: '08b171f5661cd11f44abba7fb3baafaa42e3348db4c57f519181a78916a7c179'
4
+ data.tar.gz: 2afb2457cce6dafe81007899a281df7bd2043f1199591774d9eeef4c8c2f730e
5
5
  SHA512:
6
- metadata.gz: 3a6c9374a87ab7763ff5f8c9c441f9549e4d6fe11850b45aebc7d79d38d024afbdf3f385743a0f531dc1ecbb9996823be3d7d32d40e02f05104f5d4899c03d81
7
- data.tar.gz: 981a79e7bd7061091193f3b0530d40fb9605016594afa38813746ca560a795890a06bf5fd7115fd885d319762504007ccaf7da58b57bdd84777be8e53c2d88c2
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.7
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.7.gem
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.7.gem` to install the development dependencies)
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.7'
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** | Should be one of the following values: `BANK`, `CURRLIAB`, `LIABILITY`, `TERMLIA`, `PAYGLIABILITY`, `SUPERANNUATIONLIABILITY`, `WAGESPAYABLELIABILITY` |
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** | Read-only for PUT. Should be one of the following values: BANKCURRENCYGAIN, CREDITORS, DEBTORS, GST, GSTONIMPORTS, HISTORICAL, REALISEDCURRENCYGAIN, RETAINEDEARNINGS, ROUNDING, TRACKINGTRANSFERS, UNPAIDEXPCLM, UNREALISEDCURRENCYGAIN, WAGEPAYABLES | [optional]
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
- # Should be one of the following values: `BANK`, `CURRLIAB`, `LIABILITY`, `TERMLIA`, `PAYGLIABILITY`, `SUPERANNUATIONLIABILITY`, `WAGESPAYABLELIABILITY`
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
- # Read-only for PUT. Should be one of the following values: BANKCURRENCYGAIN, CREDITORS, DEBTORS, GST, GSTONIMPORTS, HISTORICAL, REALISEDCURRENCYGAIN, RETAINEDEARNINGS, ROUNDING, TRACKINGTRANSFERS, UNPAIDEXPCLM, UNREALISEDCURRENCYGAIN, WAGEPAYABLES
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 checking allowed values (enum).
287
- # @param [Object] type Object to be assigned
291
+ # Custom attribute writer method with validation
292
+ # @param [Object] type Value to be assigned
288
293
  def type=(type)
289
- validator = EnumAttributeValidator.new('String', ["BANK", "CURRLIAB", "LIABILITY", "TERMLIA", "PAYGLIABILITY", "SUPERANNUATIONLIABILITY", "WAGESPAYABLELIABILITY"])
290
- unless validator.valid?(type)
291
- fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
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
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.2.3
11
11
  =end
12
12
 
13
13
  module DearInventoryRuby
14
- VERSION = '0.1.7'
14
+ VERSION = '0.1.8'
15
15
  end
@@ -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
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["BANKCURRENCYGAIN", "CREDITORS", "DEBTORS", "GST", "GSTONIMPORTS", "HISTORICAL", "REALISEDCURRENCYGAIN", "RETAINEDEARNINGS", "ROUNDING", "TRACKINGTRANSFERS", "UNPAIDEXPCLM", "UNREALISEDCURRENCYGAIN", "WAGEPAYABLES"])
83
- # validator.allowable_values.each do |value|
84
- # expect { @instance.system_account = value }.not_to raise_error
85
- # end
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dear-inventory-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nhan Nguyen