def write_relationship(base_id,options)
      
      relationship_type = get_relationship_type(options)
      with_id = options[relationship_type.to_sym]

      # Get the existing person/relationship or create a new person
      unless person = relationship(base_id,options.merge({:events => 'none'}))
        person = Org::Familysearch::Ws::Familytree::V2::Schema::Person.new
        person.id = base_id
      end
      
      # Add the relationship to the person with all of the correct options
      r_options = {:type => relationship_type, :with => with_id}
      r_options[:event] = options[:event] if options[:event]
      r_options[:ordinance] = options[:ordinance] if options[:ordinance]
      r_options[:lineage] = options[:lineage] if options[:lineage]
      person.create_relationship r_options
      
      # Create the payload
      familytree = Org::Familysearch::Ws::Familytree::V2::Schema::FamilyTree.new
      familytree.persons = [person]
      
      # Get the most current related ID for the URI
      rels = person.relationships.get_relationships_of_type(r_options[:type])
      rel = rels.find{|r|r.id == r_options[:with] || r.requestedId == r_options[:with]}
      related_id = rel.id
      url = "#{Base}person/#{base_id}/#{relationship_type}/#{related_id}"
      
      # Post the response and return the resulting person/relationship record from response
      response = @fs_communicator.post(url,familytree.to_json)
      res_familytree = Org::Familysearch::Ws::Familytree::V2::Schema::FamilyTree.from_json JSON.parse(response.body)
      person = res_familytree.persons.first
      return person 
    end
def write_relationship(base_id,options)
      
      relationship_type = get_relationship_type(options)
      with_id = options[relationship_type.to_sym]

      # Get the existing person/relationship or create a new person
      unless person = relationship(base_id,options.merge({:events => 'none'}))
        person = Org::Familysearch::Ws::Familytree::V2::Schema::Person.new
        person.id = base_id
      end
      
      # Add the relationship to the person with all of the correct options
      r_options = {:type => relationship_type, :with => with_id}
      r_options[:event] = options[:event] if options[:event]
      r_options[:ordinance] = options[:ordinance] if options[:ordinance]
      r_options[:lineage] = options[:lineage] if options[:lineage]
      person.create_relationship r_options
      
      # Create the payload
      familytree = Org::Familysearch::Ws::Familytree::V2::Schema::FamilyTree.new
      familytree.persons = [person]
      
      # Get the most current related ID for the URI
      rels = person.relationships.get_relationships_of_type(r_options[:type])
      rel = rels.find{|r|r.id == r_options[:with] || r.requestedId == r_options[:with]}
      related_id = rel.id
      url = "#{Base}person/#{base_id}/#{relationship_type}/#{related_id}"
      
      # Post the response and return the resulting person/relationship record from response
      response = @fs_communicator.post(url,familytree.to_json)
      res_familytree = Org::Familysearch::Ws::Familytree::V2::Schema::FamilyTree.from_json JSON.parse(response.body)
      person = res_familytree.persons.first
      return person 
    end
====Params
 * <tt>base_id</tt> - The root person for creating the relationship
 * <tt>options</tt> - Should include either :parent, :spouse, or :child. :lineage and :event is optional

 :lineage can be set to the following values:
 * 'Biological'
 * 'Adoptive'
 * 'Foster'
 * 'Guardianship'
 * 'Step'
 * 'Other'

 :event should be a hash with the following values
 ** :type - "Marriage", etc. (REQUIRED)
 ** :place - "Utah, United States" (optional)
 ** :date - "Nov 2009"

 :ordinance should be a hash with the following values
 ** :type - "Sealing_to_Spouse", etc. (REQUIRED)
 ** :place - "Utah, United States" (optional)
 ** :date - "Nov 2009"
 ** :temple - 'SLAKE'

 If the :lineage is set, the parent-child relationships will be written via a characteristic.
 Otherwise, an exists assertion will be created to just establish the relationship.
 ====Example

    communicator.familytree_v2.write_relationship 'KWQS-BBQ', :parent => 'KWQS-BBT', :lineage => 'Biological'
    communicator.familytree_v2.write_relationship 'KWQS-BBQ', :parent => 'KWQS-BBT', :lineage => 'Adoptive'
    communicator.familytree_v2.write_relationship 'KWQS-BBQ', :spouse => 'KWRT-BBZ', :event => {:type => 'Marriage', :date => '15 Aug 1987', :place => 'Utah, United States'}