diff --git a/app/controllers/qbo_controller.rb b/app/controllers/qbo_controller.rb index 18a0ee5..18f8d28 100644 --- a/app/controllers/qbo_controller.rb +++ b/app/controllers/qbo_controller.rb @@ -75,8 +75,9 @@ class QboController < ApplicationController entities = data['eventNotifications'][0]['dataChangeEvent']['entities'] entities.each do |entity| - puts entity['name'] - puts entity['id'] + if entity['name'].eql? "Customer" + Customer.sync(entity['id'].to_i) + end end # The webhook doesn't require a response but let's make sure