Пример #1
0
 /**
  * (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());
     }
 }
Пример #2
0
 /**
  * (non-PHPdoc)
  *
  * @see OmiseApiResource::isDestroyed()
  */
 public function isDestroyed()
 {
     return parent::isDestroyed();
 }
Пример #3
0
 /**
  * @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);
 }
Пример #4
0
 /**
  * (non-PHPdoc)
  * @see OmiseApiResource::g_reload()
  */
 public function reload()
 {
     parent::g_reload(self::getUrl());
 }
Пример #5
0
 /**
  * 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);
 }
Пример #6
0
 /**
  * (non-PHPdoc)
  *
  * @see OmiseApiResource::g_update()
  */
 public function update($params)
 {
     parent::g_update(self::getUrl($this['id']), $params);
 }
Пример #7
0
 /**
  * (non-PHPdoc)
  * @see OmiseApiResource::getInstance()
  */
 public static function resource()
 {
     return parent::getInstance(get_class());
 }
Пример #8
0
 /**
  * @param array $refund
  * @param string $publickey
  * @param string $secretkey
  */
 public function __construct($refund, $publickey = null, $secretkey = null)
 {
     parent::__construct($publickey, $secretkey);
     $this->refresh($refund);
 }