/** * (non-PHPdoc) * * @see OmiseApiResource::g_reload() */ public function reload() { if ($this['object'] === 'transaction') { parent::reload(self::getUrl($this['id'])); } else { parent::g_reload(self::getUrl()); } }
/** * (non-PHPdoc) * * @see OmiseApiResource::isDestroyed() */ public function isDestroyed() { return parent::isDestroyed(); }
/** * @param string $id * * @return OmiseRefund */ public function retrieve($id) { $result = parent::execute($this->getUrl($id), parent::REQUEST_GET, self::getResourceKey()); return new OmiseRefund($result, $this->_publickey, $this->_secretkey); }
/** * (non-PHPdoc) * @see OmiseApiResource::g_reload() */ public function reload() { parent::g_reload(self::getUrl()); }
/** * list refunds * @return OmiseRefundList */ public function refunds() { $result = parent::execute(self::getUrl($this['id']) . '/refunds', parent::REQUEST_GET, parent::getResourceKey()); return new OmiseRefundList($result, $this['id'], $this->_publickey, $this->_secretkey); }
/** * (non-PHPdoc) * * @see OmiseApiResource::g_update() */ public function update($params) { parent::g_update(self::getUrl($this['id']), $params); }
/** * (non-PHPdoc) * @see OmiseApiResource::getInstance() */ public static function resource() { return parent::getInstance(get_class()); }
/** * @param array $refund * @param string $publickey * @param string $secretkey */ public function __construct($refund, $publickey = null, $secretkey = null) { parent::__construct($publickey, $secretkey); $this->refresh($refund); }