Shipment/FedEx/WSDL/RateInterfaces/RateService/RateServicePort.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/CanadaPost/XSD.pm ↑ Summary Shipment/Purolator/WSDLV2/Interfaces/ServiceAvailabilityService/ServiceAvailabilityServiceEndpoint.pm »
1 package Shipment::FedEx::WSDL::RateInterfaces::RateService::RateServicePort;
2 $Shipment::FedEx::WSDL::RateInterfaces::RateService::RateServicePort::VERSION = '3.11';
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use Class::Std::Fast::Storable;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use Scalar::Util qw(blessed);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶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::FedEx::WSDL::RateTypemaps::RateService
12 if not Shipment::FedEx::WSDL::RateTypemaps::RateService->can('get_class');
13  
14  
15 sub START {
16  
17 my $proxy_domain = $_[2]->{proxy_domain} || 'wsbeta.fedex.com:443';
18  
19 $_[0]->set_proxy('https://' . $proxy_domain . '/web-services/rate')
20 if not $_[2]->{proxy};
21  
22 $_[0]
23 ->set_class_resolver('Shipment::FedEx::WSDL::RateTypemaps::RateService')
24 if not $_[2]->{class_resolver};
25  
26 $_[0]->set_prefix($_[2]->{use_prefix}) if exists $_[2]->{use_prefix};
27 }
28  
29 sub getRates {
30 my ($self, $body, $header) = @_;
31 die "getRates must be called as object method (\$self is <$self>)"
32 if not blessed($self);
33 return $self->SUPER::call(
34 { operation => 'getRates',
35 soap_action => 'getRates',
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::FedEx::WSDL::RateElements::RateRequest )],
45 },
46 header => {
47  
48 },
49 headerfault => {
50  
51 },
52 response => {
53 header => {
54  
55 },
56 body => {
57  
58  
59 'use' => 'literal',
60 namespace => 'http://schemas.xmlsoap.org/wsdl/soap/',
61 encodingStyle => '',
62 parts =>
63 [qw( Shipment::FedEx::WSDL::RateElements::RateReply )],
64 },
65 }
66 },
67 $body,
68 $header
69 );
70 }
71  
72  
73 sub _get_name_resolver {
74  
75 my $prefix_1 = {
76 'attribute' => 'Shipment::FedEx::WSDL::RateAttributes',
77 'typemap' => 'Shipment::FedEx::WSDL::RateTypemaps',
78 'interface' => 'Shipment::FedEx::WSDL::RateInterfaces',
79 'type' => 'Shipment::FedEx::WSDL::RateTypes',
80 'server' => 'Shipment::FedEx::WSDL::RateServer',
81 'element' => 'Shipment::FedEx::WSDL::RateElements'
82 };
83  
84  
85 return SOAP::WSDL::Generator::Template::Plugin::XSD->new(
86 { prefix_resolver => SOAP::WSDL::Generator::PrefixResolver->new(
87 { namespace_prefix_map => {
88 'http://www.w3.org/2001/XMLSchema' =>
89 'SOAP::WSDL::XSD::Typelib::Builtin',
90 },
91 namespace_map => {},
92 prefix => $prefix_1,
93 }
94 )
95 }
96 );
97 }
98  
99 1;
100  
101 __END__
« Shipment/CanadaPost/XSD.pm ↑ Summary Shipment/Purolator/WSDLV2/Interfaces/ServiceAvailabilityService/ServiceAvailabilityServiceEndpoint.pm »