Some time ago, while building an API, I though that stacking `if` statements depending on function parameters leads to complex business logic. One of the solutions I found was "methods overloading", used mainly in Java (and C#).
When building an application, we often face problems with external APIs. One has simple methods, other has them very complicated. Unifying them under one common interface is one of uses of the facade pattern.