| 1 | ## Domain Registry Interface, .IT Contact EPP extension | ||||||||||
| 2 | ## | ||||||||||
| 3 | ## Copyright (C) 2009-2010,2013,2016 Tower Technologies. All rights reserved. | ||||||||||
| 4 | ## | ||||||||||
| 5 | ## This program is free software; you can redistribute it and/or modify | ||||||||||
| 6 | ## it under the terms of the GNU General Public License v2. | ||||||||||
| 7 | |||||||||||
| 8 | package Net::DRI::Protocol::EPP::Extensions::IT::Contact; | ||||||||||
| 9 | |||||||||||
| 10 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | =pod | ||||||||||
| 14 | |||||||||||
| 15 | =head1 NAME | ||||||||||
| 16 | |||||||||||
| 17 | Net::DRI::Protocol::EPP::Extensions::IT::Contact - .IT EPP Contact extension for Net::DRI | ||||||||||
| 18 | |||||||||||
| 19 | =head1 SUPPORT | ||||||||||
| 20 | |||||||||||
| 21 | For now, support questions should be sent to: | ||||||||||
| 22 | |||||||||||
| 23 | E<lt>noc@towertech.itE<gt> | ||||||||||
| 24 | |||||||||||
| 25 | Please also see the SUPPORT file in the distribution. | ||||||||||
| 26 | |||||||||||
| 27 | =head1 AUTHOR | ||||||||||
| 28 | |||||||||||
| 29 | Alessandro Zummo, E<lt>a.zummo@towertech.itE<gt> | ||||||||||
| 30 | |||||||||||
| 31 | =head1 COPYRIGHT | ||||||||||
| 32 | |||||||||||
| 33 | Copyright (C) 2009-2010,2013,2016 Tower Technologies. | ||||||||||
| 34 | All rights reserved. | ||||||||||
| 35 | |||||||||||
| 36 | This program is free software; you can redistribute it and/or modify | ||||||||||
| 37 | it under the terms of the GNU General Public License v2 as published by | ||||||||||
| 38 | the Free Software Foundation. | ||||||||||
| 39 | |||||||||||
| 40 | See the LICENSE file that comes with this distribution for more details. | ||||||||||
| 41 | |||||||||||
| 42 | =cut | ||||||||||
| 43 | |||||||||||
| 44 | |||||||||||
| 45 | sub register_commands | ||||||||||
| 46 | { | ||||||||||
| 47 | 0 | ▶ | my ($class, $version) = @_; | ||||||||
|
Subroutine
register_commands: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 48 | |||||||||||
| 49 | 0 | my $ops = { | |||||||||
| 50 | 'create' => [ \&create, undef ], | ||||||||||
| 51 | }; | ||||||||||
| 52 | |||||||||||
| 53 | 0 | return { 'contact' => $ops }; | |||||||||
| 54 | } | ||||||||||
| 55 | |||||||||||
| 56 | sub fix_contact | ||||||||||
| 57 | { | ||||||||||
| 58 | 0 | ▶ | my ($epp, $c, $op) = @_; | ||||||||
|
Subroutine
fix_contact: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||
| 59 | |||||||||||
| 60 | 0 | my @ext; | |||||||||
| 61 | |||||||||||
| 62 | 0 | ▶ | push @ext, [ 'extcon:consentForPublishing', $c->consent_for_publishing ] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 63 | if defined $c->consent_for_publishing; | ||||||||||
| 64 | |||||||||||
| 65 | # registrant data (do not alter the order, there's people | ||||||||||
| 66 | # who likes to use <sequence> in xsds) | ||||||||||
| 67 | 0 | my @registrant; | |||||||||
| 68 | |||||||||||
| 69 | 0 | ▶ | push @registrant, [ 'extcon:nationalityCode', $c->nationality_code ] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 70 | if defined $c->nationality_code; | ||||||||||
| 71 | |||||||||||
| 72 | 0 | ▶ | push @registrant, [ 'extcon:entityType', $c->entity_type ] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 73 | if defined $c->entity_type; | ||||||||||
| 74 | |||||||||||
| 75 | 0 | ▶ | push @registrant, [ 'extcon:regCode', $c->reg_code ] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 76 | if defined $c->reg_code; | ||||||||||
| 77 | |||||||||||
| 78 | |||||||||||
| 79 | 0 | ▶ | push @ext, [ 'extcon:registrant', @registrant ] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 80 | if scalar @registrant; | ||||||||||
| 81 | |||||||||||
| 82 | 0 | ▶ | if (@ext) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 83 | { | ||||||||||
| 84 | 0 | my $msg = $epp->message; | |||||||||
| 85 | 0 | my $eid = $msg->command_extension_register('extcon', $op); | |||||||||
| 86 | |||||||||||
| 87 | 0 | $msg->command_extension($eid, [ @ext ]); | |||||||||
| 88 | } | ||||||||||
| 89 | 0 | return; | |||||||||
| 90 | } | ||||||||||
| 91 | |||||||||||
| 92 | sub create | ||||||||||
| 93 | { | ||||||||||
| 94 | 0 | ▶ | my ($epp, $contact) = @_; | ||||||||
|
Subroutine
create: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 95 | |||||||||||
| 96 | 0 | return fix_contact($epp, $contact, 'create'); | |||||||||
| 97 | } | ||||||||||
| 98 | |||||||||||
| 99 | 1 | 1; | |||||||||