Skip to content

Commit

Permalink
Merge branch 'release/1.10.16'
Browse files Browse the repository at this point in the history
  • Loading branch information
andrederoos committed Jun 16, 2019
2 parents a3cc7bd + 9224763 commit d532d15
Show file tree
Hide file tree
Showing 210 changed files with 611 additions and 23 deletions.
8 changes: 5 additions & 3 deletions .idea/.idea.BunqSdk/.idea/contentModel.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BunqSdk/BunqSdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PackageId>Bunq.Sdk</PackageId>
</PropertyGroup>
<PropertyGroup>
<VersionPrefix>1.10.3.0</VersionPrefix>
<VersionPrefix>1.10.16.0</VersionPrefix>
</PropertyGroup>
<PropertyGroup>
<RootNamespace>Bunq.Sdk</RootNamespace>
Expand Down
2 changes: 1 addition & 1 deletion BunqSdk/Http/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class ApiClient
/// Values for the default headers
/// </summary>
private const string CACHE_CONTROL_NONE = "no-cache";
private const string USER_AGENT_BUNQ = "bunq-sdk-csharp/1.10.3";
private const string USER_AGENT_BUNQ = "bunq-sdk-csharp/1.10.16";
private const string LANGUAGE_EN_US = "en_US";
private const string REGION_NL_NL = "nl_NL";
private const string GEOLOCATION_ZERO = "0 0 0 0 NL";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public static BunqResponse<byte[]> List(int chatConversationId, int attachmentId
return new BunqResponse<byte[]>(responseRaw.BodyBytes, responseRaw.Headers);
}


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
Expand Down
3 changes: 3 additions & 0 deletions BunqSdk/Model/Generated/Endpoint/AttachmentMonetaryAccount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class AttachmentMonetaryAccount : BunqModel
/// </summary>
protected const string ENDPOINT_URL_CREATE = "user/{0}/monetary-account/{1}/attachment";


/// <summary>
/// The attachment.
/// </summary>
Expand All @@ -33,6 +34,7 @@ public class AttachmentMonetaryAccount : BunqModel
[JsonProperty(PropertyName = "id")]
public int? Id { get; set; }


/// <summary>
/// Create a new monetary account attachment. Create a POST request with a payload that contains the binary
/// representation of the file, without any JSON wrapping. Make sure you define the MIME type (i.e. image/jpeg)
Expand All @@ -53,6 +55,7 @@ public static BunqResponse<int> Create(byte[] requestBytes, int? monetaryAccount
return ProcessForId(responseRaw);
}


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Text;
using System;

namespace Bunq.Sdk.Model.Generated.Endpoint
{
/// <summary>
/// Fetch the raw content of a monetary account attachment with given ID. The raw content is the binary
/// representation of a file, without any JSON wrapping.
/// </summary>
public class AttachmentMonetaryAccountContent : BunqModel
{
/// <summary>
/// Endpoint constants.
/// </summary>
protected const string ENDPOINT_URL_LISTING = "user/{0}/monetary-account/{1}/attachment/{2}/content";

/// <summary>
/// Object type.
/// </summary>
private const string OBJECT_TYPE_GET = "AttachmentMonetaryAccountContent";

/// <summary>
/// Get the raw content of a specific attachment.
/// </summary>
public static BunqResponse<byte[]> List(int attachmentId, int? monetaryAccountId = null,
IDictionary<string, string> customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary<string, string>();

var apiClient = new ApiClient(GetApiContext());
var responseRaw =
apiClient.Get(
string.Format(ENDPOINT_URL_LISTING, DetermineUserId(),
DetermineMonetaryAccountId(monetaryAccountId), attachmentId), new Dictionary<string, string>(),
customHeaders);

return new BunqResponse<byte[]>(responseRaw.BodyBytes, responseRaw.Headers);
}


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
{
return true;
}

/// <summary>
/// </summary>
public static AttachmentMonetaryAccountContent CreateFromJsonString(string json)
{
return BunqModel.CreateFromJsonString<AttachmentMonetaryAccountContent>(json);
}
}
}
2 changes: 2 additions & 0 deletions BunqSdk/Model/Generated/Endpoint/AttachmentPublic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class AttachmentPublic : BunqModel
[JsonProperty(PropertyName = "attachment")]
public Attachment Attachment { get; set; }


/// <summary>
/// Create a new public attachment. Create a POST request with a payload that contains a binary representation
/// of the file, without any JSON wrapping. Make sure you define the MIME type (i.e. image/jpeg, or image/png)
Expand Down Expand Up @@ -86,6 +87,7 @@ public static BunqResponse<AttachmentPublic> Get(string attachmentPublicUuid,
return FromJson<AttachmentPublic>(responseRaw, OBJECT_TYPE_GET);
}


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public static BunqResponse<byte[]> List(string attachmentPublicUuid,
return new BunqResponse<byte[]>(responseRaw.BodyBytes, responseRaw.Headers);
}


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
Expand Down
2 changes: 2 additions & 0 deletions BunqSdk/Model/Generated/Endpoint/AttachmentTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public class AttachmentTab : BunqModel
[JsonProperty(PropertyName = "attachment")]
public Attachment Attachment { get; set; }


/// <summary>
/// Upload a new attachment to use with a tab, and to read its metadata. Create a POST request with a payload
/// that contains the binary representation of the file, without any JSON wrapping. Make sure you define the
Expand Down Expand Up @@ -89,6 +90,7 @@ public static BunqResponse<AttachmentTab> Get(int attachmentTabId, int? monetary
return FromJson<AttachmentTab>(responseRaw, OBJECT_TYPE_GET);
}


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
Expand Down
1 change: 1 addition & 0 deletions BunqSdk/Model/Generated/Endpoint/AttachmentTabContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public static BunqResponse<byte[]> List(int attachmentTabId, int? monetaryAccoun
return new BunqResponse<byte[]>(responseRaw.BodyBytes, responseRaw.Headers);
}


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
Expand Down
2 changes: 2 additions & 0 deletions BunqSdk/Model/Generated/Endpoint/AttachmentUser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class AttachmentUser : BunqModel
[JsonProperty(PropertyName = "attachment")]
public Attachment Attachment { get; set; }


/// <summary>
/// Get a specific attachment. The header of the response contains the content-type of the attachment.
/// </summary>
Expand All @@ -65,6 +66,7 @@ public static BunqResponse<AttachmentUser> Get(int attachmentUserId,
return FromJson<AttachmentUser>(responseRaw);
}


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
Expand Down
57 changes: 57 additions & 0 deletions BunqSdk/Model/Generated/Endpoint/AttachmentUserContent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
using Bunq.Sdk.Context;
using Bunq.Sdk.Http;
using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Text;
using System;

namespace Bunq.Sdk.Model.Generated.Endpoint
{
/// <summary>
/// Fetch the raw content of a user attachment with given ID. The raw content is the binary representation of a
/// file, without any JSON wrapping.
/// </summary>
public class AttachmentUserContent : BunqModel
{
/// <summary>
/// Endpoint constants.
/// </summary>
protected const string ENDPOINT_URL_LISTING = "user/{0}/attachment/{1}/content";

/// <summary>
/// Object type.
/// </summary>
private const string OBJECT_TYPE_GET = "AttachmentUserContent";

/// <summary>
/// Get the raw content of a specific attachment.
/// </summary>
public static BunqResponse<byte[]> List(int attachmentId, IDictionary<string, string> customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary<string, string>();

var apiClient = new ApiClient(GetApiContext());
var responseRaw = apiClient.Get(string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), attachmentId),
new Dictionary<string, string>(), customHeaders);

return new BunqResponse<byte[]>(responseRaw.BodyBytes, responseRaw.Headers);
}


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
{
return true;
}

/// <summary>
/// </summary>
public static AttachmentUserContent CreateFromJsonString(string json)
{
return BunqModel.CreateFromJsonString<AttachmentUserContent>(json);
}
}
}
2 changes: 2 additions & 0 deletions BunqSdk/Model/Generated/Endpoint/Avatar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public class Avatar : BunqModel
[JsonProperty(PropertyName = "image")]
public List<Image> Image { get; set; }


/// <summary>
/// </summary>
/// <param name="attachmentPublicUuid">The public UUID of the public attachment from which an avatar image must be created.</param>
Expand Down Expand Up @@ -89,6 +90,7 @@ public static BunqResponse<Avatar> Get(string avatarUuid, IDictionary<string, st
return FromJson<Avatar>(responseRaw, OBJECT_TYPE_GET);
}


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class BankSwitchServiceNetherlandsIncoming : BunqModel
public const string FIELD_SUB_STATUS = "sub_status";
public const string FIELD_TIME_START_ACTUAL = "time_start_actual";


/// <summary>
/// The label of the monetary of this switch service.
/// </summary>
Expand Down Expand Up @@ -74,6 +75,7 @@ public class BankSwitchServiceNetherlandsIncoming : BunqModel
[JsonProperty(PropertyName = "attachment")]
public Attachment Attachment { get; set; }


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class BankSwitchServiceNetherlandsIncomingPayment : BunqModel
[JsonProperty(PropertyName = "payment")]
public Payment Payment { get; set; }


/// <summary>
/// </summary>
public static BunqResponse<BankSwitchServiceNetherlandsIncomingPayment> Get(
Expand All @@ -55,6 +56,7 @@ public static BunqResponse<BankSwitchServiceNetherlandsIncomingPayment> Get(
return FromJson<BankSwitchServiceNetherlandsIncomingPayment>(responseRaw, OBJECT_TYPE_GET);
}


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public class BillingContractSubscription : BunqModel
[JsonProperty(PropertyName = "sub_status")]
public string SubStatus { get; set; }


/// <summary>
/// Get all subscription billing contract for the authenticated user.
/// </summary>
Expand All @@ -107,6 +108,7 @@ public static BunqResponse<List<BillingContractSubscription>> List(IDictionary<s
return FromJsonList<BillingContractSubscription>(responseRaw, OBJECT_TYPE_GET);
}


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
Expand Down
2 changes: 2 additions & 0 deletions BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class BunqMeFundraiserProfile : BunqModel
/// </summary>
public const string FIELD_POINTER = "pointer";


/// <summary>
/// The pointer (url) which will be used to access the bunq.me fundraiser profile.
/// </summary>
Expand Down Expand Up @@ -64,6 +65,7 @@ public class BunqMeFundraiserProfile : BunqModel
[JsonProperty(PropertyName = "invite_profile_name")]
public string InviteProfileName { get; set; }


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public class BunqMeFundraiserProfileUser : BunqModel
[JsonProperty(PropertyName = "attachment")]
public AttachmentPublic Attachment { get; set; }


/// <summary>
/// </summary>
public static BunqResponse<BunqMeFundraiserProfileUser> Get(int bunqMeFundraiserProfileUserId,
Expand Down Expand Up @@ -124,6 +125,7 @@ public static BunqResponse<List<BunqMeFundraiserProfileUser>> List(IDictionary<s
return FromJsonList<BunqMeFundraiserProfileUser>(responseRaw, OBJECT_TYPE_GET);
}


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
Expand Down
2 changes: 2 additions & 0 deletions BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class BunqMeFundraiserResult : BunqModel
[JsonProperty(PropertyName = "payments")]
public List<Payment> Payments { get; set; }


/// <summary>
/// </summary>
public static BunqResponse<BunqMeFundraiserResult> Get(int bunqMeFundraiserResultId,
Expand All @@ -70,6 +71,7 @@ public static BunqResponse<BunqMeFundraiserResult> Get(int bunqMeFundraiserResul
return FromJson<BunqMeFundraiserResult>(responseRaw, OBJECT_TYPE_GET);
}


/// <summary>
/// </summary>
public override bool IsAllFieldNull()
Expand Down
Loading

0 comments on commit d532d15

Please sign in to comment.