class Quickbooks::Model::TimeActivity

Constants

NAMEOF_OPTIONS
REST_RESOURCE
XML_COLLECTION_NODE
XML_NODE

Public Instance Methods

existence_of_employee_ref() click to toggle source
# File lib/quickbooks/model/time_activity.rb, line 48
def existence_of_employee_ref
  if employee_ref.nil? || (employee_ref && employee_ref.value == 0)
    errors.add(:employee_ref, "EmployeeRef is required and must be a non-zero value.")
  end
end
existence_of_vendor_ref() click to toggle source
# File lib/quickbooks/model/time_activity.rb, line 54
def existence_of_vendor_ref
  if vendor_ref.nil? || (vendor_ref && vendor_ref.value == 0)
    errors.add(:vendor_ref, "VendorRef is required and must be a non-zero value.")
  end
end
valid_for_create?() click to toggle source
# File lib/quickbooks/model/time_activity.rb, line 67
def valid_for_create?
  valid?
  errors.empty?
end
valid_for_deletion?() click to toggle source
# File lib/quickbooks/model/time_activity.rb, line 72
def valid_for_deletion?
  return false if(id.nil? || sync_token.nil?)
  id.to_i > 0 && !sync_token.to_s.empty? && sync_token.to_i >= 0
end
valid_for_update?() click to toggle source
# File lib/quickbooks/model/time_activity.rb, line 60
def valid_for_update?
  if sync_token.nil?
    errors.add(:sync_token, "Missing required attribute SyncToken for update")
  end
  errors.empty?
end