/// <summary> /// Initializes a new instance of the <see cref="ApiClient" /> class /// with default base path (http://localhost/admin). /// </summary> /// <param name="config">An instance of Configuration.</param> public ApiClient(Configuration config = null) { if (config == null) Configuration = Configuration.Default; else Configuration = config; RestClient = new RestClient("http://localhost/admin"); }
/// <summary> /// Initializes a new instance of the <see cref="CMSContentModuleApi"/> class /// using Configuration object /// </summary> /// <param name="configuration">An instance of Configuration</param> /// <returns></returns> public CMSContentModuleApi(Configuration configuration) { if (configuration == null) // use the default one in Configuration this.Configuration = Configuration.Default; else this.Configuration = configuration; }
/// <summary> /// Initializes a new instance of the <see cref="QuoteModuleApi"/> class /// using Configuration object /// </summary> /// <param name="configuration">An instance of Configuration</param> /// <returns></returns> public QuoteModuleApi(Configuration configuration) { if (configuration == null) // use the default one in Configuration this.Configuration = Configuration.Default; else this.Configuration = configuration; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) { this.Configuration.ApiClient.Configuration = this.Configuration; } }
/// <summary> /// Initializes a new instance of the <see cref="CommerceCoreModuleApi"/> class /// using Configuration object /// </summary> /// <param name="configuration">An instance of Configuration</param> /// <returns></returns> public CommerceCoreModuleApi(Configuration configuration) { if (configuration == null) // use the default one in Configuration this.Configuration = Configuration.Default; else this.Configuration = configuration; }
/// <summary> /// Initializes a new instance of the <see cref="VirtoCommercePlatformApi"/> class /// using Configuration object /// </summary> /// <param name="configuration">An instance of Configuration</param> /// <returns></returns> public VirtoCommercePlatformApi(Configuration configuration) { if (configuration == null) // use the default one in Configuration this.Configuration = Configuration.Default; else this.Configuration = configuration; }
public CatalogController(Configuration apiConfiguration) { _catalogClient = new CatalogModuleApi(apiConfiguration); }
/// <summary> /// Initializes a new instance of the <see cref="ShoppingCartModuleApi"/> class /// using Configuration object /// </summary> /// <param name="configuration">An instance of Configuration</param> /// <returns></returns> public ShoppingCartModuleApi(Configuration configuration) { if (configuration == null) // use the default one in Configuration this.Configuration = Configuration.Default; else this.Configuration = configuration; }
public ProductController(Configuration apiConfiguration) { _productClient = new CatalogModuleApi(apiConfiguration); }
public OrderController(Configuration apiConfiguration) { _orderClient = new OrderModuleApi(apiConfiguration); }