File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
main/java/org/zendesk/client/v2
test/java/org/zendesk/client/v2 Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -510,6 +510,12 @@ public Iterable<Ticket> getOrganizationTickets(long organizationId) {
510
510
handleList (Ticket .class , "tickets" ));
511
511
}
512
512
513
+ public Iterable <org .zendesk .client .v2 .model .Request > getOrganizationRequests (long organizationId ) {
514
+ return new PagedIterable <>(
515
+ tmpl ("/organizations/{organizationId}/requests.json" ).set ("organizationId" , organizationId ),
516
+ handleList (org .zendesk .client .v2 .model .Request .class , "requests" ));
517
+ }
518
+
513
519
public Iterable <Ticket > getUserRequestedTickets (long userId ) {
514
520
return new PagedIterable <>(tmpl ("/users/{userId}/tickets/requested.json" ).set ("userId" , userId ),
515
521
handleList (Ticket .class , "tickets" ));
Original file line number Diff line number Diff line change @@ -438,6 +438,18 @@ public void getOrganizationTickets() throws Exception {
438
438
}
439
439
}
440
440
441
+ @ Test
442
+ public void getOrganizationRequests () throws Exception {
443
+ createClientWithTokenOrPassword ();
444
+ int count = 0 ;
445
+ for (Request request : instance .getOrganizationRequests (CLOUDBEES_ORGANIZATION_ID )) {
446
+ assertThat (request .getId (), notNullValue ());
447
+ if (++count > 10 ) {
448
+ break ;
449
+ }
450
+ }
451
+ }
452
+
441
453
@ Test
442
454
public void getTicketAudits () throws Exception {
443
455
createClientWithTokenOrPassword ();
You can’t perform that action at this time.
0 commit comments