Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
for (LSMPNSubscription *mpnSubscription in _client.MPNSubscriptions) {
if ([_item isEqualToString:mpnSubscription.itemGroup]) {
// Subscription found, copy it and add a trigger expression
LSMPNSubscription *copy= [[LSMPNSubscription alloc] initWithMPNSubscription:mpnSubscription];
copy.triggerExpression= @"Double.parseDouble(${last_price}) > 100.0";
// Modify the subscription on the Server
[_client subscribeMPN:copy coalescing:NO]; // When modifying the coalescing flag is ignored
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment