public BigCommerceProductsService(BigCommerceConfig config) { Condition.Requires(config, "config").IsNotNull(); this._webRequestServices = new WebRequestServices(config, this.GetMarker()); this._apiVersion = config.GetAPIVersion(); }
public IBigCommerceCategoriesService CreateCategoriesService(BigCommerceConfig config) { var apiVersion = config.GetAPIVersion(); var marker = Guid.NewGuid().ToString(); var services = new WebRequestServices(config, marker); return(new BigCommerceCategoriesServiceV3(services)); }
public IBigCommerceProductsService CreateProductsService(BigCommerceConfig config) { var apiVersion = config.GetAPIVersion(); var marker = Guid.NewGuid().ToString(); var services = new WebRequestServices(config, marker); if (apiVersion == APIVersion.V2) { return(new BigCommerceProductsServiceV2(services)); } return(new BigCommerceProductsServiceV3(services)); }
public async Task <Stream> RunAsync(Mark mark = null) { var webRequestServices = new WebRequestServices(); var serviceUrl = this.Url.ToString().TrimEnd('/') + MagentoRestPath + this.MagentoServicePath.ToString(); var body = this.Body.ToString(); var method = this.MagentoWebRequestMethod.ToString(); var parameters = this.Parameters?.ToString(); var rawHeaders = new Dictionary <string, string> { { "Authorization", $"Bearer {this.AuthorizationToken}" } }; var requestAsync = await webRequestServices.CreateCustomRequestAsync( serviceUrl, body, rawHeaders, //TODO:create VO with builder!!! method, parameters).ConfigureAwait(false); MagentoLogger.LogTraceRequestMessage($"method:'{method}',url:'{serviceUrl}',parameters:'{parameters}',headers:{rawHeaders.ToJson()},body:'{body}'", mark); return(await webRequestServices.GetResponseStreamAsync(requestAsync, mark).ConfigureAwait(false)); }
public BigCommerceProductsServiceV3(WebRequestServices services) : base(services) { }
public BigCommerceOrdersService(BigCommerceConfig config) { Condition.Requires(config, "config").IsNotNull(); this._webRequestServices = new WebRequestServices(config); }
public ShipStationService( ShipStationCredentials credentials ) { this._webRequestServices = new WebRequestServices( credentials ); }
public ReverbOrdersService(ReverbConfig config) { Condition.Requires(config, "config").IsNotNull(); this._webRequestServices = new WebRequestServices(config); }
public BigCommerceBaseProductsService(WebRequestServices services) { Condition.Requires(services, "services").IsNotNull(); this._webRequestServices = services; }
public BigCommerceCategoriesServiceV3(WebRequestServices services) : base(services) { }
public BigCommerceOrdersService( BigCommerceConfig config ) { Condition.Requires( config, "config" ).IsNotNull(); this._webRequestServices = new WebRequestServices( config ); }
public ShipStationService(ShipStationCredentials credentials) { this._webRequestServices = new WebRequestServices(credentials); }