paypay/paypayopa-sdk-node

View on GitHub

Showing 24 of 26 total issues

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

  public createPayment = (
    payload: any,
    ...args: [callback?: HttpsClientMessage] | [agreeSimilarTransaction: boolean, callback?: HttpsClientMessage]
  ) => {
    const agreeSimilarTransaction = args[0] === true;
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 1 other location - About 4 hrs to fix
src/lib/paypay-rest-sdk.ts on lines 342..350

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 128.

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

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

  public paymentPreauthorize = (
    payload: any,
    ...args: [callback?: HttpsClientMessage] | [agreeSimilarTransaction: boolean, callback?: HttpsClientMessage]
  ) => {
    const agreeSimilarTransaction = args[0] === true;
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 1 other location - About 4 hrs to fix
src/lib/paypay-rest-sdk.ts on lines 178..186

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 128.

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

Similar blocks of code found in 13 locations. Consider refactoring.
Open

  public checkUserWalletBalance = (inputParams: Array<string | number>, callback?: HttpsClientMessage) => {
    return this.invokeMethod(this.getEndpoint("API_WALLET", "CHECK_BALANCE"), inputParams, callback);
  }
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 12 other locations - About 1 hr to fix
src/lib/paypay-rest-sdk.ts on lines 204..206
src/lib/paypay-rest-sdk.ts on lines 215..217
src/lib/paypay-rest-sdk.ts on lines 226..228
src/lib/paypay-rest-sdk.ts on lines 238..240
src/lib/paypay-rest-sdk.ts on lines 284..286
src/lib/paypay-rest-sdk.ts on lines 307..309
src/lib/paypay-rest-sdk.ts on lines 318..320
src/lib/paypay-rest-sdk.ts on lines 374..376
src/lib/paypay-rest-sdk.ts on lines 385..387
src/lib/paypay-rest-sdk.ts on lines 407..409
src/lib/paypay-rest-sdk.ts on lines 418..420
src/lib/paypay-rest-sdk.ts on lines 444..446

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 57.

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

Similar blocks of code found in 13 locations. Consider refactoring.
Open

  public getPaymentDetails = (inputParams: Array<string | number>, callback?: HttpsClientMessage) => {
    return this.invokeMethod(this.getEndpoint("API_PAYMENT", "GET_PAYMENT_DETAILS"), inputParams, callback);
  }
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 12 other locations - About 1 hr to fix
src/lib/paypay-rest-sdk.ts on lines 204..206
src/lib/paypay-rest-sdk.ts on lines 215..217
src/lib/paypay-rest-sdk.ts on lines 238..240
src/lib/paypay-rest-sdk.ts on lines 284..286
src/lib/paypay-rest-sdk.ts on lines 296..298
src/lib/paypay-rest-sdk.ts on lines 307..309
src/lib/paypay-rest-sdk.ts on lines 318..320
src/lib/paypay-rest-sdk.ts on lines 374..376
src/lib/paypay-rest-sdk.ts on lines 385..387
src/lib/paypay-rest-sdk.ts on lines 407..409
src/lib/paypay-rest-sdk.ts on lines 418..420
src/lib/paypay-rest-sdk.ts on lines 444..446

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 57.

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

Similar blocks of code found in 13 locations. Consider refactoring.
Open

  public getPendingPaymentDetails = (inputParams: Array<string | number>, callback?: HttpsClientMessage) => {
    return this.invokeMethod(this.getEndpoint("API_REQUEST_ORDER", "GET_ORDER_DETAILS"), inputParams, callback);
  }
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 12 other locations - About 1 hr to fix
src/lib/paypay-rest-sdk.ts on lines 204..206
src/lib/paypay-rest-sdk.ts on lines 215..217
src/lib/paypay-rest-sdk.ts on lines 226..228
src/lib/paypay-rest-sdk.ts on lines 238..240
src/lib/paypay-rest-sdk.ts on lines 284..286
src/lib/paypay-rest-sdk.ts on lines 296..298
src/lib/paypay-rest-sdk.ts on lines 307..309
src/lib/paypay-rest-sdk.ts on lines 318..320
src/lib/paypay-rest-sdk.ts on lines 385..387
src/lib/paypay-rest-sdk.ts on lines 407..409
src/lib/paypay-rest-sdk.ts on lines 418..420
src/lib/paypay-rest-sdk.ts on lines 444..446

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 57.

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

Similar blocks of code found in 13 locations. Consider refactoring.
Open

  public paymentCancel = (inputParams: Array<string | number>, callback?: HttpsClientMessage) => {
    return this.invokeMethod(this.getEndpoint("API_PAYMENT", "CANCEL_PAYMENT"), inputParams, callback);
  }
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 12 other locations - About 1 hr to fix
src/lib/paypay-rest-sdk.ts on lines 204..206
src/lib/paypay-rest-sdk.ts on lines 215..217
src/lib/paypay-rest-sdk.ts on lines 226..228
src/lib/paypay-rest-sdk.ts on lines 284..286
src/lib/paypay-rest-sdk.ts on lines 296..298
src/lib/paypay-rest-sdk.ts on lines 307..309
src/lib/paypay-rest-sdk.ts on lines 318..320
src/lib/paypay-rest-sdk.ts on lines 374..376
src/lib/paypay-rest-sdk.ts on lines 385..387
src/lib/paypay-rest-sdk.ts on lines 407..409
src/lib/paypay-rest-sdk.ts on lines 418..420
src/lib/paypay-rest-sdk.ts on lines 444..446

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 57.

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

Similar blocks of code found in 13 locations. Consider refactoring.
Open

  public cancelPendingOrder = (inputParams: Array<string | number>, callback?: HttpsClientMessage) => {
    return this.invokeMethod(this.getEndpoint("API_REQUEST_ORDER", "PENDING_ORDER_CANCEL"), inputParams, callback);
  }
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 12 other locations - About 1 hr to fix
src/lib/paypay-rest-sdk.ts on lines 204..206
src/lib/paypay-rest-sdk.ts on lines 215..217
src/lib/paypay-rest-sdk.ts on lines 226..228
src/lib/paypay-rest-sdk.ts on lines 238..240
src/lib/paypay-rest-sdk.ts on lines 284..286
src/lib/paypay-rest-sdk.ts on lines 296..298
src/lib/paypay-rest-sdk.ts on lines 307..309
src/lib/paypay-rest-sdk.ts on lines 318..320
src/lib/paypay-rest-sdk.ts on lines 374..376
src/lib/paypay-rest-sdk.ts on lines 407..409
src/lib/paypay-rest-sdk.ts on lines 418..420
src/lib/paypay-rest-sdk.ts on lines 444..446

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 57.

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

Similar blocks of code found in 13 locations. Consider refactoring.
Open

  public getCashBackDetails = (inputParams: Array<string | number>, callback?: HttpsClientMessage) => {
    return this.invokeMethod(this.getEndpoint("API_PAYMENT", "CHECK_CASHBACK_DETAILS"), inputParams, callback);
  }
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 12 other locations - About 1 hr to fix
src/lib/paypay-rest-sdk.ts on lines 204..206
src/lib/paypay-rest-sdk.ts on lines 215..217
src/lib/paypay-rest-sdk.ts on lines 226..228
src/lib/paypay-rest-sdk.ts on lines 238..240
src/lib/paypay-rest-sdk.ts on lines 284..286
src/lib/paypay-rest-sdk.ts on lines 296..298
src/lib/paypay-rest-sdk.ts on lines 307..309
src/lib/paypay-rest-sdk.ts on lines 318..320
src/lib/paypay-rest-sdk.ts on lines 374..376
src/lib/paypay-rest-sdk.ts on lines 385..387
src/lib/paypay-rest-sdk.ts on lines 407..409
src/lib/paypay-rest-sdk.ts on lines 418..420

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 57.

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

Similar blocks of code found in 13 locations. Consider refactoring.
Open

  public getRefundDetails = (inputParams: Array<string | number>, callback?: HttpsClientMessage) => {
    return this.invokeMethod(this.getEndpoint("API_PAYMENT", "GET_REFUND_DETAILS"), inputParams, callback);
  }
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 12 other locations - About 1 hr to fix
src/lib/paypay-rest-sdk.ts on lines 204..206
src/lib/paypay-rest-sdk.ts on lines 215..217
src/lib/paypay-rest-sdk.ts on lines 226..228
src/lib/paypay-rest-sdk.ts on lines 238..240
src/lib/paypay-rest-sdk.ts on lines 296..298
src/lib/paypay-rest-sdk.ts on lines 307..309
src/lib/paypay-rest-sdk.ts on lines 318..320
src/lib/paypay-rest-sdk.ts on lines 374..376
src/lib/paypay-rest-sdk.ts on lines 385..387
src/lib/paypay-rest-sdk.ts on lines 407..409
src/lib/paypay-rest-sdk.ts on lines 418..420
src/lib/paypay-rest-sdk.ts on lines 444..446

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 57.

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

Similar blocks of code found in 13 locations. Consider refactoring.
Open

  public qrCodeDelete = (inputParams: Array<string | number>, callback?: HttpsClientMessage) => {
    return this.invokeMethod(this.getEndpoint("API_PAYMENT", "QRCODE_DELETE"), inputParams, callback);
  }
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 12 other locations - About 1 hr to fix
src/lib/paypay-rest-sdk.ts on lines 215..217
src/lib/paypay-rest-sdk.ts on lines 226..228
src/lib/paypay-rest-sdk.ts on lines 238..240
src/lib/paypay-rest-sdk.ts on lines 284..286
src/lib/paypay-rest-sdk.ts on lines 296..298
src/lib/paypay-rest-sdk.ts on lines 307..309
src/lib/paypay-rest-sdk.ts on lines 318..320
src/lib/paypay-rest-sdk.ts on lines 374..376
src/lib/paypay-rest-sdk.ts on lines 385..387
src/lib/paypay-rest-sdk.ts on lines 407..409
src/lib/paypay-rest-sdk.ts on lines 418..420
src/lib/paypay-rest-sdk.ts on lines 444..446

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 57.

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

Similar blocks of code found in 13 locations. Consider refactoring.
Open

  public unlinkUser = (inputParams: Array<string | number>, callback?: HttpsClientMessage) => {
    return this.invokeMethod(this.getEndpoint("USER_AUTHORIZATION", "UNLINK_USER"), inputParams, callback);
  }
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 12 other locations - About 1 hr to fix
src/lib/paypay-rest-sdk.ts on lines 204..206
src/lib/paypay-rest-sdk.ts on lines 215..217
src/lib/paypay-rest-sdk.ts on lines 226..228
src/lib/paypay-rest-sdk.ts on lines 238..240
src/lib/paypay-rest-sdk.ts on lines 284..286
src/lib/paypay-rest-sdk.ts on lines 296..298
src/lib/paypay-rest-sdk.ts on lines 307..309
src/lib/paypay-rest-sdk.ts on lines 318..320
src/lib/paypay-rest-sdk.ts on lines 374..376
src/lib/paypay-rest-sdk.ts on lines 385..387
src/lib/paypay-rest-sdk.ts on lines 407..409
src/lib/paypay-rest-sdk.ts on lines 444..446

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 57.

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

Similar blocks of code found in 13 locations. Consider refactoring.
Open

  public getCodePaymentDetails = (inputParams: Array<string | number>, callback?: HttpsClientMessage) => {
    return this.invokeMethod(this.getEndpoint("API_PAYMENT", "GET_CODE_PAYMENT_DETAILS"), inputParams, callback);
  }
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 12 other locations - About 1 hr to fix
src/lib/paypay-rest-sdk.ts on lines 204..206
src/lib/paypay-rest-sdk.ts on lines 226..228
src/lib/paypay-rest-sdk.ts on lines 238..240
src/lib/paypay-rest-sdk.ts on lines 284..286
src/lib/paypay-rest-sdk.ts on lines 296..298
src/lib/paypay-rest-sdk.ts on lines 307..309
src/lib/paypay-rest-sdk.ts on lines 318..320
src/lib/paypay-rest-sdk.ts on lines 374..376
src/lib/paypay-rest-sdk.ts on lines 385..387
src/lib/paypay-rest-sdk.ts on lines 407..409
src/lib/paypay-rest-sdk.ts on lines 418..420
src/lib/paypay-rest-sdk.ts on lines 444..446

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 57.

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

Similar blocks of code found in 13 locations. Consider refactoring.
Open

  public authorizationResult = (inputParams: Array<string | number>, callback?: HttpsClientMessage) => {
    return this.invokeMethod(this.getEndpoint("API_DIRECT_DEBIT", "AUTHORIZATION_RESULT"), inputParams, callback);
  }
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 12 other locations - About 1 hr to fix
src/lib/paypay-rest-sdk.ts on lines 204..206
src/lib/paypay-rest-sdk.ts on lines 215..217
src/lib/paypay-rest-sdk.ts on lines 226..228
src/lib/paypay-rest-sdk.ts on lines 238..240
src/lib/paypay-rest-sdk.ts on lines 284..286
src/lib/paypay-rest-sdk.ts on lines 296..298
src/lib/paypay-rest-sdk.ts on lines 307..309
src/lib/paypay-rest-sdk.ts on lines 374..376
src/lib/paypay-rest-sdk.ts on lines 385..387
src/lib/paypay-rest-sdk.ts on lines 407..409
src/lib/paypay-rest-sdk.ts on lines 418..420
src/lib/paypay-rest-sdk.ts on lines 444..446

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 57.

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

Similar blocks of code found in 13 locations. Consider refactoring.
Open

  public getUserAuthorizationStatus = (inputParams: Array<string | number>, callback?: HttpsClientMessage) => {
    return this.invokeMethod(this.getEndpoint("USER_AUTHORIZATION", "GET_USER_AUTHORIZATION_STATUS"), inputParams, callback);
  }
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 12 other locations - About 1 hr to fix
src/lib/paypay-rest-sdk.ts on lines 204..206
src/lib/paypay-rest-sdk.ts on lines 215..217
src/lib/paypay-rest-sdk.ts on lines 226..228
src/lib/paypay-rest-sdk.ts on lines 238..240
src/lib/paypay-rest-sdk.ts on lines 284..286
src/lib/paypay-rest-sdk.ts on lines 296..298
src/lib/paypay-rest-sdk.ts on lines 307..309
src/lib/paypay-rest-sdk.ts on lines 318..320
src/lib/paypay-rest-sdk.ts on lines 374..376
src/lib/paypay-rest-sdk.ts on lines 385..387
src/lib/paypay-rest-sdk.ts on lines 418..420
src/lib/paypay-rest-sdk.ts on lines 444..446

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 57.

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

Similar blocks of code found in 13 locations. Consider refactoring.
Open

  public authorization = (inputParams: Array<string | number>, callback?: HttpsClientMessage) => {
    return this.invokeMethod(this.getEndpoint("API_DIRECT_DEBIT", "AUTHORIZATION"), inputParams, callback);
  }
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 12 other locations - About 1 hr to fix
src/lib/paypay-rest-sdk.ts on lines 204..206
src/lib/paypay-rest-sdk.ts on lines 215..217
src/lib/paypay-rest-sdk.ts on lines 226..228
src/lib/paypay-rest-sdk.ts on lines 238..240
src/lib/paypay-rest-sdk.ts on lines 284..286
src/lib/paypay-rest-sdk.ts on lines 296..298
src/lib/paypay-rest-sdk.ts on lines 318..320
src/lib/paypay-rest-sdk.ts on lines 374..376
src/lib/paypay-rest-sdk.ts on lines 385..387
src/lib/paypay-rest-sdk.ts on lines 407..409
src/lib/paypay-rest-sdk.ts on lines 418..420
src/lib/paypay-rest-sdk.ts on lines 444..446

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 57.

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

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  public paymentAuthCapture = (payload: any, callback?: HttpsClientMessage) => {
    return this.invokeMethod(this.getEndpoint("API_PAYMENT", "PAYMENT_AUTH_CAPTURE"), payload, callback);
  }
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 8 other locations - About 40 mins to fix
src/lib/paypay-rest-sdk.ts on lines 194..196
src/lib/paypay-rest-sdk.ts on lines 262..264
src/lib/paypay-rest-sdk.ts on lines 273..275
src/lib/paypay-rest-sdk.ts on lines 328..330
src/lib/paypay-rest-sdk.ts on lines 363..365
src/lib/paypay-rest-sdk.ts on lines 396..398
src/lib/paypay-rest-sdk.ts on lines 431..433
src/lib/paypay-rest-sdk.ts on lines 457..459

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 48.

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

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  public accountLinkQRCodeCreate = (payload: any, callback?: HttpsClientMessage) => {
    return this.invokeMethod(this.getEndpoint("API_ACCOUNT_LINK", "QRCODE_CREATE"), payload, callback);
  }
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 8 other locations - About 40 mins to fix
src/lib/paypay-rest-sdk.ts on lines 194..196
src/lib/paypay-rest-sdk.ts on lines 250..252
src/lib/paypay-rest-sdk.ts on lines 262..264
src/lib/paypay-rest-sdk.ts on lines 273..275
src/lib/paypay-rest-sdk.ts on lines 363..365
src/lib/paypay-rest-sdk.ts on lines 396..398
src/lib/paypay-rest-sdk.ts on lines 431..433
src/lib/paypay-rest-sdk.ts on lines 457..459

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 48.

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

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  public refundPendingPayment = (payload: any, callback?: HttpsClientMessage) => {
    return this.invokeMethod(this.getEndpoint("API_PAYMENT", "REFUND_PAYMENT"), payload, callback);
  }
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 8 other locations - About 40 mins to fix
src/lib/paypay-rest-sdk.ts on lines 194..196
src/lib/paypay-rest-sdk.ts on lines 250..252
src/lib/paypay-rest-sdk.ts on lines 262..264
src/lib/paypay-rest-sdk.ts on lines 273..275
src/lib/paypay-rest-sdk.ts on lines 328..330
src/lib/paypay-rest-sdk.ts on lines 363..365
src/lib/paypay-rest-sdk.ts on lines 431..433
src/lib/paypay-rest-sdk.ts on lines 457..459

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 48.

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

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  public cashBack = (payload: any, callback?: HttpsClientMessage) => {
    return this.invokeMethod(this.getEndpoint("API_PAYMENT", "GIVE_CASH_BACK"), payload, callback);
  }
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 8 other locations - About 40 mins to fix
src/lib/paypay-rest-sdk.ts on lines 194..196
src/lib/paypay-rest-sdk.ts on lines 250..252
src/lib/paypay-rest-sdk.ts on lines 262..264
src/lib/paypay-rest-sdk.ts on lines 273..275
src/lib/paypay-rest-sdk.ts on lines 328..330
src/lib/paypay-rest-sdk.ts on lines 363..365
src/lib/paypay-rest-sdk.ts on lines 396..398
src/lib/paypay-rest-sdk.ts on lines 457..459

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 48.

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

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  public reverseCashBack = (payload: any, callback?: HttpsClientMessage) => {
    return this.invokeMethod(this.getEndpoint("API_PAYMENT", "REVERSAL_CASHBACK"), payload, callback);
  }
Severity: Major
Found in src/lib/paypay-rest-sdk.ts and 8 other locations - About 40 mins to fix
src/lib/paypay-rest-sdk.ts on lines 194..196
src/lib/paypay-rest-sdk.ts on lines 250..252
src/lib/paypay-rest-sdk.ts on lines 262..264
src/lib/paypay-rest-sdk.ts on lines 273..275
src/lib/paypay-rest-sdk.ts on lines 328..330
src/lib/paypay-rest-sdk.ts on lines 363..365
src/lib/paypay-rest-sdk.ts on lines 396..398
src/lib/paypay-rest-sdk.ts on lines 431..433

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 48.

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

Severity
Category
Status
Source
Language