Class: Gusto::ContractorPayments::ContractorPaymentSummaryByDatesTotal

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

Overview

time period.

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reimbursements: OMIT, wages: OMIT, additional_properties: nil) ⇒ Gusto::ContractorPayments::ContractorPaymentSummaryByDatesTotal

Parameters:

  • reimbursements (String) (defaults to: OMIT)

    The total reimbursements for contractor payments within a given time period.

  • wages (String) (defaults to: OMIT)

    The total wages for contractor payments within a given time period.

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



26
27
28
29
30
31
32
33
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_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_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    Additional properties unmapped to the current class definition



15
16
17
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_total.rb', line 15

def additional_properties
  @additional_properties
end

#reimbursementsString (readonly)

Returns The total reimbursements for contractor payments within a given time period.

Returns:

  • (String)

    The total reimbursements for contractor payments within a given time period.



11
12
13
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_total.rb', line 11

def reimbursements
  @reimbursements
end

#wagesString (readonly)

Returns The total wages for contractor payments within a given time period.

Returns:

  • (String)

    The total wages for contractor payments within a given time period.



13
14
15
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_total.rb', line 13

def wages
  @wages
end

Class Method Details

.from_json(json_object:) ⇒ Gusto::ContractorPayments::ContractorPaymentSummaryByDatesTotal

Parameters:

  • json_object (String)

Returns:



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_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

Parameters:

  • obj (Object)

Returns:

  • (Void)


61
62
63
64
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_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_jsonString

Returns:

  • (String)


52
53
54
# File 'lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_total.rb', line 52

def to_json
  @_field_set&.to_json
end