Module: Quickbooks

Defined in:
lib/quickbooks/model/item.rb,
lib/quickbooks-ruby.rb,
lib/quickbooks/version.rb,
lib/quickbooks/model/bill.rb,
lib/quickbooks/model/line.rb,
lib/quickbooks/model/term.rb,
lib/quickbooks/model/class.rb,
lib/quickbooks/model/fault.rb,
lib/quickbooks/model/budget.rb,
lib/quickbooks/model/entity.rb,
lib/quickbooks/model/report.rb,
lib/quickbooks/model/upload.rb,
lib/quickbooks/model/vendor.rb,
lib/quickbooks/service/bill.rb,
lib/quickbooks/service/item.rb,
lib/quickbooks/service/term.rb,
lib/quickbooks/util/logging.rb,
lib/quickbooks/model/account.rb,
lib/quickbooks/model/deposit.rb,
lib/quickbooks/model/invoice.rb,
lib/quickbooks/model/line_ex.rb,
lib/quickbooks/model/payment.rb,
lib/quickbooks/service/batch.rb,
lib/quickbooks/service/class.rb,
lib/quickbooks/model/customer.rb,
lib/quickbooks/model/employee.rb,
lib/quickbooks/model/estimate.rb,
lib/quickbooks/model/purchase.rb,
lib/quickbooks/model/tax_code.rb,
lib/quickbooks/model/tax_line.rb,
lib/quickbooks/model/tax_rate.rb,
lib/quickbooks/model/transfer.rb,
lib/quickbooks/service/budget.rb,
lib/quickbooks/service/upload.rb,
lib/quickbooks/service/vendor.rb,
lib/quickbooks/model/meta_data.rb,
lib/quickbooks/model/validator.rb,
lib/quickbooks/service/account.rb,
lib/quickbooks/service/deposit.rb,
lib/quickbooks/service/invoice.rb,
lib/quickbooks/service/payment.rb,
lib/quickbooks/service/reports.rb,
lib/quickbooks/util/collection.rb,
lib/quickbooks/model/attachable.rb,
lib/quickbooks/model/base_model.rb,
lib/quickbooks/model/definition.rb,
lib/quickbooks/model/department.rb,
lib/quickbooks/model/entity_ref.rb,
lib/quickbooks/model/name_value.rb,
lib/quickbooks/model/tax_agency.rb,
lib/quickbooks/service/customer.rb,
lib/quickbooks/service/employee.rb,
lib/quickbooks/service/estimate.rb,
lib/quickbooks/service/purchase.rb,
lib/quickbooks/service/tax_code.rb,
lib/quickbooks/service/tax_rate.rb,
lib/quickbooks/service/transfer.rb,
lib/quickbooks/model/credit_memo.rb,
lib/quickbooks/model/item_change.rb,
lib/quickbooks/model/markup_info.rb,
lib/quickbooks/model/preferences.rb,
lib/quickbooks/model/tax_service.rb,
lib/quickbooks/model/bill_payment.rb,
lib/quickbooks/model/change_model.rb,
lib/quickbooks/model/company_info.rb,
lib/quickbooks/model/custom_field.rb,
lib/quickbooks/service/attachable.rb,
lib/quickbooks/service/department.rb,
lib/quickbooks/service/tax_agency.rb,
lib/quickbooks/util/query_builder.rb,
lib/quickbooks/model/check_payment.rb,
lib/quickbooks/model/delivery_info.rb,
lib/quickbooks/model/email_address.rb,
lib/quickbooks/model/exchange_rate.rb,
lib/quickbooks/model/journal_entry.rb,
lib/quickbooks/model/sales_receipt.rb,
lib/quickbooks/model/time_activity.rb,
lib/quickbooks/model/vendor_change.rb,
lib/quickbooks/model/vendor_credit.rb,
lib/quickbooks/service/credit_memo.rb,
lib/quickbooks/service/item_change.rb,
lib/quickbooks/service/preferences.rb,
lib/quickbooks/service/tax_service.rb,
lib/quickbooks/model/attachable_ref.rb,
lib/quickbooks/model/base_reference.rb,
lib/quickbooks/model/bill_line_item.rb,
lib/quickbooks/model/has_line_items.rb,
lib/quickbooks/model/invoice_change.rb,
lib/quickbooks/model/payment_change.rb,
lib/quickbooks/model/payment_method.rb,
lib/quickbooks/model/purchase_order.rb,
lib/quickbooks/model/refund_receipt.rb,
lib/quickbooks/service/access_token.rb,
lib/quickbooks/service/base_service.rb,
lib/quickbooks/service/bill_payment.rb,
lib/quickbooks/service/company_info.rb,
lib/quickbooks/service/service_crud.rb,
lib/quickbooks/model/base_model_json.rb,
lib/quickbooks/model/customer_change.rb,
lib/quickbooks/model/item_group_line.rb,
lib/quickbooks/model/tax_line_detail.rb,
lib/quickbooks/model/tax_rate_detail.rb,
lib/quickbooks/service/exchange_rate.rb,
lib/quickbooks/service/journal_entry.rb,
lib/quickbooks/service/sales_receipt.rb,
lib/quickbooks/service/time_activity.rb,
lib/quickbooks/service/vendor_change.rb,
lib/quickbooks/service/vendor_credit.rb,
lib/quickbooks/model/budget_line_item.rb,
lib/quickbooks/model/company_currency.rb,
lib/quickbooks/model/physical_address.rb,
lib/quickbooks/model/telephone_number.rb,
lib/quickbooks/model/web_site_address.rb,
lib/quickbooks/service/change_service.rb,
lib/quickbooks/service/invoice_change.rb,
lib/quickbooks/service/payment_change.rb,
lib/quickbooks/service/payment_method.rb,
lib/quickbooks/service/purchase_order.rb,
lib/quickbooks/service/refund_receipt.rb,
lib/quickbooks/model/deposit_line_item.rb,
lib/quickbooks/model/discount_override.rb,
lib/quickbooks/model/group_line_detail.rb,
lib/quickbooks/model/invoice_line_item.rb,
lib/quickbooks/model/item_group_detail.rb,
lib/quickbooks/service/customer_change.rb,
lib/quickbooks/model/bill_payment_check.rb,
lib/quickbooks/model/credit_memo_change.rb,
lib/quickbooks/model/effective_tax_rate.rb,
lib/quickbooks/model/linked_transaction.rb,
lib/quickbooks/model/other_contact_info.rb,
lib/quickbooks/model/purchase_line_item.rb,
lib/quickbooks/service/company_currency.rb,
lib/quickbooks/model/change_data_capture.rb,
lib/quickbooks/model/credit_card_payment.rb,
lib/quickbooks/model/deposit_line_detail.rb,
lib/quickbooks/model/payment_line_detail.rb,
lib/quickbooks/model/sales_tax_rate_list.rb,
lib/quickbooks/service/base_service_json.rb,
lib/quickbooks/service/service_crud_json.rb,
lib/quickbooks/model/discount_line_detail.rb,
lib/quickbooks/model/tax_rate_detail_line.rb,
lib/quickbooks/service/credit_memo_change.rb,
lib/quickbooks/model/access_token_response.rb,
lib/quickbooks/model/refund_receipt_change.rb,
lib/quickbooks/model/sub_total_line_detail.rb,
lib/quickbooks/service/change_data_capture.rb,
lib/quickbooks/model/bill_payment_line_item.rb,
lib/quickbooks/model/purchase_tax_rate_list.rb,
lib/quickbooks/model/sales_item_line_detail.rb,
lib/quickbooks/model/transaction_tax_detail.rb,
lib/quickbooks/model/description_line_detail.rb,
lib/quickbooks/service/refund_receipt_change.rb,
lib/quickbooks/model/bill_payment_credit_card.rb,
lib/quickbooks/model/invoice_group_line_detail.rb,
lib/quickbooks/model/journal_entry_line_detail.rb,
lib/quickbooks/model/item_based_expense_line_detail.rb,
lib/quickbooks/model/account_based_expense_line_detail.rb

Overview

Defined Under Namespace

Modules: Model, Service, Util Classes: AuthorizationFailure, Collection, Error, Forbidden, IntuitRequestException, InvalidModelException, MissingRealmError, NotFound, RequestTooLarge, ServiceUnavailable, ThrottleExceeded, TooManyRequests

Constant Summary collapse

VERSION =
"0.6.7"
@@sandbox_mode =
false
@@logger =
nil

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.log(msg) ⇒ Object



214
215
216
217
218
219
# File 'lib/quickbooks-ruby.rb', line 214

def log(msg)
  if log?
    logger.info(msg)
    logger.flush if logger.respond_to?(:flush)
  end
end

.log_xml_pretty_print=(value) ⇒ Object (writeonly)

set logging on or off



202
203
204
# File 'lib/quickbooks-ruby.rb', line 202

def log_xml_pretty_print=(value)
  @log_xml_pretty_print = value
end

Class Method Details

.log?Boolean

Returns whether to log. Defaults to ‘false’.

Returns:

  • (Boolean)


205
206
207
# File 'lib/quickbooks-ruby.rb', line 205

def log?
  @log ||= false
end

.log_xml_pretty_print?Boolean

pretty printing the xml in the logs is “on” by default

Returns:

  • (Boolean)


210
211
212
# File 'lib/quickbooks-ruby.rb', line 210

def log_xml_pretty_print?
  defined?(@log_xml_pretty_print) ? @log_xml_pretty_print : true
end

.loggerObject



193
194
195
# File 'lib/quickbooks-ruby.rb', line 193

def logger
  @@logger ||= ::Logger.new($stdout) # TODO: replace with a real log file
end

.logger=(logger) ⇒ Object



197
198
199
# File 'lib/quickbooks-ruby.rb', line 197

def logger=(logger)
  @@logger = logger
end

.sandbox_modeObject



185
186
187
# File 'lib/quickbooks-ruby.rb', line 185

def sandbox_mode
  @@sandbox_mode
end

.sandbox_mode=(sandbox_mode) ⇒ Object



189
190
191
# File 'lib/quickbooks-ruby.rb', line 189

def sandbox_mode=(sandbox_mode)
  @@sandbox_mode = sandbox_mode
end