public void CanGetOrderCommentsFromApi() { MagentoService mservice = new MagentoService(); mservice.Url = "https://www.candydirect.com/index.php/api/v2_soap/index/"; String mlogin = mservice.login("dynamics_ax", "dynamics_ax"); //var result = mservice.orderCommentsGetOrderComments(mlogin,"100048351"); var result1 = mservice.salesOrderCustomerComment(mlogin,55206); Console.WriteLine(result1.gift_message_sender); Console.WriteLine(result1.gift_message_recipient); Console.WriteLine(result1.gift_message); Console.WriteLine(result1.customer_comment); Console.WriteLine(result1.coupon_code); }
public MagentoStore() { var mUser = System.Configuration.ConfigurationManager.AppSettings["MagentoUserName"]; var mPass = System.Configuration.ConfigurationManager.AppSettings["MagentoUserPass"]; var mUrl = System.Configuration.ConfigurationManager.AppSettings["MagentoWebServiceUrl"]; if(mUser == null || mPass == null) throw new ArgumentNullException("MagentoUserName or MagentoUserPass is missing from <appsettings> in the config file"); if(mUrl == null) throw new ArgumentNullException(@"MagentoWebServiceUrl is missing from <appsettings> in the config file. Sample: 'https://www.candydirect.com/index.php/api/v2_soap/index/'"); _mservice = new MagentoService(); _mservice.Url = mUrl; _mlogin = _mservice.login(mUser, mPass); }
public void Dispose() { _mservice.endSession(_mlogin); _mservice = null; }
public void TestMethod() { MagentoService mservice = new MagentoService(); // need to get prod working mservice.Url = "https://www.candydirect.com/index.php/api/v2_soap/index/"; String mlogin = mservice.login("dynamics_ax", "dynamics_ax"); Console.WriteLine(mlogin); var atts = new catalogProductRequestAttributes(); atts.attributes = new string[]{"name", "price"}; //var info = mservice.catalogProductInfo(mlogin, "1113761-GP", null,atts); var sales = mservice.salesOrderInfo(mlogin,"100055500"); //Console.WriteLine("name: " + info.name); //Console.WriteLine(info.price); Console.WriteLine(sales.shipping_address.street); Console.WriteLine(sales.billing_address.street); Console.WriteLine(sales.created_at); DateTime convertedDate = DateTime.SpecifyKind( DateTime.Parse(sales.created_at), DateTimeKind.Utc); Console.WriteLine(sales.shipping_description); Console.WriteLine(convertedDate.Kind); Console.WriteLine(convertedDate.ToLocalTime()); }