Sha256: f93f666b13548299940fbd732b4343c9061f824eaa4a22facac237717711d4de

Contents?: true

Size: 1.16 KB

Versions: 19

Compression:

Stored size: 1.16 KB

Contents

# frozen_string_literal: true

module Decidim
  module Meetings
    class DataPortabilityRegistrationSerializer < Decidim::Exporters::Serializer
      # Serializes a registration for data portability
      def serialize
        {
          id: resource.id,
          code: resource.code,
          user: {
            name: resource.user.name,
            email: resource.user.email
          },
          meeting: {
            title: resource.meeting.title,
            description: resource.meeting.description,
            start_time: resource.meeting.start_time,
            end_time: resource.meeting.end_time,
            address: resource.meeting.address,
            location: resource.meeting.location,
            location_hints: resource.meeting.location_hints,
            reference: resource.meeting.reference,
            attendees_count: resource.meeting.attendees_count,
            attending_organizations: resource.meeting.attending_organizations,
            closed_at: resource.meeting.closed_at,
            closing_report: resource.meeting.closing_report,
            published_at: resource.meeting.published_at
          }
        }
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
decidim-meetings-0.26.10 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.26.9 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.26.8 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.26.7 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.26.5 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.26.4 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.26.3 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.26.2 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.26.1 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.26.0 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.26.0.rc2 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.26.0.rc1 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.25.2 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.25.1 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.25.0 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.25.0.rc4 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.25.0.rc3 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.25.0.rc2 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.25.0.rc1 app/serializers/decidim/meetings/data_portability_registration_serializer.rb