paypay/paypayopa-sdk-java

View on GitHub

Showing 27 of 27 total issues

Method buildUrl has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public String buildUrl(String path, List<Pair> queryParams, List<Pair> collectionQueryParams) {
        final StringBuilder url = new StringBuilder();
        url.append(basePath).append(path);

        if (queryParams != null && !queryParams.isEmpty()) {
Severity: Minor
Found in src/main/java/jp/ne/paypay/ApiClient.java - About 1 hr to fix

    Method appInvokeFlow has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      private static void appInvokeFlow(final PaymentApi paymentApi, final WalletApi walletApiInstance,
                                        final String userAuthorizationId) {
        int amount =1;
        QRCodeDetails qrCodeDetails = createQRCode(paymentApi, amount);
    
    
    Severity: Minor
    Found in src/main/java/jp/ne/paypay/example/PaymentApiExample.java - About 1 hr to fix

      Method preAuthCaptureFlow has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        private static void preAuthCaptureFlow(WalletApi walletApiInstance, PaymentApi paymentApi, String userAuthorizationId){
      
          String merchantPaymentId  = UUID.randomUUID().toString();
          System.out.println("Checking wallet balance...");
          int amount =1;
      Severity: Minor
      Found in src/main/java/jp/ne/paypay/example/PaymentApiExample.java - About 1 hr to fix

        Method checkWalletBalanceCall has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private Call checkWalletBalanceCall(String userAuthorizationId, Integer amount, String currency,
                    ProductType productType) throws ApiException {
        
                String localVarPath = "/v2/wallet/check_balance";
        
        
        Severity: Minor
        Found in src/main/java/jp/ne/paypay/api/WalletApi.java - About 1 hr to fix

          Method prepareDownloadFile has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public File prepareDownloadFile(Response response) throws IOException {
                  String filename = null;
                  String contentDisposition = response.header("Content-Disposition");
                  if (contentDisposition != null && !"".equals(contentDisposition)) {
                      // Get filename from the Content-Disposition header.
          Severity: Minor
          Found in src/main/java/jp/ne/paypay/ApiClient.java - About 1 hr to fix

            Avoid too many return statements within this method.
            Open

                        return (T) respBody;
            Severity: Major
            Found in src/main/java/jp/ne/paypay/ApiClient.java - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                          return json.deserialize(respBody, returnType);
              Severity: Major
              Found in src/main/java/jp/ne/paypay/ApiClient.java - About 30 mins to fix
                Severity
                Category
                Status
                Source
                Language