<?php
 namespace Stripe; class Order extends ApiResource { const OBJECT_NAME = 'order'; use ApiOperations\All; use ApiOperations\Create; use ApiOperations\Retrieve; use ApiOperations\Update; const STATUS_CANCELED = 'canceled'; const STATUS_COMPLETE = 'complete'; const STATUS_OPEN = 'open'; const STATUS_PROCESSING = 'processing'; const STATUS_SUBMITTED = 'submitted'; public function cancel($params = null, $opts = null) { $url = $this->instanceUrl() . '/cancel'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } public static function allLineItems($id, $params = null, $opts = null) { $url = static::resourceUrl($id) . '/line_items'; list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; } public function reopen($params = null, $opts = null) { $url = $this->instanceUrl() . '/reopen'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } public function submit($params = null, $opts = null) { $url = $this->instanceUrl() . '/submit'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } } 