Method: Merge::Ats::PaginatedCandidateList.validate_raw

Defined in:
lib/merge_ruby_client/ats/types/paginated_candidate_list.rb

.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.

Parameters:

  • obj (Object)

Returns:

  • (Void)


73
74
75
76
77
# File 'lib/merge_ruby_client/ats/types/paginated_candidate_list.rb', line 73

def self.validate_raw(obj:)
  obj.next_&.is_a?(String) != false || raise("Passed value for field obj.next_ is not the expected type, validation failed.")
  obj.previous&.is_a?(String) != false || raise("Passed value for field obj.previous is not the expected type, validation failed.")
  obj.results&.is_a?(Array) != false || raise("Passed value for field obj.results is not the expected type, validation failed.")
end