Class: Gusto::CreateReport
- Inherits:
-
Object
- Object
- Gusto::CreateReport
- Defined in:
- lib/fern_gusto/types/create_report.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#company_uuid ⇒ String
readonly
Company UUID.
-
#custom_name ⇒ String
readonly
Title of the report.
-
#file_type ⇒ String
readonly
File type.
-
#request_uuid ⇒ String
readonly
A unique identifier of the report request.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(request_uuid: OMIT, company_uuid: OMIT, custom_name: OMIT, file_type: OMIT, additional_properties: nil) ⇒ Gusto::CreateReport constructor
- #to_json ⇒ String
Constructor Details
#initialize(request_uuid: OMIT, company_uuid: OMIT, custom_name: OMIT, file_type: OMIT, additional_properties: nil) ⇒ Gusto::CreateReport
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_properties ⇒ OpenStruct (readonly)
Returns 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_uuid ⇒ String (readonly)
Returns Company UUID.
10 11 12 |
# File 'lib/fern_gusto/types/create_report.rb', line 10 def company_uuid @company_uuid end |
#custom_name ⇒ String (readonly)
Returns Title of the report.
12 13 14 |
# File 'lib/fern_gusto/types/create_report.rb', line 12 def custom_name @custom_name end |
#file_type ⇒ String (readonly)
Returns File type.
14 15 16 |
# File 'lib/fern_gusto/types/create_report.rb', line 14 def file_type @file_type end |
#request_uuid ⇒ String (readonly)
Returns 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
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
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_json ⇒ String
61 62 63 |
# File 'lib/fern_gusto/types/create_report.rb', line 61 def to_json @_field_set&.to_json end |