public async Task RequestExport() { var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var result = await bolApiCaller.Offers.RequestOfferExportFile(); Assert.IsTrue(result.Description == "Create an offer export."); }
public async Task GetShipmentList() { var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var response = await bolApiCaller.Shipments.GetShipmentList(page : 1, fulFilmentType : FulFilmentMethod.FBR); Assert.IsTrue(response.Shipments.Length == 4); }
public async Task GetOpenOrders() { var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var response = await bolApiCaller.Orders.GetOpenOrders(1, FulFilmentMethod.FBR); Assert.IsTrue(response.Orders.Length > 0); }
public async Task HandleReturn() { var api = new BolApiCaller(testClientId, testClientSecret, true); var response = await api.Returns.HandleReturn(86129741, new HandleReturnContainer(1, HandlingResult.RETURN_DOES_NOT_MEET_CONDITIONS)); Assert.IsTrue(response.EventType == "HANDLE_RETURN_ITEM"); }
public async Task GetShipmentById() { var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var response = await bolApiCaller.Shipments.GetShipmentById("914587795"); Assert.IsTrue(response.ShipmentReference == "Shipment1"); }
public async Task AddTransportInformation() { var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var response = await bolApiCaller.Transports.AddTransportInformation("358612589", new ObjectDefinitions.Transport("TNT", "3SAOLD1234567")); Assert.IsTrue(response.EventType == "CHANGE_TRANSPORT"); }
public async Task GetReturns() { var api = new BolApiCaller(testClientId, testClientSecret, true); var response = await api.Returns.GetReturns(); Assert.IsTrue(response.Returns[0].ReturnItems[0].Ean == "0634154562956"); }
public async Task GetProcessStatusesByIds() { var api = new BolApiCaller(testClientId, testClientSecret, true); var statuses = await api.ProcessStatus.GetProcessStatusesByIds(new [] { "1", "2" }); Assert.IsTrue(statuses.ProcessStatuses[0].EventType == "CONFIRM_SHIPMENT"); }
public async Task RetrieveOffer() { var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var result = await bolApiCaller.Offers.GetOffer("13722de8-8182-d161-5422-4a0a1caab5c8"); Assert.IsTrue(result.Ean == "3165140085229"); }
public async Task ShipOrder() { var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var response = await bolApiCaller.Orders.GetOpenOrders(1, FulFilmentMethod.FBR); var requestWasSend = false; foreach (var order in response.Orders) { foreach (var orderItem in order.OrderItems) { var shippingInfo = new ShippingInfo(); shippingInfo.OrderItems = new List <OrderItemIdContainer>() { new OrderItemIdContainer() { OrderItemId = orderItem.OrderItemId } }; var shipmentResponse = await bolApiCaller.Orders.ShipOrderItem(shippingInfo); requestWasSend = true; Assert.IsTrue(shipmentResponse.EventType == "CONFIRM_SHIPMENT"); //The BOL api limits the amount of calls on this endpoint await Task.Delay(100); } } Assert.IsTrue(requestWasSend); Assert.IsTrue(response.Orders.Length > 0); }
public async Task GetProcessStatus() { var api = new BolApiCaller(testClientId, testClientSecret, true); var status = await api.ProcessStatus.GetStatusByProcessId("1"); Assert.IsTrue(status.EventType == "CONFIRM_SHIPMENT"); }
public async Task GetProcessStatusByEntityId() { var api = new BolApiCaller(testClientId, testClientSecret, true); var status = await api.ProcessStatus.GetProcessStatusByEntityAndEvent("555551", ProcessEventType.CONFIRM_SHIPMENT); Assert.IsTrue(status.ProcessStatuses[0].EventType == "CONFIRM_SHIPMENT"); }
public async Task RetrieveExport() { var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var result = await bolApiCaller.Offers.RetrieveOfferExportFile("73985e00-d461-4461-80e7-d3fea8d23ef4"); Assert.IsTrue(result.StartsWith("offerId,ean,conditionName")); }
public async Task GetCommissionByEANWithReduction() { var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var commission = await bolApiCaller.Commissions.GetCommissionByEAN("8718526069334", "NEW", 25.00m); Assert.AreEqual(commission.Condition, "NEW"); }
public async Task GetCommissionByEANAsync() { var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var commission = await bolApiCaller.Commissions.GetCommissionByEAN("8712626055143", "GOOD", 24.50m); Assert.AreEqual(commission.Condition, "GOOD"); }
public async Task RetrieveUnpublishedOfferReport() { //Remove if Bol fixed this issue Assert.Inconclusive("Bol seems to have deleted all This endpoint??"); var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var result = await bolApiCaller.Offers.RetrieveUnpublishedOfferReport("3f2bb9f5-79dd-472c-aeb7-fef416b77928"); }
public async Task RequestUnpublishedOfferReport() { //Remove if Bol fixed this issue Assert.Inconclusive("Bol seems to have deleted all This endpoint??"); var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var result = await bolApiCaller.Offers.RequestUnpublishedOfferReport(); }
public async Task GetExport() { // Not done in test environment because it requires processing which is not supported in the test environment var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, false); var response = await bolApiCaller.Offers.GetOfferExportFile(); Assert.IsTrue(response.StartsWith("offerId,ean,conditionName,conditionCategory")); }
public async Task UpdateOfferStock() { var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var stock = new Stock(15, false); var firstOffer = openOffers.First(); var result = await bolApiCaller.Offers.UpdateOfferStock(firstOffer.OfferId.ToString(), stock); Assert.IsTrue(result.Description == "Update stock for offer with id 4ae7a221-65e7-a333-e620-3f8e1caab5c3."); }
public async Task GetReturnByRMAId() { //Remove if Bol fixed this issue Assert.Inconclusive("Bol seems to expect a different content type, however this makes no sense.."); var api = new BolApiCaller(testClientId, testClientSecret, true); var response = await api.Returns.GetReturnByRMAId(86123452); Assert.IsTrue(response.Returns[0].ReturnItems[0].Ean == "8712626055150"); }
public async Task GetRetailPricingInformationForEAN() { //Remove if Bol fixed this issue Assert.Inconclusive("Bol seems to expect a different content type, however this makes no sense.."); var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var result = await bolApiCaller.Pricing.GetRetailPricingInformationForEAN("0000007740404"); Assert.IsTrue(result.RetailPrices.Count == 2); }
public async Task SendTestPushNotification() { //Remove if Bol fixed this issue Assert.Inconclusive("Bol seems to have deleted all subscriptions??"); var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var result = await bolApiCaller.Subscriptions.SendTestPushNotification(); Assert.IsTrue(result.EventType == "SEND_SUBSCRIPTION_TST_MSG"); }
public async Task GetPushNotificationSubscriptions() { //Remove if Bol fixed this issue Assert.Inconclusive("Bol seems to have deleted all subscriptions??"); var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var result = await bolApiCaller.Subscriptions.GetPushNotificationSubscriptions(); Assert.IsTrue(result.Subscriptions[0].Id == 1234); }
public async Task GetPushNotificationSubscriptionById() { //Remove if Bol fixed this issue Assert.Inconclusive("Bol seems to have deleted all subscriptions??"); var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var result = await bolApiCaller.Subscriptions.GetPushNotificationSubscriptionById(1234); Assert.IsTrue(result.Url == "https://www.example.com/push"); }
public async Task GetPurchasableShippingLabel() { //Remove if Bol fixed this issue Assert.Inconclusive("Bol seems to expect a different content type, however this makes no sense.."); var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var response = await bolApiCaller.ShippingLabels.GetShippingLabelOrderItemId("6702312887"); Assert.IsTrue(response.PurchasableShippingLabels.Length == 3); }
public async Task DeletePushNotificationSubscription() { //Remove if Bol fixed this issue Assert.Inconclusive("Bol seems to expect a different content type, however this makes no sense.."); var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var result = await bolApiCaller.Subscriptions.DeletePushNotificationSubscription(1234); Assert.IsTrue(result.EventType == "DELETE_SUBSCRIPTION"); }
public async Task UpdatePushNotificationSubscription() { //Remove if Bol fixed this issue Assert.Inconclusive("Bol seems to have deleted all subscriptions??"); var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var notificationSubscription = new CreateNotificationSubscription(new string[] { "PROCESS_STATUS" }, "https://www.test.com/test"); var result = await bolApiCaller.Subscriptions.UpdatePushNotificationSubscription(1234, notificationSubscription); Assert.IsTrue(result.EventType == "UPDATE_SUBSCRIPTION"); }
public async Task CreatePushNotificationSubscription() { //Remove if Bol fixed this issue Assert.Inconclusive("Bol seems to expect a different content type, however this makes no sense.."); var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var notificationSubscription = new CreateNotificationSubscription(new string[] { "PROCESS_STATUS" }, "https://www.test.com/test"); var result = await bolApiCaller.Subscriptions.CreatePushNotificationSubscription(notificationSubscription); Assert.IsTrue(result.EventType == "CREATE_SUBSCRIPTION"); Assert.IsTrue(result.Status == "PENDING"); }
public async Task GetOrder() { var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var response = await bolApiCaller.Orders.GetOpenOrders(1, FulFilmentMethod.FBR); foreach (var order in response.Orders) { var orderResponse = await bolApiCaller.Orders.GetOrder(order.OrderId); Assert.IsTrue(orderResponse.OrderItems.Length > 0); } Assert.IsTrue(response.Orders.Length > 0); }
public async Task UpdateOfferPrice() { var bolApiCaller = new BolApiCaller(testClientId, testClientSecret, true); var bundlePrices = new List <BundlePrice>() { new BundlePrice(1, 6.55m) }; var pricing = new PricingContainer(bundlePrices); var firstOffer = openOffers.First(); var result = await bolApiCaller.Offers.UpdateOfferPrice(firstOffer.OfferId.ToString(), pricing); Assert.IsTrue(result.Description == "Update price for offer with id 4ae7a221-65e7-a333-e620-3f8e1caab5c3."); }