Beispiel #1
0
        /// <summary>
        /// Gets a paginated list of all open orders sorted by date in descending order.
        /// </summary>
        /// <param name="page">The requested page number with a pagesize of 50</param>
        /// <param name="fulFilmentType">The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB).</param>
        /// <returns></returns>
        public async Task <OrdersResponse> GetOpenOrders(int page = 1, FulFilmentMethod fulFilmentType = FulFilmentMethod.FBR)
        {
            var queryParameters = new Dictionary <string, string>
            {
                { "page", page.ToString() },
                { "fulfilment-method", fulFilmentType.ToString() }
            };
            var response = await Get("/orders", queryParameters).ConfigureAwait(false);

            return(await BolApiHelper.GetContentFromResponse <OrdersResponse>(response).ConfigureAwait(false));
        }
Beispiel #2
0
        /// <summary>
        /// Get a paginated list of all returns, which are sorted by date in descending order.
        /// </summary>
        /// <param name="page">The requested page number with a pagesize of 50</param>
        /// <param name="handled">The status of the returns you wish to see, shows either handled or unhandled returns.</param>
        /// <param name="fulfilmentMethod">The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB).</param>
        /// <returns></returns>
        public async Task <ReturnsResponse> GetReturns(int page = 1, bool handled = false, FulFilmentMethod fulfilmentMethod = FulFilmentMethod.FBR)
        {
            var queryParameters = new Dictionary <string, string>()
            {
                { "page", page.ToString() },
                { "handled", handled.ToString() },
                { "fulfilment-method", fulfilmentMethod.ToString() },
            };
            var response = await Get($"/returns", queryParameters).ConfigureAwait(false);

            return(await BolApiHelper.GetContentFromResponse <ReturnsResponse>(response).ConfigureAwait(false));
        }
 public SmallFulfilment(FulFilmentMethod fulFilmentMethod = FulFilmentMethod.FBR)
 {
     Method = fulFilmentMethod.ToString();
 }
Beispiel #4
0
        /// <summary>
        /// A paginated list to retrieve all your shipments up to 3 months old. The shipments will be sorted by date in descending order.
        /// </summary>
        /// <param name="orderId">The page to get with a page size of 50.</param>
        /// <param name="page">The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by bol.com (FBB).</param>
        /// <param name="fulFilmentType">The id of the order. Only valid without fulfilment-method. The default fulfilment-method is ignored.</param>
        /// <returns></returns>
        public async Task <ShipmentsContainer> GetShipmentList(int page = 1, string orderId = "", FulFilmentMethod fulFilmentType = FulFilmentMethod.FBR)
        {
            var queryParameters = new Dictionary <string, string>
            {
                { "page", page.ToString() },
                { "fulfilment-method", fulFilmentType.ToString() },
                { "order-id", orderId }
            };
            var response = await Get($"/shipments", queryParameters).ConfigureAwait(false);

            return(await BolApiHelper.GetContentFromResponse <ShipmentsContainer>(response).ConfigureAwait(false));
        }