getChatHistory method

ApiRequest<List<ChatSession>, ChatSession> getChatHistory(
  1. String email,
  2. String businessId
)

Implementation

ApiRequest<List<ChatSession>, ChatSession> getChatHistory(
    String email, String businessId) {
  return ApiRequest<List<ChatSession>, ChatSession>(
      baseUrl: baseUrl,
      path: ApiUrls.chatHistory(email),
      method: ApiMethods.get,
      dataKey: 'ticket',
      query: {'businessId': businessId},
      error: ErrorDescription(),
      interceptors: [
        HeaderInterceptor({
          "Content-Type": "application/json",
          "Accept": "application/json"
        }),
        JsonInterceptor<EnifError>(Models.factories),
      ]);
}