Sha256: 8e38ca0f375d9b2e0f0f7405521958c857ee2fd21226dff74b0305047dcd3993

Contents?: true

Size: 1.07 KB

Versions: 3

Compression:

Stored size: 1.07 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,
          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
          }
        }
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
decidim-meetings-0.13.1 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.13.0 app/serializers/decidim/meetings/data_portability_registration_serializer.rb
decidim-meetings-0.13.0.pre1 app/serializers/decidim/meetings/data_portability_registration_serializer.rb