gandirb 1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +1 -0
- data/LICENSE +19 -0
- data/README +35 -0
- data/Rakefile +32 -0
- data/gandirb.gemspec +34 -0
- data/lib/gandi/base.rb +121 -0
- data/lib/gandi/domain.rb +134 -0
- data/lib/gandi/domain_modules/contact.rb +36 -0
- data/lib/gandi/domain_modules/host.rb +29 -0
- data/lib/gandi/domain_modules/mail.rb +80 -0
- data/lib/gandi/domain_modules/name_servers.rb +28 -0
- data/lib/gandi/domain_modules/operations.rb +30 -0
- data/lib/gandi/domain_modules/redirection.rb +25 -0
- data/lib/gandi.rb +9 -0
- data/rdoc/classes/Gandi/Base.html +397 -0
- data/rdoc/classes/Gandi/DataError.html +111 -0
- data/rdoc/classes/Gandi/Domain.html +623 -0
- data/rdoc/classes/Gandi/DomainModules/Contact.html +246 -0
- data/rdoc/classes/Gandi/DomainModules/Host.html +227 -0
- data/rdoc/classes/Gandi/DomainModules/NameServers.html +226 -0
- data/rdoc/classes/Gandi/DomainModules/Operations.html +229 -0
- data/rdoc/classes/Gandi/DomainModules/Redirection.html +215 -0
- data/rdoc/classes/Gandi/DomainModules.html +136 -0
- data/rdoc/classes/Gandi/ServerError.html +111 -0
- data/rdoc/classes/Gandi.html +153 -0
- data/rdoc/created.rid +1 -0
- data/rdoc/files/README.html +162 -0
- data/rdoc/files/lib/gandi/base_rb.html +109 -0
- data/rdoc/files/lib/gandi/domain_modules/contact_rb.html +101 -0
- data/rdoc/files/lib/gandi/domain_modules/host_rb.html +101 -0
- data/rdoc/files/lib/gandi/domain_modules/name_servers_rb.html +101 -0
- data/rdoc/files/lib/gandi/domain_modules/operations_rb.html +101 -0
- data/rdoc/files/lib/gandi/domain_modules/redirection_rb.html +101 -0
- data/rdoc/files/lib/gandi/domain_rb.html +101 -0
- data/rdoc/files/lib/gandi_rb.html +101 -0
- data/rdoc/fr_class_index.html +38 -0
- data/rdoc/fr_file_index.html +36 -0
- data/rdoc/fr_method_index.html +83 -0
- data/rdoc/index.html +24 -0
- data/rdoc/rdoc-style.css +208 -0
- data/test/gandi/base_test.rb +188 -0
- data/test/gandi/domain_test.rb +302 -0
- data/test/gandi_test.rb +9 -0
- data/test/test_helper.rb +9 -0
- metadata +124 -0
@@ -0,0 +1,623 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Gandi::Domain</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Gandi::Domain</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/gandi/domain_rb.html">
|
59
|
+
lib/gandi/domain.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
<a href="Base.html">
|
69
|
+
Gandi::Base
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div id="method-list">
|
88
|
+
<h3 class="section-bar">Methods</h3>
|
89
|
+
|
90
|
+
<div class="name-list">
|
91
|
+
<a href="#M000034">domain_available</a>
|
92
|
+
<a href="#M000048">domain_change_contact</a>
|
93
|
+
<a href="#M000047">domain_change_owner</a>
|
94
|
+
<a href="#M000039">domain_create</a>
|
95
|
+
<a href="#M000041">domain_del</a>
|
96
|
+
<a href="#M000037">domain_info</a>
|
97
|
+
<a href="#M000033">domain_list</a>
|
98
|
+
<a href="#M000035">domain_lock</a>
|
99
|
+
<a href="#M000038">domain_renew</a>
|
100
|
+
<a href="#M000040">domain_restore</a>
|
101
|
+
<a href="#M000046">domain_trade</a>
|
102
|
+
<a href="#M000044">domain_transfer_in</a>
|
103
|
+
<a href="#M000042">domain_transfer_in_available</a>
|
104
|
+
<a href="#M000043">domain_transfer_in_available?</a>
|
105
|
+
<a href="#M000045">domain_transfer_out</a>
|
106
|
+
<a href="#M000036">domain_unlock</a>
|
107
|
+
<a href="#M000049">tld_list</a>
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
|
111
|
+
</div>
|
112
|
+
|
113
|
+
|
114
|
+
<!-- if includes -->
|
115
|
+
<div id="includes">
|
116
|
+
<h3 class="section-bar">Included Modules</h3>
|
117
|
+
|
118
|
+
<div id="includes-list">
|
119
|
+
<span class="include-name"><a href="DomainModules/NameServers.html">Gandi::DomainModules::NameServers</a></span>
|
120
|
+
<span class="include-name"><a href="DomainModules/Host.html">Gandi::DomainModules::Host</a></span>
|
121
|
+
<span class="include-name"><a href="DomainModules/Redirection.html">Gandi::DomainModules::Redirection</a></span>
|
122
|
+
<span class="include-name"><a href="DomainModules/Contact.html">Gandi::DomainModules::Contact</a></span>
|
123
|
+
<span class="include-name"><a href="DomainModules/Operations.html">Gandi::DomainModules::Operations</a></span>
|
124
|
+
<span class="include-name"><a href="DomainModules/Mail.html">Gandi::DomainModules::Mail</a></span>
|
125
|
+
</div>
|
126
|
+
</div>
|
127
|
+
|
128
|
+
<div id="section">
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
<!-- if method_list -->
|
138
|
+
<div id="methods">
|
139
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
140
|
+
|
141
|
+
<div id="method-M000034" class="method-detail">
|
142
|
+
<a name="M000034"></a>
|
143
|
+
|
144
|
+
<div class="method-heading">
|
145
|
+
<a href="#M000034" class="method-signature">
|
146
|
+
<span class="method-name">domain_available</span><span class="method-args">(domains)</span>
|
147
|
+
</a>
|
148
|
+
</div>
|
149
|
+
|
150
|
+
<div class="method-description">
|
151
|
+
<p>
|
152
|
+
Check a domain availability. This implementation does not respect the
|
153
|
+
original API specifications and allow for a single domain to be checked. In
|
154
|
+
this case the domain can be provided as a string and a boolean will be
|
155
|
+
returned.
|
156
|
+
</p>
|
157
|
+
<p><a class="source-toggle" href="#"
|
158
|
+
onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
|
159
|
+
<div class="method-source-code" id="M000034-source">
|
160
|
+
<pre>
|
161
|
+
<span class="ruby-comment cmt"># File lib/gandi/domain.rb, line 20</span>
|
162
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domain_available</span>(<span class="ruby-identifier">domains</span>)
|
163
|
+
<span class="ruby-identifier">available_domains</span> = <span class="ruby-identifier">call</span>(<span class="ruby-value str">'domain_available'</span>, <span class="ruby-identifier">domains</span>.<span class="ruby-identifier">to_a</span>)
|
164
|
+
<span class="ruby-keyword kw">return</span> (<span class="ruby-identifier">domains</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)) <span class="ruby-operator">?</span> <span class="ruby-identifier">available_domains</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">available_domains</span>
|
165
|
+
<span class="ruby-keyword kw">end</span>
|
166
|
+
</pre>
|
167
|
+
</div>
|
168
|
+
</div>
|
169
|
+
</div>
|
170
|
+
|
171
|
+
<div id="method-M000048" class="method-detail">
|
172
|
+
<a name="M000048"></a>
|
173
|
+
|
174
|
+
<div class="method-heading">
|
175
|
+
<a href="#M000048" class="method-signature">
|
176
|
+
<span class="method-name">domain_change_contact</span><span class="method-args">(domain, type, new_contact)</span>
|
177
|
+
</a>
|
178
|
+
</div>
|
179
|
+
|
180
|
+
<div class="method-description">
|
181
|
+
<p>
|
182
|
+
Change a given contact of a domain registered with <a
|
183
|
+
href="../Gandi.html">Gandi</a>. Return the operation attributed ID
|
184
|
+
</p>
|
185
|
+
<p><a class="source-toggle" href="#"
|
186
|
+
onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
|
187
|
+
<div class="method-source-code" id="M000048-source">
|
188
|
+
<pre>
|
189
|
+
<span class="ruby-comment cmt"># File lib/gandi/domain.rb, line 115</span>
|
190
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domain_change_contact</span>(<span class="ruby-identifier">domain</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">new_contact</span>)
|
191
|
+
<span class="ruby-identifier">call</span>(<span class="ruby-value str">'domain_change_contact'</span>, <span class="ruby-identifier">domain</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">new_contact</span>)
|
192
|
+
<span class="ruby-keyword kw">end</span>
|
193
|
+
</pre>
|
194
|
+
</div>
|
195
|
+
</div>
|
196
|
+
</div>
|
197
|
+
|
198
|
+
<div id="method-M000047" class="method-detail">
|
199
|
+
<a name="M000047"></a>
|
200
|
+
|
201
|
+
<div class="method-heading">
|
202
|
+
<a href="#M000047" class="method-signature">
|
203
|
+
<span class="method-name">domain_change_owner</span><span class="method-args">(domain, new_owner, new_admin = nil, new_tech = nil, new_billing = nil)</span>
|
204
|
+
</a>
|
205
|
+
</div>
|
206
|
+
|
207
|
+
<div class="method-description">
|
208
|
+
<p>
|
209
|
+
Change the owner of a domain registered with <a
|
210
|
+
href="../Gandi.html">Gandi</a> and, optionally, the admin, tech and billing
|
211
|
+
contacts. See glossary, Change of Ownership. Return the operation
|
212
|
+
attributed ID This method is not available yet and will be present in v1.10
|
213
|
+
of the API
|
214
|
+
</p>
|
215
|
+
<p><a class="source-toggle" href="#"
|
216
|
+
onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
|
217
|
+
<div class="method-source-code" id="M000047-source">
|
218
|
+
<pre>
|
219
|
+
<span class="ruby-comment cmt"># File lib/gandi/domain.rb, line 109</span>
|
220
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domain_change_owner</span>(<span class="ruby-identifier">domain</span>, <span class="ruby-identifier">new_owner</span>, <span class="ruby-identifier">new_admin</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">new_tech</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">new_billing</span> = <span class="ruby-keyword kw">nil</span>)
|
221
|
+
<span class="ruby-identifier">not_supported</span>
|
222
|
+
<span class="ruby-keyword kw">end</span>
|
223
|
+
</pre>
|
224
|
+
</div>
|
225
|
+
</div>
|
226
|
+
</div>
|
227
|
+
|
228
|
+
<div id="method-M000039" class="method-detail">
|
229
|
+
<a name="M000039"></a>
|
230
|
+
|
231
|
+
<div class="method-heading">
|
232
|
+
<a href="#M000039" class="method-signature">
|
233
|
+
<span class="method-name">domain_create</span><span class="method-args">(domain, period, owner_handle, admin_handle, tech_handle, billing_handle, nameservers, lang = nil)</span>
|
234
|
+
</a>
|
235
|
+
</div>
|
236
|
+
|
237
|
+
<div class="method-description">
|
238
|
+
<p>
|
239
|
+
Register a domain with <a href="../Gandi.html">Gandi</a> and associate it
|
240
|
+
to a list of contacts. Return the operation attributed ID
|
241
|
+
</p>
|
242
|
+
<p><a class="source-toggle" href="#"
|
243
|
+
onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
|
244
|
+
<div class="method-source-code" id="M000039-source">
|
245
|
+
<pre>
|
246
|
+
<span class="ruby-comment cmt"># File lib/gandi/domain.rb, line 55</span>
|
247
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domain_create</span>(<span class="ruby-identifier">domain</span>, <span class="ruby-identifier">period</span>, <span class="ruby-identifier">owner_handle</span>, <span class="ruby-identifier">admin_handle</span>, <span class="ruby-identifier">tech_handle</span>, <span class="ruby-identifier">billing_handle</span>, <span class="ruby-identifier">nameservers</span>, <span class="ruby-identifier">lang</span> = <span class="ruby-keyword kw">nil</span>)
|
248
|
+
<span class="ruby-identifier">args</span> = [<span class="ruby-identifier">domain</span>, <span class="ruby-identifier">period</span>, <span class="ruby-identifier">owner_handle</span>, <span class="ruby-identifier">admin_handle</span>, <span class="ruby-identifier">tech_handle</span>, <span class="ruby-identifier">billing_handle</span>, <span class="ruby-identifier">nameservers</span>, <span class="ruby-identifier">lang</span>]
|
249
|
+
<span class="ruby-identifier">args</span>.<span class="ruby-identifier">pop</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lang</span>.<span class="ruby-identifier">nil?</span>
|
250
|
+
<span class="ruby-identifier">call</span>(<span class="ruby-value str">'domain_create'</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
251
|
+
<span class="ruby-keyword kw">end</span>
|
252
|
+
</pre>
|
253
|
+
</div>
|
254
|
+
</div>
|
255
|
+
</div>
|
256
|
+
|
257
|
+
<div id="method-M000041" class="method-detail">
|
258
|
+
<a name="M000041"></a>
|
259
|
+
|
260
|
+
<div class="method-heading">
|
261
|
+
<a href="#M000041" class="method-signature">
|
262
|
+
<span class="method-name">domain_del</span><span class="method-args">(domain)</span>
|
263
|
+
</a>
|
264
|
+
</div>
|
265
|
+
|
266
|
+
<div class="method-description">
|
267
|
+
<p>
|
268
|
+
Delete a domain. Return the operation attributed ID This method is not
|
269
|
+
available yet and will be present in v1.10 of the API
|
270
|
+
</p>
|
271
|
+
<p><a class="source-toggle" href="#"
|
272
|
+
onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
|
273
|
+
<div class="method-source-code" id="M000041-source">
|
274
|
+
<pre>
|
275
|
+
<span class="ruby-comment cmt"># File lib/gandi/domain.rb, line 72</span>
|
276
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domain_del</span>(<span class="ruby-identifier">domain</span>)
|
277
|
+
<span class="ruby-identifier">not_supported</span>
|
278
|
+
<span class="ruby-keyword kw">end</span>
|
279
|
+
</pre>
|
280
|
+
</div>
|
281
|
+
</div>
|
282
|
+
</div>
|
283
|
+
|
284
|
+
<div id="method-M000037" class="method-detail">
|
285
|
+
<a name="M000037"></a>
|
286
|
+
|
287
|
+
<div class="method-heading">
|
288
|
+
<a href="#M000037" class="method-signature">
|
289
|
+
<span class="method-name">domain_info</span><span class="method-args">(domain)</span>
|
290
|
+
</a>
|
291
|
+
</div>
|
292
|
+
|
293
|
+
<div class="method-description">
|
294
|
+
<p>
|
295
|
+
Retrieve the informations linked to this domain (contacts, nameservers,
|
296
|
+
redirections, weblogs…). This method only works on domains handled by
|
297
|
+
<a href="../Gandi.html">Gandi</a>. Return a hash with string keys
|
298
|
+
containing domain informations (see API documentation) TODO: convert XMLRPC
|
299
|
+
datetimes ?
|
300
|
+
</p>
|
301
|
+
<p><a class="source-toggle" href="#"
|
302
|
+
onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
|
303
|
+
<div class="method-source-code" id="M000037-source">
|
304
|
+
<pre>
|
305
|
+
<span class="ruby-comment cmt"># File lib/gandi/domain.rb, line 41</span>
|
306
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domain_info</span>(<span class="ruby-identifier">domain</span>)
|
307
|
+
<span class="ruby-identifier">call</span>(<span class="ruby-value str">'domain_info'</span>, <span class="ruby-identifier">domain</span>)
|
308
|
+
<span class="ruby-keyword kw">end</span>
|
309
|
+
</pre>
|
310
|
+
</div>
|
311
|
+
</div>
|
312
|
+
</div>
|
313
|
+
|
314
|
+
<div id="method-M000033" class="method-detail">
|
315
|
+
<a name="M000033"></a>
|
316
|
+
|
317
|
+
<div class="method-heading">
|
318
|
+
<a href="#M000033" class="method-signature">
|
319
|
+
<span class="method-name">domain_list</span><span class="method-args">()</span>
|
320
|
+
</a>
|
321
|
+
</div>
|
322
|
+
|
323
|
+
<div class="method-description">
|
324
|
+
<p>
|
325
|
+
Returns an array of domains for which the logged user is the reseller or a
|
326
|
+
contact (owner, administrative, billing or technical). TODO: memoize
|
327
|
+
results
|
328
|
+
</p>
|
329
|
+
<p><a class="source-toggle" href="#"
|
330
|
+
onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
|
331
|
+
<div class="method-source-code" id="M000033-source">
|
332
|
+
<pre>
|
333
|
+
<span class="ruby-comment cmt"># File lib/gandi/domain.rb, line 13</span>
|
334
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domain_list</span>
|
335
|
+
<span class="ruby-identifier">call</span>(<span class="ruby-value str">'domain_list'</span>)
|
336
|
+
<span class="ruby-keyword kw">end</span>
|
337
|
+
</pre>
|
338
|
+
</div>
|
339
|
+
</div>
|
340
|
+
</div>
|
341
|
+
|
342
|
+
<div id="method-M000035" class="method-detail">
|
343
|
+
<a name="M000035"></a>
|
344
|
+
|
345
|
+
<div class="method-heading">
|
346
|
+
<a href="#M000035" class="method-signature">
|
347
|
+
<span class="method-name">domain_lock</span><span class="method-args">(domain)</span>
|
348
|
+
</a>
|
349
|
+
</div>
|
350
|
+
|
351
|
+
<div class="method-description">
|
352
|
+
<p>
|
353
|
+
Add a lock status (cf. <a href="Domain.html#M000037">domain_info</a>) to
|
354
|
+
avoid any fraudulent transfer. Return the operation attributed ID
|
355
|
+
</p>
|
356
|
+
<p><a class="source-toggle" href="#"
|
357
|
+
onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
|
358
|
+
<div class="method-source-code" id="M000035-source">
|
359
|
+
<pre>
|
360
|
+
<span class="ruby-comment cmt"># File lib/gandi/domain.rb, line 27</span>
|
361
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domain_lock</span>(<span class="ruby-identifier">domain</span>)
|
362
|
+
<span class="ruby-identifier">call</span>(<span class="ruby-value str">'domain_lock'</span>, <span class="ruby-identifier">domain</span>)
|
363
|
+
<span class="ruby-keyword kw">end</span>
|
364
|
+
</pre>
|
365
|
+
</div>
|
366
|
+
</div>
|
367
|
+
</div>
|
368
|
+
|
369
|
+
<div id="method-M000038" class="method-detail">
|
370
|
+
<a name="M000038"></a>
|
371
|
+
|
372
|
+
<div class="method-heading">
|
373
|
+
<a href="#M000038" class="method-signature">
|
374
|
+
<span class="method-name">domain_renew</span><span class="method-args">(domain, period)</span>
|
375
|
+
</a>
|
376
|
+
</div>
|
377
|
+
|
378
|
+
<div class="method-description">
|
379
|
+
<p>
|
380
|
+
Renew a domain for a number of years. The total number of years cannot
|
381
|
+
exceed 10. Return the operation attributed ID
|
382
|
+
</p>
|
383
|
+
<p><a class="source-toggle" href="#"
|
384
|
+
onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
|
385
|
+
<div class="method-source-code" id="M000038-source">
|
386
|
+
<pre>
|
387
|
+
<span class="ruby-comment cmt"># File lib/gandi/domain.rb, line 48</span>
|
388
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domain_renew</span>(<span class="ruby-identifier">domain</span>, <span class="ruby-identifier">period</span>)
|
389
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"The total number of years cannot exceed 10"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">period</span> <span class="ruby-operator">></span> <span class="ruby-value">10</span>
|
390
|
+
<span class="ruby-identifier">call</span>(<span class="ruby-value str">'domain_renew'</span>, <span class="ruby-identifier">domain</span>, <span class="ruby-identifier">period</span>)
|
391
|
+
<span class="ruby-keyword kw">end</span>
|
392
|
+
</pre>
|
393
|
+
</div>
|
394
|
+
</div>
|
395
|
+
</div>
|
396
|
+
|
397
|
+
<div id="method-M000040" class="method-detail">
|
398
|
+
<a name="M000040"></a>
|
399
|
+
|
400
|
+
<div class="method-heading">
|
401
|
+
<a href="#M000040" class="method-signature">
|
402
|
+
<span class="method-name">domain_restore</span><span class="method-args">(domain)</span>
|
403
|
+
</a>
|
404
|
+
</div>
|
405
|
+
|
406
|
+
<div class="method-description">
|
407
|
+
<p>
|
408
|
+
Get a domain out of its redemption period. See glossary, Restore. This
|
409
|
+
function is available for domains in .COM, .NET, .BE or .EU. Return the
|
410
|
+
operation attributed ID TODO: Check for domain correctness
|
411
|
+
</p>
|
412
|
+
<p><a class="source-toggle" href="#"
|
413
|
+
onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
|
414
|
+
<div class="method-source-code" id="M000040-source">
|
415
|
+
<pre>
|
416
|
+
<span class="ruby-comment cmt"># File lib/gandi/domain.rb, line 65</span>
|
417
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domain_restore</span>(<span class="ruby-identifier">domain</span>)
|
418
|
+
<span class="ruby-identifier">call</span>(<span class="ruby-value str">'domain_restore'</span>, <span class="ruby-identifier">domain</span>)
|
419
|
+
<span class="ruby-keyword kw">end</span>
|
420
|
+
</pre>
|
421
|
+
</div>
|
422
|
+
</div>
|
423
|
+
</div>
|
424
|
+
|
425
|
+
<div id="method-M000046" class="method-detail">
|
426
|
+
<a name="M000046"></a>
|
427
|
+
|
428
|
+
<div class="method-heading">
|
429
|
+
<a href="#M000046" class="method-signature">
|
430
|
+
<span class="method-name">domain_trade</span><span class="method-args">(domain, owner_handle, admin_handle, tech_handle, billing_handle, afnic_titularkey = nil)</span>
|
431
|
+
</a>
|
432
|
+
</div>
|
433
|
+
|
434
|
+
<div class="method-description">
|
435
|
+
<p>
|
436
|
+
Start the trade of a domain from another registrar to <a
|
437
|
+
href="../Gandi.html">Gandi</a>. Return the operation attributed ID This
|
438
|
+
method is not available yet and will be present in v1.10 of the API
|
439
|
+
</p>
|
440
|
+
<p><a class="source-toggle" href="#"
|
441
|
+
onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
|
442
|
+
<div class="method-source-code" id="M000046-source">
|
443
|
+
<pre>
|
444
|
+
<span class="ruby-comment cmt"># File lib/gandi/domain.rb, line 102</span>
|
445
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domain_trade</span>(<span class="ruby-identifier">domain</span>, <span class="ruby-identifier">owner_handle</span>, <span class="ruby-identifier">admin_handle</span>, <span class="ruby-identifier">tech_handle</span>, <span class="ruby-identifier">billing_handle</span>, <span class="ruby-identifier">afnic_titularkey</span> = <span class="ruby-keyword kw">nil</span>)
|
446
|
+
<span class="ruby-identifier">not_supported</span>
|
447
|
+
<span class="ruby-keyword kw">end</span>
|
448
|
+
</pre>
|
449
|
+
</div>
|
450
|
+
</div>
|
451
|
+
</div>
|
452
|
+
|
453
|
+
<div id="method-M000044" class="method-detail">
|
454
|
+
<a name="M000044"></a>
|
455
|
+
|
456
|
+
<div class="method-heading">
|
457
|
+
<a href="#M000044" class="method-signature">
|
458
|
+
<span class="method-name">domain_transfer_in</span><span class="method-args">(domain, owner_handle, admin_handle, tech_handle, billing_handle, nameservers, auth_code = nil)</span>
|
459
|
+
</a>
|
460
|
+
</div>
|
461
|
+
|
462
|
+
<div class="method-description">
|
463
|
+
<p>
|
464
|
+
Transfer (see glossary, Transfer) a domain from another registrar to <a
|
465
|
+
href="../Gandi.html">Gandi</a>, or from a <a href="../Gandi.html">Gandi</a>
|
466
|
+
account to a <a href="../Gandi.html">Gandi</a> reseller. If the domain is
|
467
|
+
already at <a href="../Gandi.html">Gandi</a> (internal transfer),
|
468
|
+
owner_handle, admin_handle, tech_handle and billing_handle are maintained.
|
469
|
+
Return the operation attributed ID TODO: check for auth_code if TLD is .fr
|
470
|
+
</p>
|
471
|
+
<p><a class="source-toggle" href="#"
|
472
|
+
onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
|
473
|
+
<div class="method-source-code" id="M000044-source">
|
474
|
+
<pre>
|
475
|
+
<span class="ruby-comment cmt"># File lib/gandi/domain.rb, line 87</span>
|
476
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domain_transfer_in</span>(<span class="ruby-identifier">domain</span>, <span class="ruby-identifier">owner_handle</span>, <span class="ruby-identifier">admin_handle</span>, <span class="ruby-identifier">tech_handle</span>, <span class="ruby-identifier">billing_handle</span>, <span class="ruby-identifier">nameservers</span>, <span class="ruby-identifier">auth_code</span> = <span class="ruby-keyword kw">nil</span>)
|
477
|
+
<span class="ruby-identifier">args</span> = [<span class="ruby-identifier">domain</span>, <span class="ruby-identifier">owner_handle</span>, <span class="ruby-identifier">admin_handle</span>, <span class="ruby-identifier">tech_handle</span>, <span class="ruby-identifier">billing_handle</span>, <span class="ruby-identifier">nameservers</span>, <span class="ruby-identifier">auth_code</span>]
|
478
|
+
<span class="ruby-identifier">args</span>.<span class="ruby-identifier">pop</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">auth_code</span>.<span class="ruby-identifier">nil?</span>
|
479
|
+
<span class="ruby-identifier">call</span>(<span class="ruby-value str">'domain_transfer_in'</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
480
|
+
<span class="ruby-keyword kw">end</span>
|
481
|
+
</pre>
|
482
|
+
</div>
|
483
|
+
</div>
|
484
|
+
</div>
|
485
|
+
|
486
|
+
<div id="method-M000042" class="method-detail">
|
487
|
+
<a name="M000042"></a>
|
488
|
+
|
489
|
+
<div class="method-heading">
|
490
|
+
<a href="#M000042" class="method-signature">
|
491
|
+
<span class="method-name">domain_transfer_in_available</span><span class="method-args">(domain)</span>
|
492
|
+
</a>
|
493
|
+
</div>
|
494
|
+
|
495
|
+
<div class="method-description">
|
496
|
+
<p>
|
497
|
+
Check if a domain can be transferred from another registrar. See glossary,
|
498
|
+
Transfer.
|
499
|
+
</p>
|
500
|
+
<p><a class="source-toggle" href="#"
|
501
|
+
onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
|
502
|
+
<div class="method-source-code" id="M000042-source">
|
503
|
+
<pre>
|
504
|
+
<span class="ruby-comment cmt"># File lib/gandi/domain.rb, line 77</span>
|
505
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domain_transfer_in_available</span>(<span class="ruby-identifier">domain</span>)
|
506
|
+
<span class="ruby-identifier">call</span>(<span class="ruby-value str">'domain_transfer_in_available'</span>, <span class="ruby-identifier">domain</span>)
|
507
|
+
<span class="ruby-keyword kw">end</span>
|
508
|
+
</pre>
|
509
|
+
</div>
|
510
|
+
</div>
|
511
|
+
</div>
|
512
|
+
|
513
|
+
<div id="method-M000043" class="method-detail">
|
514
|
+
<a name="M000043"></a>
|
515
|
+
|
516
|
+
<div class="method-heading">
|
517
|
+
<span class="method-name">domain_transfer_in_available?</span><span class="method-args">(domain)</span>
|
518
|
+
</div>
|
519
|
+
|
520
|
+
<div class="method-description">
|
521
|
+
<p>
|
522
|
+
Alias for <a href="Domain.html#M000042">domain_transfer_in_available</a>
|
523
|
+
</p>
|
524
|
+
</div>
|
525
|
+
</div>
|
526
|
+
|
527
|
+
<div id="method-M000045" class="method-detail">
|
528
|
+
<a name="M000045"></a>
|
529
|
+
|
530
|
+
<div class="method-heading">
|
531
|
+
<a href="#M000045" class="method-signature">
|
532
|
+
<span class="method-name">domain_transfer_out</span><span class="method-args">(opid, allow)</span>
|
533
|
+
</a>
|
534
|
+
</div>
|
535
|
+
|
536
|
+
<div class="method-description">
|
537
|
+
<p>
|
538
|
+
Accept or deny a transfer of a domain from <a
|
539
|
+
href="../Gandi.html">Gandi</a> to another registrar. See glossary,
|
540
|
+
Transfer. This method is not available yet and will be present in v1.10 of
|
541
|
+
the API
|
542
|
+
</p>
|
543
|
+
<p><a class="source-toggle" href="#"
|
544
|
+
onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
|
545
|
+
<div class="method-source-code" id="M000045-source">
|
546
|
+
<pre>
|
547
|
+
<span class="ruby-comment cmt"># File lib/gandi/domain.rb, line 95</span>
|
548
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domain_transfer_out</span>(<span class="ruby-identifier">opid</span>, <span class="ruby-identifier">allow</span>)
|
549
|
+
<span class="ruby-identifier">not_supported</span>
|
550
|
+
<span class="ruby-keyword kw">end</span>
|
551
|
+
</pre>
|
552
|
+
</div>
|
553
|
+
</div>
|
554
|
+
</div>
|
555
|
+
|
556
|
+
<div id="method-M000036" class="method-detail">
|
557
|
+
<a name="M000036"></a>
|
558
|
+
|
559
|
+
<div class="method-heading">
|
560
|
+
<a href="#M000036" class="method-signature">
|
561
|
+
<span class="method-name">domain_unlock</span><span class="method-args">(domain)</span>
|
562
|
+
</a>
|
563
|
+
</div>
|
564
|
+
|
565
|
+
<div class="method-description">
|
566
|
+
<p>
|
567
|
+
Remove a lock status (cf. <a href="Domain.html#M000037">domain_info</a>) to
|
568
|
+
transfer the domain to another registrar. Return the operation attributed
|
569
|
+
ID
|
570
|
+
</p>
|
571
|
+
<p><a class="source-toggle" href="#"
|
572
|
+
onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
|
573
|
+
<div class="method-source-code" id="M000036-source">
|
574
|
+
<pre>
|
575
|
+
<span class="ruby-comment cmt"># File lib/gandi/domain.rb, line 33</span>
|
576
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domain_unlock</span>(<span class="ruby-identifier">domain</span>)
|
577
|
+
<span class="ruby-identifier">call</span>(<span class="ruby-value str">'domain_unlock'</span>, <span class="ruby-identifier">domain</span>)
|
578
|
+
<span class="ruby-keyword kw">end</span>
|
579
|
+
</pre>
|
580
|
+
</div>
|
581
|
+
</div>
|
582
|
+
</div>
|
583
|
+
|
584
|
+
<div id="method-M000049" class="method-detail">
|
585
|
+
<a name="M000049"></a>
|
586
|
+
|
587
|
+
<div class="method-heading">
|
588
|
+
<a href="#M000049" class="method-signature">
|
589
|
+
<span class="method-name">tld_list</span><span class="method-args">()</span>
|
590
|
+
</a>
|
591
|
+
</div>
|
592
|
+
|
593
|
+
<div class="method-description">
|
594
|
+
<p>
|
595
|
+
Return an array of active TLDs handled by the application. TODO:
|
596
|
+
memoization
|
597
|
+
</p>
|
598
|
+
<p><a class="source-toggle" href="#"
|
599
|
+
onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
|
600
|
+
<div class="method-source-code" id="M000049-source">
|
601
|
+
<pre>
|
602
|
+
<span class="ruby-comment cmt"># File lib/gandi/domain.rb, line 123</span>
|
603
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tld_list</span>
|
604
|
+
<span class="ruby-identifier">call</span>(<span class="ruby-value str">'tld_list'</span>)
|
605
|
+
<span class="ruby-keyword kw">end</span>
|
606
|
+
</pre>
|
607
|
+
</div>
|
608
|
+
</div>
|
609
|
+
</div>
|
610
|
+
|
611
|
+
|
612
|
+
</div>
|
613
|
+
|
614
|
+
|
615
|
+
</div>
|
616
|
+
|
617
|
+
|
618
|
+
<div id="validator-badges">
|
619
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
620
|
+
</div>
|
621
|
+
|
622
|
+
</body>
|
623
|
+
</html>
|