Skip to content

Commit 417b325

Browse files
authored
Merge pull request #187 from mixisLv/master
Update services, tests, examples and composer packages
2 parents cc77867 + bce84fb commit 417b325

File tree

792 files changed

+67537
-20832
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

792 files changed

+67537
-20832
lines changed

.travis.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
language: php
22

33
php:
4-
- 7.0
5-
- 7.1
6-
- 7.2
74
- 7.3
5+
- 7.4
6+
- 8.0
87

98
install:
10-
- composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable
9+
- composer update --no-interaction --no-ansi --no-progress --optimize-autoloader --prefer-stable
1110

1211
script: vendor/bin/phpunit
1312

1413
notifications:
15-
email: false
14+
email: false

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@
1313
}
1414
],
1515
"require": {
16+
"php": "^7.3|^8.0",
1617
"ext-soap": "*"
1718
},
1819
"require-dev": {
19-
"fzaninotto/faker": "^1.5",
2020
"symfony/console": "^5.2",
2121
"phpunit/phpunit": "^9.5",
22-
"squizlabs/php_codesniffer": "^3.5"
22+
"squizlabs/php_codesniffer": "^3.5",
23+
"fakerphp/faker": "^1.16"
2324
},
2425
"autoload": {
2526
"psr-4": {

composer.lock

Lines changed: 264 additions & 184 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/address-validation.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
2+
//remember to copy example.credentials.php as credentials.php replace 'FEDEX_KEY', 'FEDEX_PASSWORD', 'FEDEX_ACCOUNT_NUMBER', and 'FEDEX_METER_NUMBER'
33
require_once 'credentials.php';
44
require_once 'bootstrap.php';
55

@@ -19,7 +19,7 @@
1919

2020
// Version
2121
$addressValidationRequest->Version->ServiceId = 'aval';
22-
$addressValidationRequest->Version->Major = 4;
22+
$addressValidationRequest->Version->Major = 8;
2323
$addressValidationRequest->Version->Intermediate = 0;
2424
$addressValidationRequest->Version->Minor = 0;
2525

@@ -32,8 +32,10 @@
3232
$addressValidationRequest->AddressesToValidate[0]->Address->CountryCode = 'US';
3333

3434
$request = new Request();
35-
//$request->getSoapClient()->__setLocation(Request::PRODUCTION_URL);
36-
$request->getSoapClient()->__setLocation(Request::TESTING_URL);
37-
$addressValidationReply = $request->getAddressValidationReply($addressValidationRequest);
38-
39-
var_dump($addressValidationReply);
35+
try {
36+
$addressValidationReply = $request->getAddressValidationReply($addressValidationRequest);
37+
var_dump($addressValidationReply);
38+
} catch (\Exception $e) {
39+
echo $e->getMessage();
40+
echo $request->getSoapClient()->__getLastResponse();
41+
}

examples/async-retrieve-job-results.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
$request = new Request();
3030
try {
3131
$retrieveJobResultsReply = $request->getRetrieveJobResultsReply($retrieveJobResultsRequest);
32+
var_dump($retrieveJobResultsReply);
3233
} catch (\Exception $e) {
34+
echo $e->getMessage();
3335
echo $request->getSoapClient()->__getLastResponse();
3436
}
3537

examples/cancel-pending-shipment.php

Lines changed: 0 additions & 27 deletions
This file was deleted.

examples/close-service.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,11 @@
3838
// Manifest reference detail.
3939
$closeWithDocumentsRequest->CloseDocumentSpecification->CloseDocumentTypes = [SimpleType\CloseDocumentType::_MANIFEST];
4040

41-
42-
$closeSerivceRequest = new Request();
43-
$closeWithDocumentsReply = $closeSerivceRequest->getCloseWithDocumentsReply($closeWithDocumentsRequest);
44-
45-
var_dump($closeWithDocumentsReply);
46-
47-
48-
49-
50-
41+
$request = new Request();
42+
try {
43+
$closeWithDocumentsReply = $request->getCloseWithDocumentsReply($closeWithDocumentsRequest);
44+
var_dump($closeWithDocumentsReply);
45+
} catch (\Exception $e) {
46+
echo $e->getMessage();
47+
echo $request->getSoapClient()->__getLastResponse();
48+
}

examples/country-service.php

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,22 @@
2828
$validatePostalRequest->CarrierCode = SimpleType\CarrierCodeType::_FDXE;
2929

3030
// Get Validate Postal reply.
31-
$countryServiceRequest = new Request();
32-
$validatePostalReply = $countryServiceRequest->getValidatePostalReply($validatePostalRequest);
33-
34-
echo '<h1>Postal Detail</h1>';
35-
echo "<h2>Country Code: {$validatePostalReply->PostalDetail->CountryCode}</h2>";
36-
echo "<h2>State or Province Code: {$validatePostalReply->PostalDetail->StateOrProvinceCode}</h2>";
37-
echo "<h2>City First Initials: {$validatePostalReply->PostalDetail->CityFirstInitials}</h2>";
38-
echo "<h2>Cleaned Postal Code: {$validatePostalReply->PostalDetail->CleanedPostalCode}</h2>";
39-
echo '<h2> Location Descriptions: </h2>';
40-
if (!empty($validatePostalReply->PostalDetail->LocationDescriptions)) {
41-
foreach ($validatePostalReply->PostalDetail->LocationDescriptions as $locationDescription) {
42-
var_dump($locationDescription->toArray());
31+
$request = new Request();
32+
try {
33+
$validatePostalReply = $request->getValidatePostalReply($validatePostalRequest);
34+
35+
echo '<h1>Postal Detail</h1>';
36+
echo "<h2>Country Code: {$validatePostalReply->PostalDetail->CountryCode}</h2>";
37+
echo "<h2>State or Province Code: {$validatePostalReply->PostalDetail->StateOrProvinceCode}</h2>";
38+
echo "<h2>City First Initials: {$validatePostalReply->PostalDetail->CityFirstInitials}</h2>";
39+
echo "<h2>Cleaned Postal Code: {$validatePostalReply->PostalDetail->CleanedPostalCode}</h2>";
40+
echo '<h2> Location Descriptions: </h2>';
41+
if (!empty($validatePostalReply->PostalDetail->LocationDescriptions)) {
42+
foreach ($validatePostalReply->PostalDetail->LocationDescriptions as $locationDescription) {
43+
var_dump($locationDescription->toArray());
44+
}
4345
}
46+
} catch (\Exception $e) {
47+
echo $e->getMessage();
48+
echo $request->getSoapClient()->__getLastResponse();
4449
}

examples/create-open-shipment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
$createOpenShipmentRequest->ClientDetail->AccountNumber = FEDEX_ACCOUNT_NUMBER;
2222
// version
2323
$createOpenShipmentRequest->Version->ServiceId = 'ship';
24-
$createOpenShipmentRequest->Version->Major = 15;
24+
$createOpenShipmentRequest->Version->Major = 20;
2525
$createOpenShipmentRequest->Version->Intermediate = 0;
2626
$createOpenShipmentRequest->Version->Minor = 0;
2727

examples/create-pending-shipment.php

Lines changed: 0 additions & 99 deletions
This file was deleted.

0 commit comments

Comments
 (0)