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

Account model may be missing contact relations #72

Closed
jochakovsky opened this issue Aug 17, 2016 · 2 comments
Closed

Account model may be missing contact relations #72

jochakovsky opened this issue Aug 17, 2016 · 2 comments

Comments

@jochakovsky
Copy link
Contributor

Seems like instances of ActiveZuora::Account do not have relations to their bill-to and sold-to contacts.

The following works:

ActiveZuora::Account.find('valid_account_id').contacts
ActiveZuora::Account.find('valid_account_id').bill_to_id
ActiveZuora::Account.find('valid_account_id').sold_to_id

But the following relations seem to be missing:

ActiveZuora::Account.find('valid_account_id').bill_to
ActiveZuora::Account.find('valid_account_id').sold_to

Thanks!

@anfleene
Copy link
Contributor

Thanks for submitting an issue! The problem is likely with this code https://github.com/sportngin/active_zuora/blob/master/lib/active_zuora/generator.rb#L124-L134

My guess is that it's checking if field? :bill_to when it should be checking if field? :bill_to_id

Want to take a shot at updating those? Should be pretty easy to verify once changed.

Thanks!

@anfleene
Copy link
Contributor

Fixed in AZ 2.5.1

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

No branches or pull requests

2 participants