@startuml
actor Client
Client->RSP: [[https://bitbucket.service.edp.t-mobile.com/projects/EITCODEDOC/repos/flow-documentation/browse/wsdl/ce.dsg.dm/HandsetUpgradeService.wsdl?at=refs%2Fheads%2FClearwatertest getOrderHistory]] HandsetUpgrade.getOrderHistory


group When Request validation is failed
RSP->RSP:- Validate OrderHistoryRequest \n[if request has isPrepaidAccount as 'false' or 'null'] \n Then set the statusReport with error and status.\n ERROR: 201007/Invalid input
RSP->Client:-Return status response to the client
end


RSP-> HSO:[[https://bitbucket.service.edp.t-mobile.com/projects/EITCODEDOC/repos/flow-documentation/browse/wsdl/ce.dsg.dm/QueryOrderHistory.wsdl?at=Clearwatertest  getHandsetOrders]] HSO HSO_getHandsetOrders operation \n invoked to get HandsetOrderHistoryResponse
HSO-> RSP: HSO returns the HandsetOrderHistoryResponse

group Validate Response
RSP->RSP:-Validate handsetOrderHistoryResponse.handsetOrderSummary.getPostpaidAccount()==null then set handsetOrderSummary as PrepaidAccount.
RSP->RSP : Validate handsetOrderHistoryResponse.getOrderSummary().size() == 0 \n then Checking whether customer is exist or not by provided ban
RSP->SAMSON :-Invoke Tuxedo_evGtVerInfo operation to validate the response (if the account exists for the provided ban) 
alt successful case
SAMSON->RSP:- Return Response as AccountVerificationInfo Object
else failure case
SAMSON->RSP:- Throw RspProcessException with the error code \n ERROR: 1007/Invalid account number 
RSP -> Client: Return RspProcessException response
end
RSP -> Client: Return OrderHistoryResponse back to the client
@enduml