From d58c2cf9511c6955b7ce8e09e5296bf9069b99fe Mon Sep 17 00:00:00 2001 From: Konstantin Yakushev Date: Fri, 22 Mar 2019 23:45:07 +0100 Subject: [PATCH] Update SDK to later version and fix sandbox URL. (#12) --- TinkerSrc/AddCallbackUrl.cs | 2 +- TinkerSrc/Lib/BunqLib.cs | 2 +- TinkerSrc/LinkCard.cs | 10 ++++++++-- TinkerSrc/TinkerSrc.csproj | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/TinkerSrc/AddCallbackUrl.cs b/TinkerSrc/AddCallbackUrl.cs index 45ac524..0416537 100644 --- a/TinkerSrc/AddCallbackUrl.cs +++ b/TinkerSrc/AddCallbackUrl.cs @@ -27,7 +27,7 @@ public void Run(string[] args) Console.Out.WriteLine(" ..."); Console.Out.WriteLine(); - if (BunqContext.UserContext.isOnlyUserCompanySet()) + if (BunqContext.UserContext.IsOnlyUserCompanySet()) { UserCompany.Update( notificationFilters: UpdateAllNotificationFilter( diff --git a/TinkerSrc/Lib/BunqLib.cs b/TinkerSrc/Lib/BunqLib.cs index cc6a987..95fa8e6 100755 --- a/TinkerSrc/Lib/BunqLib.cs +++ b/TinkerSrc/Lib/BunqLib.cs @@ -69,7 +69,7 @@ public string GetCurrentUserDisplayName() { return BunqContext.UserContext.UserPerson.DisplayName; } - else if (BunqContext.UserContext.isOnlyUserCompanySet()) + else if (BunqContext.UserContext.IsOnlyUserCompanySet()) { return BunqContext.UserContext.UserCompany.DisplayName; } diff --git a/TinkerSrc/LinkCard.cs b/TinkerSrc/LinkCard.cs index 0ca89fe..5b6ef44 100644 --- a/TinkerSrc/LinkCard.cs +++ b/TinkerSrc/LinkCard.cs @@ -1,5 +1,7 @@ using System; +using System.Collections.Generic; using Bunq.Sdk.Model.Generated.Endpoint; +using Bunq.Sdk.Model.Generated.Object; using Tinker.Utils; using TinkerSrc.Lib; @@ -24,8 +26,12 @@ public void Run(string[] args) Console.Out.WriteLine(); Console.Out.WriteLine(" ..."); Console.Out.WriteLine(); - - Card.Update(int.Parse(cardId), monetaryAccountCurrentId: int.Parse(accountId)); + + + Card.Update(int.Parse(cardId), pinCodeAssignment: new List + { + new CardPinAssignment("PRIMARY"){MonetaryAccountId = int.Parse(accountId)} + }); Console.Out.WriteLine(); Console.Out.WriteLine(" | Account switched"); diff --git a/TinkerSrc/TinkerSrc.csproj b/TinkerSrc/TinkerSrc.csproj index fa9e095..449b4ad 100755 --- a/TinkerSrc/TinkerSrc.csproj +++ b/TinkerSrc/TinkerSrc.csproj @@ -4,7 +4,7 @@ netcoreapp1.1 - + \ No newline at end of file