I think you might got things twisted.
In German, (as well as in other languages!!) the accusative case corresponds to DIRECT OBJECTS and dative corresponds to INDIRECT OBJECTS.
Let me provide you some examples. Hopefully this will help you to better understand German Grammar and Cases.
Ich schreibe einen Brief. ----> This is a sentence that only has a direct object ("einen Brief"). The question that you have to ask to get the correct case is " WEN oder WAS schreibst du". Therefore "einen Brief" is accusative.
Ich helfe Dir. ------> In this sentence, "Dir" is a indirect object , because you can ask "WHOM are you helping"---> I am helping YOU. So this is a sentence with an idirect object, without a direct object present in the sentence.
There are sentences, in which you have BOTH a DIRECT and an INDIRECT object.
For instance:
Ich gebe Dir einen Brief. ---> Here you have first the indirect object "Dir" and then you got the direct object "einen Brief". In sentences where you have an indirect and a direct object, the indirect object is usually placed before the direct object.