Skip to content

Commit c393d43

Browse files
authored
Add "created_at" in package (#1017)
Fixes #1009
1 parent d5879b4 commit c393d43

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/main/java/org/gitlab4j/api/models/Package.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package org.gitlab4j.api.models;
22

3+
import java.util.Date;
4+
35
import org.gitlab4j.api.utils.JacksonJson;
46

57
public class Package {
@@ -8,6 +10,7 @@ public class Package {
810
private String name;
911
private String version;
1012
private PackageType packageType;
13+
private Date createdAt;
1114

1215
public Long getId() {
1316
return id;
@@ -41,6 +44,14 @@ public void setPackageType(PackageType packageType) {
4144
this.packageType = packageType;
4245
}
4346

47+
public Date getCreatedAt() {
48+
return createdAt;
49+
}
50+
51+
public void setCreatedAt(Date createdAt) {
52+
this.createdAt = createdAt;
53+
}
54+
4455
@Override
4556
public String toString() {
4657
return (JacksonJson.toJsonString(this));

src/test/resources/org/gitlab4j/api/packages.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
"id": 1,
44
"name": "com/mycompany/my-app",
55
"version": "1.0-SNAPSHOT",
6-
"package_type": "maven"
6+
"package_type": "maven",
7+
"created_at": "2012-10-22T14:13:35Z"
78
},
89
{
910
"id": 2,
1011
"name": "@foo/bar",
1112
"version": "1.0.3",
12-
"package_type": "npm"
13+
"package_type": "npm",
14+
"created_at": "2012-10-22T14:13:35Z"
1315
}
1416
]

0 commit comments

Comments
 (0)