public BitsoWithdrawal [ ] getWithdrawals ( String [ ] withdrawalsIds , String ... queryParameters ) throws BitsoAPIException , BitsoPayloadException , BitsoServerException { String request = "/api/v3/withdrawals" ; if ( ( withdrawalsIds != null ) && ( queryParameters != null && queryParameters . length > 0 ) ) { return null ; } if ( withdrawalsIds != null ) { String withdrawalsIdsParameters = processQueryParameters ( "-" , withdrawalsIds ) ; request += ( ( withdrawalsIdsParameters != null ) ? "/" + withdrawalsIdsParameters : "" ) ; } if ( queryParameters != null && queryParameters . length > 0 ) { String parsedQueryParametes = processQueryParameters ( "&" , queryParameters ) ; request += ( ( parsedQueryParametes != null ) ? "?" + parsedQueryParametes : "" ) ; } String getResponse = sendBitsoGet ( request ) ; JSONArray payloadJSON = ( JSONArray ) getJSONPayload ( getResponse ) ; int totalElements = payloadJSON . length ( ) ; BitsoWithdrawal [ ] withdrawals = new BitsoWithdrawal [ totalElements ] ; for ( int i = 0 ; i < totalElements ; i ++ ) { withdrawals [ i ] = new BitsoWithdrawal ( payloadJSON . getJSONObject ( i ) ) ; } return withdrawals ; }
The request needs withdrawalsIds or queryParameters not both . In case both parameters are provided null will be returned