{"action":"opened","issue":{"url":"https://api.github.com/repos/ruckus/quickbooks-ruby/issues/427","repository_url":"https://api.github.com/repos/ruckus/quickbooks-ruby","labels_url":"https://api.github.com/repos/ruckus/quickbooks-ruby/issues/427/labels{/name}","comments_url":"https://api.github.com/repos/ruckus/quickbooks-ruby/issues/427/comments","events_url":"https://api.github.com/repos/ruckus/quickbooks-ruby/issues/427/events","html_url":"https://github.com/ruckus/quickbooks-ruby/issues/427","id":315854545,"number":427,"title":"TaxCodeRef rendering within SalesItemLineDetail","user":{"login":"srushe","id":36988,"avatar_url":"https://avatars3.githubusercontent.com/u/36988?v=4","gravatar_id":"","url":"https://api.github.com/users/srushe","html_url":"https://github.com/srushe","followers_url":"https://api.github.com/users/srushe/followers","following_url":"https://api.github.com/users/srushe/following{/other_user}","gists_url":"https://api.github.com/users/srushe/gists{/gist_id}","starred_url":"https://api.github.com/users/srushe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srushe/subscriptions","organizations_url":"https://api.github.com/users/srushe/orgs","repos_url":"https://api.github.com/users/srushe/repos","events_url":"https://api.github.com/users/srushe/events{/privacy}","received_events_url":"https://api.github.com/users/srushe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-19T12:26:26Z","updated_at":"2018-04-19T12:26:26Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I'm seeing an issue when trying to add use `tax_code_ref` on an instance of `SalesItemLineDetail` and I'm not sure whether this is a big or a misunderstanding on my part. I'm attempting to see `TaxCodeRef` to `NON` (as specified in a [recent Intuit blog post](https://developer.intuit.com/hub/blog/2018/03/28/automated-sales-tax-quickbooks-online-api-update)), however I'm receiving an error. I've boiled the issue down to a small script that exhibits the behaviour.\r\n\r\n```ruby\r\nrequire 'quickbooks-ruby'\r\n\r\nsales_receipt = Quickbooks::Model::SalesReceipt.new()\r\nsales_receipt.line_items = [\r\n  Quickbooks::Model::Line.new().tap do |line_item|\r\n    line_item.sales_item! do |detail|\r\n      detail.tax_code_ref = 'NON'\r\n    end\r\n  end\r\n]\r\n\r\nputs sales_receipt.to_xml_ns\r\n```\r\n\r\nRunning the above cause the following error to appear...\r\n\r\n```\r\n/Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml/xml/references.rb:301:in `block (2 levels) in update_xml': undefined method `to_xml' for \"NON\":String (NoMethodError)\r\nDid you mean?  to_sym\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml/xml/references.rb:300:in `tap'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml/xml/references.rb:300:in `block in update_xml'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml/xml/references.rb:291:in `tap'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml/xml/references.rb:291:in `update_xml'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml.rb:42:in `block (2 levels) in to_xml'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml.rb:39:in `each'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml.rb:39:in `block in to_xml'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml.rb:35:in `tap'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml.rb:35:in `to_xml'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml/xml/references.rb:298:in `block in update_xml'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml/xml/references.rb:291:in `tap'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml/xml/references.rb:291:in `update_xml'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml.rb:42:in `block (2 levels) in to_xml'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml.rb:39:in `each'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml.rb:39:in `block in to_xml'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml.rb:35:in `tap'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml.rb:35:in `to_xml'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml/xml/references.rb:295:in `block (2 levels) in update_xml'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml/xml/references.rb:294:in `each'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml/xml/references.rb:294:in `block in update_xml'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml/xml/references.rb:291:in `tap'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml/xml/references.rb:291:in `update_xml'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml.rb:42:in `block (2 levels) in to_xml'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml.rb:39:in `each'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml.rb:39:in `block in to_xml'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml.rb:35:in `tap'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/roxml-3.3.1/lib/roxml.rb:35:in `to_xml'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/quickbooks-ruby-0.4.6/lib/quickbooks/model/base_model.rb:19:in `to_xml_inject_ns'\r\n\tfrom /Users/srushe/.rvm/gems/ruby-2.3.7@accounting-sync/gems/quickbooks-ruby-0.4.6/lib/quickbooks/model/base_model.rb:39:in `to_xml_ns'\r\n```\r\n\r\nCommenting out the `detail.tax_code_ref = 'NON'` line results in a successful XML generation of (indented for ease of reading)...\r\n\r\n```xml\r\n<SalesReceipt xmlns=\"http://schema.intuit.com/finance/v3\" sparse=\"false\">\r\n  <Line>\r\n    <DetailType>SalesItemLineDetail</DetailType>\r\n    <SalesItemLineDetail>\r\n      <UnitPrice>0.0</UnitPrice>\r\n      <Qty>0.0</Qty>\r\n    </SalesItemLineDetail>\r\n  </Line>\r\n</SalesReceipt>\r\n```\r\n\r\nAm I using `tax_code_ref` incorrectly in `SalesItemLineDetail`, or is this a bug and should it actually add an entry to the item?"}}
{"actor":{"display_login":"srushe"}}