Module: Identisure::BankIdSe::PhoneStatus
- Defined in:
- lib/identisure/bank_id_se.rb
Class Method Summary collapse
Class Method Details
.from_json(d) ⇒ Object
261 262 263 264 265 266 267 268 269 |
# File 'lib/identisure/bank_id_se.rb', line 261 def self.from_json(d) case d['status'] when 'PENDING' then PendingPhone.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 phone status: #{d['status'].inspect}") end end |