Skip to content

Commit ec50a5e

Browse files
AdyenAutomationBotgcatanese
authored andcommitted
[relayedauthorizationwebhooks] Automated update from Adyen/adyen-openapi@e5eedc5
1 parent 84c5794 commit ec50a5e

9 files changed

Lines changed: 28 additions & 28 deletions

Adyen/RelayedAuthorizationWebhooks/Models/AmountAdjustment.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ private AmountAdjustmentTypeEnum(string? value)
158158
if (value == AmountAdjustmentTypeEnum.ForexMarkup)
159159
return "forexMarkup";
160160

161-
return null;
161+
return value.Value;
162162
}
163163

164164
/// <summary>
@@ -333,7 +333,7 @@ public override AmountAdjustment Read(ref Utf8JsonReader utf8JsonReader, Type ty
333333
break;
334334
case "amountAdjustmentType":
335335
string? amountAdjustmentTypeRawValue = utf8JsonReader.GetString();
336-
amountAdjustmentType = new Option<AmountAdjustment.AmountAdjustmentTypeEnum?>(AmountAdjustment.AmountAdjustmentTypeEnum.FromStringOrDefault(amountAdjustmentTypeRawValue));
336+
amountAdjustmentType = new Option<AmountAdjustment.AmountAdjustmentTypeEnum?>(AmountAdjustment.AmountAdjustmentTypeEnum.FromStringOrDefault(amountAdjustmentTypeRawValue) ?? (AmountAdjustment.AmountAdjustmentTypeEnum)amountAdjustmentTypeRawValue);
337337
break;
338338
case "basepoints":
339339
basepoints = new Option<int?>(utf8JsonReader.TokenType == JsonTokenType.Null ? (int?)null : utf8JsonReader.GetInt32());

Adyen/RelayedAuthorizationWebhooks/Models/AuthorisationDecisionResponse.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ private StatusEnum(string? value)
140140
if (value == StatusEnum.Refused)
141141
return "Refused";
142142

143-
return null;
143+
return value.Value;
144144
}
145145

146146
/// <summary>
@@ -245,7 +245,7 @@ public override AuthorisationDecisionResponse Read(ref Utf8JsonReader utf8JsonRe
245245
{
246246
case "status":
247247
string? statusRawValue = utf8JsonReader.GetString();
248-
status = new Option<AuthorisationDecisionResponse.StatusEnum?>(AuthorisationDecisionResponse.StatusEnum.FromStringOrDefault(statusRawValue));
248+
status = new Option<AuthorisationDecisionResponse.StatusEnum?>(AuthorisationDecisionResponse.StatusEnum.FromStringOrDefault(statusRawValue) ?? (AuthorisationDecisionResponse.StatusEnum)statusRawValue);
249249
break;
250250
case "refusalReason":
251251
refusalReason = new Option<string?>(utf8JsonReader.GetString()!);
@@ -260,7 +260,7 @@ public override AuthorisationDecisionResponse Read(ref Utf8JsonReader utf8JsonRe
260260
throw new ArgumentException("Property is required for class AuthorisationDecisionResponse.", nameof(status));
261261

262262
var authorisationDecisionResponse = new AuthorisationDecisionResponse();
263-
authorisationDecisionResponse.Status = status.Value!.Value;
263+
authorisationDecisionResponse.Status = status.Value!;
264264
if (refusalReason.IsSet)
265265
authorisationDecisionResponse.RefusalReason = refusalReason.Value;
266266
return authorisationDecisionResponse;

Adyen/RelayedAuthorizationWebhooks/Models/Card.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ private FormFactorEnum(string? value)
149149
if (value == FormFactorEnum.Virtual)
150150
return "virtual";
151151

152-
return null;
152+
return value.Value;
153153
}
154154

155155
/// <summary>
@@ -430,7 +430,7 @@ public override Card Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert,
430430
break;
431431
case "formFactor":
432432
string? formFactorRawValue = utf8JsonReader.GetString();
433-
formFactor = new Option<Card.FormFactorEnum?>(Card.FormFactorEnum.FromStringOrDefault(formFactorRawValue));
433+
formFactor = new Option<Card.FormFactorEnum?>(Card.FormFactorEnum.FromStringOrDefault(formFactorRawValue) ?? (Card.FormFactorEnum)formFactorRawValue);
434434
break;
435435
case "authentication":
436436
authentication = new Option<Authentication?>(JsonSerializer.Deserialize<Authentication>(ref utf8JsonReader, jsonSerializerOptions)!);
@@ -484,7 +484,7 @@ public override Card Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert,
484484
card.Brand = brand.Value!;
485485
card.BrandVariant = brandVariant.Value!;
486486
card.CardholderName = cardholderName.Value!;
487-
card.FormFactor = formFactor.Value!.Value;
487+
card.FormFactor = formFactor.Value!;
488488
if (authentication.IsSet)
489489
card.Authentication = authentication.Value;
490490
if (bin.IsSet)

Adyen/RelayedAuthorizationWebhooks/Models/IbanAccountIdentification.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private TypeEnum(string? value)
131131
if (value == TypeEnum.Iban)
132132
return "iban";
133133

134-
return null;
134+
return value.Value;
135135
}
136136

137137
/// <summary>
@@ -251,7 +251,7 @@ public override IbanAccountIdentification Read(ref Utf8JsonReader utf8JsonReader
251251
break;
252252
case "type":
253253
string? typeRawValue = utf8JsonReader.GetString();
254-
type = new Option<IbanAccountIdentification.TypeEnum?>(IbanAccountIdentification.TypeEnum.FromStringOrDefault(typeRawValue));
254+
type = new Option<IbanAccountIdentification.TypeEnum?>(IbanAccountIdentification.TypeEnum.FromStringOrDefault(typeRawValue) ?? (IbanAccountIdentification.TypeEnum)typeRawValue);
255255
break;
256256
default:
257257
break;
@@ -269,7 +269,7 @@ public override IbanAccountIdentification Read(ref Utf8JsonReader utf8JsonReader
269269
ibanAccountIdentification.Iban = iban.Value!;
270270
if (bic.IsSet)
271271
ibanAccountIdentification.Bic = bic.Value;
272-
ibanAccountIdentification.Type = type.Value!.Value;
272+
ibanAccountIdentification.Type = type.Value!;
273273
return ibanAccountIdentification;
274274
}
275275

Adyen/RelayedAuthorizationWebhooks/Models/PaymentInstrument.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ private TypeEnum(string? value)
140140
if (value == TypeEnum.Card)
141141
return "card";
142142

143-
return null;
143+
return value.Value;
144144
}
145145

146146
/// <summary>
@@ -288,7 +288,7 @@ private StatusEnum(string? value)
288288
if (value == StatusEnum.Suspended)
289289
return "suspended";
290290

291-
return null;
291+
return value.Value;
292292
}
293293

294294
/// <summary>
@@ -488,7 +488,7 @@ private StatusReasonEnum(string? value)
488488
if (value == StatusReasonEnum.TransactionRule)
489489
return "transactionRule";
490490

491-
return null;
491+
return value.Value;
492492
}
493493

494494
/// <summary>
@@ -768,7 +768,7 @@ public override PaymentInstrument Read(ref Utf8JsonReader utf8JsonReader, Type t
768768
break;
769769
case "type":
770770
string? typeRawValue = utf8JsonReader.GetString();
771-
type = new Option<PaymentInstrument.TypeEnum?>(PaymentInstrument.TypeEnum.FromStringOrDefault(typeRawValue));
771+
type = new Option<PaymentInstrument.TypeEnum?>(PaymentInstrument.TypeEnum.FromStringOrDefault(typeRawValue) ?? (PaymentInstrument.TypeEnum)typeRawValue);
772772
break;
773773
case "additionalBankAccountIdentifications":
774774
additionalBankAccountIdentifications = new Option<List<PaymentInstrumentAdditionalBankAccountIdentificationsInner>?>(JsonSerializer.Deserialize<List<PaymentInstrumentAdditionalBankAccountIdentificationsInner>>(ref utf8JsonReader, jsonSerializerOptions)!);
@@ -796,14 +796,14 @@ public override PaymentInstrument Read(ref Utf8JsonReader utf8JsonReader, Type t
796796
break;
797797
case "status":
798798
string? statusRawValue = utf8JsonReader.GetString();
799-
status = new Option<PaymentInstrument.StatusEnum?>(PaymentInstrument.StatusEnum.FromStringOrDefault(statusRawValue));
799+
status = new Option<PaymentInstrument.StatusEnum?>(PaymentInstrument.StatusEnum.FromStringOrDefault(statusRawValue) ?? (PaymentInstrument.StatusEnum)statusRawValue);
800800
break;
801801
case "statusComment":
802802
statusComment = new Option<string?>(utf8JsonReader.GetString()!);
803803
break;
804804
case "statusReason":
805805
string? statusReasonRawValue = utf8JsonReader.GetString();
806-
statusReason = new Option<PaymentInstrument.StatusReasonEnum?>(PaymentInstrument.StatusReasonEnum.FromStringOrDefault(statusReasonRawValue));
806+
statusReason = new Option<PaymentInstrument.StatusReasonEnum?>(PaymentInstrument.StatusReasonEnum.FromStringOrDefault(statusReasonRawValue) ?? (PaymentInstrument.StatusReasonEnum)statusReasonRawValue);
807807
break;
808808
default:
809809
break;
@@ -827,7 +827,7 @@ public override PaymentInstrument Read(ref Utf8JsonReader utf8JsonReader, Type t
827827
paymentInstrument.BalanceAccountId = balanceAccountId.Value!;
828828
paymentInstrument.Id = id.Value!;
829829
paymentInstrument.IssuingCountryCode = issuingCountryCode.Value!;
830-
paymentInstrument.Type = type.Value!.Value;
830+
paymentInstrument.Type = type.Value!;
831831
if (additionalBankAccountIdentifications.IsSet)
832832
paymentInstrument.AdditionalBankAccountIdentifications = additionalBankAccountIdentifications.Value;
833833
if (bankAccount.IsSet)

Adyen/RelayedAuthorizationWebhooks/Models/PaymentInstrumentAdditionalBankAccountIdentificationsInner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public override PaymentInstrumentAdditionalBankAccountIdentificationsInner Read(
127127
}
128128
}
129129

130-
if (ibanAccountIdentification?.Type != null)
130+
if (ibanAccountIdentification?.Type != null && IbanAccountIdentification.TypeEnum.FromStringOrDefault((string?)ibanAccountIdentification.Type) != null)
131131
return new PaymentInstrumentAdditionalBankAccountIdentificationsInner(ibanAccountIdentification);
132132

133133
throw new JsonException();

Adyen/RelayedAuthorizationWebhooks/Models/Phone.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ private TypeEnum(string? value)
140140
if (value == TypeEnum.Mobile)
141141
return "mobile";
142142

143-
return null;
143+
return value.Value;
144144
}
145145

146146
/// <summary>
@@ -241,7 +241,7 @@ public override Phone Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert
241241
break;
242242
case "type":
243243
string? typeRawValue = utf8JsonReader.GetString();
244-
type = new Option<Phone.TypeEnum?>(Phone.TypeEnum.FromStringOrDefault(typeRawValue));
244+
type = new Option<Phone.TypeEnum?>(Phone.TypeEnum.FromStringOrDefault(typeRawValue) ?? (Phone.TypeEnum)typeRawValue);
245245
break;
246246
default:
247247
break;
@@ -257,7 +257,7 @@ public override Phone Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert
257257

258258
var phone = new Phone();
259259
phone.Number = number.Value!;
260-
phone.Type = type.Value!.Value;
260+
phone.Type = type.Value!;
261261
return phone;
262262
}
263263

Adyen/RelayedAuthorizationWebhooks/Models/RelayedAuthorisationRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private TypeEnum(string? value)
131131
if (value == TypeEnum.BalancePlatformAuthorisationRelayed)
132132
return "balancePlatform.authorisation.relayed";
133133

134-
return null;
134+
return value.Value;
135135
}
136136

137137
/// <summary>
@@ -671,7 +671,7 @@ public override RelayedAuthorisationRequest Read(ref Utf8JsonReader utf8JsonRead
671671
break;
672672
case "type":
673673
string? typeRawValue = utf8JsonReader.GetString();
674-
type = new Option<RelayedAuthorisationRequest.TypeEnum?>(RelayedAuthorisationRequest.TypeEnum.FromStringOrDefault(typeRawValue));
674+
type = new Option<RelayedAuthorisationRequest.TypeEnum?>(RelayedAuthorisationRequest.TypeEnum.FromStringOrDefault(typeRawValue) ?? (RelayedAuthorisationRequest.TypeEnum)typeRawValue);
675675
break;
676676
case "validationResult":
677677
validationResult = new Option<List<ValidationResult>?>(JsonSerializer.Deserialize<List<ValidationResult>>(ref utf8JsonReader, jsonSerializerOptions)!);
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"service": "relayedauthorizationwebhooks",
33
"project": "dotnet",
4-
"generatedAt": "2026-05-12T08:05:57Z",
5-
"openapiCommitSha": "c17deb734dee105f2d25e50825bed55fdbd71c50",
6-
"automationCommitSha": "0b7ef4e0ed6a7963ab005efe76eab748250edafc",
7-
"libraryCommitSha": "ed5b5b7be2fa4a88becfee9716bba894bdfe61b6"
4+
"generatedAt": "2026-05-21T12:55:19Z",
5+
"openapiCommitSha": "e5eedc5cba69416331333d4b0e90cb4871715517",
6+
"automationCommitSha": "6f06b47d0661f0891defe6b85461d2c367fbd284",
7+
"libraryCommitSha": "73a83cb23fb8e432b81d23291bd9be4e7fcc0d2f"
88
}

0 commit comments

Comments
 (0)