Last active
January 4, 2017 11:22
-
-
Save maciejwitowski/155180cec00fda213e834920d32b2d79 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Responses | |
data class LeadCenterSummaryResponse( | |
val global: LeadCenterSummaryResponseData, | |
val filtered: LeadCenterSummaryResponseData, | |
val metadata: CentersResponseMetadata | |
) | |
data class LeadSmartListResponse( | |
val smartLists: List<LeadSmartListResponseData>, | |
val metadata: CentersResponseMetadata | |
) | |
data class LeadCenterSummaryResponseData( | |
val total: Int, | |
val statuses: List<Status> | |
) | |
data class LeadSmartListResponseData( | |
val smartListsId: Long, | |
val total: Int, | |
val statuses: List<Status> | |
) | |
data class Status( | |
val statusId: Long, | |
val count: Int | |
) | |
// Cache API | |
interface LeadCenterResponseCache { | |
fun cacheSummaryResponse(response: LeadCenterSummaryResponse) | |
fun cacheLeadSmartListResponse(response: LeadSmartListResponse) | |
fun getCachedSummaryResponse(): LeadCenterSummaryResponse? | |
fun getCachedLeadSmartListResponseWithMetadata(smartList: LeadCenterSmartList): SmartListResponseWithMetadata? | |
fun removeCachedSummaryResponse(response: LeadCenterSummaryResponse) | |
fun removeCachedSingleLeadsSmartListResponse(response: LeadSmartListResponseData) | |
} | |
data class SmartListResponseWithMetadata( | |
val response: LeadSmartListResponseData, | |
val metadata: CentersResponseMetadata | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment