_save($opts); } /** * @param array|null $params * @param array|string|null $opts * * @return Collection of Orders */ public static function all($params = null, $opts = null) { return self::_all($params, $opts); } /** * @return Order The paid order. */ public function pay($params = null, $opts = null) { $url = $this->instanceUrl() . '/pay'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } /** * @return OrderReturn The newly created return. */ public function returnOrder($params = null, $opts = null) { $url = $this->instanceUrl() . '/returns'; list($response, $opts) = $this->_request('post', $url, $params, $opts); return Util\Util::convertToStripeObject($response, $opts); } }