<?php
 namespace Stripe; class Transfer extends ApiResource { const OBJECT_NAME = 'transfer'; use ApiOperations\All; use ApiOperations\Create; use ApiOperations\NestedResource; use ApiOperations\Retrieve; use ApiOperations\Update; const SOURCE_TYPE_ALIPAY_ACCOUNT = 'alipay_account'; const SOURCE_TYPE_BANK_ACCOUNT = 'bank_account'; const SOURCE_TYPE_CARD = 'card'; const SOURCE_TYPE_FINANCING = 'financing'; 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; } const PATH_REVERSALS = '/reversals'; public static function allReversals($id, $params = null, $opts = null) { return self::_allNestedResources($id, static::PATH_REVERSALS, $params, $opts); } public static function createReversal($id, $params = null, $opts = null) { return self::_createNestedResource($id, static::PATH_REVERSALS, $params, $opts); } public static function retrieveReversal($id, $reversalId, $params = null, $opts = null) { return self::_retrieveNestedResource($id, static::PATH_REVERSALS, $reversalId, $params, $opts); } public static function updateReversal($id, $reversalId, $params = null, $opts = null) { return self::_updateNestedResource($id, static::PATH_REVERSALS, $reversalId, $params, $opts); } } 