Sha256: 81f1013a27e2cbd600618d293ea7b54818cd6660ce6e50ca8275960e9e89d786

Contents?: true

Size: 1.12 KB

Versions: 46

Compression:

Stored size: 1.12 KB

Contents

# frozen_string_literal: true

module Decidim
  module Conferences
    class DataPortabilityConferenceInviteSerializer < Decidim::Exporters::Serializer
      # Serializes a conference invite for data portability
      def serialize
        {
          id: resource.id,
          sent_at: resource.sent_at,
          accepted_at: resource.accepted_at,
          rejected_at: resource.rejected_at,
          user: {
            name: resource.user.name,
            email: resource.user.email
          },
          registration_type: {
            title: resource.registration_type.title,
            price: resource.registration_type.price
          },
          conference: {
            title: resource.conference.title,
            reference: resource.conference.reference,
            slogan: resource.conference.slogan,
            description: resource.conference.description,
            start_date: resource.conference.start_date,
            end_date: resource.conference.end_date,
            location: resource.conference.location,
            objectives: resource.conference.objectives
          }
        }
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

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