Skip to content

Commit

Permalink
Merge b7dddff into 6336036
Browse files Browse the repository at this point in the history
  • Loading branch information
maxe2y committed Nov 13, 2020
2 parents 6336036 + b7dddff commit 3ca09e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Hyperwallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default class Hyperwallet {
* @param {api-callback} callback - The callback for this call
*/
listUsers(options, callback) {
const LIST_USER_FILTERS = ["clientUserId", "email", "programToken", "status", "verificationStatus"];
const LIST_USER_FILTERS = ["clientUserId", "createdAfter", "createdBefore", "email", "limit", "programToken", "sortBy", "status", "verificationStatus"];
if (options && !this.isValidFilter(options, LIST_USER_FILTERS)) {
throw new Error("Invalid Filter. Expected - ".concat(LIST_USER_FILTERS));
}
Expand Down
5 changes: 4 additions & 1 deletion test/Hyperwallet.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,10 @@ describe("Hyperwallet", () => {
/** @test {Hyperwallet#listUsers} */
it("should throw error for invalid filter", () => {
const callback = () => null;
expect(() => client.listUsers({ test1: "value" }, callback)).to.throw("Invalid Filter. Expected - clientUserId,email,programToken,status,verificationStatus");
expect(() => client.listUsers({ test1: "value" }, callback))
.to.throw(
"Invalid Filter. Expected - clientUserId,createdAfter,createdBefore,email,limit,programToken,sortBy,status,verificationStatus"
);
});
/** @test {Hyperwallet#listUsers} */
it("should do get call without options", () => {
Expand Down

0 comments on commit 3ca09e0

Please sign in to comment.