klaviyoApiWrapper = $klaviyoApiWrapper; $this->customerEventService = $customerEventService; } /** * @param string $event * @return void * @throws KlaviyoApiException */ public function track($event, ArrayObject $customer) { $this->klaviyoApiWrapper->trackEvent([ 'event' => $event, 'properties' => [], 'customer_properties' => $this->customerEventService->buildPayload( $customer ), ]); } }