#NEWLINE# def _calculate_pricing_tiers( self ) : #NEWLINE# #INDENT# for pricing_tier in self . credits_config [ 'pricing_tiers' ] : #NEWLINE# #INDENT# credit_units = ( pricing_tier [ 'price' ] / self . credit_unit ) #NEWLINE# actual_credit_units = ( self . credit_units_per_game * pricing_tier [ 'credits' ] ) #NEWLINE# bonus = ( actual_credit_units - credit_units ) #NEWLINE# self . log . debug ( 'Pricing Tier Bonus. Price: %s, Credits: %s. Credit units for this tier: %s, Credit units this tier buys: %s, Bonus bump needed: %s' , pricing_tier [ 'price' ] , pricing_tier [ 'credits' ] , credit_units , actual_credit_units , bonus ) #NEWLINE# self . pricing_tiers . add ( ( credit_units , bonus ) )