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