anchor.diff:  		Id :: string(),
   		Subscriber :: string().
   %% @hidden Get a subscriber id from list of subscribers.
  -get_subscriber(["msisdn-" ++ MSISDN | _]) -> 
  +get_subscriber(["msisdn-" ++ MSISDN | _]) ->
   	MSISDN;
  -get_subscriber(["imsi-" ++ IMSI | _]) -> 
  +get_subscriber(["imsi-" ++ IMSI | _]) ->
   	IMSI;
  -get_subscriber([_ | T]) -> 
  +get_subscriber([_ | T]) ->
   	get_subscriber(T);
  -get_subscriber([]) -> 
  +get_subscriber([]) ->
   	undefined.
   
  -%% @hidden
  -event_type(#{"oneTimeEventType" := "IEC"}) ->
  -	event;
  -event_type(_) ->
  -	initial.
  -	
   -spec struct_service_rating(ServiceRating) -> Result
   	when
   		ServiceRating :: [map()],
  
positive.code: -spec rate(NrfRequest, Flag) -> Result
  	when
  		NrfRequest :: map(),
  		Flag :: initial | interim | final,
  		Result :: [map()] | {error, Reason},
  		Reason :: term().
  %% @doc Rate Nrf Service Ratings.
  
negative.code: 			'Origin-Host' = list_to_binary(ohost(DiamterConfig)),
  			'Origin-Realm' = list_to_binary(orealm(DiamterConfig)),
  			'Auth-Application-Id' = ?RO_APPLICATION_ID,
  			'CC-Request-Type' = event_type(RequestType),
  			'CC-Request-Number' = RequestNum,
  			'Multiple-Services-Credit-Control' = mscc(ServiceRating),
  			'Result-Code' = result_code(ServiceRating)}.
  
  -spec diameter_error(RatingDataRef, RequestType, ResultCode,
  		NrfReply) -> DiameterReply
  	when
  		RatingDataRef :: string(),
  		RequestType :: initial | interim | final | event,
  		ResultCode :: pos_integer(),
  		NrfReply :: map(),
  		DiameterReply :: #'3gpp_ro_CCA'{}.
  %% @doc Build a CCA DIAMETER CCA indicating an operation failure.
  %% @hidden
  diameter_error(RatingDataRef, RequestType, ResultCode,
  		#{"invocationSequenceNumber" := RequestNum}) ->
  	{ok, DiamterConfig} = application:get_env(ocs, diameter),
  	#'3gpp_ro_CCA'{'Session-Id' = RatingDataRef, 'Result-Code' = ResultCode,
  			'Origin-Host' = list_to_binary(ohost(DiamterConfig)),
  			'Origin-Realm' = list_to_binary(orealm(DiamterConfig)),
  			'Auth-Application-Id' = ?RO_APPLICATION_ID,
  			'CC-Request-Type' = event_type(RequestType),
  			'CC-Request-Number' = RequestNum}.
  
  %% @hidden
  result_code("SUCCESS") ->
  