Skip to content

Instantly share code, notes, and snippets.

@klaaspieter
Created August 8, 2014 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klaaspieter/60c1a4c29accbb79657a to your computer and use it in GitHub Desktop.
Save klaaspieter/60c1a4c29accbb79657a to your computer and use it in GitHub Desktop.
[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