1 package Net::Ikano::XMLUtil;
5 use base 'XML::Simple';
11 Unfortunately the Ikano API schema has xs:sequence everywhere, so we need to have most elements in a particular order.
12 This class solves this problem by extending XML::Simple and overriding sorted_keys to provide the element order for each request.
14 This is a helper class which should not be used directly. It requires particular options in the constructor (SuppressEmpty) which differ for XMLin and XMLout.
19 my ($self,$name,$hashref) = @_;
24 return qw( AddressLine1 AddressUnitType AddressUnitValue AddressCity
25 AddressState ZipCode Country LocationType ) case 'Address';
26 return qw( Address PhoneNumber CheckNetworks RequestClientIP ) case 'PreQual';
29 return qw( type ProductCustomId DSLPhoneNumber VirtualPhoneNumber Password
30 TermsId PrequalId CompanyName FirstName MiddleName LastName
31 ContactMethod ContactPhoneNumber ContactEmail ContactFax DateToOrder
32 RequestClientIP IspChange IspPrevious CurrentProvider ) case 'Order';
35 return qw( DSLPhoneNumber NewPassword ) case 'PasswordChange';
37 # account status change
38 return qw( type DSLServiceId DSLPhoneNumber ) case 'AccountStatusChange';
41 return $self->SUPER::sorted_keys($name, $hashref);