public void Then_The_Post_Url_Is_Correctly_Built(RevertPaymentsRequest data)
        {
            var actual = new PostRevertPaymentsRequest(data);

            actual.PostUrl.Should().Be($"revert-payments");
            actual.Data.Should().BeEquivalentTo(data);
        }
 public void GivenTheCallerWantsToRevertPayments()
 {
     _request = new PostRevertPaymentsRequest(
         new RevertPaymentsRequest
     {
         ServiceRequest = _fixture.Create <ServiceRequest>(),
         Payments       = _fixture.CreateMany <Guid>(10).ToList()
     });
 }
Exemple #3
0
        public async Task RevertPayments(RevertPaymentsRequest revertPaymentsRequest)
        {
            var postRequest = new PostRevertPaymentsRequest(revertPaymentsRequest);

            var response = await _client.PostWithResponseCode <PostRevertPaymentsRequest>(postRequest);

            if (ApiResponseErrorChecking.IsSuccessStatusCode(response.StatusCode))
            {
                return;
            }

            throw new HttpRequestContentException($"Response status code does not indicate success: {(int)response.StatusCode} ({response.StatusCode})", response.StatusCode, response.ErrorContent);
        }