Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TrackingCategory - how to create new Option #189

Open
jbhewitt opened this issue Jan 4, 2015 · 5 comments
Open

TrackingCategory - how to create new Option #189

jbhewitt opened this issue Jan 4, 2015 · 5 comments
Labels

Comments

@jbhewitt
Copy link

jbhewitt commented Jan 4, 2015

Maybe this is isn't possible - I would like to create new Options in TrackingCategory's

I've been poking around in TrackingCategory object to see if I can create a new Option but I'm not sure how to create a new Xeroizer::Record::Option

@waynerobinson
Copy link
Owner

It is possible in the API, but Xeroizer hasn't been extended to support this at this point in time.

Happy to receive a PR for this feature though.

@bauschri
Copy link

+1

@bauschri
Copy link

bauschri commented Jan 7, 2017

xamatech@e4dba8a

quick-fix for adding tracking-options. Seems that the Tracking-Options endpoint is the only one with a record-id in the URL?

I must overwrite the URL in the base-model

@bypotatoes
Copy link

+1

@lesliev
Copy link

lesliev commented Jun 15, 2018

There's a simpler work-around:

    xero_tracking_category = xero_client.TrackingCategory.first
    option = xero_tracking_category.add_option(name: tracking_category_option)
    Xeroizer::Record::OptionModel.set_api_controller_name "TrackingCategories/#{xero_tracking_category.id}/Options"
    option.save

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants