Skip to content

Commit f2a6336

Browse files
authored
Add DD mandate ID to payreq evt model. Fix bug where jsonproperty was being used instead of jsonignore. (#436)
1 parent 95a0639 commit f2a6336

File tree

7 files changed

+25
-21
lines changed

7 files changed

+25
-21
lines changed

src/NoFrixion.MoneyMoov/Models/Mandates/Mandate.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public class Mandate
119119
/// used to do a balance check on the payer's account. We don't currenlty support the AIS workflow.
120120
/// </summary>
121121
[System.Text.Json.Serialization.JsonIgnore]
122-
[Newtonsoft.Json.JsonProperty]
122+
[Newtonsoft.Json.JsonIgnore]
123123
public decimal Amount { get; set; }
124124

125125
/// <summary>

src/NoFrixion.MoneyMoov/Models/Mandates/MandateCreate.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ public class MandateCreate
127127
/// This is an optional field that with mandates created via Account Information Services can be
128128
/// used to do a balance check on the payer's account. We don't currenlty support the AIS workflow.
129129
/// </summary>
130-
[System.Text.Json.Serialization.JsonIgnore]
131-
[Newtonsoft.Json.JsonProperty]
130+
[System.Text.Json.Serialization.JsonIgnore]
131+
[Newtonsoft.Json.JsonIgnore]
132132
public decimal Amount { get; set; }
133133

134134
/// <summary>

src/NoFrixion.MoneyMoov/Models/PaymentRequests/PaymentRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public PaymentMethodTypeEnum PaymentMethodTypes
236236
public string? CardStripePaymentIntentSecret { get; set; }
237237

238238
[System.Text.Json.Serialization.JsonIgnore]
239-
[Newtonsoft.Json.JsonProperty]
239+
[Newtonsoft.Json.JsonIgnore]
240240
public Merchant? Merchant { get; set; }
241241

242242
public List<PaymentRequestAddress> Addresses { get; set; } = new List<PaymentRequestAddress>();
@@ -287,7 +287,7 @@ public PaymentMethodTypeEnum PaymentMethodTypes
287287
/// </summary>
288288
/// <returns>The billing address or null if it's not set.</returns>
289289
[System.Text.Json.Serialization.JsonIgnore]
290-
[Newtonsoft.Json.JsonProperty]
290+
[Newtonsoft.Json.JsonIgnore]
291291
public PaymentRequestAddress? BillingAddress =>
292292
Addresses?.Where(x => x.AddressType == AddressTypesEnum.Billing).FirstOrDefault();
293293

src/NoFrixion.MoneyMoov/Models/PaymentRequests/PaymentRequestCreate.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,15 +308,15 @@ public string? OriginUrl
308308
public string? CustomerEmailAddress { get; set; }
309309

310310
[System.Text.Json.Serialization.JsonIgnore]
311-
[Newtonsoft.Json.JsonProperty]
311+
[Newtonsoft.Json.JsonIgnore]
312312
public PaymentProcessorsEnum PaymentProcessor { get; set; }
313313

314314
[System.Text.Json.Serialization.JsonIgnore]
315-
[Newtonsoft.Json.JsonProperty]
315+
[Newtonsoft.Json.JsonIgnore]
316316
public string? LightningInvoice { get; set; }
317317

318318
[System.Text.Json.Serialization.JsonIgnore]
319-
[Newtonsoft.Json.JsonProperty]
319+
[Newtonsoft.Json.JsonIgnore]
320320
public DateTimeOffset? LightningInvoiceExpiresAt { get; set; }
321321

322322
[EmailAddressMultiple(ErrorMessage = PaymentRequestConstants.NOTIFICATION_EMAIL_ADDRESSES_ERROR_MESSAGE)]

src/NoFrixion.MoneyMoov/Models/PaymentRequests/PaymentRequestEvent.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
// MIT.
1818
//-----------------------------------------------------------------------------
1919

20-
using System.Text.Json.Serialization;
2120
using System.ComponentModel.DataAnnotations;
2221

2322
namespace NoFrixion.MoneyMoov.Models;
@@ -44,11 +43,11 @@ public class PaymentRequestEvent
4443
public string? ErrorMessage { get; set; }
4544

4645
[System.Text.Json.Serialization.JsonIgnore]
47-
[Newtonsoft.Json.JsonProperty]
46+
[Newtonsoft.Json.JsonIgnore]
4847
public string? RawResponse { get; set; }
4948

5049
[System.Text.Json.Serialization.JsonIgnore]
51-
[Newtonsoft.Json.JsonProperty]
50+
[Newtonsoft.Json.JsonIgnore]
5251
public string? RawResponseHash { get; set; }
5352

5453
public string? CardRequestID { get; set; }
@@ -101,7 +100,7 @@ public class PaymentRequestEvent
101100
/// between submitting and finalising a payment initiation attempt.
102101
/// </summary>
103102
[System.Text.Json.Serialization.JsonIgnore]
104-
[Newtonsoft.Json.JsonProperty]
103+
[Newtonsoft.Json.JsonIgnore]
105104
public string? PispToken { get; set; }
106105

107106
/// <summary>
@@ -139,7 +138,7 @@ public class PaymentRequestEvent
139138
/// of the tokenised card record that can be used with the pay with card token method.
140139
/// </summary>
141140
[System.Text.Json.Serialization.JsonIgnore]
142-
[Newtonsoft.Json.JsonProperty]
141+
[Newtonsoft.Json.JsonIgnore]
143142
public Guid? TokenisedCardID { get; set; }
144143

145144
/// <summary>
@@ -164,6 +163,11 @@ public class PaymentRequestEvent
164163
/// </summary>
165164
public string? DirectDebitPaymentReference { get; set; }
166165

166+
/// <summary>
167+
/// The ID of the mandate that was used wehn requesting payment.
168+
/// </summary>
169+
public Guid? DrirectDebitMandateID { get; set; }
170+
167171
/// <summary>
168172
/// Gets the amount to display with the correct number of decimal places based on the currency type.
169173
/// </summary>

src/NoFrixion.MoneyMoov/Models/Payouts/Payout.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public class Payout : IValidatableObject, IWebhookPayload
102102

103103
[Obsolete("Please use Destination.")]
104104
[System.Text.Json.Serialization.JsonIgnore]
105-
[Newtonsoft.Json.JsonProperty]
105+
[Newtonsoft.Json.JsonIgnore]
106106
public Guid? DestinationAccountID
107107
{
108108
get => Destination?.AccountID;
@@ -115,7 +115,7 @@ public Guid? DestinationAccountID
115115

116116
[Obsolete("Please use Destination.")]
117117
[System.Text.Json.Serialization.JsonIgnore]
118-
[Newtonsoft.Json.JsonProperty]
118+
[Newtonsoft.Json.JsonIgnore]
119119
public string? DestinationIBAN
120120
{
121121
get => Destination?.Identifier?.IBAN;
@@ -129,7 +129,7 @@ public string? DestinationIBAN
129129

130130
[Obsolete("Please use Destination.")]
131131
[System.Text.Json.Serialization.JsonIgnore]
132-
[Newtonsoft.Json.JsonProperty]
132+
[Newtonsoft.Json.JsonIgnore]
133133
public string? DestinationAccountNumber
134134
{
135135
get => Destination?.Identifier?.AccountNumber;
@@ -143,7 +143,7 @@ public string? DestinationAccountNumber
143143

144144
[Obsolete("Please use Destination.")]
145145
[System.Text.Json.Serialization.JsonIgnore]
146-
[Newtonsoft.Json.JsonProperty]
146+
[Newtonsoft.Json.JsonIgnore]
147147
public string? DestinationSortCode
148148
{
149149
get => Destination?.Identifier?.SortCode;
@@ -157,7 +157,7 @@ public string? DestinationSortCode
157157

158158
[Obsolete("Please use Destination.")]
159159
[System.Text.Json.Serialization.JsonIgnore]
160-
[Newtonsoft.Json.JsonProperty]
160+
[Newtonsoft.Json.JsonIgnore]
161161
public string? DestinationAccountName
162162
{
163163
get => Destination?.Name;
@@ -265,7 +265,7 @@ public AccountIdentifier? SourceAccountIdentifier
265265

266266
[Obsolete("Please use Destination.")]
267267
[System.Text.Json.Serialization.JsonIgnore]
268-
[Newtonsoft.Json.JsonProperty]
268+
[Newtonsoft.Json.JsonIgnore]
269269
public Counterparty? DestinationAccount
270270
{
271271
get => Destination;

src/NoFrixion.MoneyMoov/NoFrixionProblem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,12 @@ public static NoFrixionProblem Empty
212212
/// unknown, on non-JSON, format.
213213
/// </summary>
214214
[System.Text.Json.Serialization.JsonIgnore]
215-
[Newtonsoft.Json.JsonProperty]
215+
[Newtonsoft.Json.JsonIgnore]
216216
[IgnoreDataMember]
217217
public string RawError { get; set; } = string.Empty;
218218

219219
[System.Text.Json.Serialization.JsonIgnore]
220-
[Newtonsoft.Json.JsonProperty]
220+
[Newtonsoft.Json.JsonIgnore]
221221
[IgnoreDataMember]
222222
public bool IsEmpty => _isEmpty;
223223

0 commit comments

Comments
 (0)