solution = [ 'domainSid' => $domainSid, 'messagingServiceSid' => $messagingServiceSid, ]; $this->uri = '/LinkShortening/Domains/' . \rawurlencode($domainSid) .'/MessagingServices/' . \rawurlencode($messagingServiceSid) .''; } /** * Create the LinkshorteningMessagingServiceInstance * * @return LinkshorteningMessagingServiceInstance Created LinkshorteningMessagingServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function create(): LinkshorteningMessagingServiceInstance { $payload = $this->version->create('POST', $this->uri); return new LinkshorteningMessagingServiceInstance( $this->version, $payload, $this->solution['domainSid'], $this->solution['messagingServiceSid'] ); } /** * Delete the LinkshorteningMessagingServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.LinkshorteningMessagingServiceContext ' . \implode(' ', $context) . ']'; } }