From 8b5c39a2918ed31d1aa9d82fac47100cb2e260f9 Mon Sep 17 00:00:00 2001 From: Chris Wall Date: Wed, 18 Oct 2017 11:00:48 +0100 Subject: [PATCH] copy required classes from AM implementation to EA --- DHL/Datatype/EA/BkgDetailsType.php | 167 +++++++++++++++++++++++++++ DHL/Datatype/EA/DCTDutiable.php | 61 ++++++++++ DHL/Datatype/EA/DCTFrom.php | 76 ++++++++++++ DHL/Datatype/EA/DCTTo.php | 76 ++++++++++++ DHL/Datatype/EA/PieceType.php | 81 +++++++++++++ DHL/Datatype/EA/QtdShpExChrgType.php | 61 ++++++++++ DHL/Datatype/EA/QtdShpType.php | 66 +++++++++++ DHL/Entity/EA/GetQuote.php | 85 ++++++++++++++ 8 files changed, 673 insertions(+) create mode 100644 DHL/Datatype/EA/BkgDetailsType.php create mode 100644 DHL/Datatype/EA/DCTDutiable.php create mode 100644 DHL/Datatype/EA/DCTFrom.php create mode 100644 DHL/Datatype/EA/DCTTo.php create mode 100644 DHL/Datatype/EA/PieceType.php create mode 100644 DHL/Datatype/EA/QtdShpExChrgType.php create mode 100644 DHL/Datatype/EA/QtdShpType.php create mode 100644 DHL/Entity/EA/GetQuote.php diff --git a/DHL/Datatype/EA/BkgDetailsType.php b/DHL/Datatype/EA/BkgDetailsType.php new file mode 100644 index 0000000..d8510b1 --- /dev/null +++ b/DHL/Datatype/EA/BkgDetailsType.php @@ -0,0 +1,167 @@ + array( + 'type' => '', + 'required' => true, + 'subobject' => false, + ), + 'Date' => array( + 'type' => '', + 'required' => true, + 'subobject' => false, + ), + 'ReadyTime' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'ReadyTimeGMTOffset' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'DimensionUnit' => array( + 'type' => '', + 'required' => true, + 'subobject' => false, + ), + 'WeightUnit' => array( + 'type' => '', + 'required' => true, + 'subobject' => false, + ), + 'NumberOfPieces' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'ShipmentWeight' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'Volume' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'MaxPieceWeight' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'MaxPieceHeight' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'MaxPieceDepth' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'MaxPieceWidth' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'Pieces' => array( + 'type' => 'PieceType', + 'required' => false, + 'subobject' => false, + 'multivalues' => true, + ), + 'PaymentAccountNumber' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'IsDutiable' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'NetworkTypeCode' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'QtdShp' => array( + 'type' => 'QtdShpType', + 'required' => true, + 'subobject' => true, + ), + 'CODAmount' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'CODCurrencyCode' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'CODAccountNumber' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'InsuredValue' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'InsuredCurrency' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + ); +} diff --git a/DHL/Datatype/EA/DCTDutiable.php b/DHL/Datatype/EA/DCTDutiable.php new file mode 100644 index 0000000..351ff2f --- /dev/null +++ b/DHL/Datatype/EA/DCTDutiable.php @@ -0,0 +1,61 @@ + array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'DeclaredValue' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + ); +} diff --git a/DHL/Datatype/EA/DCTFrom.php b/DHL/Datatype/EA/DCTFrom.php new file mode 100644 index 0000000..4f68d02 --- /dev/null +++ b/DHL/Datatype/EA/DCTFrom.php @@ -0,0 +1,76 @@ + array( + 'type' => '', + 'required' => true, + 'subobject' => false, + ), + 'Postalcode' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'City' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'Suburb' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'VatNo' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + ); +} diff --git a/DHL/Datatype/EA/DCTTo.php b/DHL/Datatype/EA/DCTTo.php new file mode 100644 index 0000000..4acf2e4 --- /dev/null +++ b/DHL/Datatype/EA/DCTTo.php @@ -0,0 +1,76 @@ + array( + 'type' => '', + 'required' => true, + 'subobject' => false, + ), + 'Postalcode' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'City' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'Suburb' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'VatNo' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + ); +} diff --git a/DHL/Datatype/EA/PieceType.php b/DHL/Datatype/EA/PieceType.php new file mode 100644 index 0000000..1ea8c43 --- /dev/null +++ b/DHL/Datatype/EA/PieceType.php @@ -0,0 +1,81 @@ + array( + 'type' => '', + 'required' => true, + 'subobject' => false, + ), + 'PackageTypeCode' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'Height' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'Depth' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'Width' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'Weight' => array( + 'type' => '', + 'required' => true, + 'subobject' => false, + ), + ); +} diff --git a/DHL/Datatype/EA/QtdShpExChrgType.php b/DHL/Datatype/EA/QtdShpExChrgType.php new file mode 100644 index 0000000..8f16bba --- /dev/null +++ b/DHL/Datatype/EA/QtdShpExChrgType.php @@ -0,0 +1,61 @@ + array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + 'LocalSpecialServiceType' => array( + 'type' => '', + 'required' => false, + 'subobject' => false, + ), + ); +} diff --git a/DHL/Datatype/EA/QtdShpType.php b/DHL/Datatype/EA/QtdShpType.php new file mode 100644 index 0000000..71d148f --- /dev/null +++ b/DHL/Datatype/EA/QtdShpType.php @@ -0,0 +1,66 @@ + array( + 'type' => 'string', + 'required' => false, + 'subobject' => false, + ), + 'LocalProductCode' => array( + 'type' => 'string', + 'required' => false, + 'subobject' => false, + ), + 'QtdShpExChrg' => array( + 'type' => 'QtdShpExChrgType', + 'required' => false, + 'subobject' => true, + ), + ); +} diff --git a/DHL/Entity/EA/GetQuote.php b/DHL/Entity/EA/GetQuote.php new file mode 100644 index 0000000..c6677b2 --- /dev/null +++ b/DHL/Entity/EA/GetQuote.php @@ -0,0 +1,85 @@ + array( + 'type' => 'DCTFrom', + 'required' => false, + 'subobject' => true, + 'multivalues' => false, + 'minOccurs' => 1, + ), + 'BkgDetails' => array( + 'type' => 'BkgDetailsType', + 'required' => false, + 'subobject' => true, + 'multivalues' => false, + 'minOccurs' => 1, + ), + 'To' => array( + 'type' => 'DCTTo', + 'required' => false, + 'subobject' => true, + 'multivalues' => false, + 'minOccurs' => 1, + ), + 'Dutiable' => array( + 'type' => 'DCTDutiable', + 'required' => false, + 'subobject' => true, + 'multivalues' => false, + 'minOccurs' => 0, + ), + ); +}