public async void CallsUpdatePricing() { // Arrange var paypalRestApiClientMock = new Mock <IPaypalRestApiClient>(); var sut = new BillingPlanApi(paypalRestApiClientMock.Object); string expectedPlanId = "expected-plan-id"; var expectedPricingUpdateRequest = new PlanUpdatePricingRequest(); string expectedUrl = $"{ExpectedApiUrl}/{expectedPlanId}/update-pricing-schemes"; // Act await sut.UpdatePricingAsync(expectedPlanId, expectedPricingUpdateRequest); // Assert paypalRestApiClientMock.Verify(x => x.Post(expectedPricingUpdateRequest, It.Is <string>(url => url.Equals(expectedUrl, StringComparison.InvariantCultureIgnoreCase)))); }
/// <summary> /// Updates pricing for a plan. For example, you can update a regular billing cycle from $5 per month to $7 per month. /// </summary> /// <param name="planId">The ID for the plan.</param> /// <param name="planUpdatePricingRequest">Request object.</param> /// <returns>A task object representing asynchronous operation.</returns> public async Task UpdatePricingAsync(string planId, PlanUpdatePricingRequest planUpdatePricingRequest) { await _paypalRestApiClient.Post(planUpdatePricingRequest, $"{ApiUrl}/{planId}/update-pricing-schemes"); }