customer = $customer; return $this; } public function execute(): string { $body = [ 'customer' => [ 'created_in' => $this->config->getVendorId(), 'email' => $this->customer->getEmailAddress(), 'firstname' => $this->customer->getFirstName(), 'lastname' => $this->customer->getLastName(), ], ]; $response = $this->client->request( 'POST', self::ENDPOINT, [ 'auth_bearer' => $this->authToken, 'headers' => [ 'Content-Type' => 'application/json', ], 'body' => json_encode($body), ] ); return json_decode($response->getContent()); } }