PPPStripeBitcoinReceiver

Class BitcoinReceiver.

Defined (1)

The class is defined in the following location(s).

/includes/api/stripe-php/lib/BitcoinReceiver.php  
  1. class BitcoinReceiver extends ExternalAccount 
  2. /** 
  3. * @return string The class URL for this resource. It needs to be special 
  4. * cased because it doesn't fit into the standard resource pattern. 
  5. */ 
  6. public static function classUrl() 
  7. return "/v1/bitcoin/receivers"; 
  8.  
  9. /** 
  10. * @return string The instance URL for this resource. It needs to be special 
  11. * cased because it doesn't fit into the standard resource pattern. 
  12. */ 
  13. public function instanceUrl() 
  14. $result = parent::instanceUrl(); 
  15. if ($result) { 
  16. return $result; 
  17. } else { 
  18. $id = $this['id']; 
  19. $id = Util\Util::utf8($id); 
  20. $extn = urlencode($id); 
  21. $base = BitcoinReceiver::classUrl(); 
  22. return "$base/$extn"; 
  23.  
  24. /** 
  25. * @param string $id The ID of the Bitcoin Receiver to retrieve. 
  26. * @param array|string|null $opts 
  27. * @return BitcoinReceiver 
  28. */ 
  29. public static function retrieve($id, $opts = null) 
  30. return self::_retrieve($id, $opts); 
  31.  
  32. /** 
  33. * @param array|null $params 
  34. * @param array|string|null $opts 
  35. * @return Collection of BitcoinReceivers 
  36. */ 
  37. public static function all($params = null, $opts = null) 
  38. return self::_all($params, $opts); 
  39.  
  40. /** 
  41. * @param array|null $params 
  42. * @param array|string|null $opts 
  43. * @return BitcoinReceiver The created Bitcoin Receiver item. 
  44. */ 
  45. public static function create($params = null, $opts = null) 
  46. return self::_create($params, $opts); 
  47.  
  48. /** 
  49. * @param array|null $params 
  50. * @param array|string|null $options 
  51. * @return BitcoinReceiver The refunded Bitcoin Receiver item. 
  52. */ 
  53. public function refund($params = null, $options = null) 
  54. $url = $this->instanceUrl() . '/refund'; 
  55. list($response, $opts) = $this->_request('post', $url, $params, $options); 
  56. $this->refreshFrom($response, $opts); 
  57. return $this;