VOMerchantManagerProtocol
@protocol VOMerchantManagerProtocol <NSObject>
Objects that conform to this interface are responsible for retrieving VOMerchant
s from the Vouchr Server.
-
Retrieves all
VOMerchant
s 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
VOMerchant
s that support this currency. Eg. USD, CAD.countryCode
- Retrieve any
VOMerchant
s 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.