generated from ministryofjustice/opg-template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat/SSM-34: initial commit for LPC doc types integration.
- Loading branch information
Showing
4 changed files
with
144 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
29
service-app/xml/LPC-section4-replacement-attorney-trust-corp.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |