Class: Gusto::Companies::ExternalPayrolls::ExternalPayrollsUpdateRequestExternalPayrollItemsItemBenefitsItem
- Inherits:
-
Object
- Object
- Gusto::Companies::ExternalPayrolls::ExternalPayrollsUpdateRequestExternalPayrollItemsItemBenefitsItem
- Defined in:
- lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item_benefits_item.rb
Overview
benefits include 401k, health insurance and more.
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#benefit_id ⇒ Integer
readonly
The ID of the benefit.
-
#company_contribution_amount ⇒ String
readonly
Company contribution amount towards the benefit.
-
#employee_deduction_amount ⇒ String
readonly
Employee deduction amount towards the benefit.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::Companies::ExternalPayrolls::ExternalPayrollsUpdateRequestExternalPayrollItemsItemBenefitsItem
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(company_contribution_amount: OMIT, employee_deduction_amount: OMIT, benefit_id: OMIT, additional_properties: nil) ⇒ Gusto::Companies::ExternalPayrolls::ExternalPayrollsUpdateRequestExternalPayrollItemsItemBenefitsItem constructor
- #to_json ⇒ String
Constructor Details
#initialize(company_contribution_amount: OMIT, employee_deduction_amount: OMIT, benefit_id: OMIT, additional_properties: nil) ⇒ Gusto::Companies::ExternalPayrolls::ExternalPayrollsUpdateRequestExternalPayrollItemsItemBenefitsItem
30 31 32 33 34 35 36 37 38 |
# File 'lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item_benefits_item.rb', line 30 def initialize(company_contribution_amount: OMIT, employee_deduction_amount: OMIT, benefit_id: OMIT, additional_properties: nil) @company_contribution_amount = company_contribution_amount if company_contribution_amount != OMIT @employee_deduction_amount = employee_deduction_amount if employee_deduction_amount != OMIT @benefit_id = benefit_id if benefit_id != OMIT @additional_properties = additional_properties @_field_set = { "company_contribution_amount": company_contribution_amount, "employee_deduction_amount": employee_deduction_amount, "benefit_id": benefit_id }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
18 19 20 |
# File 'lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item_benefits_item.rb', line 18 def additional_properties @additional_properties end |
#benefit_id ⇒ Integer (readonly)
Returns The ID of the benefit.
16 17 18 |
# File 'lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item_benefits_item.rb', line 16 def benefit_id @benefit_id end |
#company_contribution_amount ⇒ String (readonly)
Returns Company contribution amount towards the benefit.
12 13 14 |
# File 'lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item_benefits_item.rb', line 12 def company_contribution_amount @company_contribution_amount end |
#employee_deduction_amount ⇒ String (readonly)
Returns Employee deduction amount towards the benefit.
14 15 16 |
# File 'lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item_benefits_item.rb', line 14 def employee_deduction_amount @employee_deduction_amount end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::Companies::ExternalPayrolls::ExternalPayrollsUpdateRequestExternalPayrollItemsItemBenefitsItem
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item_benefits_item.rb', line 44 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) company_contribution_amount = parsed_json["company_contribution_amount"] employee_deduction_amount = parsed_json["employee_deduction_amount"] benefit_id = parsed_json["benefit_id"] new( company_contribution_amount: company_contribution_amount, employee_deduction_amount: employee_deduction_amount, benefit_id: benefit_id, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
71 72 73 74 75 |
# File 'lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item_benefits_item.rb', line 71 def self.validate_raw(obj:) obj.company_contribution_amount&.is_a?(String) != false || raise("Passed value for field obj.company_contribution_amount is not the expected type, validation failed.") obj.employee_deduction_amount&.is_a?(String) != false || raise("Passed value for field obj.employee_deduction_amount is not the expected type, validation failed.") obj.benefit_id&.is_a?(Integer) != false || raise("Passed value for field obj.benefit_id is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
62 63 64 |
# File 'lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item_benefits_item.rb', line 62 def to_json @_field_set&.to_json end |