end def create(call) @logger.info("Creating call...") end end class CallLogger def create(call) Rails.logger.info("Creating call...") end def update(call) Rails.logger.info("Update call...") end def delete(call) Rails.logger.info("Delete call...") end def get(call) Rails.logger.info("Get call...") end end
CallEvent) { callRepository.create(CallUpdate(adviserId, event)) } fun handleHangUpEvent(adviserId: String, event: CallEvent) { callRepository.update(CallUpdate(adviserId, event)) } } class CallRepository { fun create(call: CallUpdate): ApiResponse { // call web service } fun update(call: CallUpdate): ApiResponse { // call web service } }