Account model may be missing contact relations
Closed this issue · 2 comments
jochakovsky commented
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 commented
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!