![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/job-board.corals.io/vendor/omise/omise-php/lib/omise/ |
<?php class OmiseCard extends OmiseApiResource { const ENDPOINT = 'cards'; private $_customerID; /** * Object representing a card. Cards are retrieved using a `Customer`. * * @param array $array * @param string $customerID * @param string $publickey * @param string $secretkey */ public function __construct($array, $customerID, $publickey = null, $secretkey = null) { parent::__construct($publickey, $secretkey); $this->_customerID = $customerID; $this->refresh($array); } /** * (non-PHPdoc) * * @see OmiseApiResource::g_reload() */ public function reload() { parent::g_reload($this->getUrl($this['id'])); } /** * (non-PHPdoc) * * @see OmiseApiResource::g_update() */ public function update($params) { parent::g_update($this->getUrl($this['id']), $params); } /** * (non-PHPdoc) * * @see OmiseApiResource::g_destroy() */ public function destroy() { parent::g_destroy($this->getUrl($this['id'])); } /** * (non-PHPdoc) * * @see OmiseApiResource::isDestroyed() */ public static function isDestroyed() { return parent::isDestroyed(); } /** * @param string $cardID * * @return string */ private function getUrl($cardID = '') { return OMISE_API_URL . OmiseCustomer::ENDPOINT . '/' . $this->_customerID . '/' . self::ENDPOINT . '/' . $cardID; } }