Skip to content

Commit

Permalink
Merge pull request #176 from XeroAPI/regen_oas
Browse files Browse the repository at this point in the history
add new earnings type for uk payroll - unemployement pay
  • Loading branch information
SerKnight authored Jun 16, 2021
2 parents 4a035bd + 2bca9c6 commit 16ee8c5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions docs/accounting/AccountingApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/accounting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20811,7 +20811,7 @@ <h2>Parameters</h2>
<article id="api-Accounting-getContactGroups-0" data-group="User" data-name="getContactGroups" data-version="0">
<div class="pull-left">
<h1>getContactGroups</h1>
<p>Retrieves the contact Id and name of all the contacts in a contact group</p>
<p>Retrieves the contact Id and name of each contact group</p>
</div>
<div class="pull-right"></div>
<div class="clearfix"></div>
Expand Down
2 changes: 1 addition & 1 deletion docs/payroll_uk/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions lib/xero-ruby/api/accounting_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions lib/xero-ruby/models/payroll_uk/earnings_rate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"])
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
=end

module XeroRuby
VERSION = '3.1.1'
VERSION = '3.1.2'
end

0 comments on commit 16ee8c5

Please sign in to comment.