Skip to content

Commit

Permalink
Legg til datatype for Payslip - bruk av Category var tungvint
Browse files Browse the repository at this point in the history
  • Loading branch information
williampeer committed Jul 11, 2018
1 parent 65c7eb0 commit 6e8aeea
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
18 changes: 18 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
|[Boligdetaljer](#boligdetaljer)|Details about a Residence, and may be joined with Residence to retrieve the core fields of a Residence.|
|[Category](#category)|Category is a way to specify which category the data of a document is related to.|
|[ExternalLink](#externallink)|An external URL, along with an optional description and deadline for resources such as a survey.|
|[Payslip](#payslip)|For treating documents as Payslips.|
|[Receipt](#receipt)|Receipt represents a document containing details about a purchase|
|[Residence](#residence)|Residence is a way of linking separate data for the same residence|

Expand Down Expand Up @@ -194,6 +195,23 @@ An external URL, along with an optional description and deadline for resources s
</externalLink>
```

## Payslip

For treating documents as Payslips.

### Fields

|Name|Type|Required|Description|
|----|----|--------|-----------|


### XML

```xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payslip xmlns="http://api.digipost.no/schema/datatypes"/>
```

## Receipt

Receipt represents a document containing details about a purchase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public enum DataTypeIdentifier {
CATEGORY(Category.class, "CAT", Category.EXAMPLE),
EXTERNAL_LINK(ExternalLink.class, "EXTL", ExternalLink.EXAMPLE),
BOLIGDETALJER(Boligdetaljer.class, "RDTL", Boligdetaljer.EXAMPLE),
RECEIPT(Receipt.class, "RCPT", Receipt.EXAMPLE);
RECEIPT(Receipt.class, "RCPT", Receipt.EXAMPLE),
PAYSLIP(Payslip.class, "PAY", Payslip.EXAMPLE);

private final Class<? extends DataType> dataType;
private final String shortName;
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/no/digipost/api/datatypes/types/Payslip.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package no.digipost.api.datatypes.types;

import lombok.AllArgsConstructor;
import lombok.Value;
import no.digipost.api.datatypes.DataType;
import no.digipost.api.datatypes.documentation.Description;

import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
@Value
@AllArgsConstructor
@Description("For treating documents as Payslips.")
public class Payslip implements DataType {
public static Payslip EXAMPLE = new Payslip();
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ Category
ExternalLink
Boligdetaljer
receipt.Receipt
Payslip

0 comments on commit 6e8aeea

Please sign in to comment.