Skip to content

Commit 99d141e

Browse files
authored
Merge pull request #152 from bunq/1.15.2
1.15.2
2 parents 4c4292c + 5b7b601 commit 99d141e

File tree

2 files changed

+289
-0
lines changed

2 files changed

+289
-0
lines changed

BunqSdk/Model/Generated/Endpoint/MonetaryAccount.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ public class MonetaryAccount : BunqModel, IAnchorObjectInterface
5454
[JsonProperty(PropertyName = "MonetaryAccountSavings")]
5555
public MonetaryAccountSavings MonetaryAccountSavings { get; set; }
5656

57+
/// <summary>
58+
/// </summary>
59+
[JsonProperty(PropertyName = "MonetaryAccountExternal")]
60+
public MonetaryAccountExternal MonetaryAccountExternal { get; set; }
61+
5762

5863
/// <summary>
5964
/// Get a specific MonetaryAccount.
@@ -107,6 +112,11 @@ public BunqModel GetReferencedObject()
107112
return this.MonetaryAccountSavings;
108113
}
109114

115+
if (this.MonetaryAccountExternal != null)
116+
{
117+
return this.MonetaryAccountExternal;
118+
}
119+
110120
throw new BunqException(ERROR_NULL_FIELDS);
111121
}
112122

@@ -134,6 +144,11 @@ public override bool IsAllFieldNull()
134144
return false;
135145
}
136146

147+
if (this.MonetaryAccountExternal != null)
148+
{
149+
return false;
150+
}
151+
137152
return true;
138153
}
139154

Lines changed: 274 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,274 @@
1+
using Bunq.Sdk.Model.Core;
2+
using Bunq.Sdk.Model.Generated.Object;
3+
using Newtonsoft.Json;
4+
using System.Collections.Generic;
5+
6+
namespace Bunq.Sdk.Model.Generated.Endpoint
7+
{
8+
/// <summary>
9+
/// Endpoint for managing monetary accounts which are connected to external services.
10+
/// </summary>
11+
public class MonetaryAccountExternal : BunqModel
12+
{
13+
/// <summary>
14+
/// Field constants.
15+
/// </summary>
16+
public const string FIELD_CURRENCY = "currency";
17+
public const string FIELD_DESCRIPTION = "description";
18+
public const string FIELD_DAILY_LIMIT = "daily_limit";
19+
public const string FIELD_AVATAR_UUID = "avatar_uuid";
20+
public const string FIELD_STATUS = "status";
21+
public const string FIELD_SUB_STATUS = "sub_status";
22+
public const string FIELD_REASON = "reason";
23+
public const string FIELD_REASON_DESCRIPTION = "reason_description";
24+
public const string FIELD_DISPLAY_NAME = "display_name";
25+
public const string FIELD_SETTING = "setting";
26+
27+
28+
/// <summary>
29+
/// The currency of the MonetaryAccountExternal as an ISO 4217 formatted currency code.
30+
/// </summary>
31+
[JsonProperty(PropertyName = "currency")]
32+
public string Currency { get; set; }
33+
34+
/// <summary>
35+
/// The description of the MonetaryAccountExternal. Defaults to 'bunq account'.
36+
/// </summary>
37+
[JsonProperty(PropertyName = "description")]
38+
public string Description { get; set; }
39+
40+
/// <summary>
41+
/// The daily spending limit Amount of the MonetaryAccountExternal. Defaults to 1000 EUR. Currency must match
42+
/// the MonetaryAccountExternal's currency. Limited to 10000 EUR.
43+
/// </summary>
44+
[JsonProperty(PropertyName = "daily_limit")]
45+
public Amount DailyLimit { get; set; }
46+
47+
/// <summary>
48+
/// The UUID of the Avatar of the MonetaryAccountExternal.
49+
/// </summary>
50+
[JsonProperty(PropertyName = "avatar_uuid")]
51+
public string AvatarUuid { get; set; }
52+
53+
/// <summary>
54+
/// The status of the MonetaryAccountExternal. Can be: ACTIVE, BLOCKED, CANCELLED or PENDING_REOPEN
55+
/// </summary>
56+
[JsonProperty(PropertyName = "status")]
57+
public string Status { get; set; }
58+
59+
/// <summary>
60+
/// The sub-status of the MonetaryAccountExternal providing extra information regarding the status. Will be NONE
61+
/// for ACTIVE or PENDING_REOPEN, COMPLETELY or ONLY_ACCEPTING_INCOMING for BLOCKED and REDEMPTION_INVOLUNTARY,
62+
/// REDEMPTION_VOLUNTARY or PERMANENT for CANCELLED.
63+
/// </summary>
64+
[JsonProperty(PropertyName = "sub_status")]
65+
public string SubStatus { get; set; }
66+
67+
/// <summary>
68+
/// The reason for voluntarily cancelling (closing) the MonetaryAccountExternal, can only be OTHER.
69+
/// </summary>
70+
[JsonProperty(PropertyName = "reason")]
71+
public string Reason { get; set; }
72+
73+
/// <summary>
74+
/// The optional free-form reason for voluntarily cancelling (closing) the MonetaryAccountExternal. Can be any
75+
/// user provided message.
76+
/// </summary>
77+
[JsonProperty(PropertyName = "reason_description")]
78+
public string ReasonDescription { get; set; }
79+
80+
/// <summary>
81+
/// The legal name of the user / company using this monetary account.
82+
/// </summary>
83+
[JsonProperty(PropertyName = "display_name")]
84+
public string DisplayName { get; set; }
85+
86+
/// <summary>
87+
/// The settings of the MonetaryAccountExternal.
88+
/// </summary>
89+
[JsonProperty(PropertyName = "setting")]
90+
public MonetaryAccountSetting Setting { get; set; }
91+
92+
/// <summary>
93+
/// The id of the MonetaryAccountExternal.
94+
/// </summary>
95+
[JsonProperty(PropertyName = "id")]
96+
public int? Id { get; set; }
97+
98+
/// <summary>
99+
/// The timestamp of the MonetaryAccountExternal's creation.
100+
/// </summary>
101+
[JsonProperty(PropertyName = "created")]
102+
public string Created { get; set; }
103+
104+
/// <summary>
105+
/// The timestamp of the MonetaryAccountExternal's last update.
106+
/// </summary>
107+
[JsonProperty(PropertyName = "updated")]
108+
public string Updated { get; set; }
109+
110+
/// <summary>
111+
/// The Avatar of the MonetaryAccountExternal.
112+
/// </summary>
113+
[JsonProperty(PropertyName = "avatar")]
114+
public Avatar Avatar { get; set; }
115+
116+
/// <summary>
117+
/// The maximum Amount the MonetaryAccountExternal can be 'in the red'.
118+
/// </summary>
119+
[JsonProperty(PropertyName = "overdraft_limit")]
120+
public Amount OverdraftLimit { get; set; }
121+
122+
/// <summary>
123+
/// The current available balance Amount of the MonetaryAccountExternal.
124+
/// </summary>
125+
[JsonProperty(PropertyName = "balance")]
126+
public Amount Balance { get; set; }
127+
128+
/// <summary>
129+
/// The Aliases for the MonetaryAccountExternal.
130+
/// </summary>
131+
[JsonProperty(PropertyName = "alias")]
132+
public List<Pointer> Alias { get; set; }
133+
134+
/// <summary>
135+
/// The MonetaryAccountExternal's public UUID.
136+
/// </summary>
137+
[JsonProperty(PropertyName = "public_uuid")]
138+
public string PublicUuid { get; set; }
139+
140+
/// <summary>
141+
/// The id of the User who owns the MonetaryAccountExternal.
142+
/// </summary>
143+
[JsonProperty(PropertyName = "user_id")]
144+
public int? UserId { get; set; }
145+
146+
/// <summary>
147+
/// The profile of the account.
148+
/// </summary>
149+
[JsonProperty(PropertyName = "monetary_account_profile")]
150+
public MonetaryAccountProfile MonetaryAccountProfile { get; set; }
151+
152+
/// <summary>
153+
/// The ids of the AutoSave.
154+
/// </summary>
155+
[JsonProperty(PropertyName = "all_auto_save_id")]
156+
public List<BunqId> AllAutoSaveId { get; set; }
157+
158+
159+
160+
/// <summary>
161+
/// </summary>
162+
public override bool IsAllFieldNull()
163+
{
164+
if (this.Id != null)
165+
{
166+
return false;
167+
}
168+
169+
if (this.Created != null)
170+
{
171+
return false;
172+
}
173+
174+
if (this.Updated != null)
175+
{
176+
return false;
177+
}
178+
179+
if (this.Avatar != null)
180+
{
181+
return false;
182+
}
183+
184+
if (this.Currency != null)
185+
{
186+
return false;
187+
}
188+
189+
if (this.Description != null)
190+
{
191+
return false;
192+
}
193+
194+
if (this.DailyLimit != null)
195+
{
196+
return false;
197+
}
198+
199+
if (this.OverdraftLimit != null)
200+
{
201+
return false;
202+
}
203+
204+
if (this.Balance != null)
205+
{
206+
return false;
207+
}
208+
209+
if (this.Alias != null)
210+
{
211+
return false;
212+
}
213+
214+
if (this.PublicUuid != null)
215+
{
216+
return false;
217+
}
218+
219+
if (this.Status != null)
220+
{
221+
return false;
222+
}
223+
224+
if (this.SubStatus != null)
225+
{
226+
return false;
227+
}
228+
229+
if (this.Reason != null)
230+
{
231+
return false;
232+
}
233+
234+
if (this.ReasonDescription != null)
235+
{
236+
return false;
237+
}
238+
239+
if (this.UserId != null)
240+
{
241+
return false;
242+
}
243+
244+
if (this.MonetaryAccountProfile != null)
245+
{
246+
return false;
247+
}
248+
249+
if (this.DisplayName != null)
250+
{
251+
return false;
252+
}
253+
254+
if (this.Setting != null)
255+
{
256+
return false;
257+
}
258+
259+
if (this.AllAutoSaveId != null)
260+
{
261+
return false;
262+
}
263+
264+
return true;
265+
}
266+
267+
/// <summary>
268+
/// </summary>
269+
public static MonetaryAccountExternal CreateFromJsonString(string json)
270+
{
271+
return BunqModel.CreateFromJsonString<MonetaryAccountExternal>(json);
272+
}
273+
}
274+
}

0 commit comments

Comments
 (0)