lib/sepa/response.rb
# Returns the content of the response according to {#command}. When command is `:download_file`,
# content is returned as a base64 encoded string, when {#command} is `:download_file_list`, the
# content is returned as xml, when {#command} is `:get_user_info`, the content is returned as xml
# and when {#command} is `:upload_file`, content is returned as xml
#
# @return [String] the content as xml or base64 encoded string
Returns the content of the response according to {#command}.
Returns the content of the response according to { #command } .
def content
      @content ||= begin
        xml = xml_doc(application_response)
        case @command
        when :download_file
          content_node = xml.at('xmlns|Content', xmlns: XML_DATA)
          content_node.content if content_node
        when :download_file_list
          content_node = xml.remove_namespaces!.at('FileDescriptors')
          content_node.to_xml if content_node
        when :get_user_info
          canonicalized_node(xml, XML_DATA, 'UserFileTypes')
        when :upload_file
          signature_node = xml.at('xmlns|Signature', xmlns: DSIG)
          if signature_node
            signature_node.remove
            xml.canonicalize
          end
        end
      end
    end
def content @content ||= begin xml = xml_doc ( application_response ) case @command when :download_file content_node = xml . at ( 'xmlns|Content' , xmlns : XML_DATA ) content_node . content if content_node when :download_file_list content_node = xml . remove_namespaces! . at ( 'FileDescriptors' ) content_node . to_xml if content_node when :get_user_info canonicalized_node ( xml , XML_DATA , 'UserFileTypes' ) when :upload_file signature_node = xml . at ( 'xmlns|Signature' , xmlns : DSIG ) if signature_node signature_node . remove xml . canonicalize end end end end
Returns the content of the response according to {#command}.
Returns the content of the response according to { #command } .
the content as xml or base64 encoded string
the content as xml or base64 encoded string
String