#NEWLINE# def decode_credit_card_from_dict( dct ) : #NEWLINE# #INDENT# if ( '__credit_card__' in dct ) : #NEWLINE# #INDENT# d = dct . copy ( ) #NEWLINE# d . pop ( '__credit_card__' ) #NEWLINE# d . pop ( 'card_type' ) #NEWLINE# retval = CreditCard ( ** d ) #NEWLINE# card_type = dct . get ( 'card_type' , None ) #NEWLINE# if ( card_type is not None ) : #NEWLINE# #INDENT# retval . card_type = getattr ( billing . utils . credit_card , card_type ) #NEWLINE# #UNINDENT# return retval #NEWLINE# #UNINDENT# return dct