Class: QBFC::Info
Overview
Info objects are those which have only one instance within Quickbooks, which are: Company, CompanyActivity, Host and Preferences.
Access through QBFC for these objects is read-only.
QBFC::Info can be accessed via session::company, for example, or through QBFC::Company::get(session).
Class Method Summary collapse
-
.find(sess, what, *args) ⇒ Object
This is a convenience alias for
get
. -
.get(sess, *args) ⇒ Object
Get the Info object for the given session.
Methods inherited from Base
create_query, #initialize, is_base_class?, #method_missing, #ole_methods, parse_find_args, qb_name, #qb_name, #respond_to_ole?
Constructor Details
This class inherits a constructor from QBFC::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class QBFC::Base
Class Method Details
.find(sess, what, *args) ⇒ Object
This is a convenience alias for get
. It exists solely so that I don’t have to modify Session#method_missing.
32 33 34 |
# File 'lib/qbfc/info.rb', line 32 def find(sess, what, *args) #:nodoc: get(sess, *args) end |
.get(sess, *args) ⇒ Object
Get the Info object for the given session. session. aliases this functionality. For example QBFC::Company.get(session) and session.company are equivalent.
It accepts the follow options as a hash:
-
:owner_id
: One or more OwnerIDs, used in accessing custom fields (aka private data extensions).
20 21 22 23 24 25 26 27 |
# File 'lib/qbfc/info.rb', line 20 def get(sess, *args) # Setup q, options and base_options arguments q, , = parse_find_args(*args) q ||= create_query(sess) q.() new(sess, q.response) end |