src/MediaServices/MediaServicesRestProxy.php
public function sendEndAdvertisementChannelOperation($channel, $cueId)
    {
        $channelId = Utilities::getEntityId(
            $channel,
            'WindowsAzure\MediaServices\Models\Channel'
        );
        $headers = [
            Resources::CONTENT_TYPE => Resources::JSON_CONTENT_TYPE,
        ];
        $body = json_encode([
            'cueId' => $cueId,
        ]);

        return $this->_sendOperation(
            $body,
            "Channels('{$channelId}')/EndAdvertisement",
            Resources::HTTP_POST,
            Resources::STATUS_ACCEPTED,
            $headers);
    }
public function sendEndAdvertisementChannelOperation($channel, $cueId)
    {
        $channelId = Utilities::getEntityId(
            $channel,
            'WindowsAzure\MediaServices\Models\Channel'
        );
        $headers = [
            Resources::CONTENT_TYPE => Resources::JSON_CONTENT_TYPE,
        ];
        $body = json_encode([
            'cueId' => $cueId,
        ]);

        return $this->_sendOperation(
            $body,
            "Channels('{$channelId}')/EndAdvertisement",
            Resources::HTTP_POST,
            Resources::STATUS_ACCEPTED,
            $headers);
    }
public function sendEndAdvertisementChannelOperation ( $ channel , $ cueId ) { $ channelId = Utilities :: getEntityId ( $ channel , 'WindowsAzure\MediaServices\Models\Channel' ) ; $ headers = [ Resources :: CONTENT_TYPE => Resources :: JSON_CONTENT_TYPE , ] ; $ body = json_encode ( [ 'cueId' => $ cueId , ] ) ; return $ this -> _sendOperation ( $ body , "Channels('{$channelId}')/EndAdvertisement" , Resources :: HTTP_POST , Resources :: STATUS_ACCEPTED , $ headers ) ; }
EndAdvertisement on a running channel.

@param Channel|string $channel Channel data or channel Id
@param mixed          $cueId

@return Operation
EndAdvertisement on a running channel .