File Coverage

blib/lib/Net/DRI/DRD/ISPAPI.pm
Criterion Covered Total %
statement 12 34 35.2
branch 0 6 0.0
condition n/a
subroutine 4 13 30.7
pod 4 9 44.4
total 20 62 32.2


line stmt bran cond sub pod time code
1             ## Domain Registry Interface, ISPAPI (aka HEXONET) Registry Driver
2             ##
3             ## Copyright (c) 2010-2011 HEXONET GmbH, http://www.hexonet.net, Jens Wagner . All rights reserved.
4             ## (c) 2011 Patrick Mevzek . All rights reserved.
5             ##
6             ## This file is part of Net::DRI
7             ##
8             ## Net::DRI is free software; you can redistribute it and/or modify
9             ## it under the terms of the GNU General Public License as published by
10             ## the Free Software Foundation; either version 2 of the License, or
11             ## (at your option) any later version.
12             ##
13             ## See the LICENSE file that comes with this distribution for more details.
14             #########################################################################################
15              
16             package Net::DRI::DRD::ISPAPI;
17              
18 1     1   618 use strict;
  1         1  
  1         22  
19 1     1   2 use warnings;
  1         1  
  1         20  
20              
21 1     1   2 use base qw/Net::DRI::DRD/;
  1         1  
  1         56  
22              
23 1     1   4 use DateTime::Duration;
  1         1  
  1         257  
24              
25             =pod
26              
27             =head1 NAME
28              
29             Net::DRI::DRD::ISPAPI - ISPAPI Registry driver for Net::DRI
30              
31             =head1 DESCRIPTION
32              
33             The ISPAPI Registry driver for Net::DRI enables you to connect HEXONET's EPP server and gives you
34             the possibility to manage a wide range of gTLDs and ccTLDs.
35              
36             In addition to the EPP 1.0 compliant commands there is a Key-Value mapping for additional domain related
37             parameters which are required by several registries. The driver also supports all other HEXONET commands like
38             queries for domain and contact lists. It is also possible to access additional HEXONET products
39             like virtual servers and ssl certificates.
40              
41             =head1 CURRENT LIMITATIONS
42              
43             The list of supported TLDs is currently static. If a new TLD is available the list has to be completed.
44              
45             =head1 SUPPORT
46              
47             For now, support questions should be sent to:
48              
49             Esupport@hexonet.netE
50              
51             Please also see the SUPPORT file in the distribution.
52              
53             =head1 SEE ALSO
54              
55             Ehttp://www.hexonet.net/E
56              
57             =head1 AUTHOR
58              
59             Alexander Biehl, Eabiehl@hexonet.netE
60             Jens Wagner, Ejwagner@hexonet.netE
61              
62             =head1 COPYRIGHT
63              
64             Copyright (c) 2010-2011 HEXONET GmbH, Ehttp://www.hexonet.netE,
65             Alexander Biehl ,
66             Jens Wagner ,
67             and Patrick Mevzek .
68             All rights reserved.
69              
70             This program is free software; you can redistribute it and/or modify
71             it under the terms of the GNU General Public License as published by
72             the Free Software Foundation; either version 2 of the License, or
73             (at your option) any later version.
74              
75             See the LICENSE file that comes with this distribution for more details.
76              
77             =cut
78              
79             ####################################################################################################
80              
81             sub new
82             {
83 0     0 0   my $class=shift;
84 0           my $self=$class->SUPER::new(@_);
85 0           $self->{info}->{host_as_attr}=0;
86 0           return $self;
87             }
88              
89 0     0 1   sub periods { return (map { DateTime::Duration->new(years => $_) } (1..10)), (map { DateTime::Duration->new(months => $_) } (1..12)); }
  0            
  0            
90 0     0 1   sub name { return 'ISPAPI'; }
91 0     0 1   sub tlds { return qw/com net org aero asia biz info jobs mobi name pro tel travel at be ca ch cz de dk es eu fr hk im in it jp lt lu mx nl nu pl pt re ru se sg tk me.uk co.uk org.uk us/; }
92 0     0 1   sub object_types { return ('domain','contact','ns'); }
93 0     0 0   sub profile_types { return qw/epp/; }
94              
95             sub transport_protocol_default
96             {
97 0     0 0   my ($self,$type)=@_;
98              
99 0 0         return ('Net::DRI::Transport::Socket',{remote_host=>'epp.ispapi.net',remote_port=>700},'Net::DRI::Protocol::EPP::Extensions::ISPAPI',{}) if $type eq 'epp';
100 0           return;
101             }
102              
103             ####################################################################################################
104              
105             sub domain_operation_needs_is_mine
106             {
107 0     0 0   my ($self,$ndr,$domain,$op)=@_;
108 0           return;
109             }
110              
111             sub account_list_domains
112             {
113 0     0 0   my ($self,$ndr,$hash)=@_;
114 0           my $rc;
115 0 0         $rc=$ndr->try_restore_from_cache('account','domains','list') if !$hash;
116 0 0         if (! defined $rc) { $rc=$ndr->process('account','list_domains', [$hash]); }
  0            
117 0           return $rc;
118             }
119              
120             ####################################################################################################
121             1;