Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

Commit

Permalink
Documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiokr committed Feb 13, 2012
1 parent fd0e89e commit e6fca73
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 38 deletions.
9 changes: 4 additions & 5 deletions lib/moo_moo/cookie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module MooMoo
class Cookie < Base

##
# Creates a cookie for a domain
# Creates a cookie for use in commands where a cookie is required to access OpenSRS.
#
# ==== Required
# * <tt>:username</tt> - username of the registrant
Expand All @@ -11,14 +11,14 @@ class Cookie < Base
register_service :set, :cookie

##
# Deletes a cookie that was previously set
# Deletes a cookie.
#
# ==== Required
# * <tt>:cookie</tt> - cookie to delete
register_service :delete, :cookie

##
# Updates a cookie to be valid for a different domain
# Allows the client to change the domain associated with the current cookie.
#
# ==== Required
# * <tt>:old_domain</tt> - domain the cookie is currently set for
Expand All @@ -27,8 +27,7 @@ class Cookie < Base
register_service :update, :cookie

##
# Cleanly terminates the connection
#
# Cleanly terminates the connection.
register_service :quit_session, :session, :quit
end
end
40 changes: 26 additions & 14 deletions lib/moo_moo/lookup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,29 @@ module MooMoo
class Lookup < Base

##
# Determines whether a domain belongs to the reseller
# Determines whether the domain belongs to the RSP who issued the command.
#
# ==== Required
# * <tt>:domain</tt> - domain to check ownership of
register_service :belongs_to_rsp, :domain

##
# Returns the balance of the reseller's account
#
# Queries the requester's account, and returns the total amount of money in the account and
# the amount that is allocated to pending transactions.
register_service :get_balance, :balance

##
# Lists domains that have been deleted due to expiration or request
#
# Lists domains that have been deleted due to expiration or deleted by request (revoked).
# This command applies to all domains in a Reseller's profile. Results include the domain,
# status, and deleted date.
register_service :get_deleted_domains, :domain

##
# Queries various types of data associated with a domain
# Queries various types of data regarding the user's domain. For example, the all_info type
# allows you to retrieve all data for the domain linked to the current cookie. The list type
# queries the list of domains associated with the user's profile. The list type can also be
# used to return a list of domains that expire within a specified range. The nameservers type
# returns the nameservers currently acting as DNS servers for the domain.
#
# ==== Required
# * <tt>:domain</tt> - domain to query
Expand All @@ -30,43 +35,48 @@ class Lookup < Base
register_service :get_domain, :domain, :get

##
# Queries contact information for a list of domains
# Queries contact information for a list of domains.
#
# ==== Required
# * <tt>:domains</tt> - domains to get contact information for
register_service :get_domains_contacts, :domain

##
# Queries the domains expiring within the specified date range
# Retrieves domains that expire within a specified date range.
#
# ==== Required
# * <tt>:start_date</tt> - beginning date of the expiration range
# * <tt>:end_date</tt> - ending date of the expiration range
register_service :get_domains_by_expiredate, :domain

##
# Retrieves the domain notes that detail the history of the domain (renewals, transfers, etc.)
# Retrieves the domain notes that detail the history of the domain, for example, renewals and
# transfers.
#
# ==== Required
# * <tt>:domain</tt> - domain to get the notes for
register_service :get_notes, :domain

##
# Queries all information related to an order
# Queries all the information for an order, but does not return sensitive information such as
# username, password, and Authcode.
#
# ==== Required
# * <tt>:order_id</tt> - ID of the order
register_service :get_order_info, :domain

##
# Retrieves information about orders placed for a specific domain
# Retrieves information about orders placed for a specific domain.
#
# ==== Required
# * <tt>:domain</tt> - domain to get orders for
register_service :get_orders_by_domain, :domain

##
# Queries the price of a domain
# Queries the price of a domain, and can be used to determine the cost of a billable transaction
# for any TLD. A returned price for a given domain does not guarantee the availability of the
# domain, but indicates that the requested action is supported by the system and calculates the
# cost to register the domain (if available).
#
# ==== Required
# * <tt>:domain</tt> - domain to query the price of
Expand All @@ -80,14 +90,16 @@ class Lookup < Base
register_service :get_product_info, :trust_service

##
# Determines the availability of a domain
# Determines the availability of a specified domain name.
#
# ==== Required
# * <tt>:domain</tt> - domain to check availability of
register_service :lookup_domain, :domain, :lookup

##
# Provides suggestions for a domain name for the specified TLDs
# Checks whether a specified name, word, or phrase is available for registration in gTLDs and
# ccTLDs, suggests other similar domain names for .COM, .NET, .ORG, .INFO, .BIZ, .US, and .MOBI
# domains, and checks whether they are available. Reseller must be enabled for the specified TLDs.
#
# ==== Required
# * <tt>:domain</tt> - domain
Expand Down
9 changes: 5 additions & 4 deletions lib/moo_moo/nameserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module MooMoo
class Nameserver < Base

##
# Creates a nameserver
# Creates a nameserver in the same domain space as the cookie's domain.
#
# ==== Required
# * <tt>:name</tt> - name of the nameserver
Expand All @@ -14,7 +14,7 @@ class Nameserver < Base
register_service :create, :nameserver

##
# Deletes a nameserver
# Deletes a nameserver.
#
# ==== Required
# * <tt>:name</tt> - name of the nameserver
Expand All @@ -26,14 +26,15 @@ class Nameserver < Base
register_service :delete, :nameserver

##
# Queries nameservers that exist for the given domain
# Queries nameservers that exist in the current user profile (current cookie). These nameservers
# may or may not be currently assigned to a domain.
#
# ==== Required
# * <tt>:domain</tt> - domain profile to query
register_service :get, :nameserver

##
# Renames a nameserver
# Renames a nameserver.
#
# ==== Required
# * <tt>:name</tt> - current name of the nameserver
Expand Down
21 changes: 14 additions & 7 deletions lib/moo_moo/provisioning.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ class Provisioning < Base
register_service :cancel_order, :trust_service

##
# Cancels pending or declined orders
# Cancels orders with a status of pending or declined.
#
# ==== Required
# * <tt>:to_date</tt> - date before which to cancel orders
register_service :cancel_pending_orders, :order

##
# Changes information associated with a domain
# Changes information associated with a domain, such as contact info. The action request message
# is different depending on the type of modification being made, and is shown separately for each
# type.
#
# ==== Required
# * <tt>:type</tt> - type of data to modify
Expand All @@ -27,14 +29,16 @@ class Provisioning < Base
register_service :modify, :domain

##
# Processes or cancels a pending order
# Processes or cancels pending orders; also applicable to any order that is declined. The order
# is cancelled and a new order is created. Can also be used to process cancelled orders, provided
# the cancelled order was a new order or a transfer.
#
# ==== Required
# * <tt>:order_id</tt> - ID of the pending order to process
register_service :process_pending, :domain

##
# Renews a domain name
# Renews a domain and allows you to set the auto-renewal flag on a domain.
#
# ==== Required
# * <tt>:domain</tt> - domain name to renew
Expand All @@ -43,15 +47,17 @@ class Provisioning < Base
register_service :renew_domain, :domain, :renew

##
# Removes the domain at the registry
# Removes the domain at the registry. Use this command to request a refund for a domain purchase.
# This call can refund/revoke only one domain at the time.
#
# ==== Required
# * <tt>:domain</tt> - domain name to remove
# * <tt>:reseller</tt> - username of the reseller
register_service :revoke, :domain

##
# Submits a domain contact information update
# Submits a domain-contact information update to the OpenSRS system. Each contact object is
# submitted as a whole to OpenSRS, and changes are parsed against the existing information.
#
# ==== Required
# * <tt>:domain</tt> - domain name to update the contacts of
Expand All @@ -60,7 +66,8 @@ class Provisioning < Base
register_service :update_contacts, :domain

##
# Submits a new registration request or transfer order
# Submits a new domain registration or transfer order that obeys the Reseller's 'process
# immediately' flag setting.
#
# ==== Required
# * <tt>:domain</tt> - domain name to register
Expand Down
23 changes: 15 additions & 8 deletions lib/moo_moo/transfer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module MooMoo
class Transfer < Base

##
# Cancels a transfer that is pending owner approval
# Cancels transfers that are pending owner approval.
#
# ==== Required
# * <tt>:domain</tt> - domain name that is being transferred
Expand All @@ -18,38 +18,45 @@ class Transfer < Base
register_service :cancel_transfer_for_order, :transfer

##
# Checks to see if the given domain can be transferred
# Checks to see if the specified domain can be transferred in to OpenSRS, or transferred from one
# OpenSRS Reseller to another. This call can also be used to check the status of the last transfer
# request on a given domain name.
#
# ==== Required
# * <tt>:domain</tt> - domain name to check
register_service :check_transfer, :domain

##
# Lists all domains that have been transferred away
#
# Lists domains that have been transferred away. This command applies to all domains in a
# Reseller's profile.
register_service :get_transfers_away, :domain

##
# Lists all domains that have been transferred in
# Lists domains that have been transferred in. This command applies to all domains in a Reseller's
# profile.
register_service :get_transfers_in, :domain

##
# Creates a new order with the same data as a cancelled order
# Creates a new order with the same data as a cancelled order; the existing cancelled order is
# not modified. This command is only available for failed transfers with the status of 'cancelled'.
#
# ==== Required
# * <tt>:order_id</tt> - ID of the cancelled order
# * <tt>:reseller</tt> - username of the reseller
register_service :process_transfer, :transfer

##
# Resends an e-mail to the admin contact for the transfer that is in 'pending owner approval' state
# Resends an email message for a transfer that is in 'pending owner approval' state, to the admin
# contact listed for the domain at the time that the transfer request was submitted. If a transfer
# is currently in progress, but in a different state, an error is returned.
#
# ==== Required
# * <tt>:domain</tt> - domain name being transferred
register_service :send_password, :transfer

##
# Transfers a domain name from one reseller to another
# Transfer a domain from one Reseller to another Reseller. The domain is not renewed when it is
# transferred and so no charges are incurred.
#
# ==== Required
# * <tt>:domain</tt> - domain name to transfer
Expand Down

0 comments on commit e6fca73

Please sign in to comment.