Method: XeroRuby::PayrollUk::LeaveTypes#to_hash

Defined in:
lib/xero-ruby/models/payroll_uk/leave_types.rb

#to_hash(downcase: false) ⇒ Hash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



195
196
197
198
199
200
201
202
203
204
# File 'lib/xero-ruby/models/payroll_uk/leave_types.rb', line 195

def to_hash(downcase: false)
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    key = downcase ? attr : param
    hash[key] = _to_hash(value, downcase: downcase)
  end
  hash
end