diff --git a/MangoPay.SDK.Tests/ApiInstantConversionTest.cs b/MangoPay.SDK.Tests/ApiInstantConversionTest.cs index 3364906..3c8e149 100644 --- a/MangoPay.SDK.Tests/ApiInstantConversionTest.cs +++ b/MangoPay.SDK.Tests/ApiInstantConversionTest.cs @@ -29,6 +29,7 @@ public async Task Test_CreateInstantConversion() Assert.IsNotNull(createdInstantConversion); Assert.IsNotNull(createdInstantConversion.CreditedFunds.Amount); Assert.IsNotNull(createdInstantConversion.DebitedFunds.Amount); + Assert.IsNotNull(createdInstantConversion.Fees); Assert.AreEqual(createdInstantConversion.Status, TransactionStatus.SUCCEEDED); Assert.AreEqual(createdInstantConversion.Type, TransactionType.CONVERSION); } @@ -42,6 +43,7 @@ public async Task Test_GetInstantConversion() Assert.IsNotNull(returnedInstantConversion); Assert.IsNotNull(returnedInstantConversion.CreditedFunds.Amount); Assert.IsNotNull(returnedInstantConversion.DebitedFunds.Amount); + Assert.IsNotNull(returnedInstantConversion.Fees); Assert.AreEqual(returnedInstantConversion.Status, TransactionStatus.SUCCEEDED); Assert.AreEqual(returnedInstantConversion.Type, TransactionType.CONVERSION); } @@ -61,6 +63,7 @@ private async Task CreateInstantConversion() creditedWallet.Id, new Money { Amount = 30, Currency = CurrencyIso.EUR }, new Money { Currency = CurrencyIso.GBP }, + new Money { Amount = 9, Currency = CurrencyIso.EUR}, "create instant conversion" ); diff --git a/MangoPay.SDK/Entities/GET/InstantConversionDTO.cs b/MangoPay.SDK/Entities/GET/InstantConversionDTO.cs index 72f7d48..cd492fa 100644 --- a/MangoPay.SDK/Entities/GET/InstantConversionDTO.cs +++ b/MangoPay.SDK/Entities/GET/InstantConversionDTO.cs @@ -50,5 +50,10 @@ public class InstantConversionDTO: EntityBase /// The statuses CREATED and FAILED return an ExecutionDate of null [JsonConverter(typeof(Core.UnixDateTimeConverter))] public DateTime ExecutionDate { get; set; } + + + /// Information about the fees taken by the platform for + /// this transaction (and hence transferred to the Fees Wallet). + public Money Fees { get; set; } } } \ No newline at end of file diff --git a/MangoPay.SDK/Entities/POST/InstantConversionPostDTO.cs b/MangoPay.SDK/Entities/POST/InstantConversionPostDTO.cs index 5dccc47..6ddfb97 100644 --- a/MangoPay.SDK/Entities/POST/InstantConversionPostDTO.cs +++ b/MangoPay.SDK/Entities/POST/InstantConversionPostDTO.cs @@ -4,7 +4,7 @@ public class InstantConversionPostDTO: EntityPostBase { public InstantConversionPostDTO(string authorId, string debitedWalletId, string creditedWalletId, - Money debitedFunds, Money creditedFunds, + Money debitedFunds, Money creditedFunds, Money fees, string tag = null) { AuthorId = authorId; @@ -12,6 +12,7 @@ public InstantConversionPostDTO(string authorId, string debitedWalletId, string CreditedWalletId = creditedWalletId; DebitedFunds = debitedFunds; CreditedFunds = creditedFunds; + Fees = fees; Tag = tag; } @@ -29,5 +30,9 @@ public InstantConversionPostDTO(string authorId, string debitedWalletId, string /// The buy funds public Money CreditedFunds { get; set; } + + /// Information about the fees taken by the platform for + /// this transaction (and hence transferred to the Fees Wallet). + public Money Fees { get; set; } } } \ No newline at end of file