gerencianet/gn-api-sdk-node

View on GitHub

Showing 128 of 128 total issues

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

gerencianet.ofDevolutionPix(params, body)
    .then((resposta) => {
        console.log(resposta)
    })
    .catch((error) => {
Severity: Major
Found in examples/open-finance/payment/ofDevolutionPix.js and 38 other locations - About 1 hr to fix
examples/charges/billet/createBilletHistory.js on lines 14..20
examples/charges/billet/defineBalanceSheetBillet.js on lines 75..81
examples/charges/billet/defineBilletPayMethod.js on lines 25..31
examples/charges/billet/sendBilletEmail.js on lines 14..20
examples/charges/billet/updateBillet.js on lines 14..20
examples/charges/billet/updateBilletMetadata.js on lines 15..21
examples/charges/card/createCardHistory.js on lines 14..20
examples/charges/card/defineCardPayMethod.js on lines 34..40
examples/charges/card/updateCardMetadata.js on lines 15..21
examples/charges/carnet/createCarnetHistory.js on lines 14..20
examples/charges/carnet/sendCarnetEmail.js on lines 14..20
examples/charges/carnet/sendCarnetParcelEmail.js on lines 15..21
examples/charges/carnet/updateCarnetMetadata.js on lines 15..21
examples/charges/carnet/updateCarnetParcel.js on lines 15..21
examples/charges/payment-link/createChargeLinkHistory.js on lines 14..20
examples/charges/payment-link/createOneStepLink.js on lines 27..33
examples/charges/payment-link/defineLinkPayMethod.js on lines 19..25
examples/charges/payment-link/sendLinkEmail.js on lines 14..20
examples/charges/payment-link/updateLink.js on lines 19..25
examples/charges/payment-link/updateLinkMetadata.js on lines 15..21
examples/charges/subscription/createOneStepBilletSubscription.js on lines 32..36
examples/charges/subscription/createOneStepCardSubscription.js on lines 41..45
examples/charges/subscription/createOneStepSubscriptionLink.js on lines 25..29
examples/charges/subscription/createPlan.js on lines 14..20
examples/charges/subscription/createSubscriptionHistory.js on lines 14..20
examples/charges/subscription/defineSubscriptionBillet.js on lines 25..31
examples/charges/subscription/defineSubscriptionCard.js on lines 33..39
examples/charges/subscription/sendSubscriptionLinkEmail.js on lines 14..20
examples/charges/subscription/updatePlan.js on lines 14..20
examples/charges/subscription/updateSubscriptionMetadata.js on lines 15..21
examples/payments/billets/payRequestBarCode.js on lines 16..22
examples/pix/cob/pixCreateCharge.js on lines 34..40
examples/pix/cob/pixUpdateCharge.js on lines 35..41
examples/pix/cobv/pixCreateDueCharge.js on lines 46..52
examples/pix/cobv/pixUpdateDueCharge.js on lines 29..35
examples/pix/pix/pixDevolution.js on lines 15..21
examples/pix/send/pixSend.js on lines 20..26
examples/pix/webhooks/pixConfigWebhook.js on lines 16..22

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

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 39 locations. Consider refactoring.
Open

gerencianet.createChargeHistory(params, body)
    .then((resposta) => {
        console.log(resposta)
    })
    .catch((error) => {
Severity: Major
Found in examples/charges/payment-link/createChargeLinkHistory.js and 38 other locations - About 1 hr to fix
examples/charges/billet/createBilletHistory.js on lines 14..20
examples/charges/billet/defineBalanceSheetBillet.js on lines 75..81
examples/charges/billet/defineBilletPayMethod.js on lines 25..31
examples/charges/billet/sendBilletEmail.js on lines 14..20
examples/charges/billet/updateBillet.js on lines 14..20
examples/charges/billet/updateBilletMetadata.js on lines 15..21
examples/charges/card/createCardHistory.js on lines 14..20
examples/charges/card/defineCardPayMethod.js on lines 34..40
examples/charges/card/updateCardMetadata.js on lines 15..21
examples/charges/carnet/createCarnetHistory.js on lines 14..20
examples/charges/carnet/sendCarnetEmail.js on lines 14..20
examples/charges/carnet/sendCarnetParcelEmail.js on lines 15..21
examples/charges/carnet/updateCarnetMetadata.js on lines 15..21
examples/charges/carnet/updateCarnetParcel.js on lines 15..21
examples/charges/payment-link/createOneStepLink.js on lines 27..33
examples/charges/payment-link/defineLinkPayMethod.js on lines 19..25
examples/charges/payment-link/sendLinkEmail.js on lines 14..20
examples/charges/payment-link/updateLink.js on lines 19..25
examples/charges/payment-link/updateLinkMetadata.js on lines 15..21
examples/charges/subscription/createOneStepBilletSubscription.js on lines 32..36
examples/charges/subscription/createOneStepCardSubscription.js on lines 41..45
examples/charges/subscription/createOneStepSubscriptionLink.js on lines 25..29
examples/charges/subscription/createPlan.js on lines 14..20
examples/charges/subscription/createSubscriptionHistory.js on lines 14..20
examples/charges/subscription/defineSubscriptionBillet.js on lines 25..31
examples/charges/subscription/defineSubscriptionCard.js on lines 33..39
examples/charges/subscription/sendSubscriptionLinkEmail.js on lines 14..20
examples/charges/subscription/updatePlan.js on lines 14..20
examples/charges/subscription/updateSubscriptionMetadata.js on lines 15..21
examples/open-finance/payment/ofDevolutionPix.js on lines 14..20
examples/payments/billets/payRequestBarCode.js on lines 16..22
examples/pix/cob/pixCreateCharge.js on lines 34..40
examples/pix/cob/pixUpdateCharge.js on lines 35..41
examples/pix/cobv/pixCreateDueCharge.js on lines 46..52
examples/pix/cobv/pixUpdateDueCharge.js on lines 29..35
examples/pix/pix/pixDevolution.js on lines 15..21
examples/pix/send/pixSend.js on lines 20..26
examples/pix/webhooks/pixConfigWebhook.js on lines 16..22

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

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 39 locations. Consider refactoring.
Open

gerencianet.pixSend(params, body)
    .then((resposta) => {
        console.log(resposta)
    })
    .catch((error) => {
Severity: Major
Found in examples/pix/send/pixSend.js and 38 other locations - About 1 hr to fix
examples/charges/billet/createBilletHistory.js on lines 14..20
examples/charges/billet/defineBalanceSheetBillet.js on lines 75..81
examples/charges/billet/defineBilletPayMethod.js on lines 25..31
examples/charges/billet/sendBilletEmail.js on lines 14..20
examples/charges/billet/updateBillet.js on lines 14..20
examples/charges/billet/updateBilletMetadata.js on lines 15..21
examples/charges/card/createCardHistory.js on lines 14..20
examples/charges/card/defineCardPayMethod.js on lines 34..40
examples/charges/card/updateCardMetadata.js on lines 15..21
examples/charges/carnet/createCarnetHistory.js on lines 14..20
examples/charges/carnet/sendCarnetEmail.js on lines 14..20
examples/charges/carnet/sendCarnetParcelEmail.js on lines 15..21
examples/charges/carnet/updateCarnetMetadata.js on lines 15..21
examples/charges/carnet/updateCarnetParcel.js on lines 15..21
examples/charges/payment-link/createChargeLinkHistory.js on lines 14..20
examples/charges/payment-link/createOneStepLink.js on lines 27..33
examples/charges/payment-link/defineLinkPayMethod.js on lines 19..25
examples/charges/payment-link/sendLinkEmail.js on lines 14..20
examples/charges/payment-link/updateLink.js on lines 19..25
examples/charges/payment-link/updateLinkMetadata.js on lines 15..21
examples/charges/subscription/createOneStepBilletSubscription.js on lines 32..36
examples/charges/subscription/createOneStepCardSubscription.js on lines 41..45
examples/charges/subscription/createOneStepSubscriptionLink.js on lines 25..29
examples/charges/subscription/createPlan.js on lines 14..20
examples/charges/subscription/createSubscriptionHistory.js on lines 14..20
examples/charges/subscription/defineSubscriptionBillet.js on lines 25..31
examples/charges/subscription/defineSubscriptionCard.js on lines 33..39
examples/charges/subscription/sendSubscriptionLinkEmail.js on lines 14..20
examples/charges/subscription/updatePlan.js on lines 14..20
examples/charges/subscription/updateSubscriptionMetadata.js on lines 15..21
examples/open-finance/payment/ofDevolutionPix.js on lines 14..20
examples/payments/billets/payRequestBarCode.js on lines 16..22
examples/pix/cob/pixCreateCharge.js on lines 34..40
examples/pix/cob/pixUpdateCharge.js on lines 35..41
examples/pix/cobv/pixCreateDueCharge.js on lines 46..52
examples/pix/cobv/pixUpdateDueCharge.js on lines 29..35
examples/pix/pix/pixDevolution.js on lines 15..21
examples/pix/webhooks/pixConfigWebhook.js on lines 16..22

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

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 39 locations. Consider refactoring.
Open

gerencianet.sendLinkEmail(params, body)
    .then((resposta) => {
        console.log(resposta)
    })
    .catch((error) => {
Severity: Major
Found in examples/charges/payment-link/sendLinkEmail.js and 38 other locations - About 1 hr to fix
examples/charges/billet/createBilletHistory.js on lines 14..20
examples/charges/billet/defineBalanceSheetBillet.js on lines 75..81
examples/charges/billet/defineBilletPayMethod.js on lines 25..31
examples/charges/billet/sendBilletEmail.js on lines 14..20
examples/charges/billet/updateBillet.js on lines 14..20
examples/charges/billet/updateBilletMetadata.js on lines 15..21
examples/charges/card/createCardHistory.js on lines 14..20
examples/charges/card/defineCardPayMethod.js on lines 34..40
examples/charges/card/updateCardMetadata.js on lines 15..21
examples/charges/carnet/createCarnetHistory.js on lines 14..20
examples/charges/carnet/sendCarnetEmail.js on lines 14..20
examples/charges/carnet/sendCarnetParcelEmail.js on lines 15..21
examples/charges/carnet/updateCarnetMetadata.js on lines 15..21
examples/charges/carnet/updateCarnetParcel.js on lines 15..21
examples/charges/payment-link/createChargeLinkHistory.js on lines 14..20
examples/charges/payment-link/createOneStepLink.js on lines 27..33
examples/charges/payment-link/defineLinkPayMethod.js on lines 19..25
examples/charges/payment-link/updateLink.js on lines 19..25
examples/charges/payment-link/updateLinkMetadata.js on lines 15..21
examples/charges/subscription/createOneStepBilletSubscription.js on lines 32..36
examples/charges/subscription/createOneStepCardSubscription.js on lines 41..45
examples/charges/subscription/createOneStepSubscriptionLink.js on lines 25..29
examples/charges/subscription/createPlan.js on lines 14..20
examples/charges/subscription/createSubscriptionHistory.js on lines 14..20
examples/charges/subscription/defineSubscriptionBillet.js on lines 25..31
examples/charges/subscription/defineSubscriptionCard.js on lines 33..39
examples/charges/subscription/sendSubscriptionLinkEmail.js on lines 14..20
examples/charges/subscription/updatePlan.js on lines 14..20
examples/charges/subscription/updateSubscriptionMetadata.js on lines 15..21
examples/open-finance/payment/ofDevolutionPix.js on lines 14..20
examples/payments/billets/payRequestBarCode.js on lines 16..22
examples/pix/cob/pixCreateCharge.js on lines 34..40
examples/pix/cob/pixUpdateCharge.js on lines 35..41
examples/pix/cobv/pixCreateDueCharge.js on lines 46..52
examples/pix/cobv/pixUpdateDueCharge.js on lines 29..35
examples/pix/pix/pixDevolution.js on lines 15..21
examples/pix/send/pixSend.js on lines 20..26
examples/pix/webhooks/pixConfigWebhook.js on lines 16..22

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

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 39 locations. Consider refactoring.
Open

gerencianet.oneStepSubscription(params, body).then((resposta) => {
    console.log(resposta)
}).catch((error) => {
    console.log(error)
})
examples/charges/billet/createBilletHistory.js on lines 14..20
examples/charges/billet/defineBalanceSheetBillet.js on lines 75..81
examples/charges/billet/defineBilletPayMethod.js on lines 25..31
examples/charges/billet/sendBilletEmail.js on lines 14..20
examples/charges/billet/updateBillet.js on lines 14..20
examples/charges/billet/updateBilletMetadata.js on lines 15..21
examples/charges/card/createCardHistory.js on lines 14..20
examples/charges/card/defineCardPayMethod.js on lines 34..40
examples/charges/card/updateCardMetadata.js on lines 15..21
examples/charges/carnet/createCarnetHistory.js on lines 14..20
examples/charges/carnet/sendCarnetEmail.js on lines 14..20
examples/charges/carnet/sendCarnetParcelEmail.js on lines 15..21
examples/charges/carnet/updateCarnetMetadata.js on lines 15..21
examples/charges/carnet/updateCarnetParcel.js on lines 15..21
examples/charges/payment-link/createChargeLinkHistory.js on lines 14..20
examples/charges/payment-link/createOneStepLink.js on lines 27..33
examples/charges/payment-link/defineLinkPayMethod.js on lines 19..25
examples/charges/payment-link/sendLinkEmail.js on lines 14..20
examples/charges/payment-link/updateLink.js on lines 19..25
examples/charges/payment-link/updateLinkMetadata.js on lines 15..21
examples/charges/subscription/createOneStepCardSubscription.js on lines 41..45
examples/charges/subscription/createOneStepSubscriptionLink.js on lines 25..29
examples/charges/subscription/createPlan.js on lines 14..20
examples/charges/subscription/createSubscriptionHistory.js on lines 14..20
examples/charges/subscription/defineSubscriptionBillet.js on lines 25..31
examples/charges/subscription/defineSubscriptionCard.js on lines 33..39
examples/charges/subscription/sendSubscriptionLinkEmail.js on lines 14..20
examples/charges/subscription/updatePlan.js on lines 14..20
examples/charges/subscription/updateSubscriptionMetadata.js on lines 15..21
examples/open-finance/payment/ofDevolutionPix.js on lines 14..20
examples/payments/billets/payRequestBarCode.js on lines 16..22
examples/pix/cob/pixCreateCharge.js on lines 34..40
examples/pix/cob/pixUpdateCharge.js on lines 35..41
examples/pix/cobv/pixCreateDueCharge.js on lines 46..52
examples/pix/cobv/pixUpdateDueCharge.js on lines 29..35
examples/pix/pix/pixDevolution.js on lines 15..21
examples/pix/send/pixSend.js on lines 20..26
examples/pix/webhooks/pixConfigWebhook.js on lines 16..22

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

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 39 locations. Consider refactoring.
Open

gerencianet.createPlan(params, body)
    .then((resposta) => {
        console.log(resposta)
    })
    .catch((error) => {
Severity: Major
Found in examples/charges/subscription/createPlan.js and 38 other locations - About 1 hr to fix
examples/charges/billet/createBilletHistory.js on lines 14..20
examples/charges/billet/defineBalanceSheetBillet.js on lines 75..81
examples/charges/billet/defineBilletPayMethod.js on lines 25..31
examples/charges/billet/sendBilletEmail.js on lines 14..20
examples/charges/billet/updateBillet.js on lines 14..20
examples/charges/billet/updateBilletMetadata.js on lines 15..21
examples/charges/card/createCardHistory.js on lines 14..20
examples/charges/card/defineCardPayMethod.js on lines 34..40
examples/charges/card/updateCardMetadata.js on lines 15..21
examples/charges/carnet/createCarnetHistory.js on lines 14..20
examples/charges/carnet/sendCarnetEmail.js on lines 14..20
examples/charges/carnet/sendCarnetParcelEmail.js on lines 15..21
examples/charges/carnet/updateCarnetMetadata.js on lines 15..21
examples/charges/carnet/updateCarnetParcel.js on lines 15..21
examples/charges/payment-link/createChargeLinkHistory.js on lines 14..20
examples/charges/payment-link/createOneStepLink.js on lines 27..33
examples/charges/payment-link/defineLinkPayMethod.js on lines 19..25
examples/charges/payment-link/sendLinkEmail.js on lines 14..20
examples/charges/payment-link/updateLink.js on lines 19..25
examples/charges/payment-link/updateLinkMetadata.js on lines 15..21
examples/charges/subscription/createOneStepBilletSubscription.js on lines 32..36
examples/charges/subscription/createOneStepCardSubscription.js on lines 41..45
examples/charges/subscription/createOneStepSubscriptionLink.js on lines 25..29
examples/charges/subscription/createSubscriptionHistory.js on lines 14..20
examples/charges/subscription/defineSubscriptionBillet.js on lines 25..31
examples/charges/subscription/defineSubscriptionCard.js on lines 33..39
examples/charges/subscription/sendSubscriptionLinkEmail.js on lines 14..20
examples/charges/subscription/updatePlan.js on lines 14..20
examples/charges/subscription/updateSubscriptionMetadata.js on lines 15..21
examples/open-finance/payment/ofDevolutionPix.js on lines 14..20
examples/payments/billets/payRequestBarCode.js on lines 16..22
examples/pix/cob/pixCreateCharge.js on lines 34..40
examples/pix/cob/pixUpdateCharge.js on lines 35..41
examples/pix/cobv/pixCreateDueCharge.js on lines 46..52
examples/pix/cobv/pixUpdateDueCharge.js on lines 29..35
examples/pix/pix/pixDevolution.js on lines 15..21
examples/pix/send/pixSend.js on lines 20..26
examples/pix/webhooks/pixConfigWebhook.js on lines 16..22

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

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 39 locations. Consider refactoring.
Open

gerencianet.defineSubscriptionPayMethod(params, body)
    .then((resposta) => {
        console.log(resposta)
    })
    .catch((error) => {
Severity: Major
Found in examples/charges/subscription/defineSubscriptionCard.js and 38 other locations - About 1 hr to fix
examples/charges/billet/createBilletHistory.js on lines 14..20
examples/charges/billet/defineBalanceSheetBillet.js on lines 75..81
examples/charges/billet/defineBilletPayMethod.js on lines 25..31
examples/charges/billet/sendBilletEmail.js on lines 14..20
examples/charges/billet/updateBillet.js on lines 14..20
examples/charges/billet/updateBilletMetadata.js on lines 15..21
examples/charges/card/createCardHistory.js on lines 14..20
examples/charges/card/defineCardPayMethod.js on lines 34..40
examples/charges/card/updateCardMetadata.js on lines 15..21
examples/charges/carnet/createCarnetHistory.js on lines 14..20
examples/charges/carnet/sendCarnetEmail.js on lines 14..20
examples/charges/carnet/sendCarnetParcelEmail.js on lines 15..21
examples/charges/carnet/updateCarnetMetadata.js on lines 15..21
examples/charges/carnet/updateCarnetParcel.js on lines 15..21
examples/charges/payment-link/createChargeLinkHistory.js on lines 14..20
examples/charges/payment-link/createOneStepLink.js on lines 27..33
examples/charges/payment-link/defineLinkPayMethod.js on lines 19..25
examples/charges/payment-link/sendLinkEmail.js on lines 14..20
examples/charges/payment-link/updateLink.js on lines 19..25
examples/charges/payment-link/updateLinkMetadata.js on lines 15..21
examples/charges/subscription/createOneStepBilletSubscription.js on lines 32..36
examples/charges/subscription/createOneStepCardSubscription.js on lines 41..45
examples/charges/subscription/createOneStepSubscriptionLink.js on lines 25..29
examples/charges/subscription/createPlan.js on lines 14..20
examples/charges/subscription/createSubscriptionHistory.js on lines 14..20
examples/charges/subscription/defineSubscriptionBillet.js on lines 25..31
examples/charges/subscription/sendSubscriptionLinkEmail.js on lines 14..20
examples/charges/subscription/updatePlan.js on lines 14..20
examples/charges/subscription/updateSubscriptionMetadata.js on lines 15..21
examples/open-finance/payment/ofDevolutionPix.js on lines 14..20
examples/payments/billets/payRequestBarCode.js on lines 16..22
examples/pix/cob/pixCreateCharge.js on lines 34..40
examples/pix/cob/pixUpdateCharge.js on lines 35..41
examples/pix/cobv/pixCreateDueCharge.js on lines 46..52
examples/pix/cobv/pixUpdateDueCharge.js on lines 29..35
examples/pix/pix/pixDevolution.js on lines 15..21
examples/pix/send/pixSend.js on lines 20..26
examples/pix/webhooks/pixConfigWebhook.js on lines 16..22

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

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 39 locations. Consider refactoring.
Open

gerencianet.createChargeHistory(params, body)
    .then((resposta) => {
        console.log(resposta)
    })
    .catch((error) => {
Severity: Major
Found in examples/charges/card/createCardHistory.js and 38 other locations - About 1 hr to fix
examples/charges/billet/createBilletHistory.js on lines 14..20
examples/charges/billet/defineBalanceSheetBillet.js on lines 75..81
examples/charges/billet/defineBilletPayMethod.js on lines 25..31
examples/charges/billet/sendBilletEmail.js on lines 14..20
examples/charges/billet/updateBillet.js on lines 14..20
examples/charges/billet/updateBilletMetadata.js on lines 15..21
examples/charges/card/defineCardPayMethod.js on lines 34..40
examples/charges/card/updateCardMetadata.js on lines 15..21
examples/charges/carnet/createCarnetHistory.js on lines 14..20
examples/charges/carnet/sendCarnetEmail.js on lines 14..20
examples/charges/carnet/sendCarnetParcelEmail.js on lines 15..21
examples/charges/carnet/updateCarnetMetadata.js on lines 15..21
examples/charges/carnet/updateCarnetParcel.js on lines 15..21
examples/charges/payment-link/createChargeLinkHistory.js on lines 14..20
examples/charges/payment-link/createOneStepLink.js on lines 27..33
examples/charges/payment-link/defineLinkPayMethod.js on lines 19..25
examples/charges/payment-link/sendLinkEmail.js on lines 14..20
examples/charges/payment-link/updateLink.js on lines 19..25
examples/charges/payment-link/updateLinkMetadata.js on lines 15..21
examples/charges/subscription/createOneStepBilletSubscription.js on lines 32..36
examples/charges/subscription/createOneStepCardSubscription.js on lines 41..45
examples/charges/subscription/createOneStepSubscriptionLink.js on lines 25..29
examples/charges/subscription/createPlan.js on lines 14..20
examples/charges/subscription/createSubscriptionHistory.js on lines 14..20
examples/charges/subscription/defineSubscriptionBillet.js on lines 25..31
examples/charges/subscription/defineSubscriptionCard.js on lines 33..39
examples/charges/subscription/sendSubscriptionLinkEmail.js on lines 14..20
examples/charges/subscription/updatePlan.js on lines 14..20
examples/charges/subscription/updateSubscriptionMetadata.js on lines 15..21
examples/open-finance/payment/ofDevolutionPix.js on lines 14..20
examples/payments/billets/payRequestBarCode.js on lines 16..22
examples/pix/cob/pixCreateCharge.js on lines 34..40
examples/pix/cob/pixUpdateCharge.js on lines 35..41
examples/pix/cobv/pixCreateDueCharge.js on lines 46..52
examples/pix/cobv/pixUpdateDueCharge.js on lines 29..35
examples/pix/pix/pixDevolution.js on lines 15..21
examples/pix/send/pixSend.js on lines 20..26
examples/pix/webhooks/pixConfigWebhook.js on lines 16..22

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

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 39 locations. Consider refactoring.
Open

gerencianet.resendParcel(params, body)
    .then((resposta) => {
        console.log(resposta)
    })
    .catch((error) => {
Severity: Major
Found in examples/charges/carnet/sendCarnetParcelEmail.js and 38 other locations - About 1 hr to fix
examples/charges/billet/createBilletHistory.js on lines 14..20
examples/charges/billet/defineBalanceSheetBillet.js on lines 75..81
examples/charges/billet/defineBilletPayMethod.js on lines 25..31
examples/charges/billet/sendBilletEmail.js on lines 14..20
examples/charges/billet/updateBillet.js on lines 14..20
examples/charges/billet/updateBilletMetadata.js on lines 15..21
examples/charges/card/createCardHistory.js on lines 14..20
examples/charges/card/defineCardPayMethod.js on lines 34..40
examples/charges/card/updateCardMetadata.js on lines 15..21
examples/charges/carnet/createCarnetHistory.js on lines 14..20
examples/charges/carnet/sendCarnetEmail.js on lines 14..20
examples/charges/carnet/updateCarnetMetadata.js on lines 15..21
examples/charges/carnet/updateCarnetParcel.js on lines 15..21
examples/charges/payment-link/createChargeLinkHistory.js on lines 14..20
examples/charges/payment-link/createOneStepLink.js on lines 27..33
examples/charges/payment-link/defineLinkPayMethod.js on lines 19..25
examples/charges/payment-link/sendLinkEmail.js on lines 14..20
examples/charges/payment-link/updateLink.js on lines 19..25
examples/charges/payment-link/updateLinkMetadata.js on lines 15..21
examples/charges/subscription/createOneStepBilletSubscription.js on lines 32..36
examples/charges/subscription/createOneStepCardSubscription.js on lines 41..45
examples/charges/subscription/createOneStepSubscriptionLink.js on lines 25..29
examples/charges/subscription/createPlan.js on lines 14..20
examples/charges/subscription/createSubscriptionHistory.js on lines 14..20
examples/charges/subscription/defineSubscriptionBillet.js on lines 25..31
examples/charges/subscription/defineSubscriptionCard.js on lines 33..39
examples/charges/subscription/sendSubscriptionLinkEmail.js on lines 14..20
examples/charges/subscription/updatePlan.js on lines 14..20
examples/charges/subscription/updateSubscriptionMetadata.js on lines 15..21
examples/open-finance/payment/ofDevolutionPix.js on lines 14..20
examples/payments/billets/payRequestBarCode.js on lines 16..22
examples/pix/cob/pixCreateCharge.js on lines 34..40
examples/pix/cob/pixUpdateCharge.js on lines 35..41
examples/pix/cobv/pixCreateDueCharge.js on lines 46..52
examples/pix/cobv/pixUpdateDueCharge.js on lines 29..35
examples/pix/pix/pixDevolution.js on lines 15..21
examples/pix/send/pixSend.js on lines 20..26
examples/pix/webhooks/pixConfigWebhook.js on lines 16..22

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

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 39 locations. Consider refactoring.
Open

gerencianet.pixCreateCharge(params, body)
    .then((resposta) => {
        console.log(resposta)
    })
    .catch((error) => {
Severity: Major
Found in examples/pix/cob/pixCreateCharge.js and 38 other locations - About 1 hr to fix
examples/charges/billet/createBilletHistory.js on lines 14..20
examples/charges/billet/defineBalanceSheetBillet.js on lines 75..81
examples/charges/billet/defineBilletPayMethod.js on lines 25..31
examples/charges/billet/sendBilletEmail.js on lines 14..20
examples/charges/billet/updateBillet.js on lines 14..20
examples/charges/billet/updateBilletMetadata.js on lines 15..21
examples/charges/card/createCardHistory.js on lines 14..20
examples/charges/card/defineCardPayMethod.js on lines 34..40
examples/charges/card/updateCardMetadata.js on lines 15..21
examples/charges/carnet/createCarnetHistory.js on lines 14..20
examples/charges/carnet/sendCarnetEmail.js on lines 14..20
examples/charges/carnet/sendCarnetParcelEmail.js on lines 15..21
examples/charges/carnet/updateCarnetMetadata.js on lines 15..21
examples/charges/carnet/updateCarnetParcel.js on lines 15..21
examples/charges/payment-link/createChargeLinkHistory.js on lines 14..20
examples/charges/payment-link/createOneStepLink.js on lines 27..33
examples/charges/payment-link/defineLinkPayMethod.js on lines 19..25
examples/charges/payment-link/sendLinkEmail.js on lines 14..20
examples/charges/payment-link/updateLink.js on lines 19..25
examples/charges/payment-link/updateLinkMetadata.js on lines 15..21
examples/charges/subscription/createOneStepBilletSubscription.js on lines 32..36
examples/charges/subscription/createOneStepCardSubscription.js on lines 41..45
examples/charges/subscription/createOneStepSubscriptionLink.js on lines 25..29
examples/charges/subscription/createPlan.js on lines 14..20
examples/charges/subscription/createSubscriptionHistory.js on lines 14..20
examples/charges/subscription/defineSubscriptionBillet.js on lines 25..31
examples/charges/subscription/defineSubscriptionCard.js on lines 33..39
examples/charges/subscription/sendSubscriptionLinkEmail.js on lines 14..20
examples/charges/subscription/updatePlan.js on lines 14..20
examples/charges/subscription/updateSubscriptionMetadata.js on lines 15..21
examples/open-finance/payment/ofDevolutionPix.js on lines 14..20
examples/payments/billets/payRequestBarCode.js on lines 16..22
examples/pix/cob/pixUpdateCharge.js on lines 35..41
examples/pix/cobv/pixCreateDueCharge.js on lines 46..52
examples/pix/cobv/pixUpdateDueCharge.js on lines 29..35
examples/pix/pix/pixDevolution.js on lines 15..21
examples/pix/send/pixSend.js on lines 20..26
examples/pix/webhooks/pixConfigWebhook.js on lines 16..22

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

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 39 locations. Consider refactoring.
Open

gerencianet.updateChargeLink(params, body)
    .then((resposta) => {
        console.log(resposta)
    })
    .catch((error) => {
Severity: Major
Found in examples/charges/payment-link/updateLink.js and 38 other locations - About 1 hr to fix
examples/charges/billet/createBilletHistory.js on lines 14..20
examples/charges/billet/defineBalanceSheetBillet.js on lines 75..81
examples/charges/billet/defineBilletPayMethod.js on lines 25..31
examples/charges/billet/sendBilletEmail.js on lines 14..20
examples/charges/billet/updateBillet.js on lines 14..20
examples/charges/billet/updateBilletMetadata.js on lines 15..21
examples/charges/card/createCardHistory.js on lines 14..20
examples/charges/card/defineCardPayMethod.js on lines 34..40
examples/charges/card/updateCardMetadata.js on lines 15..21
examples/charges/carnet/createCarnetHistory.js on lines 14..20
examples/charges/carnet/sendCarnetEmail.js on lines 14..20
examples/charges/carnet/sendCarnetParcelEmail.js on lines 15..21
examples/charges/carnet/updateCarnetMetadata.js on lines 15..21
examples/charges/carnet/updateCarnetParcel.js on lines 15..21
examples/charges/payment-link/createChargeLinkHistory.js on lines 14..20
examples/charges/payment-link/createOneStepLink.js on lines 27..33
examples/charges/payment-link/defineLinkPayMethod.js on lines 19..25
examples/charges/payment-link/sendLinkEmail.js on lines 14..20
examples/charges/payment-link/updateLinkMetadata.js on lines 15..21
examples/charges/subscription/createOneStepBilletSubscription.js on lines 32..36
examples/charges/subscription/createOneStepCardSubscription.js on lines 41..45
examples/charges/subscription/createOneStepSubscriptionLink.js on lines 25..29
examples/charges/subscription/createPlan.js on lines 14..20
examples/charges/subscription/createSubscriptionHistory.js on lines 14..20
examples/charges/subscription/defineSubscriptionBillet.js on lines 25..31
examples/charges/subscription/defineSubscriptionCard.js on lines 33..39
examples/charges/subscription/sendSubscriptionLinkEmail.js on lines 14..20
examples/charges/subscription/updatePlan.js on lines 14..20
examples/charges/subscription/updateSubscriptionMetadata.js on lines 15..21
examples/open-finance/payment/ofDevolutionPix.js on lines 14..20
examples/payments/billets/payRequestBarCode.js on lines 16..22
examples/pix/cob/pixCreateCharge.js on lines 34..40
examples/pix/cob/pixUpdateCharge.js on lines 35..41
examples/pix/cobv/pixCreateDueCharge.js on lines 46..52
examples/pix/cobv/pixUpdateDueCharge.js on lines 29..35
examples/pix/pix/pixDevolution.js on lines 15..21
examples/pix/send/pixSend.js on lines 20..26
examples/pix/webhooks/pixConfigWebhook.js on lines 16..22

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

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 39 locations. Consider refactoring.
Open

gerencianet.definePayMethod(params, body)
    .then((resposta) => {
        console.log(resposta)
    })
    .catch((error) => {
Severity: Major
Found in examples/charges/card/defineCardPayMethod.js and 38 other locations - About 1 hr to fix
examples/charges/billet/createBilletHistory.js on lines 14..20
examples/charges/billet/defineBalanceSheetBillet.js on lines 75..81
examples/charges/billet/defineBilletPayMethod.js on lines 25..31
examples/charges/billet/sendBilletEmail.js on lines 14..20
examples/charges/billet/updateBillet.js on lines 14..20
examples/charges/billet/updateBilletMetadata.js on lines 15..21
examples/charges/card/createCardHistory.js on lines 14..20
examples/charges/card/updateCardMetadata.js on lines 15..21
examples/charges/carnet/createCarnetHistory.js on lines 14..20
examples/charges/carnet/sendCarnetEmail.js on lines 14..20
examples/charges/carnet/sendCarnetParcelEmail.js on lines 15..21
examples/charges/carnet/updateCarnetMetadata.js on lines 15..21
examples/charges/carnet/updateCarnetParcel.js on lines 15..21
examples/charges/payment-link/createChargeLinkHistory.js on lines 14..20
examples/charges/payment-link/createOneStepLink.js on lines 27..33
examples/charges/payment-link/defineLinkPayMethod.js on lines 19..25
examples/charges/payment-link/sendLinkEmail.js on lines 14..20
examples/charges/payment-link/updateLink.js on lines 19..25
examples/charges/payment-link/updateLinkMetadata.js on lines 15..21
examples/charges/subscription/createOneStepBilletSubscription.js on lines 32..36
examples/charges/subscription/createOneStepCardSubscription.js on lines 41..45
examples/charges/subscription/createOneStepSubscriptionLink.js on lines 25..29
examples/charges/subscription/createPlan.js on lines 14..20
examples/charges/subscription/createSubscriptionHistory.js on lines 14..20
examples/charges/subscription/defineSubscriptionBillet.js on lines 25..31
examples/charges/subscription/defineSubscriptionCard.js on lines 33..39
examples/charges/subscription/sendSubscriptionLinkEmail.js on lines 14..20
examples/charges/subscription/updatePlan.js on lines 14..20
examples/charges/subscription/updateSubscriptionMetadata.js on lines 15..21
examples/open-finance/payment/ofDevolutionPix.js on lines 14..20
examples/payments/billets/payRequestBarCode.js on lines 16..22
examples/pix/cob/pixCreateCharge.js on lines 34..40
examples/pix/cob/pixUpdateCharge.js on lines 35..41
examples/pix/cobv/pixCreateDueCharge.js on lines 46..52
examples/pix/cobv/pixUpdateDueCharge.js on lines 29..35
examples/pix/pix/pixDevolution.js on lines 15..21
examples/pix/send/pixSend.js on lines 20..26
examples/pix/webhooks/pixConfigWebhook.js on lines 16..22

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

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 39 locations. Consider refactoring.
Open

gerencianet.definePayMethod(params, body)
    .then((resposta) => {
        console.log(resposta)
    })
    .catch((error) => {
Severity: Major
Found in examples/charges/billet/defineBilletPayMethod.js and 38 other locations - About 1 hr to fix
examples/charges/billet/createBilletHistory.js on lines 14..20
examples/charges/billet/defineBalanceSheetBillet.js on lines 75..81
examples/charges/billet/sendBilletEmail.js on lines 14..20
examples/charges/billet/updateBillet.js on lines 14..20
examples/charges/billet/updateBilletMetadata.js on lines 15..21
examples/charges/card/createCardHistory.js on lines 14..20
examples/charges/card/defineCardPayMethod.js on lines 34..40
examples/charges/card/updateCardMetadata.js on lines 15..21
examples/charges/carnet/createCarnetHistory.js on lines 14..20
examples/charges/carnet/sendCarnetEmail.js on lines 14..20
examples/charges/carnet/sendCarnetParcelEmail.js on lines 15..21
examples/charges/carnet/updateCarnetMetadata.js on lines 15..21
examples/charges/carnet/updateCarnetParcel.js on lines 15..21
examples/charges/payment-link/createChargeLinkHistory.js on lines 14..20
examples/charges/payment-link/createOneStepLink.js on lines 27..33
examples/charges/payment-link/defineLinkPayMethod.js on lines 19..25
examples/charges/payment-link/sendLinkEmail.js on lines 14..20
examples/charges/payment-link/updateLink.js on lines 19..25
examples/charges/payment-link/updateLinkMetadata.js on lines 15..21
examples/charges/subscription/createOneStepBilletSubscription.js on lines 32..36
examples/charges/subscription/createOneStepCardSubscription.js on lines 41..45
examples/charges/subscription/createOneStepSubscriptionLink.js on lines 25..29
examples/charges/subscription/createPlan.js on lines 14..20
examples/charges/subscription/createSubscriptionHistory.js on lines 14..20
examples/charges/subscription/defineSubscriptionBillet.js on lines 25..31
examples/charges/subscription/defineSubscriptionCard.js on lines 33..39
examples/charges/subscription/sendSubscriptionLinkEmail.js on lines 14..20
examples/charges/subscription/updatePlan.js on lines 14..20
examples/charges/subscription/updateSubscriptionMetadata.js on lines 15..21
examples/open-finance/payment/ofDevolutionPix.js on lines 14..20
examples/payments/billets/payRequestBarCode.js on lines 16..22
examples/pix/cob/pixCreateCharge.js on lines 34..40
examples/pix/cob/pixUpdateCharge.js on lines 35..41
examples/pix/cobv/pixCreateDueCharge.js on lines 46..52
examples/pix/cobv/pixUpdateDueCharge.js on lines 29..35
examples/pix/pix/pixDevolution.js on lines 15..21
examples/pix/send/pixSend.js on lines 20..26
examples/pix/webhooks/pixConfigWebhook.js on lines 16..22

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

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 39 locations. Consider refactoring.
Open

gerencianet.updateChargeMetadata(params, body)
    .then((resposta) => {
        console.log(resposta)
    })
    .catch((error) => {
Severity: Major
Found in examples/charges/billet/updateBilletMetadata.js and 38 other locations - About 1 hr to fix
examples/charges/billet/createBilletHistory.js on lines 14..20
examples/charges/billet/defineBalanceSheetBillet.js on lines 75..81
examples/charges/billet/defineBilletPayMethod.js on lines 25..31
examples/charges/billet/sendBilletEmail.js on lines 14..20
examples/charges/billet/updateBillet.js on lines 14..20
examples/charges/card/createCardHistory.js on lines 14..20
examples/charges/card/defineCardPayMethod.js on lines 34..40
examples/charges/card/updateCardMetadata.js on lines 15..21
examples/charges/carnet/createCarnetHistory.js on lines 14..20
examples/charges/carnet/sendCarnetEmail.js on lines 14..20
examples/charges/carnet/sendCarnetParcelEmail.js on lines 15..21
examples/charges/carnet/updateCarnetMetadata.js on lines 15..21
examples/charges/carnet/updateCarnetParcel.js on lines 15..21
examples/charges/payment-link/createChargeLinkHistory.js on lines 14..20
examples/charges/payment-link/createOneStepLink.js on lines 27..33
examples/charges/payment-link/defineLinkPayMethod.js on lines 19..25
examples/charges/payment-link/sendLinkEmail.js on lines 14..20
examples/charges/payment-link/updateLink.js on lines 19..25
examples/charges/payment-link/updateLinkMetadata.js on lines 15..21
examples/charges/subscription/createOneStepBilletSubscription.js on lines 32..36
examples/charges/subscription/createOneStepCardSubscription.js on lines 41..45
examples/charges/subscription/createOneStepSubscriptionLink.js on lines 25..29
examples/charges/subscription/createPlan.js on lines 14..20
examples/charges/subscription/createSubscriptionHistory.js on lines 14..20
examples/charges/subscription/defineSubscriptionBillet.js on lines 25..31
examples/charges/subscription/defineSubscriptionCard.js on lines 33..39
examples/charges/subscription/sendSubscriptionLinkEmail.js on lines 14..20
examples/charges/subscription/updatePlan.js on lines 14..20
examples/charges/subscription/updateSubscriptionMetadata.js on lines 15..21
examples/open-finance/payment/ofDevolutionPix.js on lines 14..20
examples/payments/billets/payRequestBarCode.js on lines 16..22
examples/pix/cob/pixCreateCharge.js on lines 34..40
examples/pix/cob/pixUpdateCharge.js on lines 35..41
examples/pix/cobv/pixCreateDueCharge.js on lines 46..52
examples/pix/cobv/pixUpdateDueCharge.js on lines 29..35
examples/pix/pix/pixDevolution.js on lines 15..21
examples/pix/send/pixSend.js on lines 20..26
examples/pix/webhooks/pixConfigWebhook.js on lines 16..22

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

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 39 locations. Consider refactoring.
Open

gerencianet.payRequestBarCode(params, body)
    .then((resposta) => {
        console.log(resposta)
    })
    .catch((error) => {
Severity: Major
Found in examples/payments/billets/payRequestBarCode.js and 38 other locations - About 1 hr to fix
examples/charges/billet/createBilletHistory.js on lines 14..20
examples/charges/billet/defineBalanceSheetBillet.js on lines 75..81
examples/charges/billet/defineBilletPayMethod.js on lines 25..31
examples/charges/billet/sendBilletEmail.js on lines 14..20
examples/charges/billet/updateBillet.js on lines 14..20
examples/charges/billet/updateBilletMetadata.js on lines 15..21
examples/charges/card/createCardHistory.js on lines 14..20
examples/charges/card/defineCardPayMethod.js on lines 34..40
examples/charges/card/updateCardMetadata.js on lines 15..21
examples/charges/carnet/createCarnetHistory.js on lines 14..20
examples/charges/carnet/sendCarnetEmail.js on lines 14..20
examples/charges/carnet/sendCarnetParcelEmail.js on lines 15..21
examples/charges/carnet/updateCarnetMetadata.js on lines 15..21
examples/charges/carnet/updateCarnetParcel.js on lines 15..21
examples/charges/payment-link/createChargeLinkHistory.js on lines 14..20
examples/charges/payment-link/createOneStepLink.js on lines 27..33
examples/charges/payment-link/defineLinkPayMethod.js on lines 19..25
examples/charges/payment-link/sendLinkEmail.js on lines 14..20
examples/charges/payment-link/updateLink.js on lines 19..25
examples/charges/payment-link/updateLinkMetadata.js on lines 15..21
examples/charges/subscription/createOneStepBilletSubscription.js on lines 32..36
examples/charges/subscription/createOneStepCardSubscription.js on lines 41..45
examples/charges/subscription/createOneStepSubscriptionLink.js on lines 25..29
examples/charges/subscription/createPlan.js on lines 14..20
examples/charges/subscription/createSubscriptionHistory.js on lines 14..20
examples/charges/subscription/defineSubscriptionBillet.js on lines 25..31
examples/charges/subscription/defineSubscriptionCard.js on lines 33..39
examples/charges/subscription/sendSubscriptionLinkEmail.js on lines 14..20
examples/charges/subscription/updatePlan.js on lines 14..20
examples/charges/subscription/updateSubscriptionMetadata.js on lines 15..21
examples/open-finance/payment/ofDevolutionPix.js on lines 14..20
examples/pix/cob/pixCreateCharge.js on lines 34..40
examples/pix/cob/pixUpdateCharge.js on lines 35..41
examples/pix/cobv/pixCreateDueCharge.js on lines 46..52
examples/pix/cobv/pixUpdateDueCharge.js on lines 29..35
examples/pix/pix/pixDevolution.js on lines 15..21
examples/pix/send/pixSend.js on lines 20..26
examples/pix/webhooks/pixConfigWebhook.js on lines 16..22

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

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 39 locations. Consider refactoring.
Open

gerencianet.oneStepSubscriptionLink(params, body).then((resposta) => {
    console.log(resposta)
}).catch((error) => {
    console.log(error)
})
examples/charges/billet/createBilletHistory.js on lines 14..20
examples/charges/billet/defineBalanceSheetBillet.js on lines 75..81
examples/charges/billet/defineBilletPayMethod.js on lines 25..31
examples/charges/billet/sendBilletEmail.js on lines 14..20
examples/charges/billet/updateBillet.js on lines 14..20
examples/charges/billet/updateBilletMetadata.js on lines 15..21
examples/charges/card/createCardHistory.js on lines 14..20
examples/charges/card/defineCardPayMethod.js on lines 34..40
examples/charges/card/updateCardMetadata.js on lines 15..21
examples/charges/carnet/createCarnetHistory.js on lines 14..20
examples/charges/carnet/sendCarnetEmail.js on lines 14..20
examples/charges/carnet/sendCarnetParcelEmail.js on lines 15..21
examples/charges/carnet/updateCarnetMetadata.js on lines 15..21
examples/charges/carnet/updateCarnetParcel.js on lines 15..21
examples/charges/payment-link/createChargeLinkHistory.js on lines 14..20
examples/charges/payment-link/createOneStepLink.js on lines 27..33
examples/charges/payment-link/defineLinkPayMethod.js on lines 19..25
examples/charges/payment-link/sendLinkEmail.js on lines 14..20
examples/charges/payment-link/updateLink.js on lines 19..25
examples/charges/payment-link/updateLinkMetadata.js on lines 15..21
examples/charges/subscription/createOneStepBilletSubscription.js on lines 32..36
examples/charges/subscription/createOneStepCardSubscription.js on lines 41..45
examples/charges/subscription/createPlan.js on lines 14..20
examples/charges/subscription/createSubscriptionHistory.js on lines 14..20
examples/charges/subscription/defineSubscriptionBillet.js on lines 25..31
examples/charges/subscription/defineSubscriptionCard.js on lines 33..39
examples/charges/subscription/sendSubscriptionLinkEmail.js on lines 14..20
examples/charges/subscription/updatePlan.js on lines 14..20
examples/charges/subscription/updateSubscriptionMetadata.js on lines 15..21
examples/open-finance/payment/ofDevolutionPix.js on lines 14..20
examples/payments/billets/payRequestBarCode.js on lines 16..22
examples/pix/cob/pixCreateCharge.js on lines 34..40
examples/pix/cob/pixUpdateCharge.js on lines 35..41
examples/pix/cobv/pixCreateDueCharge.js on lines 46..52
examples/pix/cobv/pixUpdateDueCharge.js on lines 29..35
examples/pix/pix/pixDevolution.js on lines 15..21
examples/pix/send/pixSend.js on lines 20..26
examples/pix/webhooks/pixConfigWebhook.js on lines 16..22

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

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 39 locations. Consider refactoring.
Open

gerencianet.sendCarnetEmail(params, body)
    .then((resposta) => {
        console.log(resposta)
    })
    .catch((error) => {
Severity: Major
Found in examples/charges/carnet/sendCarnetEmail.js and 38 other locations - About 1 hr to fix
examples/charges/billet/createBilletHistory.js on lines 14..20
examples/charges/billet/defineBalanceSheetBillet.js on lines 75..81
examples/charges/billet/defineBilletPayMethod.js on lines 25..31
examples/charges/billet/sendBilletEmail.js on lines 14..20
examples/charges/billet/updateBillet.js on lines 14..20
examples/charges/billet/updateBilletMetadata.js on lines 15..21
examples/charges/card/createCardHistory.js on lines 14..20
examples/charges/card/defineCardPayMethod.js on lines 34..40
examples/charges/card/updateCardMetadata.js on lines 15..21
examples/charges/carnet/createCarnetHistory.js on lines 14..20
examples/charges/carnet/sendCarnetParcelEmail.js on lines 15..21
examples/charges/carnet/updateCarnetMetadata.js on lines 15..21
examples/charges/carnet/updateCarnetParcel.js on lines 15..21
examples/charges/payment-link/createChargeLinkHistory.js on lines 14..20
examples/charges/payment-link/createOneStepLink.js on lines 27..33
examples/charges/payment-link/defineLinkPayMethod.js on lines 19..25
examples/charges/payment-link/sendLinkEmail.js on lines 14..20
examples/charges/payment-link/updateLink.js on lines 19..25
examples/charges/payment-link/updateLinkMetadata.js on lines 15..21
examples/charges/subscription/createOneStepBilletSubscription.js on lines 32..36
examples/charges/subscription/createOneStepCardSubscription.js on lines 41..45
examples/charges/subscription/createOneStepSubscriptionLink.js on lines 25..29
examples/charges/subscription/createPlan.js on lines 14..20
examples/charges/subscription/createSubscriptionHistory.js on lines 14..20
examples/charges/subscription/defineSubscriptionBillet.js on lines 25..31
examples/charges/subscription/defineSubscriptionCard.js on lines 33..39
examples/charges/subscription/sendSubscriptionLinkEmail.js on lines 14..20
examples/charges/subscription/updatePlan.js on lines 14..20
examples/charges/subscription/updateSubscriptionMetadata.js on lines 15..21
examples/open-finance/payment/ofDevolutionPix.js on lines 14..20
examples/payments/billets/payRequestBarCode.js on lines 16..22
examples/pix/cob/pixCreateCharge.js on lines 34..40
examples/pix/cob/pixUpdateCharge.js on lines 35..41
examples/pix/cobv/pixCreateDueCharge.js on lines 46..52
examples/pix/cobv/pixUpdateDueCharge.js on lines 29..35
examples/pix/pix/pixDevolution.js on lines 15..21
examples/pix/send/pixSend.js on lines 20..26
examples/pix/webhooks/pixConfigWebhook.js on lines 16..22

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

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

Function run has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    run(name, params, body) {
        if (this.constants.APIS.DEFAULT.ENDPOINTS.hasOwnProperty(name)) {
            this.endpoint = this.constants.APIS.DEFAULT.ENDPOINTS[name]
            this.options.baseUrl = this.options.sandbox ? this.constants.APIS.DEFAULT.URL.SANDBOX : this.constants.APIS.DEFAULT.URL.PRODUCTION
        } else {
Severity: Minor
Found in lib/endpoints.js - About 1 hr to fix

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

    gerencianet.listPlans(params)
        .then((resposta) => {
            console.log(resposta)
        })
        .catch((error) => {
    Severity: Major
    Found in examples/charges/subscription/listPlans.js and 33 other locations - About 1 hr to fix
    examples/charges/billet/cancelBillet.js on lines 10..16
    examples/charges/billet/detailBillet.js on lines 10..16
    examples/charges/billet/settleBillet.js on lines 10..16
    examples/charges/card/cancelCard.js on lines 10..16
    examples/charges/card/detailCard.js on lines 10..16
    examples/charges/card/getInstallments.js on lines 11..17
    examples/charges/carnet/cancelCarnet.js on lines 10..16
    examples/charges/carnet/cancelCarnetParcel.js on lines 11..17
    examples/charges/carnet/detailCarnet.js on lines 10..16
    examples/charges/carnet/settleCarnet.js on lines 10..16
    examples/charges/carnet/settleCarnetParcel.js on lines 11..17
    examples/charges/notification/getNotification.js on lines 10..16
    examples/charges/payment-link/cancelLink.js on lines 10..16
    examples/charges/payment-link/detailLink.js on lines 10..16
    examples/charges/subscription/cancelSubscription.js on lines 10..16
    examples/charges/subscription/deletePlan.js on lines 10..16
    examples/charges/subscription/detailSubscription.js on lines 10..16
    examples/exclusives/key/pixDeleteEvp.js on lines 10..16
    examples/pix/cob/pixDetailCharge.js on lines 10..16
    examples/pix/cob/pixListCharges.js on lines 11..17
    examples/pix/cobv/pixDetailDueCharge.js on lines 10..16
    examples/pix/cobv/pixListDueCharges.js on lines 11..17
    examples/pix/location/pixDetailLocation.js on lines 10..16
    examples/pix/location/pixGenerateQRCode.js on lines 10..16
    examples/pix/location/pixLocationList.js on lines 11..17
    examples/pix/location/pixUnlinkTxidLocation.js on lines 10..16
    examples/pix/pix/pixDetailDevolution.js on lines 11..17
    examples/pix/pix/pixDetailReceived.js on lines 10..16
    examples/pix/pix/pixReceivedList.js on lines 11..17
    examples/pix/send/pixSendList.js on lines 11..17
    examples/pix/webhooks/pixDeleteWebhook.js on lines 10..16
    examples/pix/webhooks/pixDetailWebhook.js on lines 10..16
    examples/pix/webhooks/pixListWebhook.js on lines 11..17

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

    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 34 locations. Consider refactoring.
    Open

    gerencianet.pixListWebhook(params)
        .then((resposta) => {
            console.log(resposta)
        })
        .catch((error) => {
    Severity: Major
    Found in examples/pix/webhooks/pixListWebhook.js and 33 other locations - About 1 hr to fix
    examples/charges/billet/cancelBillet.js on lines 10..16
    examples/charges/billet/detailBillet.js on lines 10..16
    examples/charges/billet/settleBillet.js on lines 10..16
    examples/charges/card/cancelCard.js on lines 10..16
    examples/charges/card/detailCard.js on lines 10..16
    examples/charges/card/getInstallments.js on lines 11..17
    examples/charges/carnet/cancelCarnet.js on lines 10..16
    examples/charges/carnet/cancelCarnetParcel.js on lines 11..17
    examples/charges/carnet/detailCarnet.js on lines 10..16
    examples/charges/carnet/settleCarnet.js on lines 10..16
    examples/charges/carnet/settleCarnetParcel.js on lines 11..17
    examples/charges/notification/getNotification.js on lines 10..16
    examples/charges/payment-link/cancelLink.js on lines 10..16
    examples/charges/payment-link/detailLink.js on lines 10..16
    examples/charges/subscription/cancelSubscription.js on lines 10..16
    examples/charges/subscription/deletePlan.js on lines 10..16
    examples/charges/subscription/detailSubscription.js on lines 10..16
    examples/charges/subscription/listPlans.js on lines 12..18
    examples/exclusives/key/pixDeleteEvp.js on lines 10..16
    examples/pix/cob/pixDetailCharge.js on lines 10..16
    examples/pix/cob/pixListCharges.js on lines 11..17
    examples/pix/cobv/pixDetailDueCharge.js on lines 10..16
    examples/pix/cobv/pixListDueCharges.js on lines 11..17
    examples/pix/location/pixDetailLocation.js on lines 10..16
    examples/pix/location/pixGenerateQRCode.js on lines 10..16
    examples/pix/location/pixLocationList.js on lines 11..17
    examples/pix/location/pixUnlinkTxidLocation.js on lines 10..16
    examples/pix/pix/pixDetailDevolution.js on lines 11..17
    examples/pix/pix/pixDetailReceived.js on lines 10..16
    examples/pix/pix/pixReceivedList.js on lines 11..17
    examples/pix/send/pixSendList.js on lines 11..17
    examples/pix/webhooks/pixDeleteWebhook.js on lines 10..16
    examples/pix/webhooks/pixDetailWebhook.js on lines 10..16

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

    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