activesalesforce 0.5.9 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/asf_adapter.rb +35 -0
  2. metadata +2 -2
data/lib/asf_adapter.rb CHANGED
@@ -440,6 +440,41 @@ module ActiveRecord
440
440
  end
441
441
 
442
442
 
443
+ def get_updated(object_type, start_date, end_date, name = nil)
444
+ msg = "get_updated(#{object_type}, #{start_date}, #{end_date})"
445
+ log(msg, name) {
446
+ get_updated_element = []
447
+ get_updated_element << 'type { :xmlns => "urn:sobject.partner.soap.sforce.com" }' << object_type
448
+ get_updated_element << :startDate << start_date
449
+ get_updated_element << :endDate << end_date
450
+
451
+ result = get_result(@connection.getUpdated(get_updated_element), :getUpdated)
452
+
453
+ result[:ids]
454
+ }
455
+ end
456
+
457
+
458
+ def get_deleted(object_type, start_date, end_date, name = nil)
459
+ msg = "get_deleted(#{object_type}, #{start_date}, #{end_date})"
460
+ log(msg, name) {
461
+ get_deleted_element = []
462
+ get_deleted_element << 'type { :xmlns => "urn:sobject.partner.soap.sforce.com" }' << object_type
463
+ get_deleted_element << :startDate << start_date
464
+ get_deleted_element << :endDate << end_date
465
+
466
+ result = get_result(@connection.getDeleted(get_deleted_element), :getDeleted)
467
+
468
+ ids = []
469
+ result[:deletedRecords].each do |v|
470
+ ids << v[:id]
471
+ end
472
+
473
+ ids
474
+ }
475
+ end
476
+
477
+
443
478
  def retrieve_field_values(object_type, fields, ids, name = nil)
444
479
  msg = "retrieve(#{object_type}, [#{ids.to_a.join(', ')}])"
445
480
  log(msg, name) {
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: activesalesforce
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.5.9
7
- date: 2006-06-06 00:00:00 -04:00
6
+ version: 0.6.0
7
+ date: 2006-06-28 00:00:00 -04:00
8
8
  summary: ActiveSalesforce (ASF) is a Rails connection adapter that provides direct access to Salesforce.com hosted data and metadata via the ActiveRecord model layer. Objects, fields, and relationships are all auto surfaced as active record attributes and rels.
9
9
  require_paths:
10
10
  - lib