示例#1
0
        public Entities.supplier Add(Entities.supplier Supplier)
        {
            long?idAux = Supplier.id;

            Supplier.id = null;
            List <PrestaSharp.Entities.PrestaShopEntity> Entities = new List <PrestaSharp.Entities.PrestaShopEntity>();

            Entities.Add(Supplier);
            RestRequest request = this.RequestForAdd("suppliers", Entities);

            Entities.supplier aux = this.Execute <Entities.supplier>(request);
            Supplier.id = idAux;
            return(this.Get((long)aux.id));
        }
示例#2
0
 public void Delete(Entities.supplier Supplier)
 {
     this.Delete((long)Supplier.id);
 }
示例#3
0
        public void Update(Entities.supplier Supplier)
        {
            RestRequest request = this.RequestForUpdate("suppliers", Supplier.id, Supplier);

            this.Execute <Entities.category>(request);
        }