-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from digipost/PickupNotice
Pickup notice
- Loading branch information
Showing
14 changed files
with
497 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
src/main/java/no/digipost/api/datatypes/types/pickup/Cost.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package no.digipost.api.datatypes.types.pickup; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Value; | ||
import lombok.experimental.Wither; | ||
import no.digipost.api.datatypes.documentation.Description; | ||
|
||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlType; | ||
import java.math.BigDecimal; | ||
|
||
@XmlType | ||
@Value | ||
@AllArgsConstructor | ||
@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE) | ||
@Wither | ||
public class Cost { | ||
|
||
@XmlElement(name = "value-to-be-payed", required = true) | ||
@Description("The value of the parcel in NOK") | ||
BigDecimal valueToBePayed; | ||
|
||
@XmlElement(name = "package-value") | ||
@Description("The value of the parcel in NOK") | ||
BigDecimal packageValue; | ||
|
||
@XmlElement(name = "customs-fee-outlayed") | ||
@Description("payed fee in customs") | ||
BigDecimal customsFeeOutlayed; | ||
|
||
@XmlElement(name = "vas-text") | ||
@Description("Information about the value added service (vas)") | ||
String vasText; | ||
|
||
@XmlElement(name = "customs-fee") | ||
@Description("Fee payed for customs declaration") | ||
BigDecimal customsFee; | ||
|
||
@XmlElement(name = "customs-fee-outlay-cost") | ||
@Description("Outlay for customs by the service") | ||
BigDecimal customsFeeOutlayCost; | ||
|
||
@XmlElement(name = "cod-amount") | ||
@Description("Cash on delivery (cod) amount") | ||
BigDecimal codAmount; | ||
|
||
@XmlElement(name = "cod-fee") | ||
@Description("Cash on delivery (cod) fee") | ||
BigDecimal codFee; | ||
|
||
|
||
public static final Cost EXAMPLE = new Cost( | ||
new BigDecimal("128.00"), | ||
new BigDecimal("1277.00"), | ||
new BigDecimal("162.00"), | ||
"FORENKLET TOLLBEHANDLING", | ||
BigDecimal.ZERO, | ||
BigDecimal.ZERO, | ||
BigDecimal.ZERO, | ||
BigDecimal.ZERO | ||
); | ||
|
||
} |
37 changes: 37 additions & 0 deletions
37
src/main/java/no/digipost/api/datatypes/types/pickup/Package.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package no.digipost.api.datatypes.types.pickup; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Value; | ||
import lombok.experimental.Wither; | ||
import no.digipost.api.datatypes.documentation.Description; | ||
|
||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlType; | ||
|
||
@XmlType | ||
@Value | ||
@AllArgsConstructor | ||
@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE) | ||
@Wither | ||
public class Package { | ||
|
||
@XmlElement(name = "length") | ||
@Description("Package lenght in cm") | ||
Integer length; | ||
|
||
@XmlElement(name = "width") | ||
@Description("Package width in cm") | ||
Integer width; | ||
|
||
@XmlElement(name = "height") | ||
@Description("Package height in cm") | ||
Integer height; | ||
|
||
@XmlElement(name = "weight") | ||
@Description("Package weight in grams") | ||
Integer weight; | ||
|
||
public static final Package EXAMPLE = new Package(120, 60, 60, 35000); | ||
} |
Oops, something went wrong.