channel->request(MessageType::CustomerData, [ 'art' => 'Adressdaten', 'email' => $email, 'passwort' => $password, ]); } /** * @throws ApiClientException */ public function register(RegistrationDto $registrationData): Notification|RegistrationResponse { return $this->channel->request(MessageType::CustomerData, [ 'art' => 'Adresse_Neu', 'adressdaten' => $registrationData->toPayload(), ]); } /** * @throws ApiClientException */ public function resetPassword(string $email): Notification { return $this->channel->request(MessageType::CustomerData, [ 'art' => 'Passwort_Anfrage', 'email' => $email, ]); } /** * @throws ApiClientException */ public function updatePersonalData( string $email, string $password, PersonalData $personalData, bool $debug = false, ): Notification|PersonalDataUpdateResponse { return $this->channel->request(MessageType::CustomerData, [ 'art' => 'Adressdaten_Ändern', 'email' => $email, 'passwort' => $password, 'idadresse' => $personalData->addressId, 'adressdaten' => $personalData->toPayload(), ], [], $debug); } /** * @throws ApiClientException */ public function createAddress( PersonalData $personalData, bool $debug = false, ): RegistrationResponse|Notification { return $this->channel->request(MessageType::CustomerData, [ 'art' => 'Adresse_Neu', 'adressdaten' => $personalData->toPayload(false), 'ohnemailversand' => 'True', ], [], $debug); } /** * @throws ApiClientException */ public function updateNewsletterRegistration(string $email, string $password, PersonalData $personalData): Notification|PersonalData { return $this->channel->request(MessageType::CustomerData, [ 'art' => 'Newsletter', 'email' => $email, 'passwort' => $password, 'idadresse' => $personalData->addressId, 'newsletter' => [ 'email' => $email, 'anmeldung' => $personalData->communication->newsletter ? 'True' : 'False', ], ]); } /** * @throws ApiClientException */ public function getCrmAttributes(string $email, string $password): Notification|CrmAttributes { return $this->channel->request(MessageType::CustomerData, [ 'art' => 'SelektionCRM', 'email' => $email, 'passwort' => $password, ]); } }