Class: XeroRuby::PayrollUk::Payslip
- Inherits:
-
Object
- Object
- XeroRuby::PayrollUk::Payslip
- Defined in:
- lib/xero-ruby/models/payroll_uk/payslip.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Constant Summary collapse
- CHEQUE =
"Cheque".freeze
- ELECTRONICALLY =
"Electronically".freeze
- MANUAL =
"Manual".freeze
Instance Attribute Summary collapse
-
#bacs_hash ⇒ Object
BACS Service User Number.
-
#benefit_lines ⇒ Object
Returns the value of attribute benefit_lines.
-
#court_order_lines ⇒ Object
Returns the value of attribute court_order_lines.
-
#deduction_lines ⇒ Object
Returns the value of attribute deduction_lines.
-
#earnings_lines ⇒ Object
Returns the value of attribute earnings_lines.
-
#employee_id ⇒ Object
The Xero identifier for payroll employee.
-
#employee_tax_lines ⇒ Object
Returns the value of attribute employee_tax_lines.
-
#employer_tax_lines ⇒ Object
Returns the value of attribute employer_tax_lines.
-
#first_name ⇒ Object
Employee first name.
-
#gross_earnings ⇒ Object
Total earnings before any deductions.
-
#last_edited ⇒ Object
The date payslip was last updated.
-
#last_name ⇒ Object
Employee last name.
-
#leave_accrual_lines ⇒ Object
Returns the value of attribute leave_accrual_lines.
-
#leave_earnings_lines ⇒ Object
Returns the value of attribute leave_earnings_lines.
-
#pay_run_id ⇒ Object
The Xero identifier for the associated payrun.
-
#pay_slip_id ⇒ Object
The Xero identifier for a Payslip.
-
#payment_lines ⇒ Object
Returns the value of attribute payment_lines.
-
#payment_method ⇒ Object
The payment method code.
-
#reimbursement_lines ⇒ Object
Returns the value of attribute reimbursement_lines.
-
#timesheet_earnings_lines ⇒ Object
Returns the value of attribute timesheet_earnings_lines.
-
#total_benefits ⇒ Object
Benefits (also called fringe benefits, perquisites or perks) are various non-earnings compensations provided to employees in addition to their normal earnings or salaries.
-
#total_court_orders ⇒ Object
Total amounts required by law to subtract from the employee's earnings.
-
#total_deductions ⇒ Object
Total amount subtracted from an employee's earnings to reach total pay.
-
#total_earnings ⇒ Object
Total earnings before any deductions.
-
#total_employee_taxes ⇒ Object
The part of an employee's earnings that is deducted for tax purposes.
-
#total_employer_taxes ⇒ Object
The employer's tax obligation.
-
#total_pay ⇒ Object
The employee net pay.
-
#total_reimbursements ⇒ Object
Total reimbursements are nontaxable payments to an employee used to repay out-of-pocket expenses when the person incurs those expenses through employment.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Payslip
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#parse_date(datestring) ⇒ Object
customized data_parser.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Payslip
Initializes the object
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 199 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::PayrollUk::Payslip` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::PayrollUk::Payslip`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'pay_slip_id') self.pay_slip_id = attributes[:'pay_slip_id'] end if attributes.key?(:'employee_id') self.employee_id = attributes[:'employee_id'] end if attributes.key?(:'pay_run_id') self.pay_run_id = attributes[:'pay_run_id'] end if attributes.key?(:'last_edited') self.last_edited = attributes[:'last_edited'] end if attributes.key?(:'first_name') self.first_name = attributes[:'first_name'] end if attributes.key?(:'last_name') self.last_name = attributes[:'last_name'] end if attributes.key?(:'total_earnings') self.total_earnings = attributes[:'total_earnings'] end if attributes.key?(:'gross_earnings') self.gross_earnings = attributes[:'gross_earnings'] end if attributes.key?(:'total_pay') self.total_pay = attributes[:'total_pay'] end if attributes.key?(:'total_employer_taxes') self.total_employer_taxes = attributes[:'total_employer_taxes'] end if attributes.key?(:'total_employee_taxes') self.total_employee_taxes = attributes[:'total_employee_taxes'] end if attributes.key?(:'total_deductions') self.total_deductions = attributes[:'total_deductions'] end if attributes.key?(:'total_reimbursements') self.total_reimbursements = attributes[:'total_reimbursements'] end if attributes.key?(:'total_court_orders') self.total_court_orders = attributes[:'total_court_orders'] end if attributes.key?(:'total_benefits') self.total_benefits = attributes[:'total_benefits'] end if attributes.key?(:'bacs_hash') self.bacs_hash = attributes[:'bacs_hash'] end if attributes.key?(:'payment_method') self.payment_method = attributes[:'payment_method'] end if attributes.key?(:'earnings_lines') if (value = attributes[:'earnings_lines']).is_a?(Array) self.earnings_lines = value end end if attributes.key?(:'leave_earnings_lines') if (value = attributes[:'leave_earnings_lines']).is_a?(Array) self.leave_earnings_lines = value end end if attributes.key?(:'timesheet_earnings_lines') if (value = attributes[:'timesheet_earnings_lines']).is_a?(Array) self.timesheet_earnings_lines = value end end if attributes.key?(:'deduction_lines') if (value = attributes[:'deduction_lines']).is_a?(Array) self.deduction_lines = value end end if attributes.key?(:'reimbursement_lines') if (value = attributes[:'reimbursement_lines']).is_a?(Array) self.reimbursement_lines = value end end if attributes.key?(:'leave_accrual_lines') if (value = attributes[:'leave_accrual_lines']).is_a?(Array) self.leave_accrual_lines = value end end if attributes.key?(:'benefit_lines') if (value = attributes[:'benefit_lines']).is_a?(Array) self.benefit_lines = value end end if attributes.key?(:'payment_lines') if (value = attributes[:'payment_lines']).is_a?(Array) self.payment_lines = value end end if attributes.key?(:'employee_tax_lines') if (value = attributes[:'employee_tax_lines']).is_a?(Array) self.employee_tax_lines = value end end if attributes.key?(:'employer_tax_lines') if (value = attributes[:'employer_tax_lines']).is_a?(Array) self.employer_tax_lines = value end end if attributes.key?(:'court_order_lines') if (value = attributes[:'court_order_lines']).is_a?(Array) self.court_order_lines = value end end end |
Instance Attribute Details
#bacs_hash ⇒ Object
BACS Service User Number
66 67 68 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 66 def bacs_hash @bacs_hash end |
#benefit_lines ⇒ Object
Returns the value of attribute benefit_lines.
93 94 95 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 93 def benefit_lines @benefit_lines end |
#court_order_lines ⇒ Object
Returns the value of attribute court_order_lines.
105 106 107 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 105 def court_order_lines @court_order_lines end |
#deduction_lines ⇒ Object
Returns the value of attribute deduction_lines.
84 85 86 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 84 def deduction_lines @deduction_lines end |
#earnings_lines ⇒ Object
Returns the value of attribute earnings_lines.
75 76 77 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 75 def earnings_lines @earnings_lines end |
#employee_id ⇒ Object
The Xero identifier for payroll employee
24 25 26 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 24 def employee_id @employee_id end |
#employee_tax_lines ⇒ Object
Returns the value of attribute employee_tax_lines.
99 100 101 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 99 def employee_tax_lines @employee_tax_lines end |
#employer_tax_lines ⇒ Object
Returns the value of attribute employer_tax_lines.
102 103 104 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 102 def employer_tax_lines @employer_tax_lines end |
#first_name ⇒ Object
Employee first name
33 34 35 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 33 def first_name @first_name end |
#gross_earnings ⇒ Object
Total earnings before any deductions. Same as total earnings for UK.
42 43 44 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 42 def gross_earnings @gross_earnings end |
#last_edited ⇒ Object
The date payslip was last updated
30 31 32 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 30 def last_edited @last_edited end |
#last_name ⇒ Object
Employee last name
36 37 38 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 36 def last_name @last_name end |
#leave_accrual_lines ⇒ Object
Returns the value of attribute leave_accrual_lines.
90 91 92 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 90 def leave_accrual_lines @leave_accrual_lines end |
#leave_earnings_lines ⇒ Object
Returns the value of attribute leave_earnings_lines.
78 79 80 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 78 def leave_earnings_lines @leave_earnings_lines end |
#pay_run_id ⇒ Object
The Xero identifier for the associated payrun
27 28 29 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 27 def pay_run_id @pay_run_id end |
#pay_slip_id ⇒ Object
The Xero identifier for a Payslip
21 22 23 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 21 def pay_slip_id @pay_slip_id end |
#payment_lines ⇒ Object
Returns the value of attribute payment_lines.
96 97 98 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 96 def payment_lines @payment_lines end |
#payment_method ⇒ Object
The payment method code
69 70 71 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 69 def payment_method @payment_method end |
#reimbursement_lines ⇒ Object
Returns the value of attribute reimbursement_lines.
87 88 89 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 87 def reimbursement_lines @reimbursement_lines end |
#timesheet_earnings_lines ⇒ Object
Returns the value of attribute timesheet_earnings_lines.
81 82 83 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 81 def timesheet_earnings_lines @timesheet_earnings_lines end |
#total_benefits ⇒ Object
Benefits (also called fringe benefits, perquisites or perks) are various non-earnings compensations provided to employees in addition to their normal earnings or salaries
63 64 65 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 63 def total_benefits @total_benefits end |
#total_court_orders ⇒ Object
Total amounts required by law to subtract from the employee's earnings
60 61 62 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 60 def total_court_orders @total_court_orders end |
#total_deductions ⇒ Object
Total amount subtracted from an employee's earnings to reach total pay
54 55 56 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 54 def total_deductions @total_deductions end |
#total_earnings ⇒ Object
Total earnings before any deductions. Same as gross earnings for UK.
39 40 41 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 39 def total_earnings @total_earnings end |
#total_employee_taxes ⇒ Object
The part of an employee's earnings that is deducted for tax purposes
51 52 53 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 51 def total_employee_taxes @total_employee_taxes end |
#total_employer_taxes ⇒ Object
The employer's tax obligation
48 49 50 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 48 def total_employer_taxes @total_employer_taxes end |
#total_pay ⇒ Object
The employee net pay
45 46 47 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 45 def total_pay @total_pay end |
#total_reimbursements ⇒ Object
Total reimbursements are nontaxable payments to an employee used to repay out-of-pocket expenses when the person incurs those expenses through employment
57 58 59 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 57 def total_reimbursements @total_reimbursements end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 130 def self.attribute_map { :'pay_slip_id' => :'paySlipID', :'employee_id' => :'employeeID', :'pay_run_id' => :'payRunID', :'last_edited' => :'lastEdited', :'first_name' => :'firstName', :'last_name' => :'lastName', :'total_earnings' => :'totalEarnings', :'gross_earnings' => :'grossEarnings', :'total_pay' => :'totalPay', :'total_employer_taxes' => :'totalEmployerTaxes', :'total_employee_taxes' => :'totalEmployeeTaxes', :'total_deductions' => :'totalDeductions', :'total_reimbursements' => :'totalReimbursements', :'total_court_orders' => :'totalCourtOrders', :'total_benefits' => :'totalBenefits', :'bacs_hash' => :'bacsHash', :'payment_method' => :'paymentMethod', :'earnings_lines' => :'earningsLines', :'leave_earnings_lines' => :'leaveEarningsLines', :'timesheet_earnings_lines' => :'timesheetEarningsLines', :'deduction_lines' => :'deductionLines', :'reimbursement_lines' => :'reimbursementLines', :'leave_accrual_lines' => :'leaveAccrualLines', :'benefit_lines' => :'benefitLines', :'payment_lines' => :'paymentLines', :'employee_tax_lines' => :'employeeTaxLines', :'employer_tax_lines' => :'employerTaxLines', :'court_order_lines' => :'courtOrderLines' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
422 423 424 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 422 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_types ⇒ Object
Attribute type mapping.
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 164 def self.openapi_types { :'pay_slip_id' => :'String', :'employee_id' => :'String', :'pay_run_id' => :'String', :'last_edited' => :'Date', :'first_name' => :'String', :'last_name' => :'String', :'total_earnings' => :'Float', :'gross_earnings' => :'Float', :'total_pay' => :'Float', :'total_employer_taxes' => :'Float', :'total_employee_taxes' => :'Float', :'total_deductions' => :'Float', :'total_reimbursements' => :'Float', :'total_court_orders' => :'Float', :'total_benefits' => :'Float', :'bacs_hash' => :'String', :'payment_method' => :'String', :'earnings_lines' => :'Array<EarningsLine>', :'leave_earnings_lines' => :'Array<LeaveEarningsLine>', :'timesheet_earnings_lines' => :'Array<TimesheetEarningsLine>', :'deduction_lines' => :'Array<DeductionLine>', :'reimbursement_lines' => :'Array<ReimbursementLine>', :'leave_accrual_lines' => :'Array<LeaveAccrualLine>', :'benefit_lines' => :'Array<BenefitLine>', :'payment_lines' => :'Array<PaymentLine>', :'employee_tax_lines' => :'Array<TaxLine>', :'employer_tax_lines' => :'Array<TaxLine>', :'court_order_lines' => :'Array<CourtOrderLine>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 374 def ==(o) return true if self.equal?(o) self.class == o.class && pay_slip_id == o.pay_slip_id && employee_id == o.employee_id && pay_run_id == o.pay_run_id && last_edited == o.last_edited && first_name == o.first_name && last_name == o.last_name && total_earnings == o.total_earnings && gross_earnings == o.gross_earnings && total_pay == o.total_pay && total_employer_taxes == o.total_employer_taxes && total_employee_taxes == o.total_employee_taxes && total_deductions == o.total_deductions && total_reimbursements == o.total_reimbursements && total_court_orders == o.total_court_orders && total_benefits == o.total_benefits && bacs_hash == o.bacs_hash && payment_method == o.payment_method && earnings_lines == o.earnings_lines && leave_earnings_lines == o.leave_earnings_lines && timesheet_earnings_lines == o.timesheet_earnings_lines && deduction_lines == o.deduction_lines && reimbursement_lines == o.reimbursement_lines && leave_accrual_lines == o.leave_accrual_lines && benefit_lines == o.benefit_lines && payment_lines == o.payment_lines && employee_tax_lines == o.employee_tax_lines && employer_tax_lines == o.employer_tax_lines && court_order_lines == o.court_order_lines end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 450 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(parse_date(value)) when :Date Date.parse(parse_date(value)) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BigDecimal BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model XeroRuby::PayrollUk.const_get(type).build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
517 518 519 520 521 522 523 524 525 526 527 528 529 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 517 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 429 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
409 410 411 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 409 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
415 416 417 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 415 def hash [pay_slip_id, employee_id, pay_run_id, last_edited, first_name, last_name, total_earnings, gross_earnings, total_pay, total_employer_taxes, total_employee_taxes, total_deductions, total_reimbursements, total_court_orders, total_benefits, bacs_hash, payment_method, earnings_lines, leave_earnings_lines, timesheet_earnings_lines, deduction_lines, reimbursement_lines, leave_accrual_lines, benefit_lines, payment_lines, employee_tax_lines, employer_tax_lines, court_order_lines].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
349 350 351 352 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 349 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#parse_date(datestring) ⇒ Object
customized data_parser
532 533 534 535 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 532 def parse_date(datestring) seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0 return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
497 498 499 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 497 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
503 504 505 506 507 508 509 510 511 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 503 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
491 492 493 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 491 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
356 357 358 359 360 |
# File 'lib/xero-ruby/models/payroll_uk/payslip.rb', line 356 def valid? payment_method_validator = EnumAttributeValidator.new('String', ["Cheque", "Electronically", "Manual"]) return false unless payment_method_validator.valid?(@payment_method) true end |