public GetPurchaseOrderCommand(NetSuiteConfig config, long orderId) : base(config, "/rest/platform/v1/record/purchaseorder") { Condition.Requires(orderId, "orderId").IsGreaterThan(0); this.OrderId = orderId; this.Url = string.Format("{0}/{1}?expandSubResources=true", this.RelativeUrl, this.OrderId); }
public GetCustomerInfoCommand(NetSuiteConfig config, long customerId) : base(config, "/rest/platform/v1/record/customer") { Condition.Requires(customerId, "customerId").IsGreaterThan(0); this.CustomerId = customerId; this.Url = string.Format("{0}/{1}", this.RelativeUrl, this.CustomerId); }
protected NetSuiteCommand(NetSuiteConfig config, string relativeUrl) { Condition.Requires(config, "config").IsNotNull(); this.Config = config; this.RelativeUrl = relativeUrl; }
public GetRecordsPageCommand(NetSuiteConfig config, NetSuiteCommand command, int limit, int offset) : base(config, string.Empty) { Condition.Requires(limit, "limit").IsGreaterOrEqual(0); Condition.Requires(offset, "offset").IsGreaterOrEqual(0); this.Limit = limit; this.Offset = offset; this.Url = string.Format("{0}{1}limit={2}&offset={3}", command.Url, command.Url.Contains("?") ? "&" : "?", this.Limit, this.Offset); }
public GetModifiedPurchaseOrdersCommand(NetSuiteConfig config, DateTime startDate, DateTime endDate) : base(config, "/rest/platform/v1/record/purchaseorder") { Condition.Requires(startDate, "startDate").IsLessThan(endDate); this.StartDate = startDate; this.EndDate = endDate; this.Url = string.Format("{0}?q=lastModifiedDate ON_OR_AFTER \"{1}\" AND lastModifiedDate ON_OR_BEFORE \"{2}\"", this.RelativeUrl, this.StartDate.ToString("dd-MMM-yy HH:mm:ss", CultureInfo.InvariantCulture), this.EndDate.ToString("dd-MMM-yy HH:mm:ss", CultureInfo.InvariantCulture)); }
public NetSuiteCustomersService(NetSuiteConfig config) { this._soapService = new NetSuiteSoapService(config); }
public INetSuiteCommonService CreateCommonService(NetSuiteConfig config) { return(new NetSuiteCommonService(config)); }
public INetSuiteOrdersService CreateOrdersService(NetSuiteConfig config) { return(new NetSuiteOrdersService(config)); }
public NetSuiteCommonService(NetSuiteConfig config) { _soapService = new NetSuiteSoapService(config); }
public BaseTest() { var testCredentials = this.LoadTestSettings <TestCredentials>(@"\..\..\credentials.csv"); this.Config = new NetSuiteConfig(new NetSuiteCredentials(testCredentials.CustomerId, testCredentials.ConsumerKey, testCredentials.ConsumerSecret, testCredentials.TokenId, testCredentials.TokenSecret)); }
public NetSuiteOrdersService(NetSuiteConfig config) { this._customersService = new NetSuiteCustomersService(config); this._commonService = new NetSuiteCommonService(config); this._soapService = new NetSuiteSoapService(config); }