anchor.diff:  			char_value_use = [#char_value_use{name = "callDirection",
   			min = 1, max = 1, values = [#char_value{default = true,
   			value = "answer"}]}]},
  -	Product = #offer{name = ProdID, price = [Price1, Price2],
  -			specification = "9"},
  -	{ok, _} = ocs:add_offer(Product),
  -	SubscriberID = list_to_binary(ocs:generate_identity()),
  -	Password = ocs:generate_password(),
  -	StartingAmount = 1000,
  -	Buckets = [#bucket{units = cents, remain_amount = StartingAmount,
  -			start_date = erlang:system_time(?MILLISECOND),
  -			termination_date = erlang:system_time(?MILLISECOND) + 2592000000}],
  +	OfferId = add_offer([Price1, Price2], 9),
   	ReserveTime = 3600,
   	Chars = [{"radiusReserveSessionTime", ReserveTime}],
  -	{ok, _S} = ocs:add_service(SubscriberID, Password, ProdID, Chars, Buckets),
  +	ProdRef = add_product(OfferId, Chars),
  +	ServiceId = list_to_binary(ocs:generate_identity()),
  +	Password = ocs:generate_password(),
  +	{ok, _Service1} = ocs:add_service(ServiceId, Password,  ProdRef, []),
  +	StartingAmount = 1000,
  +	B1 = bucket(cents, StartingAmount),
  +	_Bid = add_bucket(ProdRef, B1),
   	ServiceType = 12,
   	Timestamp = calendar:local_time(),
   	CallAddress = ocs:generate_identity(),
   	SessionId = [{?AcctSessionId, list_to_binary(ocs:generate_password())}],
   	{authorized, _, RespAttr, _} = ocs_rating:authorize(radius, ServiceType,
  -			SubscriberID, Password, Timestamp, CallAddress, answer, SessionId),
  +			ServiceId, Password, Timestamp, CallAddress, answer, SessionId),
   	{?SessionTimeout, ReserveTime} = lists:keyfind(?SessionTimeout, 1, RespAttr),
  -	{ok, #service{buckets = Buckets1}} = ocs:find_service(SubscriberID),
  +	{ok, #product{balance = BucketRefs1}} = ocs:find_product(ProdRef),
  +	Buckets1 = lists:flatten([mnesia:dirty_read(bucket, Id)
  +			|| Id <- BucketRefs1]),
   	#bucket{remain_amount = StartingAmount} = lists:keyfind(cents, #bucket.units, Buckets1).
   
   authorize_outgoing_voice() ->
   	[{userdata, [{doc, "Authorize outgoing voice call"}]}].
   
   authorize_outgoing_voice(_Config) ->
  -	ProdID = ocs:generate_password(),
   	InPrice = 1,
   	InSize = 60,
   	Price1 = #price{name = "Incoming Calls", type = usage,
  
positive.code: 		termination_date = erlang:system_time(?MILLISECOND) + 2592000000}.
  
  %% @hidden
  add_offer(Prices, Spec) ->
  	Offer = #offer{name = ocs:generate_identity(),
  	price = Prices, specification = Spec},
  
negative.code: 
  %% @hidden
  add_product(OfferId) ->
  	add_product(OfferId, []).
  add_product(OfferId, Chars) ->
  	{ok, #product{id = ProdRef}} = ocs:add_product(OfferId, Chars),
  	ProdRef.
  
  %% @hidden
  