require "json" enum Country FR, NL, DE, IT, EI, GB, end class Address JSON.mapping( name: String, address1: String, address2: {type: String, nilable: true}, postcode: String, city: String, country: Country, is_default: Bool ) end