-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathUpdateAccount.cs
40 lines (32 loc) · 1.24 KB
/
UpdateAccount.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using Bunq.Sdk.Model.Generated.Endpoint;
using Tinker.Utils;
using TinkerSrc.Lib;
namespace TinkerSrc
{
public class UpdateAccount : ITinker
{
public void Run(string[] args)
{
var environmentType = ShareLib.DetermineEnvironmentType(args);
ShareLib.PrintHeader();
var bunq = new BunqLib(environmentType);
var accountId = ShareLib.GetAccountIdFromArgsOrStdIn(args);
var name = ShareLib.GetNameFromArgsOrStdIn(args);
Console.Out.WriteLine();
Console.Out.WriteLine($" | Updating Name: {name}");
Console.Out.WriteLine($" | of Account: {accountId}");
Console.Out.WriteLine();
Console.Out.WriteLine(" ...");
Console.Out.WriteLine();
MonetaryAccountBank.Update(int.Parse(accountId), name);
Console.Out.WriteLine();
Console.Out.WriteLine(" | Account updated");
Console.Out.WriteLine();
Console.Out.WriteLine(" | Check your changed overview");
Console.Out.WriteLine();
Console.Out.WriteLine();
bunq.UpdateContext();
}
}
}