line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::LogicBoxes::Contact::US; |
2
|
|
|
|
|
|
|
|
3
|
45
|
|
|
45
|
|
460294
|
use strict; |
|
45
|
|
|
|
|
119
|
|
|
45
|
|
|
|
|
1590
|
|
4
|
45
|
|
|
45
|
|
259
|
use warnings; |
|
45
|
|
|
|
|
106
|
|
|
45
|
|
|
|
|
1421
|
|
5
|
|
|
|
|
|
|
|
6
|
45
|
|
|
45
|
|
864
|
use Moose; |
|
45
|
|
|
|
|
184519
|
|
|
45
|
|
|
|
|
349
|
|
7
|
45
|
|
|
45
|
|
303818
|
use MooseX::StrictConstructor; |
|
45
|
|
|
|
|
34396
|
|
|
45
|
|
|
|
|
420
|
|
8
|
45
|
|
|
45
|
|
148113
|
use namespace::autoclean; |
|
45
|
|
|
|
|
115
|
|
|
45
|
|
|
|
|
444
|
|
9
|
|
|
|
|
|
|
|
10
|
45
|
|
|
45
|
|
4999
|
use WWW::LogicBoxes::Types qw( NexusPurpose NexusCategory ); |
|
45
|
|
|
|
|
103
|
|
|
45
|
|
|
|
|
2043
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
extends 'WWW::LogicBoxes::Contact'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '1.10.1'; # VERSION |
15
|
|
|
|
|
|
|
# ABSTRACT: Contact for .US Registrations |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has 'nexus_purpose' => ( |
18
|
|
|
|
|
|
|
is => 'ro', |
19
|
|
|
|
|
|
|
isa => NexusPurpose, |
20
|
|
|
|
|
|
|
required => 1, |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has 'nexus_category' => ( |
24
|
|
|
|
|
|
|
is => 'ro', |
25
|
|
|
|
|
|
|
isa => NexusCategory, |
26
|
|
|
|
|
|
|
required => 1, |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub construct_creation_request { |
30
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
0
|
my $request = $self->SUPER::construct_creation_request(); |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
0
|
$request->{'attr-name1'} = 'purpose'; |
35
|
0
|
|
|
|
|
0
|
$request->{'attr-value1'} = $self->nexus_purpose; |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
0
|
$request->{'attr-name2'} = 'category'; |
38
|
0
|
|
|
|
|
0
|
$request->{'attr-value2'} = $self->nexus_category; |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
0
|
return $request; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub construct_from_response { |
44
|
1
|
|
|
1
|
1
|
2
|
my $self = shift; |
45
|
1
|
|
|
|
|
3
|
my $response = shift; |
46
|
|
|
|
|
|
|
|
47
|
1
|
50
|
|
|
|
4
|
if( !defined $response ) { |
48
|
0
|
|
|
|
|
0
|
return; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
1
|
|
|
|
|
7
|
my $contact = WWW::LogicBoxes::Contact->construct_from_response( $response ); |
52
|
|
|
|
|
|
|
|
53
|
1
|
50
|
|
|
|
4
|
if( !defined $contact ) { |
54
|
0
|
|
|
|
|
0
|
return; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
$self->meta->rebless_instance( $contact, |
58
|
|
|
|
|
|
|
nexus_purpose => $response->{ApplicationPurpose}, |
59
|
|
|
|
|
|
|
nexus_category => $response->{NexusCategory}, |
60
|
1
|
|
|
|
|
12
|
); |
61
|
|
|
|
|
|
|
|
62
|
1
|
|
|
|
|
1900
|
return $contact; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
66
|
|
|
|
|
|
|
1; |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
__END__ |
69
|
|
|
|
|
|
|
=pod |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 NAME |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
WWW::LogicBoxes::Contact::US - Representation of Domain Contact for .us Domains |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 SYNOPSIS |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
use strict; |
78
|
|
|
|
|
|
|
use warnings; |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
use WWW::LogicBoxes::Customer; |
81
|
|
|
|
|
|
|
use WWW::LogicBoxes::Contact::US; |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
my $customer = WWW::LogicBoxes::Customer->new( ... ); # Valid LogicBoxes Customer |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
my $contact = WWW::LogicBoxes::Contact::US->new( |
86
|
|
|
|
|
|
|
id => 42, |
87
|
|
|
|
|
|
|
name => 'Edsger Dijkstra', |
88
|
|
|
|
|
|
|
company => 'University of Texas at Austin', |
89
|
|
|
|
|
|
|
email => 'depth.first@search.com', |
90
|
|
|
|
|
|
|
address1 => 'University of Texas', |
91
|
|
|
|
|
|
|
address2 => '42 Main St', |
92
|
|
|
|
|
|
|
city => 'Austin', |
93
|
|
|
|
|
|
|
state => 'Texas', |
94
|
|
|
|
|
|
|
country => 'US', |
95
|
|
|
|
|
|
|
zipcode => '78713', |
96
|
|
|
|
|
|
|
phone_number => '18005551212', |
97
|
|
|
|
|
|
|
fax_number => '18005551212', |
98
|
|
|
|
|
|
|
type => 'Contact', |
99
|
|
|
|
|
|
|
customer_id => $customer->id, |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
nexus_purpose => 'P1', |
102
|
|
|
|
|
|
|
nexus_category => 'C11', |
103
|
|
|
|
|
|
|
); |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 EXTENDS |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
L<WWW::LogicBoxes::Contact> |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 DESCRIPTION |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Representation of a L<LogicBoxes|http://www.logicboxes.com> domain contact for .us TLD domains. The .us tld is special in that specific L<Nexus Data|http://www.neustar.us/the-ustld-nexus-requirements/> must be provided. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
All of the existing L<WWW::LogicBoxes::Contact> attributes remain unchanged with two new attributes. The description for these values is taken from L<http://www.whois.us/whois-gui/US/faqs.html>. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head2 B<nexus_purpose> |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
This is the B<Domain Name Application Purpose Code>, the reason this domain was registered and a bit about it's intended usage. |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Must be one of the following I<2 character> values: |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=over 4 |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=item P1 - Business use for profit. |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=item P2 - Non-profit business, club, association, religious organization, etc. |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=item P3 - Personal use. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=item P4 - Education purposes. |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=item P5 - Government purposes |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=back |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=head2 B<nexus_category> |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
This is the B<Nexus Code>, it contains information about the contact and their relationship with respect to US residency. |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
Must be one of the following I<2 character> values: |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=over 4 |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=item C11 - A natural person who is a United States citizen. |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=item C12 - A natural person who is a permanent resident of the United States of America, or any of its possessions or territories. |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=item C21 - A US-based organization or company (A US-based organization or company formed within one of the fifty (50) U.S. states, the District of Columbia, or any of the United States possessions or territories, or organized or otherwise constituted under the laws of a state of the United States of America, the District of Columbia or any of its possessions or territories or a U.S. federal, state, or local government entity or a political subdivision thereof). |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=item C31 - A foreign entity or organization (A foreign entity or organization that has a bona fide presence in the United States of America or any of its possessions or territories who regularly engages in lawful activities (sales of goods or services or other business, commercial or non-commercial, including not-for-profit relations in the United States)). |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=item C32 - Entity has an office or other facility in the United States. |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=back |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=cut |