Skip to content

Commit

Permalink
feat/SSM-34: initial commit for LPC doc types integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
j1mb0b committed Jan 29, 2025
1 parent aceb2ac commit 8004ef5
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 8 deletions.
11 changes: 3 additions & 8 deletions service-app/internal/types/lp1f_types/lp1f_xml.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ type Salutation struct {
OtherName string `xml:"OtherName,omitempty"`
}

type Signatory struct {
FullName string `xml:"FullName"`
Declaration
}

type PersonName struct {
Salutation Salutation `xml:"Salutation"`
LastName string `xml:"LastName"`
Expand Down Expand Up @@ -304,9 +299,9 @@ type ContinuationSheet2 struct {
}

type ContinuationSheet3 struct {
Donor PersonName `xml:"Donor"`
Signatory Signatory `xml:"Signatory"`
Witnesses []Witness `xml:"Witnesses"`
Donor PersonName `xml:"Donor"`
Signatory AuthorisedPerson `xml:"Signatory"`
Witnesses []Witness `xml:"Witnesses"`
}

type ContinuationSheet4 struct {
Expand Down
83 changes: 83 additions & 0 deletions service-app/internal/types/lpc_types/lpc_document.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
package lpc_types

import (
"encoding/xml"

"github.com/ministryofjustice/opg-scanning/internal/types"
"github.com/ministryofjustice/opg-scanning/internal/types/lp1f_types"
)

type LPCDocument struct {
XMLName xml.Name `xml:"LPC"`
Page1 []Page1 `xml:"Page1,omitempty"`
Page2 []Page2 `xml:"Page2,omitempty"`
Page3 []Page3 `xml:"Page3,omitempty"`
Page4 []Page4 `xml:"Page4,omitempty"`
}

type Page1 struct {
XMLName xml.Name `xml:"Page1"`
ContinuationSheet1 ContinuationSheet1 `xml:"ContinuationSheet1"`
types.BasePage
}

type ContinuationSheet1 struct {
Attorneys []AttorneyContinuation1 `xml:"Attorney"`
Donor lp1f_types.AuthorisedPerson `xml:"Donor"`
}

type AttorneyContinuation1 struct {
Attorney bool `xml:"Attorney"`
ReplacementAttorney bool `xml:"ReplacementAttorney"`
PersonToNotify bool `xml:"PersonToNotify"`
Title string `xml:"Title"`
FirstName string `xml:"FirstName"`
LastName string `xml:"LastName"`
DOB string `xml:"DOB"`
Address lp1f_types.Address
Email string `xml:"Email"`
}

type Page2 struct {
XMLName xml.Name `xml:"Page2"`
ContinuationSheet2 ContinuationSheet2 `xml:"ContinuationSheet2"`
types.BasePage
}

type ContinuationSheet2 struct {
AdditionalInformation lp1f_types.AdditionalInformation `xml:"AdditionalInformation"`
Donor lp1f_types.AuthorisedPerson `xml:"Donor"`
}

type Page3 struct {
XMLName xml.Name `xml:"Page3"`
ContinuationSheet3 ContinuationSheet3 `xml:"ContinuationSheet3"`
types.BasePage
}

type ContinuationSheet3 struct {
Donor DonorNameOnly `xml:"Donor"`
Signatory lp1f_types.AuthorisedPerson `xml:"Signatory"`
Witnesses []WitnessContinuation3 `xml:"Witnesses"`
}

type DonorNameOnly struct {
FullName string `xml:"FullName"`
}

type WitnessContinuation3 struct {
Signature bool `xml:"Signature"`
FullName string `xml:"FullName"`
Address lp1f_types.Address `xml:"Address"`
}

type Page4 struct {
XMLName xml.Name `xml:"Page4"`
ContinuationSheet4 ContinuationSheet4 `xml:"ContinuationSheet4"`
types.BasePage
}

type ContinuationSheet4 struct {
CompanyRegistration string `xml:"CompanyRegistration"`
AuthorisedPerson []lp1f_types.AuthorisedPerson `xml:"AuthorisedPerson"`
}
29 changes: 29 additions & 0 deletions service-app/xml/LPC-section4-replacement-attorney-trust-corp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Section4>
<Attorney1>
<Title/>
<FirstName>TEST ATTORNEY</FirstName>
<LastName>SCREWHAM HOWE</LastName>
<DOB/>
<Address>
<Address1>5 FOOLSCAP LANE</Address1>
<Address2>ERRAND PLAZA</Address2>
<Address3/>
<Postcode>B1 3EE</Postcode>
</Address>
<TrustCorporation>true</TrustCorporation>
</Attorney1>
<Attorney2>
<Title/>
<FirstName/>
<LastName/>
<DOB></DOB>
<Address>
<Address1/>
<Address2/>
<Address3/>
<Postcode/>
</Address>
</Attorney2>
<MoreReplacements>false</MoreReplacements>
<ChangeHowAttorneysAct>false</ChangeHowAttorneysAct>
</Section4>
29 changes: 29 additions & 0 deletions service-app/xml/LPC-section4-replacement-attorney.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Section4>
<Attorney1>
<Title/>
<FirstName>TEST ATTORNEY</FirstName>
<LastName>SCREWHAM HOWE</LastName>
<DOB/>
<Address>
<Address1>5 FOOLSCAP LANE</Address1>
<Address2>ERRAND PLAZA</Address2>
<Address3/>
<Postcode>B1 3EE</Postcode>
</Address>
<TrustCorporation>false</TrustCorporation>
</Attorney1>
<Attorney2>
<Title/>
<FirstName/>
<LastName/>
<DOB></DOB>
<Address>
<Address1/>
<Address2/>
<Address3/>
<Postcode/>
</Address>
</Attorney2>
<MoreReplacements>false</MoreReplacements>
<ChangeHowAttorneysAct>false</ChangeHowAttorneysAct>
</Section4>

0 comments on commit 8004ef5

Please sign in to comment.