solution = [ ]; $this->uri = '/Interactions'; } /** * Create the InteractionInstance * * @param array $channel The Interaction's channel. * @param array $routing The Interaction's routing logic. * @return InteractionInstance Created InteractionInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $channel, array $routing): InteractionInstance { $data = Values::of([ 'Channel' => Serialize::jsonObject($channel), 'Routing' => Serialize::jsonObject($routing), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new InteractionInstance( $this->version, $payload ); } /** * Constructs a InteractionContext * * @param string $sid The SID of the Interaction resource to fetch. */ public function getContext( string $sid ): InteractionContext { return new InteractionContext( $this->version, $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InteractionList]'; } }