class Quickbooks::Service::PaymentMethod

Public Instance Methods

delete(department) click to toggle source
# File lib/quickbooks/service/payment_method.rb, line 18
def delete(department)
  department.active = false
  update(department, :sparse => false)
end
fetch_by_name(name) click to toggle source
# File lib/quickbooks/service/payment_method.rb, line 5
def fetch_by_name(name)
  self.query(search_name_query(name)).entries.first
end
search_name_query(name) click to toggle source
# File lib/quickbooks/service/payment_method.rb, line 9
def search_name_query(name)
  "SELECT * FROM PaymentMethod WHERE Name = '#{name}'"
end
update(entity, options = {}) click to toggle source
Calls superclass method Quickbooks::Service::ServiceCrud#update
# File lib/quickbooks/service/payment_method.rb, line 13
def update(entity, options = {})
  raise Quickbooks::InvalidModelException.new('Payment Method sparse update is not supported by Intuit at this time') if options[:sparse] && options[:sparse] == true
  super(entity, options)
end

Private Instance Methods

model() click to toggle source
# File lib/quickbooks/service/payment_method.rb, line 25
def model
  Quickbooks::Model::PaymentMethod
end