Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Earnings Rate Argument Error on PayrollUK API #241

Closed
Assignees

Comments

@WillRogers727
Copy link

When making the call for earnings rates payroll_uk_api.get_earnings_rates I receive an argument error from the SDK, specifically from line 232 in earnings_rate.rb:

#<ArgumentError: invalid value for "earnings_type", must be one of ["Allowance", "Backpay", "Bonus", "Commission", "LumpSum", "OtherEarnings", "OvertimeEarnings", "RegularEarnings", "StatutoryAdoptionPay", "StatutoryAdoptionPayNonPensionable", "StatutoryBereavementPay", "StatutoryMaternityPay", "StatutoryMaternityPayNonPensionable", "StatutoryPaternityPay", "StatutoryPaternityPayNonPensionable", "StatutoryParentalBereavementPayNonPensionable", "StatutorySharedParentalPay", "StatutorySharedParentalPayNonPensionable", "StatutorySickPay", "StatutorySickPayNonPensionable", "TipsNonDirect", "TipsDirect", "TerminationPay"].>

I noticed this previous issue about the same error: #175

In that issue, TerminationPay is missing, but it has it in my response so perhaps there is a new pay type?

Correlation ID for one of my failed calls is: 60ab3a47-397d-4491-8457-bb8a404b6c56

Thanks in advance.

@RettBehrens
Copy link
Contributor

Hey @WillRogers727 thanks for calling this out. Looks like the Backpay enum is cased differently from the API in the OpenAPI spec when it should be BackPay. This was based of the docs so we'll update the SDKs and request the relevant API team update their docs.

@WillRogers727
Copy link
Author

Thanks @RettBehrens! Appreciate it 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment