Please enable JavaScript.
Coggle requires JavaScript to display documents.
ESR-7592 Scan – Hold / Release Web Service (ReturnsController: ..…
ESR-7592
Scan – Hold / Release Web Service
ReturnsController
:
...\UI\esw.Returns.UI\Controllers...
GetPackageStatus
(string id)
[
GetPackageStatusResponse
] = [OperationsWcfClient].GetPackageStatus(new GetPackageStatusRequest
{ EShopWorldPackageReference = [id] });
GetPackageStatusResponse
:
ScanStatus
Release
Hold
Return
HoldReleaseDecision
ScanStatus
#
ErrorDescription
ErrorCode
package
= _packageRepository.
GetPackageByEShopPackageReference
(request.
EShopWorldPackageReference
)
Package
Not Found
if:
Package is Null or
Package Order is Null
if (
package == null
||
package.Order == null
)
ScanStatus = NotFound
ErrorDescription = PackageConstants.ScanHoldReleasePackageNotFound
ErrorCode = PackageConstants.ScanHoldReleaseError
Log: "Package or order is null"
Release
a Package if it's:
A paid Checkout Order or if
There is no Payment record
(i.e., it's a de-minimus eDDU Order,
under the tax-collection threshold)
if (
package.Order.Payment == null
||
package.Order.Payment.IsPaid
)
ScanStatus = Release
Return
a Package if:
There is a refused Payment record for the order or
Aramex has rejected the Package (Russia)
else if (
package.Order.Payment != null
&&
package.Order.Payment.IsRefused
)
ScanStatus = ScanStatusEnum.Return
Hold
a package if:
Above scenarios do not apply
else
ScanStatus = Hold
Use
Scan Status
column if:
There is no Payment record and
There is a value on Scan Status property
if (**package.Order.Payment == null
&& package.PackageScanStatusCodeId != null**)
ScanStatus = Package.PackageScanStatusCodeId