Sha256: 467a0d6de9bdc042a9f6baa206f508ccd913da8bd0011acb78d57bdfb8f183cb
Contents?: true
Size: 1005 Bytes
Versions: 7
Compression:
Stored size: 1005 Bytes
Contents
# encoding: utf-8 module SPS class DebtorAddress include ActiveModel::Validations extend Converter attr_accessor :street_name, :post_code, :town_name, :country_code, :address_line1, :address_line2 convert :street_name, to: :text convert :post_code, to: :text convert :town_name, to: :text convert :country_code, to: :text convert :address_line1, to: :text convert :address_line2, to: :text validates_length_of :street_name, maximum: 70 validates_length_of :post_code, maximum: 16 validates_length_of :town_name, maximum: 35 validates_length_of :country_code, is: 2 validates_length_of :address_line1, maximum: 70 validates_length_of :address_line2, maximum: 70 def initialize(attributes = {}) attributes.each do |name, value| public_send("#{name}=", value) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems