def update_subscription(netid, action, subscription_code, data_field=None):
    """
    Post a subscription action for the given netid and subscription_code
    """
    url = '/nws/v1/subscription.json'
    action = {
        'uwNetID': netid,
        'action': action,
        'subscriptionCode': str(subscription_code)
    }

    if isinstance(data_field, tuple) and len(data_field) == 2:
        action[data_field[0]] = str(data_field[1])

    body = {'actionList': [action]}
    response = post_resource(url, json.dumps(body))
    return _json_to_subscriptions(response)
Post a subscription action for the given netid and subscription_code