/** * @see \Apigee\Mint\Base\BaseObject::save() * @param string $save_method Allowed values: update * @throws \Apigee\Exceptions\ParameterException; */ public function save($save_method = 'auto') { if ($save_method != 'update') { throw new ParameterException("Only update method is supported"); } parent::save('update'); }
/** * @param null $page_num * @param int $page_size * * @return array */ public function getList($page_num = null, $page_size = 20) { /* $cache_manager = CacheFactory::getCacheManager(null); $data = $cache_manager->get('payment_providers', null); if (!isset($data)) { $return_objects = parent::getList($page_num, $page_size); $data = $this->responseObj; $cache_manager->set('payment_providers', $data); } */ $return_objects = parent::getList($page_num, $page_size); $data = $this->responseObj; foreach ($data[$this->wrapperTag] as $response_data) { $obj = $this->instantiateNew(); $obj->loadFromRawData($response_data); $return_objects[] = $obj; } return $return_objects; }
public function getList($page_num = null, $page_size = 20, $current = true, $all_available = true) { if (!isset($this->developerId)) { return parent::getList(); } $options = array('query' => array('current' => $current ? 'true' : 'false', 'allAvailable' => $all_available ? 'true' : 'false')); $url = '/mint/organizations/' . rawurlencode($this->config->orgName) . '/monetization-packages/' . rawurlencode($this->mPackageId) . '/developers/' . rawurlencode($this->developerId) . '/rate-plans'; $this->setBaseUrl($url); $this->get(null, 'application/json; charset=utf-8', array(), $options); $this->restoreBaseUrl(); $response = $this->responseObj; $return_objects = array(); foreach ($response[$this->wrapperTag] as $response_data) { $obj = $this->instantiateNew(); $obj->loadFromRawData($response_data); $return_objects[] = $obj; } return $return_objects; }