ActivePerksCatalog

The merchant browse rules, defined once.

Every function here is pure: same input, same output, no I/O. The one platform input is the device locale, which decides how names collate; every other rule is identical on the JVM and on Kotlin/Native.

Functions

Link copied to clipboard

The categories the catalogue actually uses, de-duplicated and collated by the device locale like merchant names, so no filter option a client offers can yield an empty list.

Link copied to clipboard

Applies search, categories and favorites together. A merchant is kept only if it satisfies all three.

Link copied to clipboard

The merchant's favorite state, with a client-supplied override taking precedence over the value the catalogue carried.

Link copied to clipboard

Matches the free-form brand string a location carries to a merchant.

Link copied to clipboard

Orders the catalogue by the criteria in turn, each breaking the previous one's ties. An empty list returns the input order unchanged.