chore: moves to ExpandoObject for updating entities because not all properties need to be part of the payload

This commit is contained in:
Matthias Langhard
2021-06-15 11:48:04 +02:00
parent e63d357d36
commit 51f464bad0
10 changed files with 30 additions and 11 deletions

View File

@@ -1,3 +1,4 @@
using System.Dynamic;
using System.Linq;
using Novaloop.PaymoApi.Clients;
using Novaloop.PaymoApi.Clients.Models;
@@ -84,7 +85,8 @@ namespace Novaloop.PaymoApi.Tests
{
// Arrange
var createdClient = await _clientsApi.CreateClient(_testClient);
var clientUpdateInfo = new Client {Name = "Updated"};
dynamic clientUpdateInfo = new ExpandoObject();
clientUpdateInfo.Name = "Updated";
// Act
await _clientsApi.UpdateClient(clientUpdateInfo, createdClient.Id);