public static InvoiceSearchResponse GetAll(APIContext apiContext, int page = 1, int pageSize = 20, bool totalCountRequired = false)
{
// Validate the arguments to be used in the request
ArgumentValidator.ValidateAndSetupAPIContext(apiContext);
var queryParameters = new QueryParameters();
queryParameters["page"] = page.ToString();
queryParameters["page_size"] = pageSize.ToString();
queryParameters["total_count_required"] = totalCountRequired.ToString();
// Configure and send the request
var resourcePath = "v1/invoicing/invoices" + queryParameters.ToUrlFormattedString();
return PayPalResource.ConfigureAndExecute<InvoiceSearchResponse>(apiContext, HttpMethod.GET, resourcePath);
}