Module: Identisure::BankIdSe::Status
- Defined in:
- lib/identisure/bank_id_se.rb
Class Method Summary collapse
Class Method Details
.from_json(d) ⇒ Object
249 250 251 252 253 254 255 256 257 |
# File 'lib/identisure/bank_id_se.rb', line 249 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 bankid-se status: #{d['status'].inspect}") end end |