Class: Gusto::PayrollReceiptEmployeeCompensationsItem
- Inherits:
-
Object
- Object
- Gusto::PayrollReceiptEmployeeCompensationsItem
- Defined in:
- lib/fern_gusto/types/payroll_receipt_employee_compensations_item.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#child_support_garnishment ⇒ String
readonly
The total child support garnishment for the pay period.
-
#employee_first_name ⇒ String
readonly
The first name of the employee.
-
#employee_last_name ⇒ String
readonly
The last name of the employee.
-
#employee_uuid ⇒ String
readonly
The UUID of the employee.
-
#net_pay ⇒ Object
readonly
not included in the ‘[“totals”]` amount.
-
#payment_method ⇒ String
readonly
The employee’s compensation payment method.nn‘Check` `Direct Deposit`.
-
#total_garnishments ⇒ String
readonly
The total garnishments for the pay period.
-
#total_reimbursement ⇒ String
readonly
The total reimbursement for the pay period.
-
#total_tax ⇒ String
readonly
The total of employer and employee taxes for the pay period.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::PayrollReceiptEmployeeCompensationsItem
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #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 constructor
- #to_json ⇒ String
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
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_properties ⇒ OpenStruct (readonly)
Returns 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_garnishment ⇒ String (readonly)
Returns 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_name ⇒ String (readonly)
Returns 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_name ⇒ String (readonly)
Returns 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_uuid ⇒ String (readonly)
Returns 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_pay ⇒ Object (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_method ⇒ String (readonly)
Returns 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_garnishments ⇒ String (readonly)
Returns 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_reimbursement ⇒ String (readonly)
Returns 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_tax ⇒ String (readonly)
Returns 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
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
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_json ⇒ 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 |