Example #1
0
        } else {
            $this->_save(Recurly_Client::PUT, $this->uri() . '/refund?amount_in_cents=' . strval(intval($amountInCents)));
        }
    }
    protected function uri()
    {
        if (!empty($this->_href)) {
            return $this->getHref();
        } else {
            if (!empty($this->uuid)) {
                return Recurly_Account::uriForTransaction($this->uuid);
            } else {
                throw new Recurly_Error('"uuid" is not supplied');
            }
        }
    }
    protected static function uriForTransaction($uuid)
    {
        return Recurly_Client::PATH_TRANSACTIONS . '/' . rawurlencode($uuid);
    }
    protected function getNodeName()
    {
        return 'transaction';
    }
    protected function getWriteableAttributes()
    {
        return Recurly_Transaction::$_writeableAttributes;
    }
}
Recurly_Transaction::init();