@click.command()
def sync_plans():
    if STRIPE_PLANS is None:
        return None

    for _, value in STRIPE_PLANS.iteritems():
        plan = PaymentPlan.retrieve(value.get('id'))
        if plan:
            PaymentPlan.update(id=value.get('id'),
                               name=value.get('name'),
                               metadata=value.get('metadata'),
                               statement_descriptor=value.get(
                                   'statement_descriptor'))
        else:
            PaymentPlan.create(**value)

    return None
Returns the display value of a field for a particular MongoDB document.
dataset/ETHPy150Open nickjj/build-a-saas-app-with-flask/cli/commands/cmd_stripe.py/sync_plans--crossover with--dataset/ETHPy150Open jazzband/django-mongonaut/mongonaut/templatetags/mongonaut_tags.py/get_document_value