dear-inventory-ruby 0.1.7 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/Gemfile +1 -1
  4. data/README.md +11 -4
  5. data/dear-inventory-ruby.gemspec +1 -1
  6. data/docs/Account.md +18 -16
  7. data/docs/Accounts.md +3 -3
  8. data/docs/Address.md +9 -9
  9. data/docs/Contact.md +13 -9
  10. data/docs/Customer.md +33 -31
  11. data/docs/Customers.md +3 -3
  12. data/docs/DimensionsUnit.md +16 -0
  13. data/docs/Error.md +2 -2
  14. data/docs/InventoryApi.md +108 -0
  15. data/docs/Me.md +29 -0
  16. data/docs/PaymentTerm.md +6 -6
  17. data/docs/PaymentTerms.md +3 -3
  18. data/docs/PriceTier.md +19 -0
  19. data/docs/PriceTiers.md +17 -0
  20. data/docs/Success.md +1 -1
  21. data/docs/Tax.md +9 -9
  22. data/docs/TaxComponent.md +4 -4
  23. data/docs/Taxes.md +3 -3
  24. data/docs/WeightUnit.md +16 -0
  25. data/lib/dear-inventory-ruby.rb +6 -1
  26. data/lib/dear-inventory-ruby/api/inventory_api.rb +109 -1
  27. data/lib/dear-inventory-ruby/api_client.rb +8 -6
  28. data/lib/dear-inventory-ruby/api_error.rb +1 -1
  29. data/lib/dear-inventory-ruby/configuration.rb +1 -1
  30. data/lib/dear-inventory-ruby/models/account.rb +23 -23
  31. data/lib/dear-inventory-ruby/models/accounts.rb +1 -1
  32. data/lib/dear-inventory-ruby/models/address.rb +1 -35
  33. data/lib/dear-inventory-ruby/models/contact.rb +22 -2
  34. data/lib/dear-inventory-ruby/models/currency_code.rb +1 -1
  35. data/lib/dear-inventory-ruby/models/customer.rb +19 -7
  36. data/lib/dear-inventory-ruby/models/customers.rb +1 -1
  37. data/lib/dear-inventory-ruby/models/dimensions_unit.rb +42 -0
  38. data/lib/dear-inventory-ruby/models/error.rb +1 -1
  39. data/lib/dear-inventory-ruby/models/me.rb +264 -0
  40. data/lib/dear-inventory-ruby/models/payment_term.rb +1 -1
  41. data/lib/dear-inventory-ruby/models/payment_terms.rb +1 -1
  42. data/lib/dear-inventory-ruby/models/price_tier.rb +217 -0
  43. data/lib/dear-inventory-ruby/models/price_tiers.rb +209 -0
  44. data/lib/dear-inventory-ruby/models/success.rb +1 -1
  45. data/lib/dear-inventory-ruby/models/tax.rb +1 -1
  46. data/lib/dear-inventory-ruby/models/tax_component.rb +1 -1
  47. data/lib/dear-inventory-ruby/models/taxes.rb +1 -1
  48. data/lib/dear-inventory-ruby/models/weight_unit.rb +39 -0
  49. data/lib/dear-inventory-ruby/version.rb +2 -2
  50. data/spec/api/inventory_api_spec.rb +21 -1
  51. data/spec/api_client_spec.rb +2 -2
  52. data/spec/configuration_spec.rb +1 -1
  53. data/spec/models/account_spec.rb +7 -9
  54. data/spec/models/accounts_spec.rb +1 -1
  55. data/spec/models/address_spec.rb +1 -5
  56. data/spec/models/contact_spec.rb +13 -1
  57. data/spec/models/currency_code_spec.rb +1 -1
  58. data/spec/models/customer_spec.rb +7 -1
  59. data/spec/models/customers_spec.rb +1 -1
  60. data/spec/models/dimensions_unit_spec.rb +35 -0
  61. data/spec/models/error_spec.rb +1 -1
  62. data/spec/models/me_spec.rb +77 -0
  63. data/spec/models/payment_term_spec.rb +1 -1
  64. data/spec/models/payment_terms_spec.rb +1 -1
  65. data/spec/models/price_tier_spec.rb +47 -0
  66. data/spec/models/price_tiers_spec.rb +41 -0
  67. data/spec/models/success_spec.rb +1 -1
  68. data/spec/models/tax_component_spec.rb +1 -1
  69. data/spec/models/tax_spec.rb +1 -1
  70. data/spec/models/taxes_spec.rb +1 -1
  71. data/spec/models/weight_unit_spec.rb +35 -0
  72. data/spec/spec_helper.rb +1 -1
  73. metadata +35 -15
@@ -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
+
@@ -16,12 +16,12 @@ Name | Type | Description | Notes
16
16
  ```ruby
17
17
  require 'DearInventoryRuby'
18
18
 
19
- instance = DearInventoryRuby::PaymentTerm.new(id: null,
20
- name: null,
21
- duration: null,
22
- method: null,
23
- is_active: null,
24
- is_default: null)
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
25
  ```
26
26
 
27
27
 
@@ -13,9 +13,9 @@ Name | Type | Description | Notes
13
13
  ```ruby
14
14
  require 'DearInventoryRuby'
15
15
 
16
- instance = DearInventoryRuby::PaymentTerms.new(total: null,
17
- page: null,
18
- payment_term_list: null)
16
+ instance = DearInventoryRuby::PaymentTerms.new(total: nil,
17
+ page: nil,
18
+ payment_term_list: nil)
19
19
  ```
20
20
 
21
21
 
@@ -0,0 +1,19 @@
1
+ # DearInventoryRuby::PriceTier
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **code** | **Integer** | Code number of Price Tier | [optional]
8
+ **name** | **String** | Price Tier name | [optional]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'DearInventoryRuby'
14
+
15
+ instance = DearInventoryRuby::PriceTier.new(code: nil,
16
+ name: nil)
17
+ ```
18
+
19
+
@@ -0,0 +1,17 @@
1
+ # DearInventoryRuby::PriceTiers
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **price_tiers_list** | [**Array<PriceTier>**](PriceTier.md) | Array of PriceTiers | [optional]
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'DearInventoryRuby'
13
+
14
+ instance = DearInventoryRuby::PriceTiers.new(price_tiers_list: nil)
15
+ ```
16
+
17
+
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
11
11
  ```ruby
12
12
  require 'DearInventoryRuby'
13
13
 
14
- instance = DearInventoryRuby::Success.new(success: null)
14
+ instance = DearInventoryRuby::Success.new(success: nil)
15
15
  ```
16
16
 
17
17
 
@@ -19,15 +19,15 @@ Name | Type | Description | Notes
19
19
  ```ruby
20
20
  require 'DearInventoryRuby'
21
21
 
22
- instance = DearInventoryRuby::Tax.new(id: null,
23
- name: null,
24
- account: null,
25
- is_active: null,
26
- tax_inclusive: null,
27
- tax_percent: null,
28
- is_tax_for_sale: null,
29
- is_tax_for_purchase: null,
30
- components: null)
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
31
  ```
32
32
 
33
33
 
@@ -14,10 +14,10 @@ Name | Type | Description | Notes
14
14
  ```ruby
15
15
  require 'DearInventoryRuby'
16
16
 
17
- instance = DearInventoryRuby::TaxComponent.new(name: null,
18
- percent: null,
19
- account_code: null,
20
- component_order: null)
17
+ instance = DearInventoryRuby::TaxComponent.new(name: nil,
18
+ percent: nil,
19
+ account_code: nil,
20
+ component_order: nil)
21
21
  ```
22
22
 
23
23
 
@@ -13,9 +13,9 @@ Name | Type | Description | Notes
13
13
  ```ruby
14
14
  require 'DearInventoryRuby'
15
15
 
16
- instance = DearInventoryRuby::Taxes.new(total: null,
17
- page: null,
18
- tax_rule_list: null)
16
+ instance = DearInventoryRuby::Taxes.new(total: nil,
17
+ page: nil,
18
+ tax_rule_list: nil)
19
19
  ```
20
20
 
21
21
 
@@ -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
+
@@ -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.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -24,13 +24,18 @@ require 'dear-inventory-ruby/models/contact'
24
24
  require 'dear-inventory-ruby/models/currency_code'
25
25
  require 'dear-inventory-ruby/models/customer'
26
26
  require 'dear-inventory-ruby/models/customers'
27
+ require 'dear-inventory-ruby/models/dimensions_unit'
27
28
  require 'dear-inventory-ruby/models/error'
29
+ require 'dear-inventory-ruby/models/me'
28
30
  require 'dear-inventory-ruby/models/payment_term'
29
31
  require 'dear-inventory-ruby/models/payment_terms'
32
+ require 'dear-inventory-ruby/models/price_tier'
33
+ require 'dear-inventory-ruby/models/price_tiers'
30
34
  require 'dear-inventory-ruby/models/success'
31
35
  require 'dear-inventory-ruby/models/tax'
32
36
  require 'dear-inventory-ruby/models/tax_component'
33
37
  require 'dear-inventory-ruby/models/taxes'
38
+ require 'dear-inventory-ruby/models/weight_unit'
34
39
 
35
40
  # APIs
36
41
  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.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -537,6 +537,60 @@ module DearInventoryRuby
537
537
  return data, status_code, headers
538
538
  end
539
539
 
540
+ # Allows you to retrieve your information
541
+ # @param [Hash] opts the optional parameters
542
+ # @return [Me]
543
+ def get_me(opts = {})
544
+ data, _status_code, _headers = get_me_with_http_info(opts)
545
+ data
546
+ end
547
+
548
+ # Allows you to retrieve your information
549
+ # @param [Hash] opts the optional parameters
550
+ # @return [Array<(Me, Integer, Hash)>] Me data, response status code and response headers
551
+ def get_me_with_http_info(opts = {})
552
+ if @api_client.config.debugging
553
+ @api_client.config.logger.debug 'Calling API: InventoryApi.get_me ...'
554
+ end
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
+
540
594
  # Allows you to retrieve the payment terms
541
595
  # @param [Hash] opts the optional parameters
542
596
  # @option opts [String] :page Default is 1 (default to '1')
@@ -612,6 +666,60 @@ module DearInventoryRuby
612
666
  return data, status_code, headers
613
667
  end
614
668
 
669
+ # Allows you to retrieve the Price Tiers
670
+ # @param [Hash] opts the optional parameters
671
+ # @return [PriceTiers]
672
+ def get_price_tiers(opts = {})
673
+ data, _status_code, _headers = get_price_tiers_with_http_info(opts)
674
+ data
675
+ end
676
+
677
+ # Allows you to retrieve the Price Tiers
678
+ # @param [Hash] opts the optional parameters
679
+ # @return [Array<(PriceTiers, Integer, Hash)>] PriceTiers data, response status code and response headers
680
+ def get_price_tiers_with_http_info(opts = {})
681
+ if @api_client.config.debugging
682
+ @api_client.config.logger.debug 'Calling API: InventoryApi.get_price_tiers ...'
683
+ end
684
+ # resource path
685
+ local_var_path = '/ref/priceTier'
686
+
687
+ # query parameters
688
+ query_params = opts[:query_params] || {}
689
+
690
+ # header parameters
691
+ header_params = opts[:header_params] || {}
692
+ # HTTP header 'Accept' (if needed)
693
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
694
+
695
+ # form parameters
696
+ form_params = opts[:form_params] || {}
697
+
698
+ # http body (model)
699
+ post_body = opts[:body]
700
+
701
+ # return_type
702
+ return_type = opts[:return_type] || 'PriceTiers'
703
+
704
+ # auth_names
705
+ auth_names = opts[:auth_names] || ['accountID', 'appKey']
706
+
707
+ new_options = opts.merge(
708
+ :header_params => header_params,
709
+ :query_params => query_params,
710
+ :form_params => form_params,
711
+ :body => post_body,
712
+ :auth_names => auth_names,
713
+ :return_type => return_type
714
+ )
715
+
716
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
717
+ if @api_client.config.debugging
718
+ @api_client.config.logger.debug "API called: InventoryApi#get_price_tiers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
719
+ end
720
+ return data, status_code, headers
721
+ end
722
+
615
723
  # Allows you to retrieve the taxes
616
724
  # @param [Hash] opts the optional parameters
617
725
  # @option opts [String] :page Default is 1 (default to '1')
@@ -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.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -287,11 +287,13 @@ module DearInventoryRuby
287
287
  tempfile.write(chunk)
288
288
  end
289
289
  request.on_complete do |response|
290
- tempfile.close if tempfile
291
- @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
292
- "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
293
- "will be deleted automatically with GC. It's also recommended to delete the temp file "\
294
- "explicitly with `tempfile.delete`"
290
+ if tempfile
291
+ tempfile.close
292
+ @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
293
+ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
294
+ "will be deleted automatically with GC. It's also recommended to delete the temp file "\
295
+ "explicitly with `tempfile.delete`"
296
+ end
295
297
  end
296
298
  end
297
299
 
@@ -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.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -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.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -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.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -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