我正在使用Nuget包与Zoho CRM API进行对话。
有一个如下所示的界面:
namespace Teference.Zoho.Api
{
public interface IZsCustomerApi
{
Task<ZsCustomer> CreateAsync(ZsCustomerInput createInput);
Task<ZsCustomer> CreateAsync(string apiBaseUrl, string authToken, string organizationId, ZsCustomerInput createInput);
Task<bool> DeleteAsync(string id);
Task<bool> DeleteAsync(string apiBaseUrl, string authToken, string organizationId, string id);
Task<ZsCustomers> GetAllAsync(QueryStringBuilder queryStringBuilder = null);
Task<ZsCustomers> GetAllAsync(string apiBaseUrl, string authToken, string organizationId, QueryStringBuilder queryStringBuilder = null);
Task<ZsCustomer> GetAsync(string id);
Task<ZsCustomer> GetAsync(string apiBaseUrl, string authToken, string organizationId, string id);
Task<ZsCustomer> UpdateAsync(string id, ZsCustomerInput updateInput);
Task<ZsCustomer> UpdateAsync(string apiBaseUrl, string authToken, string organizationId, string id, ZsCustomerInput updateInput);
}
}
我想调用“GetAllAsync”函数。
我试图像这样实例化接口:
IZsCustomerApi customerAPI = new IZsCustomerApi();
但是我收到了错误
无法创建抽象类或接口'IZsCustomerApi'的实例
我遗漏了一些显而易见但却无法解决的问题?