Exemple #1
0
def get(shipping_rule_id):
    dic = ShippingRule.collection().find_one({"_id": coerce_bson_id(shipping_rule_id)})
    return ShippingRule.unserialize(dic) if dic is not None else None
Exemple #2
0
def get_all():
    dic_lis = ShippingRule.collection().find({"status": ShippingStatus.ENABLED})
    return map(lambda x: ShippingRule.unserialize(x), dic_lis)