Sha256: dfc987df680c0201bd52f274bd854ffc93ac06328d1452522ffdbca6a78f044a

Contents?: true

Size: 671 Bytes

Versions: 133

Compression:

Stored size: 671 Bytes

Contents

# frozen_string_literal: true

module Spree
  class ReturnItem < Spree::Base
    module EligibilityValidator
      class BaseValidator
        attr_reader :errors

        def initialize(return_item)
          @return_item = return_item
          @errors = {}
        end

        def eligible_for_return?
          raise NotImplementedError, I18n.t('spree.implement_eligible_for_return')
        end

        def requires_manual_intervention?
          raise NotImplementedError, I18n.t('spree.implement_requires_manual_intervention')
        end

        private

        def add_error(key, error)
          @errors[key] = error
        end
      end
    end
  end
end

Version data entries

133 entries across 133 versions & 2 rubygems

Version Path
solidus_core-4.4.2 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-4.4.1 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-4.4.0 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-4.3.4 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-4.2.4 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-4.1.5 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-4.3.3 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-4.3.2 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-4.1.4 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-4.3.1 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-4.3.0 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-4.2.3 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-4.1.3 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-4.0.4 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-3.4.6 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-4.0.3 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-4.1.2 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-4.2.2 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-3.4.5 app/models/spree/return_item/eligibility_validator/base_validator.rb
solidus_core-4.2.1 app/models/spree/return_item/eligibility_validator/base_validator.rb