PayPal\Api\Template::delete PHP Method

delete() public method

Delete a particular template by passing the template ID to the request URI.
public delete ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : boolean
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPal\Transport\PayPalRestCall is the Rest Call Service that is used to make rest calls
return boolean
    public function delete($apiContext = null, $restCall = null)
    {
        ArgumentValidator::validate($this->getTemplateId(), "Id");
        $payLoad = "";
        self::executeCall("/v1/invoicing/templates/{$this->getTemplateId()}", "DELETE", $payLoad, null, $apiContext, $restCall);
        return true;
    }