Fix the format of xml for read requests#16
Conversation
For read requests like this
gateway.read(nil, {object: "VENDOR", pagesize: 100, fields: '*'})
there was an extra tag being thrown
<read>
<>
<object>VENDOR</object>
<keys>1</keys>
<fields>*</fields>
<>
</read>
as there was no distinction between the Create,Update and the Read requests while building the xml query. This check has been restored
|
@danielpowell4 Hey, while porting PR 9 to 13, you missed some lines. Restored them. |
|
@bezoar17 Sorry about this oversight on my part. I saw these changes but I didn't realize the need when I ran it against our integration as we only are using the gem for CU_TYPES currently I think this is fine for a quick patch that I can put out quickly It seems to me that since the gem now only supports ruby 2+ there is likely a way to clean up the gem's API with keyword arguments such that passing in "nil" as the second argument for read calls becomes unnecessary To me, this looks better: This would make create calls the look like: This change would happen here https://github.com/privateprep/intacct-ruby/blob/master/lib/intacct_ruby/function.rb#L18 What do you think? Let me know when possible. |
|
Using keyword arguments throughout the gem is the more elegant and better solution. I agree to this. But I think that this should go as a separate PR. |
|
Agree with you about best strategy, Certainly open to your help with keywords! If you want to break it up, also happy to collaborate |
Contributor Self-Check:
Which GitHub Issues does this PR address?
#15
What does this PR do?
Fix the format of XML query for read API calls.
When, the PR #9 was ported to PR #13, a few lines were missed due to which this issue persisted. This should fix that too.
How do I manually test this?
Steps to reproduce are mentioned in the issue itself.
Additional Comments
No need to update README.md as those were updated with PR#9 itself.
GIF for how this PR makes me feel