add postalAddresss+phoneNumber to partner contacts

This commit is contained in:
Michael Hoennig 2024-11-02 16:14:37 +01:00
parent 96e740f0d5
commit 33ceebf1d7
2 changed files with 15 additions and 1 deletions

View File

@ -51,6 +51,11 @@ class HsOfficeScenarioTests extends ScenarioTest {
.given("personType", "LEGAL_PERSON") .given("personType", "LEGAL_PERSON")
.given("tradeName", "Test AG") .given("tradeName", "Test AG")
.given("contactCaption", "Test AG - Board of Directors") .given("contactCaption", "Test AG - Board of Directors")
.given("postalAddress", """
Shanghai-Allee 1
20123 Hamburg
""")
.given("officePhoneNumber", "+49 40 654321-0")
.given("emailAddress", "board-of-directors@test-ag.example.org") .given("emailAddress", "board-of-directors@test-ag.example.org")
.doRun() .doRun()
.keep(); .keep();
@ -66,6 +71,11 @@ class HsOfficeScenarioTests extends ScenarioTest {
.given("givenName", "Michelle") .given("givenName", "Michelle")
.given("familyName", "Matthieu") .given("familyName", "Matthieu")
.given("contactCaption", "Michelle Matthieu") .given("contactCaption", "Michelle Matthieu")
.given("postalAddress", """
An der Wandse 34
22123 Hamburg
""")
.given("officePhoneNumber", "+49 40 123456")
.given("emailAddress", "michelle.matthieu@example.org") .given("emailAddress", "michelle.matthieu@example.org")
.doRun() .doRun()
.keep(); .keep();

View File

@ -44,8 +44,12 @@ public class CreatePartner extends UseCase<CreatePartner> {
httpPost("/api/hs/office/contacts", usingJsonBody(""" httpPost("/api/hs/office/contacts", usingJsonBody("""
{ {
"caption": ${contactCaption}, "caption": ${contactCaption},
"postalAddress": ${postalAddress???},
"phoneNumbers": {
"office": ${officePhoneNumber???}
},
"emailAddresses": { "emailAddresses": {
"main": ${emailAddress} "main": ${emailAddress???}
} }
} }
""")) """))