Skip to content

Commit

Permalink
updated account and intl partners queries according to the salesforce…
Browse files Browse the repository at this point in the history
… release v2.3
  • Loading branch information
ij committed Sep 8, 2015
1 parent 3a5ea33 commit 331a124
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/sf/account.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Sf::Account
include Sf::Base

FIELDS = ['Id', 'Name', 'Member_Type__c', 'Member_Category__c', 'Member_Join_Date__c', 'Status__c', 'Website', 'InCommon_Participant__c', 'iMIS_ID__c', 'Membership_Status__c']
FIELDS = ['Id', 'Name', 'Member_Type__c', 'Member_Category__c', 'MOU_Participant__c', 'Member_Join_Date__c', 'Status__c', 'Website', 'InCommon_Participant__c', 'iMIS_ID__c', 'Membership_Status__c']
FIELDS_SELECT_STR = FIELDS.join(', ')
MEMBER_TYPES = ['R&E Network Member', 'University Member', 'Industry Member', 'Affiliate Member']
MEMBER_TYPES_STR = MEMBER_TYPES.map{|v| "\'#{v}\'"}.join(', ')
Expand Down Expand Up @@ -45,11 +45,11 @@ def self.find_by(args = {})
end

def self.intl_partners
build_collection Sf.client.query("select #{FIELDS_SELECT_STR} from Account where Member_Category__c = 'International Partner' order by Name")
build_collection Sf.client.query("select #{FIELDS_SELECT_STR} from Account where MOU_Participant__c = true order by Name")
end

def self.members
build_collection Sf.client.query("select #{FIELDS_SELECT_STR} from Account where Membership_Status__c = true and Status__c = 'Active' order by Name")
build_collection Sf.client.query("select #{FIELDS_SELECT_STR} from Account where Membership_Status__c = true order by Name")
end

def self.all
Expand All @@ -60,8 +60,8 @@ def self.community_orgs
build_collection Sf.client.query(
"select #{FIELDS_SELECT_STR} from Account
where Name='Internet2' or InCommon_Participant__c = true
or (Membership_Status__c = true and Status__c = 'Active')
or Member_Category__c = 'International Partner'
or Membership_Status__c = true
or MOU_Participant__c = true
order by Name"
)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/sf/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Sf
VERSION = "0.1.27"
VERSION = "0.1.28"
end

0 comments on commit 331a124

Please sign in to comment.