anchor.diff:          {'error', _Reason} ->
               cb_context:add_system_error('error', Context)
       end;
  -generate_billing_docs(Context, DocsAccountId, Year, Month, FunName) ->
  +generate_billing_docs(Context, AccountId, Year, Month, FunName) ->
       ResellerId = cb_context:account_id(Context),
  -    case onbill_util:validate_relationship(DocsAccountId, ResellerId) of
  +    case onbill_util:validate_relationship(AccountId, ResellerId) of
           'true' ->
  -            _ = docs:FunName(DocsAccountId, kz_term:to_integer(Year), kz_term:to_integer(Month)),
  +            _ = docs:FunName(AccountId, kz_term:to_integer(Year), kz_term:to_integer(Month)),
               cb_context:set_resp_status(Context, 'success');
           'false' ->
               cb_context:add_system_error('forbidden', Context)
       end.
   
  -generate_per_minute_reports(Context, DocsAccountId, Year, Month) ->
  -    docs:per_minute_reports(DocsAccountId, kz_term:to_integer(Year), kz_term:to_integer(Month)),
  +generate_per_minute_reports(Context, AccountId, Year, Month) ->
  +    docs:per_minute_reports(AccountId, kz_term:to_integer(Year), kz_term:to_integer(Month)),
       cb_context:set_resp_status(Context, 'success').
   
   -spec validate_onbill(cb_context:context(), http_method()) -> cb_context:context().
  
positive.code:       ,Context
       ).
  
  maybe_generate_billing_docs(Context, DocsAccountId, Year, Month, FunName) ->
      case cb_context:is_superduper_admin(Context) of
          'true' ->
              generate_billing_docs(Context, DocsAccountId, Year, Month, FunName);
          'false' ->
              case kz_services:is_reseller(cb_context:auth_account_id(Context)) of
                  'true' -> generate_billing_docs(Context, DocsAccountId, Year, Month, FunName);
                  'false' -> cb_context:add_system_error('forbidden', Context)
              end
      end.
  
negative.code: -spec content_types_provided(cb_context:context(), path_token(), path_token()) -> cb_context:context().
  content_types_provided(Context) ->
      Context.
  content_types_provided(Context,?GENERATE,_) ->
      Context;
  content_types_provided(Context,_,?ATTACHMENT) ->
      CTP = [{'to_binary', [{<<"application">>, <<"pdf">>}]}],
  