Skip to content

Commit

Permalink
Adding archiveDate to Media Modify Query (#85)
Browse files Browse the repository at this point in the history
* Adding archiveDate to Media Modify Query

* adding \n to the code formating
  • Loading branch information
sridharandavar authored Nov 7, 2022
1 parent def0f45 commit ccefd96
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/java/com/bynder/sdk/query/MediaModifyQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ public class MediaModifyQuery {
@ApiField
private Boolean archive;

/**
* Date archive new value.
*/
@ApiField
private String archiveDate;

/**
* Date published new value.
*/
Expand Down Expand Up @@ -102,6 +108,11 @@ public MediaModifyQuery setArchive(final Boolean archive) {
return this;
}

public MediaModifyQuery setArchiveDate(final String archiveDate) {
this.archiveDate = archiveDate;
return this;
}

public MediaModifyQuery setDatePublished(final String datePublished) {
this.datePublished = datePublished;
return this;
Expand All @@ -112,6 +123,8 @@ public MediaModifyQuery setMetaproperties(List<MetapropertyAttribute> metaproper
return this;
}

public String getArchiveDate() { return archiveDate; }

public Boolean getLimited() {
return limited;
}
Expand Down
4 changes: 4 additions & 0 deletions src/test/java/com/bynder/sdk/query/MediaModifyQueryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class MediaModifyQueryTest {
public static final String EXPECTED_MEDIA_ID = "id";
public static final Boolean EXPECTED_LIMITED = true;
public static final String EXPECTED_LIMITED_DATE = "2014-12-25T10:30:00Z";
public static final String EXPECTED_ARCHIVE_DATE = "2014-12-25T10:30:00Z";
public static final String EXPECTED_TAGS = "tag1,tag2";

@Test
Expand All @@ -38,5 +39,8 @@ public void initializeMediaModifyQueryTest() {
mediaModifyQuery.setTags(Arrays.asList("tag1", "tag2"));
assertEquals(EXPECTED_TAGS, mediaModifyQuery.getTags());

mediaModifyQuery.setArchiveDate(EXPECTED_ARCHIVE_DATE);
assertEquals(EXPECTED_ARCHIVE_DATE, mediaModifyQuery.getArchiveDate());

}
}

0 comments on commit ccefd96

Please sign in to comment.