"""Logic for Snowflake products.""" from ows_product_physical.constant import snowflake from ows_product_physical.models import \ snowflake_change_history as change_history from ows_product_physical.models import snowflake_products as model def get_physical_product_change_history(**kwargs): """Get all physical products change_history. Keyword Args: product_ids (list): product ids. store_id (int): after delivery to store id. """ return change_history.get_physical_product_change_history(**kwargs) def eligible_products_for_new_delivery(**kwargs): """Get all product ids that are eligible for new delivery. Keyword Args: store_id (int): store id. limit (int): limit number of results. (optional) offset (int): starting offset. (optional) order_by (string): order records by this field. order_dir (string): order direction. account (int): Filter by this vendor id (optional) """ return model.get_products_for_new_delivery( snowflake.PHYSICAL_DISTRIBUTION_FORMATS, **kwargs ) def deleted_products_for_takedown(**kwargs): """Get all deleted product ids that are eligible for takedown. Keyword Args: store_id (int): store id. limit (int): limit number of results. (optional) offset (int): starting offset. (optional) order_by (string): order records by this field. order_dir (string): order direction. account (int): Filter by this vendor id (optional) """ return model.get_deleted_products_for_takedown( snowflake.PHYSICAL_DISTRIBUTION_FORMATS, **kwargs ) def products_eligible_for_update_delivery(**kwargs): """Get all product ids that are eligible for update delivery. Keyword Args: store_id (int): store id. limit (int): limit number of results. (optional) offset (int): starting offset. (optional) order_by (string): order records by this field. order_dir (string): order direction. account (int): Filter by this vendor id (optional) """ return model.get_products_eligible_for_update_delivery( snowflake.PHYSICAL_DISTRIBUTION_FORMATS, **kwargs )