Module: Identisure::AgeVerification::Status
- Defined in:
- lib/identisure/age_verification.rb
Class Method Summary collapse
Class Method Details
.from_json(d) ⇒ Object
76 77 78 79 80 81 82 83 84 |
# File 'lib/identisure/age_verification.rb', line 76 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 age verification status: #{d['status'].inspect}") end end |