private Iterable < BoxRetentionPolicyAssignment . Info > getAssignments ( String type , int limit , String ... fields ) { QueryStringBuilder queryString = new QueryStringBuilder ( ) ; if ( type != null ) { queryString . appendParam ( "type" , type ) ; } if ( fields . length > 0 ) { queryString . appendParam ( "fields" , fields ) ; } URL url = ASSIGNMENTS_URL_TEMPLATE . buildWithQuery ( getAPI ( ) . getBaseURL ( ) , queryString . toString ( ) , getID ( ) ) ; return new BoxResourceIterable < BoxRetentionPolicyAssignment . Info > ( getAPI ( ) , url , limit ) { @ Override protected BoxRetentionPolicyAssignment . Info factory ( JsonObject jsonObject ) { BoxRetentionPolicyAssignment assignment = new BoxRetentionPolicyAssignment ( getAPI ( ) , jsonObject . get ( "id" ) . asString ( ) ) ; return assignment . new Info ( jsonObject ) ; } } ; }
Returns iterable with all assignments of given type of this retention policy .