Skip to content

Commit 0611f3b

Browse files
author
Kevin Hellemun
committed
Renamed areAllFieldNull to isAllFieldNull(). (#46)
1 parent a5efc63 commit 0611f3b

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

BunqSdk.Tests/Model/Generated/Object/NotificationUrlTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private void ExecuteNotificationUrlTest(
6666
Type subClassTypeExpected = null
6767
) {
6868
var jsonString = ReadJsonFromFile(expectedJsonFileName);
69-
var notificationUrl = BunqModel.CreateFromJsonString<NotificationUrl>(jsonString);
69+
var notificationUrl = NotificationUrl.CreateFromJsonString(jsonString);
7070

7171
Assert.NotNull(notificationUrl);
7272
Assert.NotNull(notificationUrl.Object);

BunqSdk/Json/AnchorObjectConverter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
3333
JToken token = JObject.Load(reader);
3434
var model = (IAnchorObjectInterface) jsonSerializer.Deserialize(token.CreateReader(), objectType);
3535

36-
if (!model.AreAllFieldNull()) return model;
36+
if (!model.IsAllFieldNull()) return model;
3737
var fields = objectType.GetProperties();
3838

3939
foreach (var field in fields)
@@ -47,7 +47,7 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
4747

4848
var fieldContent = (BunqModel) jsonSerializer.Deserialize(token.CreateReader(), fieldType);
4949

50-
field.SetValue(model, fieldContent.AreAllFieldNull() ? null : fieldContent);
50+
field.SetValue(model, fieldContent.IsAllFieldNull() ? null : fieldContent);
5151
}
5252

5353
return model;

BunqSdk/Model/Core/AnchorObjectInterface.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
public interface IAnchorObjectInterface
44
{
5-
bool AreAllFieldNull();
5+
bool IsAllFieldNull();
66

77
BunqModel GetReferencedObject();
88
}

BunqSdk/Model/Core/BunqModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,6 @@ public override string ToString()
147147
return BunqJsonConvert.SerializeObject(this);
148148
}
149149

150-
public abstract bool AreAllFieldNull();
150+
public abstract bool IsAllFieldNull();
151151
}
152152
}

BunqSdk/Model/Core/Installation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public string GetPublicKeyServerString()
6666
return publicKeyServer.ServerPublicKey;
6767
}
6868

69-
public override bool AreAllFieldNull()
69+
public override bool IsAllFieldNull()
7070
{
7171
if (this.SessionToken != null)
7272
{

BunqSdk/Model/Core/SessionServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private static byte[] GenerateRequestBodyBytes(string apiKey)
6262
return Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(sessionServerRequestBody));
6363
}
6464

65-
public override bool AreAllFieldNull()
65+
public override bool IsAllFieldNull()
6666
{
6767
if (this.Id != null)
6868
{

0 commit comments

Comments
 (0)