Class: ReturnItem::EligibilityValidator::Default

Inherits:
Spree::ReturnItem::EligibilityValidator::BaseValidator
  • Object
show all
Defined in:
app/models/spree/return_item/eligibility_validator/default.rb

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) eligible_for_return?

Returns:

  • (Boolean)


12
13
14
# File 'app/models/spree/return_item/eligibility_validator/default.rb', line 12

def eligible_for_return?
  validators.all?(&:eligible_for_return?)
end

- (Object) errors



20
21
22
# File 'app/models/spree/return_item/eligibility_validator/default.rb', line 20

def errors
  validators.map(&:errors).reduce({}, :merge)
end

- (Boolean) requires_manual_intervention?

Returns:

  • (Boolean)


16
17
18
# File 'app/models/spree/return_item/eligibility_validator/default.rb', line 16

def requires_manual_intervention?
  validators.any?(&:requires_manual_intervention?)
end