Skip to content

Commit 0cd13f5

Browse files
authored
Merge pull request #52 from JeremyDunn/dgld-service
Added DGLD Service
2 parents 8db27a0 + 47e26fe commit 0cd13f5

24 files changed

+1704
-1
lines changed

CHANGELOG.md

+22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# CHANGELOG
22

3+
## 2.5 (released 2017-11-02)
4+
- Added List Dangerous Goods Service
5+
6+
|Service|Version|
7+
|---|---|
8+
|Address Validation|2|
9+
|Close|2|
10+
|Courier Dispatch|3|
11+
|Locator|2|
12+
|Package Movement Information|5|
13+
|Pickup|3|
14+
|Rate|10|
15+
|Return Tag|1|
16+
|Ship|12|
17+
|Track|5|
18+
|Upload Document|1|
19+
|Open Ship|11|
20+
|Validation Availability and Commitment Service|6|
21+
|ASYNC Transaction Service|4|
22+
|In Flight Shipment Service|1|
23+
|DGLD Service|1|
24+
325
## 2.4 (released 2017-11-02)
426
- Added In Flight Shipment Service
527

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Each web service has it's own class namespace. See the official FedEx web servic
2525
* [Validation Availability and Commitment Service](src/FedEx/ValidationAvailabilityAndCommitmentService)
2626
* [ASYNC Transaction Service](src/FedEx/AsyncService)
2727
* [In Flight Shipment Service](src/FedEx/InFlightShipmentService)
28+
* [DGLD Service](src/FedEx/DGLDService)
2829

2930
## Installation
3031

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
<?php
2+
namespace FedEx\DGLDService\ComplexType;
3+
4+
use FedEx\AbstractComplexType;
5+
6+
/**
7+
* Descriptive data for a physical location. May be used as an actual physical address (place to which one could go), or as a container of "address parts" which should be handled as a unit (such as a city-state-ZIP combination within the US).
8+
*
9+
* @author Jeremy Dunn <jeremy@jsdunn.info>
10+
* @package PHP FedEx API wrapper
11+
* @subpackage List Dangerous Goods Service
12+
*
13+
* @property string[] $StreetLines
14+
* @property string $City
15+
* @property string $StateOrProvinceCode
16+
* @property string $PostalCode
17+
* @property string $UrbanizationCode
18+
* @property string $CountryCode
19+
* @property string $CountryName
20+
* @property boolean $Residential
21+
22+
*/
23+
class Address extends AbstractComplexType
24+
{
25+
/**
26+
* Name of this complex type
27+
*
28+
* @var string
29+
*/
30+
protected $name = 'Address';
31+
32+
/**
33+
* Combination of number, street name, etc. At least one line is required for a valid physical address; empty lines should not be included.
34+
*
35+
* @param string $streetLines
36+
* @return $this
37+
*/
38+
public function setStreetLines($streetLines)
39+
{
40+
$this->values['StreetLines'] = $streetLines;
41+
return $this;
42+
}
43+
44+
/**
45+
* Name of city, town, etc.
46+
*
47+
* @param string $city
48+
* @return $this
49+
*/
50+
public function setCity($city)
51+
{
52+
$this->values['City'] = $city;
53+
return $this;
54+
}
55+
56+
/**
57+
* Identifying abbreviation for US state, Canada province, etc. Format and presence of this field will vary, depending on country.
58+
*
59+
* @param string $stateOrProvinceCode
60+
* @return $this
61+
*/
62+
public function setStateOrProvinceCode($stateOrProvinceCode)
63+
{
64+
$this->values['StateOrProvinceCode'] = $stateOrProvinceCode;
65+
return $this;
66+
}
67+
68+
/**
69+
* Identification of a region (usually small) for mail/package delivery. Format and presence of this field will vary, depending on country.
70+
*
71+
* @param string $postalCode
72+
* @return $this
73+
*/
74+
public function setPostalCode($postalCode)
75+
{
76+
$this->values['PostalCode'] = $postalCode;
77+
return $this;
78+
}
79+
80+
/**
81+
* Relevant only to addresses in Puerto Rico.
82+
*
83+
* @param string $urbanizationCode
84+
* @return $this
85+
*/
86+
public function setUrbanizationCode($urbanizationCode)
87+
{
88+
$this->values['UrbanizationCode'] = $urbanizationCode;
89+
return $this;
90+
}
91+
92+
/**
93+
* The two-letter code used to identify a country.
94+
*
95+
* @param string $countryCode
96+
* @return $this
97+
*/
98+
public function setCountryCode($countryCode)
99+
{
100+
$this->values['CountryCode'] = $countryCode;
101+
return $this;
102+
}
103+
104+
/**
105+
* The fully spelt out name of a country.
106+
*
107+
* @param string $countryName
108+
* @return $this
109+
*/
110+
public function setCountryName($countryName)
111+
{
112+
$this->values['CountryName'] = $countryName;
113+
return $this;
114+
}
115+
116+
/**
117+
* Indicates whether this address residential (as opposed to commercial).
118+
*
119+
* @param boolean $residential
120+
* @return $this
121+
*/
122+
public function setResidential($residential)
123+
{
124+
$this->values['Residential'] = $residential;
125+
return $this;
126+
}
127+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?php
2+
namespace FedEx\DGLDService\ComplexType;
3+
4+
use FedEx\AbstractComplexType;
5+
6+
/**
7+
* Descriptive data for the client submitting a transaction.
8+
*
9+
* @author Jeremy Dunn <jeremy@jsdunn.info>
10+
* @package PHP FedEx API wrapper
11+
* @subpackage List Dangerous Goods Service
12+
*
13+
* @property string $AccountNumber
14+
* @property string $MeterNumber
15+
* @property string $MeterInstance
16+
* @property string $IntegratorId
17+
* @property \FedEx\DGLDService\SimpleType\ExpressRegionCode|string $Region
18+
* @property Localization $Localization
19+
20+
*/
21+
class ClientDetail extends AbstractComplexType
22+
{
23+
/**
24+
* Name of this complex type
25+
*
26+
* @var string
27+
*/
28+
protected $name = 'ClientDetail';
29+
30+
/**
31+
* The FedEx account number associated with this transaction.
32+
*
33+
* @param string $accountNumber
34+
* @return $this
35+
*/
36+
public function setAccountNumber($accountNumber)
37+
{
38+
$this->values['AccountNumber'] = $accountNumber;
39+
return $this;
40+
}
41+
42+
/**
43+
* This number is assigned by FedEx and identifies the unique device from which the request is originating
44+
*
45+
* @param string $meterNumber
46+
* @return $this
47+
*/
48+
public function setMeterNumber($meterNumber)
49+
{
50+
$this->values['MeterNumber'] = $meterNumber;
51+
return $this;
52+
}
53+
54+
/**
55+
* Set MeterInstance
56+
*
57+
* @param string $meterInstance
58+
* @return $this
59+
*/
60+
public function setMeterInstance($meterInstance)
61+
{
62+
$this->values['MeterInstance'] = $meterInstance;
63+
return $this;
64+
}
65+
66+
/**
67+
* Only used in transactions which require identification of the FedEx Office integrator.
68+
*
69+
* @param string $integratorId
70+
* @return $this
71+
*/
72+
public function setIntegratorId($integratorId)
73+
{
74+
$this->values['IntegratorId'] = $integratorId;
75+
return $this;
76+
}
77+
78+
/**
79+
* Indicates the region from which the transaction is submitted.
80+
*
81+
* @param \FedEx\DGLDService\SimpleType\ExpressRegionCode|string $region
82+
* @return $this
83+
*/
84+
public function setRegion($region)
85+
{
86+
$this->values['Region'] = $region;
87+
return $this;
88+
}
89+
90+
/**
91+
* The language to be used for human-readable Notification.localizedMessages in responses to the request containing this ClientDetail object. Different requests from the same client may contain different Localization data. (Contrast with TransactionDetail.localization, which governs data payload language/translation.)
92+
*
93+
* @param Localization $localization
94+
* @return $this
95+
*/
96+
public function setLocalization(Localization $localization)
97+
{
98+
$this->values['Localization'] = $localization;
99+
return $this;
100+
}
101+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?php
2+
namespace FedEx\DGLDService\ComplexType;
3+
4+
use FedEx\AbstractComplexType;
5+
6+
/**
7+
* ListDangerousGoodsDetail
8+
*
9+
* @author Jeremy Dunn <jeremy@jsdunn.info>
10+
* @package PHP FedEx API wrapper
11+
* @subpackage List Dangerous Goods Service
12+
*
13+
* @property string[] $TrackingNumbers
14+
* @property string $Description
15+
* @property \FedEx\DGLDService\SimpleType\DangerousGoodsAccessibilityType|string $Accessibility
16+
* @property \FedEx\DGLDService\SimpleType\HazardousCommodityOptionType|string[] $Options
17+
18+
*/
19+
class ListDangerousGoodsDetail extends AbstractComplexType
20+
{
21+
/**
22+
* Name of this complex type
23+
*
24+
* @var string
25+
*/
26+
protected $name = 'ListDangerousGoodsDetail';
27+
28+
/**
29+
* Set TrackingNumbers
30+
*
31+
* @param string $trackingNumbers
32+
* @return $this
33+
*/
34+
public function setTrackingNumbers($trackingNumbers)
35+
{
36+
$this->values['TrackingNumbers'] = $trackingNumbers;
37+
return $this;
38+
}
39+
40+
/**
41+
* Specifies detailed commodity information related to the regulations.
42+
*
43+
* @param string $description
44+
* @return $this
45+
*/
46+
public function setDescription($description)
47+
{
48+
$this->values['Description'] = $description;
49+
return $this;
50+
}
51+
52+
/**
53+
* Set Accessibility
54+
*
55+
* @param \FedEx\DGLDService\SimpleType\DangerousGoodsAccessibilityType|string $accessibility
56+
* @return $this
57+
*/
58+
public function setAccessibility($accessibility)
59+
{
60+
$this->values['Accessibility'] = $accessibility;
61+
return $this;
62+
}
63+
64+
/**
65+
* Set Options
66+
*
67+
* @param \FedEx\DGLDService\SimpleType\HazardousCommodityOptionType[]|string[] $options
68+
* @return $this
69+
*/
70+
public function setOptions(array $options)
71+
{
72+
$this->values['Options'] = $options;
73+
return $this;
74+
}
75+
}

0 commit comments

Comments
 (0)