lib/isbm_adaptor/channel_management.rb
def create_channel(uri, type, description = nil, tokens = {})
      validate_presence_of uri, 'Channel URI'
      validate_presence_of type, 'Channel Type'
      channel_type = type.to_s.downcase.capitalize
      validate_inclusion_in channel_type, IsbmAdaptor::Channel::TYPES, 'Channel Type'

      message = { 'ChannelURI' => uri,
                  'ChannelType' => channel_type }
      message['ChannelDescription'] = description unless description.nil?
      message['SecurityToken'] = security_token_hash(tokens) if tokens.any?

      @client.call(:create_channel, message: message)

      return true
    end
def create_channel(uri, type, description = nil, tokens = {})
      validate_presence_of uri, 'Channel URI'
      validate_presence_of type, 'Channel Type'
      channel_type = type.to_s.downcase.capitalize
      validate_inclusion_in channel_type, IsbmAdaptor::Channel::TYPES, 'Channel Type'

      message = { 'ChannelURI' => uri,
                  'ChannelType' => channel_type }
      message['ChannelDescription'] = description unless description.nil?
      message['SecurityToken'] = security_token_hash(tokens) if tokens.any?

      @client.call(:create_channel, message: message)

      return true
    end
Creates a new ISBM ChannelManagement client.

 @param endpoint [String] the SOAP endpoint URI
 @option options [Array<String>] :wsse_auth username and password, i.e. [username, password]
 @option options [Object] :logger (Rails.logger or $stdout) location where log should be output
 @option options [Boolean] :log (true) specify whether requests are logged
 @option options [Boolean] :pretty_print_xml (false) specify whether request and response XML are formatted
 Creates a new channel.

 @param uri [String] the channel URI
 @param type [Symbol] the channel type, either publication or request (symbol or titleized string)
 @param description [String] the channel description, defaults to nil
 @param tokens [Hash] username password pairs, e.g. {'u1' => 'p1', 'u2' => 'p2'}
 @return [void]
 @raise [ArgumentError] if uri or type are blank or type is not a valid Symbol