public @NonNull ChargeRequest.Builder autoReturn(long timeout,TimeUnit unit){
  long autoReturnMillis;
  if (timeout != RegisterApi.AUTO_RETURN_NO_TIMEOUT) {
    autoReturnMillis=unit.toMillis(timeout);
    nonNull(unit,"unit");
    if (autoReturnMillis < RegisterApi.AUTO_RETURN_TIMEOUT_MIN_MILLIS) {
      throw new IllegalArgumentException("timeout should be at least " + RegisterApi.AUTO_RETURN_TIMEOUT_MIN_MILLIS);
    }
    if (autoReturnMillis > RegisterApi.AUTO_RETURN_TIMEOUT_MAX_MILLIS) {
      throw new IllegalArgumentException("timeout should be less than " + RegisterApi.AUTO_RETURN_TIMEOUT_MAX_MILLIS);
    }
  }
 else {
    autoReturnMillis=RegisterApi.AUTO_RETURN_NO_TIMEOUT;
  }
  this.autoReturnMillis=autoReturnMillis;
  return this;
}

public @ NonNull ChargeRequest . Builder autoReturn ( long timeout , TimeUnit unit ) { long autoReturnMillis ; if ( timeout != RegisterApi . AUTO_RETURN_NO_TIMEOUT ) { autoReturnMillis = unit . toMillis ( timeout ) ; nonNull ( unit , "unit" ) ; if ( autoReturnMillis < RegisterApi . AUTO_RETURN_TIMEOUT_MIN_MILLIS ) { throw new IllegalArgumentException ( "timeout should be at least " + RegisterApi . AUTO_RETURN_TIMEOUT_MIN_MILLIS ) ; } if ( autoReturnMillis > RegisterApi . AUTO_RETURN_TIMEOUT_MAX_MILLIS ) { throw new IllegalArgumentException ( "timeout should be less than " + RegisterApi . AUTO_RETURN_TIMEOUT_MAX_MILLIS ) ; } } else { autoReturnMillis = RegisterApi . AUTO_RETURN_NO_TIMEOUT ; } this . autoReturnMillis = autoReturnMillis ; return this ; }
< p > after a transaction completes , square register automatically returns to your app after the timeout you provide to this method .
