Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added uri property to UsageQuery #119

Merged
merged 3 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/main/java/com/bynder/sdk/query/UsageQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ public class UsageQuery {
@ApiField(name = "asset_id")
private String assetId;

/**
* Uri of the asset
*/
@ApiField(name = "uri")
private String uri;

public String getAssetId() {
return assetId;
}
Expand All @@ -27,4 +33,13 @@ public UsageQuery setAssetId(final String assetId) {
this.assetId = assetId;
return this;
}

public String getUri() {
return uri;
}

public UsageQuery setUri(final String uri) {
this.uri = uri;
return this;
}
}
8 changes: 8 additions & 0 deletions src/test/java/com/bynder/sdk/query/UsageQueryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
public class UsageQueryTest {

public static final String EXPECTED_ASSET_ID = "assetId";
public static final String EXPECTED_URI = "uri";

private UsageQuery usageQuery;

Expand All @@ -33,11 +34,18 @@ public void setUp() {
@Test
public void initializeEmptyUsageQuery() {
assertNull(usageQuery.getAssetId());
assertNull(usageQuery.getUri());
}

@Test
public void setAssetIdForUsageQuery() {
usageQuery.setAssetId(EXPECTED_ASSET_ID);
assertEquals(EXPECTED_ASSET_ID, usageQuery.getAssetId());
}

@Test
public void setUriForUsageQuery() {
usageQuery.setUri(EXPECTED_URI);
assertEquals(EXPECTED_URI, usageQuery.getUri());
}
}
Loading