Sha256: 836a46258519a7bef670ff9585fc9194b94ffbd9186f254b1b2b9d9a10dc8023
Contents?: true
Size: 695 Bytes
Versions: 1
Compression:
Stored size: 695 Bytes
Contents
require "fortnox/api/validator" module Fortnox module API module Customer class Validator extend Fortnox::API::Validator using_validations do validates_presence_of :name validates_length_of :currency, length: 3, if: :currency validates_length_of :country_code, length: 2, if: :country_code validates_inclusion_of :sales_account, within: (0..9999), if: :sales_account validates_inclusion_of :type, within: ['PRIVATE', 'COMPANY'], if: :type validates_inclusion_of :vat_type, within: ['SEVAT', 'SEREVERSEDVAT', 'EUREVERSEDVAT', 'EUVAT', 'EXPORT'], if: :vat_type end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fortnox-api-0.0.2 | lib/fortnox/api/customer/validator.rb |