Sha256: 2413348ac87d30b9ffb0038c5d7d78211db469d5d190049b1de3ca78cef2c8ef

Contents?: true

Size: 641 Bytes

Versions: 16

Compression:

Stored size: 641 Bytes

Contents

module Spree
  module Api
    module V2
      module DataFeeds
        class GoogleController < ::Spree::Api::V2::BaseController
          def rss_feed
            send_data data_feeds_google_rss_service.value[:file], filename: 'products.rss', type: 'text/xml'
          end

          private

          def settings
            @settings ||= Spree::DataFeed::Google.find_by!(store: current_store, slug: params[:slug], active: true)
          end

          def data_feeds_google_rss_service
            Spree::Dependencies.data_feeds_google_rss_service.constantize.new.call(settings)
          end
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
spree_api-4.10.1 app/controllers/spree/api/v2/data_feeds/google_controller.rb
spree_api-4.10.0 app/controllers/spree/api/v2/data_feeds/google_controller.rb
spree_api-4.9.0 app/controllers/spree/api/v2/data_feeds/google_controller.rb
spree_api-4.8.3 app/controllers/spree/api/v2/data_feeds/google_controller.rb
spree_api-4.8.2 app/controllers/spree/api/v2/data_feeds/google_controller.rb
spree_api-4.7.3 app/controllers/spree/api/v2/data_feeds/google_controller.rb
spree_api-4.6.6 app/controllers/spree/api/v2/data_feeds/google_controller.rb
spree_api-4.6.5 app/controllers/spree/api/v2/data_feeds/google_controller.rb
spree_api-4.7.2 app/controllers/spree/api/v2/data_feeds/google_controller.rb
spree_api-4.7.1 app/controllers/spree/api/v2/data_feeds/google_controller.rb
spree_api-4.6.4 app/controllers/spree/api/v2/data_feeds/google_controller.rb
spree_api-4.7.0 app/controllers/spree/api/v2/data_feeds/google_controller.rb
spree_api-4.6.3 app/controllers/spree/api/v2/data_feeds/google_controller.rb
spree_api-4.6.2 app/controllers/spree/api/v2/data_feeds/google_controller.rb
spree_api-4.6.1 app/controllers/spree/api/v2/data_feeds/google_controller.rb
spree_api-4.6.0 app/controllers/spree/api/v2/data_feeds/google_controller.rb