refactor GatewayObjectService

refactor to use same inline pattern from python code as
SmartObjectService