| 1 | package Net::EPP::Frame::Command::Renew::Domain; | ||
| 2 | 1 | ▶ | use base qw(Net::EPP::Frame::Command::Renew); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 1 | ▶ | use Net::EPP::Frame::ObjectSpec; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | =pod | ||
| 7 | |||
| 8 | =head1 NAME | ||
| 9 | |||
| 10 | Net::EPP::Frame::Command::Renew::Domain - an instance of L<Net::EPP::Frame::Command::Renew> | ||
| 11 | for domain objects. | ||
| 12 | |||
| 13 | =head1 SYNOPSIS | ||
| 14 | |||
| 15 | use Net::EPP::Frame::Command::Renew::Domain; | ||
| 16 | use strict; | ||
| 17 | |||
| 18 | my $info = Net::EPP::Frame::Command::Renew::Domain->new; | ||
| 19 | $info->setDomain('example.tld'); | ||
| 20 | |||
| 21 | print $info->toString(1); | ||
| 22 | |||
| 23 | This results in an XML document like this: | ||
| 24 | |||
| 25 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 26 | <epp xmlns="urn:ietf:params:xml:ns:epp-1.0" | ||
| 27 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 28 | xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 | ||
| 29 | epp-1.0.xsd"> | ||
| 30 | <command> | ||
| 31 | <renew> | ||
| 32 | <domain:renew | ||
| 33 | xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" | ||
| 34 | xsi:schemaLocation="urn:ietf:params:xml:ns:domain-1.0 | ||
| 35 | domain-1.0.xsd"> | ||
| 36 | <domain:name>example.tldE<lt>/domain:name> | ||
| 37 | </domain:renew> | ||
| 38 | </renew> | ||
| 39 | <clTRID>0cf1b8f7e14547d26f03b7641660c641d9e79f45</clTRIDE<gt> | ||
| 40 | </command> | ||
| 41 | </epp> | ||
| 42 | |||
| 43 | =head1 OBJECT HIERARCHY | ||
| 44 | |||
| 45 | L<XML::LibXML::Node> | ||
| 46 | +----L<XML::LibXML::Document> | ||
| 47 | +----L<Net::EPP::Frame> | ||
| 48 | +----L<Net::EPP::Frame::Command> | ||
| 49 | +----L<Net::EPP::Frame::Command::Renew> | ||
| 50 | +----L<Net::EPP::Frame::Command::Renew::Domain> | ||
| 51 | |||
| 52 | =cut | ||
| 53 | |||
| 54 | 0 | ▶ | sub new { |
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 55 | 0 | my $package = shift; | |
| 56 | 0 | my $self = bless($package->SUPER::new('renew'), $package); | |
| 57 | |||
| 58 | 0 | my $domain = $self->addObject(Net::EPP::Frame::ObjectSpec->spec('domain')); | |
| 59 | |||
| 60 | 0 | return $self; | |
| 61 | } | ||
| 62 | |||
| 63 | =pod | ||
| 64 | |||
| 65 | =head1 METHODS | ||
| 66 | |||
| 67 | $frame->setDomain('example.tld'); | ||
| 68 | |||
| 69 | This method specifies the domain name for the renew. | ||
| 70 | |||
| 71 | =cut | ||
| 72 | |||
| 73 | 0 | ▶ | sub setDomain { |
|
Subroutine
setDomain: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 74 | 0 | my ($self, $domain) = @_; | |
| 75 | |||
| 76 | 0 | my $name = $self->createElement('domain:name'); | |
| 77 | 0 | $name->appendText($domain); | |
| 78 | |||
| 79 | 0 | $self->getNode('renew')->getChildNodes->shift->appendChild($name); | |
| 80 | |||
| 81 | 0 | return 1; | |
| 82 | } | ||
| 83 | |||
| 84 | =pod | ||
| 85 | |||
| 86 | $frame->period($years); | ||
| 87 | |||
| 88 | This sets the optional renewal period. | ||
| 89 | |||
| 90 | =cut | ||
| 91 | |||
| 92 | 0 | ▶ | sub setPeriod { |
|
Subroutine
setPeriod: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 93 | 0 | my ($self, $years) = @_; | |
| 94 | |||
| 95 | 0 | my $period = $self->createElement('domain:period'); | |
| 96 | 0 | $period->setAttribute('unit', 'y'); | |
| 97 | 0 | $period->appendText($years); | |
| 98 | |||
| 99 | 0 | $self->getNode('renew')->getChildNodes->shift->appendChild($period); | |
| 100 | |||
| 101 | 0 | return 1; | |
| 102 | } | ||
| 103 | |||
| 104 | =pod | ||
| 105 | |||
| 106 | $frame->setCurExpDate($date) | ||
| 107 | |||
| 108 | This sets the current expiry date for the domain. | ||
| 109 | |||
| 110 | =cut | ||
| 111 | |||
| 112 | 0 | ▶ | sub setCurExpDate { |
|
Subroutine
setCurExpDate: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 113 | 0 | my ($self, $date) = @_; | |
| 114 | |||
| 115 | 0 | my $cur = $self->createElement('domain:curExpDate'); | |
| 116 | 0 | $cur->appendText($date); | |
| 117 | 0 | $self->getNode('renew')->getChildNodes->shift->appendChild($cur); | |
| 118 | |||
| 119 | 0 | return 1; | |
| 120 | } | ||
| 121 | |||
| 122 | 1 | 1; | |