Sha256: 39c96e6783efc1bbb21df5c7aec1449bfc90f6da7b74fa0a49489d670fa4b539
Contents?: true
Size: 506 Bytes
Versions: 44
Compression:
Stored size: 506 Bytes
Contents
module Spree class ReturnItem::EligibilityValidator::TimeSincePurchase < Spree::ReturnItem::EligibilityValidator::BaseValidator def eligible_for_return? if (@return_item.inventory_unit.order.completed_at + Spree::Config[:return_eligibility_number_of_days].days) > Time.now return true else add_error(:number_of_days, Spree.t('return_item_time_period_ineligible')) return false end end def requires_manual_intervention? false end end end
Version data entries
44 entries across 44 versions & 2 rubygems