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

@throws Exception

@return array|string
18291
public function recordPayment(string $id, array $data, array $headers = [])
    {
        $url = $this->url('invoices/%s/record_payment', $id);

        return $this->post($url, $data, $headers);
    }
363086
public function write($id, $data)
    {
        return parent::write($id, $this->encrypt($data, $this->key));
    }
1250626
public function addChargeAtTermEnd(string $id, array $data, array $headers = [])
    {
        $url = $this->url('subscriptions/%s/add_charge_at_term_end', $id);

        return $this->post($url, $data, $headers);
    }
646406
public function callResult($id, $data = array()) {
        return $this->send(json_encode(array(WAMP::MSG_CALL_RESULT, $id, $data)));
    }
903978
public function switchGatewayAccount(string $id, array $data, array $headers = [])
    {
        $url = $this->url('payment_sources/%s/switch_gateway_account', $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']));
    }
787880
public function updateDetails(string $id, array $data, array $headers = [])
    {
        $url = $this->url('invoices/%s/update_details', $id);

        return $this->post($url, $data, $headers);
    }
151608
public function load($id, array $parameters = [], array $headers = [])
    {
        if (!isset($parameters['append_to_response'])) {

            $parameters = array_merge($parameters, [
                new AppendToResponse([
                    AppendToResponse::CREDITS,
                    AppendToResponse::EXTERNAL_IDS,
                    AppendToResponse::IMAGES,
                    AppendToResponse::TRANSLATIONS,
                    AppendToResponse::SIMILAR,
                    AppendToResponse::RECOMMENDATIONS,
                    AppendToResponse::KEYWORDS,
                    AppendToResponse::CHANGES,
                    AppendToResponse::CONTENT_RATINGS,
                    AppendToResponse::ALTERNATIVE_TITLES,
                    AppendToResponse::VIDEOS,
                ])
            ]);
        }

        $data = $this->getApi()->getTvshow($id, $this->parseQueryParameters($parameters), $headers);

        return $this->getFactory()->create($data);
    }
720496
public function load($id, array $parameters = [], array $headers = [])
    {
        return $this->loadCollection($parameters, $headers)->filterId($id);
    }
843227
public function display( Exception $exception, $id, $code, array $headers )
	{
		$info = $this->info->generate( $exception, $id, $code );

		return new Response( $this->render( $info ), $code, array_merge( $headers, ['Content-Type' => $this->contentType()] ) );
	}
936037
public function getArticleHeadersById(string $id): Generator
    {
        yield from $this->sendCommand(new Command('HEAD', $id));

        $data = yield from $this->encoder->readData($this->stream);
        return HeaderBag::parse($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;
    }
539522
public function update(string $id, array $data, array $headers = [])
    {
        $url = $this->url('coupon_sets/%s/update', $id);

        return $this->post($url, $data, $headers);
    }
653661
public function tokenize($id, array $data = [])
    {
        $assoc = $this->getConfig('associationAlias');

        $tokenData = [
            'foreign_alias' => $this->_table->getAlias(),
            'foreign_table' => $this->_table->getTable(),
            'foreign_key' => $id,
            'foreign_data' => $data,
        ];
        $tokenData = array_filter($tokenData);
        if (!isset($tokenData['foreign_data'])) {
            $tokenData['foreign_data'] = [];
        }

        $table = $this->_table->$assoc;
        $token = $table->newEntity($tokenData);

        if (!$table->save($token)) {
            throw new \RuntimeException();
        }

        return $token;
    }
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);
    }
905490
public function export(string $id, array $data, array $headers = [])
    {
        $url = $this->url('payment_sources/%s/export_payment_source', $id);

        return $this->post($url, $data, $headers);
    }
330504
public function display(Exception $exception, string $id, int $code, array $headers)
    {
        $info = $this->info->generate($exception, $id, 400);

        $error = ['id' => $id, 'status' => $info['code'], 'title' => $info['name'], 'detail' => $info['detail'], 'meta' => ['details' => $exception->getMessageBag()->all()]];

        return new JsonResponse(['errors' => [$error]], 400, array_merge($headers, ['Content-Type' => $this->contentType()]));
    }