Sha256: 656d66acfb9351ede51391287708caef5a1c9b76e738725244537c59f0c29f52
Contents?: true
Size: 504 Bytes
Versions: 55
Compression:
Stored size: 504 Bytes
Contents
class Auth::Transaction::Status include Mongoid::Document include Mongoid::Timestamps ALLOW_TO_CONTINUE_IN_SECONDS = 300 ## "PROCESSING" ## "COMPLETE" ## "FAILED" field :condition, type: String embedded_in :event, :class_name => "Auth::Transaction::Event" def is_complete? self.condition == "COMPLETED" end def is_processing? self.condition == "PROCESSING" && (Time.now - self.updated_at) < ALLOW_TO_CONTINUE_IN_SECONDS end def is_failed? self.condition == "FAILED" end end
Version data entries
55 entries across 55 versions & 1 rubygems