anchor.diff:  			char_value_use = [#char_value_use{name = "callDirection",
   			min = 1, max = 1, values = [#char_value{default = true,
   			value = "originate"}]}]},
  -	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, originate, SessionId),
  +			ServiceId, Password, Timestamp, CallAddress, originate, 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_default_voice() ->
   	[{userdata, [{doc, "Authorize default outgoing voice call"}]}].
   
   authorize_default_voice(_Config) ->
  -	ProdID = ocs:generate_password(),
   	OutPrice = 2,
   	OutSize = 60,
   	Price1 = #price{name = "Outgoing Calls", type = usage,
  
positive.code: 			char_value_use = [#char_value_use{name = "radiusReserveOctets",
  			min = 1, max = 1, values = [#char_value{default = true,
  			units = octets, value = ReserveOctets}]}]},
  	DataProduct = #offer{name = DataProdID, price = [DataPrice],
  			specification = "8"},
  	{ok, _} = ocs:add_offer(DataProduct),
  	VoiceProdID = ocs:generate_password(),
  	VoiceSize = 60,
  	VoiceAmountOut = 2,
  	ReserveTime = 300,
  
negative.code: 	[{userdata, [{doc, "Out of credit remove session attributes from subscriber record"}]}].
  
  interim_reserve_remove_session(_Config) ->
  	P1 = price(usage, octets, 1000, 100),
  	OfferId = add_offer([P1], 4),
  	ProdRef = add_product(OfferId),
  	ServiceId =  add_service(ProdRef),
  	RemAmount = 110,
  	B1 = bucket(cents, RemAmount),
  	_BId = add_bucket(ProdRef, B1),
  	TS = calendar:datetime_to_gregorian_seconds(calendar:local_time()),
  	Reservation1 = 100,
  	ServiceType = 32251,
  	SessionId = {'Session-Id', list_to_binary(ocs:generate_password())},
  	NasIp = {?NasIpAddress, "10.0.0.1"},
  	NasId = {?NasIdentifier, "rate@sigscale"},
  	SessionAttributes  = [NasId, NasIp, SessionId],
  	{ok, _, _} = ocs_rating:rate(diameter, ServiceType, ServiceId, TS,
  			undefined, undefined, initial, [], [{octets, Reservation1}],
  			SessionAttributes),
  	Reservation2 = 1100,
  	{out_of_credit, SessionList} = ocs_rating:rate(diameter, ServiceType,
  			ServiceId, calendar:gregorian_seconds_to_datetime(TS + 60),
  			undefined, undefined, initial, [], [{octets, Reservation2}],
  			SessionAttributes),
  	[{_, [SessionId]}] = SessionList,
  	{ok, #service{session_attributes = []}} = ocs:find_service(ServiceId).
  
  interim_reserve_multiple_buckets_available() ->
  	[{userdata, [{doc, "Reservation with multiple buckets"}]}].
  
  interim_reserve_multiple_buckets_available(_Config) ->
  	PackagePrice = 100,
  	PackageSize = 1000,
  	P1 = price(usage, octets, 1000, 100),
  	OfferId = add_offer([P1], 4),
  	ProdRef = add_product(OfferId),
  	ServiceId =  add_service(ProdRef),
  	RemAmount = 110,
  	B1 = bucket(cents, RemAmount),
  	_BId1 = add_bucket(ProdRef, B1),
  	B2 = bucket(cents, RemAmount),
  	_BId2 = add_bucket(ProdRef, B2),
  	ServiceType = 32251,
  	Reservation1 = 1000,
  	TS = calendar:datetime_to_gregorian_seconds(calendar:local_time()),
  	SessionId = {'Session-Id', list_to_binary(ocs:generate_password())},
  	NasIp = {?NasIpAddress, "10.0.0.1"},
  	NasId = {?NasIdentifier, ocs:generate_password() ++ "@sigscalelab"},
  	SessionAttributes = [NasIp, NasId, SessionId],
  	{ok, _, _} = ocs_rating:rate(diameter, ServiceType, ServiceId, TS,
  			undefined, undefined, initial, [], [{octets, Reservation1}],
  			SessionAttributes),
  	{ok, #product{balance = BucketRefs1}} = ocs:find_product(ProdRef),
  	RatedBuckets1 = lists:flatten([mnesia:dirty_read(bucket, Id)
  			|| Id <- BucketRefs1]),
  	F1 = fun(F1, Type, [#bucket{units = Type, reservations = Res} | T], R) when Res =/= [] ->
  			{_, _, Reserved, _} = lists:keyfind([SessionId], 4, Res),
  			F1(F1, Type, T, Reserved + R);
  