-
Notifications
You must be signed in to change notification settings - Fork 8
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
Getting one contact #10
Comments
Hi there, sadly the wrapper currently don't support an array of $params in $contacts = Dinero::Client()->contacts()->get(
sprintf("?queryFilter=Name eq '%s';CountryKey eq '%s';Email eq '%s';IsPerson eq 'True'", $customer->name, $customer->country_code, $customer->email)
); Basically you want to put query parameters in the |
Ala dette: $contacts = Dinero::Client()->contacts()->get("?queryFilter=Name eq 'Test';CountryKey eq 'DK';Email eq '[email protected]';IsPerson eq 'True'"); |
Okay - thank you :-) |
It is still just listing all contacts:
|
Even this does not get the specific contact:
|
Is it correct that GET call in this wrapper uses the LIST endpoint? If so can this wrapper be improved with the GET endpoint? We need to have find specific contacts in a easy way :-) |
Ah I see! You can use the |
|
Thank you again :-) But I also need to find a specific contact when the Guid is not known. I have tried with but it is not working:
It is just returning all contacts. |
Odd! Maybe this is an issue in the Dinero API or maybe the CountryKey is breaking the filter (as it is not supported) https://api.dinero.dk/openapi/index.html#tag/Contacts/paths/~1v1~1{organizationId}~1contacts/get
|
Dinero API support is saying:
|
The issue is the same with getting one product. This code lists all products:
|
Any news? :-) |
Ah yes it seems it might be broken. I never really had the use for this, so I guess I missed it.
Probably here:
https://github.com/LasseRafn/php-dinero/blob/master/src/Utils/RequestBuilder.php#L128
There needs to be an option to add extra parameters I reckon. Currently I am not able to look at this though
… On 16 May 2020, at 14:20, JensKirk ***@***.***> wrote:
Any news? :-)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hi :-) I did manage to improve the code so it is working by doing this:
And calling it with:
|
Hi :-)
I want to get one existing contact but get I all contacts listed by doing this:
What to modify so I only get a specific contact based on the 4 pieces of info from the webshop?
I am able to create contacts, products and invoices but not yet getting a contact.
The text was updated successfully, but these errors were encountered: