Sha256: a7e4c376d386a9bb996910f588af39a567f4f98759d3be4330818524d4a18b46

Contents?: true

Size: 765 Bytes

Versions: 1

Compression:

Stored size: 765 Bytes

Contents

# TODO
# This file is provided as an example and should be removed
# See README for explanation
# class Entities::SubEntities::Contact < Maestrano::Connector::Rails::SubEntityBase

#   def self.external?
#     true
#   end

#   def self.entity_name
#     'contact'
#   end

#   def map_to(name, entity, organization)
#     case name
#     when 'person'
#       Entities::SubEntities::ContactMapper.denormalize(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/contact.rb