Feedback.php 882 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. class Services_Twilio_Rest_Feedback extends Services_Twilio_InstanceResource {
  3. public function __construct($client, $uri, $params = array()) {
  4. $this->instance_name = "Services_Twilio_Rest_Feedback";
  5. return parent::__construct($client, $uri, $params);
  6. }
  7. /**
  8. * Create feedback for the parent call
  9. */
  10. public function create(array $params = array()) {
  11. $params = $this->client->createData($this->uri, $params);
  12. return new $this->instance_name($this->client, $this->uri, $params);
  13. }
  14. /**
  15. * Delete feedback for the parent call
  16. */
  17. public function delete() {
  18. $this->client->deleteData($this->uri);
  19. }
  20. /**
  21. * Fetch the feedback for the parent call
  22. */
  23. public function get() {
  24. return new $this->instance_name(
  25. $this->client, $this->uri
  26. );
  27. }
  28. }