Sha256: 253e7ccf1d69fabb8412916b9a87a463d157690bf28202949a3ec2145505c3a3

Contents?: true

Size: 1.61 KB

Versions: 2

Compression:

Stored size: 1.61 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

2 entries across 2 versions & 1 rubygems

Version Path
lumberg-2.0.0.pre4 lib/lumberg/cpanel/addon_domain.rb
lumberg-2.0.0.pre3 lib/lumberg/cpanel/addon_domain.rb