@startuml
'diagram parameters'
autonumber
'skinparam dpi 300
skinparam LegendBackgroundColor #white

'diagram title'
title PB-428 Phase 4 UC5 - Get absense of profile T&C

'a list of the actors and participants'
actor "Next Customer" as UI
box "Next Platform"
participant "Core Next" as Next
database "Next Database" as DB
end box
participant "Core Bradesco" as BR

'a brief description of the diagram'
legend top
-- \t**Abstract:**\t --
This is a new endpoint that will retrieve the latest version of the Absence of Profile T&C for the customer to read / accept. 
end legend

note right of UI
The Absence of Profile T&C is a new
T&C that is tied to a customer and
will expire after 2 years. The tracking
of the expiry and whether a customer
needs to sign this T&C is done by the
Core Banking APIC system. If APIC
determines the customer must sign this
T&C before an investment is made, the App
will call this endpoint to retrieve the
T&C from Core Next.
end note
note right of UI
This is a brand new T&C that needs to
be added to the Core Next document_type
table.
end note

UI -> Next: **HTTP**\nGET /v1/investments/absenseOfProfile/termsAndConditions
note right of UI
The App will make a call to Core Next
to get the Absence of Profile T&C.
end note
note right of UI #orange
There will not be any request parameters
for this endpoint. We will just need to
retrieve the latest version of this T&C
and return it to the app.
end note

activate Next
ref over Next
  Use existing methodology to retrieve
  and generate Absence of Profile T&C.
end ref
note right of Next
  We will use existing methodology to
  retrieve the Absence of Profile T&C
  template from the Next database,
  generate the T&C, and return it to
  the App.
end note
note right of Next #red
**Assumption**
The content of this T&C is static
and there will be no dynamic fields
that need to be populated in this
T&C.

**Answer**
Action Item: Leonardo to confirm
with managers on whether there will
be dynamica fields in this template.
end note

Next --> UI: Response
deactivate Next
note right of UI
Core Next will return the generated T&C
to the App for the customer to read and
accept. It will return the following fields
in the response:
- termsAndConditions (string): Terms and Conditions HTML text
- termsAndConditionsUid (integer): Terms and Conditions UID
end note


deactivate Next


@enduml
