Class: MooMoo::Provisioning
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- MooMoo::Provisioning
- Defined in:
- lib/moo_moo/services/provisioning.rb
Instance Attribute Summary
Attributes inherited from BaseCommand
#host, #key, #password, #port, #response, #username
Instance Method Summary collapse
-
#cancel_order ⇒ Object
Cancels a Trust Service order.
-
#cancel_pending_orders ⇒ Object
Cancels orders with a status of pending or declined.
-
#modify ⇒ Object
Changes information associated with a domain, such as contact info.
-
#process_pending ⇒ Object
Processes or cancels pending orders; also applicable to any order that is declined.
-
#register_trust_service ⇒ Object
Submits a new registration request or transfer order.
-
#renew ⇒ Object
Renews a domain and allows you to set the auto-renewal flag on a domain.
-
#revoke ⇒ Object
Removes the domain at the registry.
-
#sw_register ⇒ Object
Submits a new domain registration or transfer order that obeys the Reseller’s ‘process immediately’ flag setting.
-
#update_contact(domain, contact_attributes) ⇒ Object
Updates contact information for a domain using modify.
-
#update_contacts ⇒ Object
Submits a domain-contact information update to the OpenSRS system.
Methods inherited from BaseCommand
#attributes, #initialize, #message, register_service, #successful?
Constructor Details
This class inherits a constructor from MooMoo::BaseCommand
Instance Method Details
#cancel_order ⇒ Object
Cancels a Trust Service order
6 |
# File 'lib/moo_moo/services/provisioning.rb', line 6 register_service :cancel_order, :trust_service |
#cancel_pending_orders ⇒ Object
Cancels orders with a status of pending or declined.
12 |
# File 'lib/moo_moo/services/provisioning.rb', line 12 register_service :cancel_pending_orders, :order |
#modify ⇒ Object
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.
20 |
# File 'lib/moo_moo/services/provisioning.rb', line 20 register_service :modify, :domain |
#process_pending ⇒ Object
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.
28 |
# File 'lib/moo_moo/services/provisioning.rb', line 28 register_service :process_pending, :domain |
#register_trust_service ⇒ Object
Submits a new registration request or transfer order
60 |
# File 'lib/moo_moo/services/provisioning.rb', line 60 register_service :register_trust_service, :trust_service |
#renew ⇒ Object
Renews a domain and allows you to set the auto-renewal flag on a domain.
34 |
# File 'lib/moo_moo/services/provisioning.rb', line 34 register_service :renew, :domain |
#revoke ⇒ Object
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.
41 |
# File 'lib/moo_moo/services/provisioning.rb', line 41 register_service :revoke, :domain |
#sw_register ⇒ Object
Submits a new domain registration or transfer order that obeys the Reseller’s ‘process immediately’ flag setting.
www.opensrs.com/docs/apidomains/sw_register.htm Note: Requirements vary depending on TLD
56 |
# File 'lib/moo_moo/services/provisioning.rb', line 56 register_service :sw_register, :domain |
#update_contact(domain, contact_attributes) ⇒ Object
Updates contact information for a domain using modify.
-
:domain
- the domain to update for. E.g.: “domain1.com” -
:attributes
- a contact attributes hash like:{ type: "type", # admin, billing, etc first_name: "first_name", last_name: "last_name" ... other attributes ... }
In case of errors, an errors array like this will be returned:
["Error1", "Error2"]
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/moo_moo/services/provisioning.rb', line 77 def update_contact(domain, contact_attributes) contact_set = { contact_attributes[:type] => contact_attributes } # Removes the type key from contact_attributes contact_set[contact_attributes[:type]].delete(:type) response = api_modify(params_with_domain(domain).merge({ :attributes => { :affect_domains => "0", :data => "contact_info", :contact_set => contact_set } })) if successful? response else attributes["details"][domain]["response_text"].split("\n") end end |
#update_contacts ⇒ Object
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.
48 |
# File 'lib/moo_moo/services/provisioning.rb', line 48 register_service :update_contacts, :domain |