Sha256: f3186465469943a8c9430e4a5a582414a2533b7c6b3540cc237cba295617a0fa

Contents?: true

Size: 517 Bytes

Versions: 16

Compression:

Stored size: 517 Bytes

Contents

module Spree
  module DataFeeds
    module Google
      class OptionalAttributes
        prepend Spree::ServiceModule::Base

        def call(input)
          information = {}

          input[:product].property_ids.each do |key|
            name = Spree::Property.find(key)&.name
            value = input[:product].property(name)
            unless value.nil?
              information[name] = value
            end
          end

          success(information: information)
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
spree_core-4.10.1 app/services/spree/data_feeds/google/optional_attributes.rb
spree_core-4.10.0 app/services/spree/data_feeds/google/optional_attributes.rb
spree_core-4.9.0 app/services/spree/data_feeds/google/optional_attributes.rb
spree_core-4.8.3 app/services/spree/data_feeds/google/optional_attributes.rb
spree_core-4.8.2 app/services/spree/data_feeds/google/optional_attributes.rb
spree_core-4.7.3 app/services/spree/data_feeds/google/optional_attributes.rb
spree_core-4.6.6 app/services/spree/data_feeds/google/optional_attributes.rb
spree_core-4.6.5 app/services/spree/data_feeds/google/optional_attributes.rb
spree_core-4.7.2 app/services/spree/data_feeds/google/optional_attributes.rb
spree_core-4.7.1 app/services/spree/data_feeds/google/optional_attributes.rb
spree_core-4.6.4 app/services/spree/data_feeds/google/optional_attributes.rb
spree_core-4.7.0 app/services/spree/data_feeds/google/optional_attributes.rb
spree_core-4.6.3 app/services/spree/data_feeds/google/optional_attributes.rb
spree_core-4.6.2 app/services/spree/data_feeds/google/optional_attributes.rb
spree_core-4.6.1 app/services/spree/data_feeds/google/optional_attributes.rb
spree_core-4.6.0 app/services/spree/data_feeds/google/optional_attributes.rb