public static Image QrCode(APIContext apiContext, string invoiceId, int width = 500, int height = 500, string action = "pay")
{
// Validate the arguments to be used in the request
ArgumentValidator.ValidateAndSetupAPIContext(apiContext);
ArgumentValidator.Validate(invoiceId, "invoiceId");
var queryParameters = new QueryParameters();
queryParameters["width"] = width.ToString();
queryParameters["height"] = height.ToString();
queryParameters["action"] = action;
// Configure and send the request
var pattern = "v1/invoicing/invoices/{0}/qr-code";
var resourcePath = SDKUtil.FormatURIPath(pattern, new object[] { invoiceId }) + queryParameters.ToUrlFormattedString();
return PayPalResource.ConfigureAndExecute<Image>(apiContext, HttpMethod.GET, resourcePath);
}