Package-level declarations

Helpers that filter, sort and validate the merchant catalog the same way on Android and iOS.

Types

Link copied to clipboard

The merchant browse rules, defined once.

Link copied to clipboard
sealed interface AmountValidation

Whether an amount can be bought for a given ecode, and when it cannot, why.

Link copied to clipboard
data class MerchantFilter(val searchQuery: String = "", val selectedCategories: Set<String> = emptySet(), val favoritesOnly: Boolean = false, val selectedMerchantId: Int? = null, val favoriteOverrides: Map<Int, Boolean> = emptyMap())

The axes a member filters the merchant catalogue by.

Link copied to clipboard
class MerchantFilterStore(initial: MerchantFilter = MerchantFilter())

Holds the filter two screens read at once - a browse list and a map - so they narrow the catalogue the same way instead of each keeping its own copy.

Link copied to clipboard

How the merchant catalogue is ordered. Criteria are supplied as an ordered list and applied in turn, each breaking the previous one's ties.

Functions

Link copied to clipboard

Validates amount against what this ecode actually sells.