@param string $id
@param array  $data
@param array  $headers

@throws Exception

@return array|string
325534
public function changeBillingDate(string $id, array $data, array $headers = [])
    {
        $url = $this->url('customers/%s/change_billing_date', $id);

        return $this->post($url, $data, $headers);
    }
1107467
public function chargeFutureRenewals(string $id, array $data, array $headers = [])
    {
        $url = $this->url('subscriptions/%s/charge_future_renewals', $id);

        return $this->post($url, $data, $headers);
    }
580123
public function display(Exception $exception, string $id, int $code, array $headers)
    {
        $content = $this->whoops()->handleException($exception);

        return new Response($content, $code, array_merge($headers, ['Content-Type' => 'text/html']));
    }
920044
public function update($id, $data)
    {
        $sections = empty($data['sections']) ? [] : $data['sections'];

        return $this->_sendPayload(
            $this->_getService($this->_pageServiceKey)->updateTemplateSections($id, $sections)
        );
    }
857275
public function update($id, array $data)
    {
        $istance = $this->getById($id);

        if (! $istance)
        {
            return false;
        }

        return $istance->update($data);
    }
955041
public function update($id, array $data)
    {
        return $this->put($this->getPath().'/'.rawurlencode($id), $data);
    }
147072
public function updateContact(string $id, array $data, array $headers = [])
    {
        $url = $this->url('customers/%s/update_contact', $id);

        return $this->post($url, $data, $headers);
    }
895304
public function unarchive(string $id, array $headers = [])
    {
        $url = $this->url('plans/%s/unarchive', $id);

        return $this->post($url, [], $headers);
    }
113066
public function addChargeItem(string $id, array $data, array $headers = [])
    {
        $url = $this->url('invoices/%s/add_charge', $id);

        return $this->post($url, $data, $headers);
    }
765941
public function update($id, $data)
    {
        $data = $this->retrieveData($data);
        $updateData = [
            'methods'=> implode(',', $data['methods']),
        ];

        $this->table->update($updateData, ['id' => $id]);

        return $data;
    }
900561
public function contacts(string $id, array $parameters = [], array $headers = [])
    {
        $resolver = $this->createOptionsResolver();

        $url = $this->url('customers/%s/contacts', $id);

        return $this->get($url, $resolver->resolve($parameters), $headers);
    }
1139421
public function saveById($id, $data)
    {
        $exists = !is_null($id);
        if (!$exists) {
            $id = $this->findAvailableIdByData($data);
        }
        parent::saveById($id, $data);
        return $id;
    }
248387
public function removeCoupons(string $id, array $data, array $headers = [])
    {
        $url = $this->url('subscriptions/%s/remove_coupons', $id);

        return $this->post($url, $data, $headers);
    }
397882
public function update(array $data, $id)
    {
        if (array_key_exists('password', $data)) {
            $data['password'] = bcrypt($data['password']);
        }

        return parent::update($data, $id);
    }
532245
public function write($id, $data)
    {
        try {
            return $this->db->write($id, $data);
        } catch (\Exception $e) {
            throw $e;
        }
    }
64301
public function update($id, $data)
    {
        $routeMatch = $this->getEvent()->getRouteMatch();
        $mode = $routeMatch->getParam('mode', false);
        $type = $routeMatch->getParam('type', false);
        $endpoint = $routeMatch->getParam('endpoint', false);
        $annee = $routeMatch->getParam('annee', 0);
        
        $processStateHandler = $this->getProcessStateHandler();
        $process = $processStateHandler->getProcess($mode, $type, $endpoint, $annee);
        
        if (is_null($process)) {
            $process = $processStateHandler->getDefaultProcess($mode, $type, $endpoint, $annee);
            $processStateHandler->saveProcess($process);
        }
        if (array_key_exists('force-execution-stop', $data)) {
            $process->setInterrupted(true);
        } else {
            $active = array_key_exists('active', $data) && $data['active'] === 'true';
            $process->setActive($active);
            $shedule = $data['shedule'] === 'true' && $data['active'] === 'true';
            $process->setShedule($shedule);
            $process->setCron($shedule ? $data['cron'] : null);
        }
        
        $processStateHandler->saveProcess($process);
        $response = $this->getResponse();
        $response->getHeaders()->addHeaderLine('Content-Type', 'application/json');
        $serializer = $this->getSerializer();
        $processJson = $serializer->serialize($process, 'json');
        $response->setContent($processJson);
        return $response;
    }
1061714
public function refund(string $id, array $data, array $headers = [])
    {
        $url = $this->url('invoices/%s/refund', $id);

        return $this->post($url, $data, $headers);
    }