fastruby / harvesting

Ruby wrapper for the Harvest API v2
MIT License
28 stars 30 forks source link

Nested objects data not accessible #12

Open gap777 opened 6 years ago

gap777 commented 6 years ago

The Harvest v2 API returns nested objects, e.g. project.client, user_assignment.project, user_assignment.user, time_entry.user, etc. Harvesting's dynamic accessor generation scheme only supports accessing a flat data structure. In order to access all the data returned via the Harvest v2 API, the Harvesting Models need methods that access nested data.

etagwerker commented 5 years ago

@gap777 Thanks for submitting this issue and this PR: https://github.com/ombulabs/harvesting/pull/15

I believe we are on the right track to add all nested objects. I think your PR adds support for some of them and should be used as a guide for more nested objects.

Once we make sure all nested objects are accessible we can close this issue.

etagwerker commented 5 years ago

@gap777 Is this solved now? I am not sure we have covered all nested objects yet.

gap777 commented 5 years ago

I agree with you - there's a lot that could be included (eg Estimates API, Roles, Company). Maybe wait until someone asks for more pieces and add them then?

chimedpalden commented 5 years ago

@etagwerker i can give it a shot.