Skip to content

Commit 293727b

Browse files
author
Kevin Hellemun
committed
Implemeted missing methods in core models. (#43)
1 parent 268a7e4 commit 293727b

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

BunqSdk/Model/Core/Installation.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,25 @@ public string GetPublicKeyServerString()
6565
{
6666
return publicKeyServer.ServerPublicKey;
6767
}
68+
69+
public override bool AreAllFieldNull()
70+
{
71+
if (this.SessionToken != null)
72+
{
73+
return false;
74+
}
75+
76+
if (this.id != null)
77+
{
78+
return false;
79+
}
80+
81+
if (this.publicKeyServer != null)
82+
{
83+
return false;
84+
}
85+
86+
return true;
87+
}
6888
}
6989
}

BunqSdk/Model/Core/SessionServer.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,30 @@ private static byte[] GenerateRequestBodyBytes(string apiKey)
6161

6262
return Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(sessionServerRequestBody));
6363
}
64+
65+
public override bool AreAllFieldNull()
66+
{
67+
if (this.Id != null)
68+
{
69+
return false;
70+
}
71+
72+
if (this.SessionToken != null)
73+
{
74+
return false;
75+
}
76+
77+
if (this.UserCompany != null)
78+
{
79+
return false;
80+
}
81+
82+
if (this.UserPerson != null)
83+
{
84+
return false;
85+
}
86+
87+
return true;
88+
}
6489
}
6590
}

0 commit comments

Comments
 (0)