From bfa37ee63474cededa7b7c6e7868adea58027d24 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Sat, 4 Jan 2020 13:51:31 -0500 Subject: [PATCH] Update issue_patch.rb --- lib/issue_patch.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/issue_patch.rb b/lib/issue_patch.rb index 7e2560b..f6ca517 100644 --- a/lib/issue_patch.rb +++ b/lib/issue_patch.rb @@ -53,10 +53,15 @@ module IssuePatch spent_hours ||= spent_time.sum(:hours) || 0 if spent_hours > 0 then - + qbo = Qbo.first + company_id = qbo.company_id + access_token = qbo.token + # Prepare to create a new Time Activity - time_service = Qbo.get_base(:time_activity).service - item_service = Qbo.get_base(:item).service + time_service = Quickbooks::Service::TimeActivity.new(:company_id => company_id, :access_token => access_token) + #Qbo.get_base(:time_activity).service + item_service = Quickbooks::Service::Item.new(:company_id => company_id, :access_token => access_token) + #Qbo.get_base(:item).service time_entry = Quickbooks::Model::TimeActivity.new # Lets total up each activity before billing.