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

Find method #7

Merged
merged 3 commits into from
Oct 18, 2018
Merged

Find method #7

merged 3 commits into from
Oct 18, 2018

Conversation

DivineOmega
Copy link
Contributor

This PR provides the ability to find Xero models by their GUIDs, similar to the syntax of the Eloquent find method.

# Retrieve an individual contact by its GUID
$contact = $xero->contacts()->find('34xxxx6e-7xx5-2xx4-bxx5-6123xxxxea49');

# Retrieve multiple contact by their GUIDS
$contacts = $xero->contacts()->find([
    '34xxxx6e-7xx5-2xx4-bxx5-6123xxxxea49',
    '364xxxx7f-2xx3-7xx3-gxx7-6726xxxxhe76',
    ]);

@jaredkove
Copy link

Nice addition.

@DivineOmega DivineOmega merged commit 995fc8d into master Oct 18, 2018
@DivineOmega DivineOmega deleted the feature/find-method branch October 18, 2018 15:37
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

Successfully merging this pull request may close these issues.

3 participants