You must use a third-party SMS client whose interface differs from your Notifier.send(to, text). Which pattern?
Options
- Adapter (Correct option)
- Facade
- Decorator
- Command
Answer
Adapter
Why
An Adapter is a small wrapper that converts one interface into the one your code expects, like a travel plug adapter.
Your SmsAdapter.send(to, text) internally calls the vendor's client.messages.create(dest=..., body=...).
The rest of your code keeps using Notifier.send and never knows the vendor's API.
Remember
Adapter = translate one interface into another.