forked from JeremyDunn/php-fedex-api-wrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequest.php
More file actions
114 lines (101 loc) · 4.77 KB
/
Request.php
File metadata and controls
114 lines (101 loc) · 4.77 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?php
namespace FedEx\CloseService;
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 Close Service
*/
class Request extends AbstractRequest
{
const PRODUCTION_URL = 'https://gateway.fedex.com:443/web-services/close';
const TESTING_URL = 'https://gatewaybeta.fedex.com:443/web-services/close';
protected static $wsdlFileName = 'CloseService_v2.wsdl';
/**
* Sends the SmartPostCloseRequest and returns the response
*
* @param ComplexType\SmartPostCloseRequest $smartPostCloseRequest
* @param bool $returnStdClass Return the $stdClass response directly from \SoapClient
* @return ComplexType\SmartPostCloseReply|stdClass
*/
public function getSmartPostCloseReply(ComplexType\SmartPostCloseRequest $smartPostCloseRequest, $returnStdClass = false)
{
$response = $this->getSoapClient()->smartPostClose($smartPostCloseRequest->toArray());
if ($returnStdClass) {
return $response;
}
$smartPostCloseReply = new ComplexType\SmartPostCloseReply;
$smartPostCloseReply->populateFromStdClass($response);
return $smartPostCloseReply;
}
/**
* Sends the GroundCloseRequest and returns the response
*
* @param ComplexType\GroundCloseRequest $groundCloseRequest
* @param bool $returnStdClass Return the $stdClass response directly from \SoapClient
* @return ComplexType\GroundCloseReply|stdClass
*/
public function getGroundCloseReply(ComplexType\GroundCloseRequest $groundCloseRequest, $returnStdClass = false)
{
$response = $this->getSoapClient()->groundClose($groundCloseRequest->toArray());
if ($returnStdClass) {
return $response;
}
$groundCloseReply = new ComplexType\GroundCloseReply;
$groundCloseReply->populateFromStdClass($response);
return $groundCloseReply;
}
/**
* Sends the GroundCloseReportsReprintRequest and returns the response
*
* @param ComplexType\GroundCloseReportsReprintRequest $groundCloseReportsReprintRequest
* @param bool $returnStdClass Return the $stdClass response directly from \SoapClient
* @return ComplexType\GroundCloseReportsReprintReply|stdClass
*/
public function getGroundCloseReportsReprintReply(ComplexType\GroundCloseReportsReprintRequest $groundCloseReportsReprintRequest, $returnStdClass = false)
{
$response = $this->getSoapClient()->groundCloseReportsReprint($groundCloseReportsReprintRequest->toArray());
if ($returnStdClass) {
return $response;
}
$groundCloseReportsReprintReply = new ComplexType\GroundCloseReportsReprintReply;
$groundCloseReportsReprintReply->populateFromStdClass($response);
return $groundCloseReportsReprintReply;
}
/**
* Sends the GroundCloseWithDocumentsRequest and returns the response
*
* @param ComplexType\GroundCloseWithDocumentsRequest $groundCloseWithDocumentsRequest
* @param bool $returnStdClass Return the $stdClass response directly from \SoapClient
* @return ComplexType\GroundCloseDocumentsReply|stdClass
*/
public function getGroundCloseWithDocumentsReply(ComplexType\GroundCloseWithDocumentsRequest $groundCloseWithDocumentsRequest, $returnStdClass = false)
{
$response = $this->getSoapClient()->groundCloseWithDocuments($groundCloseWithDocumentsRequest->toArray());
if ($returnStdClass) {
return $response;
}
$groundCloseDocumentsReply = new ComplexType\GroundCloseDocumentsReply;
$groundCloseDocumentsReply->populateFromStdClass($response);
return $groundCloseDocumentsReply;
}
/**
* Sends the ReprintGroundCloseDocumentsRequest and returns the response
*
* @param ComplexType\ReprintGroundCloseDocumentsRequest $reprintGroundCloseDocumentsRequest
* @param bool $returnStdClass Return the $stdClass response directly from \SoapClient
* @return ComplexType\GroundCloseDocumentsReply|stdClass
*/
public function getReprintGroundCloseDocumentsReply(ComplexType\ReprintGroundCloseDocumentsRequest $reprintGroundCloseDocumentsRequest, $returnStdClass = false)
{
$response = $this->getSoapClient()->reprintGroundCloseDocuments($reprintGroundCloseDocumentsRequest->toArray());
if ($returnStdClass) {
return $response;
}
$groundCloseDocumentsReply = new ComplexType\GroundCloseDocumentsReply;
$groundCloseDocumentsReply->populateFromStdClass($response);
return $groundCloseDocumentsReply;
}
}