@startuml
'diagram parameters'
autonumber
'skinparam dpi 300
skinparam LegendBackgroundColor #white
'diagram title'
title PB 351 - UC11 - Get Hub Offers List Details
'a list of the actors and participants'actor "System Management" as SM


actor "System Management" as SM

box "Partners and Offers"
participant "P&O" as PO
database "P&O Database" as PODB
end box


'a brief description of the diagram'
legend top
-- \t**Abstract:**\t --
This use case will retrieve
end legend


note right of SM
**Note:**
Only System Management is allowed to use this endpoint
end note


note right of SM #plum
**Current implementation:**
GET /hubOffers/{hubOfferId}

We will keep the same logic that already exists but we will add
the 3 new fields on response. (startDateTime, endDateTime, imageList)

**Required implementation:**

Outputs:
* hubOffer details
* responseCode
end note


SM -> PO: GET /hubOffers/{hubOfferId}

activate PO
PO -> PODB: Retrieve hub offer detail
activate PODB
note right of PODB
Now we will have three new fields on response:
- startDateTime,
- endDateTime,
- imageList
end note
PODB-->PO: Return
deactivate PODB

alt #transparent Returned list is not empty
  note right of SM
  Sucess.
  Http response code: 200
  end note
  PO-->SM: Return hub offers details and responseCode

else Retured list is empty
  note right of SM
  Http response code: 404
  Error message: No hub offers founded
  end note
  PO-->SM: Return responseCode
end alt
deactivate PO


@enduml
