solution = [ 'type' => $type, ]; $this->uri = '/Types/' . \rawurlencode($type) .''; } /** * Fetch the EventTypeInstance * * @return EventTypeInstance Fetched EventTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EventTypeInstance { $payload = $this->version->fetch('GET', $this->uri, [], []); return new EventTypeInstance( $this->version, $payload, $this->solution['type'] ); } /** * 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.Events.V1.EventTypeContext ' . \implode(' ', $context) . ']'; } }