dear-inventory-ruby 0.1.6 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +36 -0
  3. data/Gemfile +1 -1
  4. data/README.md +8 -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 +62 -6
  15. data/docs/Me.md +29 -0
  16. data/docs/PaymentTerm.md +6 -6
  17. data/docs/PaymentTerms.md +3 -3
  18. data/docs/Success.md +1 -1
  19. data/docs/Tax.md +9 -9
  20. data/docs/TaxComponent.md +4 -4
  21. data/docs/Taxes.md +3 -3
  22. data/docs/WeightUnit.md +16 -0
  23. data/lib/dear-inventory-ruby.rb +4 -1
  24. data/lib/dear-inventory-ruby/api/inventory_api.rb +66 -9
  25. data/lib/dear-inventory-ruby/api_client.rb +8 -6
  26. data/lib/dear-inventory-ruby/api_error.rb +1 -1
  27. data/lib/dear-inventory-ruby/configuration.rb +1 -1
  28. data/lib/dear-inventory-ruby/models/account.rb +23 -23
  29. data/lib/dear-inventory-ruby/models/accounts.rb +1 -1
  30. data/lib/dear-inventory-ruby/models/address.rb +1 -35
  31. data/lib/dear-inventory-ruby/models/contact.rb +22 -2
  32. data/lib/dear-inventory-ruby/models/currency_code.rb +1 -1
  33. data/lib/dear-inventory-ruby/models/customer.rb +19 -7
  34. data/lib/dear-inventory-ruby/models/customers.rb +1 -1
  35. data/lib/dear-inventory-ruby/models/dimensions_unit.rb +42 -0
  36. data/lib/dear-inventory-ruby/models/error.rb +1 -1
  37. data/lib/dear-inventory-ruby/models/me.rb +264 -0
  38. data/lib/dear-inventory-ruby/models/payment_term.rb +1 -1
  39. data/lib/dear-inventory-ruby/models/payment_terms.rb +1 -1
  40. data/lib/dear-inventory-ruby/models/success.rb +1 -1
  41. data/lib/dear-inventory-ruby/models/tax.rb +1 -1
  42. data/lib/dear-inventory-ruby/models/tax_component.rb +1 -1
  43. data/lib/dear-inventory-ruby/models/taxes.rb +1 -1
  44. data/lib/dear-inventory-ruby/models/weight_unit.rb +39 -0
  45. data/lib/dear-inventory-ruby/version.rb +2 -2
  46. data/spec/api/inventory_api_spec.rb +15 -4
  47. data/spec/api_client_spec.rb +2 -2
  48. data/spec/configuration_spec.rb +1 -1
  49. data/spec/models/account_spec.rb +7 -9
  50. data/spec/models/accounts_spec.rb +1 -1
  51. data/spec/models/address_spec.rb +1 -5
  52. data/spec/models/contact_spec.rb +13 -1
  53. data/spec/models/currency_code_spec.rb +1 -1
  54. data/spec/models/customer_spec.rb +7 -1
  55. data/spec/models/customers_spec.rb +1 -1
  56. data/spec/models/dimensions_unit_spec.rb +35 -0
  57. data/spec/models/error_spec.rb +1 -1
  58. data/spec/models/me_spec.rb +77 -0
  59. data/spec/models/payment_term_spec.rb +1 -1
  60. data/spec/models/payment_terms_spec.rb +1 -1
  61. data/spec/models/success_spec.rb +1 -1
  62. data/spec/models/tax_component_spec.rb +1 -1
  63. data/spec/models/tax_spec.rb +1 -1
  64. data/spec/models/taxes_spec.rb +1 -1
  65. data/spec/models/weight_unit_spec.rb +35 -0
  66. data/spec/spec_helper.rb +1 -1
  67. metadata +27 -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
 
@@ -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,16 @@ 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'
30
32
  require 'dear-inventory-ruby/models/success'
31
33
  require 'dear-inventory-ruby/models/tax'
32
34
  require 'dear-inventory-ruby/models/tax_component'
33
35
  require 'dear-inventory-ruby/models/taxes'
36
+ require 'dear-inventory-ruby/models/weight_unit'
34
37
 
35
38
  # APIs
36
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.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -281,7 +281,7 @@ module DearInventoryRuby
281
281
 
282
282
  # Allows you to delete an Account
283
283
  # @param [Hash] opts the optional parameters
284
- # @option opts [String] :code Code
284
+ # @option opts [String] :code Default is nil
285
285
  # @return [Success]
286
286
  def delete_account(opts = {})
287
287
  data, _status_code, _headers = delete_account_with_http_info(opts)
@@ -290,7 +290,7 @@ module DearInventoryRuby
290
290
 
291
291
  # Allows you to delete an Account
292
292
  # @param [Hash] opts the optional parameters
293
- # @option opts [String] :code Code
293
+ # @option opts [String] :code Default is nil
294
294
  # @return [Array<(Success, Integer, Hash)>] Success data, response status code and response headers
295
295
  def delete_account_with_http_info(opts = {})
296
296
  if @api_client.config.debugging
@@ -397,9 +397,10 @@ module DearInventoryRuby
397
397
  # @param [Hash] opts the optional parameters
398
398
  # @option opts [String] :page Default is 1 (default to '1')
399
399
  # @option opts [String] :limit Default is 100 (default to '100')
400
- # @option opts [String] :id Default is nil
400
+ # @option opts [String] :code Default is nil
401
401
  # @option opts [String] :name Default is nil
402
- # @option opts [String] :bank Default is nil
402
+ # @option opts [String] :type Default is nil
403
+ # @option opts [String] :status Default is nil
403
404
  # @return [Accounts]
404
405
  def get_accounts(opts = {})
405
406
  data, _status_code, _headers = get_accounts_with_http_info(opts)
@@ -410,9 +411,10 @@ module DearInventoryRuby
410
411
  # @param [Hash] opts the optional parameters
411
412
  # @option opts [String] :page Default is 1
412
413
  # @option opts [String] :limit Default is 100
413
- # @option opts [String] :id Default is nil
414
+ # @option opts [String] :code Default is nil
414
415
  # @option opts [String] :name Default is nil
415
- # @option opts [String] :bank Default is nil
416
+ # @option opts [String] :type Default is nil
417
+ # @option opts [String] :status Default is nil
416
418
  # @return [Array<(Accounts, Integer, Hash)>] Accounts data, response status code and response headers
417
419
  def get_accounts_with_http_info(opts = {})
418
420
  if @api_client.config.debugging
@@ -425,9 +427,10 @@ module DearInventoryRuby
425
427
  query_params = opts[:query_params] || {}
426
428
  query_params[:'Page'] = opts[:'page'] if !opts[:'page'].nil?
427
429
  query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
428
- query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?
430
+ query_params[:'Code'] = opts[:'code'] if !opts[:'code'].nil?
429
431
  query_params[:'Name'] = opts[:'name'] if !opts[:'name'].nil?
430
- query_params[:'Bank'] = opts[:'bank'] if !opts[:'bank'].nil?
432
+ query_params[:'Type'] = opts[:'type'] if !opts[:'type'].nil?
433
+ query_params[:'Status'] = opts[:'status'] if !opts[:'status'].nil?
431
434
 
432
435
  # header parameters
433
436
  header_params = opts[:header_params] || {}
@@ -534,6 +537,60 @@ module DearInventoryRuby
534
537
  return data, status_code, headers
535
538
  end
536
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
+
537
594
  # Allows you to retrieve the payment terms
538
595
  # @param [Hash] opts the optional parameters
539
596
  # @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