solution = [ ]; $this->uri = '/SafeList/Numbers'; } /** * Create the SafelistInstance * * @param string $phoneNumber The phone number to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). * @return SafelistInstance Created SafelistInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $phoneNumber): SafelistInstance { $data = Values::of([ 'PhoneNumber' => $phoneNumber, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SafelistInstance( $this->version, $payload ); } /** * Delete the SafelistInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $params = Values::of([ 'PhoneNumber' => $options['phoneNumber'], ]); return $this->version->delete('DELETE', $this->uri, $params); } /** * Fetch the SafelistInstance * * @param array|Options $options Optional Arguments * @return SafelistInstance Fetched SafelistInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): SafelistInstance { $options = new Values($options); $params = Values::of([ 'PhoneNumber' => $options['phoneNumber'], ]); $payload = $this->version->fetch('GET', $this->uri, $params, []); return new SafelistInstance( $this->version, $payload ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Accounts.V1.SafelistList]'; } }