diff --git a/src/NoFrixion.MoneyMoov/Enums/BeneficiaryEventTypeEnum.cs b/src/NoFrixion.MoneyMoov/Enums/BeneficiaryEventTypeEnum.cs index 8d86123e..64244bdf 100644 --- a/src/NoFrixion.MoneyMoov/Enums/BeneficiaryEventTypeEnum.cs +++ b/src/NoFrixion.MoneyMoov/Enums/BeneficiaryEventTypeEnum.cs @@ -19,5 +19,6 @@ namespace NoFrixion.MoneyMoov.Enums; public enum BeneficiaryEventTypeEnum { Authorise, - Update + Update, + Disable } \ No newline at end of file diff --git a/src/NoFrixion.MoneyMoov/Enums/PayoutEventTypesEnum.cs b/src/NoFrixion.MoneyMoov/Enums/PayoutEventTypesEnum.cs index 21739979..d720ad0b 100644 --- a/src/NoFrixion.MoneyMoov/Enums/PayoutEventTypesEnum.cs +++ b/src/NoFrixion.MoneyMoov/Enums/PayoutEventTypesEnum.cs @@ -67,5 +67,10 @@ public enum PayoutEventTypesEnum /// A payout's associated beneficiary was updated. /// BeneficiaryUpdated = 9, + + /// + /// A payout's associated beneficiary was disabled. + /// + BeneficiaryDisabled = 10, } } diff --git a/src/NoFrixion.MoneyMoov/Models/Beneficiary/Beneficiary.cs b/src/NoFrixion.MoneyMoov/Models/Beneficiary/Beneficiary.cs index bf357ace..b713e108 100644 --- a/src/NoFrixion.MoneyMoov/Models/Beneficiary/Beneficiary.cs +++ b/src/NoFrixion.MoneyMoov/Models/Beneficiary/Beneficiary.cs @@ -56,6 +56,8 @@ public class Beneficiary : IValidatableObject public string ApprovalCallbackUrl { get; set; } public bool IsEnabled { get; set; } + + public DateTimeOffset LastUpdated { get; set; } // Don't serialize the events if there are none. [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] @@ -74,11 +76,12 @@ public bool ShouldSerializeBeneficiaryEvents() public string GetApprovalHash() { var input = - MerchantID + (AccountID != null && AccountID != Guid.Empty + Name + MerchantID + (AccountID != null && AccountID != Guid.Empty ? AccountID.ToString() : string.Empty) + Currency + - Destination.GetApprovalHash(); + Destination.GetApprovalHash() + + LastUpdated.ToString("o"); return HashHelper.CreateHash(input); }