class Libis::Services::Rosetta::User
Constants
- RECORD_TYPE
- USER_ROLES_STATUS
- USER_STATUS
- USER_TYPE
Public Class Methods
from_xml(xml)
click to toggle source
# File lib/libis/services/rosetta/user.rb, line 57 def self.from_xml(xml) xml_doc = Libis::Tools::XmlDocument.parse(xml) hash = xml_doc.to_hash( strip_namespaces: true, delete_namespace_attributes: true, empty_tag_value: nil, convert_tags_to: lambda(&:to_sym) ) # noinspection RubyArgCount self.new(hash[:producer_info]) end
Public Instance Methods
to_hash()
click to toggle source
Calls superclass method
# File lib/libis/services/rosetta/user.rb, line 41 def to_hash super.cleanup end
to_xml()
click to toggle source
# File lib/libis/services/rosetta/user.rb, line 45 def to_xml Libis::Tools::XmlDocument.build do |xml| # noinspection RubyResolve xml.user_info { xml.parent.default_namespace = 'http://www.exlibrisgroup.com/xsd/dps/backoffice/service' self.attributes.each do |name, value| xml.send(name, xmlns: '') { xml.text(value) } if value end } end.to_xml end