They talk about this in book-goos where there is an adapter that translates data provided externally into concepts that map more readily to the domain.
Often his goal when adding a method to a Active Record class is to add a thin layer over the database stuff. The goal of that later is to provide terminology that is more of a match for the application logic than the underlying database table and row names.
You do testing-concept-make-adapter-for-external-services for different reasons, but that's a good place to do it.
The motivation for this is described here:
6:30 as soon as it enters your system you want to make structured at the barrier
6:50 "I really don't want to be passing this unstructured thing all around in my code. I want to have an explicit place where this conversion is happening."