From 54ef86e1b9aa848a9e217f546b219f7818fb3c57 Mon Sep 17 00:00:00 2001 From: serknight Date: Wed, 16 Jun 2021 13:01:51 -0600 Subject: [PATCH 1/2] add new earnings type for uk payroll - unemployement pay --- docs/accounting/AccountingApi.md | 6 +++--- docs/accounting/index.html | 2 +- docs/payroll_uk/index.html | 2 +- lib/xero-ruby/api/accounting_api.rb | 4 ++-- lib/xero-ruby/models/payroll_uk/earnings_rate.rb | 5 +++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/accounting/AccountingApi.md b/docs/accounting/AccountingApi.md index c0570464..91db981d 100644 --- a/docs/accounting/AccountingApi.md +++ b/docs/accounting/AccountingApi.md @@ -99,7 +99,7 @@ Method | HTTP request | Description [**get_contact_by_contact_number**](AccountingApi.md#get_contact_by_contact_number) | **GET** /Contacts/{ContactNumber} | Retrieves a specific contact by contact number in a Xero organisation [**get_contact_cis_settings**](AccountingApi.md#get_contact_cis_settings) | **GET** /Contacts/{ContactID}/CISSettings | Retrieves CIS settings for a specific contact in a Xero organisation [**get_contact_group**](AccountingApi.md#get_contact_group) | **GET** /ContactGroups/{ContactGroupID} | Retrieves a specific contact group by using a unique contact group Id -[**get_contact_groups**](AccountingApi.md#get_contact_groups) | **GET** /ContactGroups | Retrieves the contact Id and name of all the contacts in a contact group +[**get_contact_groups**](AccountingApi.md#get_contact_groups) | **GET** /ContactGroups | Retrieves the contact Id and name of each contact group [**get_contact_history**](AccountingApi.md#get_contact_history) | **GET** /Contacts/{ContactID}/History | Retrieves history records for a specific contact [**get_contacts**](AccountingApi.md#get_contacts) | **GET** /Contacts | Retrieves all contacts in a Xero organisation [**get_credit_note**](AccountingApi.md#get_credit_note) | **GET** /CreditNotes/{CreditNoteID} | Retrieves a specific credit note using a unique credit note Id @@ -6589,7 +6589,7 @@ Name | Type | Description | Notes > ContactGroups get_contact_groups(xero_tenant_id, opts) -Retrieves the contact Id and name of all the contacts in a contact group +Retrieves the contact Id and name of each contact group ### Example @@ -6624,7 +6624,7 @@ opts = { } begin - #Retrieves the contact Id and name of all the contacts in a contact group + #Retrieves the contact Id and name of each contact group result = api_instance.get_contact_groups(xero_tenant_id, opts) p result rescue XeroRuby::Accounting::ApiError => e diff --git a/docs/accounting/index.html b/docs/accounting/index.html index 70300037..dc2f6b19 100644 --- a/docs/accounting/index.html +++ b/docs/accounting/index.html @@ -20811,7 +20811,7 @@

Parameters

getContactGroups

-

Retrieves the contact Id and name of all the contacts in a contact group

+

Retrieves the contact Id and name of each contact group

diff --git a/docs/payroll_uk/index.html b/docs/payroll_uk/index.html index 32a49ebd..224adbd5 100644 --- a/docs/payroll_uk/index.html +++ b/docs/payroll_uk/index.html @@ -1381,7 +1381,7 @@ "earningsType" : { "type" : "string", "description" : "Indicates how an employee will be paid when taking this type of earning", - "enum" : [ "Allowance", "Backpay", "Bonus", "Commission", "LumpSum", "OtherEarnings", "OvertimeEarnings", "RegularEarnings", "StatutoryAdoptionPay", "StatutoryAdoptionPayNonPensionable", "StatutoryBereavementPay", "StatutoryMaternityPay", "StatutoryMaternityPayNonPensionable", "StatutoryPaternityPay", "StatutoryPaternityPayNonPensionable", "StatutoryParentalBereavementPayNonPensionable", "StatutorySharedParentalPay", "StatutorySharedParentalPayNonPensionable", "StatutorySickPay", "StatutorySickPayNonPensionable", "Tips(Direct)", "Tips(Non-Direct)" ] + "enum" : [ "Allowance", "Backpay", "Bonus", "Commission", "LumpSum", "OtherEarnings", "OvertimeEarnings", "RegularEarnings", "StatutoryAdoptionPay", "StatutoryAdoptionPayNonPensionable", "StatutoryBereavementPay", "StatutoryMaternityPay", "StatutoryMaternityPayNonPensionable", "StatutoryPaternityPay", "StatutoryPaternityPayNonPensionable", "StatutoryParentalBereavementPayNonPensionable", "StatutorySharedParentalPay", "StatutorySharedParentalPayNonPensionable", "StatutorySickPay", "StatutorySickPayNonPensionable", "Tips(Direct)", "Tips(Non-Direct)", "TerminationPay" ] }, "rateType" : { "type" : "string", diff --git a/lib/xero-ruby/api/accounting_api.rb b/lib/xero-ruby/api/accounting_api.rb index 72343869..ecf0acd0 100644 --- a/lib/xero-ruby/api/accounting_api.rb +++ b/lib/xero-ruby/api/accounting_api.rb @@ -7722,7 +7722,7 @@ def get_contact_group_with_http_info(xero_tenant_id, contact_group_id, options = return data, status_code, headers end - # Retrieves the contact Id and name of all the contacts in a contact group + # Retrieves the contact Id and name of each contact group # @param xero_tenant_id [String] Xero identifier for Tenant # @param [Hash] opts the optional parameters # @option opts [String] :where Filter by an any element @@ -7733,7 +7733,7 @@ def get_contact_groups(xero_tenant_id, opts = {}) data end - # Retrieves the contact Id and name of all the contacts in a contact group + # Retrieves the contact Id and name of each contact group # @param xero_tenant_id [String] Xero identifier for Tenant # @param [Hash] opts the optional parameters # @option opts [String] :where Filter by an any element diff --git a/lib/xero-ruby/models/payroll_uk/earnings_rate.rb b/lib/xero-ruby/models/payroll_uk/earnings_rate.rb index 558481f5..ef769f67 100644 --- a/lib/xero-ruby/models/payroll_uk/earnings_rate.rb +++ b/lib/xero-ruby/models/payroll_uk/earnings_rate.rb @@ -46,6 +46,7 @@ class EarningsRate STATUTORY_SICK_PAY_NON_PENSIONABLE = "StatutorySickPayNonPensionable".freeze TIPS_DIRECT = "Tips(Direct)".freeze TIPS_NON_DIRECT = "Tips(Non-Direct)".freeze + TERMINATION_PAY = "TerminationPay".freeze # Indicates the type of the earning rate attr_accessor :rate_type @@ -213,7 +214,7 @@ def list_invalid_properties def valid? return false if @name.nil? return false if @earnings_type.nil? - earnings_type_validator = EnumAttributeValidator.new('String', ["Allowance", "Backpay", "Bonus", "Commission", "LumpSum", "OtherEarnings", "OvertimeEarnings", "RegularEarnings", "StatutoryAdoptionPay", "StatutoryAdoptionPayNonPensionable", "StatutoryBereavementPay", "StatutoryMaternityPay", "StatutoryMaternityPayNonPensionable", "StatutoryPaternityPay", "StatutoryPaternityPayNonPensionable", "StatutoryParentalBereavementPayNonPensionable", "StatutorySharedParentalPay", "StatutorySharedParentalPayNonPensionable", "StatutorySickPay", "StatutorySickPayNonPensionable", "Tips(Direct)", "Tips(Non-Direct)"]) + earnings_type_validator = EnumAttributeValidator.new('String', ["Allowance", "Backpay", "Bonus", "Commission", "LumpSum", "OtherEarnings", "OvertimeEarnings", "RegularEarnings", "StatutoryAdoptionPay", "StatutoryAdoptionPayNonPensionable", "StatutoryBereavementPay", "StatutoryMaternityPay", "StatutoryMaternityPayNonPensionable", "StatutoryPaternityPay", "StatutoryPaternityPayNonPensionable", "StatutoryParentalBereavementPayNonPensionable", "StatutorySharedParentalPay", "StatutorySharedParentalPayNonPensionable", "StatutorySickPay", "StatutorySickPayNonPensionable", "Tips(Direct)", "Tips(Non-Direct)", "TerminationPay"]) return false unless earnings_type_validator.valid?(@earnings_type) return false if @rate_type.nil? rate_type_validator = EnumAttributeValidator.new('String', ["RatePerUnit", "MultipleOfOrdinaryEarningsRate", "FixedAmount"]) @@ -226,7 +227,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] earnings_type Object to be assigned def earnings_type=(earnings_type) - validator = EnumAttributeValidator.new('String', ["Allowance", "Backpay", "Bonus", "Commission", "LumpSum", "OtherEarnings", "OvertimeEarnings", "RegularEarnings", "StatutoryAdoptionPay", "StatutoryAdoptionPayNonPensionable", "StatutoryBereavementPay", "StatutoryMaternityPay", "StatutoryMaternityPayNonPensionable", "StatutoryPaternityPay", "StatutoryPaternityPayNonPensionable", "StatutoryParentalBereavementPayNonPensionable", "StatutorySharedParentalPay", "StatutorySharedParentalPayNonPensionable", "StatutorySickPay", "StatutorySickPayNonPensionable", "Tips(Direct)", "Tips(Non-Direct)"]) + validator = EnumAttributeValidator.new('String', ["Allowance", "Backpay", "Bonus", "Commission", "LumpSum", "OtherEarnings", "OvertimeEarnings", "RegularEarnings", "StatutoryAdoptionPay", "StatutoryAdoptionPayNonPensionable", "StatutoryBereavementPay", "StatutoryMaternityPay", "StatutoryMaternityPayNonPensionable", "StatutoryPaternityPay", "StatutoryPaternityPayNonPensionable", "StatutoryParentalBereavementPayNonPensionable", "StatutorySharedParentalPay", "StatutorySharedParentalPayNonPensionable", "StatutorySickPay", "StatutorySickPayNonPensionable", "Tips(Direct)", "Tips(Non-Direct)", "TerminationPay"]) unless validator.valid?(earnings_type) fail ArgumentError, "invalid value for \"earnings_type\", must be one of #{validator.allowable_values}." end From 2bca9c69d5358746adfb0bc669029ad3e00aa883 Mon Sep 17 00:00:00 2001 From: serknight Date: Wed, 16 Jun 2021 13:03:09 -0600 Subject: [PATCH 2/2] bump version patch --- lib/xero-ruby/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/xero-ruby/version.rb b/lib/xero-ruby/version.rb index b1dc9214..52a71c06 100644 --- a/lib/xero-ruby/version.rb +++ b/lib/xero-ruby/version.rb @@ -11,5 +11,5 @@ =end module XeroRuby - VERSION = '3.1.1' + VERSION = '3.1.2' end