19 Commits

Author SHA1 Message Date
c7a313e9ed Add customer name to details 2024-04-03 11:47:38 -04:00
c14b590083 2024 Copy Right Update 2024-03-29 08:10:05 -04:00
040c920481 2.0.5 2024-03-29 07:58:26 -04:00
8c63817950 Use free_form_number 2024-03-28 14:13:39 -04:00
e2f43d398f Nil Checks 2024-03-28 14:01:18 -04:00
7ba4829066 Update Customer Phone Numbers On Sync 2024-03-28 13:51:29 -04:00
938999db91 Added quickbooks to customer's name 2024-03-28 12:54:36 -04:00
0b60a8e41b 2.0.4 2024-01-07 20:53:07 -05:00
817a43e849 Fixed update 2024-01-07 20:47:26 -05:00
047296329e 2.0.32.0.3 2023-12-31 16:42:47 -05:00
c8cb74f3d4 Merge branch 'redmine-5' 2023-12-31 16:35:26 -05:00
aceb6cb6b5 fixed typo 2023-12-31 16:26:02 -05:00
9fd1bc9dff Merge branch 'redmine-5' 2023-12-30 23:35:25 -05:00
04391f1c6e 2.0.2 2023-12-30 23:07:17 -05:00
e2bf42e66b Fixed invoice pdf 2023-12-30 23:04:43 -05:00
0c72ca9294 missed this authenticated_request 2023-12-30 23:01:32 -05:00
2985fad77c Fixed typo 2023-12-30 23:01:01 -05:00
02b5fb4d0e Fixed returned variable handling 2023-12-30 22:53:08 -05:00
bf417c163c Rework performing authenticated requests 2023-12-30 22:33:28 -05:00
14 changed files with 180 additions and 138 deletions

View File

@@ -1,6 +1,6 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2016 - 2023 Rick Barrette Copyright (c) 2016 - 2024 Rick Barrette
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@@ -1,6 +1,6 @@
#The MIT License (MIT) #The MIT License (MIT)
# #
#Copyright (c) 2022 rick barrette #Copyright (c) 2023 rick barrette
# #
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# #
@@ -20,10 +20,13 @@ class InvoiceController < ApplicationController
# #
def show def show
begin begin
base = Invoice.get_base qbo = Qbo.first
invoice = base.fetch_by_id(params[:id]) qbo.perform_authenticated_request do |access_token|
@pdf = base.pdf(invoice) service = Quickbooks::Service::Invoice.new(:company_id => qbo.realm_id, :access_token => access_token)
invoice = service.fetch_by_id(params[:id])
@pdf = service.pdf(invoice)
send_data @pdf, filename: "invoice #{invoice.doc_number}.pdf", :disposition => 'inline', :type => "application/pdf" send_data @pdf, filename: "invoice #{invoice.doc_number}.pdf", :disposition => 'inline', :type => "application/pdf"
end
rescue rescue
redirect_to :back, :flash => { :error => "Invoice not found" } redirect_to :back, :flash => { :error => "Invoice not found" }
end end

View File

@@ -84,7 +84,7 @@ class VehiclesController < ApplicationController
@customer = params[:customer] @customer = params[:customer]
begin begin
@vehicle = Vehicle.find_by_id(params[:id]) @vehicle = Vehicle.find_by_id(params[:id])
if @vehicle.update_attributes(allowed_params) if @vehicle.update(allowed_params)
flash[:notice] = "Vehicle updated" flash[:notice] = "Vehicle updated"
redirect_to @vehicle redirect_to @vehicle
else else

View File

@@ -1,6 +1,6 @@
#The MIT License (MIT) #The MIT License (MIT)
# #
#Copyright (c) 2022 rick barrette #Copyright (c) 2023 rick barrette
# #
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# #
@@ -142,27 +142,26 @@ class Customer < ActiveRecord::Base
# proforms a bruteforce sync operation # proforms a bruteforce sync operation
# This needs to be simplified # This needs to be simplified
def self.sync def self.sync
service = Qbo.get_base(:customer)
# Sync ALL customers if the database is empty # Sync ALL customers if the database is empty
#if count == 0 qbo = Qbo.first
customers = service.all customers = qbo.perform_authenticated_request do |access_token|
#else service = Quickbooks::Service::Customer.new(:company_id => qbo.realm_id, :access_token => access_token)
# last = Qbo.first.last_sync service.all
# query = "Select Id, DisplayName From Customer" end
# query << " Where Metadata.LastUpdatedTime >= '#{last.iso8601}' " if last
# customers = service.query(query) return unless customers
#end
customers.each do |c| customers.each do |c|
logger.info "Processing customer #{c.id}" logger.info "Processing customer #{c.id}"
customer = Customer.find_or_create_by(id: c.id) customer = Customer.find_or_create_by(id: c.id)
if c.active? if c.active?
if not customer.name.eql? c.display_name #if not customer.name.eql? c.display_name
customer.name = c.display_name customer.name = c.display_name
customer.id = c.id customer.id = c.id
customer.phone_number = c.primary_phone.free_form_number.tr('^0-9', '') unless c.primary_phone.nil?
customer.mobile_phone_number = c.mobile_phone.free_form_number.tr('^0-9', '') unless c.mobile_phone.nil?
customer.save_without_push customer.save_without_push
end #end
else else
if not c.new_record? if not c.new_record?
customer.delete customer.delete
@@ -180,16 +179,23 @@ class Customer < ActiveRecord::Base
# proforms a bruteforce sync operation # proforms a bruteforce sync operation
# This needs to be simplified # This needs to be simplified
def self.sync_by_id(id) def self.sync_by_id(id)
service = Qbo.get_base(:customer) qbo = Qbo.first
c = qbo.perform_authenticated_request do |access_token|
customer = service.fetch_by_id(id) service = Quickbooks::Service::Customer.new(:company_id => qbo.realm_id, :access_token => access_token)
customer = Customer.find_or_create_by(id: customer.id) service.fetch_by_id(id)
if customer.active?
if not customer.name.eql? customer.display_name
customer.name = customer.display_name
customer.id = customer.id
customer.save_without_push
end end
return unless c
customer = Customer.find_or_create_by(id: c.id)
if c.active?
#if not customer.name.eql? c.display_name
customer.name = c.display_name
customer.id = c.id
customer.phone_number = c.primary_phone.free_form_number.tr('^0-9', '') unless c.primary_phone.nil?
customer.mobile_phone_number = c.mobile_phone.free_form_number.tr('^0-9', '') unless c.mobile_phone.nil?
customer.save_without_push
#end
else else
if not customer.new_record? if not customer.new_record?
customer.delete customer.delete
@@ -200,7 +206,11 @@ class Customer < ActiveRecord::Base
# Push the updates # Push the updates
def save_with_push def save_with_push
begin begin
@details = Qbo.get_base(:customer).update(@details) qbo = Qbo.first
@details = qbo.perform_authenticated_request do |access_token|
service = Quickbooks::Service::Customer.new(:company_id => qbo.realm_id, :access_token => access_token)
service.update(@details)
end
#raise "QBO Fault" if @details.fault? #raise "QBO Fault" if @details.fault?
self.id = @details.id self.id = @details.id
rescue Exception => e rescue Exception => e
@@ -218,7 +228,11 @@ class Customer < ActiveRecord::Base
def pull def pull
begin begin
raise Exception unless self.id raise Exception unless self.id
@details = Qbo.get_base(:customer).fetch_by_id(self.id) qbo = Qbo.first
@details = qbo.perform_authenticated_request do |access_token|
service = Quickbooks::Service::Customer.new(:company_id => qbo.realm_id, :access_token => access_token)
service.fetch_by_id(self.id)
end
rescue Exception => e rescue Exception => e
@details = Quickbooks::Model::Customer.new @details = Quickbooks::Model::Customer.new
end end

View File

@@ -13,12 +13,14 @@ class Employee < ActiveRecord::Base
has_many :users has_many :users
validates_presence_of :id, :name validates_presence_of :id, :name
def self.get_base def self.sync
Qbo.get_base(:employee) qbo = Qbo.first
employees = qbo.perform_authenticated_request do |access_token|
service = Quickbooks::Service::Employee.new(:company_id => qbo.realm_id, :access_token => access_token)
service.all
end end
def self.sync return unless employees
employees = get_base.all
transaction do transaction do
# Update the item table # Update the item table
@@ -33,7 +35,13 @@ class Employee < ActiveRecord::Base
end end
def self.sync_by_id(id) def self.sync_by_id(id)
employee = get_base.fetch_by_id(id) qbo = Qbo.first
employee = qbo.perform_authenticated_request do |access_token|
service = Quickbooks::Service::Employee.new(:company_id => qbo.realm_id, :access_token => access_token)
service.fetch_by_id(id)
end
return unless employee
employee = find_or_create_by(id: employee.id) employee = find_or_create_by(id: employee.id)
employee.name = employee.display_name employee.name = employee.display_name
employee.id = employee.id employee.id = employee.id

View File

@@ -1,6 +1,6 @@
#The MIT License (MIT) #The MIT License (MIT)
# #
#Copyright (c) 2022 rick barrette #Copyright (c) 2023 rick barrette
# #
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# #
@@ -16,15 +16,17 @@ class Estimate < ActiveRecord::Base
validates_presence_of :doc_number, :id validates_presence_of :doc_number, :id
self.primary_key = :id self.primary_key = :id
# return the QBO Estimate service
def self.get_base
Qbo.get_base(:estimate)
end
# sync all estimates # sync all estimates
def self.sync def self.sync
logger.debug "Syncing ALL estimates" logger.debug "Syncing ALL estimates"
estimates = get_base.all qbo = Qbo.first
estimates = qbo.perform_authenticated_request do |access_token|
service = Quickbooks::Service::Estimate.new(:company_id => qbo.realm_id, :access_token => access_token)
service.all
end
return unless estimates
estimates.each { |estimate| estimates.each { |estimate|
process_estimate(estimate) process_estimate(estimate)
} }
@@ -36,17 +38,28 @@ class Estimate < ActiveRecord::Base
# sync only one estimate # sync only one estimate
def self.sync_by_id(id) def self.sync_by_id(id)
logger.debug "Syncing estimate #{id}" logger.debug "Syncing estimate #{id}"
process_estimate(get_base.fetch_by_id(id)) qbo = Qbo.first
qbo.perform_authenticated_request do |access_token|
service = Quickbooks::Service::Estimate.new(:company_id => qbo.realm_id, :access_token => access_token)
process_estimate(service.fetch_by_id(id))
end
end end
# update an estimate # update an estimate
def self.update(id) def self.update(id)
# Update the item table # Update the item table
estimate = get_base.fetch_by_id(id) qbo = Qbo.first
estimate = find_or_create_by(id: id) estimate = qbo.perform_authenticated_request do |access_token|
estimate.doc_number = estimate.doc_number service = Quickbooks::Service::Estimate.new(:company_id => qbo.realm_id, :access_token => access_token)
estimate.txn_date = estimate.txn_date service.fetch_by_id(id)
estimate.save! end
return unless estimate
e = find_or_create_by(id: id)
e.doc_number = estimate.doc_number
e.txn_date = estimate.txn_date
e.save!
end end
# process an estimate into the database # process an estimate into the database
@@ -62,9 +75,12 @@ class Estimate < ActiveRecord::Base
# download the pdf from quickbooks # download the pdf from quickbooks
def pdf def pdf
base = Estimate.get_base qbo = Qbo.first
estimate = base.fetch_by_id(id) qbo.perform_authenticated_request do |access_token|
return base.pdf(estimate) service = Quickbooks::Service::Estimate.new(:company_id => qbo.realm_id, :access_token => access_token)
estimate = service.fetch_by_id(id)
service.pdf(estimate)
end
end end
# Magic Method # Magic Method
@@ -91,7 +107,11 @@ class Estimate < ActiveRecord::Base
def pull def pull
begin begin
raise Exception unless self.id raise Exception unless self.id
@details = Qbo.get_base(:estimate).fetch_by_id(self.id) qbo = Qbo.first
@details = qbo.perform_authenticated_request do |access_token|
service = Quickbooks::Service::Estimate.new(:company_id => qbo.realm_id, :access_token => access_token)
service(:estimate).fetch_by_id(self.id)
end
rescue Exception => e rescue Exception => e
@details = Quickbooks::Model::Estimate.new @details = Quickbooks::Model::Estimate.new
end end

View File

@@ -1,6 +1,6 @@
#The MIT License (MIT) #The MIT License (MIT)
# #
#Copyright (c) 2022 rick barrette #Copyright (c) 2023 rick barrette
# #
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# #
@@ -15,11 +15,6 @@ class Invoice < ActiveRecord::Base
validates_presence_of :doc_number, :id, :customer_id, :txn_date validates_presence_of :doc_number, :id, :customer_id, :txn_date
self.primary_key = :id self.primary_key = :id
# Get the quickbooks-ruby base for invoice
def self.get_base
Qbo.get_base(:invoice)
end
# sync ALL the invoices # sync ALL the invoices
def self.sync def self.sync
logger.debug "Syncing all invoices" logger.debug "Syncing all invoices"
@@ -30,12 +25,14 @@ class Invoice < ActiveRecord::Base
# TODO actually do something with the above query # TODO actually do something with the above query
# .all() is never called since count is never initialized # .all() is never called since count is never initialized
if count == 0 qbo = Qbo.first
invoices = get_base.all invoices = qbo.perform_authenticated_request do |access_token|
else service = Quickbooks::Service::Invoice.new(:company_id => qbo.realm_id, :access_token => access_token)
invoices = get_base.query() service.all
end end
return unless invoices
invoices.each { | invoice | invoices.each { | invoice |
process_invoice invoice process_invoice invoice
} }
@@ -44,9 +41,13 @@ class Invoice < ActiveRecord::Base
#sync by invoice ID #sync by invoice ID
def self.sync_by_id(id) def self.sync_by_id(id)
logger.debug "Syncing invoice #{id}" logger.debug "Syncing invoice #{id}"
invoice = get_base.fetch_by_id(id) qbo = Qbo.first
qbo.perform_authenticated_request do |access_token|
service = Quickbooks::Service::Invoice.new(:company_id => qbo.realm_id, :access_token => access_token)
invoice = service.fetch_by_id(id)
process_invoice invoice process_invoice invoice
end end
end
private private
@@ -155,7 +156,11 @@ class Invoice < ActiveRecord::Base
# Push updates # Push updates
begin begin
logger.debug "Trying to update invoice" logger.debug "Trying to update invoice"
get_base.update(invoice) if is_changed qbo = Qbo.first
qbo.perform_authenticated_request do |access_token|
service = Quickbooks::Service::Invoice.new(:company_id => qbo.realm_id, :access_token => access_token)
service.update(invoice) if is_changed
end
rescue rescue
# Do nothing, probaly custome field sync confict on the invoice. # Do nothing, probaly custome field sync confict on the invoice.
# This is a problem with how it's billed # This is a problem with how it's billed
@@ -187,7 +192,11 @@ class Invoice < ActiveRecord::Base
def pull def pull
begin begin
raise Exception unless self.id raise Exception unless self.id
@details = Qbo.get_base(:invoice).fetch_by_id(self.id) qbo = Qbo.first
@details = qbo.perform_authenticated_request do |access_token|
service = Quickbooks::Service::Invoice.new(:company_id => qbo.realm_id, :access_token => access_token)
service.fetch_by_id(self.id)
end
rescue Exception => e rescue Exception => e
@details = Quickbooks::Model::Invoice.new @details = Quickbooks::Model::Invoice.new
end end

View File

@@ -1,6 +1,6 @@
#The MIT License (MIT) #The MIT License (MIT)
# #
#Copyright (c) 2022 rick barrette #Copyright (c) 2023 rick barrette
# #
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# #
@@ -13,34 +13,6 @@ class Qbo < ActiveRecord::Base
include QuickbooksOauth include QuickbooksOauth
#
# Get a quickbooks base service object for type
# @params type of base
#
def self.get_base(type)
qbo = self.first
qbo.perform_authenticated_request do |access_token|
# build the reqiested service
case type
when :time_activity
return Quickbooks::Service::TimeActivity.new(:company_id => qbo.realm_id, :access_token => access_token)
when :customer
return Quickbooks::Service::Customer.new(:company_id => qbo.realm_id, :access_token => access_token)
when :invoice
return Quickbooks::Service::Invoice.new(:company_id => qbo.realm_id, :access_token => access_token)
when :estimate
return Quickbooks::Service::Estimate.new(:company_id => qbo.realm_id, :access_token => access_token)
when :employee
return Quickbooks::Service::Employee.new(:company_id => qbo.realm_id, :access_token => access_token)
when :item
return Quickbooks::Service::Item.new(:company_id => qbo.realm_id, :access_token => access_token)
else
return nil
end
end
end
# Updates last sync time stamp # Updates last sync time stamp
def self.update_time_stamp def self.update_time_stamp
date = DateTime.now date = DateTime.now

View File

@@ -1,5 +1,11 @@
<table> <table>
<tbody> <tbody>
<tr>
<th><%=t(:label_name)%></th>
<td><%= customer.name %></td>
</tr>
<tr> <tr>
<th><%=t(:label_email)%></th> <th><%=t(:label_email)%></th>
<td><%= customer.email %></td> <td><%= customer.email %></td>

View File

@@ -1,4 +1,4 @@
<h2><%=t(:field_customer)%> #<%= @customer.id %> - <%= @customer.name %> </h2> <h2><%=t(:field_customer)%> #<%= @customer.id %> - <%= link_to @customer.to_s, "https://app.qbo.intuit.com/app/customerdetail?nameId=#{@customer.id}", target: :_blank %> </h2>
<div class="issue"> <div class="issue">
<div class="splitcontent"> <div class="splitcontent">

View File

@@ -88,4 +88,5 @@ en:
label_qbo_sync_success: "Successfully synced to Quickbooks" label_qbo_sync_success: "Successfully synced to Quickbooks"
label_hours: "Hours" label_hours: "Hours"
label_oauth2_refresh_token_expires_at: "Refresh Token Expires At" label_oauth2_refresh_token_expires_at: "Refresh Token Expires At"
label_name: "Name"

View File

@@ -1,6 +1,6 @@
#The MIT License (MIT) #The MIT License (MIT)
# #
#Copyright (c) 2022 rick barrette #Copyright (c) 2023 rick barrette
# #
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# #
@@ -26,7 +26,13 @@ class AddTxnDates < ActiveRecord::Migration[5.1]
say "Sync Invoices" say "Sync Invoices"
invoices = QboInvoice.get_base.all qbo = Qbo.first
invoices = qbo.perform_authenticated_request do |access_token|
service = Quickbooks::Service::Invoice.new(:company_id => qbo.realm_id, :access_token => access_token)
service.all
end
return unless invoices
invoices.each { |invoice| invoices.each { |invoice|
# Load the invoice into the database # Load the invoice into the database

View File

@@ -22,7 +22,7 @@ Redmine::Plugin.register :redmine_qbo do
name 'Redmine Quickbooks Online plugin' name 'Redmine Quickbooks Online plugin'
author 'Rick Barrette' author 'Rick Barrette'
description 'This is a plugin for Redmine to intergrate with Quickbooks Online to allow for seamless intergration CRM and invoicing of completed issues' description 'This is a plugin for Redmine to intergrate with Quickbooks Online to allow for seamless intergration CRM and invoicing of completed issues'
version '2.0.1' version '2.0.5'
url 'https://github.com/rickbarrette/redmine_qbo' url 'https://github.com/rickbarrette/redmine_qbo'
author_url 'https://barrettefabrication.com' author_url 'https://barrettefabrication.com'
settings :default => {'empty' => true}, :partial => 'qbo/settings' settings :default => {'empty' => true}, :partial => 'qbo/settings'

View File

@@ -1,6 +1,6 @@
#The MIT License (MIT) #The MIT License (MIT)
# #
#Copyright (c) 2022 rick barrette #Copyright (c) 2023 rick barrette
# #
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# #
@@ -52,8 +52,10 @@ module IssuePatch
if spent_hours > 0 then if spent_hours > 0 then
# Prepare to create a new Time Activity # Prepare to create a new Time Activity
time_service = Qbo.get_base(:time_activity) qbo = Qbo.first
item_service = Qbo.get_base(:item) qbo.perform_authenticated_request do |access_token|
time_service = Quickbooks::Service::TimeActivity.new(:company_id => qbo.realm_id, :access_token => access_token)
item_service = Quickbooks::Service::Item.new(:company_id => qbo.realm_id, :access_token => access_token)
time_entry = Quickbooks::Model::TimeActivity.new time_entry = Quickbooks::Model::TimeActivity.new
# Lets total up each activity before billing. # Lets total up each activity before billing.
@@ -96,6 +98,7 @@ module IssuePatch
end end
end end
end end
end
# Create a shareable link for a customer # Create a shareable link for a customer
def share_token def share_token