Class: CPS::Domain

Inherits:
Object
  • Object
show all
Defined in:
lib/cps-client/domain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Domain

Returns a new instance of Domain.



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/cps-client/domain.rb', line 6

def initialize(options = {})
  @domain    = options[:domain].downcase.to_punycode
  @adminc    = options[:adminc]
  @techc     = options[:techc]
  @billc     = options[:billc]
  @ownerc    = options[:ownerc]
  @ns1       = options[:ns1]
  @ns2       = options[:ns2]
  @reg_type  = options[:reg_type]  ||= 'transfer'
  @auth_info = options[:auth_info] ||= ''
  @attribute = options[:attribute] ||= 'domain'
  @transfer_lock = options[:transfer_lock] ||= 'active' # active|disabled
end

Instance Attribute Details

#domainObject (readonly)

Returns the value of attribute domain.



4
5
6
# File 'lib/cps-client/domain.rb', line 4

def domain
  @domain
end

Instance Method Details

#createObject



20
21
22
# File 'lib/cps-client/domain.rb', line 20

def create
  ErbHelper.build("domain_create", self)
end

#deleteObject



40
41
42
# File 'lib/cps-client/domain.rb', line 40

def delete
  ErbHelper.build("domain_delete", self)
end

#get_bindingObject

this is only a helper method to access the objects binding method



45
46
47
# File 'lib/cps-client/domain.rb', line 45

def get_binding
  binding
end

#infoObject



24
25
26
# File 'lib/cps-client/domain.rb', line 24

def info
  ErbHelper.build("domain_info", self)
end

#modifyObject



36
37
38
# File 'lib/cps-client/domain.rb', line 36

def modify
  ErbHelper.build("domain_modify", self)
end

#transferObject



28
29
30
# File 'lib/cps-client/domain.rb', line 28

def transfer
  ErbHelper.build("domain_transfer", self)
end

#transfer_lockObject



32
33
34
# File 'lib/cps-client/domain.rb', line 32

def transfer_lock
  ErbHelper.build("domain_transfer_lock", self)
end