VOMerchantManagerProtocol

@protocol VOMerchantManagerProtocol <NSObject>

Objects that conform to this interface are responsible for retrieving VOMerchants from the Vouchr Server.

  • Retrieves all VOMerchants that support the specified countryCode and currency.

    Declaration

    Objective-C

    - (void)getMerchantForCurrency:(NSString *)currency
                       countryCode:(NSString *)countryCode
                           success:(void (^)(NSArray<VOMerchant *> *,
                                             NSArray<VOMerchant *> *))onSuccess
                             error:(void (^)(NSError *))onError;

    Swift

    func getMerchantForCurrency(_ currency: String!, countryCode: String!, success onSuccess: (([VOMerchant]?, [VOMerchant]?) -> Void)!, error onError: ((Error?) -> Void)!)

    Parameters

    currency

    - Retrieve any VOMerchants that support this currency. Eg. USD, CAD.

    countryCode

    - Retrieve any VOMerchants that support this countryCode. Eg. US, CA.

    onSuccess

    - block to be executed once the request completes successfully. The block will be supplied with 2 separate merchant lists, the first containing regular merchants, the second containing featured merchants.

    onError

    - block to be executed upon failure of the request.