Shipment/UPS/WSDL/RateInterfaces/RateService/RatePort.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 20 / 20 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Shipment/Temando/WSDL/Interfaces/quoting_Service/quoting_port.pm ↑ Summary
1 package Shipment::UPS::WSDL::RateInterfaces::RateService::RatePort;
2 $Shipment::UPS::WSDL::RateInterfaces::RateService::RatePort::VERSION = '3.11';
3 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use Class::Std::Fast::Storable;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 4 ▶use Scalar::Util qw(blessed);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 4 ▶use base qw(SOAP::WSDL::Client::Base);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9  
10 # only load if it hasn't been loaded before
11 require Shipment::UPS::WSDL::RateTypemaps::RateService
12 if not Shipment::UPS::WSDL::RateTypemaps::RateService->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/Rate')
20 if not $_[2]->{proxy};
21  
22 $_[0]->set_class_resolver('Shipment::UPS::WSDL::RateTypemaps::RateService')
23 if not $_[2]->{class_resolver};
24  
25 $_[0]->set_prefix($_[2]->{use_prefix}) if exists $_[2]->{use_prefix};
26 }
27  
28 sub ProcessRate {
29 my ($self, $body, $header) = @_;
30 die "ProcessRate must be called as object method (\$self is <$self>)"
31 if not blessed($self);
32 return $self->SUPER::call(
33 { operation => 'ProcessRate',
34 soap_action =>
35 'http://onlinetools.ups.com/webservices/RateBinding/v1.1',
36 style => 'document',
37 body => {
38  
39  
40 'use' => 'literal',
41 namespace => 'http://schemas.xmlsoap.org/wsdl/soap/',
42 encodingStyle => '',
43 parts =>
44 [qw( Shipment::UPS::WSDL::RateElements::RateRequest )],
45 },
46 header => {
47  
48 'use' => 'literal',
49 namespace => 'http://schemas.xmlsoap.org/wsdl/soap/',
50 encodingStyle => '',
51 parts =>
52 [qw( Shipment::UPS::WSDL::RateElements::UPSSecurity )],
53  
54 },
55 headerfault => {
56  
57 },
58 response => {
59 header => {
60  
61 },
62 body => {
63  
64  
65 'use' => 'literal',
66 namespace => 'http://schemas.xmlsoap.org/wsdl/soap/',
67 encodingStyle => '',
68 parts =>
69 [qw( Shipment::UPS::WSDL::RateElements::RateResponse )],
70 },
71 }
72 },
73 $body,
74 $header
75 );
76 }
77  
78  
79 sub _get_name_resolver {
80  
81 my $prefix_1 = {
82 'attribute' => 'Shipment::UPS::WSDL::RateAttributes',
83 'typemap' => 'Shipment::UPS::WSDL::RateTypemaps',
84 'interface' => 'Shipment::UPS::WSDL::RateInterfaces',
85 'type' => 'Shipment::UPS::WSDL::RateTypes',
86 'server' => 'Shipment::UPS::WSDL::RateServer',
87 'element' => 'Shipment::UPS::WSDL::RateElements'
88 };
89  
90  
91 return SOAP::WSDL::Generator::Template::Plugin::XSD->new(
92 { prefix_resolver => SOAP::WSDL::Generator::PrefixResolver->new(
93 { namespace_prefix_map => {
94 'http://www.w3.org/2001/XMLSchema' =>
95 'SOAP::WSDL::XSD::Typelib::Builtin',
96 },
97 namespace_map => {},
98 prefix => $prefix_1,
99 }
100 )
101 }
102 );
103 }
104  
105 1;
106  
107 __END__
« Shipment/Temando/WSDL/Interfaces/quoting_Service/quoting_port.pm ↑ Summary