/** * Ativar ou desativar um plano * * @param $code * @param $status [activate, inactivate] * @param array $options * @throws ClientException * @return ResponseInterface */ protected function toogleActive($code, $status, array $options = []) { $url = $this->interpolate(self::BASE_PATH . "/{code}/{status}", ['version' => $this->client->getApiVersion(), 'resource' => self::RESOURCE, 'code' => $code, 'status' => $status]); return $this->client->put($url, $options); }
/** * @param $code * @param array $data * @param array $options * @throws ClientException * @return ResponseInterface */ public function updateBillingInfo($code, array $data, array $options = []) { $url = $this->interpolate(self::BASE_PATH . "/{code}/billing_infos", ['version' => $this->client->getApiVersion(), 'resource' => self::RESOURCE, 'code' => $code]); $options = array_merge($options, ['body' => json_encode($data)]); return $this->client->put($url, $options); }