public async Task <CreateFulfillmentResponse> DeleteFulfillmentPolicy(CreateFulfillmentRequest createFulfillmentRequest) { var body = JsonConvert.SerializeObject(createFulfillmentRequest.marketplaceId); RestHelper helper = new RestHelper(_deletionurlbyId); var response = await helper.Delete(body); CreateFulfillmentResponse createFulfillmentResponse = JsonConvert.DeserializeObject <CreateFulfillmentResponse>(response); return(createFulfillmentResponse); }
public async Task <CreateFulfillmentResponse> CreateFulfillmentPolicy(CreateFulfillmentRequest createFulfillmentRequest) { var body = JsonConvert.SerializeObject(createFulfillmentRequest); RestHelper helper = new RestHelper(_url); var response = await helper.Post(body); CreateFulfillmentResponse createFulfillmentResponse = JsonConvert.DeserializeObject <CreateFulfillmentResponse>(response); return(createFulfillmentResponse); }
public void DeleteFulfillmentPolicyTest() { AccountService accountService = new AccountService(); CreateFulfillmentRequest createFulfillmentRequest = new CreateFulfillmentRequest(); createFulfillmentRequest.categoryTypes = new CategoryType[] { new CategoryType() { name = CategoryTypeEnum.ALL_EXCLUDING_MOTORS_VEHICLES } }; createFulfillmentRequest.marketplaceId = MarketplaceIdEnum.EBAY_US; createFulfillmentRequest.name = "Domestic free shipping"; createFulfillmentRequest.handlingTime = new TimeDuration() { value = "1", unit = TimeDurationUnitEnum.DAY }; createFulfillmentRequest.shippingOptions = new ShippingOption[] { new ShippingOption() { costType = ShippingCostTypeEnum.FLAT_RATE, optionType = ShippingOptionTypeEnum.DOMESTIC, shippingServices = new ShippingService[] { new ShippingService() { buyerResponsibleForShipping = "false", freeShipping = "true", shippingCarrierCode = "USPS", shippingServiceCode = "USPSPriorityFlatRateBox" } } } }; var response = accountService.FulfilmentPolicyService.CreateFulfillmentPolicy(createFulfillmentRequest).Result; Assert.IsNotNull(response); // Assert.AreEqual(response.,); }