Sha256: 19dc9fb9eba1f3077e18e741dff738b9f037a09e12491a1fc1ab50117cde4567

Contents?: true

Size: 926 Bytes

Versions: 2

Compression:

Stored size: 926 Bytes

Contents

# frozen_string_literal: true

require 'happymapper'
require_relative 'node'
require_relative './location'
require_relative './company'
require_relative './entitlement_group'
require_relative './helper/normalized_string'

module ForwardCalendar
  class Event < Node
    include HappyMapper
    tag 'event'

    has_many :locations, Location, tag: 'eventLocation'
    has_many :entitlement_groups, EntitlementGroup, tag: 'entitlementGroup'
    has_many :companies, Company, tag: 'company'

    element :id, Integer, tag: 'eventID'
    element :type, Helper::NormalizedString, tag: 'eventType'
    element :title, String, tag: 'eventTitle'
    element :status, Helper::NormalizedString, tag: 'eventStatus'
    element :broker, String, tag: 'broker'
    element :description, String, tag: 'eventDescription'
    element :start, Date, tag: 'start'
    element :end, Date, tag: 'end'
    element :url, String, tag: 'URL'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
forward-calendar-0.4.0 lib/forward_calendar/event.rb
forward-calendar-0.3.0 lib/forward_calendar/event.rb