Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New document event: SHARE_DOCUMENTS_REQUEST_SHARING_WITHDRAWN #184

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public enum DocumentEventType {
PEPPOL_FAILED,
PEPPOL_DELIVERED,
SHREDDED,
SHARE_DOCUMENTS_REQUEST_DOCUMENTS_SHARED
SHARE_DOCUMENTS_REQUEST_DOCUMENTS_SHARED,
SHARE_DOCUMENTS_REQUEST_SHARING_WITHDRAWN

}
2 changes: 2 additions & 0 deletions src/main/resources/xsd/api_v8.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,8 @@
<xsd:enumeration value="SHREDDED" />
<xsd:enumeration value="PEPPOL_DELIVERED" />
<xsd:enumeration value="PEPPOL_FAILED" />
<xsd:enumeration value="SHARE_DOCUMENTS_REQUEST_DOCUMENTS_SHARED" />
<xsd:enumeration value="SHARE_DOCUMENTS_REQUEST_SHARING_WITHDRAWN" />
</xsd:restriction>
</xsd:simpleType>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
import static no.digipost.api.client.representations.DocumentEventType.OPENED;
import static no.digipost.api.client.representations.DocumentEventType.POSTMARKED;
import static no.digipost.api.client.representations.DocumentEventType.PRINT_FAILED;
import static no.digipost.api.client.representations.DocumentEventType.SHARE_DOCUMENTS_REQUEST_DOCUMENTS_SHARED;
import static no.digipost.api.client.representations.DocumentEventType.SHARE_DOCUMENTS_REQUEST_SHARING_WITHDRAWN;
import static no.digipost.api.client.representations.DocumentEventType.SHREDDED;
import static no.digipost.api.client.representations.DocumentEventType.SMS_NOTIFICATION_FAILED;
import static no.digipost.api.client.representations.ErrorType.CLIENT_DATA;
Expand Down Expand Up @@ -214,9 +216,23 @@ public void validateDocumentEvents() {

DocumentEvent shreddedEvent = new DocumentEvent(randomUUID(), SHREDDED, now, now);

DocumentEvent newSharedDocuments = new DocumentEvent(
randomUUID(),
SHARE_DOCUMENTS_REQUEST_DOCUMENTS_SHARED,
now,
now
);

DocumentEvent sharingWithdrawn = new DocumentEvent(
randomUUID(),
SHARE_DOCUMENTS_REQUEST_SHARING_WITHDRAWN,
now,
now
);

DocumentEvents documentEvents = new DocumentEvents(asList(openedEvent, emailDeliveredEvent,
emailDeliveredEventWithMetadata, failedEmailNotificationEvent, failedSmsNotificationEvent,
printFailedEvent, movedFilesEvent, postmarkedEvent, shreddedEvent));
printFailedEvent, movedFilesEvent, postmarkedEvent, shreddedEvent, newSharedDocuments, sharingWithdrawn));
marshallValidateAndUnmarshall(documentEvents);
}

Expand Down
Loading