Class: NeverBounce::API::Request::JobsSearch
- Inherits:
-
Base
- Object
- Base
- NeverBounce::API::Request::JobsSearch
show all
- Defined in:
- lib/never_bounce/api/request/jobs_search.rb
Instance Attribute Summary collapse
Attributes inherited from Base
#api_key, #api_url, #api_version, #headers, #user_agent
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#to_curl, #to_httparty
Instance Attribute Details
#job_id ⇒ Integer
9
10
11
|
# File 'lib/never_bounce/api/request/jobs_search.rb', line 9
def job_id
@job_id
end
|
#page ⇒ Integer
12
13
14
|
# File 'lib/never_bounce/api/request/jobs_search.rb', line 12
def page
@page
end
|
#per_page ⇒ Integer
15
16
17
|
# File 'lib/never_bounce/api/request/jobs_search.rb', line 15
def per_page
@per_page
end
|
Class Method Details
.http_method ⇒ Symbol
18
19
20
|
# File 'lib/never_bounce/api/request/jobs_search.rb', line 18
def self.http_method
:get
end
|
.path ⇒ String
23
24
25
|
# File 'lib/never_bounce/api/request/jobs_search.rb', line 23
def self.path
"jobs/search"
end
|
28
29
30
|
# File 'lib/never_bounce/api/request/jobs_search.rb', line 28
def self.response_klass
Response::JobsSearch
end
|
Instance Method Details
#mode_h ⇒ Hash
Return a ready-to-merge mode attributes hash.
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# File 'lib/never_bounce/api/request/jobs_search.rb', line 34
def mode_h
@mode_h ||= {}.tap do |_|
unless (v = job_id).nil?
_[:job_id] = v
end
unless (v = page).nil?
_[:page] = v
end
unless (v = per_page).nil?
_[:items_per_page] = v
end
end
end
|
#to_h ⇒ Hash
51
52
53
54
55
|
# File 'lib/never_bounce/api/request/jobs_search.rb', line 51
def to_h
{
key: require_attr(:api_key),
}.merge(mode_h)
end
|