| 1 | ## Domain Registry Interface, CIRA EPP Notifications | ||||||||||
| 2 | ## | ||||||||||
| 3 | ## Copyright (c) 2010 Patrick Mevzek <netdri@dotandco.com>. All rights reserved. | ||||||||||
| 4 | ## | ||||||||||
| 5 | ## This file is part of Net::DRI | ||||||||||
| 6 | ## | ||||||||||
| 7 | ## Net::DRI is free software; you can redistribute it and/or modify | ||||||||||
| 8 | ## it under the terms of the GNU General Public License as published by | ||||||||||
| 9 | ## the Free Software Foundation; either version 2 of the License, or | ||||||||||
| 10 | ## (at your option) any later version. | ||||||||||
| 11 | ## | ||||||||||
| 12 | ## See the LICENSE file that comes with this distribution for more details. | ||||||||||
| 13 | #################################################################################################### | ||||||||||
| 14 | |||||||||||
| 15 | package Net::DRI::Protocol::EPP::Extensions::CIRA::Notifications; | ||||||||||
| 16 | |||||||||||
| 17 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 18 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 19 | |||||||||||
| 20 | 1 | ▶ | use Net::DRI::Exception; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 21 | 1 | ▶ | use Net::DRI::Util; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 22 | |||||||||||
| 23 | #################################################################################################### | ||||||||||
| 24 | |||||||||||
| 25 | sub register_commands | ||||||||||
| 26 | { | ||||||||||
| 27 | 0 | ▶ | my ($class,$version)=@_; | ||||||||
|
Subroutine
register_commands: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 28 | 0 | my %tmp=( | |||||||||
| 29 | review_cira => [ undef, \&parse ], | ||||||||||
| 30 | ); | ||||||||||
| 31 | |||||||||||
| 32 | 0 | return { 'message' => \%tmp }; | |||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | #################################################################################################### | ||||||||||
| 36 | |||||||||||
| 37 | sub parse | ||||||||||
| 38 | { | ||||||||||
| 39 | 0 | ▶ | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | ||||||||
|
Subroutine
parse: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||
| 40 | 0 | my $mes=$po->message(); | |||||||||
| 41 | 0 | ▶ | return unless $mes->is_success(); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 42 | 0 | my $node=$mes->get_response('poll','extData'); | |||||||||
| 43 | 0 | ▶ | return unless defined $node; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 44 | |||||||||||
| 45 | 0 | my $id=$mes->msg_id(); | |||||||||
| 46 | 0 | $rinfo->{message}->{$id}->{action}='review_cira'; | |||||||||
| 47 | |||||||||||
| 48 | 0 | foreach my $el (Net::DRI::Util::xml_list_children($node)) | |||||||||
| 49 | { | ||||||||||
| 50 | 0 | my ($name,$n)=@$el; | |||||||||
| 51 | 0 | ▶ | unless ($name=~m/^(?:msgID|domainName|contactID|balance|deadline|hostName|ipAddress)$/o) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 52 | { | ||||||||||
| 53 | 0 | Net::DRI::Exception::err_assert('Unknown node name '.$name.' in .CA notification parsing, please report!'); | |||||||||
| 54 | } | ||||||||||
| 55 | 0 | $rinfo->{message}->{$id}->{Net::DRI::Util::remcam($name)}=$n->textContent(); | |||||||||
| 56 | } | ||||||||||
| 57 | 0 | return; | |||||||||
| 58 | } | ||||||||||
| 59 | |||||||||||
| 60 | #################################################################################################### | ||||||||||
| 61 | 1 | 1; | |||||||||
| 62 | |||||||||||
| 63 | __END__ | ||||||||||
| 64 | |||||||||||
| 65 | =pod | ||||||||||
| 66 | |||||||||||
| 67 | =head1 NAME | ||||||||||
| 68 | |||||||||||
| 69 | Net::DRI::Protocol::EPP::Extensions::CIRA::Notifications - CIRA (.CA) EPP Notifications for Net::DRI | ||||||||||
| 70 | |||||||||||
| 71 | =head1 DESCRIPTION | ||||||||||
| 72 | |||||||||||
| 73 | Please see the README file for details. | ||||||||||
| 74 | |||||||||||
| 75 | =head1 SUPPORT | ||||||||||
| 76 | |||||||||||
| 77 | For now, support questions should be sent to: | ||||||||||
| 78 | |||||||||||
| 79 | E<lt>netdri@dotandco.comE<gt> | ||||||||||
| 80 | |||||||||||
| 81 | Please also see the SUPPORT file in the distribution. | ||||||||||
| 82 | |||||||||||
| 83 | =head1 SEE ALSO | ||||||||||
| 84 | |||||||||||
| 85 | E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt> | ||||||||||
| 86 | |||||||||||
| 87 | =head1 AUTHOR | ||||||||||
| 88 | |||||||||||
| 89 | Patrick Mevzek, E<lt>netdri@dotandco.comE<gt> | ||||||||||
| 90 | |||||||||||
| 91 | =head1 COPYRIGHT | ||||||||||
| 92 | |||||||||||
| 93 | Copyright (c) 2010 Patrick Mevzek <netdri@dotandco.com>. | ||||||||||
| 94 | All rights reserved. | ||||||||||
| 95 | |||||||||||
| 96 | This program is free software; you can redistribute it and/or modify | ||||||||||
| 97 | it under the terms of the GNU General Public License as published by | ||||||||||
| 98 | the Free Software Foundation; either version 2 of the License, or | ||||||||||
| 99 | (at your option) any later version. | ||||||||||
| 100 | |||||||||||
| 101 | See the LICENSE file that comes with this distribution for more details. | ||||||||||
| 102 | |||||||||||
| 103 | =cut | ||||||||||