anchor.diff:  	{Product1, Buckets1} = lists:foldl(F, {Product, Buckets}, Bundled),
   	subscription(Product1, Now, InitialFlag, Buckets1, Prices).
   %% @hidden
  -subscription(Product, Now, true, Buckets,
  +subscription(#product{name = ProdRef} = Product, Now, true, Buckets,
   		[#price{type = one_time, amount = Amount,
   			alteration = undefined} | T]) ->
  -	NewBuckets = charge(Amount, Buckets),
  +	NewBuckets = charge(ProdRef, Amount, Buckets),
   	subscription(Product, Now, true, NewBuckets, T);
   subscription(#product{name = ProdRef} = Product, Now, true,
   		Buckets, [#price{type = one_time, amount = PriceAmount,
   			alteration = #alteration{units = Units, size = Size,
   			amount = AlterAmount}} | T]) ->
   	N = erlang:unique_integer([positive]),
  -	NewBuckets = charge(PriceAmount + AlterAmount,
  +	NewBuckets = charge(ProdRef, PriceAmount + AlterAmount,
   			[#bucket{id = generate_bucket_id(), product = [ProdRef],
   				units = Units, remain_amount = Size, last_modified = {Now, N}}
   				| Buckets]),
  
positive.code: 		alteration = #alteration{type = recurring, period = Period, units = Units,
  		size = Size, amount = Amount}} | T]) when Period /= undefined, Units == octets;
  		Units == seconds; Units == messages ->
  	{NewPayments, NewBuckets1} = dues(Payments, Now, Buckets, Name, Period, Amount),
  	N = erlang:unique_integer([positive]),
  	NewBuckets2 = charge(Amount, [#bucket{id = generate_bucket_id(),
  			units = Units, remain_amount = Size, product = [ProdRef],
  			termination_date = end_period(Now, Period), last_modified = {Now, N}}
  			| NewBuckets1]),
  
negative.code: 	{Product#product{balance = NewBIds}, Buckets}.
  
  %% @hidden
  dues(Payments, Now, Buckets, PName, Period, Amount, ProdRef) ->
  	dues(Payments, Now, Buckets, PName, Period, Amount, ProdRef, []).
  %% @hidden
  dues([{_, DueDate} = P | T], Now, Buckets, PName, Period, Amount, ProdRef, Acc) when DueDate > Now ->
  	dues(T, Now, Buckets, PName, Period, Amount, ProdRef, [P | Acc]);
  dues([{PName, DueDate} | T], Now, Buckets, PName, Period, Amount, ProdRef, Acc) ->
  	NewBuckets = charge(ProdRef, Amount, Buckets),
  	case end_period(DueDate, Period) of
  		NextDueDate when NextDueDate < Now ->
  			dues([{PName, NextDueDate} | T], Now,
  					NewBuckets, PName, Period, Amount, ProdRef, Acc);
  		NextDueDate ->
  			dues(T, Now, NewBuckets, PName, Period,
  					Amount, ProdRef, [{PName, NextDueDate} | Acc])
  	end;
  dues([P | T], Now, Buckets, PName, Period, Amount, ProdRef, Acc) ->
  	dues(T, Now, Buckets, PName, Period, Amount, ProdRef, [P | Acc]);
  dues([], _Now, Buckets, _PName, _Period, _Amount, _ProdRef, Acc) ->
  	{lists:reverse(Acc), Buckets}.
  
  -spec get_params() -> Result
  