Sha256: cfa729facc793e680e5d2034abd9b5706035bf052c2fa14fce4528fe2e2a7a9b

Contents?: true

Size: 1.6 KB

Versions: 15

Compression:

Stored size: 1.6 KB

Contents

module Lumberg
  module Cpanel
    class AddonDomain < Base
      # Public: Delete an addon domain. This will also remove the corresponding
      # subdomain and FTP account.
      #
      # options - Hash options for API call params (default: {}):
      #   :domain    - String addon domain to be deleted.
      #   :subdomain - String adddon domain's username followed by "_", then
      #                the addon domain's main domain, e.g.,
      #                "user_addon.com"
      #
      # Returns Hash API response.
      def remove(options = {})
        perform_request({
          api_function: "deladdondomain"
        }.merge(options))
      end

      # Public: Add an addon domain with a coresponding subdomain.
      #
      # options - Hash options for API call params (default: {}):
      #  :dir       - String path for addon domain docroot.
      #  :newdomain - String domain to use for addon domain.
      #  :subdomain - String subdomain / FTP username corresponding to new
      #               addon domain, e.g., "user".
      #
      # Returns Hash API response.
      def add(options = {})
        perform_request({
          api_function: "addaddondomain"
        }.merge(options))
      end

      # Public: Get a list of addon domains.
      #
      # options - Hash options for API call params (default: {}):
      #  :regex - String regular expression to filter search results
      #           (optional).
      #
      # Returns Hash API response.
      def list(options={})
        perform_request({
          api_function: "listaddondomains"
        }.merge(options))
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
lumberg-4.1.0 lib/lumberg/cpanel/addon_domain.rb
lumberg-4.0.0 lib/lumberg/cpanel/addon_domain.rb
lumberg-3.1.0 lib/lumberg/cpanel/addon_domain.rb
lumberg-3.0.0 lib/lumberg/cpanel/addon_domain.rb
lumberg-2.0.1 lib/lumberg/cpanel/addon_domain.rb
lumberg-2.0.0 lib/lumberg/cpanel/addon_domain.rb
lumberg-2.0.0.pre20 lib/lumberg/cpanel/addon_domain.rb
lumberg-2.0.0.pre18 lib/lumberg/cpanel/addon_domain.rb
lumberg-2.0.0.pre15 lib/lumberg/cpanel/addon_domain.rb
lumberg-2.0.0.pre12 lib/lumberg/cpanel/addon_domain.rb
lumberg-2.0.0.pre9 lib/lumberg/cpanel/addon_domain.rb
lumberg-2.0.0.pre8 lib/lumberg/cpanel/addon_domain.rb
lumberg-2.0.0.pre7 lib/lumberg/cpanel/addon_domain.rb
lumberg-2.0.0.pre6 lib/lumberg/cpanel/addon_domain.rb
lumberg-2.0.0.pre5 lib/lumberg/cpanel/addon_domain.rb