Class: Quickbooks::Service::Employee

Inherits:
BaseService show all
Includes:
ServiceCrud
Defined in:
lib/quickbooks/service/employee.rb

Constant Summary

Constants inherited from BaseService

BaseService::HTTP_ACCEPT, BaseService::HTTP_ACCEPT_ENCODING, BaseService::HTTP_CONTENT_TYPE, BaseService::XML_NS

Instance Attribute Summary

Attributes inherited from BaseService

#base_uri, #company_id, #last_response_body, #last_response_xml, #oauth

Instance Method Summary collapse

Methods included from ServiceCrud

#create, #delete_by_query_string, #fetch_by_id, #query

Methods inherited from BaseService

#access_token=, #initialize, #realm_id=, #url_for_base, #url_for_query, #url_for_resource

Methods included from Util::Logging

#log

Constructor Details

This class inherits a constructor from Quickbooks::Service::BaseService

Instance Method Details

#delete(employee) ⇒ Object



12
13
14
15
# File 'lib/quickbooks/service/employee.rb', line 12

def delete(employee)
  employee.active = false
  update(employee, :sparse => false)
end

#update(entity, options = {}) ⇒ Object

override update as sparse is not supported



7
8
9
10
# File 'lib/quickbooks/service/employee.rb', line 7

def update(entity, options = {})
  raise Quickbooks::InvalidModelException.new('Employee sparse update is not supported by Intuit at this time') if options[:sparse] && options[:sparse] == true
  super(entity, options)
end