Bukimedia / PrestaSharp

CSharp .Net client library for the PrestaShop API via web service
GNU General Public License v3.0
154 stars 152 forks source link

Can't add customer #421

Open LeffdePeff opened 3 years ago

LeffdePeff commented 3 years ago
CustomerFactory customers = new CustomerFactory(baseUrl, account, password);
customer customer = new customer();
customer.passwd = "123345678";
customer.firstname = "tst";
customer.lastname = "tst";
customer.email = "tst@tst.com";
customer.id_shop = 1;
customer.id_gender = 1;
customer.id_default_group = 1;
customer.id_lang = 1;
customer.active = 1;
customers.Add(customer);

this gives me this error:

Unhandled Exception:
System.InvalidOperationException: Nullable object must have a value.
  at System.Nullable`1[T].get_Value () [0x00008] in <46e2faba55964e57bc4a72159b9574b8>:0 
  at Bukimedia.PrestaSharp.Factories.GenericFactory`1[T].Add (T Entity) [0x00061] in <060d3eadd6834d8e9cd52dd542254af3>:0 
  at MainMenu._Ready () [0x00093] in ...