Class: Gusto::CreateReport

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

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request_uuid: OMIT, company_uuid: OMIT, custom_name: OMIT, file_type: OMIT, additional_properties: nil) ⇒ Gusto::CreateReport

Parameters:

  • request_uuid (String) (defaults to: OMIT)

    A unique identifier of the report request

  • company_uuid (String) (defaults to: OMIT)

    Company UUID

  • custom_name (String) (defaults to: OMIT)

    Title of the report

  • file_type (String) (defaults to: OMIT)

    File type

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



29
30
31
32
33
34
35
36
37
38
# File 'lib/fern_gusto/types/create_report.rb', line 29

def initialize(request_uuid: OMIT, company_uuid: OMIT, custom_name: OMIT, file_type: OMIT, additional_properties: nil)
  @request_uuid = request_uuid if request_uuid != OMIT
  @company_uuid = company_uuid if company_uuid != OMIT
  @custom_name = custom_name if custom_name != OMIT
  @file_type = file_type if file_type != OMIT
  @additional_properties = additional_properties
  @_field_set = { "request_uuid": request_uuid, "company_uuid": company_uuid, "custom_name": custom_name, "file_type": file_type }.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



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

def additional_properties
  @additional_properties
end

#company_uuidString (readonly)

Returns Company UUID.

Returns:

  • (String)

    Company UUID



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

def company_uuid
  @company_uuid
end

#custom_nameString (readonly)

Returns Title of the report.

Returns:

  • (String)

    Title of the report



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

def custom_name
  @custom_name
end

#file_typeString (readonly)

Returns File type.

Returns:

  • (String)

    File type



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

def file_type
  @file_type
end

#request_uuidString (readonly)

Returns A unique identifier of the report request.

Returns:

  • (String)

    A unique identifier of the report request



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

def request_uuid
  @request_uuid
end

Class Method Details

.from_json(json_object:) ⇒ Gusto::CreateReport

Parameters:

  • json_object (String)

Returns:



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/fern_gusto/types/create_report.rb', line 43

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  request_uuid = parsed_json["request_uuid"]
  company_uuid = parsed_json["company_uuid"]
  custom_name = parsed_json["custom_name"]
  file_type = parsed_json["file_type"]
  new(
    request_uuid: request_uuid,
    company_uuid: company_uuid,
    custom_name: custom_name,
    file_type: file_type,
    additional_properties: struct
  )
end

.validate_raw(obj:) ⇒ Void

Parameters:

  • obj (Object)

Returns:

  • (Void)


70
71
72
73
74
75
# File 'lib/fern_gusto/types/create_report.rb', line 70

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

Instance Method Details

#to_jsonString

Returns:

  • (String)


61
62
63
# File 'lib/fern_gusto/types/create_report.rb', line 61

def to_json
  @_field_set&.to_json
end