Sha256: ef6f6a22738a7a624012a04667cac76d4c1e2ca0dc0f0b23442c9eb855597842

Contents?: true

Size: 1 KB

Versions: 25

Compression:

Stored size: 1 KB

Contents

# frozen_string_literal: true

module Decidim
  module Conferences
    class DownloadYourDataConferenceRegistrationSerializer < Decidim::Exporters::Serializer
      # Serializes a registration for download your data
      def serialize
        {
          id: resource.id,
          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

25 entries across 25 versions & 1 rubygems

Version Path
decidim-conferences-0.27.2 app/serializers/decidim/conferences/download_your_data_conference_registration_serializer.rb
decidim-conferences-0.27.1 app/serializers/decidim/conferences/download_your_data_conference_registration_serializer.rb
decidim-conferences-0.27.0 app/serializers/decidim/conferences/download_your_data_conference_registration_serializer.rb
decidim-conferences-0.27.0.rc2 app/serializers/decidim/conferences/download_your_data_conference_registration_serializer.rb
decidim-conferences-0.27.0.rc1 app/serializers/decidim/conferences/download_your_data_conference_registration_serializer.rb