Class: Gusto::PaySchedules::PayScheduleAssignmentPayPeriod

Inherits:
Object
  • Object
show all
Defined in:
lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_pay_period.rb

Overview

Pay schedule assignment first pay period information.

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pay_schedule_uuid: OMIT, start_date: OMIT, end_date: OMIT, check_date: OMIT, additional_properties: nil) ⇒ Gusto::PaySchedules::PayScheduleAssignmentPayPeriod

Parameters:

  • pay_schedule_uuid (String) (defaults to: OMIT)

    The pay schedule UUID.

  • start_date (String) (defaults to: OMIT)

    Pay period start date.

  • end_date (String) (defaults to: OMIT)

    Pay period end date.

  • check_date (String) (defaults to: OMIT)

    Pay period check date.

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



31
32
33
34
35
36
37
38
39
40
# File 'lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_pay_period.rb', line 31

def initialize(pay_schedule_uuid: OMIT, start_date: OMIT, end_date: OMIT, check_date: OMIT, additional_properties: nil)
  @pay_schedule_uuid = pay_schedule_uuid if pay_schedule_uuid != OMIT
  @start_date = start_date if start_date != OMIT
  @end_date = end_date if end_date != OMIT
  @check_date = check_date if check_date != OMIT
  @additional_properties = additional_properties
  @_field_set = { "pay_schedule_uuid": pay_schedule_uuid, "start_date": start_date, "end_date": end_date, "check_date": check_date }.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



18
19
20
# File 'lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_pay_period.rb', line 18

def additional_properties
  @additional_properties
end

#check_dateString (readonly)

Returns Pay period check date.

Returns:

  • (String)

    Pay period check date.



16
17
18
# File 'lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_pay_period.rb', line 16

def check_date
  @check_date
end

#end_dateString (readonly)

Returns Pay period end date.

Returns:

  • (String)

    Pay period end date.



14
15
16
# File 'lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_pay_period.rb', line 14

def end_date
  @end_date
end

#pay_schedule_uuidString (readonly)

Returns The pay schedule UUID.

Returns:

  • (String)

    The pay schedule UUID.



10
11
12
# File 'lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_pay_period.rb', line 10

def pay_schedule_uuid
  @pay_schedule_uuid
end

#start_dateString (readonly)

Returns Pay period start date.

Returns:

  • (String)

    Pay period start date.



12
13
14
# File 'lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_pay_period.rb', line 12

def start_date
  @start_date
end

Class Method Details

.from_json(json_object:) ⇒ Gusto::PaySchedules::PayScheduleAssignmentPayPeriod

Parameters:

  • json_object (String)

Returns:



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_pay_period.rb', line 45

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  pay_schedule_uuid = parsed_json["pay_schedule_uuid"]
  start_date = parsed_json["start_date"]
  end_date = parsed_json["end_date"]
  check_date = parsed_json["check_date"]
  new(
    pay_schedule_uuid: pay_schedule_uuid,
    start_date: start_date,
    end_date: end_date,
    check_date: check_date,
    additional_properties: struct
  )
end

.validate_raw(obj:) ⇒ Void

Parameters:

  • obj (Object)

Returns:

  • (Void)


72
73
74
75
76
77
# File 'lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_pay_period.rb', line 72

def self.validate_raw(obj:)
  obj.pay_schedule_uuid&.is_a?(String) != false || raise("Passed value for field obj.pay_schedule_uuid is not the expected type, validation failed.")
  obj.start_date&.is_a?(String) != false || raise("Passed value for field obj.start_date is not the expected type, validation failed.")
  obj.end_date&.is_a?(String) != false || raise("Passed value for field obj.end_date 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.")
end

Instance Method Details

#to_jsonString

Returns:

  • (String)


63
64
65
# File 'lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_pay_period.rb', line 63

def to_json
  @_field_set&.to_json
end