anchor.diff:  -define(NOTIFICATION_MIME_TYPES, [{<<"text">>, <<"html">>}
                                  %   ,{<<"text">>, <<"plain">>}
                                    ]).
  +-define(DELETABLE_ONBILL_DOC_TYPES, [<<"transaction_based_invoice">>]).
   
   -spec init() -> 'ok'.
   init() ->
  
positive.code: allowed_methods(?GENERATE) ->
      [?HTTP_PUT];
  allowed_methods(_) ->
      [?HTTP_GET].
  allowed_methods(_,?ATTACHMENT) ->
      [?HTTP_GET].
  
  
negative.code:       ,kz_json:from_list([{<<"message">>, Message}])
        ,Context
       ).
  
  validate_doc(Context, <<Year:4/binary, Month:2/binary, "-", _/binary>> = Id, ?HTTP_DELETE) ->
      Ctx1 = crossbar_doc:load(Id
                              ,cb_context:set_account_modb(Context, kz_term:to_integer(Year), kz_term:to_integer(Month))
                              ,[{'expected_type', <<"onbill">>}]
                              ),
      JObj = cb_context:doc(Ctx1),
      case lists:member(kz_json:get_value(<<"onbill_doc_type">>, JObj), ?DELETABLE_ONBILL_DOC_TYPES) of
          'true' -> crossbar_doc:delete(Ctx1);
          'false' -> cb_context:add_system_error('forbidden', Ctx1)
      end.
  
  generate_transaction_based_invoice(Context, AccountId, <<Year:4/binary, Month:2/binary, "-", _/binary>> = TransctionId, Timestamp) ->
    try
  