Open
Conversation
Owner
|
Awesome! Thanks for the contribution. I'll try to take a look at this soon and let you know what I find. |
Owner
|
I played around with this a bit today. I think the deserializer needs some work, potentially a custom Deserializer instance. I took a rough stab in the following branch here by adding a couple test cases, and started on a deserializer. I think it's headed in the right direction, but still has issues. I think perhaps the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
Super fan of this project. I am hoping to pitch in. This is my first contribution.
I am attempting to add support for ProspectAccounts. I have copied your code an implemented. I have duplicated some of your custom field code from Prospect to support the custom fields on the Prospect Account.
I have been testing and it mostly works with my Pardot instance. I have run into one issue with the retrieving the name of the ProspectAccount. I think we overrode the name field with "Name" field and it seems to not retrive the name of any ProspectAccount on my instance, and i get an execption if i don't specify fields and use instead .withName() (example)
[I also get this issue if i specify our fields and pass "name"]
Exception in thread "main" com.darksci.pardot.api.ParserException: Cannot deserialize instance of
java.lang.Stringout of START_OBJECT tokenat [Source: (StringReader); line: 77, column: 13] (through reference chain: com.darksci.pardot.api.response.prospectaccount.ProspectAccountQueryResponse["result"]->com.darksci.pardot.api.response.prospectaccount.ProspectAccountQueryResponse$Result["prospectAccount"]->java.util.ArrayList[1]->com.darksci.pardot.api.response.prospectaccount.ProspectAccount["name"])
at com.darksci.pardot.api.PardotClient.submitRequest(PardotClient.java:346)
at com.darksci.pardot.api.PardotClient.prospectAccountQuery(PardotClient.java:1108)
at com.precor.marketinganalytics.TestCrim.PardotAPIClient.TestQueryAccountName(PardotAPIClient.java:439)
at com.precor.marketinganalytics.TestCrim.TestCrimApp.main(TestCrimApp.java:419)
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of
java.lang.Stringout of START_OBJECT tokenat [Source: (StringReader); line: 77, column: 13] (through reference chain: com.darksci.pardot.api.response.prospectaccount.ProspectAccountQueryResponse["result"]->com.darksci.pardot.api.response.prospectaccount.ProspectAccountQueryResponse$Result["prospectAccount"]->java.util.ArrayList[1]->com.darksci.pardot.api.response.prospectaccount.ProspectAccount["name"])
Wondering if you could try the branch against your instance and see if its an issue my instance, or the code.
Otherwise the rest of the methods work great. Hope I can contribute..