Sha256: 23bd8b37018c663e65051f00535ff85782be718080bf082335463ba0a7fd61eb

Contents?: true

Size: 843 Bytes

Versions: 3

Compression:

Stored size: 843 Bytes

Contents

#
# guest.rb
# ConstantContact
#
# Copyright (c) 2013 Constant Contact. All rights reserved.

module ConstantContact
  module Components
    module EventSpot
      class Guest < Component
        attr_accessor :guest_id, :guest_section

        # Factory method to create an event Registrant object from a hash
        # @param [Hash] props - hash of properties to create object from
        # @return [Campaign]
        def self.create(props)
          guest = Guest.new
          props.each do |key, value|
            key = key.to_s
            if key == 'guest_section'
              guest.send("#{key}=", Components::EventSpot::RegistrantSection.create(value))
            else
              guest.send("#{key}=", value) if guest.respond_to?("#{key}=")
            end
          end
          guest
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
constantcontact-1.1.2 lib/constantcontact/components/event_spot/guest.rb
constantcontact-1.1.1 lib/constantcontact/components/event_spot/guest.rb
constantcontact-1.1.0 lib/constantcontact/components/event_spot/guest.rb