Class: Gusto::Payrolls::EmployeePayStub
- Inherits:
-
Object
- Object
- Gusto::Payrolls::EmployeePayStub
- Defined in:
- lib/fern_gusto/payrolls/types/employee_pay_stub.rb
Overview
The representation of an employee pay stub information.
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#check_amount ⇒ String
readonly
The check amount for the pay stub.
-
#check_date ⇒ String
readonly
The check date of the pay stub.
-
#gross_pay ⇒ String
readonly
The gross pay amount for the pay stub.
-
#net_pay ⇒ String
readonly
The net pay amount for the pay stub.
-
#payroll_uuid ⇒ String
readonly
A unique identifier of the payroll to which the pay stub belongs.
-
#uuid ⇒ String
readonly
The UUID of the employee pay stub.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(uuid:, check_date: OMIT, gross_pay: OMIT, net_pay: OMIT, payroll_uuid: OMIT, check_amount: OMIT, additional_properties: nil) ⇒ Gusto::Payrolls::EmployeePayStub constructor
- #to_json ⇒ String
Constructor Details
#initialize(uuid:, check_date: OMIT, gross_pay: OMIT, net_pay: OMIT, payroll_uuid: OMIT, check_amount: OMIT, additional_properties: nil) ⇒ Gusto::Payrolls::EmployeePayStub
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/fern_gusto/payrolls/types/employee_pay_stub.rb', line 37 def initialize(uuid:, check_date: OMIT, gross_pay: OMIT, net_pay: OMIT, payroll_uuid: OMIT, check_amount: OMIT, additional_properties: nil) @uuid = uuid @check_date = check_date if check_date != OMIT @gross_pay = gross_pay if gross_pay != OMIT @net_pay = net_pay if net_pay != OMIT @payroll_uuid = payroll_uuid if payroll_uuid != OMIT @check_amount = check_amount if check_amount != OMIT @additional_properties = additional_properties @_field_set = { "uuid": uuid, "check_date": check_date, "gross_pay": gross_pay, "net_pay": net_pay, "payroll_uuid": payroll_uuid, "check_amount": check_amount }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
22 23 24 |
# File 'lib/fern_gusto/payrolls/types/employee_pay_stub.rb', line 22 def additional_properties @additional_properties end |
#check_amount ⇒ String (readonly)
Returns The check amount for the pay stub.
20 21 22 |
# File 'lib/fern_gusto/payrolls/types/employee_pay_stub.rb', line 20 def check_amount @check_amount end |
#check_date ⇒ String (readonly)
Returns The check date of the pay stub.
12 13 14 |
# File 'lib/fern_gusto/payrolls/types/employee_pay_stub.rb', line 12 def check_date @check_date end |
#gross_pay ⇒ String (readonly)
Returns The gross pay amount for the pay stub.
14 15 16 |
# File 'lib/fern_gusto/payrolls/types/employee_pay_stub.rb', line 14 def gross_pay @gross_pay end |
#net_pay ⇒ String (readonly)
Returns The net pay amount for the pay stub.
16 17 18 |
# File 'lib/fern_gusto/payrolls/types/employee_pay_stub.rb', line 16 def net_pay @net_pay end |
#payroll_uuid ⇒ String (readonly)
Returns A unique identifier of the payroll to which the pay stub belongs.
18 19 20 |
# File 'lib/fern_gusto/payrolls/types/employee_pay_stub.rb', line 18 def payroll_uuid @payroll_uuid end |
#uuid ⇒ String (readonly)
Returns The UUID of the employee pay stub.
10 11 12 |
# File 'lib/fern_gusto/payrolls/types/employee_pay_stub.rb', line 10 def uuid @uuid end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::Payrolls::EmployeePayStub
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/fern_gusto/payrolls/types/employee_pay_stub.rb', line 53 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) uuid = parsed_json["uuid"] check_date = parsed_json["check_date"] gross_pay = parsed_json["gross_pay"] net_pay = parsed_json["net_pay"] payroll_uuid = parsed_json["payroll_uuid"] check_amount = parsed_json["check_amount"] new( uuid: uuid, check_date: check_date, gross_pay: gross_pay, net_pay: net_pay, payroll_uuid: payroll_uuid, check_amount: check_amount, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
84 85 86 87 88 89 90 91 |
# File 'lib/fern_gusto/payrolls/types/employee_pay_stub.rb', line 84 def self.validate_raw(obj:) obj.uuid.is_a?(String) != false || raise("Passed value for field obj.uuid is not the expected type, validation failed.") obj.check_date&.is_a?(String) != false || raise("Passed value for field obj.check_date is not the expected type, validation failed.") obj.gross_pay&.is_a?(String) != false || raise("Passed value for field obj.gross_pay 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.payroll_uuid&.is_a?(String) != false || raise("Passed value for field obj.payroll_uuid is not the expected type, validation failed.") obj.check_amount&.is_a?(String) != false || raise("Passed value for field obj.check_amount is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
75 76 77 |
# File 'lib/fern_gusto/payrolls/types/employee_pay_stub.rb', line 75 def to_json @_field_set&.to_json end |