Skip to content

Commit 41dc090

Browse files
author
Kevin Hellemun
committed
Regenerated code. (#83)
1 parent f731c5d commit 41dc090

File tree

155 files changed

+7618
-4391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+7618
-4391
lines changed

BunqSdk/Model/Generated/Endpoint/AttachmentConversationContent.cs

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,39 +18,42 @@ public class AttachmentConversationContent : BunqModel
1818
/// <summary>
1919
/// Endpoint constants.
2020
/// </summary>
21-
private const string ENDPOINT_URL_LISTING = "user/{0}/chat-conversation/{1}/attachment/{2}/content";
22-
21+
protected const string ENDPOINT_URL_LISTING = "user/{0}/chat-conversation/{1}/attachment/{2}/content";
22+
2323
/// <summary>
2424
/// Object type.
2525
/// </summary>
2626
private const string OBJECT_TYPE_GET = "AttachmentConversationContent";
27-
27+
2828
/// <summary>
2929
/// Get the raw content of a specific attachment.
3030
/// </summary>
31-
public static BunqResponse<byte[]> List(ApiContext apiContext, int userId, int chatConversationId, int attachmentId, IDictionary<string, string> customHeaders = null)
31+
public static BunqResponse<byte[]> List(int chatConversationId, int attachmentId,
32+
IDictionary<string, string> customHeaders = null)
3233
{
3334
if (customHeaders == null) customHeaders = new Dictionary<string, string>();
34-
35-
var apiClient = new ApiClient(apiContext);
36-
var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, userId, chatConversationId, attachmentId), new Dictionary<string, string>(), customHeaders);
37-
35+
36+
var apiClient = new ApiClient(GetApiContext());
37+
var responseRaw =
38+
apiClient.Get(string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), chatConversationId, attachmentId),
39+
new Dictionary<string, string>(), customHeaders);
40+
3841
return new BunqResponse<byte[]>(responseRaw.BodyBytes, responseRaw.Headers);
3942
}
40-
41-
43+
44+
4245
/// <summary>
4346
/// </summary>
4447
public override bool IsAllFieldNull()
4548
{
4649
return true;
4750
}
48-
51+
4952
/// <summary>
5053
/// </summary>
5154
public static AttachmentConversationContent CreateFromJsonString(string json)
5255
{
5356
return BunqModel.CreateFromJsonString<AttachmentConversationContent>(json);
5457
}
5558
}
56-
}
59+
}

BunqSdk/Model/Generated/Endpoint/AttachmentMonetaryAccount.cs

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,38 +19,42 @@ public class AttachmentMonetaryAccount : BunqModel
1919
/// <summary>
2020
/// Endpoint constants.
2121
/// </summary>
22-
private const string ENDPOINT_URL_CREATE = "user/{0}/monetary-account/{1}/attachment";
23-
24-
22+
protected const string ENDPOINT_URL_CREATE = "user/{0}/monetary-account/{1}/attachment";
23+
24+
2525
/// <summary>
2626
/// The attachment.
2727
/// </summary>
2828
[JsonProperty(PropertyName = "attachment")]
29-
public Attachment Attachment { get; private set; }
30-
29+
public Attachment Attachment { get; set; }
30+
3131
/// <summary>
3232
/// The ID of the attachment created.
3333
/// </summary>
3434
[JsonProperty(PropertyName = "id")]
35-
public int? Id { get; private set; }
36-
35+
public int? Id { get; set; }
36+
3737
/// <summary>
3838
/// Create a new monetary account attachment. Create a POST request with a payload that contains the binary
3939
/// representation of the file, without any JSON wrapping. Make sure you define the MIME type (i.e. image/jpeg)
4040
/// in the Content-Type header. You are required to provide a description of the attachment using the
4141
/// X-Bunq-Attachment-Description header.
4242
/// </summary>
43-
public static BunqResponse<int> Create(ApiContext apiContext, byte[] requestBytes, int userId, int monetaryAccountId, IDictionary<string, string> customHeaders = null)
43+
public static BunqResponse<int> Create(byte[] requestBytes, int? monetaryAccountId = null,
44+
IDictionary<string, string> customHeaders = null)
4445
{
4546
if (customHeaders == null) customHeaders = new Dictionary<string, string>();
46-
47-
var apiClient = new ApiClient(apiContext);
48-
var responseRaw = apiClient.Post(string.Format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, customHeaders);
49-
47+
48+
var apiClient = new ApiClient(GetApiContext());
49+
var responseRaw =
50+
apiClient.Post(
51+
string.Format(ENDPOINT_URL_CREATE, DetermineUserId(),
52+
DetermineMonetaryAccountId(monetaryAccountId)), requestBytes, customHeaders);
53+
5054
return ProcessForId(responseRaw);
5155
}
52-
53-
56+
57+
5458
/// <summary>
5559
/// </summary>
5660
public override bool IsAllFieldNull()
@@ -59,20 +63,20 @@ public override bool IsAllFieldNull()
5963
{
6064
return false;
6165
}
62-
66+
6367
if (this.Id != null)
6468
{
6569
return false;
6670
}
67-
71+
6872
return true;
6973
}
70-
74+
7175
/// <summary>
7276
/// </summary>
7377
public static AttachmentMonetaryAccount CreateFromJsonString(string json)
7478
{
7579
return BunqModel.CreateFromJsonString<AttachmentMonetaryAccount>(json);
7680
}
7781
}
78-
}
82+
}

BunqSdk/Model/Generated/Endpoint/AttachmentPublic.cs

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,70 +19,74 @@ public class AttachmentPublic : BunqModel
1919
/// <summary>
2020
/// Endpoint constants.
2121
/// </summary>
22-
private const string ENDPOINT_URL_CREATE = "attachment-public";
23-
private const string ENDPOINT_URL_READ = "attachment-public/{0}";
24-
22+
protected const string ENDPOINT_URL_CREATE = "attachment-public";
23+
24+
protected const string ENDPOINT_URL_READ = "attachment-public/{0}";
25+
2526
/// <summary>
2627
/// Object type.
2728
/// </summary>
2829
private const string OBJECT_TYPE_POST = "Uuid";
30+
2931
private const string OBJECT_TYPE_GET = "AttachmentPublic";
30-
32+
3133
/// <summary>
3234
/// The UUID of the attachment.
3335
/// </summary>
3436
[JsonProperty(PropertyName = "uuid")]
35-
public string Uuid { get; private set; }
36-
37+
public string Uuid { get; set; }
38+
3739
/// <summary>
3840
/// The timestamp of the attachment's creation.
3941
/// </summary>
4042
[JsonProperty(PropertyName = "created")]
41-
public string Created { get; private set; }
42-
43+
public string Created { get; set; }
44+
4345
/// <summary>
4446
/// The timestamp of the attachment's last update.
4547
/// </summary>
4648
[JsonProperty(PropertyName = "updated")]
47-
public string Updated { get; private set; }
48-
49+
public string Updated { get; set; }
50+
4951
/// <summary>
5052
/// The attachment.
5153
/// </summary>
5254
[JsonProperty(PropertyName = "attachment")]
53-
public Attachment Attachment { get; private set; }
54-
55+
public Attachment Attachment { get; set; }
56+
5557
/// <summary>
5658
/// Create a new public attachment. Create a POST request with a payload that contains a binary representation
5759
/// of the file, without any JSON wrapping. Make sure you define the MIME type (i.e. image/jpeg, or image/png)
5860
/// in the Content-Type header. You are required to provide a description of the attachment using the
5961
/// X-Bunq-Attachment-Description header.
6062
/// </summary>
61-
public static BunqResponse<string> Create(ApiContext apiContext, byte[] requestBytes, IDictionary<string, string> customHeaders = null)
63+
public static BunqResponse<string> Create(byte[] requestBytes, IDictionary<string, string> customHeaders = null)
6264
{
6365
if (customHeaders == null) customHeaders = new Dictionary<string, string>();
64-
65-
var apiClient = new ApiClient(apiContext);
66+
67+
var apiClient = new ApiClient(GetApiContext());
6668
var responseRaw = apiClient.Post(ENDPOINT_URL_CREATE, requestBytes, customHeaders);
67-
69+
6870
return ProcessForUuid(responseRaw);
6971
}
70-
72+
7173
/// <summary>
7274
/// Get a specific attachment's metadata through its UUID. The Content-Type header of the response will describe
7375
/// the MIME type of the attachment file.
7476
/// </summary>
75-
public static BunqResponse<AttachmentPublic> Get(ApiContext apiContext, string attachmentPublicUuid, IDictionary<string, string> customHeaders = null)
77+
public static BunqResponse<AttachmentPublic> Get(string attachmentPublicUuid,
78+
IDictionary<string, string> customHeaders = null)
7679
{
7780
if (customHeaders == null) customHeaders = new Dictionary<string, string>();
78-
79-
var apiClient = new ApiClient(apiContext);
80-
var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_READ, attachmentPublicUuid), new Dictionary<string, string>(), customHeaders);
81-
81+
82+
var apiClient = new ApiClient(GetApiContext());
83+
var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_READ, attachmentPublicUuid),
84+
new Dictionary<string, string>(), customHeaders);
85+
8286
return FromJson<AttachmentPublic>(responseRaw, OBJECT_TYPE_GET);
8387
}
84-
85-
88+
89+
8690
/// <summary>
8791
/// </summary>
8892
public override bool IsAllFieldNull()
@@ -91,30 +95,30 @@ public override bool IsAllFieldNull()
9195
{
9296
return false;
9397
}
94-
98+
9599
if (this.Created != null)
96100
{
97101
return false;
98102
}
99-
103+
100104
if (this.Updated != null)
101105
{
102106
return false;
103107
}
104-
108+
105109
if (this.Attachment != null)
106110
{
107111
return false;
108112
}
109-
113+
110114
return true;
111115
}
112-
116+
113117
/// <summary>
114118
/// </summary>
115119
public static AttachmentPublic CreateFromJsonString(string json)
116120
{
117121
return BunqModel.CreateFromJsonString<AttachmentPublic>(json);
118122
}
119123
}
120-
}
124+
}

BunqSdk/Model/Generated/Endpoint/AttachmentPublicContent.cs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,39 +18,41 @@ public class AttachmentPublicContent : BunqModel
1818
/// <summary>
1919
/// Endpoint constants.
2020
/// </summary>
21-
private const string ENDPOINT_URL_LISTING = "attachment-public/{0}/content";
22-
21+
protected const string ENDPOINT_URL_LISTING = "attachment-public/{0}/content";
22+
2323
/// <summary>
2424
/// Object type.
2525
/// </summary>
2626
private const string OBJECT_TYPE_GET = "AttachmentPublicContent";
27-
27+
2828
/// <summary>
2929
/// Get the raw content of a specific attachment.
3030
/// </summary>
31-
public static BunqResponse<byte[]> List(ApiContext apiContext, string attachmentPublicUuid, IDictionary<string, string> customHeaders = null)
31+
public static BunqResponse<byte[]> List(string attachmentPublicUuid,
32+
IDictionary<string, string> customHeaders = null)
3233
{
3334
if (customHeaders == null) customHeaders = new Dictionary<string, string>();
34-
35-
var apiClient = new ApiClient(apiContext);
36-
var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, attachmentPublicUuid), new Dictionary<string, string>(), customHeaders);
37-
35+
36+
var apiClient = new ApiClient(GetApiContext());
37+
var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, attachmentPublicUuid),
38+
new Dictionary<string, string>(), customHeaders);
39+
3840
return new BunqResponse<byte[]>(responseRaw.BodyBytes, responseRaw.Headers);
3941
}
40-
41-
42+
43+
4244
/// <summary>
4345
/// </summary>
4446
public override bool IsAllFieldNull()
4547
{
4648
return true;
4749
}
48-
50+
4951
/// <summary>
5052
/// </summary>
5153
public static AttachmentPublicContent CreateFromJsonString(string json)
5254
{
5355
return BunqModel.CreateFromJsonString<AttachmentPublicContent>(json);
5456
}
5557
}
56-
}
58+
}

0 commit comments

Comments
 (0)