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

Return correct node name for Recurly_NoteList #236

Merged
merged 1 commit into from
Jun 20, 2016
Merged

Return correct node name for Recurly_NoteList #236

merged 1 commit into from
Jun 20, 2016

Conversation

drewish
Copy link

@drewish drewish commented Jun 20, 2016

Notes weren't loaded after rewind() was called. The name didn't match what
was in the XML so __parseXmlToObject() was never called and hence the object
were never added to $this->_objects.

While I'm here I fixed a bug in the pager where it'd keep checking for a
next link so it could reload... that wasn't ever going to happen so it's
better to give a hard error.

Test this by trying to run the notes sample code in our docs:

try {
  $notes = Recurly_NoteList::get('b6f5783');
  foreach ($notes as $note) {
    print "Note: {$note->message}\n";
  }
} catch (Recurly_NotFoundError $e) {
  print "Invalid account code: $e";
}

Notes weren't loaded after rewind() was called. The name didn't match what
was in the XML so __parseXmlToObject() was never called and hence the object
were never added to $this->_objects.

While I'm here I fixed a bug in the pager where it'd keep checking for a
next link so it could reload... that wasn't ever going to happen so it's
better to give a hard error.
@bhelx
Copy link
Contributor

bhelx commented Jun 20, 2016

👍

@bhelx bhelx merged commit a92720a into master Jun 20, 2016
@drewish drewish deleted the fix-notes branch June 20, 2016 22:52
@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

Successfully merging this pull request may close these issues.

None yet

2 participants