lib/postini/automated_batch_service.rb
# Modify a domain by moving it to a new organization, setting or
# removing aliases, or enabling/disabling subdomain
# stripping. Changes are passed as a hash with the following keys:
#
# :org => string - New organization to move domain to
# :substrip => bool - New new value for substrip
# :aliases => array - Add new domain aliases to the array, to
#             remove an existing domain alias prepend the name
#             with a hyphen (-)
Modify a domain by moving it to a new organization, setting or
removing aliases, or enabling/disabling subdomain
stripping. Changes are passed as a hash with the following keys.

:org => string - New organization to move domain to
:substrip => bool - New new value for substrip
:aliases => array - Add new domain aliases to the array, to
remove an existing domain alias prepend the name
with a hyphen (-)
Modify a domain by moving it to a new organization setting or removing aliases or enabling / disabling subdomain stripping . Changes are passed as a hash with the following keys . : org = > string - New organization to move domain to : substrip = > bool - New new value for substrip : aliases = > array - Add new domain aliases to the array to remove an existing domain alias prepend the name with a hyphen ( - )
def modify_domain( name, changes = {} )
      valid_changes = {}
      valid_changes['neworg'] = changes[:org] if changes.has_key?(:org)
      if changes.has_key?(:substrip)
        valid_changes['substrip'] = ( changes[:substrip] == true ? 'yes' : 'no' )
      end
      valid_changes['alias'] = changes[:aliases].to_a.join(', ') if changes.has_key?(:aliases)
      response = invoke("aut:modifydomain") do |message|
        build_auth!( message )
        message.add('domainNameOrId', name)
        message.add('domainModifications') do |mods|
          valid_changes.each do |k,v|
            mods.add( k, v )
          end
        end
      end
      display_domain( name )
    end
def modify_domain ( name , changes = { } ) valid_changes = { } valid_changes [ 'neworg' ] = changes [ :org ] if changes . has_key? ( :org ) if changes . has_key? ( :substrip ) valid_changes [ 'substrip' ] = ( changes [ :substrip ] == true ? 'yes' : 'no' ) end valid_changes [ 'alias' ] = changes [ :aliases ] . to_a . join ( ', ' ) if changes . has_key? ( :aliases ) response = invoke ( "aut:modifydomain" ) do | message | build_auth! ( message ) message . add ( 'domainNameOrId' , name ) message . add ( 'domainModifications' ) do | mods | valid_changes . each do | k , v | mods . add ( k , v ) end end end display_domain ( name ) end
Modify a domain by moving it to a new organization, setting or
removing aliases, or enabling/disabling subdomain
stripping.
Modify a domain by moving it to a new organization setting or removing aliases or enabling / disabling subdomain stripping .
name
<not_specific>
changes
<not_specific>