Class: Merge::Ats::ScheduledInterviewRequest
- Inherits:
-
Object
- Object
- Merge::Ats::ScheduledInterviewRequest
- Defined in:
- lib/merge_ruby_client/ats/types/scheduled_interview_request.rb
Overview
# The ScheduledInterview Object
### Description
The `ScheduledInterview` object is used to represent a scheduled interview for a
given candidate’s application to a job. An `Application` can have multiple
`ScheduledInterview`s depending on the particular hiring process.
### Usage Example
Fetch from the `LIST ScheduledInterviews` endpoint and filter by `interviewers`
to show all office locations.
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#application ⇒ Merge::Ats::ScheduledInterviewRequestApplication
readonly
The application being interviewed.
-
#end_at ⇒ DateTime
readonly
When the interview was ended.
- #integration_params ⇒ Hash{String => Object} readonly
-
#interviewers ⇒ Array<Merge::Ats::ScheduledInterviewRequestInterviewersItem>
readonly
Array of ‘RemoteUser` IDs.
-
#job_interview_stage ⇒ Merge::Ats::ScheduledInterviewRequestJobInterviewStage
readonly
The stage of the interview.
- #linked_account_params ⇒ Hash{String => Object} readonly
-
#location ⇒ String
readonly
The interview’s location.
-
#organizer ⇒ Merge::Ats::ScheduledInterviewRequestOrganizer
readonly
The user organizing the interview.
-
#start_at ⇒ DateTime
readonly
When the interview was started.
-
#status ⇒ Merge::Ats::ScheduledInterviewStatusEnum
readonly
The interview’s status.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Merge::Ats::ScheduledInterviewRequest
Deserialize a JSON object to an instance of ScheduledInterviewRequest.
-
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object’s property definitions.
Instance Method Summary collapse
- #initialize(application: OMIT, job_interview_stage: OMIT, organizer: OMIT, interviewers: OMIT, location: OMIT, start_at: OMIT, end_at: OMIT, status: OMIT, integration_params: OMIT, linked_account_params: OMIT, additional_properties: nil) ⇒ Merge::Ats::ScheduledInterviewRequest constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of ScheduledInterviewRequest to a JSON object.
Constructor Details
#initialize(application: OMIT, job_interview_stage: OMIT, organizer: OMIT, interviewers: OMIT, location: OMIT, start_at: OMIT, end_at: OMIT, status: OMIT, integration_params: OMIT, linked_account_params: OMIT, additional_properties: nil) ⇒ Merge::Ats::ScheduledInterviewRequest
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/merge_ruby_client/ats/types/scheduled_interview_request.rb', line 69 def initialize(application: OMIT, job_interview_stage: OMIT, organizer: OMIT, interviewers: OMIT, location: OMIT, start_at: OMIT, end_at: OMIT, status: OMIT, integration_params: OMIT, linked_account_params: OMIT, additional_properties: nil) @application = application if application != OMIT @job_interview_stage = job_interview_stage if job_interview_stage != OMIT @organizer = organizer if organizer != OMIT @interviewers = interviewers if interviewers != OMIT @location = location if location != OMIT @start_at = start_at if start_at != OMIT @end_at = end_at if end_at != OMIT @status = status if status != OMIT @integration_params = integration_params if integration_params != OMIT @linked_account_params = linked_account_params if linked_account_params != OMIT @additional_properties = additional_properties @_field_set = { "application": application, "job_interview_stage": job_interview_stage, "organizer": organizer, "interviewers": interviewers, "location": location, "start_at": start_at, "end_at": end_at, "status": status, "integration_params": integration_params, "linked_account_params": linked_account_params }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
47 48 49 |
# File 'lib/merge_ruby_client/ats/types/scheduled_interview_request.rb', line 47 def additional_properties @additional_properties end |
#application ⇒ Merge::Ats::ScheduledInterviewRequestApplication (readonly)
Returns The application being interviewed.
24 25 26 |
# File 'lib/merge_ruby_client/ats/types/scheduled_interview_request.rb', line 24 def application @application end |
#end_at ⇒ DateTime (readonly)
Returns When the interview was ended.
36 37 38 |
# File 'lib/merge_ruby_client/ats/types/scheduled_interview_request.rb', line 36 def end_at @end_at end |
#integration_params ⇒ Hash{String => Object} (readonly)
43 44 45 |
# File 'lib/merge_ruby_client/ats/types/scheduled_interview_request.rb', line 43 def integration_params @integration_params end |
#interviewers ⇒ Array<Merge::Ats::ScheduledInterviewRequestInterviewersItem> (readonly)
Returns Array of ‘RemoteUser` IDs.
30 31 32 |
# File 'lib/merge_ruby_client/ats/types/scheduled_interview_request.rb', line 30 def interviewers @interviewers end |
#job_interview_stage ⇒ Merge::Ats::ScheduledInterviewRequestJobInterviewStage (readonly)
Returns The stage of the interview.
26 27 28 |
# File 'lib/merge_ruby_client/ats/types/scheduled_interview_request.rb', line 26 def job_interview_stage @job_interview_stage end |
#linked_account_params ⇒ Hash{String => Object} (readonly)
45 46 47 |
# File 'lib/merge_ruby_client/ats/types/scheduled_interview_request.rb', line 45 def linked_account_params @linked_account_params end |
#location ⇒ String (readonly)
Returns The interview’s location.
32 33 34 |
# File 'lib/merge_ruby_client/ats/types/scheduled_interview_request.rb', line 32 def location @location end |
#organizer ⇒ Merge::Ats::ScheduledInterviewRequestOrganizer (readonly)
Returns The user organizing the interview.
28 29 30 |
# File 'lib/merge_ruby_client/ats/types/scheduled_interview_request.rb', line 28 def organizer @organizer end |
#start_at ⇒ DateTime (readonly)
Returns When the interview was started.
34 35 36 |
# File 'lib/merge_ruby_client/ats/types/scheduled_interview_request.rb', line 34 def start_at @start_at end |
#status ⇒ Merge::Ats::ScheduledInterviewStatusEnum (readonly)
Returns The interview’s status.
-
‘SCHEDULED` - SCHEDULED
-
‘AWAITING_FEEDBACK` - AWAITING_FEEDBACK
-
‘COMPLETE` - COMPLETE.
41 42 43 |
# File 'lib/merge_ruby_client/ats/types/scheduled_interview_request.rb', line 41 def status @status end |
Class Method Details
.from_json(json_object:) ⇒ Merge::Ats::ScheduledInterviewRequest
Deserialize a JSON object to an instance of ScheduledInterviewRequest
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/merge_ruby_client/ats/types/scheduled_interview_request.rb', line 102 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) if parsed_json["application"].nil? application = nil else application = parsed_json["application"].to_json application = Merge::Ats::ScheduledInterviewRequestApplication.from_json(json_object: application) end if parsed_json["job_interview_stage"].nil? job_interview_stage = nil else job_interview_stage = parsed_json["job_interview_stage"].to_json job_interview_stage = Merge::Ats::ScheduledInterviewRequestJobInterviewStage.from_json(json_object: job_interview_stage) end if parsed_json["organizer"].nil? organizer = nil else organizer = parsed_json["organizer"].to_json organizer = Merge::Ats::ScheduledInterviewRequestOrganizer.from_json(json_object: organizer) end interviewers = parsed_json["interviewers"]&.map do |item| item = item.to_json Merge::Ats::ScheduledInterviewRequestInterviewersItem.from_json(json_object: item) end location = parsed_json["location"] start_at = (DateTime.parse(parsed_json["start_at"]) unless parsed_json["start_at"].nil?) end_at = (DateTime.parse(parsed_json["end_at"]) unless parsed_json["end_at"].nil?) status = parsed_json["status"] integration_params = parsed_json["integration_params"] linked_account_params = parsed_json["linked_account_params"] new( application: application, job_interview_stage: job_interview_stage, organizer: organizer, interviewers: interviewers, location: location, start_at: start_at, end_at: end_at, status: status, integration_params: integration_params, linked_account_params: linked_account_params, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given
hash and check each fields type against the current object's property
definitions.
161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/merge_ruby_client/ats/types/scheduled_interview_request.rb', line 161 def self.validate_raw(obj:) obj.application.nil? || Merge::Ats::ScheduledInterviewRequestApplication.validate_raw(obj: obj.application) obj.job_interview_stage.nil? || Merge::Ats::ScheduledInterviewRequestJobInterviewStage.validate_raw(obj: obj.job_interview_stage) obj.organizer.nil? || Merge::Ats::ScheduledInterviewRequestOrganizer.validate_raw(obj: obj.organizer) obj.interviewers&.is_a?(Array) != false || raise("Passed value for field obj.interviewers is not the expected type, validation failed.") obj.location&.is_a?(String) != false || raise("Passed value for field obj.location is not the expected type, validation failed.") obj.start_at&.is_a?(DateTime) != false || raise("Passed value for field obj.start_at is not the expected type, validation failed.") obj.end_at&.is_a?(DateTime) != false || raise("Passed value for field obj.end_at is not the expected type, validation failed.") obj.status&.is_a?(Merge::Ats::ScheduledInterviewStatusEnum) != false || raise("Passed value for field obj.status is not the expected type, validation failed.") obj.integration_params&.is_a?(Hash) != false || raise("Passed value for field obj.integration_params is not the expected type, validation failed.") obj.linked_account_params&.is_a?(Hash) != false || raise("Passed value for field obj.linked_account_params is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of ScheduledInterviewRequest to a JSON object
151 152 153 |
# File 'lib/merge_ruby_client/ats/types/scheduled_interview_request.rb', line 151 def to_json(*_args) @_field_set&.to_json end |