ryandotsmith-asf-soap-adapter 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/LICENSE +20 -0
- data/README.rdoc +125 -0
- data/Rakefile +63 -0
- data/VERSION +1 -0
- data/asf-soap-adapter.gemspec +300 -0
- data/asf-soap-adapter.pptx +0 -0
- data/deploy +6 -0
- data/lib/active_record/connection_adapters/activesalesforce.rb +36 -0
- data/lib/active_record/connection_adapters/activesalesforce_adapter.rb +919 -0
- data/lib/active_record/connection_adapters/asf_active_record.rb +40 -0
- data/lib/active_record/connection_adapters/boxcar_command.rb +66 -0
- data/lib/active_record/connection_adapters/column_definition.rb +95 -0
- data/lib/active_record/connection_adapters/entity_definition.rb +59 -0
- data/lib/active_record/connection_adapters/id_resolver.rb +84 -0
- data/lib/active_record/connection_adapters/recording_binding.rb +93 -0
- data/lib/active_record/connection_adapters/relationship_definition.rb +81 -0
- data/lib/active_record/connection_adapters/result_array.rb +31 -0
- data/lib/active_record/connection_adapters/sid_authentication_filter.rb +57 -0
- data/lib/activerecord-activesalesforce-adapter.rb +1 -0
- data/lib/asf-soap-adapter.rb +34 -0
- data/lib/salesforce/account.rb +28 -0
- data/lib/salesforce/account_feed.rb +27 -0
- data/lib/salesforce/apex_log.rb +28 -0
- data/lib/salesforce/asset.rb +27 -0
- data/lib/salesforce/asset_feed.rb +27 -0
- data/lib/salesforce/campaign.rb +27 -0
- data/lib/salesforce/campaign_feed.rb +27 -0
- data/lib/salesforce/case.rb +27 -0
- data/lib/salesforce/case_feed.rb +27 -0
- data/lib/salesforce/case_team_member.rb +28 -0
- data/lib/salesforce/case_team_role.rb +28 -0
- data/lib/salesforce/chatter_feed.rb +291 -0
- data/lib/salesforce/contact.rb +27 -0
- data/lib/salesforce/contact_feed.rb +29 -0
- data/lib/salesforce/contract.rb +27 -0
- data/lib/salesforce/contract_feed.rb +27 -0
- data/lib/salesforce/entity_subscription.rb +27 -0
- data/lib/salesforce/feed_comment.rb +27 -0
- data/lib/salesforce/feed_post.rb +27 -0
- data/lib/salesforce/feed_tracked_change.rb +27 -0
- data/lib/salesforce/file_writer.rb +61 -0
- data/lib/salesforce/group.rb +28 -0
- data/lib/salesforce/group_member.rb +28 -0
- data/lib/salesforce/lead.rb +27 -0
- data/lib/salesforce/lead_feed.rb +27 -0
- data/lib/salesforce/news_feed.rb +27 -0
- data/lib/salesforce/opportunity.rb +27 -0
- data/lib/salesforce/opportunity_feed.rb +27 -0
- data/lib/salesforce/organization.rb +27 -0
- data/lib/salesforce/product2.rb +27 -0
- data/lib/salesforce/product2_feed.rb +27 -0
- data/lib/salesforce/sf_base.rb +94 -0
- data/lib/salesforce/sf_utility.rb +214 -0
- data/lib/salesforce/solution.rb +27 -0
- data/lib/salesforce/solution_feed.rb +27 -0
- data/lib/salesforce/solution_history.rb +28 -0
- data/lib/salesforce/task.rb +28 -0
- data/lib/salesforce/task_feed.rb +28 -0
- data/lib/salesforce/user.rb +27 -0
- data/lib/salesforce/user_feed.rb +27 -0
- data/lib/salesforce/user_profile_feed.rb +27 -0
- data/lib/salesforce/user_role.rb +28 -0
- data/ryandotsmith-asf-soap-adapter.gemspec +301 -0
- data/test/asf-soap-adapter-rails-app/README +243 -0
- data/test/asf-soap-adapter-rails-app/Rakefile +10 -0
- data/test/asf-soap-adapter-rails-app/app/controllers/adapter_homes_controller.rb +83 -0
- data/test/asf-soap-adapter-rails-app/app/controllers/application_controller.rb +10 -0
- data/test/asf-soap-adapter-rails-app/app/helpers/adapter_homes_helper.rb +2 -0
- data/test/asf-soap-adapter-rails-app/app/helpers/application_helper.rb +3 -0
- data/test/asf-soap-adapter-rails-app/app/models/adapter_home.rb +2 -0
- data/test/asf-soap-adapter-rails-app/app/views/adapter_homes/edit.html.erb +24 -0
- data/test/asf-soap-adapter-rails-app/app/views/adapter_homes/index.html.erb +24 -0
- data/test/asf-soap-adapter-rails-app/app/views/adapter_homes/new.html.erb +23 -0
- data/test/asf-soap-adapter-rails-app/app/views/adapter_homes/show.html.erb +18 -0
- data/test/asf-soap-adapter-rails-app/app/views/layouts/adapter_homes.html.erb +17 -0
- data/test/asf-soap-adapter-rails-app/config/boot.rb +110 -0
- data/test/asf-soap-adapter-rails-app/config/database.yml +30 -0
- data/test/asf-soap-adapter-rails-app/config/environment.rb +44 -0
- data/test/asf-soap-adapter-rails-app/config/environments/development.rb +17 -0
- data/test/asf-soap-adapter-rails-app/config/environments/production.rb +28 -0
- data/test/asf-soap-adapter-rails-app/config/environments/salesforce-default-realm.rb +30 -0
- data/test/asf-soap-adapter-rails-app/config/environments/test.rb +28 -0
- data/test/asf-soap-adapter-rails-app/config/initializers/backtrace_silencers.rb +7 -0
- data/test/asf-soap-adapter-rails-app/config/initializers/cookie_verification_secret.rb +7 -0
- data/test/asf-soap-adapter-rails-app/config/initializers/inflections.rb +10 -0
- data/test/asf-soap-adapter-rails-app/config/initializers/mime_types.rb +5 -0
- data/test/asf-soap-adapter-rails-app/config/initializers/new_rails_defaults.rb +21 -0
- data/test/asf-soap-adapter-rails-app/config/initializers/session_store.rb +15 -0
- data/test/asf-soap-adapter-rails-app/config/locales/en.yml +5 -0
- data/test/asf-soap-adapter-rails-app/config/routes.rb +46 -0
- data/test/asf-soap-adapter-rails-app/db/development.sqlite3 +0 -0
- data/test/asf-soap-adapter-rails-app/db/migrate/20101107202112_create_adapter_homes.rb +15 -0
- data/test/asf-soap-adapter-rails-app/db/schema.rb +22 -0
- data/test/asf-soap-adapter-rails-app/db/seeds.rb +7 -0
- data/test/asf-soap-adapter-rails-app/db/test.sqlite3 +0 -0
- data/test/asf-soap-adapter-rails-app/log/development.log +51 -0
- data/test/asf-soap-adapter-rails-app/log/salesforce-default-realm.log +928 -0
- data/test/asf-soap-adapter-rails-app/nbproject/private/config.properties +0 -0
- data/test/asf-soap-adapter-rails-app/nbproject/private/private.properties +3 -0
- data/test/asf-soap-adapter-rails-app/nbproject/private/private.xml +4 -0
- data/test/asf-soap-adapter-rails-app/nbproject/private/rake-d.txt +94 -0
- data/test/asf-soap-adapter-rails-app/nbproject/project.properties +5 -0
- data/test/asf-soap-adapter-rails-app/nbproject/project.xml +9 -0
- data/test/asf-soap-adapter-rails-app/public/404.html +30 -0
- data/test/asf-soap-adapter-rails-app/public/422.html +30 -0
- data/test/asf-soap-adapter-rails-app/public/500.html +30 -0
- data/test/asf-soap-adapter-rails-app/public/favicon.ico +0 -0
- data/test/asf-soap-adapter-rails-app/public/images/rails.png +0 -0
- data/test/asf-soap-adapter-rails-app/public/javascripts/application.js +2 -0
- data/test/asf-soap-adapter-rails-app/public/javascripts/controls.js +963 -0
- data/test/asf-soap-adapter-rails-app/public/javascripts/dragdrop.js +973 -0
- data/test/asf-soap-adapter-rails-app/public/javascripts/effects.js +1128 -0
- data/test/asf-soap-adapter-rails-app/public/javascripts/prototype.js +4320 -0
- data/test/asf-soap-adapter-rails-app/public/robots.txt +5 -0
- data/test/asf-soap-adapter-rails-app/public/stylesheets/scaffold.css +54 -0
- data/test/asf-soap-adapter-rails-app/script/about +4 -0
- data/test/asf-soap-adapter-rails-app/script/console +3 -0
- data/test/asf-soap-adapter-rails-app/script/dbconsole +3 -0
- data/test/asf-soap-adapter-rails-app/script/destroy +3 -0
- data/test/asf-soap-adapter-rails-app/script/generate +3 -0
- data/test/asf-soap-adapter-rails-app/script/performance/benchmarker +3 -0
- data/test/asf-soap-adapter-rails-app/script/performance/profiler +3 -0
- data/test/asf-soap-adapter-rails-app/script/plugin +3 -0
- data/test/asf-soap-adapter-rails-app/script/runner +3 -0
- data/test/asf-soap-adapter-rails-app/script/server +3 -0
- data/test/asf-soap-adapter-rails-app/test/performance/browsing_test.rb +9 -0
- data/test/asf-soap-adapter-rails-app/test/test_helper.rb +44 -0
- data/test/asf-soap-adapter-rails-app/test/test_keys.rb +4 -0
- data/test/asf-soap-adapter-rails-app/test/unit/adapter_home_test.rb +8 -0
- data/test/asf-soap-adapter-rails-app/test/unit/helpers/adapter_homes_helper_test.rb +4 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/account_feed_test.rb +16 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/account_test.rb +66 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/apex_log_test.rb +10 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/asset_feed_test.rb +14 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/asset_test.rb +13 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/campaign_feed_test.rb +13 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/campaign_test.rb +13 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/case_feed_test.rb +13 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/case_team_member_test.rb +10 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/case_team_role.rb +10 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/case_test.rb +13 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/chatter_feed_test.rb +53 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/contact_feed_test.rb +13 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/contact_test.rb +14 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/contract_feed_test.rb +13 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/contract_test.rb +13 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/entity_subscription_test.rb +13 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/feed_comment_test.rb +9 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/feed_post_test.rb +10 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/feed_tracked_change_test.rb +9 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/group_member_test.rb +10 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/group_test.rb +24 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/lead_feed_test.rb +13 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/lead_test.rb +40 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/news_feed_test.rb +13 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/opportunity_feed_test.rb +13 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/opportunity_test.rb +13 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/organization_test.rb +8 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/product2_feed_test.rb +13 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/product2_test.rb +13 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/salesforce_base_test.rb +10 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/solution_feed_test.rb +13 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/solution_history_test.rb +10 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/solution_test.rb +14 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/task_feed_test.rb +10 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/task_test.rb +10 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/user_feed_test.rb +13 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/user_profile_feed_test.rb +11 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/user_role_test.rb +10 -0
- data/test/asf-soap-adapter-rails-app/test/unit/salesforce/user_test.rb +48 -0
- data/test/basic_test.rb +204 -0
- data/test/config.yml +5 -0
- data/test/helper.rb +10 -0
- data/test/recorded_test_case.rb +87 -0
- data/test/simple_test.rb +96 -0
- data/test/tests_without_rail.rb +65 -0
- metadata +401 -0
@@ -0,0 +1,214 @@
|
|
1
|
+
=begin
|
2
|
+
asf-soap-adapter
|
3
|
+
Copyright 2010 Raymond Gao
|
4
|
+
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
you may not use this file except in compliance with the License.
|
7
|
+
You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
16
|
+
=end
|
17
|
+
|
18
|
+
|
19
|
+
module Salesforce
|
20
|
+
#This is the utility class for managing Salesforce objects.
|
21
|
+
class SfUtility
|
22
|
+
# SalesObject KeyPrefix 3 digits code => Object Type locator.
|
23
|
+
# ID Prefix Entity Type
|
24
|
+
# (Following has associated ChatterFeed {object}Feed
|
25
|
+
# 001 Account
|
26
|
+
# 02i Asset
|
27
|
+
# 500 Case
|
28
|
+
# 701 Campaign
|
29
|
+
# 003 Contact
|
30
|
+
# 800 Contract
|
31
|
+
# 00G Group
|
32
|
+
# 00Q Lead
|
33
|
+
# 006 Opportunity
|
34
|
+
# 00D Organization
|
35
|
+
# 01t Product2
|
36
|
+
# 501 Solution
|
37
|
+
# 00T Task
|
38
|
+
# 005 User
|
39
|
+
#
|
40
|
+
# (Special Feed class, with no associated SF object)
|
41
|
+
# 0D5 NewsFeed is special, It does not have SF Object
|
42
|
+
#
|
43
|
+
# (Other Chatter Object without Feed)
|
44
|
+
# 00V Campaign Member
|
45
|
+
# 00e Profile
|
46
|
+
# 00N Custom Field Definition
|
47
|
+
#
|
48
|
+
# (FeedItem vs. FeedPost)
|
49
|
+
# 0D5 FeedItem (post by everyone)
|
50
|
+
# 0F7 FeedPost (post made by this user)
|
51
|
+
#
|
52
|
+
# See: http://eng.genius.com/blog/2009/05/17/salesforcecom-api-gotchas-2/
|
53
|
+
SFObjectPrefix = {
|
54
|
+
'001' => 'Account',
|
55
|
+
'02i' => 'Asset',
|
56
|
+
'500' => 'Case',
|
57
|
+
'701' => 'Campaign',
|
58
|
+
'003' => 'Contact',
|
59
|
+
'800' => 'Contract',
|
60
|
+
'00G' => 'Group',
|
61
|
+
'00Q' => 'Lead',
|
62
|
+
'006' => 'Opportunity',
|
63
|
+
'00D' => 'Organization',
|
64
|
+
'01t' => 'Product2',
|
65
|
+
'501' => 'Solution',
|
66
|
+
'00T' => 'Task',
|
67
|
+
'005' => 'User',
|
68
|
+
# below are other Salesforce object without chatter {object}Feed
|
69
|
+
'00V' => 'Campaign Member',
|
70
|
+
'00E' => 'Profile',
|
71
|
+
'00N' => 'Custom_Field_Definition',
|
72
|
+
#distinction between FeedItem and FeedPost
|
73
|
+
'0D5' => 'FeedItem',
|
74
|
+
'0F7' => 'FeedPost',
|
75
|
+
'xxx' => 'Unknown',
|
76
|
+
'' => 'Unknown'
|
77
|
+
}
|
78
|
+
|
79
|
+
# Determine the Salesforce object type based on 3-digits OID prefix.
|
80
|
+
def self.determine_sf_object_type(id)
|
81
|
+
String oid = id[0,3]
|
82
|
+
if SFObjectPrefix.has_key?(oid)
|
83
|
+
return SFObjectPrefix.value(oid)
|
84
|
+
else
|
85
|
+
return 'Unknown'
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
# Finders the appropriate Salesforce Object based on Object. No more guess work.
|
91
|
+
# <em>nil</em> means that the <em>oid</em> is not supported by this method, e.g. not suitable.
|
92
|
+
def self.salesforce_object_find_by_id (oid)
|
93
|
+
query_conditions = Hash.new
|
94
|
+
query_conditions[:id] = oid
|
95
|
+
|
96
|
+
otype = determine_sf_object_type(oid)
|
97
|
+
if otype != 'Unknown'
|
98
|
+
sf_object = salesforce_object_find_all(otype, query_conditions).first
|
99
|
+
else
|
100
|
+
sf_object = nil
|
101
|
+
end
|
102
|
+
|
103
|
+
return sf_object
|
104
|
+
end
|
105
|
+
|
106
|
+
# Finders the appropriate Salesforce Object based on Object Type and description
|
107
|
+
# <em>nil</em> means that the <em>oid</em> is not supported by this method, e.g. not suitable.
|
108
|
+
def self.salesforce_object_find_by_type_and_conditions (otype, query_conditions)
|
109
|
+
# for example
|
110
|
+
#Salesforce::Group.find(:all, :conditions => ["email like :search", {:search => '%.com'}])
|
111
|
+
sf_objects = salesforce_object_find_all(otype, query_conditions)
|
112
|
+
|
113
|
+
return sf_objects
|
114
|
+
end
|
115
|
+
|
116
|
+
# Finders the appropriate Salesforce Object based on the Object Type
|
117
|
+
# returning <em>nil</em> means that the <em>oid</em> is not supported by this method, e.g. not suitable.
|
118
|
+
def self.salesforce_object_find_all(otype, query_conditions = nil)
|
119
|
+
case otype
|
120
|
+
when 'Account'
|
121
|
+
sf_object = Salesforce::Account.find(:all, :conditions => query_conditions)
|
122
|
+
when 'AccountFeed'
|
123
|
+
sf_object = Salesforce::AccountFeed.find(:all, :conditions => query_conditions)
|
124
|
+
when 'Asset'
|
125
|
+
sf_object = Salesforce::Asset.find(:all, :conditions => query_conditions)
|
126
|
+
when 'AssetFeed'
|
127
|
+
sf_object = Salesforce::AssetFeed.find(:all, :conditions => query_conditions)
|
128
|
+
when 'Case'
|
129
|
+
sf_object = Salesforce::Case.find(:all, :conditions => query_conditions)
|
130
|
+
when 'CaseFeed'
|
131
|
+
sf_object = Salesforce::CaseFeed.find(:all, :conditions => query_conditions)
|
132
|
+
when 'Campaign'
|
133
|
+
sf_object = Salesforce::Campaign.find(:all, :conditions => query_conditions)
|
134
|
+
when 'CampaignFeed'
|
135
|
+
sf_object = Salesforce::CampaignFeed.find(:all, :conditions => query_conditions)
|
136
|
+
when 'Contact'
|
137
|
+
sf_object = Salesforce::Contact.find(:all, :conditions => query_conditions)
|
138
|
+
when 'ContactFeed'
|
139
|
+
sf_object = Salesforce::ContactFeed.find(:all, :conditions => query_conditions)
|
140
|
+
when 'Contract'
|
141
|
+
sf_object = Salesforce::Contract.find(:all, :conditions => query_conditions)
|
142
|
+
when 'ContractFeed'
|
143
|
+
sf_object = Salesforce::ContractFeed.find(:all, :conditions => query_conditions)
|
144
|
+
when 'Group'
|
145
|
+
sf_object = Salesforce::Group.find(:all, :conditions => query_conditions)
|
146
|
+
when 'Lead'
|
147
|
+
sf_object = Salesforce::Lead.find(:all, :conditions => query_conditions)
|
148
|
+
when 'LeadFeed'
|
149
|
+
sf_object = Salesforce::LeadFeed.find(:all, :conditions => query_conditions)
|
150
|
+
when 'Opportunity'
|
151
|
+
sf_object = Salesforce::Opportunity.find(:all, :conditions => query_conditions)
|
152
|
+
when 'OpportunityFeed'
|
153
|
+
sf_object = Salesforce::OpportunityFeed.find(:all, :conditions => query_conditions)
|
154
|
+
when 'Organization'
|
155
|
+
sf_object = Salesforce::Organization.find(:all, :conditions => query_conditions)
|
156
|
+
when 'Product2'
|
157
|
+
sf_object = Salesforce::Product2.find(:all, :conditions => query_conditions)
|
158
|
+
when 'Product2Feed'
|
159
|
+
sf_object = Salesforce::Product2Feed.find(:all, :conditions => query_conditions)
|
160
|
+
when 'Solution'
|
161
|
+
sf_object = Salesforce::Solution.find(:all, :conditions => query_conditions)
|
162
|
+
when 'SolutionFeed'
|
163
|
+
sf_object = Salesforce::SolutionFeed.find(:all, :conditions => query_conditions)
|
164
|
+
when 'User'
|
165
|
+
sf_object = Salesforce::User.find(:all, :conditions => query_conditions)
|
166
|
+
when 'UserFeed'
|
167
|
+
sf_object = Salesforce::UserFeed.find(:all, :conditions => query_conditions)
|
168
|
+
else
|
169
|
+
sf_object = nil
|
170
|
+
end
|
171
|
+
|
172
|
+
return sf_object
|
173
|
+
end
|
174
|
+
|
175
|
+
# Create a blank Salesforce Object based on the object type.
|
176
|
+
def self.salesforce_object_create(otype)
|
177
|
+
case otype
|
178
|
+
when 'Account'
|
179
|
+
sf_object = Salesforce::Account.new()
|
180
|
+
when 'Asset'
|
181
|
+
sf_object = Salesforce::Asset.new()
|
182
|
+
when 'Case'
|
183
|
+
sf_object = Salesforce::Case.new()
|
184
|
+
when 'Campaign'
|
185
|
+
sf_object = Salesforce::Campaign.new()
|
186
|
+
when 'Contact'
|
187
|
+
sf_object = Salesforce::Contact.new()
|
188
|
+
when 'Contract'
|
189
|
+
sf_object = Salesforce::Contract.new()
|
190
|
+
when 'Group'
|
191
|
+
sf_object = Salesforce::Group.new()
|
192
|
+
when 'Lead'
|
193
|
+
sf_object = Salesforce::Lead.new()
|
194
|
+
when 'Opportunity'
|
195
|
+
sf_object = Salesforce::Opportunity.new()
|
196
|
+
when 'Organization'
|
197
|
+
sf_object = Salesforce::Organization.new()
|
198
|
+
when 'Product2'
|
199
|
+
sf_object = Salesforce::Product2.new()
|
200
|
+
when 'Solution'
|
201
|
+
sf_object = Salesforce::Solution.new()
|
202
|
+
when 'User'
|
203
|
+
sf_object = Salesforce::User.new()
|
204
|
+
|
205
|
+
else
|
206
|
+
sf_object = nil
|
207
|
+
end
|
208
|
+
|
209
|
+
return sf_object
|
210
|
+
end
|
211
|
+
|
212
|
+
end
|
213
|
+
|
214
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
=begin
|
2
|
+
asf-soap-adapter
|
3
|
+
Copyright 2010 Raymond Gao
|
4
|
+
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
you may not use this file except in compliance with the License.
|
7
|
+
You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
16
|
+
=end
|
17
|
+
|
18
|
+
# Salesforce package contains convenience classes for mapping Salesforce objects into
|
19
|
+
# ActiveRecord objects. The SfBase is the mother of all other objects. Additionally,
|
20
|
+
# SfUtitlity class provides several useful methods for manipulating SF objects.
|
21
|
+
module Salesforce
|
22
|
+
# See http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_list.htm
|
23
|
+
# For complete list of Salesforce Standard Objects in V20.
|
24
|
+
class Solution < SfBase
|
25
|
+
set_table_name 'solutions'
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
=begin
|
2
|
+
asf-soap-adapter
|
3
|
+
Copyright 2010 Raymond Gao
|
4
|
+
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
you may not use this file except in compliance with the License.
|
7
|
+
You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
16
|
+
=end
|
17
|
+
|
18
|
+
# Salesforce package contains convenience classes for mapping Salesforce objects into
|
19
|
+
# ActiveRecord objects. The SfBase is the mother of all other objects. Additionally,
|
20
|
+
# SfUtitlity class provides several useful methods for manipulating SF objects.
|
21
|
+
module Salesforce
|
22
|
+
# See http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_list.htm
|
23
|
+
# For complete list of Salesforce Standard Objects in V20.
|
24
|
+
class SolutionFeed < SfBase
|
25
|
+
set_table_name 'solution_feeds'
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
=begin
|
2
|
+
asf-soap-adapter
|
3
|
+
Copyright 2010 Raymond Gao
|
4
|
+
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
you may not use this file except in compliance with the License.
|
7
|
+
You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
16
|
+
=end
|
17
|
+
|
18
|
+
# Salesforce package contains convenience classes for mapping Salesforce objects into
|
19
|
+
# ActiveRecord objects. The SfBase is the mother of all other objects. Additionally,
|
20
|
+
# SfUtitlity class provides several useful methods for manipulating SF objects.
|
21
|
+
module Salesforce
|
22
|
+
# See http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_list.htm
|
23
|
+
# For complete list of Salesforce Standard Objects in V20.
|
24
|
+
class SolutionHistory < SfBase
|
25
|
+
#table name must match the Salesforce, or it does not work. This is a quirk of the ActiveSalesforce
|
26
|
+
set_table_name 'solution_histories'
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
=begin
|
2
|
+
asf-soap-adapter
|
3
|
+
Copyright 2010 Raymond Gao
|
4
|
+
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
you may not use this file except in compliance with the License.
|
7
|
+
You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
16
|
+
=end
|
17
|
+
|
18
|
+
# Salesforce package contains convenience classes for mapping Salesforce objects into
|
19
|
+
# ActiveRecord objects. The SfBase is the mother of all other objects. Additionally,
|
20
|
+
# SfUtitlity class provides several useful methods for manipulating SF objects.
|
21
|
+
module Salesforce
|
22
|
+
# See http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_list.htm
|
23
|
+
# For complete list of Salesforce Standard Objects in V20.
|
24
|
+
class Task < SfBase
|
25
|
+
#table name must match the Salesforce, or it does not work. This is a quirk of the ActiveSalesforce
|
26
|
+
set_table_name 'tasks'
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
=begin
|
2
|
+
asf-soap-adapter
|
3
|
+
Copyright 2010 Raymond Gao
|
4
|
+
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
you may not use this file except in compliance with the License.
|
7
|
+
You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
16
|
+
=end
|
17
|
+
|
18
|
+
# Salesforce package contains convenience classes for mapping Salesforce objects into
|
19
|
+
# ActiveRecord objects. The SfBase is the mother of all other objects. Additionally,
|
20
|
+
# SfUtitlity class provides several useful methods for manipulating SF objects.
|
21
|
+
module Salesforce
|
22
|
+
# See http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_list.htm
|
23
|
+
# For complete list of Salesforce Standard Objects in V20.
|
24
|
+
class TaskFeed < SfBase
|
25
|
+
#table name must match the Salesforce, or it does not work. This is a quirk of the ActiveSalesforce
|
26
|
+
set_table_name 'task_feeds'
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
=begin
|
2
|
+
asf-soap-adapter
|
3
|
+
Copyright 2010 Raymond Gao
|
4
|
+
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
you may not use this file except in compliance with the License.
|
7
|
+
You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
16
|
+
=end
|
17
|
+
|
18
|
+
# Salesforce package contains convenience classes for mapping Salesforce objects into
|
19
|
+
# ActiveRecord objects. The SfBase is the mother of all other objects. Additionally,
|
20
|
+
# SfUtitlity class provides several useful methods for manipulating SF objects.
|
21
|
+
module Salesforce
|
22
|
+
# See http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_list.htm
|
23
|
+
# For complete list of Salesforce Standard Objects in V20.
|
24
|
+
class User < SfBase
|
25
|
+
set_table_name 'users'
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
=begin
|
2
|
+
asf-soap-adapter
|
3
|
+
Copyright 2010 Raymond Gao
|
4
|
+
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
you may not use this file except in compliance with the License.
|
7
|
+
You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
16
|
+
=end
|
17
|
+
|
18
|
+
# Salesforce package contains convenience classes for mapping Salesforce objects into
|
19
|
+
# ActiveRecord objects. The SfBase is the mother of all other objects. Additionally,
|
20
|
+
# SfUtitlity class provides several useful methods for manipulating SF objects.
|
21
|
+
module Salesforce
|
22
|
+
# See http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_list.htm
|
23
|
+
# For complete list of Salesforce Standard Objects in V20.
|
24
|
+
class UserFeed < SfBase
|
25
|
+
set_table_name 'user_feeds'
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
=begin
|
2
|
+
asf-soap-adapter
|
3
|
+
Copyright 2010 Raymond Gao
|
4
|
+
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
you may not use this file except in compliance with the License.
|
7
|
+
You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
16
|
+
=end
|
17
|
+
|
18
|
+
# Salesforce package contains convenience classes for mapping Salesforce objects into
|
19
|
+
# ActiveRecord objects. The SfBase is the mother of all other objects. Additionally,
|
20
|
+
# SfUtitlity class provides several useful methods for manipulating SF objects.
|
21
|
+
module Salesforce
|
22
|
+
# See http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_list.htm
|
23
|
+
# For complete list of Salesforce Standard Objects in V20.
|
24
|
+
class UserProfileFeed < SfBase
|
25
|
+
set_table_name 'user_profile_feeds'
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
=begin
|
2
|
+
asf-soap-adapter
|
3
|
+
Copyright 2010 Raymond Gao
|
4
|
+
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
you may not use this file except in compliance with the License.
|
7
|
+
You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
16
|
+
=end
|
17
|
+
|
18
|
+
# Salesforce package contains convenience classes for mapping Salesforce objects into
|
19
|
+
# ActiveRecord objects. The SfBase is the mother of all other objects. Additionally,
|
20
|
+
# SfUtitlity class provides several useful methods for manipulating SF objects.
|
21
|
+
module Salesforce
|
22
|
+
# See http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_list.htm
|
23
|
+
# For complete list of Salesforce Standard Objects in V20.
|
24
|
+
class UserRole < SfBase
|
25
|
+
#table name must match the Salesforce, or it does not work. This is a quirk of the ActiveSalesforce
|
26
|
+
set_table_name 'user_roles'
|
27
|
+
end
|
28
|
+
end
|