Module: QBWC

Included in:
DefaultMappingRegistry, SoapWrapper
Defined in:
lib/qbwc.rb,
lib/qbwc/version.rb,
lib/generators/qbwc/install/install_generator.rb

Defined Under Namespace

Modules: DefaultMappingRegistry, Generators Classes: Authenticate, AuthenticateResponse, ClientVersion, ClientVersionResponse, CloseConnection, CloseConnectionResponse, ConnectionError, ConnectionErrorResponse, GetLastError, GetLastErrorResponse, Job, QBWebConnectorSvcSoap, ReceiveResponseXML, ReceiveResponseXMLResponse, Request, SendRequestXML, SendRequestXMLResponse, ServerVersion, ServerVersionResponse, Session, SoapWrapper

Constant Summary collapse

VERSION =
"0.0.3"
@@username =
'foo'
@@password =
'bar'
@@company_file_path =
""
@@min_version =
3.0
@@support_site_url =
'http://google.com'
@@owner_id =
'{57F3B9B1-86F1-4fcc-B1EE-566DE1813D20}'
@@jobs =
{}
@@on_error =
'stopOnError'
@@delayed_processing =
false
@@api =
::Quickbooks::API[:qb]

Class Method Summary collapse

Class Method Details

.add_job(name, &block) ⇒ Object



47
48
49
# File 'lib/qbwc.rb', line 47

def add_job(name, &block)
  @@jobs[name] = Job.new(name, &block)
end

.api=(api) ⇒ Object



57
58
59
60
61
# File 'lib/qbwc.rb', line 57

def api=(api)
  raise 'Quickbooks type must be :qb or :qbpos' unless [:qb, :qbpos].include?(api)
  @@api = api
  @@parser = ::Quickbooks::API[api]
end

.configure {|_self| ... } ⇒ Object

Allow configuration overrides

Yields:

  • (_self)

Yield Parameters:

  • _self (QBWC)

    the object that the method was called on



64
65
66
# File 'lib/qbwc.rb', line 64

def configure
  yield self
end

.on_error=(reaction) ⇒ Object



51
52
53
54
55
# File 'lib/qbwc.rb', line 51

def on_error=(reaction)
  raise 'Quickbooks type must be :qb or :qbpos' unless [:stop, :continue].include?(reaction)
  @@on_error = "stopOnError" if reaction == :stop
  @@on_error = "continueOnError" if reaction == :continue
end