"""Generic error messages.""" ERROR_CODE_AUTHORIZATION = 'authorization_error' ERROR_CODE_BAD_GRASS_REQUEST = 'bad_grass_request_error' ERROR_CODE_NOT_FOUND = 'not_found' ERROR_CODE_FORBIDDEN = 'forbidden' ERROR_ENTITY_DOES_NOT_EXIST = '{object_type} {object_id} does not exist.' ERROR_FIELD_MISSING = 'Must be specified.' ERROR_UNKNOWN_CURRENCY = 'Currency code not recognized: {code}' ERROR_MESSAGE_MISSING_GRASS_HEADERS = 'Missing Grass Headers' ERROR_MESSAGE_INCOMPLETE_GRASS_HEADERS = 'Incomplete Grass Headers' ERROR_MESSAGE_INVALID_GRASS_ACCOUNT_TYPE = 'Invalid Grass Account Type' ERROR_MESSAGE_FORBIDDEN_USER = 'User is forbidden' ERROR_DONT_HAVE_PERMISSIONS = "You don't have access to this resource!" ERROR_CODE_UNAUTHORIZED_MANY_ACCOUNTS = 'Unauthorized to access many accounts' ERROR_CODE_UNAUTHORIZED_RESOURCE = 'Unauthorized to access resource' # SHARED ERROR MESSAGES ERROR_ACCOUNT_ALREADY_EXISTS = 'ABACUS account already exists: {account_id}' ERROR_INVALID_IDS = '{object} IDs must be integers' ERROR_UNKNOWN_COUNTRY = 'Country code not recognized: {code}' PARAMS_REQUIRED_MISSING = 'Required parameters `{params_string}` are missing' # ACCOUNT_PAYEE ERROR_ACCOUNT_PAYEE_ALREADY_EXISTS = ( 'An {object_type} for an account-id {object_id} already exists.' ) # ACCOUNT_TAX_INFO ERROR_ACCOUNT_TAX_INFO_ALREADY_EXISTS = ( 'AccountTaxInfo for account_id {object_id} already exists.' ) # PAYMENT_HOLD / PAYMENT_HOLD_HISTORY ERROR_INVALID_HOLD_STATUS_REASON = ( "Account's payment status of {hold_status} with reason {reason}" ' already exists or is pending' ) ERROR_INVALID_START_DATE = ( 'Start date cannot be before today. Start date: {start_date}, Today: {today} {tz}' ) # ACCOUNT_PAYMENT_TERM ERROR_PAYMENT_TERM_ALREADY_EXISTS = ( 'An {object_type} for an account-id {object_id} already exists.' ) ERROR_PAYMENT_TERM_NOT_EXISTS = ( 'A payment term for an account-id {account_id} doesn`t exist.' ) ERROR_KNR_ACCOUNT_CANT_MODIFY_AGREEMENT_TYPE = ( 'Not allowed for payment_term_id:{payment_term_id}. ' 'Only payoneer payment type contracts allowed to change agreement type.' ) # ACCOUNT_PAYMENT_TERM_TEMPLATE ERROR_PAYMENT_TERM_TEMPLATE_DOES_NOT_EXISTS = ( 'There is no Account Payment Term Template for currency code {currency_code}.' ) ERROR_INVALID_LIMIT_OFFSET = 'Limit and offset must be valid integers' # ACCOUNT_PAYONEER_PROGRAM ERROR_PAYONEER_PROGRAM_BY_PARAMS_NOT_EXISTS = ( 'Payoneer program does not exist for {currency},{agreement_type},{payment_entity}.' ) ERROR_INPUT_PAYONEER_PROGRAM_MISMATCH = ( 'Request payoneer program id:{request_pp_id} and payment term ' 'payoneer program id:{payment_term_pp_id} payoneer program mismatch.' ) COUNTRY_OF_TAX_RESIDENCE_IS_REQUIRED = 'Country of tax residence is required' ERROR_START_END_DATE = 'Start date must be before end date' ERROR_PROGRAM_PAYMENT_TYPE_MISMATCH = ( 'Reference payment type and payoneer program mismatch' )