class ArtifactExpiryReceipt extends Receipt {

  public byte[] serialize() {
    short version = (short) getVersion().getValue();
    ReceiptTypeDto type = ReceiptTypeDto.rawValueOf((short) getType().getValue());
    if (this.artifactId instanceof MosaicId) {
      return MosaicExpiryReceiptBuilder.create(
              version, type, new MosaicIdDto(getArtifactIdValue().longValue()))
          .serialize();
    } else {
      return NamespaceExpiryReceiptBuilder.create(
              version, type, new NamespaceIdDto(getArtifactIdValue().longValue()))
          .serialize();
    }
  }

  public  ArtifactExpiryReceipt(
      T artifactId, ReceiptType type, ReceiptVersion version, Optional<Integer> size);
  public  ArtifactExpiryReceipt(T artifactId, ReceiptType type, ReceiptVersion version);

}