"""Logic for marketing highlight projections.""" from product_digital_marketing.models import highlight_projection def upsert_marketing_highlight_projections( product_id, highlight_projection_data, orchard_user_id): """Create or update marketing highlight by product id. Args: product_id (int): Product id. highlight_projection_data (dict): Highlight Projection data to persist. orchard_user_id (str): Orchard user id. Returns: response.Response: object containing highlight_projections if successfully created. """ return highlight_projection.upsert_marketing_highlight_projections( product_id, highlight_projection_data, orchard_user_id) def delete_highlight_projection(product_id, projection_id): """Delete projection for product. Args: product_id (int): Product id. projection_id (int): Projection id. Returns: response.Response: success response if object exists else 404. """ return highlight_projection.delete_highlight_projection( product_id, projection_id)