Exemplo n.º 1
0
        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);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 5
0
        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);
 }
Exemplo n.º 7
0
 public INetSuiteCommonService CreateCommonService(NetSuiteConfig config)
 {
     return(new NetSuiteCommonService(config));
 }
Exemplo n.º 8
0
 public INetSuiteOrdersService CreateOrdersService(NetSuiteConfig config)
 {
     return(new NetSuiteOrdersService(config));
 }
Exemplo n.º 9
0
 public NetSuiteCommonService(NetSuiteConfig config)
 {
     _soapService = new NetSuiteSoapService(config);
 }
Exemplo n.º 10
0
        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));
        }
Exemplo n.º 11
0
 public NetSuiteOrdersService(NetSuiteConfig config)
 {
     this._customersService = new NetSuiteCustomersService(config);
     this._commonService    = new NetSuiteCommonService(config);
     this._soapService      = new NetSuiteSoapService(config);
 }