line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::eNom::Role::Commands; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
53561
|
use Moo::Role; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
35
|
|
4
|
5
|
|
|
5
|
|
1783
|
use strict; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
106
|
|
5
|
5
|
|
|
5
|
|
26
|
use warnings; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
198
|
|
6
|
5
|
|
|
5
|
|
26
|
use utf8; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
32
|
|
7
|
|
|
|
|
|
|
|
8
|
5
|
|
|
5
|
|
4400
|
use Class::Method::Modifiers 2.04 qw(fresh); |
|
5
|
|
|
|
|
8286
|
|
|
5
|
|
|
|
|
411
|
|
9
|
5
|
|
|
5
|
|
5770
|
use HTTP::Tiny 0.031; |
|
5
|
|
|
|
|
280325
|
|
|
5
|
|
|
|
|
242
|
|
10
|
5
|
|
|
5
|
|
4494
|
use XML::LibXML::Simple 0.91 qw(XMLin); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = 'v1.3.1'; # VERSION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
requires "_make_query_string"; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=begin Pod::Coverage |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
\w+ |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=end Pod::Coverage |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=cut |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# Create methods to support eNom API version 7.8: |
25
|
|
|
|
|
|
|
my @commands = qw( |
26
|
|
|
|
|
|
|
AddBulkDomains AddContact AddDomainFolder AddDomainHeader AddHostHeader |
27
|
|
|
|
|
|
|
AddToCart AdvancedDomainSearch AM_AutoRenew AM_Configure AM_GetAccountDetail |
28
|
|
|
|
|
|
|
AM_GetAccounts AssignToDomainFolder AuthorizeTLD CalculateAllHostPackagePricing |
29
|
|
|
|
|
|
|
CalculateHostPackagePricing CancelHostAccount CancelOrder CertChangeApproverEmail |
30
|
|
|
|
|
|
|
CertConfigureCert CertGetApproverEmail CertGetCertDetail CertGetCerts CertModifyOrder |
31
|
|
|
|
|
|
|
CertParseCSR CertReissueCert CertPurchaseCert CertResendApproverEmail |
32
|
|
|
|
|
|
|
CertResendFulfillmentEmail Check CheckLogin CheckNSStatus CommissionAccount |
33
|
|
|
|
|
|
|
Contacts CreateAccount CreateHostAccount CreateSubAccount DeleteAllPOPPaks DeleteContact |
34
|
|
|
|
|
|
|
DeleteCustomerDefinedData DeleteDomainFolder DeleteDomainHeader DeleteFromCart |
35
|
|
|
|
|
|
|
DeleteHostedDomain DeleteHostHeader DeleteNameServer DeletePOP3 DeletePOPPak |
36
|
|
|
|
|
|
|
DeleteRegistration DeleteSubaccount DisableFolderApp DisableServices EnableFolderApp |
37
|
|
|
|
|
|
|
EnableServices Extend Extend_RGP ExtendDomainDNS Forwarding GetAccountInfo GetAccountPassword |
38
|
|
|
|
|
|
|
GetAccountValidation GetAddressBook GetAgreementPage GetAllAccountInfo GetAllDomains |
39
|
|
|
|
|
|
|
GetAllHostAccounts GetAllResellerHostPricing GetBalance GetCartContent GetCatchAll GetCerts |
40
|
|
|
|
|
|
|
GetConfirmationSettings GetContacts GetCusPreferences GetCustomerDefinedData GetCustomerPaymentInfo |
41
|
|
|
|
|
|
|
GetDNS GetDNSStatus GetDomainCount GetDomainExp GetDomainFolderDetail GetDomainFolderList |
42
|
|
|
|
|
|
|
GetDomainHeader GetDomainInfo GetDomainNameID GetDomains GetDomainServices GetDomainSLDTLD |
43
|
|
|
|
|
|
|
GetDomainSRVHosts GetDomainStatus GetDomainSubServices GetDotNameForwarding GetExpiredDomains |
44
|
|
|
|
|
|
|
GetExtAttributes GetExtendInfo GetFilePermissions GetForwarding GetGlobalChangeStatus |
45
|
|
|
|
|
|
|
GetGlobalChangeStatusDetail GetHomeDomainList GetHostAccount GetHostAccounts GetHostHeader GetHosts |
46
|
|
|
|
|
|
|
GetIDNCodes GetIPResolver GetMailHosts GetMetaTag GetNameSuggestions GetNews GetOrderDetail |
47
|
|
|
|
|
|
|
GetOrderList GetPasswordBit GetPOP3 GetPOPExpirations GetPOPForwarding GetProductNews |
48
|
|
|
|
|
|
|
GetProductSelectionList GetRegHosts GetRegistrationStatus GetRegLock GetRenew GetReport |
49
|
|
|
|
|
|
|
GetResellerHostPricing GetResellerInfo GetServiceContact GetSPFHosts GetStorageUsage |
50
|
|
|
|
|
|
|
GetSubAccountDetails GetSubAccountPassword GetSubAccounts GetSubaccountsDetailList GetTLDDetails |
51
|
|
|
|
|
|
|
GetTLDList GetTransHistory GetWebHostingAll GetWhoisContact GetWPPSInfo GM_CancelSubscription |
52
|
|
|
|
|
|
|
GM_CheckDomain GM_GetCancelReasons GM_GetControlPanelLoginURL GM_GetRedirectScript GM_GetStatuses |
53
|
|
|
|
|
|
|
GM_GetSubscriptionDetails GM_GetSubscriptions GM_ReactivateSubscription GM_RenewSubscription |
54
|
|
|
|
|
|
|
GM_UpdateBillingCycle GM_UpdateSubscriptionDetails HostPackageDefine HostPackageDelete HostPackageModify |
55
|
|
|
|
|
|
|
HostPackageView HostParkingPage InsertNewOrder IsFolderEnabled ListDomainHeaders ListHostHeaders |
56
|
|
|
|
|
|
|
ListWebFiles MetaBaseGetValue MetaBaseSetValue ModifyDomainHeader ModifyHostHeader ModifyNS |
57
|
|
|
|
|
|
|
ModifyNSHosting ModifyPOP3 MySQL_GetDBInfo NameSpinner NM_CancelOrder NM_ExtendOrder |
58
|
|
|
|
|
|
|
NM_GetPremiumDomainSettings NM_GetSearchCategories NM_ProcessOrder NM_Search |
59
|
|
|
|
|
|
|
NM_SetPremiumDomainSettings ParseDomain PE_GetCustomerPricing PE_GetDomainPricing PE_GetEapPricing |
60
|
|
|
|
|
|
|
PE_GetPOPPrice PE_GetPremiumPricing PE_GetProductPrice PE_GetResellerPrice PE_GetRetailPrice |
61
|
|
|
|
|
|
|
PE_GetRetailPricing PE_GetRocketPrice PE_GetTLDID PE_SetPricing PP_CancelSubscription PP_CheckUpgrade |
62
|
|
|
|
|
|
|
PP_GetCancelReasons PP_GetControlPanelLoginURL PP_GetStatuses PP_GetSubscriptionDetails PP_GetSubscriptions |
63
|
|
|
|
|
|
|
PP_ReactivateSubscription PP_UpdateSubscriptionDetails PP_ValidatePassword Portal_GetDomainInfo |
64
|
|
|
|
|
|
|
Portal_GetAwardedDomains Portal_GetToken Portal_UpdateAwardedDomains PreConfigure Purchase PurchaseHosting |
65
|
|
|
|
|
|
|
PurchasePOPBundle PurchasePreview PurchaseServices PushDomain Queue_GetInfo Queue_GetExtAttributes |
66
|
|
|
|
|
|
|
Queue_DomainPurchase Queue_GetDomains Queue_GetOrders Queue_GetOrderDetail RAA_GetInfo RAA_ResendNotification |
67
|
|
|
|
|
|
|
RC_CancelSubscription RC_FreeTrialCheck RC_GetLoginToken RC_GetSubscriptionDetails RC_GetSubscriptions |
68
|
|
|
|
|
|
|
RC_RebillSubscription RC_ResetPassword RC_SetBillingCycle RC_SetPassword RC_SetSubscriptionDomain |
69
|
|
|
|
|
|
|
RC_SetSubscriptionName RefillAccount RegisterNameServer RemoveTLD RemoveUnsyncedDomains RenewPOPBundle |
70
|
|
|
|
|
|
|
RenewServices RPT_GetReport SendAccountEmail ServiceSelect SetCatchAll SetCustomerDefinedData SetDNSHost |
71
|
|
|
|
|
|
|
SetDomainSRVHosts SetDomainSubServices SetDotNameForwarding SetFilePermissions SetHosts SetIPResolver |
72
|
|
|
|
|
|
|
SetPakRenew SetPassword SetPOPForwarding SetRegLock SetRenew SetResellerServicesPricing SetResellerTLDPricing |
73
|
|
|
|
|
|
|
SetSPFHosts SetUpPOP3User SL_AutoRenew SL_Configure SL_GetAccountDetail SL_GetAccounts StatusDomain |
74
|
|
|
|
|
|
|
SubAccountDomains SynchAuthInfo TEL_AddCTHUser TEL_GetCTHUserInfo TEL_GetCTHUserList TEL_GetPrivacy TEL_IsCTHUser |
75
|
|
|
|
|
|
|
TEL_UpdateCTHUser TEL_UpdatePrivacy TLD_AddWatchlist TLD_DeleteWatchlist TLD_GetTLD TLD_GetWatchlist |
76
|
|
|
|
|
|
|
TLD_GetWatchlistTlds TLD_Overview TLD_PortalGetAccountInfo TLD_PortalUpdateAccountInfo TM_Check TM_GetNotice |
77
|
|
|
|
|
|
|
TM_UpdateCart TP_CancelOrder TP_CreateOrder TP_GetDetailsByDomain TP_GetOrder TP_GetOrderDetail TP_GetOrderReview |
78
|
|
|
|
|
|
|
TP_GetOrdersByDomain TP_GetOrderStatuses TP_GetTLDInfo TP_ResendEmail TP_ResubmitLocked TP_SubmitOrder |
79
|
|
|
|
|
|
|
TP_UpdateOrderDetail TS_AutoRenew TS_Configure TS_GetAccountDetail TS_GetAccounts UpdateAccountInfo |
80
|
|
|
|
|
|
|
UpdateAccountPricing UpdateCart UpdateCusPreferences UpdateDomainFolder UpdateExpiredDomains |
81
|
|
|
|
|
|
|
UpdateHostPackagePricing UpdateMetaTag UpdateNameServer UpdateNotificationAmount UpdatePushList |
82
|
|
|
|
|
|
|
UpdateRenewalSettings ValidatePassword WBLConfigure WBLGetCategories WBLGetFields WBLGetStatus |
83
|
|
|
|
|
|
|
WebHostCreateDirectory WebHostCreatePOPBox WebHostDeletePOPBox WebHostGetCartItem WebHostGetOverageOptions |
84
|
|
|
|
|
|
|
WebHostGetOverages WebHostGetPackageComponentList WebHostGetPackageMinimums WebHostGetPackages WebHostGetPOPBoxes |
85
|
|
|
|
|
|
|
WebHostGetResellerPackages WebHostGetStats WebHostHelpInfo WebHostSetCustomPackage WebHostSetOverageOptions |
86
|
|
|
|
|
|
|
WebHostUpdatePassword WebHostUpdatePOPPassword WSC_GetAccountInfo WSC_GetAllPackages WSC_GetPricing WSC_Update_Ops |
87
|
|
|
|
|
|
|
XXX_GetMemberId XXX_RemoveMemberId XXX_SetMemberId |
88
|
|
|
|
|
|
|
); |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
has _ua => (is => 'lazy', builder => sub { HTTP::Tiny->new }); |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
fresh $_ => __PACKAGE__->_make_command_coderef($_) |
93
|
|
|
|
|
|
|
for @commands; |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub _make_command_coderef { |
96
|
|
|
|
|
|
|
my (undef, $command) = @_; |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
return sub { |
99
|
|
|
|
|
|
|
my ($self, @opts) = @_; |
100
|
|
|
|
|
|
|
my $uri = $self->_make_query_string($command, @opts); |
101
|
|
|
|
|
|
|
my $response = $self->_ua->get($uri)->{content}; |
102
|
|
|
|
|
|
|
my $response_type = $self->response_type; |
103
|
|
|
|
|
|
|
if ( $response_type eq "xml_simple" ) { |
104
|
|
|
|
|
|
|
$response = XMLin($response); |
105
|
|
|
|
|
|
|
$response->{errors} &&= [ values %{ $response->{errors} } ]; |
106
|
|
|
|
|
|
|
$response->{responses} &&= $response->{responses}{response}; |
107
|
|
|
|
|
|
|
$response->{responses} = [ $response->{responses} ] |
108
|
|
|
|
|
|
|
if $response->{ResponseCount} == 1; |
109
|
|
|
|
|
|
|
foreach my $key ( keys %{$response} ) { |
110
|
|
|
|
|
|
|
next unless $key =~ /(.*?)(\d+)$/; |
111
|
|
|
|
|
|
|
$response->{$1} = undef if ref $response->{$key}; |
112
|
|
|
|
|
|
|
$response->{$1}[ $2 - 1 ] = delete $response->{$key}; |
113
|
|
|
|
|
|
|
} |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
return $response; |
116
|
|
|
|
|
|
|
}; |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
1; |