class FrederickAPI::V2::BackgroundJob
V2
Frederick API async background job class for parsing background job responses coming from API.
Attributes
response[RW]
Public Instance Methods
errors()
click to toggle source
# File lib/frederick_api/v2/background_job.rb, line 27 def errors @attributes['messages'] end
has_errors?()
click to toggle source
# File lib/frederick_api/v2/background_job.rb, line 10 def has_errors? @attributes['status'] == 'error' end
id()
click to toggle source
# File lib/frederick_api/v2/background_job.rb, line 31 def id @attributes['id'] end
response_code()
click to toggle source
# File lib/frederick_api/v2/background_job.rb, line 19 def response_code @response_code ||= @response[:status] end
retry_after()
click to toggle source
# File lib/frederick_api/v2/background_job.rb, line 14 def retry_after try_time = @response[:headers]['retry-after'].to_i @retry_after ||= try_time > 1 ? try_time : 1 end
status()
click to toggle source
# File lib/frederick_api/v2/background_job.rb, line 23 def status @attributes['status'] end