public PlazaApiTests() { var plazaApiConfig = new PlazaApiConfig { RootEndPoint = "https://test-plazaapi.bol.com", Namespace = "https://plazaapi.bol.com/services/xsd/v2/plazaapi.xsd", OrdersUrl = "/services/rest/orders/v2", OrderItemsUrl = "/services/rest/order-items/v2", ShipmentsUrl = "/services/rest/shipments/v2", ShippingLabelsUrl = "/services/rest/purchasable-shipping-labels/v2", TransportsUrl = "/services/rest/transports/v2", ReturnItemsUrl = "/services/rest/return-items/v2", ProcessStatusUrl = "/services/rest/process-status/v2", PublicKey = "[YOUR PUBLIC KEY]", PrivateKey = "[YOUR PRIVATE KEY]" }; var connector = new Connector(plazaApiConfig); var orderRepository = new OrderRepository(connector, plazaApiConfig); var shipmentRepository = new ShipmentRepository(connector, plazaApiConfig); var shippingLabelRepository = new ShippingLabelRepository(connector, plazaApiConfig); var returnItemRepository = new ReturnItemRepository(connector, plazaApiConfig); var processStatusRepository = new ProcessStatusRepository(connector, plazaApiConfig); _plazaApi = new PlazaApiClient(orderRepository, shipmentRepository, shippingLabelRepository, returnItemRepository, processStatusRepository); }
public PlazaApiClient(OrderRepository orderRepository, ShipmentRepository shipmentRepository, ShippingLabelRepository shippingLabelRepository, ReturnItemRepository returnItemRepository, ProcessStatusRepository processStatusRepository) { OrderRepository = orderRepository; ShipmentRepository = shipmentRepository; ShippingLabelRepository = shippingLabelRepository; ReturnItemRepository = returnItemRepository; ProcessStatusRepository = processStatusRepository; }