solution = [ 'serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) .'/Channels/' . \rawurlencode($channelSid) .'/Invites/' . \rawurlencode($sid) .''; } /** * Delete the InviteInstance * * @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); } /** * Fetch the InviteInstance * * @return InviteInstance Fetched InviteInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InviteInstance { $payload = $this->version->fetch('GET', $this->uri); return new InviteInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * 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.IpMessaging.V1.InviteContext ' . \implode(' ', $context) . ']'; } }