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

returning user and plan info on invoice #329

Closed
norcross opened this issue Jul 25, 2017 · 5 comments
Closed

returning user and plan info on invoice #329

norcross opened this issue Jul 25, 2017 · 5 comments
Labels
V2 V2 Client

Comments

@norcross
Copy link

looking at both Recurly_InvoiceList::get() and Recurly_InvoiceList::getForAccount(), I'm seeing that no data regarding the user or the specific plan they purchased is included. Is there a way with the existing return to fetch that data, or should I be looking elsewhere?

@drewish
Copy link

drewish commented Jul 26, 2017

You should be able to follow the invoice's subscription reference and look at its plan. If you need more help with that let me know and I can get you some sample code tomorrow.

@norcross
Copy link
Author

are you referring to pulling out the href values inside the return, then looking up those?

@drewish
Copy link

drewish commented Jul 28, 2017

You should not need to pull those out manually something like$invoice->subscription->get()->plan.

Or you could find the appropriate charge on the invoice and look at its product code but those don't get updated if a plan's code changes.

https://dev.recurly.com/page/php#fetching-linked-resources

@norcross
Copy link
Author

ahhh that makes perfect sense. and it gives me what I'm looking for. thanks!!

@drewish
Copy link

drewish commented Jul 28, 2017

Awesome yeah we need to move more of the docs into the readme make it less of an Easter egg hunt to find them.

@bhelx bhelx added the V2 V2 Client label Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V2 V2 Client
Projects
None yet
Development

No branches or pull requests

3 participants