"""Constants for the adjustments validation logic.""" from abacus_common_logic.utils.enum import enum ACTION_STATUS_COMPLETE = 'complete' CONTRACT_PRODUCT_TERM = 'product' CONTRACT_LABEL_TERM = 'label' VALID_CURRENCIES = [ 'AED', 'AOA', 'ARS', 'AUD', 'BDT', 'BGN', 'BRL', 'CAD', 'CHF', 'CLP', 'CNY', 'COP', 'CZK', 'DKK', 'EGP', 'EUR', 'GBP', 'GHS', 'HKD', 'HRK', 'HUF', 'IDR', 'ILS', 'INR', 'ISK', 'JPY', 'KRW', 'KZT', 'LKR', 'LTL', 'LVL', 'MVR', 'MXN', 'MYR', 'NGN', 'NOK', 'NPR', 'NZD', 'PEN', 'PHP', 'PLN', 'QAR', 'RON', 'RUB', 'SAR', 'SEK', 'SGD', 'THB', 'TRY', 'TWD', 'TZS', 'UAH', 'USD', 'VND', 'XAF', 'ZAR', 'ZMW', ] VALID_STATEMENT_PERIOD_STATUSES = ['current'] VALID_DISTRIBUTION_TYPES = ['digital', 'physical'] ACCOUNT_EXPENSE_ADJUSTMENT_TYPE = 'account expense' FLOWTHROUGH_ADJUSTMENT_TYPE = 'flowthrough' VALIDATION_ERRORS = enum( 'ValidationErrors', ACCOUNT_REQUIRED='The Account ID is required', ACCOUNT_NO_PAYMENT_ENTITY='The Account does not have a Payment Entity', ACCOUNT_NO_CLOSE_BALANCE='The Account does not have a "close_balance" status', ACCOUNT_INVALID_CLOSE_BALANCE="The Contract's balance is closed for the 'Statement Month' and 'Statement Year' values provided", ACCOUNT_INVALID='The Account ID is not valid', ACCOUNT_MISSING='The Account does not exist in Abacus', CONTRACT_REQUIRED='The Contract ID is required', CONTRACT_INVALID='The Contract ID is not valid', CONTRACT_MISSING='The Contract does not exist in Abacus for the Account', UPC_INVALID='The UPC is not valid', UPC_LENGTH='The UPC must be 11-13 digits long', UPC_BLANK='The UPC must be blank if the Distribution Type is blank', UPC_MISSING='The UPC is not attached to the Contract', AMOUNT_REQUIRED='The Amount is required', AMOUNT_INVALID='The Amount is not valid', AMOUNT_ZERO='The Amount cannot be zero', CURRENCY_REQUIRED='The Currency is required', CURRENCY_INVALID='The Currency is not valid', CURRENCY_UNSUPPORTED='The Currency is not supported', ACTIVITY_MONTH_REQUIRED='The Activity Month is required', ACTIVITY_MONTH_INVALID='The Activity Month is not valid', ACTIVITY_MONTH_LENGTH='The Activity Month must be a valid month number', ACTIVITY_YEAR_REQUIRED='The Activity Year is required', ACTIVITY_YEAR_INVALID='The Activity Year is not valid', ACTIVITY_YEAR_LENGTH='The Activity Year must be four digits', ACTIVITY_PERIOD_MISSING='The Activity Period does not exist in Abacus', STATEMENT_MONTH_REQUIRED='The Statement Month is required', STATEMENT_MONTH_INVALID='The Statement Month is not valid', STATEMENT_MONTH_LENGTH='The Statement Month must be a valid month number', STATEMENT_YEAR_REQUIRED='The Statement Year is required', STATEMENT_YEAR_INVALID='The Statement Year is not valid', STATEMENT_YEAR_LENGTH='The Statement Year must be four digits', STATEMENT_PERIOD_MISSING='The Statement Period is missing, closed, or in the future', ADJUSTMENT_TYPE_REQUIRED='The Adjustment Type is required', ADJUSTMENT_TYPE_UNSUPPORTED='The Adjustment Type is not supported by Abacus', ADJUSTMENT_TYPE_EXPENSE='The Adjustement Type "Account Expense" is not allowed', COMMENTS_REQUIRED='The Client Facing Comments field is required', COMMENTS_LENGTH='The Client Facing Comments maximum length is 180 characters', DISTRIBUTION_TYPE_BLANK='The Distribution Type must be blank if the UPC is blank', DISTRIBUTION_TYPE_UNSUPPORTED='The Distribution Type is not supported', FLOWTHROUGH_PAYMENT_REQUIRED=' The Apply to Flowthrough Payment is required for the Flowthrough adjustment type', FLOWTHROUGH_PAYMENT_INVALID='The Apply to Flowthrough Payment value is not valid', )