/**
  * @param $code
  * @param array $data
  * @param array $options
  *
  * @throws ClientException
  *
  * @return ResponseInterface
  */
 public function updateBillingInfo($code, array $data, array $options = [])
 {
     $url = $this->interpolate($this->client->getApiUrl() . '/' . self::BASE_PATH . '/{code}/billing_infos', ['environment' => $this->client->getEnvironment(), 'version' => $this->client->getApiVersion(), 'resource' => self::RESOURCE, 'code' => $code]);
     $options = array_merge($options, ['body' => json_encode($data)]);
     return $this->client->put($url, $options);
 }
示例#2
0
 /**
  * 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($this->client->getApiUrl() . '/' . self::BASE_PATH . '/{code}/{status}', ['environment' => $this->client->getEnvironment(), 'version' => $this->client->getApiVersion(), 'resource' => self::RESOURCE, 'code' => $code, 'status' => $status]);
     return $this->client->put($url, $options);
 }