Inherits from NSObject
Declared in MMMerchantService.h
MMMerchantService.m

Overview

  • Provides an additional layer over top

  • of MMDBFetcher. This class functions

  • as the the ‘Service Layer’.

Class Methods

sharedService

  • Retrieves the singleton of this
+ (instancetype)sharedService

Discussion

  • class.

*

  • @return A MMMerchantService object which

  •    is a singleton of this class.
    

Declared In

MMMerchantService.h

Instance Methods

getCompressedMerchantsForLocation:withCuisineType:

  • Retrieves a list of merchants that are within a certain threshold of
- (RACSignal *)getCompressedMerchantsForLocation:(CLLocation *)location withCuisineType:(NSString *)cuisine

Discussion

  • the given location. Also, the list of merchants must server the type

  • of cusine that is specifed. Again, the information returned

  • is only a subset of the available information for a merchants.

*

  • @param location The location.

  • @param cuisine The type of cusine.

*

  • @return An NSMutableArray of MMerchant objects.

Declared In

MMMerchantService.h

getCompressedMerchantsForLocation:withName:

  • Retrieves a list of merchants that are within a certain threshold of
- (RACSignal *)getCompressedMerchantsForLocation:(CLLocation *)location withName:(NSString *)merchantName

Discussion

  • the given location. Also, the list of merchants must be either a partial

  • or full match to the given merchant name. Again, the information returned

  • is only a subset of the available information for a merchants.

*

  • @param location The location.

  • @param merchantName The merchant name to search for.

*

  • @return An NSMutableArray of MMerchant objects.

Declared In

MMMerchantService.h

getDefaultCompressedMerchantsForLocation:

  • Retrieves a list of merchants that are within a certain
- (RACSignal *)getDefaultCompressedMerchantsForLocation:(CLLocation *)location

Discussion

  • threshold of the specified location. The merchant objects

  • only contain a subset of the available information for

  • a merchant object.

*

  • @param location The location object.

*

Declared In

MMMerchantService.h

getMerchantWithMerchantID:

  • Retrieves the merchant that corresponds
- (RACSignal *)getMerchantWithMerchantID:(NSNumber *)merchantId

Discussion

  • with the given merchant ID.

*

  • @param merchantId The ID of the merchant to retrive.

*

Declared In

MMMerchantService.h