Created
August 8, 2014 20:52
-
-
Save klaaspieter/60c1a4c29accbb79657a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[RKRequestDescriptor requestDescriptorWithMapping:[mappingProvider.orderConfirmationMapping inverseMapping] | |
objectClass:[WTNOrderConfirmation class] | |
rootKeyPath:@"confirmation" | |
method:RKRequestMethodPOST]; | |
// In the mapping provider | |
- (RKObjectMapping *)orderConfirmationMapping; | |
{ | |
if (!_orderConfirmationMapping) { | |
_orderConfirmationMapping = [RKObjectMapping mappingForClass:[WTNOrderConfirmationResponse class]]; | |
[_orderConfirmationMapping addAttributeMappingsFromDictionary:@{ | |
@"return_url": @"returnURL", | |
@"cancel_url": @"cancelURL" | |
}]; | |
} | |
return _orderConfirmationMapping; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment