feathersjs/feathers-stripe

View on GitHub

Showing 73 of 73 total issues

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

export class ProductService extends BaseService<IProductService> implements IProductService {
  _find (params: ParamsWithStripeQuery<Stripe.ProductListParams>) {
    const filtered = this.filterParams(params);
    return this.handlePaginate(
      filtered,
Severity: Major
Found in src/services/product.ts and 6 other locations - About 2 days to fix
src/services/invoice-item.ts on lines 14..46
src/services/payout.ts on lines 14..46
src/services/plan.ts on lines 14..46
src/services/subscription-item.ts on lines 14..46
src/services/subscription.ts on lines 14..46
src/services/transfer.ts on lines 14..46

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

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

export class TransferService extends BaseService<ITransferService> implements ITransferService {
  _find (params: ParamsWithStripeQuery<Stripe.TransferListParams>) {
    const filtered = this.filterParams(params);
    return this.handlePaginate(
      filtered,
Severity: Major
Found in src/services/transfer.ts and 6 other locations - About 2 days to fix
src/services/invoice-item.ts on lines 14..46
src/services/payout.ts on lines 14..46
src/services/plan.ts on lines 14..46
src/services/product.ts on lines 14..46
src/services/subscription-item.ts on lines 14..46
src/services/subscription.ts on lines 14..46

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

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

export class SubscriptionService extends BaseService<ISubscriptionService> implements ISubscriptionService {
  _find (params: ParamsWithStripeQuery<Stripe.SubscriptionListParams>) {
    const filtered = this.filterParams(params);
    return this.handlePaginate(
      filtered,
Severity: Major
Found in src/services/subscription.ts and 6 other locations - About 2 days to fix
src/services/invoice-item.ts on lines 14..46
src/services/payout.ts on lines 14..46
src/services/plan.ts on lines 14..46
src/services/product.ts on lines 14..46
src/services/subscription-item.ts on lines 14..46
src/services/transfer.ts on lines 14..46

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

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

export class SubscriptionItemService extends BaseService<ISubscriptionItemService> implements ISubscriptionItemService {
  _find (params: ParamsWithStripeQuery<Stripe.SubscriptionItemListParams>) {
    const filtered = this.filterParams(params);
    return this.handlePaginate(
      filtered,
Severity: Major
Found in src/services/subscription-item.ts and 6 other locations - About 2 days to fix
src/services/invoice-item.ts on lines 14..46
src/services/payout.ts on lines 14..46
src/services/plan.ts on lines 14..46
src/services/product.ts on lines 14..46
src/services/subscription.ts on lines 14..46
src/services/transfer.ts on lines 14..46

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

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

export class PlanService extends BaseService<IPlanService> implements IPlanService {
  _find (params: ParamsWithStripeQuery<Stripe.PlanListParams>) {
    const filtered = this.filterParams(params);
    return this.handlePaginate(
      filtered,
Severity: Major
Found in src/services/plan.ts and 6 other locations - About 2 days to fix
src/services/invoice-item.ts on lines 14..46
src/services/payout.ts on lines 14..46
src/services/product.ts on lines 14..46
src/services/subscription-item.ts on lines 14..46
src/services/subscription.ts on lines 14..46
src/services/transfer.ts on lines 14..46

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

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

export class InvoiceItemService extends BaseService<IInvoiceItemService> implements IInvoiceItemService {
  _find (params: ParamsWithStripeQuery<Stripe.InvoiceItemListParams>) {
    const filtered = this.filterParams(params);
    return this.handlePaginate(
      filtered,
Severity: Major
Found in src/services/invoice-item.ts and 6 other locations - About 2 days to fix
src/services/payout.ts on lines 14..46
src/services/plan.ts on lines 14..46
src/services/product.ts on lines 14..46
src/services/subscription-item.ts on lines 14..46
src/services/subscription.ts on lines 14..46
src/services/transfer.ts on lines 14..46

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

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

export class PayoutService extends BaseService<IPayoutService> implements IPayoutService {
  _find (params: ParamsWithStripeQuery<Stripe.PayoutListParams>) {
    const filtered = this.filterParams(params);
    return this.handlePaginate(
      filtered,
Severity: Major
Found in src/services/payout.ts and 6 other locations - About 2 days to fix
src/services/invoice-item.ts on lines 14..46
src/services/plan.ts on lines 14..46
src/services/product.ts on lines 14..46
src/services/subscription-item.ts on lines 14..46
src/services/subscription.ts on lines 14..46
src/services/transfer.ts on lines 14..46

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

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

export class RefundService extends BaseService<IRefundService> implements IRefundService {
  _find (params: ParamsWithStripeQuery<Stripe.RefundListParams>) {
    const filtered = this.filterParams(params);
    return this.handlePaginate(
      filtered,
Severity: Major
Found in src/services/refund.ts and 4 other locations - About 1 day to fix
src/services/account.ts on lines 32..73
src/services/coupon.ts on lines 32..72
src/services/price.ts on lines 14..43
src/services/setup-intent.ts on lines 14..43

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

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

export class SetupIntentService extends BaseService<ISetupIntentService> implements ISetupIntentService {
  _find (params: ParamsWithStripeQuery<Stripe.SetupIntentListParams>) {
    const filtered = this.filterParams(params);
    return this.handlePaginate(
      filtered,
Severity: Major
Found in src/services/setup-intent.ts and 4 other locations - About 1 day to fix
src/services/account.ts on lines 32..73
src/services/coupon.ts on lines 32..72
src/services/price.ts on lines 14..43
src/services/refund.ts on lines 14..43

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

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

export class PriceService extends BaseService<IPriceService> implements IPriceService {
  _find (params: ParamsWithStripeQuery<Stripe.PriceListParams>) {
    const filtered = this.filterParams(params);
    return this.handlePaginate(
      filtered,
Severity: Major
Found in src/services/price.ts and 4 other locations - About 1 day to fix
src/services/account.ts on lines 32..73
src/services/coupon.ts on lines 32..72
src/services/refund.ts on lines 14..43
src/services/setup-intent.ts on lines 14..43

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

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

export class CouponService
  extends BaseService<ICouponService>
  implements ICouponService
{
  _find(params: ParamsWithStripeQuery<Stripe.CouponListParams>) {
Severity: Major
Found in src/services/coupon.ts and 4 other locations - About 1 day to fix
src/services/account.ts on lines 32..73
src/services/price.ts on lines 14..43
src/services/refund.ts on lines 14..43
src/services/setup-intent.ts on lines 14..43

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

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

export class AccountService
  extends BaseService<IAccountService>
  implements IAccountService
{
  _find(params: ParamsWithStripeQuery<Stripe.AccountListParams>) {
Severity: Major
Found in src/services/account.ts and 4 other locations - About 1 day to fix
src/services/coupon.ts on lines 32..72
src/services/price.ts on lines 14..43
src/services/refund.ts on lines 14..43
src/services/setup-intent.ts on lines 14..43

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

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

export interface ISubscriptionItemService {
  _find: FindMethod<ParamsWithStripeQuery<Stripe.SubscriptionItemListParams>, Stripe.SubscriptionItem>;
  _get: (id: string, params: ParamsWithStripe) => Promise<Stripe.SubscriptionItem>;
  _create: (data: Stripe.SubscriptionItemCreateParams, params: ParamsWithStripe) => Promise<Stripe.SubscriptionItem>;
  _update: (id: string, data: Stripe.SubscriptionItemUpdateParams, params: ParamsWithStripe) => Promise<Stripe.SubscriptionItem>;
Severity: Major
Found in src/services/subscription-item.ts and 5 other locations - About 1 day to fix
src/services/payout.ts on lines 5..12
src/services/plan.ts on lines 5..12
src/services/product.ts on lines 5..12
src/services/subscription.ts on lines 5..12
src/services/transfer.ts on lines 5..12

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

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

export interface IProductService {
  _find: FindMethod<ParamsWithStripeQuery<Stripe.ProductListParams>, Stripe.Product>;
  _get: (id: string, params: ParamsWithStripe) => Promise<Stripe.Product>;
  _create: (data: Stripe.ProductCreateParams, params: ParamsWithStripe) => Promise<Stripe.Product>;
  _update: (id: string, data: Stripe.ProductUpdateParams, params: ParamsWithStripe) => Promise<Stripe.Product>;
Severity: Major
Found in src/services/product.ts and 5 other locations - About 1 day to fix
src/services/payout.ts on lines 5..12
src/services/plan.ts on lines 5..12
src/services/subscription-item.ts on lines 5..12
src/services/subscription.ts on lines 5..12
src/services/transfer.ts on lines 5..12

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

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

export interface IPayoutService {
  _find: FindMethod<ParamsWithStripeQuery<Stripe.PayoutListParams>, Stripe.Payout>;
  _get: (id: string, params: ParamsWithStripe) => Promise<Stripe.Payout>;
  _create: (data: Stripe.PayoutCreateParams, params: ParamsWithStripe) => Promise<Stripe.Payout>;
  _update: (id: string, data: Stripe.PayoutUpdateParams, params: ParamsWithStripe) => Promise<Stripe.Payout>;
Severity: Major
Found in src/services/payout.ts and 5 other locations - About 1 day to fix
src/services/plan.ts on lines 5..12
src/services/product.ts on lines 5..12
src/services/subscription-item.ts on lines 5..12
src/services/subscription.ts on lines 5..12
src/services/transfer.ts on lines 5..12

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

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

export interface ISubscriptionService {
  _find: FindMethod<ParamsWithStripeQuery<Stripe.SubscriptionListParams>, Stripe.Subscription>;
  _get: (id: string, params: ParamsWithStripe) => Promise<Stripe.Subscription>;
  _create: (data: Stripe.SubscriptionCreateParams, params: ParamsWithStripe) => Promise<Stripe.Subscription>;
  _update: (id: string, data: Stripe.SubscriptionUpdateParams, params: ParamsWithStripe) => Promise<Stripe.Subscription>;
Severity: Major
Found in src/services/subscription.ts and 5 other locations - About 1 day to fix
src/services/payout.ts on lines 5..12
src/services/plan.ts on lines 5..12
src/services/product.ts on lines 5..12
src/services/subscription-item.ts on lines 5..12
src/services/transfer.ts on lines 5..12

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

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

export interface ITransferService {
  _find: FindMethod<ParamsWithStripeQuery<Stripe.TransferListParams>, Stripe.Transfer>;
  _get: (id: string, params: ParamsWithStripe) => Promise<Stripe.Transfer>;
  _create: (data: Stripe.TransferCreateParams, params: ParamsWithStripe) => Promise<Stripe.Transfer>;
  _update: (id: string, data: Stripe.TransferUpdateParams, params: ParamsWithStripe) => Promise<Stripe.Transfer>;
Severity: Major
Found in src/services/transfer.ts and 5 other locations - About 1 day to fix
src/services/payout.ts on lines 5..12
src/services/plan.ts on lines 5..12
src/services/product.ts on lines 5..12
src/services/subscription-item.ts on lines 5..12
src/services/subscription.ts on lines 5..12

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

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

export interface IPlanService {
  _find: FindMethod<ParamsWithStripeQuery<Stripe.PlanListParams>, Stripe.Plan>;
  _get: (id: string, params: ParamsWithStripe) => Promise<Stripe.Plan>;
  _create: (data: Stripe.PlanCreateParams, params: ParamsWithStripe) => Promise<Stripe.Plan>;
  _update: (id: string, data: Stripe.PlanUpdateParams, params: ParamsWithStripe) => Promise<Stripe.Plan>;
Severity: Major
Found in src/services/plan.ts and 5 other locations - About 1 day to fix
src/services/payout.ts on lines 5..12
src/services/product.ts on lines 5..12
src/services/subscription-item.ts on lines 5..12
src/services/subscription.ts on lines 5..12
src/services/transfer.ts on lines 5..12

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

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

export interface IRefundService {
  _find: FindMethod<ParamsWithStripeQuery<Stripe.RefundListParams>, Stripe.Refund>;
  _get: (id: string, params: ParamsWithStripe) => Promise<Stripe.Refund>;
  _create: (data: Stripe.RefundCreateParams, params: ParamsWithStripe) => Promise<Stripe.Refund>;
  _update: (id: string, data: Stripe.RefundUpdateParams, params: ParamsWithStripe) => Promise<Stripe.Refund>;
Severity: Major
Found in src/services/refund.ts and 5 other locations - About 1 day to fix
src/services/account.ts on lines 9..30
src/services/coupon.ts on lines 9..30
src/services/payment-intent.ts on lines 5..12
src/services/price.ts on lines 5..12
src/services/setup-intent.ts on lines 5..12

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

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

export interface ISetupIntentService {
  _find: FindMethod<ParamsWithStripeQuery<Stripe.SetupIntentListParams>, Stripe.SetupIntent>;
  _get: (id: string, params: ParamsWithStripe) => Promise<Stripe.SetupIntent>;
  _create: (data: Stripe.SetupIntentCreateParams, params: ParamsWithStripe) => Promise<Stripe.SetupIntent>;
  _update: (id: string, data: Stripe.SetupIntentUpdateParams, params: ParamsWithStripe) => Promise<Stripe.SetupIntent>;
Severity: Major
Found in src/services/setup-intent.ts and 5 other locations - About 1 day to fix
src/services/account.ts on lines 9..30
src/services/coupon.ts on lines 9..30
src/services/payment-intent.ts on lines 5..12
src/services/price.ts on lines 5..12
src/services/refund.ts on lines 5..12

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

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