Class: Quickeebooks::Windows::Service::Job

Inherits:
ServiceBase
  • Object
show all
Defined in:
lib/quickeebooks/windows/service/job.rb

Constant Summary collapse

FILTER_ORDER =
%w{OfferingId IteratorId StartPage ChunkSize IncludeTagElements CDCAsOf SynchronizedFilter
DraftFilter ObjectStateEnable CustomFieldEnable CustomFieldQueryParam CustomFieldFilter CustomFieldDefinitionSet
ListIdSet StartCreatedTMS EndCreatedTMS StartModifiedTMS EndModifiedTMS CustomerIdSet IncludeFinancialIndicator}

Constants inherited from ServiceBase

ServiceBase::XML_NS

Instance Attribute Summary

Attributes inherited from ServiceBase

#base_uri, #last_response_body, #last_response_xml, #oauth, #realm_id

Instance Method Summary collapse

Methods inherited from ServiceBase

#access_token=, #enforce_filter_order, #initialize, #url_for_base, #url_for_resource

Methods included from Logging

#log

Constructor Details

This class inherits a constructor from Quickeebooks::Windows::Service::ServiceBase

Instance Method Details

#fetch_by_id(id, idDomain = 'QB', options = {}) ⇒ Object



18
19
20
21
# File 'lib/quickeebooks/windows/service/job.rb', line 18

def fetch_by_id(id, idDomain = 'QB', options = {})
  url = "#{url_for_resource(Quickeebooks::Windows::Model::Job::REST_RESOURCE)}/#{id}"
  fetch_object(Quickeebooks::Windows::Model::Job, url, {:idDomain => idDomain})
end

#list(filters = [], page = 1, per_page = 20, sort = nil, options = {}) ⇒ Object



13
14
15
16
# File 'lib/quickeebooks/windows/service/job.rb', line 13

def list(filters = [], page = 1, per_page = 20, sort = nil, options = {})
  filters << Quickeebooks::Shared::Service::Filter.new(:boolean, :field => 'CustomFieldEnable', :value => true)
  fetch_collection(Quickeebooks::Windows::Model::Job, nil, filters, page, per_page, sort, options)
end