"""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_CODE_UNAUTHORIZED_MANY_ACCOUNTS = 'Unauthorized to access many accounts' ERROR_CODE_UNAUTHORIZED_MANY_RESOURCES = 'Unauthorized to access many resources' ERROR_CODE_UNAUTHORIZED_RESOURCE = 'Unauthorized to access resource' 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_ATTACHMENT_ALREADY_EXISTS = \ 'Following attachment already exists ({attachment}).' ERROR_SCHEDULE_IDS_ALREADY_EXISTS = \ 'Following schedule_ids already exists ({schedule_ids}).' ERROR_ATTACHMENTS_ALREADY_EXISTS_OTHER_CONTRACT = \ '{term_type} already attached to another contract: {attachments}' ERROR_BASE_TERM_ALREADY_EXISTS = 'Base term for specified contract already exists.' ERROR_CANNOT_DELETE_CONTRACT_TERM_CONDITION = \ 'At least one contract term condition is required.' ERROR_CONTRACT_ID_ALREADY_EXISTS = 'Contract id {contract_id} already exists.' ERROR_CONTRACT_EXCLUSION_ALREADY_EXISTS = \ 'Contract exclusion for contract {contract_id} already exists' ERROR_CONTRACT_EXCLUSION_DOES_NOT_EXIST = \ 'Contract exclusion for contract {contract_id} does not exist.' ERROR_COUNTRIES_POST_LIMIT = 'At a time you can post {limit} countries' ERROR_FAILURE_TO_CREATE = 'Creation of {object} failed' ERROR_INVALID_BODY = 'Invalid request body. Expected: {expected_body_type}.' ERROR_INVALID_CONTRACT_TYPE = 'Creation of {contract_type} contract is not allowed.' ERROR_INVALID_IDS = '{object} IDs must be integers' ERROR_INVALID_INPUT_TYPE = \ 'Invalid input type: {type_received}. Expected: {type_expected}.' ERROR_INVALID_RELATIONSHIP = '{child} {child_id} does not belong to {parent} {parent_id}' # noqa E501 ERROR_INVALID_TERM = 'The term end must be after the term start.' ERROR_INVALID_GROUP_ADMIN = \ 'Invalid group_admin "{group_admin}". Must be one of: {group_admins}' ERROR_MECH_DEDUCTION_ALREADY_EXISTS = \ 'Mechanical Deduction for specified contract already exists' ERROR_MISSING_ATTACHMENT = 'At least one attachment must be specified' ERROR_MISSING_BASE_TERM = 'Cannot add exceptions without base term' ERROR_MISSING_FIELD = '{field} missing.' ERROR_MISSING_START_AND_END_TERM = \ 'The term start and the term end cannot both be blank.' ERROR_MISSING_TERM_RATE_AND_COMMISSION = \ 'Both the term rate and commission cannot be blank.' ERROR_INVALID_TERM_RATE_AND_COMMISSION_TOTAL = \ 'The sum of commissions and term_rate should be 100.' ERROR_MISSING_SCHEDULE_IDS = 'At least one schedule_id must be specified' ERROR_OA_CONTRACT_EXISTS = 'Exclusions can not be added as oa_contract exists.' ERROR_UNKNOWN_COUNTRY = 'Country code not recognized: {code}' ERROR_RESERVE_ALREADY_EXISTS = \ 'Reserve for specified contract already exists.' ERROR_RESERVE_MUST_BE_ACTIVE_TO_UPDATE = \ 'Reserve for specified contract must be active to update.' ERROR_INVALID_RELEASE_SCHEDULE = \ 'Please verify release_schedule values. The total of all values should be 1.' ERROR_INVALID_CONTRACT_ADVANCE_STATUS = \ 'The status of the contract advance must be one of {status}.' ERROR_INVALID_LIMIT_OFFSET = 'Limit and offset must be valid integers' ERROR_CONTRACT_ADVANCE_PAID_DELETE = 'The paid contract advance cannot be deleted.' ERROR_INVALID_REFERENCE_PAYMENT_TYPE_ID = 'reference_payment_type_id must be integer' ERROR_CONTRACT_ADVANCE_MILESTONE_NOT_REACHED = \ 'The contract advance cannot be paid until the ' \ 'specified milestone has been reached.' ERROR_CONTRACT_ADVANCE_MILESTONE_DATE = \ 'The milestone_date must be now or in the past.' ERROR_CONTRACT_ADVANCE_NO_MILESTONE_DATE = \ 'Advances with a status of {status} must have a milestone_date.' ERROR_CONTRACT_ADVANCE_DELETED = \ 'Cannot update contract_advance that has been deleted.' ERROR_CONTRACT_ADVANCE_INVALID_NOTE = \ 'Can only add a note to an advance with a status of paid.' ERROR_CONTRACT_ADVANCE_NOT_APPROVED = \ 'Advances must be marked as approved before they can be marked as paid.' ERROR_CONTRACT_ADVANCE_TAXES_FIELDS_REQUIRED = \ 'Both vat_amount and withholding_tax_amount are required.' ERROR_CONTRACT_ADVANCE_QUALIFIED_STATUS_REQUIRED = \ 'The previous status should be "qualified" for "in_review" transition' ERROR_CONTRACT_ADVANCE_IN_REVIEW_STATUS_REQUIRED = \ 'The previous status should be "in_review" for "pending_payment" transition' ERROR_COLLECTION_PERIOD_DETAIL_NOT_REQUIRED = \ 'collection_period_detail_interval or collection_period_detail_type cannot be set for "{}" contract.' # noqa: E501 ERROR_COLLECTION_PERIOD_DETAIL_REQUIRED = \ 'Please provide both collection_period_detail_interval and collection_period_detail_type fields or leave both fields blank.' # noqa: E501 ERROR_CONTRACT_LIFECYCLE_SCHEDULES_ALREADY_EXIST = \ 'The contract lifecycle schedules for contract {} already exist.' ERROR_MORE_THAN_TWO_CONTRACT_LIFECYCLE_SCHEDULES_NOT_ALLOWED = \ 'One or two contract lifecycle schedules should be associated with the contract.' ERROR_TWO_CONTRACT_LIFECYCLE_SCHEDULES_ALLOWED = \ 'POST/PUT request should have two contract lifecycle schedule records.' ERROR_SUBSEQUENT_CONTRACT_LIFECYCLE_SCHEDULES_CAN_NOT_CREATED = \ 'The subsequent schedule cannot be created if the first lifecycle schedule is created with "{}" renewal type.' # noqa: E501 ERROR_SUBSEQUENT_RENEW_AFTER_CERTAIN_DATE_CAN_NOT_CREATED = \ 'Can not create subsequent contract lifecycle schedule of renewal type "{}".' ERROR_SCHEDULE_END_REQUIRED = \ 'schedule_end date must be provided for contract lifecycle schedule of renewal_type "{}".' # noqa: E501 ERROR_SCHEDULE_END_NOT_REQUIRED = \ 'schedule_end date is required only for contract lifecycle schedule of renewal_type "{}".' # noqa: E501 ERROR_SCHEDULE_END_SHOULD_BE_IN_FUTURE = 'Schedule end date should be in future.' ERROR_RENEWAL_OFFSET_REQUIRED = \ 'renewal_offset_detail_interval and renewal_offset_detail_type must be provided for contract lifecycle schedule of renewal_type "{}".' # noqa: E501 ERROR_RENEWAL_OFFSET_NOT_REQUIRED = \ 'renewal_offset_detail_interval and renewal_offset_detail_type is required only for contract lifecycle schedule of renewal_type "{}".' # noqa: E501 ERROR_CONTRACT_LIFECYCLE_SCHEDULE_NOT_MATCHED = \ 'ContractLifecycleSchedule {} is not associated with Contract {}.' ERROR_CONTRACT_LIFECYCLE_ALREADY_EXIST = \ 'The contract lifecycle for contract {} and contract_lifecycle_schedule {} already exist.' # noqa: E501 ERROR_CONTRACT_LIFECYCLE_START_AND_END_DATE_NOT_VALID = \ 'lifecycle_term_start {} can not be after or same as lifecycle_term_end {} date.' # noqa: E501 ERROR_CONTRACT_LIFECYCLE_START_NOT_VALID = 'lifecycle_term_start is missing or invalid.' ERROR_CONTRACT_LIFECYCLE_SCHEDULES_LIST_EMPTY = \ 'contract_lifecycle_schedules can not be empty.' ERROR_CONTRACT_LIFECYCLE_NOT_FOUND = \ 'contract_lifecycle not found for contract {}.' ERROR_ACCOUNT_NOT_FOUND = \ 'account not found for account_id {account_id}.' ERROR_TERMINATION_EFFECTIVE_DATE_GREATER_THAN_TERM_END = \ 'termination_effective_date can not be greater than term_end date.' ERROR_CONTRACT_TERMINATION_INVALID_STATUS = \ 'invalid status for contract termination.' ERROR_CONTRACT_REACTIVATION_INVALID_STATUS = \ 'Invalid status for reactivating a contract.' ERROR_CONTRACT_LIFECYCLE_SCHEDULES_NOT_FOUND = \ 'contract_lifecycle_schedules are not found for contract {}.' ERROR_CURRENT_CONTRACT_LIFECYCLE_SCHEDULE_NOT_FOUND = \ 'Current contract_lifecycle_schedule not found.' ERROR_CAN_NOT_TERMINATE_CONTRACT_LIFECYCLE = \ 'Can not terminate contract_lifecycle {}. Please check termination_effective/collection_end date.' # noqa: E501 ERROR_INVALID_STATUS_FOR_TERMINATING_CONTRACT_LIFECYCLE = \ 'lifecycle status of contract_lifecycle {} should be either to_be_terminated or in_collection_period' # noqa: E501 ERROR_INVALID_STATUS_FOR_ACTIVATING_CONTRACT_LIFECYCLE = \ 'lifecycle status of contract_lifecycle {} should be init' ERROR_INVALID_STATUS_FOR_RENEWING_CONTRACT_LIFECYCLE = \ 'lifecycle status of contract_lifecycle {} should be active.' ERROR_INVALID_RENEWAL_EFFECTIVE_DATE = \ 'Can not renew contract_lifecycle {}. Please check renewal_effective date.' ERROR_CONTRACT_LIFECYCLE_SCHEDULES_NOT_EXIST = \ 'There are no contract lifecycle schedules available for contract {}.' ERROR_SUBSEQUENT_LIFECYCLE_SCHEDULE_NOT_EXIST = \ 'There is no subsequent contract lifecycle schedule for contract {}".' ERROR_MECH_DEDUCTION_CAN_NOT_HAVE_SAME_TERRITORY = \ 'Contract {} can not have two mechanical deductions with territory {}.' ERROR_MECHANICAL_TYPE_CAN_NOT_BE_EMPTY = \ 'mechanical_type can not be empty.' ERROR_MECHANICAL_TYPE_PHYSICAL_ONLY_ALLOW = \ 'Only "physical" mechanical_type is allowed for territory CAN/ROW.' ERROR_MECHANICAL_DEDUCTION_ALREADY_EXIST = \ 'Contract {} already has mechanical deductions.' ERROR_CONTRACT_FLOWTHROUGH_ALREADY_EXISTS = \ 'Flowthrough for contract {contract_id} already exists.' ERROR_ACCOUNT_NOT_FOUND_FOR_CONTRACT = 'Account not found for contract.' ERROR_ATTACHMENTS_CAN_NOT_BE_NULL = 'Attachments can not be null.' ERROR_INVALID_DATE = 'Invalid date format. Expected YYYY-MM-DD.' ERROR_INVALID_CONTRACT_STATUS = \ 'contract status must be one of {contract_lifecycle_status}.' ERROR_CONTRACT_CANNOT_BE_DELETED = 'Contract {contract_id} cannot be deleted.'