Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def filter_set(cls):
return FilterSet(min_id = NumberFilter( info="Minimum id of the product" ),
max_id = NumberFilter( info="Minimum id of the product" ),
name = StringFilter( info="The product name" ),
sku = StringFilter(),
description = StringFilter(),
condition = StringFilter(),
availability = StringFilter(),
brand_id = NumberFilter(),
min_date_created = DateFilter(),
max_date_created = DateFilter(),
min_date_modified = DateFilter(),
max_date_modified = DateFilter(),
min_date_last_imported = DateFilter(),
max_date_last_imported = DateFilter(),
min_inventory_level = NumberFilter(),
max_inventory_level = NumberFilter(),
is_visible = BoolFilter(),
is_featured = BoolFilter(),
min_price = NumberFilter(),
max_price = NumberFilter(),
min_number_sold = NumberFilter(),
max_number_sold = NumberFilter(),
)
def filter_set(cls):
return FilterSet(min_id = NumberFilter(info="The minimum id of the order."),
max_id = NumberFilter(info="The maximum id of the order."),
min_total = NumberFilter(info="The minimum total for the order."),
max_total = NumberFilter(info="The maximum total for the order."),
customer_id = NumberFilter(info="Filter orders by customers."),
status_id = NumberFilter(info="Filter orders by the order status."),
is_deleted = BoolFilter(info="Filter orders by the deleted flag."),
payment_method = StringFilter(info="Filter orders by payment method."),
min_date_created = DateFilter(info="Retrieve all orders created after a specified date."),
max_date_created = DateFilter()
)
def filter_set(cls):
return FilterSet(min_id = NumberFilter( info="Minimum id of the product" ),
max_id = NumberFilter( info="Minimum id of the product" ),
first_name = StringFilter(),
last_name = StringFilter(),
company = StringFilter(),
email = StringFilter(),
phone = StringFilter(),
store_credit = NumberFilter(),
customer_group_id = NumberFilter(),
min_date_created = DateFilter(),
max_date_created = DateFilter()
)
def filter_set(cls):
return FilterSet(min_id = NumberFilter( info="Minimum id of the product" ),
max_id = NumberFilter( info="Minimum id of the product" ),
name = StringFilter( info="The product name" ),
sku = StringFilter(),
description = StringFilter(),
condition = StringFilter(),
availability = StringFilter(),
brand_id = NumberFilter(),
min_date_created = DateFilter(),
max_date_created = DateFilter(),
min_date_modified = DateFilter(),
max_date_modified = DateFilter(),
min_date_last_imported = DateFilter(),
max_date_last_imported = DateFilter(),
min_inventory_level = NumberFilter(),
max_inventory_level = NumberFilter(),
is_visible = BoolFilter(),
is_featured = BoolFilter(),
min_price = NumberFilter(),
max_price = NumberFilter(),
min_number_sold = NumberFilter(),
max_number_sold = NumberFilter(),
)
def filter_set(cls):
return FilterSet(min_id = NumberFilter( info="Minimum id of the product" ),
max_id = NumberFilter( info="Minimum id of the product" ),
first_name = StringFilter(),
last_name = StringFilter(),
company = StringFilter(),
email = StringFilter(),
phone = StringFilter(),
store_credit = NumberFilter(),
customer_group_id = NumberFilter(),
min_date_created = DateFilter(),
max_date_created = DateFilter()
)
def filter_set(cls):
return FilterSet(min_id = NumberFilter( info="Minimum id of the product" ),
max_id = NumberFilter( info="Minimum id of the product" ),
name = StringFilter( info="The product name" ),
sku = StringFilter(),
description = StringFilter(),
condition = StringFilter(),
availability = StringFilter(),
brand_id = NumberFilter(),
min_date_created = DateFilter(),
max_date_created = DateFilter(),
min_date_modified = DateFilter(),
max_date_modified = DateFilter(),
min_date_last_imported = DateFilter(),
max_date_last_imported = DateFilter(),
min_inventory_level = NumberFilter(),
max_inventory_level = NumberFilter(),
is_visible = BoolFilter(),
is_featured = BoolFilter(),
min_price = NumberFilter(),
max_price = NumberFilter(),
min_number_sold = NumberFilter(),
max_number_sold = NumberFilter(),
)
def filter_set(cls):
return FilterSet(min_id = NumberFilter( info="Minimum id of the product" ),
max_id = NumberFilter( info="Minimum id of the product" ),
name = StringFilter( info="The product name" ),
sku = StringFilter(),
description = StringFilter(),
condition = StringFilter(),
availability = StringFilter(),
brand_id = NumberFilter(),
min_date_created = DateFilter(),
max_date_created = DateFilter(),
min_date_modified = DateFilter(),
max_date_modified = DateFilter(),
min_date_last_imported = DateFilter(),
max_date_last_imported = DateFilter(),
min_inventory_level = NumberFilter(),
max_inventory_level = NumberFilter(),
is_visible = BoolFilter(),
is_featured = BoolFilter(),
min_price = NumberFilter(),
max_price = NumberFilter(),
min_number_sold = NumberFilter(),
max_number_sold = NumberFilter(),
)
def set(self, value):
if isinstance(value, (datetime, date)):
self.value = value.strftime("%a, %d %b %Y %H:%M:%S +0000")
elif isinstance(value, basestring):
try:
self.value = datetime.strptime(value, DateFilter.format).strftime("%a, %d %b %Y %H:%M:%S +0000")
except:
raise AttributeError("Unable to use date value - check the format (use: %s)" % DateFilter.format)
def filter_set(cls):
return FilterSet(min_id = NumberFilter(info="The minimum id of the order."),
max_id = NumberFilter(info="The maximum id of the order."),
min_total = NumberFilter(info="The minimum total for the order."),
max_total = NumberFilter(info="The maximum total for the order."),
customer_id = NumberFilter(info="Filter orders by customers."),
status_id = NumberFilter(info="Filter orders by the order status."),
is_deleted = BoolFilter(info="Filter orders by the deleted flag."),
payment_method = StringFilter(info="Filter orders by payment method."),
min_date_created = DateFilter(info="Retrieve all orders created after a specified date."),
max_date_created = DateFilter()
)
def filter_set(cls):
return FilterSet(min_id = NumberFilter( info="Minimum id of the product" ),
max_id = NumberFilter( info="Minimum id of the product" ),
name = StringFilter( info="The product name" ),
sku = StringFilter(),
description = StringFilter(),
condition = StringFilter(),
availability = StringFilter(),
brand_id = NumberFilter(),
min_date_created = DateFilter(),
max_date_created = DateFilter(),
min_date_modified = DateFilter(),
max_date_modified = DateFilter(),
min_date_last_imported = DateFilter(),
max_date_last_imported = DateFilter(),
min_inventory_level = NumberFilter(),
max_inventory_level = NumberFilter(),
is_visible = BoolFilter(),
is_featured = BoolFilter(),
min_price = NumberFilter(),
max_price = NumberFilter(),
min_number_sold = NumberFilter(),
max_number_sold = NumberFilter(),
)