Bible Trivia Question for Tuesday 01/28/2020

Though a Gentile and a prostitute God used me to protect his spies and to ensure his victory. Later I was accepted as one of God’s people. Who am I?