#NEWLINE# @ click . command ( ) #NEWLINE# def sync_plans( ) : #NEWLINE# #INDENT# '\n    Sync (upsert) STRIPE_PLANS to Stripe.\n\n    :return: None\n    ' #NEWLINE# if ( STRIPE_PLANS is None ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# for ( _ , value ) in STRIPE_PLANS . iteritems ( ) : #NEWLINE# #INDENT# plan = PaymentPlan . retrieve ( value . get ( 'id' ) ) #NEWLINE# if plan : #NEWLINE# #INDENT# PaymentPlan . update ( id = value . get ( 'id' ) , name = value . get ( 'name' ) , metadata = value . get ( 'metadata' ) , statement_descriptor = value . get ( 'statement_descriptor' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# PaymentPlan . create ( ** value ) #NEWLINE# #UNINDENT# #UNINDENT# return None