paypay/paypayopa-sdk-java

View on GitHub

Showing 27 of 27 total issues

QRCodeResponse has 64 methods (exceeds 20 allowed). Consider refactoring.
Open

public class QRCodeResponse {

  @SerializedName("codeId")
  private String codeId = null;
  
Severity: Major
Found in src/main/java/jp/ne/paypay/model/QRCodeResponse.java - About 1 day to fix

    File ApiClient.java has 493 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    package jp.ne.paypay;
    
    import com.google.gson.reflect.TypeToken;
    import com.squareup.okhttp.Call;
    import com.squareup.okhttp.FormEncodingBuilder;
    Severity: Minor
    Found in src/main/java/jp/ne/paypay/ApiClient.java - About 7 hrs to fix

      QRCode has 51 methods (exceeds 20 allowed). Consider refactoring.
      Open

      public class QRCode {
      
        @SerializedName("merchantPaymentId")
        @NotEmpty(message = "merchantPaymentId is required")
        @Size(max = 64, message = "maximum 64 characters are allowed for merchantPaymentId")
      Severity: Major
      Found in src/main/java/jp/ne/paypay/model/QRCode.java - About 7 hrs to fix

        ApiClient has 49 methods (exceeds 20 allowed). Consider refactoring.
        Open

        public class ApiClient {
        
            private String basePath = ApiConstants.DEFAULT_BASE_PATH;
            private String basePathProd = ApiConstants.PROD_BASE_PATH;
            private String basePathSandbox = ApiConstants.SANDBOX_BASE_PATH;
        Severity: Minor
        Found in src/main/java/jp/ne/paypay/ApiClient.java - About 6 hrs to fix

          Payment has 45 methods (exceeds 20 allowed). Consider refactoring.
          Open

          public class Payment extends PaymentState {
          
            @SerializedName("merchantPaymentId")
            @NotEmpty(message = "merchantPaymentId is required")
            @Size(max = 64, message = "maximum 64 characters are allowed for merchantPaymentId")
          Severity: Minor
          Found in src/main/java/jp/ne/paypay/model/Payment.java - About 6 hrs to fix

            PaymentApi has 44 methods (exceeds 20 allowed). Consider refactoring.
            Open

            public class PaymentApi {
                private ApiClient apiClient;
            
                private final Validator validator = Validator.getInstance();
            
            
            Severity: Minor
            Found in src/main/java/jp/ne/paypay/api/PaymentApi.java - About 6 hrs to fix

              File PaymentApiExample.java has 341 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              package jp.ne.paypay.example;
              
              import jp.ne.paypay.ApiClient;
              import jp.ne.paypay.ApiException;
              import jp.ne.paypay.Configuration;
              Severity: Minor
              Found in src/main/java/jp/ne/paypay/example/PaymentApiExample.java - About 4 hrs to fix

                File QRCodeResponse.java has 335 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                package jp.ne.paypay.model;
                
                import com.google.gson.TypeAdapter;
                import com.google.gson.annotations.JsonAdapter;
                import com.google.gson.annotations.SerializedName;
                Severity: Minor
                Found in src/main/java/jp/ne/paypay/model/QRCodeResponse.java - About 4 hrs to fix

                  PaymentState has 31 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                  public class PaymentState {
                  
                    @SerializedName("paymentId")
                    private String paymentId = null;
                    
                  Severity: Minor
                  Found in src/main/java/jp/ne/paypay/model/PaymentState.java - About 3 hrs to fix

                    Capture has 31 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                    public class Capture {
                    
                      @SerializedName("merchantCaptureId")
                      @NotEmpty(message = "merchantCaptureId is required")
                      private String merchantCaptureId = null;
                    Severity: Minor
                    Found in src/main/java/jp/ne/paypay/model/Capture.java - About 3 hrs to fix

                      UserAuthorizationData has 29 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                      public class UserAuthorizationData {
                      
                        @SerializedName("userAuthorizationId")
                        private String userAuthorizationId = null;
                        
                      Severity: Minor
                      Found in src/main/java/jp/ne/paypay/model/UserAuthorizationData.java - About 3 hrs to fix

                        File QRCode.java has 282 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        package jp.ne.paypay.model;
                        
                        import com.google.gson.TypeAdapter;
                        import com.google.gson.annotations.JsonAdapter;
                        import com.google.gson.annotations.SerializedName;
                        Severity: Minor
                        Found in src/main/java/jp/ne/paypay/model/QRCode.java - About 2 hrs to fix

                          Identical blocks of code found in 2 locations. Consider refactoring.
                          Open

                            @Override
                            public boolean equals(Object o) {
                              if (this == o) {
                                return true;
                              }
                          Severity: Major
                          Found in src/main/java/jp/ne/paypay/model/PaymentState.java and 1 other location - About 2 hrs to fix
                          src/main/java/jp/ne/paypay/model/Capture.java on lines 240..257

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 164.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 2 locations. Consider refactoring.
                          Open

                            @Override
                            public boolean equals(Object o) {
                              if (this == o) {
                                return true;
                              }
                          Severity: Major
                          Found in src/main/java/jp/ne/paypay/model/Capture.java and 1 other location - About 2 hrs to fix
                          src/main/java/jp/ne/paypay/model/PaymentState.java on lines 241..258

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 164.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          RevertAuthResponseData has 22 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                          public class RevertAuthResponseData {
                          
                            /**
                             * Gets or Sets status
                             */
                          Severity: Minor
                          Found in src/main/java/jp/ne/paypay/model/RevertAuthResponseData.java - About 2 hrs to fix

                            Refund has 22 methods (exceeds 20 allowed). Consider refactoring.
                            Open

                            public class Refund extends RefundState {
                            
                                @SerializedName("merchantRefundId")
                                @NotEmpty(message = "merchantRefundId is required")
                                @Size(max = 64, message = "maximum 64 characters are allowed for merchantRefundtId")
                            Severity: Minor
                            Found in src/main/java/jp/ne/paypay/model/Refund.java - About 2 hrs to fix

                              File Payment.java has 259 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              package jp.ne.paypay.model;
                              
                              import com.google.gson.annotations.SerializedName;
                              
                              import java.time.Instant;
                              Severity: Minor
                              Found in src/main/java/jp/ne/paypay/model/Payment.java - About 2 hrs to fix

                                Identical blocks of code found in 2 locations. Consider refactoring.
                                Open

                                    return Objects.equals(this.paymentMethodType, another.paymentMethodType) &&
                                      Objects.equals(this.paymentMethodId, another.paymentMethodId) &&
                                      Objects.equals(this.issuerName, another.issuerName) &&
                                      Objects.equals(this.accountNo, another.accountNo) &&
                                      Objects.equals(this.logoUrl, another.logoUrl) &&
                                Severity: Major
                                Found in src/main/java/jp/ne/paypay/model/PaymentMethod.java and 1 other location - About 2 hrs to fix
                                src/main/java/jp/ne/paypay/model/Payment.java on lines 333..342

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 138.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Identical blocks of code found in 2 locations. Consider refactoring.
                                Open

                                    return Objects.equals(this.merchantPaymentId, payment.merchantPaymentId) &&
                                        Objects.equals(this.userAuthorizationId, payment.userAuthorizationId) &&
                                        Objects.equals(this.amount, payment.amount) &&
                                        Objects.equals(this.requestedAt, payment.requestedAt) &&
                                        Objects.equals(this.storeId, payment.storeId) &&
                                Severity: Major
                                Found in src/main/java/jp/ne/paypay/model/Payment.java and 1 other location - About 2 hrs to fix
                                src/main/java/jp/ne/paypay/model/PaymentMethod.java on lines 99..108

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 138.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Method deserialize has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    @SuppressWarnings("unchecked")
                                    public <T> T deserialize(Response response, Type returnType) throws ApiException {
                                        if (response == null || returnType == null) {
                                            return null;
                                        }
                                Severity: Minor
                                Found in src/main/java/jp/ne/paypay/ApiClient.java - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language