Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jan 31 2019 04:11

    ruckus on v0.6.6

    * Implemented minorversion supp… (compare)

  • Jan 29 2019 23:12
    SpiffyStores commented #440
  • Jan 29 2019 22:38
    SpiffyStores commented #440
  • Jan 29 2019 20:44
    mnaser commented #440
  • Jan 26 2019 12:26
    wayne5540 opened #460
  • Jan 24 2019 17:17
    ruckus commented #459
  • Jan 24 2019 17:16

    ruckus on 389-oauth2

    Allow to use any patch version … (compare)

  • Jan 24 2019 17:16
    ruckus closed #459
  • Jan 24 2019 15:09
    senzpo synchronize #459
  • Jan 24 2019 14:29
    senzpo opened #459
  • Jan 24 2019 12:30
  • Jan 24 2019 12:17
    senzpo commented #389
  • Jan 16 2019 01:01
    bretweinraub commented #456
  • Jan 15 2019 16:40
    ruckus commented #456
  • Jan 15 2019 16:40

    ruckus on master

    log response headers. Most in… (compare)

  • Jan 15 2019 16:40
    ruckus closed #456
  • Jan 15 2019 16:40
    ruckus commented #456
  • Jan 15 2019 16:13
    ruckus commented #457
  • Jan 15 2019 16:13

    ruckus on master

    Update HISTORY.md (#457) updat… (compare)

Austin Klenk
@ruckus im having some issues connecting to qbo
Rudresh Amin
Has anyone tried uploading files to QB? I can upload files locally, but when I deploy to production I get error: rudresh4/patchwork#141
Steven Chau
. @jleecbd I initiate Quickbooks.sandbox_mode in an init file at config/initiatlizers/quickbooks.rb.
Jeffrey Lee
Here is the contents of my quickbooks.rb initializer:

Quickbooks.sandbox_mode = true

client_id = "xxxxx"
client_secret = "xxxx"

oauth_params = {
:site => "https://sandbox-quickbooks.api.intuit.com/connect/oauth2",
:authorize_url => "https://sandbox-quickbooks.api.intuit.com/connect/oauth2",
:token_url => "https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer",
:connection_opts => {
:proxy => ""

::QB_OAUTH2_CONSUMER = OAuth2::Client.new(client_id, client_secret, oauth_params)

However, when I authenticate it is clearly going to appcenter.intuit.com, yet every reference I can find I point so sandbox-quickbooks. Suggestions?
Oscar Luza
Hello, someone is experimenting authentication problems since today? I'm getting "General Authentication Error" from quickbooks
Nícolas Michels
@ruckus Are there any chances of having Oauth 2.0 support released soon? If so, do you have any prevision when is this going to be merged? Can I help in any way to achieve this goal? I know that there is an ongoing effort to release this feature, thanks alot.
@ruckus how would i implement supporting multiple quickbooks accounts? the initializer requires a specific key and secret so i don't see any clear way.
if you prefer i can open an issue in the repo
Steven Chau
@jordan-realfoto I've been running a multi-quickbooks rails instance for a few years now. The approach I took was initializing the connection in a model or a plain ruby object. Here is an example pseudo-code for a multi-quickbooks.
# Single Company initializes Quickbooks connection upon Rails initialization
# This file is not needed for a multi-instance
# Create config/initializers/quickeebooks.rb
QB_KEY = "<copy from developer.intuit.com>"
QB_SECRET = "<copy from developer.intuit.com>"

$qb_oauth_consumer = OAuth::Consumer.new(QB_KEY, QB_SECRET, {
    :site                 => "https://oauth.intuit.com",
    :request_token_path   => "/oauth/v1/get_request_token",
    :authorize_url        => "https://appcenter.intuit.com/Connect/Begin",
    :access_token_path    => "/oauth/v1/get_access_token"

# Multi-Company initialize the Quickbooks connection when the model is needed
# Best to wrap the QBO related functions in a module
# Example Rails Model

class Company < ActiveRecord::Base
  # Fields
  # qbo_id
  # token_key
  # token_secret

  def qbo_consumer
        :site                 => "https://oauth.intuit.com",
        :request_token_path   => "/oauth/v1/get_request_token",
        :authorize_url        => "https://appcenter.intuit.com/Connect/Begin",
        :access_token_path    => "/oauth/v1/get_access_token"

  def qbo_access_token
    access_token = OAuth::AccessToken.new(qbo_consumer, token_key, token_secret)
@whereisciao thank you!
Flash Returns LLC
Anyone available to help me setup the initial connection from my rails app to QBO? I am following https://github.com/ruckus/quickbooks-ruby to the best of my abilitites, and some of the screenshots do not look like my quickbooks development webpage
The screenshot I am referring to is on https://minimul.com/integrating-rails-and-quickbooks-online-via-the-version-3-api-part-1.html , the screenshot of the App tokens and keys, I can't find that page on my development page, all I see is Development Keys with Client ID and Client Secret
Alexander Poznyak
Hello guys and girls :) I am newbie in integrations. Any can help me? First of all i has been use a https://github.com/ruckus/quickbooks-ruby/tree/389-oauth2#authorization-through-oauth-20 guide.
And i stoped on
 def oauth_callback
    if params[:state]
      redirect_uri = quickbooks_oauth_callback_url
      if resp = ::QB_OAUTH2_CONSUMER.auth_code.get_token(params[:code], :redirect_uri => redirect_uri)

      # save your tokens here. For example:
      quickbooks_credentials.update_attributes(access_token: resp.token, refresh_token: resp.refresh_token, realm_id: params[:realmId])

And i received a error:
Completed 500 Internal Server Error in 9665ms (ActiveRecord: 0.0ms)

NameError (undefined local variable or method `quickbooks_credentials' for #<QuickbooksController:0x0000563b50d69390>
Did you mean? quickbooks_authenticate_url):

How i can repair that? I should create a new table in my database or how to fix that? P.S I want to export clients from my Rails App to Quickbooks :)

Sorry for your time, my English and such silly questions. Thanks for the help in advance :)

Cody Caughlan
Hi @iLucker93 - your error message references quickbooks_credentials which is in the example and is probably not in your code. So Im guessing copied&pasted that code? which of course would fail since those references dont exist
Andrew Lee
Hello :) I'm looking at this gem and I have a few questions for my use case!
I'm trying to use the gem to generate timer activity files
I was using a different gem riif
But I didn't know how to generate the HDR row that's required for the quickbooks import I blieve (?) which is different from timerhdr
Is there a way to do that via quickbooks-ruby?
I'm also al ittle new to quickbooks import overall, not sure if I'm being coherent about my question
Alexander Poznyak
Anyone can help me with Sales Receipt ?
        salesreceipt = ::Quickbooks::Model::SalesReceipt.new({
                                                         id: 1, #RefNumber
                                                         customer_id: 62, #Customer need define ID in customer_create
                                                         txn_date: "2014-09-14", #TxnDate Дата транзакции
                                                         deposit_to_account_ref: "Undeposited Funds", #BankAccount
                                                         payment_method_ref: "Credit Card",  #PaymentMethod
                                                         payment_ref_number: "2014-09-14", #PaymentRefNumber дата самого пеймента, который обычно совпадает с днем транзакции
                                                         bill_email: "NeedToSend" #ToBeEmailed
        salesreceipt.auto_doc_number! #allows Intuit to auto-generate the transaction number

        line_item = ::Quickbooks::Model::Line.new
        line_item.description = "PLC DESC STUFF" #LineDesc
        line_item.sales_item! do |detail|
          detail.unit_price = 50 #LineUnitPrice
          detail.quantity = 1 # LineQty
          detail.item_id = 500 # Item (Product/Service) ID here

And i received errors in few rows:
bill_email: "NeedToSend"
deposit_to_account_ref: "Undeposited Funds"

And another. I add if i'll find

Alexander Poznyak
NoMethodError (undefined method `to_xml' for "NeedToSend":String
Did you mean? to_yaml):
and same in deposit_to_account_ref
Hi, has anyone migrated their existing ruby app to OAuth2 ? I am looking to hire someone for 2 hours for some consulting/guidance on migrating our existing app to use OAuth2
Alexander Poznyak
@mentalic Yea. I am working with integration now. YOu can write me in Skype, or email
skype: poznyakalex93
email: poznyakalex93@gmail.com
What have been maked it's a authenticate, authorize, create customer on my localhost projhect and after create send this customer to Quickbooks. And now i am working on Import Sales Receipt.
Alexander Poznyak
Where are i can find Due Date in current GEM ? How to define that date?
Henry Tseng
anyone know where to find the oauth “site” value for sandbox instances?
there’s a site and a authorize_url
Henry Tseng
is this gem still using the OAuth 1? or is the documentation just out of date?
Henry Tseng
nvm just read the convo from may
Henry Tseng
Cool! just to make sure other people find this. tag: 389-oauth2 seems to have some working oauth2 code
@iLucker93 Is this with OAuth2?
Henry Tseng
@mentalic yes it is with Oauth2
Henry Tseng
anyone run into this issue yet? A business validation error has occurred while processing your request: Business Validation Error: You can only add or edit one product or service at a time. Please try again. (Quickbooks::IntuitRequestException)
are we not allowed to open up multiple connections?
William de la Espriella

hello, good day guys.
am try implementation quickbook with oauth2, but when i send auth_code.get_token returned the next error Faraday::ConnectionFailed (Failed to open TCP connection to oauth.splatform.intuit.com:443 (getaddrinfo: Name or service not known)):

my code:

 def authenticate
    redirect_uri = quick_books_oauth_callback_url
    grant_url = ::QB_OAUTH2_CONSUMER.auth_code.authorize_url(redirect_uri: redirect_uri, response_type: 'code', state: SecureRandom.hex(12), scope: 'com.intuit.quickbooks.accounting')
    redirect_to grant_url

  def oauth_callback
    return unless params[:state]

    redirect_uri = quick_books_oauth_callback_url
    resp = ::QB_OAUTH2_CONSUMER.auth_code.get_token(params[:code],
                                                    redirect_uri: redirect_uri)
    return unless resp

      access_token: resp.token,
      refresh_token: resp.refresh_token,
      realm_id: params[:realmId]
Hey, I'm trying to get the company preferences after having migrated the tokens from oAuth 1.0 to oAuth 2.0, but I'm getting a undefined method request' for #<IntuitOAuth::Client error, here's my codeaccess_token = OAuth2::AccessToken.new($oauth2_client, access_token, :refresh_token => refresh_token)
service = Quickbooks::Service::Preferences.new
service.company_id = realm_id
service.access_token = access_token
preferences = service.query("Select * from Preferences")`
any idea what I'm doing wrong? Can we not use service.query() for oAuth 2.0?
access_token = OAuth2::AccessToken.new($oauth2_client, access_token, :refresh_token => refresh_token) service = Quickbooks::Service::Preferences.new service.company_id = realm_id service.access_token = access_token preferences = service.query("Select * from Preferences")
Solved. Thanks a bunch Cody!
Trying to port my App to oauth2. In the documentation it says set up your OAUTH_CONSUMER_KEY and OAUTH_CONSUMER_SECRET. What are those? In QBO developer they have "client ID" and "client secret". Can't really find anything on the interwebs that uses this nomenclature.....
Amar DK
hi guyz i want to create invoice (pdf) with cumulative orders is that possible in quick books?
Please any reply to my question.
sanjay vinzuda
Hello Guys, Is it an outdated gem?
Qumber Ali
I want to know that quickbooks-ruby provide the facility to add card or create charge ?