Module: Identisure::Ftn::Status
- Defined in:
- lib/identisure/ftn.rb
Class Method Summary collapse
Class Method Details
.from_json(d) ⇒ Object
99 100 101 102 103 104 105 106 107 |
# File 'lib/identisure/ftn.rb', line 99 def self.from_json(d) case d['status'] when 'PENDING' then Pending.from_json(d) when 'COMPLETED' then Completed.from_json(d) when 'FAILED' then Failed.from_json(d) when String then Unknown.new(status: d['status']) else raise IdentisureError.new(0, "Invalid ftn status: #{d['status'].inspect}") end end |