anchor.diff:  		end
   	of
   		Service ->
  -			Body = mochijson:encode(service(Service)),
  +			Body = mochijson:encode(inventory(Service)),
   			Href = ?serviceInventoryPath ++ binary_to_list(Service#service.name),
   			Etag = ocs_rest:etag(Service#service.last_modified),
   			Headers = [{location, Href}, {etag, Etag}],
  
positive.code: 	end,
  	NewAcc = Acc#service{name = Identity, password = Password,
  		multisession = MultiSession, attributes = A2},
  	service(T, NewAcc);
  service([], Acc) ->
  	Acc.
  %% @hidden
  service([name | T], #service{name = undefined} = Service, Chars, Acc) ->
  	service(T, Service, Chars, Acc);
  service([name | T], #service{name = Identity} = Service,
  		Chars, Acc) when is_binary(Identity) ->
  	SId = {"serviceIdentity", binary_to_list(Identity)},
  	Id = {"id", binary_to_list(Identity)},
  	Href = {"href", ?serviceInventoryPath ++ binary_to_list(Identity)},
  	NewChars = lists:keystore("serviceIdentity", 1, Chars, SId),
  	service(T, Service, NewChars, [Id, Href | Acc]);
  service([name | T], #service{name = Identity} = Service,
  		Chars, Acc) when is_list(Identity) ->
  	Id = {"id", Identity},
  	Href = {"href", ?serviceInventoryPath ++ Identity},
  	SId = {"serviceIdentity", Identity},
  	NewChars = lists:keystore("serviceIdentity", 1, Chars, SId),
  	service(T, Service, NewChars, [Id, Href | Acc]);
  service([password | T], #service{password = undefined} = Service, Chars, Acc) ->
  	service(T, Service, Chars, Acc);
  service([password | T], #service{password = Password} = Service,
  		Chars, Acc) when is_binary(Password) ->
  	SPwd = {"servicePassword", binary_to_list(Password)},
  	NewChars = lists:keystore("servicePassword", 1, Chars, SPwd),
  	service(T, Service, NewChars, Acc);
  service([password | T], #service{password = Password} = Service,
  		Chars, Acc) when is_list(Password) ->
  	SPwd = {"servicePassword", Password},
  	NewChars = lists:keystore("servicePassword", 1, Chars, SPwd),
  	service(T, Service, NewChars, Acc);
  service([product | T], #service{product = undefined} = Service, Chars, Acc) ->
  	service(T, Service, Chars, Acc);
  service([product | T], #service{product = ProductRef} = Service, Chars, Acc) ->
  	service(T, Service, Chars, [{"product", ProductRef} | Acc]);
  service([enabled | T], #service{enabled = Enabled} = Service, Chars, Acc) ->
  	service(T, Service, Chars, [{"isServiceEnabled", Enabled} | Acc]);
  service([multisession | T], #service{multisession = MultiSession} =
  		Service, Chars, Acc) ->
  	MS = {"multiSession", MultiSession},
  	NewChars = lists:keystore("multiSession", 1, Chars, MS),
  	service(T, Service, NewChars, Acc);
  service([attributes | T], #service{attributes = []} = Service, Chars, Acc) ->
  	service(T, Service, Chars, Acc);
  service([attributes | T], #service{attributes = Attributes} = Service, Chars, Acc) ->
  	C1 = case lists:keyfind(?AcctInterimInterval, 1, Attributes) of
  		{_, AcctSessionInterval} ->
  			[{"acctSessionInterval", AcctSessionInterval}];
  
negative.code: 	Char5 = {struct, [Name5, Description5, Config5, Type5, Value5]},
  	[Char1, Char2, Char3, Char4, Char5].
  
  -spec inventory(Service) -> Service
  	when
  		Service :: #service{} | {struct, list()}.
  %% @doc CODEC for service inventory 
  inventory({struct, Service}) ->
  	inventory(Service, #service{});
  inventory(#service{} = Service) ->
  	inventory(record_info(fields, service), Service, [], []).
  %% @hidden
  inventory([{"id", Id}| T], Acc) ->
  	inventory(T, Acc#service{name = list_to_binary(Id)});
  inventory([{"isServiceEnabled", Enabled}| T], Acc) ->
  	inventory(T, Acc#service{enabled = Enabled});
  inventory([{"product", ProductRef}| T], Acc) ->
  	inventory(T, Acc#service{product = ProductRef});
  inventory([{"serviceCharacteristic", Characteristics}| T], Acc) ->
  	Chars = service_chars(Characteristics),
  	F = fun(Key, Chars1) ->
  			case lists:keyfind(Key, 1, Chars1) of
  