1 |
module OCRSDK::Verifiers::Status |
24 |
2 |
# http://ocrsdk.com/documentation/specifications/task-statuses/ |
|
3 |
STATUSES = [:submitted, :queued, :in_progress, :completed, |
24 |
4 |
:processing_failed, :deleted, :not_enough_credits] |
|
5 | ||
6 |
def status_to_s(status) |
24 |
7 |
status.to_s.camelize |
46 |
8 |
end |
|
9 | ||
10 |
def status_to_sym(status) |
24 |
11 |
status.underscore.to_sym |
577 |
12 |
end |
|
13 | ||
14 |
def supported_status?(status) |
24 |
15 |
status = status_to_sym status if status.kind_of? String |
69 |
16 | ||
17 |
STATUSES.include? status |
69 |
18 |
end |
|
19 |
end |