Class: Gusto::PayrollCheck

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

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payroll_uuid: OMIT, printing_format: OMIT, starting_check_number: OMIT, request_uuid: OMIT, status: OMIT, additional_properties: nil) ⇒ Gusto::PayrollCheck

Parameters:

  • payroll_uuid (String) (defaults to: OMIT)

    A unique identifier of the payroll.

  • printing_format (String) (defaults to: OMIT)

    The format the checks will be printed.

  • starting_check_number (String) (defaults to: OMIT)

    The starting check number for the checks being printed.

  • request_uuid (String) (defaults to: OMIT)

    A unique identifier of the Generated Document request

  • status (String) (defaults to: OMIT)

    Current status of the Generated Document

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



32
33
34
35
36
37
38
39
40
41
42
# File 'lib/fern_gusto/types/payroll_check.rb', line 32

def initialize(payroll_uuid: OMIT, printing_format: OMIT, starting_check_number: OMIT, request_uuid: OMIT, status: OMIT, additional_properties: nil)
  @payroll_uuid = payroll_uuid if payroll_uuid != OMIT
  @printing_format = printing_format if printing_format != OMIT
  @starting_check_number = starting_check_number if starting_check_number != OMIT
  @request_uuid = request_uuid if request_uuid != OMIT
  @status = status if status != OMIT
  @additional_properties = additional_properties
  @_field_set = { "payroll_uuid": payroll_uuid, "printing_format": printing_format, "starting_check_number": starting_check_number, "request_uuid": request_uuid, "status": status }.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/types/payroll_check.rb', line 18

def additional_properties
  @additional_properties
end

#payroll_uuidString (readonly)

Returns A unique identifier of the payroll.

Returns:

  • (String)

    A unique identifier of the payroll.



8
9
10
# File 'lib/fern_gusto/types/payroll_check.rb', line 8

def payroll_uuid
  @payroll_uuid
end

#printing_formatString (readonly)

Returns The format the checks will be printed.

Returns:

  • (String)

    The format the checks will be printed.



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

def printing_format
  @printing_format
end

#request_uuidString (readonly)

Returns A unique identifier of the Generated Document request.

Returns:

  • (String)

    A unique identifier of the Generated Document request



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

def request_uuid
  @request_uuid
end

#starting_check_numberString (readonly)

Returns The starting check number for the checks being printed.

Returns:

  • (String)

    The starting check number for the checks being printed.



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

def starting_check_number
  @starting_check_number
end

#statusString (readonly)

Returns Current status of the Generated Document.

Returns:

  • (String)

    Current status of the Generated Document



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

def status
  @status
end

Class Method Details

.from_json(json_object:) ⇒ Gusto::PayrollCheck

Parameters:

  • json_object (String)

Returns:



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/fern_gusto/types/payroll_check.rb', line 47

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  payroll_uuid = parsed_json["payroll_uuid"]
  printing_format = parsed_json["printing_format"]
  starting_check_number = parsed_json["starting_check_number"]
  request_uuid = parsed_json["request_uuid"]
  status = parsed_json["status"]
  new(
    payroll_uuid: payroll_uuid,
    printing_format: printing_format,
    starting_check_number: starting_check_number,
    request_uuid: request_uuid,
    status: status,
    additional_properties: struct
  )
end

.validate_raw(obj:) ⇒ Void

Parameters:

  • obj (Object)

Returns:

  • (Void)


76
77
78
79
80
81
82
# File 'lib/fern_gusto/types/payroll_check.rb', line 76

def self.validate_raw(obj:)
  obj.payroll_uuid&.is_a?(String) != false || raise("Passed value for field obj.payroll_uuid is not the expected type, validation failed.")
  obj.printing_format&.is_a?(String) != false || raise("Passed value for field obj.printing_format is not the expected type, validation failed.")
  obj.starting_check_number&.is_a?(String) != false || raise("Passed value for field obj.starting_check_number is not the expected type, validation failed.")
  obj.request_uuid&.is_a?(String) != false || raise("Passed value for field obj.request_uuid is not the expected type, validation failed.")
  obj.status&.is_a?(String) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
end

Instance Method Details

#to_jsonString

Returns:

  • (String)


67
68
69
# File 'lib/fern_gusto/types/payroll_check.rb', line 67

def to_json
  @_field_set&.to_json
end