File

src/infrastructure/config/env.objects.ts

Description

VirtualBank options

Index

Properties

Properties

deposit_fee_per_minute
deposit_fee_per_minute: number
Type : number

Represents the fee for each minute more if customer keeps the money in our bank

transaction_commission
transaction_commission: number
Type : number

Represents the commision amount defined for each money transaction

widraw_commission
widraw_commission: number
Type : number

Represents the ammount of commission for each widrawal

import { expandEnvVariables } from '../../core/helpers/env.helper'
expandEnvVariables();

/**
 * options enum
 */
export enum EnvObjects {
  TRANSACTION_COMMISSION = 'VirtualBankOptions',
  WIDRAW_COMMISSION = 'VirtualBankOptions',
  DEPOSIT_FEE_PER_MINUTE = 'VirtualBankOptions',
}
//===================================================================================================
/**
 * VirtualBank options
 */
export interface VirtualBankOptions {
  /**
   * Represents the commision amount defined for each money transaction
   */
  transaction_commission: number;
  /**
   * Represents the ammount of commission for each widrawal
   */
  widraw_commission: number;

  /**
   * Represents the fee for each minute more if customer keeps the money in our bank
   */
  deposit_fee_per_minute: number;
}

/**
 * configuration function
 * @returns configuration taken from env
 */
export const configuration = (): any => ({
  VirtualBankOptions: {
    transaction_commission: process.env.TRANSACTION_COMMISSION,
    widraw_commission: process.env.WIDRAW_COMMISSION,
    deposit_fee_per_minute: process.env.DEPOSIT_FEE_PER_MINUTE,
  },
});

results matching ""

    No results matching ""