Compare commits
2 Commits
ff275ec4f3
...
5977eaf828
Author | SHA1 | Date | |
---|---|---|---|
|
5977eaf828 | ||
|
b7351f8d31 |
@ -16,14 +16,14 @@ public class AmendContactData extends UseCase<AmendContactData> {
|
|||||||
@Override
|
@Override
|
||||||
protected HttpResponse run() {
|
protected HttpResponse run() {
|
||||||
|
|
||||||
obtain("partnerContactuid", () ->
|
obtain("partnerContactUuid", () ->
|
||||||
httpGet("/api/hs/office/relations?relationType=PARTNER&personData=" + uriEncoded("%{partnerName}"))
|
httpGet("/api/hs/office/relations?relationType=PARTNER&personData=" + uriEncoded("%{partnerName}"))
|
||||||
.expecting(OK).expecting(JSON),
|
.expecting(OK).expecting(JSON),
|
||||||
response -> response.expectArrayElements(1).getFromBody("[0].contact.uuid"),
|
response -> response.expectArrayElements(1).getFromBody("[0].contact.uuid"),
|
||||||
"In production data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
"In production, data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
||||||
);
|
);
|
||||||
|
|
||||||
httpPatch("/api/hs/office/contacts/%{partnerContactuid}", usingJsonBody("""
|
httpPatch("/api/hs/office/contacts/%{partnerContactUuid}", usingJsonBody("""
|
||||||
{
|
{
|
||||||
"caption": ${newContactCaption???},
|
"caption": ${newContactCaption???},
|
||||||
"postalAddress": ${newPostalAddress???},
|
"postalAddress": ${newPostalAddress???},
|
||||||
|
@ -20,7 +20,7 @@ public class ReplaceContactData extends UseCase<ReplaceContactData> {
|
|||||||
httpGet("/api/hs/office/relations?relationType=PARTNER&personData=" + uriEncoded("%{partnerName}"))
|
httpGet("/api/hs/office/relations?relationType=PARTNER&personData=" + uriEncoded("%{partnerName}"))
|
||||||
.expecting(OK).expecting(JSON),
|
.expecting(OK).expecting(JSON),
|
||||||
response -> response.expectArrayElements(1).getFromBody("[0].uuid"),
|
response -> response.expectArrayElements(1).getFromBody("[0].uuid"),
|
||||||
"In production data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
"In production, data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
||||||
);
|
);
|
||||||
|
|
||||||
obtain("Contact: %{newContactCaption}", () ->
|
obtain("Contact: %{newContactCaption}", () ->
|
||||||
|
@ -26,7 +26,7 @@ public class CreateExternalDebitorForPartner extends UseCase<CreateExternalDebit
|
|||||||
httpGet("/api/hs/office/persons?name=" + uriEncoded("%{partnerPersonTradeName}"))
|
httpGet("/api/hs/office/persons?name=" + uriEncoded("%{partnerPersonTradeName}"))
|
||||||
.expecting(OK).expecting(JSON),
|
.expecting(OK).expecting(JSON),
|
||||||
response -> response.expectArrayElements(1).getFromBody("[0].uuid"),
|
response -> response.expectArrayElements(1).getFromBody("[0].uuid"),
|
||||||
"In production data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
"In production, data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
||||||
);
|
);
|
||||||
|
|
||||||
obtain("BankAccount: Billing GmbH - refund bank account", () ->
|
obtain("BankAccount: Billing GmbH - refund bank account", () ->
|
||||||
|
@ -19,7 +19,7 @@ public class CreateSelfDebitorForPartner extends UseCase<CreateSelfDebitorForPar
|
|||||||
httpGet("/api/hs/office/relations?relationType=PARTNER&personData=" + uriEncoded("%{partnerPersonTradeName}"))
|
httpGet("/api/hs/office/relations?relationType=PARTNER&personData=" + uriEncoded("%{partnerPersonTradeName}"))
|
||||||
.expecting(OK).expecting(JSON),
|
.expecting(OK).expecting(JSON),
|
||||||
response -> response.expectArrayElements(1).getFromBody("[0].holder.uuid"),
|
response -> response.expectArrayElements(1).getFromBody("[0].holder.uuid"),
|
||||||
"In production data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
"In production, data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
||||||
);
|
);
|
||||||
|
|
||||||
obtain("BankAccount: Test AG - refund bank account", () ->
|
obtain("BankAccount: Test AG - refund bank account", () ->
|
||||||
|
@ -22,7 +22,7 @@ public class AddOperationsContactToPartner extends UseCase<AddOperationsContactT
|
|||||||
httpGet("/api/hs/office/persons?name=" + uriEncoded("%{partnerPersonTradeName}"))
|
httpGet("/api/hs/office/persons?name=" + uriEncoded("%{partnerPersonTradeName}"))
|
||||||
.expecting(OK).expecting(JSON),
|
.expecting(OK).expecting(JSON),
|
||||||
response -> response.expectArrayElements(1).getFromBody("[0].uuid"),
|
response -> response.expectArrayElements(1).getFromBody("[0].uuid"),
|
||||||
"In production data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
"In production, data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
||||||
);
|
);
|
||||||
|
|
||||||
obtain("Person: %{operationsContactGivenName} %{operationsContactFamilyName}", () ->
|
obtain("Person: %{operationsContactGivenName} %{operationsContactFamilyName}", () ->
|
||||||
|
@ -22,7 +22,7 @@ public class AddRepresentativeToPartner extends UseCase<AddRepresentativeToPartn
|
|||||||
httpGet("/api/hs/office/persons?name=" + uriEncoded("%{partnerPersonTradeName}"))
|
httpGet("/api/hs/office/persons?name=" + uriEncoded("%{partnerPersonTradeName}"))
|
||||||
.expecting(OK).expecting(JSON),
|
.expecting(OK).expecting(JSON),
|
||||||
response -> response.expectArrayElements(1).getFromBody("[0].uuid"),
|
response -> response.expectArrayElements(1).getFromBody("[0].uuid"),
|
||||||
"In production data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
"In production, data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
||||||
);
|
);
|
||||||
|
|
||||||
obtain("Person: %{representativeGivenName} %{representativeFamilyName}", () ->
|
obtain("Person: %{representativeGivenName} %{representativeFamilyName}", () ->
|
||||||
|
@ -20,7 +20,7 @@ public class RemoveOperationsContactFromPartner extends UseCase<RemoveOperations
|
|||||||
httpGet("/api/hs/office/relations?relationType=OPERATIONS&name=" + uriEncoded("%{operationsContactPerson}"))
|
httpGet("/api/hs/office/relations?relationType=OPERATIONS&name=" + uriEncoded("%{operationsContactPerson}"))
|
||||||
.expecting(OK).expecting(JSON),
|
.expecting(OK).expecting(JSON),
|
||||||
response -> response.expectArrayElements(1).getFromBody("[0].uuid"),
|
response -> response.expectArrayElements(1).getFromBody("[0].uuid"),
|
||||||
"In production data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
"In production, data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
||||||
);
|
);
|
||||||
|
|
||||||
return httpDelete("/api/hs/office/relations/&{Operations-Contact: %{operationsContactPerson}}")
|
return httpDelete("/api/hs/office/relations/&{Operations-Contact: %{operationsContactPerson}}")
|
||||||
|
@ -22,7 +22,7 @@ public class SubscribeToMailinglist extends UseCase<SubscribeToMailinglist> {
|
|||||||
httpGet("/api/hs/office/persons?name=" + uriEncoded("%{partnerPersonTradeName}"))
|
httpGet("/api/hs/office/persons?name=" + uriEncoded("%{partnerPersonTradeName}"))
|
||||||
.expecting(OK).expecting(JSON),
|
.expecting(OK).expecting(JSON),
|
||||||
response -> response.expectArrayElements(1).getFromBody("[0].uuid"),
|
response -> response.expectArrayElements(1).getFromBody("[0].uuid"),
|
||||||
"In production data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
"In production, data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
||||||
);
|
);
|
||||||
|
|
||||||
obtain("Person: %{subscriberGivenName} %{subscriberFamilyName}", () ->
|
obtain("Person: %{subscriberGivenName} %{subscriberFamilyName}", () ->
|
||||||
|
@ -22,7 +22,7 @@ public class UnsubscribeFromMailinglist extends UseCase<UnsubscribeFromMailingli
|
|||||||
"&contactData=" + uriEncoded("%{subscriberEMailAddress}"))
|
"&contactData=" + uriEncoded("%{subscriberEMailAddress}"))
|
||||||
.expecting(OK).expecting(JSON),
|
.expecting(OK).expecting(JSON),
|
||||||
response -> response.expectArrayElements(1).getFromBody("[0].uuid"),
|
response -> response.expectArrayElements(1).getFromBody("[0].uuid"),
|
||||||
"In production data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
"In production, data this query could result in multiple outputs. In that case, you have to find out which is the right one."
|
||||||
);
|
);
|
||||||
|
|
||||||
return httpDelete("/api/hs/office/relations/&{Subscription: %{subscriberEMailAddress}}")
|
return httpDelete("/api/hs/office/relations/&{Subscription: %{subscriberEMailAddress}}")
|
||||||
|
Loading…
Reference in New Issue
Block a user