xero-ruby 12.0.0 → 13.0.0

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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/lib/xero-ruby/api/accounting_api.rb +11 -0
  3. data/lib/xero-ruby/api/finance_api.rb +0 -299
  4. data/lib/xero-ruby/api/payroll_au_v2_api.rb +751 -0
  5. data/lib/xero-ruby/api/payroll_nz_api.rb +0 -86
  6. data/lib/xero-ruby/api/payroll_uk_api.rb +0 -86
  7. data/lib/xero-ruby/models/accounting/contact.rb +27 -1
  8. data/lib/xero-ruby/models/accounting/overpayment.rb +11 -1
  9. data/lib/xero-ruby/models/assets/book_depreciation_detail.rb +54 -4
  10. data/lib/xero-ruby/models/payroll_au/earnings_rate.rb +11 -1
  11. data/lib/xero-ruby/models/payroll_au/employee.rb +1 -13
  12. data/lib/xero-ruby/models/payroll_au/leave_line.rb +11 -1
  13. data/lib/xero-ruby/models/payroll_au/leave_type.rb +14 -4
  14. data/lib/xero-ruby/models/payroll_au/opening_balance_leave_line.rb +232 -0
  15. data/lib/xero-ruby/models/payroll_au/opening_balances.rb +1 -1
  16. data/lib/xero-ruby/models/payroll_au/tax_declaration.rb +14 -4
  17. data/lib/xero-ruby/models/payroll_au_v2/invalid_field.rb +232 -0
  18. data/lib/xero-ruby/models/payroll_au_v2/pagination.rb +252 -0
  19. data/lib/xero-ruby/models/payroll_au_v2/problem.rb +275 -0
  20. data/lib/xero-ruby/models/payroll_au_v2/timesheet.rb +361 -0
  21. data/lib/xero-ruby/models/payroll_au_v2/timesheet_line.rb +277 -0
  22. data/lib/xero-ruby/models/payroll_au_v2/timesheet_line_object.rb +242 -0
  23. data/lib/xero-ruby/models/payroll_au_v2/timesheet_object.rb +242 -0
  24. data/lib/xero-ruby/models/payroll_au_v2/timesheets.rb +244 -0
  25. data/lib/xero-ruby/models/payroll_nz/employee_leave_setup.rb +1 -21
  26. data/lib/xero-ruby/models/payroll_nz/employee_leave_type.rb +3 -13
  27. data/lib/xero-ruby/models/payroll_uk/contract_type.rb +38 -0
  28. data/lib/xero-ruby/models/payroll_uk/contracts.rb +297 -0
  29. data/lib/xero-ruby/models/payroll_uk/developmental_role_details.rb +267 -0
  30. data/lib/xero-ruby/models/payroll_uk/employee.rb +16 -4
  31. data/lib/xero-ruby/models/payroll_uk/employment.rb +16 -4
  32. data/lib/xero-ruby/models/payroll_uk/employment_status.rb +37 -0
  33. data/lib/xero-ruby/version.rb +2 -2
  34. data/lib/xero-ruby.rb +14 -10
  35. data/spec/finance/api/finance_api_spec.rb +0 -53
  36. metadata +379 -385
  37. data/spec/finance/models/account_usage_response_spec.rb +0 -58
  38. data/spec/finance/models/account_usage_spec.rb +0 -112
  39. data/spec/finance/models/history_record_response_spec.rb +0 -64
  40. data/spec/finance/models/lock_history_model_spec.rb +0 -52
  41. data/spec/finance/models/lock_history_response_spec.rb +0 -52
  42. data/spec/finance/models/practice_response_spec.rb +0 -64
  43. data/spec/finance/models/report_history_model_spec.rb +0 -52
  44. data/spec/finance/models/report_history_response_spec.rb +0 -52
  45. data/spec/finance/models/user_activities_response_spec.rb +0 -52
  46. data/spec/finance/models/user_response_spec.rb +0 -106
@@ -5477,92 +5477,6 @@ module XeroRuby
5477
5477
  return data, status_code, headers
5478
5478
  end
5479
5479
 
5480
- # Updates a pay run
5481
- # @param xero_tenant_id [String] Xero identifier for Tenant
5482
- # @param pay_run_id [String] Identifier for the pay run
5483
- # @param pay_run [PayRun]
5484
- # @param [Hash] opts the optional parameters
5485
- # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
5486
- # @return [PayRunObject]
5487
- def update_pay_run(xero_tenant_id, pay_run_id, pay_run, opts = {})
5488
- data, _status_code, _headers = update_pay_run_with_http_info(xero_tenant_id, pay_run_id, pay_run, opts)
5489
- data
5490
- end
5491
-
5492
- # Updates a pay run
5493
- # @param xero_tenant_id [String] Xero identifier for Tenant
5494
- # @param pay_run_id [String] Identifier for the pay run
5495
- # @param pay_run [PayRun]
5496
- # @param [Hash] opts the optional parameters
5497
- # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
5498
- # @return [Array<(PayRunObject, Integer, Hash)>] PayRunObject data, response status code and response headers
5499
- def update_pay_run_with_http_info(xero_tenant_id, pay_run_id, pay_run, options = {})
5500
- opts = options.dup
5501
- if @api_client.config.debugging
5502
- @api_client.config.logger.debug 'Calling API: PayrollNzApi.update_pay_run ...'
5503
- end
5504
- # verify the required parameter 'xero_tenant_id' is set
5505
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
5506
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollNzApi.update_pay_run"
5507
- end
5508
- # verify the required parameter 'pay_run_id' is set
5509
- if @api_client.config.client_side_validation && pay_run_id.nil?
5510
- fail ArgumentError, "Missing the required parameter 'pay_run_id' when calling PayrollNzApi.update_pay_run"
5511
- end
5512
- # verify the required parameter 'pay_run' is set
5513
- if @api_client.config.client_side_validation && pay_run.nil?
5514
- fail ArgumentError, "Missing the required parameter 'pay_run' when calling PayrollNzApi.update_pay_run"
5515
- end
5516
- # resource path
5517
- local_var_path = '/PayRuns/{PayRunID}'.sub('{' + 'PayRunID' + '}', pay_run_id.to_s)
5518
-
5519
- # camelize keys of incoming `where` opts
5520
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
5521
-
5522
- # query parameters
5523
- query_params = opts[:query_params] || {}
5524
-
5525
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
5526
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
5527
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
5528
-
5529
- # header parameters
5530
- header_params = opts[:header_params] || {}
5531
- # HTTP header 'Accept' (if needed)
5532
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
5533
- # HTTP header 'Content-Type'
5534
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
5535
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
5536
- header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
5537
-
5538
- # form parameters
5539
- form_params = opts[:form_params] || {}
5540
-
5541
- # http body (model)
5542
- post_body = opts[:body] || @api_client.object_to_http_body(pay_run)
5543
-
5544
- # return_type
5545
- return_type = opts[:return_type] || 'PayRunObject'
5546
-
5547
- # auth_names
5548
- auth_names = opts[:auth_names] || ['OAuth2']
5549
-
5550
- new_options = opts.merge(
5551
- :header_params => header_params,
5552
- :query_params => query_params,
5553
- :form_params => form_params,
5554
- :body => post_body,
5555
- :auth_names => auth_names,
5556
- :return_type => return_type
5557
- )
5558
-
5559
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "PayrollNzApi", new_options)
5560
- if @api_client.config.debugging
5561
- @api_client.config.logger.debug "API called: PayrollNzApi#update_pay_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
5562
- end
5563
- return data, status_code, headers
5564
- end
5565
-
5566
5480
  # Creates an employee pay slip
5567
5481
  # @param xero_tenant_id [String] Xero identifier for Tenant
5568
5482
  # @param pay_slip_id [String] Identifier for the payslip
@@ -5379,92 +5379,6 @@ module XeroRuby
5379
5379
  return data, status_code, headers
5380
5380
  end
5381
5381
 
5382
- # Updates a specific pay run
5383
- # @param xero_tenant_id [String] Xero identifier for Tenant
5384
- # @param pay_run_id [String] Identifier for the pay run
5385
- # @param pay_run [PayRun]
5386
- # @param [Hash] opts the optional parameters
5387
- # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
5388
- # @return [PayRunObject]
5389
- def update_pay_run(xero_tenant_id, pay_run_id, pay_run, opts = {})
5390
- data, _status_code, _headers = update_pay_run_with_http_info(xero_tenant_id, pay_run_id, pay_run, opts)
5391
- data
5392
- end
5393
-
5394
- # Updates a specific pay run
5395
- # @param xero_tenant_id [String] Xero identifier for Tenant
5396
- # @param pay_run_id [String] Identifier for the pay run
5397
- # @param pay_run [PayRun]
5398
- # @param [Hash] opts the optional parameters
5399
- # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
5400
- # @return [Array<(PayRunObject, Integer, Hash)>] PayRunObject data, response status code and response headers
5401
- def update_pay_run_with_http_info(xero_tenant_id, pay_run_id, pay_run, options = {})
5402
- opts = options.dup
5403
- if @api_client.config.debugging
5404
- @api_client.config.logger.debug 'Calling API: PayrollUkApi.update_pay_run ...'
5405
- end
5406
- # verify the required parameter 'xero_tenant_id' is set
5407
- if @api_client.config.client_side_validation && xero_tenant_id.nil?
5408
- fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling PayrollUkApi.update_pay_run"
5409
- end
5410
- # verify the required parameter 'pay_run_id' is set
5411
- if @api_client.config.client_side_validation && pay_run_id.nil?
5412
- fail ArgumentError, "Missing the required parameter 'pay_run_id' when calling PayrollUkApi.update_pay_run"
5413
- end
5414
- # verify the required parameter 'pay_run' is set
5415
- if @api_client.config.client_side_validation && pay_run.nil?
5416
- fail ArgumentError, "Missing the required parameter 'pay_run' when calling PayrollUkApi.update_pay_run"
5417
- end
5418
- # resource path
5419
- local_var_path = '/PayRuns/{PayRunID}'.sub('{' + 'PayRunID' + '}', pay_run_id.to_s)
5420
-
5421
- # camelize keys of incoming `where` opts
5422
- opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
5423
-
5424
- # query parameters
5425
- query_params = opts[:query_params] || {}
5426
-
5427
- # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
5428
- query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
5429
- query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
5430
-
5431
- # header parameters
5432
- header_params = opts[:header_params] || {}
5433
- # HTTP header 'Accept' (if needed)
5434
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
5435
- # HTTP header 'Content-Type'
5436
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
5437
- header_params[:'Xero-Tenant-Id'] = xero_tenant_id
5438
- header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
5439
-
5440
- # form parameters
5441
- form_params = opts[:form_params] || {}
5442
-
5443
- # http body (model)
5444
- post_body = opts[:body] || @api_client.object_to_http_body(pay_run)
5445
-
5446
- # return_type
5447
- return_type = opts[:return_type] || 'PayRunObject'
5448
-
5449
- # auth_names
5450
- auth_names = opts[:auth_names] || ['OAuth2']
5451
-
5452
- new_options = opts.merge(
5453
- :header_params => header_params,
5454
- :query_params => query_params,
5455
- :form_params => form_params,
5456
- :body => post_body,
5457
- :auth_names => auth_names,
5458
- :return_type => return_type
5459
- )
5460
-
5461
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "PayrollUkApi", new_options)
5462
- if @api_client.config.debugging
5463
- @api_client.config.logger.debug "API called: PayrollUkApi#update_pay_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
5464
- end
5465
- return data, status_code, headers
5466
- end
5467
-
5468
5382
  # Updates a specific timesheet line for a specific timesheet
5469
5383
  # @param xero_tenant_id [String] Xero identifier for Tenant
5470
5384
  # @param timesheet_id [String] Identifier for the timesheet
@@ -58,6 +58,13 @@ module XeroRuby::Accounting
58
58
  # Tax number of contact – this is also known as the ABN (Australia), GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and global) in the Xero UI depending on which regionalized version of Xero you are using (max length = 50)
59
59
  attr_accessor :tax_number
60
60
 
61
+ # Identifier of the regional type of tax number, such as US, UK, or other regional tax identifiers
62
+ attr_accessor :tax_number_type
63
+ SSN ||= "SSN".freeze
64
+ EIN ||= "EIN".freeze
65
+ ITIN ||= "ITIN".freeze
66
+ ATIN ||= "ATIN".freeze
67
+
61
68
  # The tax type from TaxRates
62
69
  attr_accessor :accounts_receivable_tax_type
63
70
 
@@ -189,6 +196,7 @@ module XeroRuby::Accounting
189
196
  :'contact_persons' => :'ContactPersons',
190
197
  :'bank_account_details' => :'BankAccountDetails',
191
198
  :'tax_number' => :'TaxNumber',
199
+ :'tax_number_type' => :'TaxNumberType',
192
200
  :'accounts_receivable_tax_type' => :'AccountsReceivableTaxType',
193
201
  :'accounts_payable_tax_type' => :'AccountsPayableTaxType',
194
202
  :'addresses' => :'Addresses',
@@ -237,6 +245,7 @@ module XeroRuby::Accounting
237
245
  :'contact_persons' => :'Array<ContactPerson>',
238
246
  :'bank_account_details' => :'String',
239
247
  :'tax_number' => :'String',
248
+ :'tax_number_type' => :'String',
240
249
  :'accounts_receivable_tax_type' => :'String',
241
250
  :'accounts_payable_tax_type' => :'String',
242
251
  :'addresses' => :'Array<Address>',
@@ -338,6 +347,10 @@ module XeroRuby::Accounting
338
347
  self.tax_number = attributes[:'tax_number']
339
348
  end
340
349
 
350
+ if attributes.key?(:'tax_number_type')
351
+ self.tax_number_type = attributes[:'tax_number_type']
352
+ end
353
+
341
354
  if attributes.key?(:'accounts_receivable_tax_type')
342
355
  self.accounts_receivable_tax_type = attributes[:'accounts_receivable_tax_type']
343
356
  end
@@ -525,6 +538,8 @@ module XeroRuby::Accounting
525
538
  return false if !@company_number.nil? && @company_number.to_s.length > 50
526
539
  return false if !@email_address.nil? && @email_address.to_s.length > 255
527
540
  return false if !@tax_number.nil? && @tax_number.to_s.length > 50
541
+ tax_number_type_validator = EnumAttributeValidator.new('String', ["SSN", "EIN", "ITIN", "ATIN"])
542
+ return false unless tax_number_type_validator.valid?(@tax_number_type)
528
543
  sales_default_line_amount_type_validator = EnumAttributeValidator.new('String', ["INCLUSIVE", "EXCLUSIVE", "NONE"])
529
544
  return false unless sales_default_line_amount_type_validator.valid?(@sales_default_line_amount_type)
530
545
  purchases_default_line_amount_type_validator = EnumAttributeValidator.new('String', ["INCLUSIVE", "EXCLUSIVE", "NONE"])
@@ -622,6 +637,16 @@ module XeroRuby::Accounting
622
637
  @tax_number = tax_number
623
638
  end
624
639
 
640
+ # Custom attribute writer method checking allowed values (enum).
641
+ # @param [Object] tax_number_type Object to be assigned
642
+ def tax_number_type=(tax_number_type)
643
+ validator = EnumAttributeValidator.new('String', ["SSN", "EIN", "ITIN", "ATIN"])
644
+ unless validator.valid?(tax_number_type)
645
+ fail ArgumentError, "invalid value for \"tax_number_type\", must be one of #{validator.allowable_values}."
646
+ end
647
+ @tax_number_type = tax_number_type
648
+ end
649
+
625
650
  # Custom attribute writer method checking allowed values (enum).
626
651
  # @param [Object] sales_default_line_amount_type Object to be assigned
627
652
  def sales_default_line_amount_type=(sales_default_line_amount_type)
@@ -660,6 +685,7 @@ module XeroRuby::Accounting
660
685
  contact_persons == o.contact_persons &&
661
686
  bank_account_details == o.bank_account_details &&
662
687
  tax_number == o.tax_number &&
688
+ tax_number_type == o.tax_number_type &&
663
689
  accounts_receivable_tax_type == o.accounts_receivable_tax_type &&
664
690
  accounts_payable_tax_type == o.accounts_payable_tax_type &&
665
691
  addresses == o.addresses &&
@@ -700,7 +726,7 @@ module XeroRuby::Accounting
700
726
  # Calculates hash code according to all attributes.
701
727
  # @return [Integer] Hash code
702
728
  def hash
703
- [contact_id, merged_to_contact_id, contact_number, account_number, contact_status, name, first_name, last_name, company_number, email_address, contact_persons, bank_account_details, tax_number, accounts_receivable_tax_type, accounts_payable_tax_type, addresses, phones, is_supplier, is_customer, sales_default_line_amount_type, purchases_default_line_amount_type, default_currency, xero_network_key, sales_default_account_code, purchases_default_account_code, sales_tracking_categories, purchases_tracking_categories, tracking_category_name, tracking_category_option, payment_terms, updated_date_utc, contact_groups, website, branding_theme, batch_payments, discount, balances, attachments, has_attachments, validation_errors, has_validation_errors, status_attribute_string].hash
729
+ [contact_id, merged_to_contact_id, contact_number, account_number, contact_status, name, first_name, last_name, company_number, email_address, contact_persons, bank_account_details, tax_number, tax_number_type, accounts_receivable_tax_type, accounts_payable_tax_type, addresses, phones, is_supplier, is_customer, sales_default_line_amount_type, purchases_default_line_amount_type, default_currency, xero_network_key, sales_default_account_code, purchases_default_account_code, sales_tracking_categories, purchases_tracking_categories, tracking_category_name, tracking_category_option, payment_terms, updated_date_utc, contact_groups, website, branding_theme, batch_payments, discount, balances, attachments, has_attachments, validation_errors, has_validation_errors, status_attribute_string].hash
704
730
  end
705
731
 
706
732
  # Builds the object from hash
@@ -76,6 +76,9 @@ module XeroRuby::Accounting
76
76
  # boolean to indicate if a overpayment has an attachment
77
77
  attr_accessor :has_attachments
78
78
 
79
+ # An optional description for Overpayment
80
+ attr_accessor :reference
81
+
79
82
  # See Attachments
80
83
  attr_accessor :attachments
81
84
 
@@ -122,6 +125,7 @@ module XeroRuby::Accounting
122
125
  :'applied_amount' => :'AppliedAmount',
123
126
  :'payments' => :'Payments',
124
127
  :'has_attachments' => :'HasAttachments',
128
+ :'reference' => :'Reference',
125
129
  :'attachments' => :'Attachments'
126
130
  }
127
131
  end
@@ -147,6 +151,7 @@ module XeroRuby::Accounting
147
151
  :'applied_amount' => :'Float',
148
152
  :'payments' => :'Array<Payment>',
149
153
  :'has_attachments' => :'Boolean',
154
+ :'reference' => :'String',
150
155
  :'attachments' => :'Array<Attachment>'
151
156
  }
152
157
  end
@@ -246,6 +251,10 @@ module XeroRuby::Accounting
246
251
  self.has_attachments = false
247
252
  end
248
253
 
254
+ if attributes.key?(:'reference')
255
+ self.reference = attributes[:'reference']
256
+ end
257
+
249
258
  if attributes.key?(:'attachments')
250
259
  if (value = attributes[:'attachments']).is_a?(Array)
251
260
  self.attachments = value
@@ -313,6 +322,7 @@ module XeroRuby::Accounting
313
322
  applied_amount == o.applied_amount &&
314
323
  payments == o.payments &&
315
324
  has_attachments == o.has_attachments &&
325
+ reference == o.reference &&
316
326
  attachments == o.attachments
317
327
  end
318
328
 
@@ -325,7 +335,7 @@ module XeroRuby::Accounting
325
335
  # Calculates hash code according to all attributes.
326
336
  # @return [Integer] Hash code
327
337
  def hash
328
- [type, contact, date, status, line_amount_types, line_items, sub_total, total_tax, total, updated_date_utc, currency_code, overpayment_id, currency_rate, remaining_credit, allocations, applied_amount, payments, has_attachments, attachments].hash
338
+ [type, contact, date, status, line_amount_types, line_items, sub_total, total_tax, total, updated_date_utc, currency_code, overpayment_id, currency_rate, remaining_credit, allocations, applied_amount, payments, has_attachments, reference, attachments].hash
329
339
  end
330
340
 
331
341
  # Builds the object from hash
@@ -37,6 +37,21 @@ module XeroRuby::Assets
37
37
  # All depreciation occurring in the current financial year.
38
38
  attr_accessor :current_accum_depreciation_amount
39
39
 
40
+ # (New Zealand Orgs Only) The portion of capital gain realised from the disposal of a fixed asset that is attributable to its business use.
41
+ attr_accessor :business_use_capital_gain
42
+
43
+ # (New Zealand Orgs Only) Represents the gain or loss from the disposal of the business use portion of a fixed asset. This value records the financial result (profit or loss) related specifically to the asset’s business use.
44
+ attr_accessor :business_use_current_gain_loss
45
+
46
+ # (New Zealand Orgs Only) The portion of capital gain realised from the disposal of a fixed asset that is attributable to its private (non-business) use.
47
+ attr_accessor :private_use_capital_gain
48
+
49
+ # (New Zealand Orgs Only) Represents the gain or loss from the disposal of the private use portion of a fixed asset. This value records the financial result (profit or loss) related specifically to the asset’s private use.
50
+ attr_accessor :private_use_current_gain_loss
51
+
52
+ # (New Zealand Orgs Only) The Investment Boost deduction percentage.
53
+ attr_accessor :initial_deduction_percentage
54
+
40
55
  # Attribute mapping from ruby-style variable name to JSON key.
41
56
  def self.attribute_map
42
57
  {
@@ -46,7 +61,12 @@ module XeroRuby::Assets
46
61
  :'cost_limit' => :'costLimit',
47
62
  :'residual_value' => :'residualValue',
48
63
  :'prior_accum_depreciation_amount' => :'priorAccumDepreciationAmount',
49
- :'current_accum_depreciation_amount' => :'currentAccumDepreciationAmount'
64
+ :'current_accum_depreciation_amount' => :'currentAccumDepreciationAmount',
65
+ :'business_use_capital_gain' => :'businessUseCapitalGain',
66
+ :'business_use_current_gain_loss' => :'businessUseCurrentGainLoss',
67
+ :'private_use_capital_gain' => :'privateUseCapitalGain',
68
+ :'private_use_current_gain_loss' => :'privateUseCurrentGainLoss',
69
+ :'initial_deduction_percentage' => :'initialDeductionPercentage'
50
70
  }
51
71
  end
52
72
 
@@ -59,7 +79,12 @@ module XeroRuby::Assets
59
79
  :'cost_limit' => :'BigDecimal',
60
80
  :'residual_value' => :'BigDecimal',
61
81
  :'prior_accum_depreciation_amount' => :'BigDecimal',
62
- :'current_accum_depreciation_amount' => :'BigDecimal'
82
+ :'current_accum_depreciation_amount' => :'BigDecimal',
83
+ :'business_use_capital_gain' => :'BigDecimal',
84
+ :'business_use_current_gain_loss' => :'BigDecimal',
85
+ :'private_use_capital_gain' => :'BigDecimal',
86
+ :'private_use_current_gain_loss' => :'BigDecimal',
87
+ :'initial_deduction_percentage' => :'Float'
63
88
  }
64
89
  end
65
90
 
@@ -105,6 +130,26 @@ module XeroRuby::Assets
105
130
  if attributes.key?(:'current_accum_depreciation_amount')
106
131
  self.current_accum_depreciation_amount = attributes[:'current_accum_depreciation_amount']
107
132
  end
133
+
134
+ if attributes.key?(:'business_use_capital_gain')
135
+ self.business_use_capital_gain = attributes[:'business_use_capital_gain']
136
+ end
137
+
138
+ if attributes.key?(:'business_use_current_gain_loss')
139
+ self.business_use_current_gain_loss = attributes[:'business_use_current_gain_loss']
140
+ end
141
+
142
+ if attributes.key?(:'private_use_capital_gain')
143
+ self.private_use_capital_gain = attributes[:'private_use_capital_gain']
144
+ end
145
+
146
+ if attributes.key?(:'private_use_current_gain_loss')
147
+ self.private_use_current_gain_loss = attributes[:'private_use_current_gain_loss']
148
+ end
149
+
150
+ if attributes.key?(:'initial_deduction_percentage')
151
+ self.initial_deduction_percentage = attributes[:'initial_deduction_percentage']
152
+ end
108
153
  end
109
154
 
110
155
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -131,7 +176,12 @@ module XeroRuby::Assets
131
176
  cost_limit == o.cost_limit &&
132
177
  residual_value == o.residual_value &&
133
178
  prior_accum_depreciation_amount == o.prior_accum_depreciation_amount &&
134
- current_accum_depreciation_amount == o.current_accum_depreciation_amount
179
+ current_accum_depreciation_amount == o.current_accum_depreciation_amount &&
180
+ business_use_capital_gain == o.business_use_capital_gain &&
181
+ business_use_current_gain_loss == o.business_use_current_gain_loss &&
182
+ private_use_capital_gain == o.private_use_capital_gain &&
183
+ private_use_current_gain_loss == o.private_use_current_gain_loss &&
184
+ initial_deduction_percentage == o.initial_deduction_percentage
135
185
  end
136
186
 
137
187
  # @see the `==` method
@@ -143,7 +193,7 @@ module XeroRuby::Assets
143
193
  # Calculates hash code according to all attributes.
144
194
  # @return [Integer] Hash code
145
195
  def hash
146
- [current_capital_gain, current_gain_loss, depreciation_start_date, cost_limit, residual_value, prior_accum_depreciation_amount, current_accum_depreciation_amount].hash
196
+ [current_capital_gain, current_gain_loss, depreciation_start_date, cost_limit, residual_value, prior_accum_depreciation_amount, current_accum_depreciation_amount, business_use_capital_gain, business_use_current_gain_loss, private_use_capital_gain, private_use_current_gain_loss, initial_deduction_percentage].hash
147
197
  end
148
198
 
149
199
  # Builds the object from hash
@@ -34,6 +34,9 @@ module XeroRuby::PayrollAu
34
34
  # Boolean to determine if the earnings rate is reportable or exempt from W1
35
35
  attr_accessor :is_reportable_as_w1
36
36
 
37
+ # Optional Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations. When not specified value is calculated based on earnings type and superannuation settings
38
+ attr_accessor :is_qualifying_earnings
39
+
37
40
  # Boolean to determine if the allowance earnings rate contributes towards annual leave rate. Only applicable if EarningsType is ALLOWANCE and RateType is RATEPERUNIT
38
41
  attr_accessor :allowance_contributes_to_annual_leave_rate
39
42
 
@@ -85,6 +88,7 @@ module XeroRuby::PayrollAu
85
88
  :'is_exempt_from_tax' => :'IsExemptFromTax',
86
89
  :'is_exempt_from_super' => :'IsExemptFromSuper',
87
90
  :'is_reportable_as_w1' => :'IsReportableAsW1',
91
+ :'is_qualifying_earnings' => :'IsQualifyingEarnings',
88
92
  :'allowance_contributes_to_annual_leave_rate' => :'AllowanceContributesToAnnualLeaveRate',
89
93
  :'allowance_contributes_to_overtime_rate' => :'AllowanceContributesToOvertimeRate',
90
94
  :'earnings_type' => :'EarningsType',
@@ -111,6 +115,7 @@ module XeroRuby::PayrollAu
111
115
  :'is_exempt_from_tax' => :'Boolean',
112
116
  :'is_exempt_from_super' => :'Boolean',
113
117
  :'is_reportable_as_w1' => :'Boolean',
118
+ :'is_qualifying_earnings' => :'Boolean',
114
119
  :'allowance_contributes_to_annual_leave_rate' => :'Boolean',
115
120
  :'allowance_contributes_to_overtime_rate' => :'Boolean',
116
121
  :'earnings_type' => :'EarningsType',
@@ -167,6 +172,10 @@ module XeroRuby::PayrollAu
167
172
  self.is_reportable_as_w1 = attributes[:'is_reportable_as_w1']
168
173
  end
169
174
 
175
+ if attributes.key?(:'is_qualifying_earnings')
176
+ self.is_qualifying_earnings = attributes[:'is_qualifying_earnings']
177
+ end
178
+
170
179
  if attributes.key?(:'allowance_contributes_to_annual_leave_rate')
171
180
  self.allowance_contributes_to_annual_leave_rate = attributes[:'allowance_contributes_to_annual_leave_rate']
172
181
  end
@@ -278,6 +287,7 @@ module XeroRuby::PayrollAu
278
287
  is_exempt_from_tax == o.is_exempt_from_tax &&
279
288
  is_exempt_from_super == o.is_exempt_from_super &&
280
289
  is_reportable_as_w1 == o.is_reportable_as_w1 &&
290
+ is_qualifying_earnings == o.is_qualifying_earnings &&
281
291
  allowance_contributes_to_annual_leave_rate == o.allowance_contributes_to_annual_leave_rate &&
282
292
  allowance_contributes_to_overtime_rate == o.allowance_contributes_to_overtime_rate &&
283
293
  earnings_type == o.earnings_type &&
@@ -303,7 +313,7 @@ module XeroRuby::PayrollAu
303
313
  # Calculates hash code according to all attributes.
304
314
  # @return [Integer] Hash code
305
315
  def hash
306
- [name, account_code, type_of_units, is_exempt_from_tax, is_exempt_from_super, is_reportable_as_w1, allowance_contributes_to_annual_leave_rate, allowance_contributes_to_overtime_rate, earnings_type, earnings_rate_id, rate_type, rate_per_unit, multiplier, accrue_leave, amount, employment_termination_payment_type, updated_date_utc, current_record, allowance_type, allowance_category].hash
316
+ [name, account_code, type_of_units, is_exempt_from_tax, is_exempt_from_super, is_reportable_as_w1, is_qualifying_earnings, allowance_contributes_to_annual_leave_rate, allowance_contributes_to_overtime_rate, earnings_type, earnings_rate_id, rate_type, rate_per_unit, multiplier, accrue_leave, amount, employment_termination_payment_type, updated_date_utc, current_record, allowance_type, allowance_category].hash
307
317
  end
308
318
 
309
319
  # Builds the object from hash
@@ -121,9 +121,6 @@ module XeroRuby::PayrollAu
121
121
  attr_accessor :leave_balances
122
122
 
123
123
 
124
- attr_accessor :leave_lines
125
-
126
-
127
124
  attr_accessor :super_memberships
128
125
 
129
126
 
@@ -191,7 +188,6 @@ module XeroRuby::PayrollAu
191
188
  :'country_of_residence' => :'CountryOfResidence',
192
189
  :'is_stp2_qualified' => :'IsSTP2Qualified',
193
190
  :'leave_balances' => :'LeaveBalances',
194
- :'leave_lines' => :'LeaveLines',
195
191
  :'super_memberships' => :'SuperMemberships',
196
192
  :'status' => :'Status',
197
193
  :'updated_date_utc' => :'UpdatedDateUTC',
@@ -233,7 +229,6 @@ module XeroRuby::PayrollAu
233
229
  :'country_of_residence' => :'CountryOfResidence',
234
230
  :'is_stp2_qualified' => :'Boolean',
235
231
  :'leave_balances' => :'Array<LeaveBalance>',
236
- :'leave_lines' => :'Array<LeaveLine>',
237
232
  :'super_memberships' => :'Array<SuperMembership>',
238
233
  :'status' => :'EmployeeStatus',
239
234
  :'updated_date_utc' => :'DateTime',
@@ -384,12 +379,6 @@ module XeroRuby::PayrollAu
384
379
  end
385
380
  end
386
381
 
387
- if attributes.key?(:'leave_lines')
388
- if (value = attributes[:'leave_lines']).is_a?(Array)
389
- self.leave_lines = value
390
- end
391
- end
392
-
393
382
  if attributes.key?(:'super_memberships')
394
383
  if (value = attributes[:'super_memberships']).is_a?(Array)
395
384
  self.super_memberships = value
@@ -499,7 +488,6 @@ module XeroRuby::PayrollAu
499
488
  country_of_residence == o.country_of_residence &&
500
489
  is_stp2_qualified == o.is_stp2_qualified &&
501
490
  leave_balances == o.leave_balances &&
502
- leave_lines == o.leave_lines &&
503
491
  super_memberships == o.super_memberships &&
504
492
  status == o.status &&
505
493
  updated_date_utc == o.updated_date_utc &&
@@ -515,7 +503,7 @@ module XeroRuby::PayrollAu
515
503
  # Calculates hash code according to all attributes.
516
504
  # @return [Integer] Hash code
517
505
  def hash
518
- [first_name, last_name, date_of_birth, home_address, start_date, title, middle_names, email, gender, phone, mobile, twitter_user_name, is_authorised_to_approve_leave, is_authorised_to_approve_timesheets, job_title, classification, ordinary_earnings_rate_id, payroll_calendar_id, employee_group_name, employee_id, termination_date, termination_reason, bank_accounts, pay_template, opening_balances, tax_declaration, income_type, employment_type, country_of_residence, is_stp2_qualified, leave_balances, leave_lines, super_memberships, status, updated_date_utc, validation_errors].hash
506
+ [first_name, last_name, date_of_birth, home_address, start_date, title, middle_names, email, gender, phone, mobile, twitter_user_name, is_authorised_to_approve_leave, is_authorised_to_approve_timesheets, job_title, classification, ordinary_earnings_rate_id, payroll_calendar_id, employee_group_name, employee_id, termination_date, termination_reason, bank_accounts, pay_template, opening_balances, tax_declaration, income_type, employment_type, country_of_residence, is_stp2_qualified, leave_balances, super_memberships, status, updated_date_utc, validation_errors].hash
519
507
  end
520
508
 
521
509
  # Builds the object from hash
@@ -31,6 +31,9 @@ module XeroRuby::PayrollAu
31
31
  # amount of leave line
32
32
  attr_accessor :include_superannuation_guarantee_contribution
33
33
 
34
+ # Optional Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations. When not specified value is calculated based on superannuation settings
35
+ attr_accessor :is_qualifying_earnings
36
+
34
37
  # Number of units for leave line.
35
38
  attr_accessor :number_of_units
36
39
 
@@ -48,6 +51,7 @@ module XeroRuby::PayrollAu
48
51
  :'entitlement_final_pay_payout_type' => :'EntitlementFinalPayPayoutType',
49
52
  :'employment_termination_payment_type' => :'EmploymentTerminationPaymentType',
50
53
  :'include_superannuation_guarantee_contribution' => :'IncludeSuperannuationGuaranteeContribution',
54
+ :'is_qualifying_earnings' => :'IsQualifyingEarnings',
51
55
  :'number_of_units' => :'NumberOfUnits',
52
56
  :'annual_number_of_units' => :'AnnualNumberOfUnits',
53
57
  :'full_time_number_of_units_per_period' => :'FullTimeNumberOfUnitsPerPeriod'
@@ -62,6 +66,7 @@ module XeroRuby::PayrollAu
62
66
  :'entitlement_final_pay_payout_type' => :'EntitlementFinalPayPayoutType',
63
67
  :'employment_termination_payment_type' => :'EmploymentTerminationPaymentType',
64
68
  :'include_superannuation_guarantee_contribution' => :'Boolean',
69
+ :'is_qualifying_earnings' => :'Boolean',
65
70
  :'number_of_units' => :'BigDecimal',
66
71
  :'annual_number_of_units' => :'BigDecimal',
67
72
  :'full_time_number_of_units_per_period' => :'BigDecimal'
@@ -103,6 +108,10 @@ module XeroRuby::PayrollAu
103
108
  self.include_superannuation_guarantee_contribution = attributes[:'include_superannuation_guarantee_contribution']
104
109
  end
105
110
 
111
+ if attributes.key?(:'is_qualifying_earnings')
112
+ self.is_qualifying_earnings = attributes[:'is_qualifying_earnings']
113
+ end
114
+
106
115
  if attributes.key?(:'number_of_units')
107
116
  self.number_of_units = attributes[:'number_of_units']
108
117
  end
@@ -139,6 +148,7 @@ module XeroRuby::PayrollAu
139
148
  entitlement_final_pay_payout_type == o.entitlement_final_pay_payout_type &&
140
149
  employment_termination_payment_type == o.employment_termination_payment_type &&
141
150
  include_superannuation_guarantee_contribution == o.include_superannuation_guarantee_contribution &&
151
+ is_qualifying_earnings == o.is_qualifying_earnings &&
142
152
  number_of_units == o.number_of_units &&
143
153
  annual_number_of_units == o.annual_number_of_units &&
144
154
  full_time_number_of_units_per_period == o.full_time_number_of_units_per_period
@@ -153,7 +163,7 @@ module XeroRuby::PayrollAu
153
163
  # Calculates hash code according to all attributes.
154
164
  # @return [Integer] Hash code
155
165
  def hash
156
- [leave_type_id, calculation_type, entitlement_final_pay_payout_type, employment_termination_payment_type, include_superannuation_guarantee_contribution, number_of_units, annual_number_of_units, full_time_number_of_units_per_period].hash
166
+ [leave_type_id, calculation_type, entitlement_final_pay_payout_type, employment_termination_payment_type, include_superannuation_guarantee_contribution, is_qualifying_earnings, number_of_units, annual_number_of_units, full_time_number_of_units_per_period].hash
157
167
  end
158
168
 
159
169
  # Builds the object from hash
@@ -49,6 +49,9 @@ module XeroRuby::PayrollAu
49
49
  # Set this to indicate that the leave type is exempt from superannuation guarantee contribution
50
50
  attr_accessor :sgc_exempt
51
51
 
52
+ # Optional Boolean to determine if the earnings rate is considered as qualifying earnings for superannuation guarantee calculations. When not specified value is calculated based on earnings type and superannuation settings
53
+ attr_accessor :is_qualifying_earnings
54
+
52
55
  # Attribute mapping from ruby-style variable name to JSON key.
53
56
  def self.attribute_map
54
57
  {
@@ -62,7 +65,8 @@ module XeroRuby::PayrollAu
62
65
  :'show_on_payslip' => :'ShowOnPayslip',
63
66
  :'current_record' => :'CurrentRecord',
64
67
  :'leave_category_code' => :'LeaveCategoryCode',
65
- :'sgc_exempt' => :'SGCExempt'
68
+ :'sgc_exempt' => :'SGCExempt',
69
+ :'is_qualifying_earnings' => :'IsQualifyingEarnings'
66
70
  }
67
71
  end
68
72
 
@@ -79,7 +83,8 @@ module XeroRuby::PayrollAu
79
83
  :'show_on_payslip' => :'Boolean',
80
84
  :'current_record' => :'Boolean',
81
85
  :'leave_category_code' => :'LeaveCategoryCode',
82
- :'sgc_exempt' => :'Boolean'
86
+ :'sgc_exempt' => :'Boolean',
87
+ :'is_qualifying_earnings' => :'Boolean'
83
88
  }
84
89
  end
85
90
 
@@ -141,6 +146,10 @@ module XeroRuby::PayrollAu
141
146
  if attributes.key?(:'sgc_exempt')
142
147
  self.sgc_exempt = attributes[:'sgc_exempt']
143
148
  end
149
+
150
+ if attributes.key?(:'is_qualifying_earnings')
151
+ self.is_qualifying_earnings = attributes[:'is_qualifying_earnings']
152
+ end
144
153
  end
145
154
 
146
155
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -186,7 +195,8 @@ module XeroRuby::PayrollAu
186
195
  show_on_payslip == o.show_on_payslip &&
187
196
  current_record == o.current_record &&
188
197
  leave_category_code == o.leave_category_code &&
189
- sgc_exempt == o.sgc_exempt
198
+ sgc_exempt == o.sgc_exempt &&
199
+ is_qualifying_earnings == o.is_qualifying_earnings
190
200
  end
191
201
 
192
202
  # @see the `==` method
@@ -198,7 +208,7 @@ module XeroRuby::PayrollAu
198
208
  # Calculates hash code according to all attributes.
199
209
  # @return [Integer] Hash code
200
210
  def hash
201
- [name, type_of_units, leave_type_id, normal_entitlement, leave_loading_rate, updated_date_utc, is_paid_leave, show_on_payslip, current_record, leave_category_code, sgc_exempt].hash
211
+ [name, type_of_units, leave_type_id, normal_entitlement, leave_loading_rate, updated_date_utc, is_paid_leave, show_on_payslip, current_record, leave_category_code, sgc_exempt, is_qualifying_earnings].hash
202
212
  end
203
213
 
204
214
  # Builds the object from hash