Class: Landslider::WsSearch
- Inherits:
-
Object
- Object
- Landslider::WsSearch
- Defined in:
- lib/landslider/entities/ws_search.rb
Direct Known Subclasses
WsAccountContactSearch, WsAccountNoteSearch, WsAccountSearch, WsContactNoteSearch, WsContactSearch, WsLeadNoteSearch, WsLeadSearch, WsOpportunityNoteSearch, WsOpportunitySearch, WsTaskSearch, WsUserSearch
Instance Attribute Summary (collapse)
- - (Object) allow_duplicate_criterion writeonly
-
- (Object) first_result_position
writeonly
Sets the starting index of records you want to retrieve.
- - (Object) return_deleted_records writeonly
-
- (Object) search_criteria
writeonly
WsSearchCriterion is only documented to work with these APIs
-
getAccounts
-
getOpportunities
-
getProductFamilies
-
GetDurationTypes.
-
-
- (Object) source_id
writeonly
system source id search?.
-
- (Object) total_results_requested
writeonly
Sets the maximum number of records to retrieve.
-
- (Object) updated_on
writeonly
Sets a Date to search records updated on or after.
Instance Method Summary (collapse)
-
- (WsSearch) initialize(params = {})
constructor
A new instance of WsSearch.
-
- (Handsoap::XmlMason::Node) soapify_for(msg)
Adds the search xml.
Constructor Details
- (WsSearch) initialize(params = {})
A new instance of WsSearch
9 10 11 12 |
# File 'lib/landslider/entities/ws_search.rb', line 9 def initialize(params = {}) @first_result_position = params.fetch(:first_result_position) if params.key?(:first_result_position) @total_results_requested = params.fetch(:total_results_requested) if params.key?(:total_results_requested) end |
Instance Attribute Details
- (Object) allow_duplicate_criterion=(value) (writeonly)
31 32 33 |
# File 'lib/landslider/entities/ws_search.rb', line 31 def allow_duplicate_criterion=(value) @allow_duplicate_criterion = value end |
- (Object) first_result_position=(value) (writeonly)
Sets the starting index of records you want to retrieve. defaults to 1
16 17 18 |
# File 'lib/landslider/entities/ws_search.rb', line 16 def first_result_position=(value) @first_result_position = value end |
- (Object) return_deleted_records=(value) (writeonly)
31 32 33 |
# File 'lib/landslider/entities/ws_search.rb', line 31 def return_deleted_records=(value) @return_deleted_records = value end |
- (Object) search_criteria=(value) (writeonly)
WsSearchCriterion is only documented to work with these APIs
-
getAccounts
-
getOpportunities
-
getProductFamilies
-
GetDurationTypes
39 40 41 |
# File 'lib/landslider/entities/ws_search.rb', line 39 def search_criteria=(value) @search_criteria = value end |
- (Object) source_id=(value) (writeonly)
system source id search?
28 29 30 |
# File 'lib/landslider/entities/ws_search.rb', line 28 def source_id=(value) @source_id = value end |
- (Object) total_results_requested=(value) (writeonly)
Sets the maximum number of records to retrieve. defaults to 25
20 21 22 |
# File 'lib/landslider/entities/ws_search.rb', line 20 def total_results_requested=(value) @total_results_requested = value end |
- (Object) updated_on=(value) (writeonly)
Sets a Date to search records updated on or after
24 25 26 |
# File 'lib/landslider/entities/ws_search.rb', line 24 def updated_on=(value) @updated_on = value end |
Instance Method Details
- (Handsoap::XmlMason::Node) soapify_for(msg)
Adds the search xml
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/landslider/entities/ws_search.rb', line 44 def soapify_for(msg) msg.add 'firstResultPosition', @first_result_position || DEFAULT_FIRST_RESULT_POSITION msg.add 'totalResultsRequested', @total_results_requested || DEFAULT_TOTAL_RESULTS_REQUESTED msg.add 'updatedOn', @updated_on unless @updated_on.nil? unless @search_criteria.nil? if @search_criteria.kind_of?(Array) msg.add 'allowDuplicateCriterion', true @search_criteria.each do |sc| sc.soapify_for(msg) end else @search_criteria.soapify_for(msg) end end end |