Class: Gusto::PayrollReceiptEmployeeCompensationsItem

Inherits:
Object
  • Object
show all
Defined in:
lib/fern_gusto/types/payroll_receipt_employee_compensations_item.rb

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(employee_uuid: OMIT, employee_first_name: OMIT, employee_last_name: OMIT, payment_method: OMIT, net_pay: OMIT, total_tax: OMIT, total_garnishments: OMIT, child_support_garnishment: OMIT, total_reimbursement: OMIT, additional_properties: nil) ⇒ Gusto::PayrollReceiptEmployeeCompensationsItem

Parameters:

  • total_tax (String) (defaults to: OMIT)

    The total of employer and employee taxes for the pay period.

  • total_garnishments (String) (defaults to: OMIT)

    The total garnishments for the pay period.

  • child_support_garnishment (String) (defaults to: OMIT)

    The total child support garnishment for the pay period.

  • total_reimbursement (String) (defaults to: OMIT)

    The total reimbursement for the pay period.

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/fern_gusto/types/payroll_receipt_employee_compensations_item.rb', line 46

def initialize(employee_uuid: OMIT, employee_first_name: OMIT, employee_last_name: OMIT, payment_method: OMIT, net_pay: OMIT, total_tax: OMIT, total_garnishments: OMIT, child_support_garnishment: OMIT, total_reimbursement: OMIT, additional_properties: nil)
  @employee_uuid = employee_uuid if employee_uuid != OMIT
  @employee_first_name = employee_first_name if employee_first_name != OMIT
  @employee_last_name = employee_last_name if employee_last_name != OMIT
  @payment_method = payment_method if payment_method != OMIT
  @net_pay = net_pay if net_pay != OMIT
  @total_tax = total_tax if total_tax != OMIT
  @total_garnishments = total_garnishments if total_garnishments != OMIT
  @child_support_garnishment = child_support_garnishment if child_support_garnishment != OMIT
  @total_reimbursement = total_reimbursement if total_reimbursement != OMIT
  @additional_properties = additional_properties
  @_field_set = { "employee_uuid": employee_uuid, "employee_first_name": employee_first_name, "employee_last_name": employee_last_name, "payment_method": payment_method, "net_pay": net_pay, "total_tax": total_tax, "total_garnishments": total_garnishments, "child_support_garnishment": child_support_garnishment, "total_reimbursement": total_reimbursement }.reject do | _k, v |
  v == OMIT
end
end

Instance Attribute Details

#additional_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    Additional properties unmapped to the current class definition



27
28
29
# File 'lib/fern_gusto/types/payroll_receipt_employee_compensations_item.rb', line 27

def additional_properties
  @additional_properties
end

#child_support_garnishmentString (readonly)

Returns The total child support garnishment for the pay period.

Returns:

  • (String)

    The total child support garnishment for the pay period.



23
24
25
# File 'lib/fern_gusto/types/payroll_receipt_employee_compensations_item.rb', line 23

def child_support_garnishment
  @child_support_garnishment
end

#employee_first_nameString (readonly)

Returns The first name of the employee.

Returns:

  • (String)

    The first name of the employee.



10
11
12
# File 'lib/fern_gusto/types/payroll_receipt_employee_compensations_item.rb', line 10

def employee_first_name
  @employee_first_name
end

#employee_last_nameString (readonly)

Returns The last name of the employee.

Returns:

  • (String)

    The last name of the employee.



12
13
14
# File 'lib/fern_gusto/types/payroll_receipt_employee_compensations_item.rb', line 12

def employee_last_name
  @employee_last_name
end

#employee_uuidString (readonly)

Returns The UUID of the employee.

Returns:

  • (String)

    The UUID of the employee.



8
9
10
# File 'lib/fern_gusto/types/payroll_receipt_employee_compensations_item.rb', line 8

def employee_uuid
  @employee_uuid
end

#net_payObject (readonly)

not included in the ‘[“totals”]` amount.



17
18
19
# File 'lib/fern_gusto/types/payroll_receipt_employee_compensations_item.rb', line 17

def net_pay
  @net_pay
end

#payment_methodString (readonly)

Returns The employee’s compensation payment method.nn‘Check` `Direct Deposit`.

Returns:

  • (String)

    The employee’s compensation payment method.nn‘Check` `Direct Deposit`



14
15
16
# File 'lib/fern_gusto/types/payroll_receipt_employee_compensations_item.rb', line 14

def payment_method
  @payment_method
end

#total_garnishmentsString (readonly)

Returns The total garnishments for the pay period.

Returns:

  • (String)

    The total garnishments for the pay period.



21
22
23
# File 'lib/fern_gusto/types/payroll_receipt_employee_compensations_item.rb', line 21

def total_garnishments
  @total_garnishments
end

#total_reimbursementString (readonly)

Returns The total reimbursement for the pay period.

Returns:

  • (String)

    The total reimbursement for the pay period.



25
26
27
# File 'lib/fern_gusto/types/payroll_receipt_employee_compensations_item.rb', line 25

def total_reimbursement
  @total_reimbursement
end

#total_taxString (readonly)

Returns The total of employer and employee taxes for the pay period.

Returns:

  • (String)

    The total of employer and employee taxes for the pay period.



19
20
21
# File 'lib/fern_gusto/types/payroll_receipt_employee_compensations_item.rb', line 19

def total_tax
  @total_tax
end

Class Method Details

.from_json(json_object:) ⇒ Gusto::PayrollReceiptEmployeeCompensationsItem

Parameters:

  • json_object (String)

Returns:



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/fern_gusto/types/payroll_receipt_employee_compensations_item.rb', line 66

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  employee_uuid = parsed_json["employee_uuid"]
  employee_first_name = parsed_json["employee_first_name"]
  employee_last_name = parsed_json["employee_last_name"]
  payment_method = parsed_json["payment_method"]
  net_pay = parsed_json["net_pay"]
  total_tax = parsed_json["total_tax"]
  total_garnishments = parsed_json["total_garnishments"]
  child_support_garnishment = parsed_json["child_support_garnishment"]
  total_reimbursement = parsed_json["total_reimbursement"]
  new(
    employee_uuid: employee_uuid,
    employee_first_name: employee_first_name,
    employee_last_name: employee_last_name,
    payment_method: payment_method,
    net_pay: net_pay,
    total_tax: total_tax,
    total_garnishments: total_garnishments,
    child_support_garnishment: child_support_garnishment,
    total_reimbursement: total_reimbursement,
    additional_properties: struct
  )
end

.validate_raw(obj:) ⇒ Void

Parameters:

  • obj (Object)

Returns:

  • (Void)


104
105
106
107
108
109
110
111
112
113
114
# File 'lib/fern_gusto/types/payroll_receipt_employee_compensations_item.rb', line 104

def self.validate_raw(obj:)
  obj.employee_uuid&.is_a?(String) != false || raise("Passed value for field obj.employee_uuid is not the expected type, validation failed.")
  obj.employee_first_name&.is_a?(String) != false || raise("Passed value for field obj.employee_first_name is not the expected type, validation failed.")
  obj.employee_last_name&.is_a?(String) != false || raise("Passed value for field obj.employee_last_name is not the expected type, validation failed.")
  obj.payment_method&.is_a?(String) != false || raise("Passed value for field obj.payment_method is not the expected type, validation failed.")
  obj.net_pay&.is_a?(String) != false || raise("Passed value for field obj.net_pay is not the expected type, validation failed.")
  obj.total_tax&.is_a?(String) != false || raise("Passed value for field obj.total_tax is not the expected type, validation failed.")
  obj.total_garnishments&.is_a?(String) != false || raise("Passed value for field obj.total_garnishments is not the expected type, validation failed.")
  obj.child_support_garnishment&.is_a?(String) != false || raise("Passed value for field obj.child_support_garnishment is not the expected type, validation failed.")
  obj.total_reimbursement&.is_a?(String) != false || raise("Passed value for field obj.total_reimbursement is not the expected type, validation failed.")
end

Instance Method Details

#to_jsonString

Returns:

  • (String)


95
96
97
# File 'lib/fern_gusto/types/payroll_receipt_employee_compensations_item.rb', line 95

def to_json
  @_field_set&.to_json
end