xero-ruby 12.0.0 → 12.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e488e1adff016f80f18367fc53e80a858bb3ab7719dfaf5e78da8d46fb366a2a
4
- data.tar.gz: 918b57b88bdb2715b2a3d9f477f141ebf8eac39c394a0aeeed5cdd32e30b09bd
3
+ metadata.gz: fb934d84d2ae53b0239b45ec344af16f2c862369bae478f3fb15f9a7caf2d36a
4
+ data.tar.gz: f84af0bc72f79fa7396742ace8e2e2c2b41e0e66a0f60632da34876cb06ef773
5
5
  SHA512:
6
- metadata.gz: 22a58366e82f0a35f45d9692da6618f67de7de7ffc00f90fbeef6e7fae3e4f8ec3d22199eb23cf950924b38485cc0cce8bf5ba83fe7634728586a8390a5c70cf
7
- data.tar.gz: 3912b2d3873f102f27bedb611b059579d27958442fe7fe72552f9f5c1223dd19a5c77cb89af0a49830d9d0c57d3ab9fe598be41285bc1434d34037ac2a6bb7f4
6
+ metadata.gz: f5505cde298fd14eb3b2212701d20c1b49575e7faaa27bd4e6908c8d21a19e02a23eda70bc8e39bf0fbe69ca8faa1e97be92d1af153c18352b872c4c118bea74
7
+ data.tar.gz: 5a350f8f23d3f18bdb6bd7b2d07111785a6030dc390773bd0938c2fa8d353667e94f1339e7491a8c5a012946571a040170906d529c93d51fa800e6f83c1bd67f
@@ -1825,6 +1825,7 @@ module XeroRuby
1825
1825
  end
1826
1826
 
1827
1827
  # Creates new employees used in Xero payrun
1828
+ # This endpoint is deprecated and will be removed April 28, 2026
1828
1829
  # @param xero_tenant_id [String] Xero identifier for Tenant
1829
1830
  # @param employees [Employees] Employees with array of Employee object in body of request
1830
1831
  # @param [Hash] opts the optional parameters
@@ -1837,6 +1838,7 @@ module XeroRuby
1837
1838
  end
1838
1839
 
1839
1840
  # Creates new employees used in Xero payrun
1841
+ # This endpoint is deprecated and will be removed April 28, 2026
1840
1842
  # @param xero_tenant_id [String] Xero identifier for Tenant
1841
1843
  # @param employees [Employees] Employees with array of Employee object in body of request
1842
1844
  # @param [Hash] opts the optional parameters
@@ -9357,6 +9359,7 @@ module XeroRuby
9357
9359
  end
9358
9360
 
9359
9361
  # Retrieves a specific employee used in Xero payrun using a unique employee Id
9362
+ # This endpoint is deprecated and will be removed April 28, 2026
9360
9363
  # @param xero_tenant_id [String] Xero identifier for Tenant
9361
9364
  # @param employee_id [String] Unique identifier for a Employee
9362
9365
  # @param [Hash] opts the optional parameters
@@ -9367,6 +9370,7 @@ module XeroRuby
9367
9370
  end
9368
9371
 
9369
9372
  # Retrieves a specific employee used in Xero payrun using a unique employee Id
9373
+ # This endpoint is deprecated and will be removed April 28, 2026
9370
9374
  # @param xero_tenant_id [String] Xero identifier for Tenant
9371
9375
  # @param employee_id [String] Unique identifier for a Employee
9372
9376
  # @param [Hash] opts the optional parameters
@@ -9432,6 +9436,7 @@ module XeroRuby
9432
9436
  end
9433
9437
 
9434
9438
  # Retrieves employees used in Xero payrun
9439
+ # This endpoint is deprecated and will be removed April 28, 2026
9435
9440
  # @param xero_tenant_id [String] Xero identifier for Tenant
9436
9441
  # @param [Hash] opts the optional parameters
9437
9442
  # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
@@ -9444,6 +9449,7 @@ module XeroRuby
9444
9449
  end
9445
9450
 
9446
9451
  # Retrieves employees used in Xero payrun
9452
+ # This endpoint is deprecated and will be removed April 28, 2026
9447
9453
  # @param xero_tenant_id [String] Xero identifier for Tenant
9448
9454
  # @param [Hash] opts the optional parameters
9449
9455
  # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
@@ -11952,6 +11958,7 @@ module XeroRuby
11952
11958
  # @option opts [Integer] :page e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment
11953
11959
  # @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
11954
11960
  # @option opts [Integer] :page_size Number of records to retrieve per page
11961
+ # @option opts [Array<String>] :references Filter by a comma-separated list of References
11955
11962
  # @return [Overpayments]
11956
11963
  def get_overpayments(xero_tenant_id, opts = {})
11957
11964
  data, _status_code, _headers = get_overpayments_with_http_info(xero_tenant_id, opts)
@@ -11967,6 +11974,7 @@ module XeroRuby
11967
11974
  # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment
11968
11975
  # @option opts [Integer] :unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
11969
11976
  # @option opts [Integer] :page_size Number of records to retrieve per page
11977
+ # @option opts [Array<String>] :references Filter by a comma-separated list of References
11970
11978
  # @return [Array<(Overpayments, Integer, Hash)>] Overpayments data, response status code and response headers
11971
11979
  def get_overpayments_with_http_info(xero_tenant_id, options = {})
11972
11980
  opts = options.dup
@@ -11990,6 +11998,7 @@ module XeroRuby
11990
11998
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
11991
11999
  query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil?
11992
12000
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
12001
+ query_params[:'References'] = @api_client.build_collection_param(opts[:'references'], :csv) if !opts[:'references'].nil?
11993
12002
 
11994
12003
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
11995
12004
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -17938,6 +17947,7 @@ module XeroRuby
17938
17947
  end
17939
17948
 
17940
17949
  # Creates a single new employees used in Xero payrun
17950
+ # This endpoint is deprecated and will be removed April 28, 2026
17941
17951
  # @param xero_tenant_id [String] Xero identifier for Tenant
17942
17952
  # @param employees [Employees] Employees with array of Employee object in body of request
17943
17953
  # @param [Hash] opts the optional parameters
@@ -17950,6 +17960,7 @@ module XeroRuby
17950
17960
  end
17951
17961
 
17952
17962
  # Creates a single new employees used in Xero payrun
17963
+ # This endpoint is deprecated and will be removed April 28, 2026
17953
17964
  # @param xero_tenant_id [String] Xero identifier for Tenant
17954
17965
  # @param employees [Employees] Employees with array of Employee object in body of request
17955
17966
  # @param [Hash] opts the optional parameters
@@ -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
@@ -28,12 +28,6 @@ module XeroRuby::PayrollNz
28
28
  # The dollar value of annual leave opening balance if negative.
29
29
  attr_accessor :negative_annual_leave_balance_paid_amount
30
30
 
31
- # Deprecated use SickLeaveToAccrueAnnually
32
- attr_accessor :sick_leave_hours_to_accrue_annually
33
-
34
- # Deprecated use SickLeaveMaximumToAccrue
35
- attr_accessor :sick_leave_maximum_hours_to_accrue
36
-
37
31
  # Number of units accrued annually for sick leave. The type of units is determined by the property \"TypeOfUnitsToAccrue\" on the \"Sick Leave\" leave type
38
32
  attr_accessor :sick_leave_to_accrue_annually
39
33
 
@@ -59,8 +53,6 @@ module XeroRuby::PayrollNz
59
53
  :'holiday_pay_opening_balance' => :'holidayPayOpeningBalance',
60
54
  :'annual_leave_opening_balance' => :'annualLeaveOpeningBalance',
61
55
  :'negative_annual_leave_balance_paid_amount' => :'negativeAnnualLeaveBalancePaidAmount',
62
- :'sick_leave_hours_to_accrue_annually' => :'sickLeaveHoursToAccrueAnnually',
63
- :'sick_leave_maximum_hours_to_accrue' => :'sickLeaveMaximumHoursToAccrue',
64
56
  :'sick_leave_to_accrue_annually' => :'SickLeaveToAccrueAnnually',
65
57
  :'sick_leave_maximum_to_accrue' => :'SickLeaveMaximumToAccrue',
66
58
  :'sick_leave_opening_balance' => :'sickLeaveOpeningBalance',
@@ -77,8 +69,6 @@ module XeroRuby::PayrollNz
77
69
  :'holiday_pay_opening_balance' => :'BigDecimal',
78
70
  :'annual_leave_opening_balance' => :'BigDecimal',
79
71
  :'negative_annual_leave_balance_paid_amount' => :'BigDecimal',
80
- :'sick_leave_hours_to_accrue_annually' => :'BigDecimal',
81
- :'sick_leave_maximum_hours_to_accrue' => :'BigDecimal',
82
72
  :'sick_leave_to_accrue_annually' => :'BigDecimal',
83
73
  :'sick_leave_maximum_to_accrue' => :'BigDecimal',
84
74
  :'sick_leave_opening_balance' => :'BigDecimal',
@@ -119,14 +109,6 @@ module XeroRuby::PayrollNz
119
109
  self.negative_annual_leave_balance_paid_amount = attributes[:'negative_annual_leave_balance_paid_amount']
120
110
  end
121
111
 
122
- if attributes.key?(:'sick_leave_hours_to_accrue_annually')
123
- self.sick_leave_hours_to_accrue_annually = attributes[:'sick_leave_hours_to_accrue_annually']
124
- end
125
-
126
- if attributes.key?(:'sick_leave_maximum_hours_to_accrue')
127
- self.sick_leave_maximum_hours_to_accrue = attributes[:'sick_leave_maximum_hours_to_accrue']
128
- end
129
-
130
112
  if attributes.key?(:'sick_leave_to_accrue_annually')
131
113
  self.sick_leave_to_accrue_annually = attributes[:'sick_leave_to_accrue_annually']
132
114
  end
@@ -174,8 +156,6 @@ module XeroRuby::PayrollNz
174
156
  holiday_pay_opening_balance == o.holiday_pay_opening_balance &&
175
157
  annual_leave_opening_balance == o.annual_leave_opening_balance &&
176
158
  negative_annual_leave_balance_paid_amount == o.negative_annual_leave_balance_paid_amount &&
177
- sick_leave_hours_to_accrue_annually == o.sick_leave_hours_to_accrue_annually &&
178
- sick_leave_maximum_hours_to_accrue == o.sick_leave_maximum_hours_to_accrue &&
179
159
  sick_leave_to_accrue_annually == o.sick_leave_to_accrue_annually &&
180
160
  sick_leave_maximum_to_accrue == o.sick_leave_maximum_to_accrue &&
181
161
  sick_leave_opening_balance == o.sick_leave_opening_balance &&
@@ -193,7 +173,7 @@ module XeroRuby::PayrollNz
193
173
  # Calculates hash code according to all attributes.
194
174
  # @return [Integer] Hash code
195
175
  def hash
196
- [include_holiday_pay, holiday_pay_opening_balance, annual_leave_opening_balance, negative_annual_leave_balance_paid_amount, sick_leave_hours_to_accrue_annually, sick_leave_maximum_hours_to_accrue, sick_leave_to_accrue_annually, sick_leave_maximum_to_accrue, sick_leave_opening_balance, sick_leave_schedule_of_accrual, sick_leave_anniversary_date, annual_leave_anniversary_date].hash
176
+ [include_holiday_pay, holiday_pay_opening_balance, annual_leave_opening_balance, negative_annual_leave_balance_paid_amount, sick_leave_to_accrue_annually, sick_leave_maximum_to_accrue, sick_leave_opening_balance, sick_leave_schedule_of_accrual, sick_leave_anniversary_date, annual_leave_anniversary_date].hash
197
177
  end
198
178
 
199
179
  # Builds the object from hash
@@ -26,9 +26,6 @@ module XeroRuby::PayrollNz
26
26
  PERCENTAGE_OF_GROSS_EARNINGS ||= "PercentageOfGrossEarnings".freeze
27
27
  NO_ACCRUALS ||= "NoAccruals".freeze
28
28
 
29
- # Deprecated use UnitsAccruedAnnually
30
- attr_accessor :hours_accrued_annually
31
-
32
29
  # The number of units accrued for the leave annually. This is 0 when the ScheduleOfAccrual chosen is \"NoAccruals\"
33
30
  attr_accessor :units_accrued_annually
34
31
 
@@ -44,7 +41,7 @@ module XeroRuby::PayrollNz
44
41
  # The type of units for the opening balance
45
42
  attr_accessor :opening_balance_type_of_units
46
43
 
47
- # The number of hours added to the leave balance for every hour worked by the employee. This is normally 0, unless the scheduleOfAccrual chosen is \"OnHourWorked\"
44
+ # not supported in Payroll NZ
48
45
  attr_accessor :rate_accrued_hourly
49
46
 
50
47
  # Specific for scheduleOfAccrual having percentage of gross earnings. Identifies how much percentage of gross earnings is accrued per pay period.
@@ -89,8 +86,7 @@ module XeroRuby::PayrollNz
89
86
  {
90
87
  :'leave_type_id' => :'leaveTypeID',
91
88
  :'schedule_of_accrual' => :'scheduleOfAccrual',
92
- :'hours_accrued_annually' => :'hoursAccruedAnnually',
93
- :'units_accrued_annually' => :'UnitsAccruedAnnually',
89
+ :'units_accrued_annually' => :'unitsAccruedAnnually',
94
90
  :'type_of_units_to_accrue' => :'typeOfUnitsToAccrue',
95
91
  :'maximum_to_accrue' => :'maximumToAccrue',
96
92
  :'opening_balance' => :'openingBalance',
@@ -109,7 +105,6 @@ module XeroRuby::PayrollNz
109
105
  {
110
106
  :'leave_type_id' => :'String',
111
107
  :'schedule_of_accrual' => :'String',
112
- :'hours_accrued_annually' => :'BigDecimal',
113
108
  :'units_accrued_annually' => :'BigDecimal',
114
109
  :'type_of_units_to_accrue' => :'String',
115
110
  :'maximum_to_accrue' => :'BigDecimal',
@@ -147,10 +142,6 @@ module XeroRuby::PayrollNz
147
142
  self.schedule_of_accrual = attributes[:'schedule_of_accrual']
148
143
  end
149
144
 
150
- if attributes.key?(:'hours_accrued_annually')
151
- self.hours_accrued_annually = attributes[:'hours_accrued_annually']
152
- end
153
-
154
145
  if attributes.key?(:'units_accrued_annually')
155
146
  self.units_accrued_annually = attributes[:'units_accrued_annually']
156
147
  end
@@ -228,7 +219,6 @@ module XeroRuby::PayrollNz
228
219
  self.class == o.class &&
229
220
  leave_type_id == o.leave_type_id &&
230
221
  schedule_of_accrual == o.schedule_of_accrual &&
231
- hours_accrued_annually == o.hours_accrued_annually &&
232
222
  units_accrued_annually == o.units_accrued_annually &&
233
223
  type_of_units_to_accrue == o.type_of_units_to_accrue &&
234
224
  maximum_to_accrue == o.maximum_to_accrue &&
@@ -251,7 +241,7 @@ module XeroRuby::PayrollNz
251
241
  # Calculates hash code according to all attributes.
252
242
  # @return [Integer] Hash code
253
243
  def hash
254
- [leave_type_id, schedule_of_accrual, hours_accrued_annually, units_accrued_annually, type_of_units_to_accrue, maximum_to_accrue, opening_balance, opening_balance_type_of_units, rate_accrued_hourly, percentage_of_gross_earnings, include_holiday_pay_every_pay, show_annual_leave_in_advance, annual_leave_total_amount_paid, schedule_of_accrual_date].hash
244
+ [leave_type_id, schedule_of_accrual, units_accrued_annually, type_of_units_to_accrue, maximum_to_accrue, opening_balance, opening_balance_type_of_units, rate_accrued_hourly, percentage_of_gross_earnings, include_holiday_pay_every_pay, show_annual_leave_in_advance, annual_leave_total_amount_paid, schedule_of_accrual_date].hash
255
245
  end
256
246
 
257
247
  # Builds the object from hash