solution = [ 'accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) .'/Calls/' . \rawurlencode($callSid) .'/Feedback.json'; } /** * Fetch the FeedbackInstance * * @return FeedbackInstance Fetched FeedbackInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FeedbackInstance { $payload = $this->version->fetch('GET', $this->uri); return new FeedbackInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Update the FeedbackInstance * * @param array|Options $options Optional Arguments * @return FeedbackInstance Updated FeedbackInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): FeedbackInstance { $options = new Values($options); $data = Values::of([ 'QualityScore' => $options['qualityScore'], 'Issue' => $options['issue'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new FeedbackInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * 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.Api.V2010.FeedbackContext ' . \implode(' ', $context) . ']'; } }