solution = [ 'destinationNumber' => $destinationNumber, ]; $this->uri = '/Trunking/Numbers/' . \rawurlencode($destinationNumber) .''; } /** * Fetch the NumberInstance * * @param array|Options $options Optional Arguments * @return NumberInstance Fetched NumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): NumberInstance { $options = new Values($options); $params = Values::of([ 'OriginationNumber' => $options['originationNumber'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new NumberInstance( $this->version, $payload, $this->solution['destinationNumber'] ); } /** * 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.Pricing.V2.NumberContext ' . \implode(' ', $context) . ']'; } }