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

@throws Exception

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

        return $this->post($url, $data, $headers);
    }
1010130
public function deleteContact(string $id, array $data, array $headers = [])
    {
        $url = $this->url('customers/%s/delete_contact', $id);

        return $this->post($url, $data, $headers);
    }
428194
public function writeOff(string $id, array $data, array $headers = [])
    {
        $url = $this->url('invoices/%s/write_off', $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']));
    }
176717
public function collectPayment(string $id, array $data, array $headers = [])
    {
        $url = $this->url('customers/%s/collect_payment', $id);

        return $this->post($url, $data, $headers);
    }
146838
public function update($data, $id) {

		$bean = \R::findOne( $this->type, ' id = :id ', [ ':id' => $id ] );
		if ( !$bean ) {
			throw new \Exception('This '.$this->type.' does not exist.');
		}
		return $this->set($data, $bean);

	}
463812
public function display(Exception $exception, string $id, int $code, array $headers)
    {
        return cachet_redirect('auth.login')->withError(trans('forms.login.rate-limit'));
    }
593528
public function update($id, array $data)
    {
        return $this->model->where($this->model->getKeyName(), $id)->update($data);
    }
955041
public function update($id, array $data)
    {
        return $this->put($this->getPath().'/'.rawurlencode($id), $data);
    }
203259
public function resume(string $id, array $data = [], array $headers = [])
    {
        $url = $this->url('subscriptions/%s/resume', $id);

        return $this->post($url, $data, $headers);
    }
1179387
public function updatePaymentMethod(string $id, array $data, array $headers = [])
    {
        $url = $this->url('customers/%s/update_payment_method', $id);

        return $this->post($url, $data, $headers);
    }
1139421
public function saveById($id, $data)
    {
        $exists = !is_null($id);
        if (!$exists) {
            $id = $this->findAvailableIdByData($data);
        }
        parent::saveById($id, $data);
        return $id;
    }
646809
public function load($id, array $parameters = [], array $headers = [])
    {
        return $this->getFactory()->create(
            $this->getApi()->getList($id, $parameters, $headers)
        );
    }
1177618
public function load($id, array $parameters = [], array $headers = [])
    {
        $data = $this->getApi()->getCompany($id, $this->parseQueryParameters($parameters), $headers);

        return $this->getFactory()->create($data);
    }
940105
public function update($id, $data)
    {
        $webhook = $this->client->put(
            sprintf('buckets/%d/webhooks/%d.json', $this->bucket, $id),
            [
                'json' => $data,
            ]
        );
        $webhook = new Webhook($this->response($webhook));
        $webhook->inContext($this->bucket);

        return $webhook;
    }
912947
public function execute(IDS_Report $data)
    {

        if ($this->safemode) {
            if ($this->isSpamAttempt()) {
                return false;
            }
        }

        /*
        * In case the data has been modified before it might
        * be necessary to convert it to string since it's pretty
        * senseless to send array or object via e-mail
        */
        $data = $this->prepareData($data);

        if (is_string($data)) {
            $data = trim($data);

            // if headers are passed as array, we need to make a string of it
            if (is_array($this->headers)) {
                $headers = "";
                foreach ($this->headers as $header) {
                    $headers .= $header . "\r\n";
                }
            } else {
                $headers = $this->headers;
            }

            if (!empty($this->recipients)) {
                if (is_array($this->recipients)) {
                    foreach ($this->recipients as $address) {
                        $this->send(
                            $address,
                            $data,
                            $headers,
                            $this->envelope
                        );
                    }
                } else {
                    $this->send(
                        $this->recipients,
                        $data,
                        $headers,
                        $this->envelope
                    );
                }
            }

        } else {
            throw new Exception(
                'Please make sure that data returned by
                 IDS_Log_Email::prepareData() is a string.'
            );
        }

        return true;
    }
920044
public function update($id, $data)
    {
        $sections = empty($data['sections']) ? [] : $data['sections'];

        return $this->_sendPayload(
            $this->_getService($this->_pageServiceKey)->updateTemplateSections($id, $sections)
        );
    }