module Quickbooks
Business Rules¶ ↑
-
The DisplayName, GivenName, MiddleName, FamilyName, and PrintOnCheckName attributes must not contain a colon,“:”.
-
The DisplayName attribute must be unique across all other customers, employees, vendors, and other names.
-
The PrimaryEmailAddress attribute must contain an at sign, “@,” and dot, “.”.
-
Nested customer objects can be used to define sub-customers, jobs, or a combination of both, under a parent.
-
Up to four levels of nesting can be defined under a top-level customer object.
-
The Job attribute defines whether the object is a top-level customer or nested sub-customer/job.
-
Either the DisplayName attribute or at least one of Title, GivenName, MiddleName, FamilyName, Suffix, or FullyQualifiedName attributes are required during create.
Business Rules¶ ↑
-
There must be at least one line item included in a create request
-
Any transaction that funds the Undeposited Funds account can be linked to a Deposit object with Deposit.Line.LinkedTxn
Business Rules¶ ↑
-
DisplayName, GivenName, MiddleName, FamilyName, and PrintOnCheckName must not contain a colon (“:”)
-
DisplayName must be unique across all other customers, employees, vendors, and other names.
Business Rules¶ ↑
The Estimate object has the following business rules and validations:
-
An Estimate must have at least one line that describes an item.
-
An Estimate must have a reference to a customer.
-
If shipping address and billing address are not provided, the customer address is used to fill those values.
-
For US country, CustomSalesTax cannot be used as TaxCodeRef.
Business Rules¶ ↑
-
An invoice must have at least one Line that describes an item.
-
An invoice must have CustomerRef populated.
-
The DocNumber attribute is populated automatically by the data service if not supplied.
-
If ShipAddr, BillAddr, or both are not provided, the appropriate customer address from Customer is used to fill those values.
-
DocNumber, if supplied, must be unique.
Business Rules
-
The item name must be unique.
-
Service
item types must have IncomeAccountRef. -
Service
item types must have ExpenseAccountRef.
General¶ ↑
This entity represents expenses, such as a purchase made from a vendor. There are three types of Purchases: Cash, Check, and Credit Card.
-
Cash Purchase contains information regarding a payment made in cash.
-
Check Purchase contains information regarding a payment made by check.
-
Credit Card Purchase contains information regarding a payment made by credit card.
Business Rules¶ ↑
-
You must specify an AccountRef for all puchases.
-
TotalAmt attribute must add up to sum of Line.Amount attributes
Business Rules¶ ↑
-
The DisplayName, GivenName, MiddleName, FamilyName, and PrintOnCheckName attributes must not contain a colon,“:”.
-
The DisplayName attribute must be unique across all other customers, employees, vendors, and other names.
-
The PrimaryEmailAddress attribute must contain an at sign, “@,” and dot, “.”.
-
Either the DisplayName attribute or at least one of Title, GivenName, MiddleName, FamilyName, Suffix, or FullyQualifiedName attributes are required during create.
Business Rules¶ ↑
-
The VendorRef attribute must be specified.
-
At lease one Line with Line.Amount must be specified.
Docs: developer.intuit.com/docs/0100_accounting/0400_references/reports
Constants
- VERSION
Attributes
set logging on or off
set logging on or off
set logging on or off
Public Class Methods
Returns whether to limit log lines
# File lib/quickbooks-ruby.rb, line 239 def condense_logs? @condense_logs ||= false end
# File lib/quickbooks-ruby.rb, line 222 def http_adapter @@http_adapter end
# File lib/quickbooks-ruby.rb, line 226 def http_adapter=(adapter) @@http_adapter = adapter end
# File lib/quickbooks-ruby.rb, line 248 def log(msg) logger.info(msg) logger.flush if logger.respond_to?(:flush) end
Returns whether to log. Defaults to ‘false’.
# File lib/quickbooks-ruby.rb, line 234 def log? @log ||= false end
pretty printing the xml in the logs is “on” by default
# File lib/quickbooks-ruby.rb, line 244 def log_xml_pretty_print? defined?(@log_xml_pretty_print) ? @log_xml_pretty_print : true end
# File lib/quickbooks-ruby.rb, line 214 def logger @@logger ||= ::Logger.new($stdout) # TODO: replace with a real log file end
# File lib/quickbooks-ruby.rb, line 218 def logger=(logger) @@logger = logger end
# File lib/quickbooks-ruby.rb, line 210 def minorversion @@minorversion end
# File lib/quickbooks-ruby.rb, line 206 def minorversion=(v) @@minorversion = v end
# File lib/quickbooks-ruby.rb, line 198 def sandbox_mode @@sandbox_mode end
# File lib/quickbooks-ruby.rb, line 202 def sandbox_mode=(sandbox_mode) @@sandbox_mode = sandbox_mode end