Class: Perka::Model::RewardGrant

Inherits:
Flatpack::Core::BaseHasUuid
  • Object
show all
Defined in:
lib/perka/model/reward_grant.rb

Overview

Encapsulates one or more <entityReference payloadName=‘abstractRewardConfirmation’> AbstractRewardConfirmation</entityReference> objects to be given to a customer. <p> This differs from a <entityReference payloadName=‘visitConfirmation’> VisitConfirmation</entityReference> in that there’s no previously-created Visit object to confirm. Instead, a RewardGrant will create a confirmed Visit and possibly create a Customer object based on an email address or SMS phone number. The UUID of the Visit object will be set to the RewardGrant’s UUID to allow post-grant correlation. <p> Exactly one of <entityReference payloadName=‘rewardGrant’> #getCustomerEmail()</entityReference>, <entityReference payloadName=‘rewardGrant’> #getCustomerPhone()</entityReference>, or <entityReference payloadName=‘rewardGrant’> #getCustomerUuid()</entityReference> must be provided to identify the customer.

Constant Summary collapse

PROPERTY_NAMES =
[
  :customer,

  # At least one <entityReference payloadName='abstractRewardConfirmation'> 
  # AbstractRewardConfirmation</entityReference> must be given.
  :reward_confirmations
]
TYPE_MAP =
{
  :customer => Perka::Model::Customer
}