From d45c68c19eeedd1ce01bf9772d7521947eeb6d1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Stranden=C3=A6s?= Date: Tue, 26 Nov 2019 16:54:16 +0100 Subject: [PATCH 1/3] add new datatype inkasso for norwegian debt collection --- datatypes-examples.xml | 12 +++++ datatypes.xsd | 12 +++++ readme.md | 40 +++++++++++++++++ .../api/datatypes/DataTypeIdentifier.java | 2 + .../digipost/api/datatypes/types/Inkasso.java | 44 +++++++++++++++++++ .../digipost/api/datatypes/types/jaxb.index | 1 + 6 files changed, 111 insertions(+) create mode 100644 src/main/java/no/digipost/api/datatypes/types/Inkasso.java diff --git a/datatypes-examples.xml b/datatypes-examples.xml index a54cee39..e1595e16 100644 --- a/datatypes-examples.xml +++ b/datatypes-examples.xml @@ -105,6 +105,18 @@ Svar på barnehageplass + + + https://www.example.com + Gå til avsenders side for å gjøre en handling + Ta meg til handling! + + 2019-12-10T00:00:00+01:00 + 42 + 012354243209523583 + 1435025439583420243982723 + + diff --git a/datatypes.xsd b/datatypes.xsd index 54e8fed9..29d0c208 100644 --- a/datatypes.xsd +++ b/datatypes.xsd @@ -9,6 +9,8 @@ + + @@ -179,6 +181,16 @@ + + + + + + + + + + diff --git a/readme.md b/readme.md index 2b1cf7c8..b2271d16 100644 --- a/readme.md +++ b/readme.md @@ -6,6 +6,7 @@ |[Boligdetaljer](#boligdetaljer)|Details about a Residence, and may be joined with Residence to retrieve the core fields of a Residence.| |[Event](#event)|Event represents an event that occurs over a time period or several days. Eg. a conference or an election| |[ExternalLink](#externallink)|An external URL, along with an optional description and deadline for resources such as a survey.| +|[Inkasso](#inkasso)|A debt collection payment| |[Payslip](#payslip)|For treating documents as Payslips.| |[PickupNotice](#pickupnotice)|Details about a pickup notice| |[PickupNoticeStatus](#pickupnoticestatus)|Updates to status for PickupNotice| @@ -274,6 +275,45 @@ An external URL, along with an optional description and deadline for resources s ``` +## Inkasso + +A debt collection payment + +### Fields + +|Name|Type|Required|Description| +|----|----|--------|-----------| +|link|[ExternalLink](#inkassoexternallink)|no|A link to more information, or further actions that can be taken| +|dueDate|ZonedDateTime|yes|When the payment falls due| +|sum|BigDecimal|no|The sum to be payed| +|account|String|no|The creditor account for the payment| +|kid|String|no|The customer identification number| + +### Inkasso.ExternalLink + +|Name|Type|Required|Description| +|----|----|--------|-----------| +|url|URI|yes|Target URL of this link. Must be http or https.| +|deadline|ZonedDateTime|no|Optional deadline for the user to respond. ISO8601 full DateTime.| +|description|String|no|A short, optional text-field, describing the external link.| +|buttonText|String|no|Optional text which will be displayed on the button.| + +### XML + +```xml + + + https://www.example.com + Gå til avsenders side for å gjøre en handling + Ta meg til handling! + + 2019-12-10T00:00:00+01:00 + 42 + 012354243209523583 + 1435025439583420243982723 + +``` + ## Payslip For treating documents as Payslips. diff --git a/src/main/java/no/digipost/api/datatypes/DataTypeIdentifier.java b/src/main/java/no/digipost/api/datatypes/DataTypeIdentifier.java index dc055289..801613e3 100644 --- a/src/main/java/no/digipost/api/datatypes/DataTypeIdentifier.java +++ b/src/main/java/no/digipost/api/datatypes/DataTypeIdentifier.java @@ -4,6 +4,7 @@ import no.digipost.api.datatypes.types.Boligdetaljer; import no.digipost.api.datatypes.types.Event; import no.digipost.api.datatypes.types.ExternalLink; +import no.digipost.api.datatypes.types.Inkasso; import no.digipost.api.datatypes.types.Payslip; import no.digipost.api.datatypes.types.Residence; import no.digipost.api.datatypes.types.SignedDocument; @@ -44,6 +45,7 @@ public enum DataTypeIdentifier { , PICKUP_NOTICE_STATUS(PickupNoticeStatus.class, "PKUS", PickupNoticeStatus.EXAMPLE) , EVENT(Event.class, "EVNT", Event.EXAMPLE) , PROOF(Proof.class, "PRF", Proof.EXAMPLE) + , INKASSO(Inkasso.class, "INKA", Inkasso.EXAMPLE) ; private final Class dataType; diff --git a/src/main/java/no/digipost/api/datatypes/types/Inkasso.java b/src/main/java/no/digipost/api/datatypes/types/Inkasso.java new file mode 100644 index 00000000..e52a7dfc --- /dev/null +++ b/src/main/java/no/digipost/api/datatypes/types/Inkasso.java @@ -0,0 +1,44 @@ +package no.digipost.api.datatypes.types; + +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.NoArgsConstructor; +import lombok.Value; +import lombok.experimental.Wither; +import no.digipost.api.datatypes.DataType; +import no.digipost.api.datatypes.documentation.Description; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import java.math.BigDecimal; +import java.time.ZoneId; +import java.time.ZonedDateTime; + +@XmlRootElement +@Value +@AllArgsConstructor +@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE) +@Wither +@Description("A debt collection payment") +public class Inkasso implements DataType { + @XmlElement + @Description("A link to more information, or further actions that can be taken") + ExternalLink link; + @XmlElement(required = true, name = "due-date") + @Description("When the payment falls due") + ZonedDateTime dueDate; + @XmlElement + @Description("The sum to be payed") + BigDecimal sum; + @XmlElement + @Description("The creditor account for the payment") + String account; + @XmlElement + @Description("The customer identification number") + String kid; + + public static Inkasso EXAMPLE = new Inkasso(ExternalLink.EXAMPLE_NO_DEADLINE, + ZonedDateTime.of(2019, 12, 10, 0, 0, 0, 0, ZoneId.systemDefault()), + BigDecimal.valueOf(42), "012354243209523583", "1435025439583420243982723"); + +} diff --git a/src/main/resources/no/digipost/api/datatypes/types/jaxb.index b/src/main/resources/no/digipost/api/datatypes/types/jaxb.index index 60c62a33..1c3ac000 100644 --- a/src/main/resources/no/digipost/api/datatypes/types/jaxb.index +++ b/src/main/resources/no/digipost/api/datatypes/types/jaxb.index @@ -9,3 +9,4 @@ Payslip SignedDocument pickup.PickupNotice pickup.PickupNoticeStatus +Inkasso From 340926c801b9a0905ee5982c3b3a85f4e18fd4b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Stranden=C3=A6s?= Date: Wed, 27 Nov 2019 09:12:04 +0100 Subject: [PATCH 2/3] [skip ci] Release:prepare release 0.26 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b309fd50..bf8ae4f8 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ digipost-data-types - 0.26-SNAPSHOT + 0.26 Digipost Data Types Data types for Digipost messages @@ -343,6 +343,6 @@ scm:git:git@github.com:digipost/digipost-data-types.git scm:git:git@github.com:digipost/digipost-data-types.git scm:git:git@github.com:digipost/digipost-data-types - HEAD + 0.26 From bebcb35824ae4e290b5913b73e6ba2fddf3328f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Stranden=C3=A6s?= Date: Wed, 27 Nov 2019 09:12:19 +0100 Subject: [PATCH 3/3] [skip ci] Release:prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index bf8ae4f8..490ae90c 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ digipost-data-types - 0.26 + 0.27-SNAPSHOT Digipost Data Types Data types for Digipost messages @@ -343,6 +343,6 @@ scm:git:git@github.com:digipost/digipost-data-types.git scm:git:git@github.com:digipost/digipost-data-types.git scm:git:git@github.com:digipost/digipost-data-types - 0.26 + HEAD