lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_contact.rb in adiwg-mdtranslator-1.4.0.beta5 vs lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_contact.rb in adiwg-mdtranslator-1.4.0.beta6
- old
+ new
@@ -12,27 +12,29 @@
else
type = intObj[:indName].nil? ? 'organization' : 'person'
json.name intObj[:indName] || intObj[:orgName]
json.contactType type
json.email intObj[:address][:eMailList][0] unless intObj[:address].empty?
- json.organization type == 'person' ? intObj[:orgName] : nil
+ json.organization type == 'person' ? {:displayText => intObj[:orgName]} : nil
json.primaryLocation do
json.officePhone intObj[:phones].collect { |ph|
- ph[:phoneNumber] if ph[:phoneServiceType] == 'voice' }.reject(&:nil?).first
+ ph[:phoneNumber] if ph[:phoneServiceType] == 'voice'
+ }.reject(&:nil?).first
json.faxPhone intObj[:phones].collect { |ph|
- ph[:phoneNumber] if ph[:phoneServiceType] == 'fax' }.reject(&:nil?).first
+ ph[:phoneNumber] if ph[:phoneServiceType] == 'fax'
+ }.reject(&:nil?).first
+ json.streetAddress do
+ add = intObj[:address]
+ unless [:deliveryPoints].empty?
+ json.line1 add[:deliveryPoints][0]
+ json.line2 add[:deliveryPoints][1]
+ end
+ json.city add[:city]
+ json.state add[:adminArea]
+ json.zip add[:postalCode]
+ json.country add[:country]
+ end unless intObj[:address].empty?
end
- json.streetAddress do
- add = intObj[:address]
- unless[:deliveryPoints].empty?
- json.line1 add[:deliveryPoints][0]
- json.line2 add[:deliveryPoints][1]
- end
- json.city add[:city]
- json.state add[:adminArea]
- json.zip add[:postalCode]
- json.country add[:country]
- end unless intObj[:address].empty?
end
end
end
end
end