Skip to content

Unable to push future leave requests in NZ Payroll any longer #277

@CyberFerret

Description

@CyberFerret

We are currently using version 4.3.0 of the xero-ruby gem, and recently noticed that we are no longer able to push leave applications that are future dated. Past dated leave applications still work OK, but our customers used to be able to push future dated ones as well, up until a few weeks ago.

The exception thrown by the gem is:

invalid value for "period_status", must be one of ["Approved", "Completed"].

and the backtrace is:

vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_period.rb:127 period_status=
vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_period.rb:175 block in build_from_hash
vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_period.rb:167 each_pair
vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_period.rb:167 build_from_hash
vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_period.rb:159 build_from_hash
vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_periods.rb:177 _deserialize
vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_periods.rb:128 block (2 levels) in build_from_hash
vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_periods.rb:128 map
vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_periods.rb:128 block in build_from_hash
vendor/bundle/ruby/3.0.0/gems/xero-ruby-4.3.0/lib/xero-ruby/models/payroll_nz/leave_periods.rb:123 each_pair

Pushing future dated leave still seems to work via direct API calls so we are a bit puzzled as to why it is no longer working via the gem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions