anchor.diff:  		NewBuckets :: [#bucket{}].
   %% @doc Get total debited amount and remove all reservations for session.
   %% @private
  -%% 
  +%%
   get_debits(SessionId, Buckets) ->
   	Now = erlang:system_time(?MILLISECOND),
   	get_debits(Buckets, SessionId, Now, 0, 0, 0, 0, []).
  
positive.code: 						Acc
  				end
  		end,
  		[#offer{name = ProductName} = Product | _] = lists:foldl(F, [], Bundle),
  		rate2(Protocol, Subscriber, Timestamp, Address, Direction, Product,
  				Validity, Flag, DebitAmounts, ReserveAmounts, SessionAttributes,
  				#rated{product = ProductName})
  	catch
  		_:_ ->
  			throw(invalid_bundle_product)
  	end;
  rate1(Protocol, _ServiceType, Subscriber, Timestamp, Address, Direction,
  		#offer{name = ProductName} = Product, Validity, Flag, DebitAmounts,
  		ReserveAmounts, SessionAttributes) ->
  	rate2(Protocol, Subscriber, Timestamp, Address, Direction, Product,
  		Validity, Flag, DebitAmounts, ReserveAmounts, SessionAttributes,
  		#rated{product = ProductName}).
  %% @hidden
  rate2(Protocol, Subscriber, Timestamp, Address, Direction,
  		#offer{specification = ProdSpec, price = Prices},
  		Validity, Flag, DebitAmounts, ReserveAmounts,
  		SessionAttributes, Rated) when ProdSpec == "10"; ProdSpec == "11" ->
  	F = fun(#price{type = usage, units = messages}) ->
  				true;
  			(#price{type = usage, units = cents}) ->
  
negative.code: -define(DIAMETERDATA, 32251).
  -define(DIAMETERVOICE, 32260).
  -define(DIAMETERSMS, 32274).
  
  
  
  -spec rate(Protocol, ServiceType, SubscriberID, Timestamp,
  