Class: NeverBounce::API::Request::JobsParse
- Inherits:
-
Base
- Object
- Base
- NeverBounce::API::Request::JobsParse
show all
- Defined in:
- lib/never_bounce/api/request/jobs_parse.rb
Instance Attribute Summary collapse
Attributes inherited from Base
#api_key, #api_url, #headers, #user_agent
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#to_curl, #to_httparty
Instance Attribute Details
#auto_start ⇒ Boolean
12
13
14
|
# File 'lib/never_bounce/api/request/jobs_parse.rb', line 12
def auto_start
@auto_start
end
|
#job_id ⇒ Integer
9
10
11
|
# File 'lib/never_bounce/api/request/jobs_parse.rb', line 9
def job_id
@job_id
end
|
Class Method Details
.http_method ⇒ Symbol
15
16
17
|
# File 'lib/never_bounce/api/request/jobs_parse.rb', line 15
def self.http_method
:post
end
|
.path ⇒ String
20
21
22
|
# File 'lib/never_bounce/api/request/jobs_parse.rb', line 20
def self.path
"jobs/parse"
end
|
25
26
27
|
# File 'lib/never_bounce/api/request/jobs_parse.rb', line 25
def self.response_klass
Response::JobsParse
end
|
Instance Method Details
#mode_h ⇒ Hash
Return a ready-to-merge mode attributes hash.
31
32
33
34
35
36
37
|
# File 'lib/never_bounce/api/request/jobs_parse.rb', line 31
def mode_h
@mode_h ||= {}.tap do |_|
unless (v = auto_start).nil?
_[:auto_start] = v
end
end
end
|
#to_h ⇒ Hash
40
41
42
43
44
45
|
# File 'lib/never_bounce/api/request/jobs_parse.rb', line 40
def to_h
{
job_id: require_attr(:job_id),
key: require_attr(:api_key),
}.merge(mode_h)
end
|