ruckus / quickbooks-ruby

Quickbooks Online REST API V3 - Ruby
MIT License
374 stars 302 forks source link

TaxServices - how to implement #228

Closed lugoland closed 9 years ago

lugoland commented 9 years ago

I need to implement TaxService , to be able to create taxCodes and associate them with taxAgencies, can some one guide me how to do this? would like to modify this gem to be able to do this.

ruckus commented 9 years ago

Thanks for your interest!

Have a look at the docs for TaxService: https://developer.intuit.com/docs/api/accounting#/taxservice

It looks like to be pretty straight-forward. Then you can copy any existing model / service classes and tailor them to have these fields and/or validations.

lugoland commented 9 years ago

Hi ruckus thanks for you prompt response, i was able to implement TaxAgency query but it looks like to "create" TaxService the api only accepts json. Is there an easy way to tell the gem to transmit in json instead of XML?

ruckus commented 9 years ago

Hmm interesting. Yeah it looks like XML is not supported for TaxService creation.

Unfortunately the whole library is built around XML, so using JSON for this request / response is not possible at the moment. We'll have to wait until Intuit supports XML for that endpoint.

Sorry!

On Mar 23, 2015, at 3:17 PM, lugoland notifications@github.com wrote:

Hi ruckus thanks for you prompt response, i was able to implement TaxAgency query but it looks like to "create" TaxService the api only accepts json. Is there an easy way to tell the gem to transmit in json instead of XML?

— Reply to this email directly or view it on GitHub https://github.com/ruckus/quickbooks-ruby/issues/228#issuecomment-85228276.

HeathNaylor commented 9 years ago

Would it be a worthy undertaking to support JSON in this library, seems like a better option than just waiting for Iintuit to update their API. I need to push a specific amount of tax per transaction and TaxService seems to be the only way to do it.

yul commented 9 years ago

Not sure why this issue is closed, it is not fixed. Intuit didn't add XML support to this call and can never add it at all, or even drop XML support completely in the next api version. So currently there is no way to create tax codes and assign them to invoices?

ruckus commented 9 years ago

This library only reads/writes XML and according to the Intuit documentation for TaxService creation only supports JSON. Thus - as of now this library doesnt support creating TaxService

minimul commented 9 years ago

Update: TaxService is JSON is supported now.

HeathNaylor commented 9 years ago

This makes me happy.