This repository was archived by the owner on Apr 3, 2024. It is now read-only.
Fix read calls#13
Merged
Merged
Conversation
The Intacct API calls for different format and cases in read and write requests.
For example, a read request would look like:
request.readByQuery(nil, { object: 'VENDOR',
query: '',
fields: '*',
pagesize: 100})
Note: Object-Type VENDOR is passed as a value in key-value pair and the keys are lowercase.
A write request, on the other hand looks like:
request.create(:CUSTOMER, { CUSTOMERID: '1',
FIRST_NAME: 'Han',
LAST_NAME: 'Solo',
TYPE: 'Person',
EMAIL1: 'han@solo.com',
STATUS: 'active'
})
Note: Object-Type CUSTOMER is passed as the first argument and is in uppercase along with the keys.
Before this commit, the gem was artificially upcasing all keys it was passed as hashes.
This meant that it did not work with any of the read queries. This commit removes
this iterative upcase instead keying on the case of the key which it is passed.It also adds
a new function type readMore to allowed function types.
This is a breaking change for create and update calls
Contributor
Author
|
@bezoar17 I cherry-picked your commits! Wanted to be sure it passed CI and needed to resolve a merge conflict with master after another PR went through Will release a new gem version shortly! |
This was referenced Mar 19, 2018
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Contributor Self-Check:
Which GitHub Issues does this PR address?
#7
Really an adjustment of PRs #8 #9
What does this PR do?
Allows for varying cases in the keys of calls. This is needed to support more than create and update calls!
How do I manually test this?
N/A CI is enough!
Additional Comments
This is a breaking change.