Class: Accountability::Types::BillingConfigurationTypes::BillingAddress

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Attributes, ActiveModel::Model
Defined in:
lib/accountability/types/billing_configuration_types.rb

Instance Method Summary collapse

Instance Method Details

#validate_country_whitelistedObject



19
20
21
22
23
24
# File 'lib/accountability/types/billing_configuration_types.rb', line 19

def validate_country_whitelisted
  return unless Configuration.country_whitelist.present?
  return if country.blank?

  errors.add(:country, :not_permitted) unless Configuration.country_whitelist.include? country
end