-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
add 2014_1 wsdl, make search results work when there is only a single result on a page #82
Open
pospischil
wants to merge
11
commits into
NetSweet:master
Choose a base branch
from
custora:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
559b2c3
2014_1 wsdl
pospischil 30eedc7
make search result more robust when there is a single item in the res…
pospischil d2843ee
add additional attributes to sales_order per the netsuite API
pospischil 63565ea
protect against a null response
pospischil db66c86
safer null protection
pospischil 90f9701
remove 2014_1 wsdl
pospischil b48a41f
Change savon version to 2.2.0.
dkoslow 6f01428
Add support for between operator
pospischil 1da9059
add a bunch of netsuite configuration options
pospischil cddb3a0
missing comma
pospischil de6b09b
default to peer
pospischil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,15 +23,15 @@ def initialize(response, result_class) | |
if response.body.has_key?(:record_list) | ||
# basic search results | ||
record_list = response.body[:record_list][:record] | ||
record_list = [record_list] if @total_records == 1 | ||
record_list = [record_list] unless record_list.is_a?(Array) | ||
|
||
record_list.each do |record| | ||
results << result_class.new(record) | ||
end | ||
elsif response.body.has_key? :search_row_list | ||
# advanced search results | ||
record_list = response.body[:search_row_list][:search_row] | ||
record_list = [record_list] if @total_records == 1 | ||
record_list = [record_list] unless record_list.is_a?(Array) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In what case this did this occur? |
||
record_list.each do |record| | ||
# TODO because of customFieldList we need to either make this recursive | ||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious... why was this needed? What situation broke the existing implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you have more than one page of items and the last page has only a single item.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, got it. Nice catch! Merged this into master.