Sha256: a18db0ecc1c85842428e23ddf94b4d8fde7530e82bbb7f50c855f74c292a81d4

Contents?: true

Size: 433 Bytes

Versions: 122

Compression:

Stored size: 433 Bytes

Contents

module Spree
  class ReturnItem::EligibilityValidator::InventoryShipped < Spree::ReturnItem::EligibilityValidator::BaseValidator
    def eligible_for_return?
      if @return_item.inventory_unit.shipped?
        true
      else
        add_error(:inventory_unit_shipped, Spree.t('return_item_inventory_unit_ineligible'))
        false
      end
    end

    def requires_manual_intervention?
      @errors.present?
    end
  end
end

Version data entries

122 entries across 122 versions & 1 rubygems

Version Path
spree_core-4.6.2 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.6.1 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.6.0 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.5.3 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.5.2 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.5.1 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.5.0 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.2.6 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.3.2 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.4.0 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.4.0.rc2 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.3.1 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.4.0.rc1 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.3.0 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.3.0.rc3 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.3.0.rc2 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.3.0.rc1 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.2.5 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.1.14 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-4.0.8 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb