Sha256: 7c6e81e617db5e46689f09ef480c5057914bc0895a4d198efa03f98d0efa1c82

Contents?: true

Size: 940 Bytes

Versions: 11

Compression:

Stored size: 940 Bytes

Contents

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

module ConstantContact
  module Components
    module EventSpot
      class RegistrantSection < Component
        attr_accessor :label, :fields

        # Factory method to create a RegistrantSection object from a hash
        # @param [Hash] props - hash of properties to create object from
        # @return [RegistrantSection]
        def self.create(props)
          obj = RegistrantSection.new
          props.each do |key, value|
            key = key.to_s
            if key == 'fields'
              value ||= []
              obj.fields = value.collect do |field|
                Components::EventSpot::RegistrantField.create(field)
              end
            else
              obj.send("#{key}=", value) if obj.respond_to? key
            end
          end if props
          obj
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
constantcontact-4.0.0 lib/constantcontact/components/event_spot/registrant_section.rb
constantcontact-3.0.0 lib/constantcontact/components/event_spot/registrant_section.rb
constantcontact-2.2.1 lib/constantcontact/components/event_spot/registrant_section.rb
constantcontact-ruby-2.2.1 lib/constantcontact/components/event_spot/registrant_section.rb
constantcontact-ruby-2.2.0 lib/constantcontact/components/event_spot/registrant_section.rb
constantcontact-2.2.0 lib/constantcontact/components/event_spot/registrant_section.rb
constantcontact-2.1.0 lib/constantcontact/components/event_spot/registrant_section.rb
constantcontact-2.0.1 lib/constantcontact/components/event_spot/registrant_section.rb
constantcontact-2.0.0 lib/constantcontact/components/event_spot/registrant_section.rb
constantcontact-1.3.2 lib/constantcontact/components/event_spot/registrant_section.rb
constantcontact-1.2.0 lib/constantcontact/components/event_spot/registrant_section.rb