def salesforce_attributes_to_set(attributes = {})
      {}.tap do |hash|
        # loop through the hash of attributes from the outbound message, and compare to our sf mappings and
        # create a reversed hash of value's and key's to pass to update_attributes
        attributes.each do |key, value|
          # make sure our sync_mapping contains the salesforce attribute AND that our object has a setter for it
          hash[self.class.salesforce_sync_attribute_mapping[key.to_s].to_sym] = value if self.class.salesforce_sync_attribute_mapping.include?(key.to_s) && self.respond_to?("#{self.class.salesforce_sync_attribute_mapping[key.to_s]}=")
        end

        # remove the web_id from hash if it exists, as we don't want to modify a web_id
        hash.delete(:id) if hash[:id]

        # update the sf_updated_at field with the system mod stamp from sf
        hash[:salesforce_updated_at] = attributes[:SystemModstamp]

        # incase we looked up via the WebId__c, we should set the salesforce_id
        hash[:salesforce_id] = attributes[self.class.salesforce_id_attribute_name]
      end
    end
def salesforce_attributes_to_set(attributes = {})
      {}.tap do |hash|
        # loop through the hash of attributes from the outbound message, and compare to our sf mappings and
        # create a reversed hash of value's and key's to pass to update_attributes
        attributes.each do |key, value|
          # make sure our sync_mapping contains the salesforce attribute AND that our object has a setter for it
          hash[self.class.salesforce_sync_attribute_mapping[key.to_s].to_sym] = value if self.class.salesforce_sync_attribute_mapping.include?(key.to_s) && self.respond_to?("#{self.class.salesforce_sync_attribute_mapping[key.to_s]}=")
        end

        # remove the web_id from hash if it exists, as we don't want to modify a web_id
        hash.delete(:id) if hash[:id]

        # update the sf_updated_at field with the system mod stamp from sf
        hash[:salesforce_updated_at] = attributes[:SystemModstamp]

        # incase we looked up via the WebId__c, we should set the salesforce_id
        hash[:salesforce_id] = attributes[self.class.salesforce_id_attribute_name]
      end
    end
An internal method used to get a hash of values that we are going to set from a Salesforce outbound message hash