@param string $id
@param array  $headers

@throws Exception

@return array|string
7351
public function removeScheduledCancellation(string $id, array $headers = [])
    {
        $url = $this->url('subscriptions/%s/remove_scheduled_cancellation', $id);

        return $this->post($url, [], $headers);
    }
688378
public function run($id)
    {
        /** @var ActiveRecord $model */
        $model = $this->findModel($id);
        if ($this->checkAccess) {
            call_user_func($this->checkAccess, 'read', $model);
        }
        //create and cache proper query for breadcrumbs and maybe other things
        $this->getQuery($this->getSearchModel());
        // this headers is used in a modal dialog when getting a redirect after saving a form
        Yii::$app->getResponse()->getHeaders()->set('X-Primary-Key', $id);
        return [
            'model'      => $model,
            'attributes' => $this->getDetailAttributes($model, $this->getFields($model, 'detail')),
            'relations'  => $this->getModelRelations($model, $this->getExtraFields($model)),
        ];
    }
561331
public function getMovies($id, array $parameters = [], array $headers = [])
    {
        return $this->createMovieCollection(
            $this->getApi()->getMovies($id, $this->parseQueryParameters($parameters), $headers)
        );
    }
1070168
public function recordExcessPayment(string $id, array $data, array $headers = [])
    {
        $url = $this->url('customers/%s/record_excess_payment', $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);
    }
289026
public function deleteUnusedCouponCodes(string $id, array $headers = [])
    {
        $url = $this->url('coupon_sets/%s/delete_unused_coupon_codes', $id);

        return $this->post($url, [], $headers);
    }
595121
public function findAsPdf(string $id, array $headers = [])
    {
        $url = $this->url('invoices/%s/pdf', $id);

        return $this->get($url, [], $headers);
    }
826981
public function addContact(string $id, array $data, array $headers = [])
    {
        $url = $this->url('customers/%s/add_contact', $id);

        return $this->post($url, $data, $headers);
    }
457027
public function getMessage($id)
    {
        $header = $this->_protocol->top($id);
        $message = $this->_protocol->retrieve($id);

        return new Message($header, $message, $id);
    }
3654
public function get($uri,array $headers)
        {
            return $this->prepareRequest(self::GET,$uri,$headers,null);
        }
1145658
public function retrieveWithScheduledChanges(string $id, array $headers = [])
    {
        $url = $this->url('subscriptions/%s/retrieve_with_scheduled_changes', $id);

        return $this->get($url, [], $headers);
    }
132489
public function getItemStatus($id, $mediaId, array $parameters = [], array $headers = [])
    {
        return $this->getFactory()->createItemStatus(
            $this->getApi()->getItemStatus($id, $mediaId, $parameters, $headers)
        );
    }
292319
public function addCouponCodes(string $id, array $data, array $headers = [])
    {
        $url = $this->url('coupon_sets/%s/add_coupon_codes', $id);

        return $this->post($url, $data, $headers);
    }
386953
public function show($id)
    {
        if(Request::isAjax()){
            $user = null;
            $message = '';

            try{
                $user = Sentry::findUserById($id);
            }catch(Exception $e){
                $message = $e->getMessage();
            }


            Response::headers()->set('Content-Type', 'application/json');
            Response::setBody(json_encode(
                array(
                    'success'   => !is_null($user),
                    'data'      => !is_null($user) ? $user->toArray() : $user,
                    'message'   => $message,
                    'code'      => is_null($user) ? 404 : 200
                )
            ));
        }else{

        }
    }
1061714
public function refund(string $id, array $data, array $headers = [])
    {
        $url = $this->url('invoices/%s/refund', $id);

        return $this->post($url, $data, $headers);
    }
1074722
public function addIdHeader($name, $ids = null)
    {
        $this->storeHeader($name, $this->factory->createIdHeader($name, $ids));
    }
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);
    }