@startuml PB-197_UC19_SQD_view_scheduled_transfers
title
PB-197 UC19 SQD: View scheduled transfers
end title
autonumber

actor "Next Customer" as UI

box "Next Platform"
participant "Core Next" as Next
database "Next DB" as DB
end box

participant "Bradesco Core" as BR

note right UI #plum
**API:**
GET /transfers/schedules

**Current implementation:**
Get a list of scheduled transfers from Bradesco Core.

**Required implementation:**
Ensure that transfers that are part of standing order are also returned.
end note

UI->Next: Get scheduled transfers (START_DATE, END_DATE)
activate Next
Next->BR: Get scheduled transfers (START_DATE, END_DATE)
activate BR
BR->BR: Read scheduled transfers

note right DB
**Note:**
SCHEDULED_TRANSFER_RESPONSE contains:
amount
authenticationCode
categoryId
categoryName
controlNumber
description
documentId
effectiveDate
failureDate
failureReason
fee
modalityCode
productCode
productDescription
purposeCode
purposeDescription
recipientAccount
recipientAccountDigit
recipientAccountType
recipientBankCode
recipientBankName
recipientBranch
recipientCpfCnpj
recipientName
schedulingNumber
schedulingStatusCode
senderAccount
senderAccountDigit
senderAccountType
senderBranch
senderName
totalAmount
transferDate
transferId
transferType
end note
BR-->Next: Return scheduled transfers (SCHEDULED_TRANSFER_RESPONSE)
deactivate BR
Next-->UI: Return scheduled transfers (SCHEDULED_TRANSFER_RESPONSE)
deactivate Next
@enduml
