Sha256: a18572fc5039c2bb67fa002c78d233d8dfab679705593f771f195c78384029fa

Contents?: true

Size: 837 Bytes

Versions: 1

Compression:

Stored size: 837 Bytes

Contents

# TODO
# This file is provided as an example and should be removed
# See README for explanation
# class Enities::SubEntities::Person < Maestrano::Connector::Rails::SubEntityBase
#   def self.external?
#     false
#   end

#   def self.entity_name
#     'person'
#   end

#   def map_to(name, entity, organization)
#     case name
#     when 'lead'
#       Enities::SubEntities::LeadMapper.normalize(entity)
#     when 'contact'
#       Enities::SubEntities::ContactMapper.normalize(entity)
#     else
#       raise "Impossible mapping from #{self.entity_name} to #{name}"
#     end
#   end

#   def self.object_name_from_connec_entity_hash(entity)
#     "#{entity['first_name']} #{entity['last_name']}"
#   end

#   def self.object_name_from_external_entity_hash(entity)
#     "#{entity['FirstName']} #{entity['LastName']}"
#   end
# end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
maestrano-connector-rails-0.3.0 lib/generators/connector/templates/complex_entity_example/person.rb