Class: Perka::Model::Clerk

Inherits:
AbstractUser show all
Defined in:
lib/perka/model/clerk.rb

Overview

A Clerk represents either an employee identity or a role identity used by the validator app. <p> Two distinct classes of Clerks exist: <ul> <li>Named clerks, representing a user authorized to perform actions at zero or more locations <li>Anonymous clerks, representing an access role for a single location </ul> A named clerk must downgrade to an anonymous clerk in order to perform validations at a single location. This avoids the need to store any particular user’s credentials in the validator app.

Constant Summary collapse

PROPERTY_NAMES =
[
  :email,
  :unconfirmed_email,

  # The <entityReference payloadName='merchant'> Merchant</entityReference> 
  # that owns the clerk account.
  :merchant,

  # The locations that the clerk is allowed to interact with.
  :merchant_locations,

  # Indicates if the Clerk is an anonymous role account used by a validator 
  # application at a single location.
  :anonymous
]
TYPE_MAP =
{
  :merchant => Perka::Model::Merchant
}