Sha256: ef877dec7d0b7a968c0cf9688599642f4bb240ad776980200a00e4b7c65bc5be

Contents?: true

Size: 777 Bytes

Versions: 1

Compression:

Stored size: 777 Bytes

Contents

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

#   def self.external?
#     true
#   end

#   def self.entity_name
#     'lead'
#   end

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