Shipment/UPS/WSDL/TrackInterfaces/TrackService/TrackPort.pm untested

filter: Statementstmt 0.0% 0 / 34 Branchbran 0.0% 0 / 10 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 57 CC 5 SCAR 21.6
CC
5
Cov
0%
START
20.0
ProcessTrack
6.0
BEGIN
2.0
CRAP 8.7
1 package Shipment::UPS::WSDL::TrackInterfaces::TrackService::TrackPort;
2 $Shipment::UPS::WSDL::TrackInterfaces::TrackService::TrackPort::VERSION = '3.11';
3 use strict;
4 use warnings;
5 use Class::Std::Fast::Storable;
6 use Scalar::Util qw(blessed);
7 use base qw(SOAP::WSDL::Client::Base);
8  
9  
10 # only load if it hasn't been loaded before
11 require Shipment::UPS::WSDL::TrackTypemaps::TrackService
12 if not Shipment::UPS::WSDL::TrackTypemaps::TrackService->can('get_class');
13  
14  
15 sub START {
16  
17 my $proxy_domain = $_[2]->{proxy_domain} || 'wwwcie.ups.com';
18  
19 $_[0]->set_proxy('https://' . $proxy_domain . '/webservices/Track')
20 if not $_[2]->{proxy};
21  
22 $_[0]
23 ->set_class_resolver('Shipment::UPS::WSDL::TrackTypemaps::TrackService')
24 if not $_[2]->{class_resolver};
25  
26 $_[0]->set_prefix($_[2]->{use_prefix}) if exists $_[2]->{use_prefix};
27 }
28  
29 sub ProcessTrack {
30 my ($self, $body, $header) = @_;
31 die "ProcessTrack must be called as object method (\$self is <$self>)"
32 if not blessed($self);
33 return $self->SUPER::call(
34 { operation => 'ProcessTrack',
35 soap_action =>
36 'http://onlinetools.ups.com/webservices/TrackBinding/v2.0',
37 style => 'document',
38 body => {
39  
40  
41 'use' => 'literal',
42 namespace => 'http://schemas.xmlsoap.org/wsdl/soap/',
43 encodingStyle => '',
44 parts =>
45 [qw( Shipment::UPS::WSDL::TrackElements::TrackRequest )],
46 },
47 header => {
48  
49 'use' => 'literal',
50 namespace => 'http://schemas.xmlsoap.org/wsdl/soap/',
51 encodingStyle => '',
52 parts =>
53 [qw( Shipment::UPS::WSDL::TrackElements::UPSSecurity )],
54  
55 },
56 headerfault => {
57  
58 },
59 response => {
60 header => {
61  
62 },
63 body => {
64  
65  
66 'use' => 'literal',
67 namespace => 'http://schemas.xmlsoap.org/wsdl/soap/',
68 encodingStyle => '',
69 parts => [
70 qw( Shipment::UPS::WSDL::TrackElements::TrackResponse )
71 ],
72 },
73 }
74 },
75 $body,
76 $header
77 );
78 }
79  
80  
81 1;
82  
83 __END__