Module: AtlasEngine::Services::ValidationEligibility

Extended by:
T::Sig
Defined in:
app/models/atlas_engine/services/validation_eligibility.rb

Instance Method Summary collapse

Instance Method Details

#validation_enabled?(address) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
13
14
15
# File 'app/models/atlas_engine/services/validation_eligibility.rb', line 10

def validation_enabled?(address)
  return false if address.country_code.blank?
  return true unless Rails.env.production? || Rails.env.test?

  CountryProfile.for(T.must(address.country_code)).validation.enabled
end