PostalInfo type checking for contact create

This commit is contained in:
Andres Keskküla 2014-08-28 12:53:37 +03:00
parent ad03165546
commit 678fd29c09
4 changed files with 24 additions and 7 deletions

View file

@ -36,7 +36,7 @@ module EppContactXmlBuilder
xml.tag!('contact:create', 'xmlns:contact' => 'urn:ietf:params:xml:ns:contact-1.0') do
xml.tag!('contact:id', xml_params[:id], 'sh8013') unless xml_params[:id] == false
unless xml_params[:postalInfo] == [false]
xml.tag!('contact:postalInfo') do
xml.tag!('contact:postalInfo', type: 'int') do
xml.tag!('contact:name', ( xml_params[:name] || 'Sillius Soddus')) unless xml_params[:name] == false
xml.tag!('contact:org', ( xml_params[:org_name] || 'Example Inc.')) unless xml_params[:org_name] == false
unless xml_params[:addr] == [false]