Commit 5d61de03 by Dima Bart

Fix incorrect routes for gift_card endpoints.

parent 93c81413
......@@ -132,9 +132,14 @@
#pragma mark - API -
- (BUYRoute *)routeForShopDomain
{
return [BUYRoute routeWithFormat:@"https://%@", self.shopDomain];
}
- (BUYRoute *)routeForAPI
{
return [BUYRoute routeWithFormat:@"https://%@/api/", self.shopDomain];
return [[self routeForShopDomain] appendPath:@"/api"];
}
- (BUYRoute *)routeForApps
......@@ -146,7 +151,7 @@
- (BUYRoute *)routeForShop
{
return [[self routeForAPI] appendPath:@"/meta"];
return [[self routeForShopDomain] appendPath:@"/meta"];
}
- (BUYRoute *)routeForProductListings
......@@ -193,12 +198,12 @@
- (BUYRoute *)routeForCheckoutsUsingGiftCardWithToken:(NSString *)token
{
return [[[self routeForCheckouts] appendPath:@"/gift_cards"] appendPath:token];
return [[[self routeForCheckouts] appendPath:token] appendPath:@"/gift_cards"];
}
- (BUYRoute *)routeForCheckoutsUsingGiftCard:(NSNumber *)giftCardID token:(NSString *)token
{
return [[[self routeForCheckoutsUsingGiftCard] appendIdentifier:giftCardID] appendPath:token];
return [[self routeForCheckoutsUsingGiftCardWithToken:token] appendIdentifier:giftCardID];
}
#pragma mark - Customers -
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment