landslider 0.5.18 → 0.5.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 5
4
- :patch: 18
4
+ :patch: 20
5
5
  :build:
data/landslider.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{landslider}
8
- s.version = "0.5.18"
8
+ s.version = "0.5.20"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jay Prall"]
12
- s.date = %q{2011-06-23}
12
+ s.date = %q{2011-06-27}
13
13
  s.description = %q{Landslider is a ruby interface to the Landslide SOAP-based API}
14
14
  s.email = %q{jay@j4y.net}
15
15
  s.extra_rdoc_files = [
@@ -46,7 +46,15 @@ class Landslider
46
46
  msg.add 'totalResultsRequested', @total_results_requested || DEFAULT_TOTAL_RESULTS_REQUESTED
47
47
  msg.add 'updatedOn', @updated_on unless @updated_on.nil?
48
48
  unless @search_criteria.nil?
49
- @search_criteria.soapify_for(msg)
49
+ if @search_criteria.kind_of?(Array)
50
+
51
+ msg.add 'allowDuplicateCriterion', true
52
+ @search_criteria.each do |sc|
53
+ sc.soapify_for(msg)
54
+ end
55
+ else
56
+ @search_criteria.soapify_for(msg)
57
+ end
50
58
  end
51
59
 
52
60
  end
@@ -16,7 +16,7 @@ class GetAccountsTest < Test::Unit::TestCase
16
16
  assert_not_nil result
17
17
  assert_equal false, result[:error]
18
18
  assert_kind_of Array, result[:accounts]
19
- assert_equal 6, result[:accounts].size
19
+ assert_equal 7, result[:accounts].size
20
20
 
21
21
  end
22
22
 
@@ -54,7 +54,7 @@ class LandsliderTest < Test::Unit::TestCase
54
54
  def test_landslider_get_account_contacts
55
55
  result = Landslider.get_account_contacts($sid, 55647822)
56
56
 
57
- assert_equal 3, result[:results_returned]
57
+ assert_equal 4, result[:results_returned]
58
58
  validate_standard_api_result result
59
59
  assert_kind_of Array, result[:contacts]
60
60
  assert_not_nil result[:contacts].first[:contact_id]
@@ -20,7 +20,7 @@ class WsAccountNoteSearchTest < Test::Unit::TestCase
20
20
  search.updated_on = '2011-04-21'
21
21
  result = Landslider.get_account_notes($sid3, search)
22
22
  assert_equal false, result[:error]
23
- assert_equal 2, result[:results_returned]
23
+ assert_equal 3, result[:results_returned]
24
24
  end
25
25
 
26
26
  def test_account_note_search_limit_by_results_requested
@@ -19,7 +19,7 @@ class WsSearchTest < Test::Unit::TestCase
19
19
  result = Landslider.get_accounts($sid2)
20
20
 
21
21
  assert_equal false, result[:error]
22
- assert_equal 6, result[:results_returned]
22
+ assert_equal 7, result[:results_returned]
23
23
  end
24
24
 
25
25
  def test_get_accounts_with_search_criteria
@@ -30,6 +30,17 @@ class WsSearchTest < Test::Unit::TestCase
30
30
  assert_equal false, result[:error]
31
31
  assert_equal 1, result[:results_returned]
32
32
  end
33
+
34
+ def test_get_accounts_with_more_than_one_search_criteria
35
+ search = Landslider::WsSearch.new
36
+ search.search_criteria = [Landslider::WsSearchCriterion.new('AccountName', 'Equals', "Jay's master account"),
37
+ Landslider::WsSearchCriterion.new('AccountTypeId', 'Equals', '1539484')]
38
+
39
+ result = Landslider.get_accounts($sid2, search)
40
+
41
+ assert_equal false, result[:error]
42
+ assert_equal 1, result[:results_returned]
43
+ end
33
44
 
34
45
  def test_get_opportunities_without_search_criteria
35
46
  result = Landslider.get_opportunities($sid2)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: landslider
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.18
5
+ version: 0.5.20
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jay Prall
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-23 00:00:00 -04:00
13
+ date: 2011-06-27 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency