From 42e4494f6ec73731225122f9420fa9604d01c8b8 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Fri, 30 Jan 2026 21:17:17 -0500 Subject: [PATCH] fixed entity, they need strings --- app/controllers/qbo_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/qbo_controller.rb b/app/controllers/qbo_controller.rb index a05455b..8cd4026 100644 --- a/app/controllers/qbo_controller.rb +++ b/app/controllers/qbo_controller.rb @@ -92,10 +92,10 @@ class QboController < ApplicationController data = params.as_json end # Process the information - entities = data['eventNotifications'][0]['dataChangeEvent'][:entities] + entities = data['eventNotifications'][0]['dataChangeEvent']['entities'] entities.each do |entity| - id = entity[:id].to_i - name = entity[:name] + id = entity['id'].to_i + name = entity['name'] logger.info "Casting #{name.constantize} to obj" @@ -106,7 +106,7 @@ class QboController < ApplicationController obj.destroy(entity['deletedId']) if entity['deletedId'] #Check to see if we are deleting a record - if entity[:operation].eql? "Delete" + if entity['operation'].eql? "Delete" obj.destroy(id) #if not then update! else