Class: Merge::Ats::ExternalTargetFieldApiResponse
- Inherits:
-
Object
- Object
- Merge::Ats::ExternalTargetFieldApiResponse
- Defined in:
- lib/merge_ruby_client/ats/types/external_target_field_api_response.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
- #activity ⇒ Array<Merge::Ats::ExternalTargetFieldApi> readonly
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #application ⇒ Array<Merge::Ats::ExternalTargetFieldApi> readonly
- #attachment ⇒ Array<Merge::Ats::ExternalTargetFieldApi> readonly
- #candidate ⇒ Array<Merge::Ats::ExternalTargetFieldApi> readonly
- #department ⇒ Array<Merge::Ats::ExternalTargetFieldApi> readonly
- #eeoc ⇒ Array<Merge::Ats::ExternalTargetFieldApi> readonly
- #job ⇒ Array<Merge::Ats::ExternalTargetFieldApi> readonly
- #job_interview_stage ⇒ Array<Merge::Ats::ExternalTargetFieldApi> readonly
- #job_posting ⇒ Array<Merge::Ats::ExternalTargetFieldApi> readonly
- #offer ⇒ Array<Merge::Ats::ExternalTargetFieldApi> readonly
- #office ⇒ Array<Merge::Ats::ExternalTargetFieldApi> readonly
- #reject_reason ⇒ Array<Merge::Ats::ExternalTargetFieldApi> readonly
- #remote_user ⇒ Array<Merge::Ats::ExternalTargetFieldApi> readonly
- #scheduled_interview ⇒ Array<Merge::Ats::ExternalTargetFieldApi> readonly
- #scorecard ⇒ Array<Merge::Ats::ExternalTargetFieldApi> readonly
- #tag ⇒ Array<Merge::Ats::ExternalTargetFieldApi> readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Merge::Ats::ExternalTargetFieldApiResponse
Deserialize a JSON object to an instance of ExternalTargetFieldApiResponse.
-
.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(activity: OMIT, application: OMIT, attachment: OMIT, candidate: OMIT, department: OMIT, eeoc: OMIT, scheduled_interview: OMIT, job: OMIT, job_posting: OMIT, job_interview_stage: OMIT, offer: OMIT, office: OMIT, reject_reason: OMIT, scorecard: OMIT, tag: OMIT, remote_user: OMIT, additional_properties: nil) ⇒ Merge::Ats::ExternalTargetFieldApiResponse constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of ExternalTargetFieldApiResponse to a JSON object.
Constructor Details
#initialize(activity: OMIT, application: OMIT, attachment: OMIT, candidate: OMIT, department: OMIT, eeoc: OMIT, scheduled_interview: OMIT, job: OMIT, job_posting: OMIT, job_interview_stage: OMIT, offer: OMIT, office: OMIT, reject_reason: OMIT, scorecard: OMIT, tag: OMIT, remote_user: OMIT, additional_properties: nil) ⇒ Merge::Ats::ExternalTargetFieldApiResponse
68 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 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 68 def initialize(activity: OMIT, application: OMIT, attachment: OMIT, candidate: OMIT, department: OMIT, eeoc: OMIT, scheduled_interview: OMIT, job: OMIT, job_posting: OMIT, job_interview_stage: OMIT, offer: OMIT, office: OMIT, reject_reason: OMIT, scorecard: OMIT, tag: OMIT, remote_user: OMIT, additional_properties: nil) @activity = activity if activity != OMIT @application = application if application != OMIT @attachment = if != OMIT @candidate = candidate if candidate != OMIT @department = department if department != OMIT @eeoc = eeoc if eeoc != OMIT @scheduled_interview = scheduled_interview if scheduled_interview != OMIT @job = job if job != OMIT @job_posting = job_posting if job_posting != OMIT @job_interview_stage = job_interview_stage if job_interview_stage != OMIT @offer = offer if offer != OMIT @office = office if office != OMIT @reject_reason = reject_reason if reject_reason != OMIT @scorecard = scorecard if scorecard != OMIT @tag = tag if tag != OMIT @remote_user = remote_user if remote_user != OMIT @additional_properties = additional_properties @_field_set = { "Activity": activity, "Application": application, "Attachment": , "Candidate": candidate, "Department": department, "EEOC": eeoc, "ScheduledInterview": scheduled_interview, "Job": job, "JobPosting": job_posting, "JobInterviewStage": job_interview_stage, "Offer": offer, "Office": office, "RejectReason": reject_reason, "Scorecard": scorecard, "Tag": tag, "RemoteUser": remote_user }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#activity ⇒ Array<Merge::Ats::ExternalTargetFieldApi> (readonly)
11 12 13 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 11 def activity @activity end |
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
43 44 45 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 43 def additional_properties @additional_properties end |
#application ⇒ Array<Merge::Ats::ExternalTargetFieldApi> (readonly)
13 14 15 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 13 def application @application end |
#attachment ⇒ Array<Merge::Ats::ExternalTargetFieldApi> (readonly)
15 16 17 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 15 def @attachment end |
#candidate ⇒ Array<Merge::Ats::ExternalTargetFieldApi> (readonly)
17 18 19 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 17 def candidate @candidate end |
#department ⇒ Array<Merge::Ats::ExternalTargetFieldApi> (readonly)
19 20 21 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 19 def department @department end |
#eeoc ⇒ Array<Merge::Ats::ExternalTargetFieldApi> (readonly)
21 22 23 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 21 def eeoc @eeoc end |
#job ⇒ Array<Merge::Ats::ExternalTargetFieldApi> (readonly)
25 26 27 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 25 def job @job end |
#job_interview_stage ⇒ Array<Merge::Ats::ExternalTargetFieldApi> (readonly)
29 30 31 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 29 def job_interview_stage @job_interview_stage end |
#job_posting ⇒ Array<Merge::Ats::ExternalTargetFieldApi> (readonly)
27 28 29 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 27 def job_posting @job_posting end |
#offer ⇒ Array<Merge::Ats::ExternalTargetFieldApi> (readonly)
31 32 33 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 31 def offer @offer end |
#office ⇒ Array<Merge::Ats::ExternalTargetFieldApi> (readonly)
33 34 35 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 33 def office @office end |
#reject_reason ⇒ Array<Merge::Ats::ExternalTargetFieldApi> (readonly)
35 36 37 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 35 def reject_reason @reject_reason end |
#remote_user ⇒ Array<Merge::Ats::ExternalTargetFieldApi> (readonly)
41 42 43 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 41 def remote_user @remote_user end |
#scheduled_interview ⇒ Array<Merge::Ats::ExternalTargetFieldApi> (readonly)
23 24 25 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 23 def scheduled_interview @scheduled_interview end |
#scorecard ⇒ Array<Merge::Ats::ExternalTargetFieldApi> (readonly)
37 38 39 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 37 def scorecard @scorecard end |
#tag ⇒ Array<Merge::Ats::ExternalTargetFieldApi> (readonly)
39 40 41 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 39 def tag @tag end |
Class Method Details
.from_json(json_object:) ⇒ Merge::Ats::ExternalTargetFieldApiResponse
Deserialize a JSON object to an instance of ExternalTargetFieldApiResponse
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 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 113 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) activity = parsed_json["Activity"]&.map do |item| item = item.to_json Merge::Ats::ExternalTargetFieldApi.from_json(json_object: item) end application = parsed_json["Application"]&.map do |item| item = item.to_json Merge::Ats::ExternalTargetFieldApi.from_json(json_object: item) end = parsed_json["Attachment"]&.map do |item| item = item.to_json Merge::Ats::ExternalTargetFieldApi.from_json(json_object: item) end candidate = parsed_json["Candidate"]&.map do |item| item = item.to_json Merge::Ats::ExternalTargetFieldApi.from_json(json_object: item) end department = parsed_json["Department"]&.map do |item| item = item.to_json Merge::Ats::ExternalTargetFieldApi.from_json(json_object: item) end eeoc = parsed_json["EEOC"]&.map do |item| item = item.to_json Merge::Ats::ExternalTargetFieldApi.from_json(json_object: item) end scheduled_interview = parsed_json["ScheduledInterview"]&.map do |item| item = item.to_json Merge::Ats::ExternalTargetFieldApi.from_json(json_object: item) end job = parsed_json["Job"]&.map do |item| item = item.to_json Merge::Ats::ExternalTargetFieldApi.from_json(json_object: item) end job_posting = parsed_json["JobPosting"]&.map do |item| item = item.to_json Merge::Ats::ExternalTargetFieldApi.from_json(json_object: item) end job_interview_stage = parsed_json["JobInterviewStage"]&.map do |item| item = item.to_json Merge::Ats::ExternalTargetFieldApi.from_json(json_object: item) end offer = parsed_json["Offer"]&.map do |item| item = item.to_json Merge::Ats::ExternalTargetFieldApi.from_json(json_object: item) end office = parsed_json["Office"]&.map do |item| item = item.to_json Merge::Ats::ExternalTargetFieldApi.from_json(json_object: item) end reject_reason = parsed_json["RejectReason"]&.map do |item| item = item.to_json Merge::Ats::ExternalTargetFieldApi.from_json(json_object: item) end scorecard = parsed_json["Scorecard"]&.map do |item| item = item.to_json Merge::Ats::ExternalTargetFieldApi.from_json(json_object: item) end tag = parsed_json["Tag"]&.map do |item| item = item.to_json Merge::Ats::ExternalTargetFieldApi.from_json(json_object: item) end remote_user = parsed_json["RemoteUser"]&.map do |item| item = item.to_json Merge::Ats::ExternalTargetFieldApi.from_json(json_object: item) end new( activity: activity, application: application, attachment: , candidate: candidate, department: department, eeoc: eeoc, scheduled_interview: scheduled_interview, job: job, job_posting: job_posting, job_interview_stage: job_interview_stage, offer: offer, office: office, reject_reason: reject_reason, scorecard: scorecard, tag: tag, remote_user: remote_user, 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.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 214 def self.validate_raw(obj:) obj.activity&.is_a?(Array) != false || raise("Passed value for field obj.activity is not the expected type, validation failed.") obj.application&.is_a?(Array) != false || raise("Passed value for field obj.application is not the expected type, validation failed.") obj.&.is_a?(Array) != false || raise("Passed value for field obj.attachment is not the expected type, validation failed.") obj.candidate&.is_a?(Array) != false || raise("Passed value for field obj.candidate is not the expected type, validation failed.") obj.department&.is_a?(Array) != false || raise("Passed value for field obj.department is not the expected type, validation failed.") obj.eeoc&.is_a?(Array) != false || raise("Passed value for field obj.eeoc is not the expected type, validation failed.") obj.scheduled_interview&.is_a?(Array) != false || raise("Passed value for field obj.scheduled_interview is not the expected type, validation failed.") obj.job&.is_a?(Array) != false || raise("Passed value for field obj.job is not the expected type, validation failed.") obj.job_posting&.is_a?(Array) != false || raise("Passed value for field obj.job_posting is not the expected type, validation failed.") obj.job_interview_stage&.is_a?(Array) != false || raise("Passed value for field obj.job_interview_stage is not the expected type, validation failed.") obj.offer&.is_a?(Array) != false || raise("Passed value for field obj.offer is not the expected type, validation failed.") obj.office&.is_a?(Array) != false || raise("Passed value for field obj.office is not the expected type, validation failed.") obj.reject_reason&.is_a?(Array) != false || raise("Passed value for field obj.reject_reason is not the expected type, validation failed.") obj.scorecard&.is_a?(Array) != false || raise("Passed value for field obj.scorecard is not the expected type, validation failed.") obj.tag&.is_a?(Array) != false || raise("Passed value for field obj.tag is not the expected type, validation failed.") obj.remote_user&.is_a?(Array) != false || raise("Passed value for field obj.remote_user is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of ExternalTargetFieldApiResponse to a JSON object
204 205 206 |
# File 'lib/merge_ruby_client/ats/types/external_target_field_api_response.rb', line 204 def to_json(*_args) @_field_set&.to_json end |