/** * Once the checkout process is complete, an event will be * fired with it's own set of data. * * @param PostPurchaseEvent $event */ public function setPostPurchaseEvent(PostPurchaseEvent $event) { // fail quick if we can't handle this event if (!array_key_exists($event->event(), $this->postPurchaseEvents)) { throw new UnrecognizedPurchaseEvent(get_class($event) . ': ' . $event->event()); } $this->metadata = $event->toArray(); return $this; }
/** * @param Collection $playerIds */ public function setPlayers(Collection $playerIds) { parent::setEventData($playerIds); }
/** * @param $quizmasterRegistrationId */ public function setTournamentQuizmaster(TournamentQuizmaster $tournamentQuizmaster) { parent::setEventData(collect($tournamentQuizmaster->id)); }
/** * @param $spectatorId */ public function setSpectator(Spectator $spectatorId) { parent::setEventData(collect($spectatorId->id)); }