Skip to content

Commit 8594055

Browse files
nitzanjtocker
authored andcommitted
Add expires at to generate archive (#68)
1 parent 2187cee commit 8594055

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

cloudinary-core/src/main/java/com/cloudinary/ArchiveParams.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public class ArchiveParams {
2727
private String[] publicIds = null;
2828
private String[] prefixes = null;
2929
private Transformation[] transformations = null;
30+
private Long expiresAt = null;
3031

3132
public String resourceType() {
3233
return resourceType;
@@ -183,6 +184,15 @@ public ArchiveParams transformations(Transformation[] transformations) {
183184
return this;
184185
}
185186

187+
public ArchiveParams expiresAt(Long expiresAt) {
188+
this.expiresAt = expiresAt;
189+
return this;
190+
}
191+
192+
public Long expiresAt(){
193+
return expiresAt;
194+
}
195+
186196
public Map<String, Object> toMap() {
187197
Map<String, Object> params = new HashMap<String, Object>();
188198
params.put("resource_type", resourceType);
@@ -209,6 +219,9 @@ public Map<String, Object> toMap() {
209219
if (transformations != null) {
210220
params.put("transformations", Arrays.asList(transformations));
211221
}
222+
if (expiresAt != null){
223+
params.put("expires_at", expiresAt);
224+
}
212225
return params;
213226
}
214227
}

0 commit comments

Comments
 (0)