From 49ac85b29cb2115ebcdaa1c8ac4d5887e7222d5a Mon Sep 17 00:00:00 2001 From: MishNajam <61416092+MishNajam@users.noreply.github.com> Date: Wed, 20 Nov 2024 14:55:20 +0000 Subject: [PATCH] VEGA-2656 add appointment type to trust corporations (#279) * VEGA-2656 add appointment type to trust corporations --- docs/example-lpa.json | 1 + docs/schemas/2024-10/lpa.json | 4 ++++ internal/shared/person.go | 21 +++++++++++---------- lambda/create/validate_test.go | 15 ++++++++------- mock-apigw/main.go | 1 + 5 files changed, 25 insertions(+), 17 deletions(-) diff --git a/docs/example-lpa.json b/docs/example-lpa.json index e443dcc1..369c7160 100644 --- a/docs/example-lpa.json +++ b/docs/example-lpa.json @@ -41,6 +41,7 @@ "country": "GB" }, "status": "active", + "appointmentType": "original", "channel": "paper" } ], diff --git a/docs/schemas/2024-10/lpa.json b/docs/schemas/2024-10/lpa.json index 7477219e..b370b5ec 100644 --- a/docs/schemas/2024-10/lpa.json +++ b/docs/schemas/2024-10/lpa.json @@ -60,6 +60,10 @@ "items": { "type": "object", "properties": { + "appointmentType": { + "type": "string", + "enum": ["original", "replacement"] + }, "signedAt": { "type": "string", "format": "date-time" diff --git a/internal/shared/person.go b/internal/shared/person.go index b49d65c3..7cf06585 100644 --- a/internal/shared/person.go +++ b/internal/shared/person.go @@ -91,16 +91,17 @@ type Attorney struct { } type TrustCorporation struct { - UID string `json:"uid"` - Name string `json:"name"` - CompanyNumber string `json:"companyNumber"` - Email string `json:"email,omitempty"` - Address Address `json:"address"` - Status AttorneyStatus `json:"status"` - Mobile string `json:"mobile,omitempty"` - Signatories []Signatory `json:"signatories,omitempty"` - ContactLanguagePreference Lang `json:"contactLanguagePreference,omitempty"` - Channel Channel `json:"channel"` + UID string `json:"uid"` + Name string `json:"name"` + CompanyNumber string `json:"companyNumber"` + Email string `json:"email,omitempty"` + AppointmentType AppointmentType `json:"appointmentType"` + Address Address `json:"address"` + Status AttorneyStatus `json:"status"` + Mobile string `json:"mobile,omitempty"` + Signatories []Signatory `json:"signatories,omitempty"` + ContactLanguagePreference Lang `json:"contactLanguagePreference,omitempty"` + Channel Channel `json:"channel"` } type Signatory struct { diff --git a/lambda/create/validate_test.go b/lambda/create/validate_test.go index 49a6b7e2..bda92089 100644 --- a/lambda/create/validate_test.go +++ b/lambda/create/validate_test.go @@ -67,13 +67,14 @@ func makeCertificateProvider() shared.CertificateProvider { func makeTrustCorporation() shared.TrustCorporation { return shared.TrustCorporation{ - UID: "af2f7aa6-2f8e-4311-af2a-4855c4686d30", - Name: "corp", - CompanyNumber: "5", - Email: "corp@example.com", - Address: validAddress, - Status: shared.AttorneyStatusActive, - Channel: shared.ChannelOnline, + UID: "af2f7aa6-2f8e-4311-af2a-4855c4686d30", + Name: "corp", + CompanyNumber: "5", + Email: "corp@example.com", + Address: validAddress, + AppointmentType: shared.AppointmentTypeOriginal, + Status: shared.AttorneyStatusActive, + Channel: shared.ChannelOnline, } } diff --git a/mock-apigw/main.go b/mock-apigw/main.go index e5e86db0..7a48ab19 100644 --- a/mock-apigw/main.go +++ b/mock-apigw/main.go @@ -168,6 +168,7 @@ func handlePactState(r *http.Request) error { "country": "GB" }, "status": "active", + "appointmentType": "original", "channel": "paper" } ],