#NEWLINE# def discount_rules( self , id = None ) : #NEWLINE# #INDENT# if id : #NEWLINE# #INDENT# return ProductDiscountRules . get ( id . id , id , connection = self . _connection ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ProductDiscountRules . all ( self . id , connection = self . _connection )