-
Notifications
You must be signed in to change notification settings - Fork 184
/
Request.php
76 lines (67 loc) · 3.26 KB
/
Request.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
namespace FedEx\ValidationAvailabilityAndCommitmentService;
use FedEx\AbstractRequest;
/**
* Request sends the SOAP call to the FedEx servers and returns the response
*
* @author Jeremy Dunn <[email protected]>
* @package PHP FedEx API wrapper
* @subpackage Validation Availability And Commitment Service Service
*/
class Request extends AbstractRequest
{
const PRODUCTION_URL = 'https://ws.fedex.com:443/web-services/vacs';
const TESTING_URL = 'https://wsbeta.fedex.com:443/web-services/vacs';
protected static $wsdlFileName = 'ValidationAvailabilityAndCommitmentService_v17.wsdl';
/**
* Sends the GetAllServicesAndPackagingRequest and returns the response
*
* @param ComplexType\GetAllServicesAndPackagingRequest $getAllServicesAndPackagingRequest
* @param bool $returnStdClass Return the $stdClass response directly from \SoapClient
* @return ComplexType\GetAllServicesAndPackagingReply|stdClass
*/
public function getGetAllServicesAndPackagingReply(ComplexType\GetAllServicesAndPackagingRequest $getAllServicesAndPackagingRequest, $returnStdClass = false)
{
$response = $this->getSoapClient()->getAllServicesAndPackaging($getAllServicesAndPackagingRequest->toArray());
if ($returnStdClass) {
return $response;
}
$getAllServicesAndPackagingReply = new ComplexType\GetAllServicesAndPackagingReply;
$getAllServicesAndPackagingReply->populateFromStdClass($response);
return $getAllServicesAndPackagingReply;
}
/**
* Sends the GetAllSpecialServicesRequest and returns the response
*
* @param ComplexType\GetAllSpecialServicesRequest $getAllSpecialServicesRequest
* @param bool $returnStdClass Return the $stdClass response directly from \SoapClient
* @return ComplexType\GetAllSpecialServicesReply|stdClass
*/
public function getGetAllSpecialServicesReply(ComplexType\GetAllSpecialServicesRequest $getAllSpecialServicesRequest, $returnStdClass = false)
{
$response = $this->getSoapClient()->getAllSpecialServices($getAllSpecialServicesRequest->toArray());
if ($returnStdClass) {
return $response;
}
$getAllSpecialServicesReply = new ComplexType\GetAllSpecialServicesReply;
$getAllSpecialServicesReply->populateFromStdClass($response);
return $getAllSpecialServicesReply;
}
/**
* Sends the ServiceAvailabilityRequest and returns the response
*
* @param ComplexType\ServiceAvailabilityRequest $serviceAvailabilityRequest
* @param bool $returnStdClass Return the $stdClass response directly from \SoapClient
* @return ComplexType\ServiceAvailabilityReply|stdClass
*/
public function getServiceAvailabilityReply(ComplexType\ServiceAvailabilityRequest $serviceAvailabilityRequest, $returnStdClass = false)
{
$response = $this->getSoapClient()->serviceAvailability($serviceAvailabilityRequest->toArray());
if ($returnStdClass) {
return $response;
}
$serviceAvailabilityReply = new ComplexType\ServiceAvailabilityReply;
$serviceAvailabilityReply->populateFromStdClass($response);
return $serviceAvailabilityReply;
}
}