Class: Roseflow::LinkedIn::Person::LookupQuery
Defined Under Namespace
Classes: LookupQueryContract
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.new(input) ⇒ Object
34
35
36
37
38
|
# File 'lib/roseflow/linkedin/person/lookup_query.rb', line 34
def self.new(input)
validation = self.contract_object.new.call(input)
raise ArgumentError, validation.errors.to_h.inspect unless validation.success?
super(input)
end
|
Instance Method Details
#to_request_params ⇒ Object
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# File 'lib/roseflow/linkedin/person/lookup_query.rb', line 40
def to_request_params
params = {
company_domain: domain,
first_name: first_name,
last_name: last_name,
title: title,
location: location,
enrich_profile: enrich == true ? "enrich" : "skip",
}
params.each_pair do |key, value|
params.delete(key) unless value
end
end
|