Class: Gusto::ContractorPayments::ContractorPaymentSummaryTotal
- Inherits:
-
Object
- Object
- Gusto::ContractorPayments::ContractorPaymentSummaryTotal
- Defined in:
- lib/fern_gusto/contractor_payments/types/contractor_payment_summary_total.rb
Overview
time period.
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#reimbursements ⇒ String
readonly
The total reimbursements for contractor payments within a given time period.
-
#wages ⇒ String
readonly
The total wages for contractor payments within a given time period.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Gusto::ContractorPayments::ContractorPaymentSummaryTotal
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(reimbursements: OMIT, wages: OMIT, additional_properties: nil) ⇒ Gusto::ContractorPayments::ContractorPaymentSummaryTotal constructor
- #to_json ⇒ String
Constructor Details
#initialize(reimbursements: OMIT, wages: OMIT, additional_properties: nil) ⇒ Gusto::ContractorPayments::ContractorPaymentSummaryTotal
26 27 28 29 30 31 32 33 |
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_total.rb', line 26 def initialize(reimbursements: OMIT, wages: OMIT, additional_properties: nil) @reimbursements = reimbursements if reimbursements != OMIT @wages = wages if wages != OMIT @additional_properties = additional_properties @_field_set = { "reimbursements": reimbursements, "wages": wages }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
15 16 17 |
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_total.rb', line 15 def additional_properties @additional_properties end |
#reimbursements ⇒ String (readonly)
Returns The total reimbursements for contractor payments within a given time period.
11 12 13 |
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_total.rb', line 11 def reimbursements @reimbursements end |
#wages ⇒ String (readonly)
Returns The total wages for contractor payments within a given time period.
13 14 15 |
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_total.rb', line 13 def wages @wages end |
Class Method Details
.from_json(json_object:) ⇒ Gusto::ContractorPayments::ContractorPaymentSummaryTotal
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_total.rb', line 38 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) reimbursements = parsed_json["reimbursements"] wages = parsed_json["wages"] new( reimbursements: reimbursements, wages: wages, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
61 62 63 64 |
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_total.rb', line 61 def self.validate_raw(obj:) obj.reimbursements&.is_a?(String) != false || raise("Passed value for field obj.reimbursements is not the expected type, validation failed.") obj.wages&.is_a?(String) != false || raise("Passed value for field obj.wages is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
52 53 54 |
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_total.rb', line 52 def to_json @_field_set&.to_json end |