setRemoteAddress example

private function buildCustomerEntity(string $id): CustomerEntity
    {
        $customerEntity = new CustomerEntity();
        $customerEntity->setId($id);
        $customerEntity->setEmail('test@example.org');
        $customerEntity->setFirstName('Max');
        $customerEntity->setLastName('Smith');
        $customerEntity->setTitle('Dr.');
        $customerEntity->setCompany('Acme Inc.');
        $customerEntity->setCustomerNumber('ABC123XY');
        $customerEntity->setRemoteAddress('Test street 123, NY');
        $customerEntity->setCustomFields(['customerGroup' => 'premium', 'origin' => 'newsletter', 'active' => true]);

        return $customerEntity;
    }
}
Home | Imprint | This part of the site doesn't use cookies.