diff --git a/BunqSdk/BunqSdk.csproj b/BunqSdk/BunqSdk.csproj
index 8e2f5e9..59f7e71 100644
--- a/BunqSdk/BunqSdk.csproj
+++ b/BunqSdk/BunqSdk.csproj
@@ -8,8 +8,7 @@
Bunq.Sdk
- 1.0.0.0
- beta
+ 1.1.0.0Bunq.Sdk
diff --git a/BunqSdk/Http/ApiClient.cs b/BunqSdk/Http/ApiClient.cs
index 9e40129..8ca1b09 100644
--- a/BunqSdk/Http/ApiClient.cs
+++ b/BunqSdk/Http/ApiClient.cs
@@ -62,7 +62,7 @@ public class ApiClient
/// Values for the default headers
///
private const string CACHE_CONTROL_NONE = "no-cache";
- private const string USER_AGENT_BUNQ = "bunq-sdk-csharp/1.0.0.0";
+ private const string USER_AGENT_BUNQ = "bunq-sdk-csharp/1.1.0.0";
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";
diff --git a/BunqSdk/Model/Generated/Endpoint/AttachmentConversationContent.cs b/BunqSdk/Model/Generated/Endpoint/AttachmentConversationContent.cs
index f8635f7..448aa18 100644
--- a/BunqSdk/Model/Generated/Endpoint/AttachmentConversationContent.cs
+++ b/BunqSdk/Model/Generated/Endpoint/AttachmentConversationContent.cs
@@ -41,7 +41,6 @@ public static BunqResponse List(int chatConversationId, int attachmentId
return new BunqResponse(responseRaw.BodyBytes, responseRaw.Headers);
}
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/AttachmentMonetaryAccount.cs b/BunqSdk/Model/Generated/Endpoint/AttachmentMonetaryAccount.cs
index 6f69eb9..eedc1e2 100644
--- a/BunqSdk/Model/Generated/Endpoint/AttachmentMonetaryAccount.cs
+++ b/BunqSdk/Model/Generated/Endpoint/AttachmentMonetaryAccount.cs
@@ -21,7 +21,6 @@ public class AttachmentMonetaryAccount : BunqModel
///
protected const string ENDPOINT_URL_CREATE = "user/{0}/monetary-account/{1}/attachment";
-
///
/// The attachment.
///
@@ -54,7 +53,6 @@ public static BunqResponse Create(byte[] requestBytes, int? monetaryAccount
return ProcessForId(responseRaw);
}
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/AttachmentPublic.cs b/BunqSdk/Model/Generated/Endpoint/AttachmentPublic.cs
index d4033e5..d6a8ca1 100644
--- a/BunqSdk/Model/Generated/Endpoint/AttachmentPublic.cs
+++ b/BunqSdk/Model/Generated/Endpoint/AttachmentPublic.cs
@@ -86,7 +86,6 @@ public static BunqResponse Get(string attachmentPublicUuid,
return FromJson(responseRaw, OBJECT_TYPE_GET);
}
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/AttachmentPublicContent.cs b/BunqSdk/Model/Generated/Endpoint/AttachmentPublicContent.cs
index 240542b..836e284 100644
--- a/BunqSdk/Model/Generated/Endpoint/AttachmentPublicContent.cs
+++ b/BunqSdk/Model/Generated/Endpoint/AttachmentPublicContent.cs
@@ -40,7 +40,6 @@ public static BunqResponse List(string attachmentPublicUuid,
return new BunqResponse(responseRaw.BodyBytes, responseRaw.Headers);
}
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/AttachmentTab.cs b/BunqSdk/Model/Generated/Endpoint/AttachmentTab.cs
index a497a51..a283b41 100644
--- a/BunqSdk/Model/Generated/Endpoint/AttachmentTab.cs
+++ b/BunqSdk/Model/Generated/Endpoint/AttachmentTab.cs
@@ -89,7 +89,6 @@ public static BunqResponse Get(int attachmentTabId, int? monetary
return FromJson(responseRaw, OBJECT_TYPE_GET);
}
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/AttachmentTabContent.cs b/BunqSdk/Model/Generated/Endpoint/AttachmentTabContent.cs
index 6a8de14..77e2e93 100644
--- a/BunqSdk/Model/Generated/Endpoint/AttachmentTabContent.cs
+++ b/BunqSdk/Model/Generated/Endpoint/AttachmentTabContent.cs
@@ -43,7 +43,6 @@ public static BunqResponse List(int attachmentTabId, int? monetaryAccoun
return new BunqResponse(responseRaw.BodyBytes, responseRaw.Headers);
}
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/Avatar.cs b/BunqSdk/Model/Generated/Endpoint/Avatar.cs
index 30afdb3..1b13561 100644
--- a/BunqSdk/Model/Generated/Endpoint/Avatar.cs
+++ b/BunqSdk/Model/Generated/Endpoint/Avatar.cs
@@ -37,6 +37,12 @@ public class Avatar : BunqModel
private const string OBJECT_TYPE_GET = "Avatar";
+ ///
+ /// The public UUID of the public attachment from which an avatar image must be created.
+ ///
+ [JsonProperty(PropertyName = "attachment_public_uuid")]
+ public string AttachmentPublicUuid { get; set; }
+
///
/// The UUID of the created avatar.
///
@@ -83,7 +89,6 @@ public static BunqResponse Get(string avatarUuid, IDictionary(responseRaw, OBJECT_TYPE_GET);
}
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/BillingContractSubscription.cs b/BunqSdk/Model/Generated/Endpoint/BillingContractSubscription.cs
index 0dbdcde..d909fc3 100644
--- a/BunqSdk/Model/Generated/Endpoint/BillingContractSubscription.cs
+++ b/BunqSdk/Model/Generated/Endpoint/BillingContractSubscription.cs
@@ -31,6 +31,13 @@ public class BillingContractSubscription : BunqModel
///
private const string OBJECT_TYPE_GET = "BillingContractSubscription";
+ ///
+ /// The subscription type of the user. Can be one of PERSON_SUPER_LIGHT_V1, PERSON_LIGHT_V1, PERSON_MORE_V1,
+ /// PERSON_FREE_V1, PERSON_PREMIUM_V1, COMPANY_V1, or COMPANY_V2.
+ ///
+ [JsonProperty(PropertyName = "subscription_type")]
+ public string SubscriptionType { get; set; }
+
///
/// The id of the billing contract.
///
@@ -68,11 +75,11 @@ public class BillingContractSubscription : BunqModel
public int? ContractVersion { get; set; }
///
- /// The subscription type of the user. Can be one of PERSON_SUPER_LIGHT_V1, PERSON_LIGHT_V1, PERSON_MORE_V1,
- /// PERSON_FREE_V1, PERSON_PREMIUM_V1, COMPANY_V1, or COMPANY_V2.
+ /// The subscription type the user will have after a subscription downgrade. Will be null if downgrading is not
+ /// possible.
///
- [JsonProperty(PropertyName = "subscription_type")]
- public string SubscriptionType { get; set; }
+ [JsonProperty(PropertyName = "subscription_type_downgrade")]
+ public string SubscriptionTypeDowngrade { get; set; }
///
/// The subscription status.
@@ -124,7 +131,6 @@ public static BunqResponse> List(IDictionary(responseRaw, OBJECT_TYPE_GET);
}
-
///
///
public override bool IsAllFieldNull()
@@ -164,6 +170,11 @@ public override bool IsAllFieldNull()
return false;
}
+ if (this.SubscriptionTypeDowngrade != null)
+ {
+ return false;
+ }
+
if (this.Status != null)
{
return false;
diff --git a/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserProfile.cs b/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserProfile.cs
index bad2a58..642b33a 100644
--- a/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserProfile.cs
+++ b/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserProfile.cs
@@ -15,6 +15,11 @@ public class BunqMeFundraiserProfile : BunqModel
///
public const string FIELD_POINTER = "pointer";
+ ///
+ /// The pointer (url) which will be used to access the bunq.me fundraiser profile.
+ ///
+ [JsonProperty(PropertyName = "pointer")]
+ public MonetaryAccountReference Pointer { get; set; }
///
/// The color chosen for the bunq.me fundraiser profile in hexadecimal format.
@@ -41,12 +46,6 @@ public class BunqMeFundraiserProfile : BunqModel
[JsonProperty(PropertyName = "attachment")]
public List Attachment { get; set; }
- ///
- /// The pointer (url) which will be used to access the bunq.me fundraiser profile.
- ///
- [JsonProperty(PropertyName = "pointer")]
- public MonetaryAccountReference Pointer { get; set; }
-
///
/// The status of the bunq.me fundraiser profile, can be ACTIVE or DEACTIVATED.
///
@@ -59,7 +58,6 @@ public class BunqMeFundraiserProfile : BunqModel
[JsonProperty(PropertyName = "redirect_url")]
public string RedirectUrl { get; set; }
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserResult.cs b/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserResult.cs
index d53a8b5..b330023 100644
--- a/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserResult.cs
+++ b/BunqSdk/Model/Generated/Endpoint/BunqMeFundraiserResult.cs
@@ -39,7 +39,6 @@ public class BunqMeFundraiserResult : BunqModel
[JsonProperty(PropertyName = "payments")]
public List Payments { get; set; }
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/BunqMeTab.cs b/BunqSdk/Model/Generated/Endpoint/BunqMeTab.cs
index 4fe658a..8543970 100644
--- a/BunqSdk/Model/Generated/Endpoint/BunqMeTab.cs
+++ b/BunqSdk/Model/Generated/Endpoint/BunqMeTab.cs
@@ -36,6 +36,18 @@ public class BunqMeTab : BunqModel
///
private const string OBJECT_TYPE_GET = "BunqMeTab";
+ ///
+ /// The bunq.me entry containing the payment information.
+ ///
+ [JsonProperty(PropertyName = "bunqme_tab_entry")]
+ public BunqMeTabEntry BunqmeTabEntry { get; set; }
+
+ ///
+ /// The status of the bunq.me. Can be WAITING_FOR_PAYMENT, CANCELLED or EXPIRED.
+ ///
+ [JsonProperty(PropertyName = "status")]
+ public string Status { get; set; }
+
///
/// The id of the created bunq.me.
///
@@ -66,24 +78,12 @@ public class BunqMeTab : BunqModel
[JsonProperty(PropertyName = "monetary_account_id")]
public int? MonetaryAccountId { get; set; }
- ///
- /// The status of the bunq.me. Can be WAITING_FOR_PAYMENT, CANCELLED or EXPIRED.
- ///
- [JsonProperty(PropertyName = "status")]
- public string Status { get; set; }
-
///
/// The url that points to the bunq.me page.
///
[JsonProperty(PropertyName = "bunqme_tab_share_url")]
public string BunqmeTabShareUrl { get; set; }
- ///
- /// The bunq.me entry containing the payment information.
- ///
- [JsonProperty(PropertyName = "bunqme_tab_entry")]
- public BunqMeTabEntry BunqmeTabEntry { get; set; }
-
///
/// The list of bunq.me result Inquiries successfully made and paid.
///
@@ -173,7 +173,6 @@ public static BunqResponse Get(int bunqMeTabId, int? monetaryAccountI
return FromJson(responseRaw, OBJECT_TYPE_GET);
}
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/BunqMeTabEntry.cs b/BunqSdk/Model/Generated/Endpoint/BunqMeTabEntry.cs
index e7c2a5d..47fe3dc 100644
--- a/BunqSdk/Model/Generated/Endpoint/BunqMeTabEntry.cs
+++ b/BunqSdk/Model/Generated/Endpoint/BunqMeTabEntry.cs
@@ -19,18 +19,29 @@ public class BunqMeTabEntry : BunqModel
public const string FIELD_DESCRIPTION = "description";
public const string FIELD_REDIRECT_URL = "redirect_url";
+ ///
+ /// The requested Amount.
+ ///
+ [JsonProperty(PropertyName = "amount_inquired")]
+ public Amount AmountInquired { get; set; }
///
- /// The uuid of the bunq.me.
+ /// The description for the bunq.me. Maximum 9000 characters.
///
- [JsonProperty(PropertyName = "uuid")]
- public string Uuid { get; set; }
+ [JsonProperty(PropertyName = "description")]
+ public string Description { get; set; }
///
- /// The requested Amount.
+ /// The URL which the user is sent to when a payment is completed.
///
- [JsonProperty(PropertyName = "amount_inquired")]
- public Amount AmountInquired { get; set; }
+ [JsonProperty(PropertyName = "redirect_url")]
+ public string RedirectUrl { get; set; }
+
+ ///
+ /// The uuid of the bunq.me.
+ ///
+ [JsonProperty(PropertyName = "uuid")]
+ public string Uuid { get; set; }
///
/// The LabelMonetaryAccount with the public information of the User and the MonetaryAccount that created the
@@ -39,31 +50,18 @@ public class BunqMeTabEntry : BunqModel
[JsonProperty(PropertyName = "alias")]
public MonetaryAccountReference Alias { get; set; }
- ///
- /// The description for the bunq.me. Maximum 9000 characters.
- ///
- [JsonProperty(PropertyName = "description")]
- public string Description { get; set; }
-
///
/// The status of the bunq.me. Can be WAITING_FOR_PAYMENT, CANCELLED or EXPIRED.
///
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
- ///
- /// The URL which the user is sent to when a payment is completed.
- ///
- [JsonProperty(PropertyName = "redirect_url")]
- public string RedirectUrl { get; set; }
-
///
/// List of available merchants.
///
[JsonProperty(PropertyName = "merchant_available")]
public List MerchantAvailable { get; set; }
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/BunqMeTabResultInquiry.cs b/BunqSdk/Model/Generated/Endpoint/BunqMeTabResultInquiry.cs
index 3e5c50a..214a42f 100644
--- a/BunqSdk/Model/Generated/Endpoint/BunqMeTabResultInquiry.cs
+++ b/BunqSdk/Model/Generated/Endpoint/BunqMeTabResultInquiry.cs
@@ -22,7 +22,6 @@ public class BunqMeTabResultInquiry : BunqModel
[JsonProperty(PropertyName = "bunq_me_tab_id")]
public int? BunqMeTabId { get; set; }
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/BunqMeTabResultResponse.cs b/BunqSdk/Model/Generated/Endpoint/BunqMeTabResultResponse.cs
index 3ba962c..5d8ce4d 100644
--- a/BunqSdk/Model/Generated/Endpoint/BunqMeTabResultResponse.cs
+++ b/BunqSdk/Model/Generated/Endpoint/BunqMeTabResultResponse.cs
@@ -16,7 +16,6 @@ public class BunqMeTabResultResponse : BunqModel
[JsonProperty(PropertyName = "payment")]
public Payment Payment { get; set; }
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/Card.cs b/BunqSdk/Model/Generated/Endpoint/Card.cs
index 387ee99..a9eef77 100644
--- a/BunqSdk/Model/Generated/Endpoint/Card.cs
+++ b/BunqSdk/Model/Generated/Endpoint/Card.cs
@@ -31,6 +31,7 @@ public class Card : BunqModel
public const string FIELD_ACTIVATION_CODE = "activation_code";
public const string FIELD_STATUS = "status";
+ public const string FIELD_CARD_LIMIT = "card_limit";
public const string FIELD_LIMIT = "limit";
public const string FIELD_MAG_STRIPE_PERMISSION = "mag_stripe_permission";
public const string FIELD_COUNTRY_PERMISSION = "country_permission";
@@ -44,6 +45,64 @@ public class Card : BunqModel
private const string OBJECT_TYPE_GET = "CardDebit";
+ ///
+ /// The plaintext pin code. Requests require encryption to be enabled.
+ ///
+ [JsonProperty(PropertyName = "pin_code")]
+ public string PinCode { get; set; }
+
+ ///
+ /// The activation code required to set status to ACTIVE initially. Can only set status to ACTIVE using
+ /// activation code when order_status is ACCEPTED_FOR_PRODUCTION and status is DEACTIVATED.
+ ///
+ [JsonProperty(PropertyName = "activation_code")]
+ public string ActivationCode { get; set; }
+
+ ///
+ /// The status to set for the card. Can be ACTIVE, DEACTIVATED, LOST, STOLEN, CANCELLED, EXPIRED or
+ /// PIN_TRIES_EXCEEDED.
+ ///
+ [JsonProperty(PropertyName = "status")]
+ public string Status { get; set; }
+
+ ///
+ /// The spending limit for the cards
+ ///
+ [JsonProperty(PropertyName = "card_limit")]
+ public Amount CardLimit { get; set; }
+
+ ///
+ /// DEPRECATED: The limits to define for the card, among CARD_LIMIT_CONTACTLESS, CARD_LIMIT_ATM,
+ /// CARD_LIMIT_DIPPING and CARD_LIMIT_POS_ICC (e.g. 25 EUR for CARD_LIMIT_CONTACTLESS)
+ ///
+ [JsonProperty(PropertyName = "limit")]
+ public List Limit { get; set; }
+
+ ///
+ /// The countries for which to grant (temporary) permissions to use the card.
+ ///
+ [JsonProperty(PropertyName = "mag_stripe_permission")]
+ public CardMagStripePermission MagStripePermission { get; set; }
+
+ ///
+ /// The countries for which to grant (temporary) permissions to use the card.
+ ///
+ [JsonProperty(PropertyName = "country_permission")]
+ public List CountryPermission { get; set; }
+
+ ///
+ /// Array of Types, PINs, account IDs assigned to the card.
+ ///
+ [JsonProperty(PropertyName = "pin_code_assignment")]
+ public List PinCodeAssignment { get; set; }
+
+ ///
+ /// ID of the MA to be used as fallback for this card if insufficient balance. Fallback account is removed if
+ /// not supplied.
+ ///
+ [JsonProperty(PropertyName = "monetary_account_id_fallback")]
+ public int? MonetaryAccountIdFallback { get; set; }
+
///
/// The id of the card.
///
@@ -86,13 +145,6 @@ public class Card : BunqModel
[JsonProperty(PropertyName = "second_line")]
public string SecondLine { get; set; }
- ///
- /// The status to set for the card. Can be ACTIVE, DEACTIVATED, LOST, STOLEN, CANCELLED, EXPIRED or
- /// PIN_TRIES_EXCEEDED.
- ///
- [JsonProperty(PropertyName = "status")]
- public string Status { get; set; }
-
///
/// The sub-status of the card. Can be NONE or REPLACED.
///
@@ -124,25 +176,6 @@ public class Card : BunqModel
[JsonProperty(PropertyName = "primary_account_number_four_digit")]
public string PrimaryAccountNumberFourDigit { get; set; }
- ///
- /// The limits to define for the card, among CARD_LIMIT_CONTACTLESS, CARD_LIMIT_ATM, CARD_LIMIT_DIPPING and
- /// CARD_LIMIT_POS_ICC (e.g. 25 EUR for CARD_LIMIT_CONTACTLESS)
- ///
- [JsonProperty(PropertyName = "limit")]
- public List Limit { get; set; }
-
- ///
- /// The countries for which to grant (temporary) permissions to use the card.
- ///
- [JsonProperty(PropertyName = "mag_stripe_permission")]
- public CardMagStripePermission MagStripePermission { get; set; }
-
- ///
- /// The countries for which to grant (temporary) permissions to use the card.
- ///
- [JsonProperty(PropertyName = "country_permission")]
- public List CountryPermission { get; set; }
-
///
/// The monetary account this card was ordered on and the label user that owns the card.
///
@@ -155,19 +188,6 @@ public class Card : BunqModel
[JsonProperty(PropertyName = "label_monetary_account_current")]
public MonetaryAccountReference LabelMonetaryAccountCurrent { get; set; }
- ///
- /// Array of Types, PINs, account IDs assigned to the card.
- ///
- [JsonProperty(PropertyName = "pin_code_assignment")]
- public List PinCodeAssignment { get; set; }
-
- ///
- /// ID of the MA to be used as fallback for this card if insufficient balance. Fallback account is removed if
- /// not supplied.
- ///
- [JsonProperty(PropertyName = "monetary_account_id_fallback")]
- public int? MonetaryAccountIdFallback { get; set; }
-
///
/// The country that is domestic to the card. Defaults to country of residence of user.
///
@@ -182,15 +202,17 @@ public class Card : BunqModel
/// The plaintext pin code. Requests require encryption to be enabled.
/// The activation code required to set status to ACTIVE initially. Can only set status to ACTIVE using activation code when order_status is ACCEPTED_FOR_PRODUCTION and status is DEACTIVATED.
/// The status to set for the card. Can be ACTIVE, DEACTIVATED, LOST, STOLEN or CANCELLED, and can only be set to LOST/STOLEN/CANCELLED when order status is ACCEPTED_FOR_PRODUCTION/DELIVERED_TO_CUSTOMER/CARD_UPDATE_REQUESTED/CARD_UPDATE_SENT/CARD_UPDATE_ACCEPTED. Can only be set to DEACTIVATED after initial activation, i.e. order_status is DELIVERED_TO_CUSTOMER/CARD_UPDATE_REQUESTED/CARD_UPDATE_SENT/CARD_UPDATE_ACCEPTED. Mind that all the possible choices (apart from ACTIVE and DEACTIVATED) are permanent and cannot be changed after.
- /// The limits to define for the card, among CARD_LIMIT_CONTACTLESS, CARD_LIMIT_ATM, CARD_LIMIT_DIPPING and CARD_LIMIT_POS_ICC (e.g. 25 EUR for CARD_LIMIT_CONTACTLESS). All the limits must be provided on update.
+ /// The spending limit for the card.
+ /// DEPRECATED: The limits to define for the card, among CARD_LIMIT_CONTACTLESS, CARD_LIMIT_ATM, CARD_LIMIT_DIPPING and CARD_LIMIT_POS_ICC (e.g. 25 EUR for CARD_LIMIT_CONTACTLESS). All the limits must be provided on update.
/// Whether or not it is allowed to use the mag stripe for the card.
/// The countries for which to grant (temporary) permissions to use the card.
/// Array of Types, PINs, account IDs assigned to the card.
/// ID of the MA to be used as fallback for this card if insufficient balance. Fallback account is removed if not supplied.
public static BunqResponse Update(int cardId, string pinCode = null, string activationCode = null,
- string status = null, List limit = null, CardMagStripePermission magStripePermission = null,
- List countryPermission = null, List pinCodeAssignment = null,
- int? monetaryAccountIdFallback = null, IDictionary customHeaders = null)
+ string status = null, Amount cardLimit = null, List limit = null,
+ CardMagStripePermission magStripePermission = null, List countryPermission = null,
+ List pinCodeAssignment = null, int? monetaryAccountIdFallback = null,
+ IDictionary customHeaders = null)
{
if (customHeaders == null) customHeaders = new Dictionary();
@@ -201,6 +223,7 @@ public static BunqResponse Update(int cardId, string pinCode = null, strin
{FIELD_PIN_CODE, pinCode},
{FIELD_ACTIVATION_CODE, activationCode},
{FIELD_STATUS, status},
+ {FIELD_CARD_LIMIT, cardLimit},
{FIELD_LIMIT, limit},
{FIELD_MAG_STRIPE_PERMISSION, magStripePermission},
{FIELD_COUNTRY_PERMISSION, countryPermission},
@@ -246,7 +269,6 @@ public static BunqResponse> List(IDictionary urlParam
return FromJsonList(responseRaw, OBJECT_TYPE_GET);
}
-
///
///
public override bool IsAllFieldNull()
@@ -316,6 +338,11 @@ public override bool IsAllFieldNull()
return false;
}
+ if (this.CardLimit != null)
+ {
+ return false;
+ }
+
if (this.Limit != null)
{
return false;
diff --git a/BunqSdk/Model/Generated/Endpoint/CardBatch.cs b/BunqSdk/Model/Generated/Endpoint/CardBatch.cs
new file mode 100644
index 0000000..5469cb1
--- /dev/null
+++ b/BunqSdk/Model/Generated/Endpoint/CardBatch.cs
@@ -0,0 +1,86 @@
+using Bunq.Sdk.Context;
+using Bunq.Sdk.Http;
+using Bunq.Sdk.Json;
+using Bunq.Sdk.Model.Core;
+using Bunq.Sdk.Model.Generated.Object;
+using Newtonsoft.Json;
+using System.Collections.Generic;
+using System.Text;
+using System;
+
+namespace Bunq.Sdk.Model.Generated.Endpoint
+{
+ ///
+ /// Used to update multiple cards in a batch.
+ ///
+ public class CardBatch : BunqModel
+ {
+ ///
+ /// Endpoint constants.
+ ///
+ protected const string ENDPOINT_URL_CREATE = "user/{0}/card-batch";
+
+ ///
+ /// Field constants.
+ ///
+ public const string FIELD_CARDS = "cards";
+
+ ///
+ /// Object type.
+ ///
+ private const string OBJECT_TYPE_POST = "CardBatch";
+
+ ///
+ /// The cards that need to be updated.
+ ///
+ [JsonProperty(PropertyName = "cards")]
+ public List Cards { get; set; }
+
+ ///
+ /// The ids of the cards that have been updated.
+ ///
+ [JsonProperty(PropertyName = "updated_card_ids")]
+ public List UpdatedCardIds { get; set; }
+
+ ///
+ ///
+ /// The cards that need to be updated.
+ public static BunqResponse Create(List cards,
+ IDictionary customHeaders = null)
+ {
+ if (customHeaders == null) customHeaders = new Dictionary();
+
+ var apiClient = new ApiClient(GetApiContext());
+
+ var requestMap = new Dictionary
+ {
+ {FIELD_CARDS, cards},
+ };
+
+ var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap));
+ var responseRaw = apiClient.Post(string.Format(ENDPOINT_URL_CREATE, DetermineUserId()), requestBytes,
+ customHeaders);
+
+ return FromJson(responseRaw, OBJECT_TYPE_POST);
+ }
+
+ ///
+ ///
+ public override bool IsAllFieldNull()
+ {
+ if (this.UpdatedCardIds != null)
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ ///
+ ///
+ public static CardBatch CreateFromJsonString(string json)
+ {
+ return BunqModel.CreateFromJsonString(json);
+ }
+ }
+}
\ No newline at end of file
diff --git a/BunqSdk/Model/Generated/Endpoint/CardDebit.cs b/BunqSdk/Model/Generated/Endpoint/CardDebit.cs
index 4669683..882b4ac 100644
--- a/BunqSdk/Model/Generated/Endpoint/CardDebit.cs
+++ b/BunqSdk/Model/Generated/Endpoint/CardDebit.cs
@@ -38,6 +38,43 @@ public class CardDebit : BunqModel
///
private const string OBJECT_TYPE_POST = "CardDebit";
+ ///
+ /// The second line of text on the card
+ ///
+ [JsonProperty(PropertyName = "second_line")]
+ public string SecondLine { get; set; }
+
+ ///
+ /// The user's name as will be on the card
+ ///
+ [JsonProperty(PropertyName = "name_on_card")]
+ public string NameOnCard { get; set; }
+
+ ///
+ /// The label for the user who requested the card.
+ ///
+ [JsonProperty(PropertyName = "alias")]
+ public LabelUser Alias { get; set; }
+
+ ///
+ /// The type of the card. Can be MAESTRO, MASTERCARD.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
+ ///
+ /// Array of Types, PINs, account IDs assigned to the card.
+ ///
+ [JsonProperty(PropertyName = "pin_code_assignment")]
+ public List PinCodeAssignment { get; set; }
+
+ ///
+ /// ID of the MA to be used as fallback for this card if insufficient balance. Fallback account is removed if
+ /// not supplied.
+ ///
+ [JsonProperty(PropertyName = "monetary_account_id_fallback")]
+ public int? MonetaryAccountIdFallback { get; set; }
+
///
/// The id of the card.
///
@@ -62,30 +99,12 @@ public class CardDebit : BunqModel
[JsonProperty(PropertyName = "public_uuid")]
public string PublicUuid { get; set; }
- ///
- /// The type of the card. Can be MAESTRO, MASTERCARD.
- ///
- [JsonProperty(PropertyName = "type")]
- public string Type { get; set; }
-
///
/// The sub_type of card.
///
[JsonProperty(PropertyName = "sub_type")]
public string SubType { get; set; }
- ///
- /// The second line of text on the card
- ///
- [JsonProperty(PropertyName = "second_line")]
- public string SecondLine { get; set; }
-
- ///
- /// The user's name as will be on the card
- ///
- [JsonProperty(PropertyName = "name_on_card")]
- public string NameOnCard { get; set; }
-
///
/// The last 4 digits of the PAN of the card.
///
@@ -134,25 +153,6 @@ public class CardDebit : BunqModel
[JsonProperty(PropertyName = "label_monetary_account_current")]
public MonetaryAccountReference LabelMonetaryAccountCurrent { get; set; }
- ///
- /// The label for the user who requested the card.
- ///
- [JsonProperty(PropertyName = "alias")]
- public LabelUser Alias { get; set; }
-
- ///
- /// Array of Types, PINs, account IDs assigned to the card.
- ///
- [JsonProperty(PropertyName = "pin_code_assignment")]
- public List PinCodeAssignment { get; set; }
-
- ///
- /// ID of the MA to be used as fallback for this card if insufficient balance. Fallback account is removed if
- /// not supplied.
- ///
- [JsonProperty(PropertyName = "monetary_account_id_fallback")]
- public int? MonetaryAccountIdFallback { get; set; }
-
///
/// The country that is domestic to the card. Defaults to country of residence of user.
///
@@ -194,7 +194,6 @@ public static BunqResponse Create(string secondLine, string nameOnCar
return FromJson(responseRaw, OBJECT_TYPE_POST);
}
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/CardGeneratedCvc2.cs b/BunqSdk/Model/Generated/Endpoint/CardGeneratedCvc2.cs
index c9c30e1..893b114 100644
--- a/BunqSdk/Model/Generated/Endpoint/CardGeneratedCvc2.cs
+++ b/BunqSdk/Model/Generated/Endpoint/CardGeneratedCvc2.cs
@@ -34,6 +34,12 @@ public class CardGeneratedCvc2 : BunqModel
///
private const string OBJECT_TYPE_GET = "CardGeneratedCvc2";
+ ///
+ /// The type of generated cvc2. Can be STATIC or GENERATED.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
///
/// The id of the cvc code.
///
@@ -52,12 +58,6 @@ public class CardGeneratedCvc2 : BunqModel
[JsonProperty(PropertyName = "updated")]
public string Updated { get; set; }
- ///
- /// The type of generated cvc2. Can be STATIC or GENERATED.
- ///
- [JsonProperty(PropertyName = "type")]
- public string Type { get; set; }
-
///
/// The cvc2 code.
///
@@ -156,7 +156,6 @@ public static BunqResponse> List(int cardId,
return FromJsonList(responseRaw, OBJECT_TYPE_GET);
}
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/CardName.cs b/BunqSdk/Model/Generated/Endpoint/CardName.cs
index 71e5e3d..c5d61f8 100644
--- a/BunqSdk/Model/Generated/Endpoint/CardName.cs
+++ b/BunqSdk/Model/Generated/Endpoint/CardName.cs
@@ -48,7 +48,6 @@ public static BunqResponse> List(IDictionary urlP
return FromJsonList(responseRaw, OBJECT_TYPE_GET);
}
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/CardReplace.cs b/BunqSdk/Model/Generated/Endpoint/CardReplace.cs
index 7093850..a119c25 100644
--- a/BunqSdk/Model/Generated/Endpoint/CardReplace.cs
+++ b/BunqSdk/Model/Generated/Endpoint/CardReplace.cs
@@ -31,6 +31,23 @@ public class CardReplace : BunqModel
public const string FIELD_PIN_CODE = "pin_code";
public const string FIELD_SECOND_LINE = "second_line";
+ ///
+ /// The user's name as it will be on the card. Check 'card-name' for the available card names for a user.
+ ///
+ [JsonProperty(PropertyName = "name_on_card")]
+ public string NameOnCard { get; set; }
+
+ ///
+ /// The plaintext pin code. Requests require encryption to be enabled.
+ ///
+ [JsonProperty(PropertyName = "pin_code")]
+ public string PinCode { get; set; }
+
+ ///
+ /// The second line on the card.
+ ///
+ [JsonProperty(PropertyName = "second_line")]
+ public string SecondLine { get; set; }
///
/// The id of the new card.
@@ -66,7 +83,6 @@ public static BunqResponse Create(int cardId, string nameOnCard = null, str
return ProcessForId(responseRaw);
}
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/CashRegister.cs b/BunqSdk/Model/Generated/Endpoint/CashRegister.cs
index 3eca140..107b00f 100644
--- a/BunqSdk/Model/Generated/Endpoint/CashRegister.cs
+++ b/BunqSdk/Model/Generated/Endpoint/CashRegister.cs
@@ -44,24 +44,6 @@ public class CashRegister : BunqModel
///
private const string OBJECT_TYPE_GET = "CashRegister";
- ///
- /// The id of the created CashRegister.
- ///
- [JsonProperty(PropertyName = "id")]
- public int? Id { get; set; }
-
- ///
- /// The timestamp of the CashRegister's creation.
- ///
- [JsonProperty(PropertyName = "created")]
- public string Created { get; set; }
-
- ///
- /// The timestamp of the CashRegister's last update.
- ///
- [JsonProperty(PropertyName = "updated")]
- public string Updated { get; set; }
-
///
/// The name of the CashRegister.
///
@@ -75,10 +57,11 @@ public class CashRegister : BunqModel
public string Status { get; set; }
///
- /// The Avatar of the CashRegister.
+ /// The UUID of the avatar of the CashRegister. Use the calls /attachment-public and /avatar to create a new
+ /// Avatar and get its UUID.
///
- [JsonProperty(PropertyName = "avatar")]
- public Avatar Avatar { get; set; }
+ [JsonProperty(PropertyName = "avatar_uuid")]
+ public string AvatarUuid { get; set; }
///
/// The geolocation of the CashRegister. Can be null.
@@ -98,6 +81,30 @@ public class CashRegister : BunqModel
[JsonProperty(PropertyName = "tab_text_waiting_screen")]
public List TabTextWaitingScreen { get; set; }
+ ///
+ /// The id of the created CashRegister.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public int? Id { get; set; }
+
+ ///
+ /// The timestamp of the CashRegister's creation.
+ ///
+ [JsonProperty(PropertyName = "created")]
+ public string Created { get; set; }
+
+ ///
+ /// The timestamp of the CashRegister's last update.
+ ///
+ [JsonProperty(PropertyName = "updated")]
+ public string Updated { get; set; }
+
+ ///
+ /// The Avatar of the CashRegister.
+ ///
+ [JsonProperty(PropertyName = "avatar")]
+ public Avatar Avatar { get; set; }
+
///
/// Create a new CashRegister. Only an UserCompany can create a CashRegisters. They need to be created with
/// status PENDING_APPROVAL, an bunq admin has to approve your CashRegister before you can use it. In the
@@ -210,7 +217,6 @@ public static BunqResponse> List(int? monetaryAccountId = nul
return FromJsonList(responseRaw, OBJECT_TYPE_GET);
}
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/CashRegisterQrCode.cs b/BunqSdk/Model/Generated/Endpoint/CashRegisterQrCode.cs
index 490b13b..884dca6 100644
--- a/BunqSdk/Model/Generated/Endpoint/CashRegisterQrCode.cs
+++ b/BunqSdk/Model/Generated/Endpoint/CashRegisterQrCode.cs
@@ -35,6 +35,13 @@ public class CashRegisterQrCode : BunqModel
///
private const string OBJECT_TYPE_GET = "TokenQrCashRegister";
+ ///
+ /// The status of this QR code. If the status is "ACTIVE" the QR code can be scanned to see the linked
+ /// CashRegister and tab. If the status is "INACTIVE" the QR code does not link to a anything.
+ ///
+ [JsonProperty(PropertyName = "status")]
+ public string Status { get; set; }
+
///
/// The id of the created QR code. Use this id to get the RAW content of the QR code with:
/// ../qr-code/{id}/content
@@ -54,13 +61,6 @@ public class CashRegisterQrCode : BunqModel
[JsonProperty(PropertyName = "updated")]
public string Updated { get; set; }
- ///
- /// The status of this QR code. If the status is "ACTIVE" the QR code can be scanned to see the linked
- /// CashRegister and tab. If the status is "INACTIVE" the QR code does not link to a anything.
- ///
- [JsonProperty(PropertyName = "status")]
- public string Status { get; set; }
-
///
/// The CashRegister that is linked to the token.
///
@@ -158,7 +158,6 @@ public static BunqResponse> List(int cashRegisterId, in
return FromJsonList(responseRaw, OBJECT_TYPE_GET);
}
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/CashRegisterQrCodeContent.cs b/BunqSdk/Model/Generated/Endpoint/CashRegisterQrCodeContent.cs
index fa886ff..d1d51f3 100644
--- a/BunqSdk/Model/Generated/Endpoint/CashRegisterQrCodeContent.cs
+++ b/BunqSdk/Model/Generated/Endpoint/CashRegisterQrCodeContent.cs
@@ -43,7 +43,6 @@ public static BunqResponse List(int cashRegisterId, int qrCodeId, int? m
return new BunqResponse(responseRaw.BodyBytes, responseRaw.Headers);
}
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/CertificatePinned.cs b/BunqSdk/Model/Generated/Endpoint/CertificatePinned.cs
index 5023298..29a94be 100644
--- a/BunqSdk/Model/Generated/Endpoint/CertificatePinned.cs
+++ b/BunqSdk/Model/Generated/Endpoint/CertificatePinned.cs
@@ -117,7 +117,6 @@ public static BunqResponse Get(int certificatePinnedId,
return FromJson(responseRaw, OBJECT_TYPE_GET);
}
-
///
///
public override bool IsAllFieldNull()
diff --git a/BunqSdk/Model/Generated/Endpoint/Customer.cs b/BunqSdk/Model/Generated/Endpoint/Customer.cs
index 1022c29..8586f41 100644
--- a/BunqSdk/Model/Generated/Endpoint/Customer.cs
+++ b/BunqSdk/Model/Generated/Endpoint/Customer.cs
@@ -34,6 +34,18 @@ public class Customer : BunqModel
///
private const string OBJECT_TYPE_GET = "Customer";
+ ///
+ /// The primary billing account account's id.
+ ///
+ [JsonProperty(PropertyName = "billing_account_id")]
+ public string BillingAccountId { get; set; }
+
+ ///
+ /// The preferred notification type for invoices.
+ ///
+ [JsonProperty(PropertyName = "invoice_notification_preference")]
+ public string InvoiceNotificationPreference { get; set; }
+
///
/// The id of the customer.
///
@@ -52,12 +64,6 @@ public class Customer : BunqModel
[JsonProperty(PropertyName = "updated")]
public string Updated { get; set; }
- ///
- /// The primary billing account account's id.
- ///
- [JsonProperty(PropertyName = "billing_account_id")]
- public string BillingAccountId { get; set; }
-
///
///
public static BunqResponse> List(IDictionary urlParams = null,
@@ -110,7 +116,6 @@ public static BunqResponse Update(int customerId, string billingAccountId =
return ProcessForId(responseRaw);
}
-
///
///
public override bool IsAllFieldNull()
@@ -135,6 +140,11 @@ public override bool IsAllFieldNull()
return false;
}
+ if (this.InvoiceNotificationPreference != null)
+ {
+ return false;
+ }
+
return true;
}
diff --git a/BunqSdk/Model/Generated/Endpoint/CustomerLimit.cs b/BunqSdk/Model/Generated/Endpoint/CustomerLimit.cs
index 25ee450..95aadc9 100644
--- a/BunqSdk/Model/Generated/Endpoint/CustomerLimit.cs
+++ b/BunqSdk/Model/Generated/Endpoint/CustomerLimit.cs
@@ -2,6 +2,7 @@
using Bunq.Sdk.Http;
using Bunq.Sdk.Json;
using Bunq.Sdk.Model.Core;
+using Bunq.Sdk.Model.Generated.Object;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Text;
@@ -54,6 +55,24 @@ public class CustomerLimit : BunqModel
[JsonProperty(PropertyName = "limit_card_debit_replacement")]
public int? LimitCardDebitReplacement { get; set; }
+ ///
+ /// The number of "PREMIUM_LIMITED" invites the user has remaining.
+ ///
+ [JsonProperty(PropertyName = "limit_invite_user_premium_limited")]
+ public int? LimitInviteUserPremiumLimited { get; set; }
+
+ ///
+ /// The maximum amount a user is allowed to spend in a month.
+ ///
+ [JsonProperty(PropertyName = "limit_amount_monthly")]
+ public Amount LimitAmountMonthly { get; set; }
+
+ ///
+ /// The amount the user has spent in the last month.
+ ///
+ [JsonProperty(PropertyName = "spent_amount_monthly")]
+ public Amount SpentAmountMonthly { get; set; }
+
///
/// Get all limits for the authenticated user.
///
@@ -70,7 +89,6 @@ public static BunqResponse> List(IDictionary
return FromJsonList(responseRaw, OBJECT_TYPE_GET);
}
-
///
///
public override bool IsAllFieldNull()
@@ -100,6 +118,21 @@ public override bool IsAllFieldNull()
return false;
}
+ if (this.LimitInviteUserPremiumLimited != null)
+ {
+ return false;
+ }
+
+ if (this.LimitAmountMonthly != null)
+ {
+ return false;
+ }
+
+ if (this.SpentAmountMonthly != null)
+ {
+ return false;
+ }
+
return true;
}
diff --git a/BunqSdk/Model/Generated/Endpoint/CustomerStatementExport.cs b/BunqSdk/Model/Generated/Endpoint/CustomerStatementExport.cs
index 011311f..e45e77b 100644
--- a/BunqSdk/Model/Generated/Endpoint/CustomerStatementExport.cs
+++ b/BunqSdk/Model/Generated/Endpoint/CustomerStatementExport.cs
@@ -39,6 +39,30 @@ public class CustomerStatementExport : BunqModel
///
private const string OBJECT_TYPE_GET = "CustomerStatement";
+ ///
+ /// The format of statement.
+ ///
+ [JsonProperty(PropertyName = "statement_format")]
+ public string StatementFormat { get; set; }
+
+ ///
+ /// The date from when this statement shows transactions.
+ ///
+ [JsonProperty(PropertyName = "date_start")]
+ public string DateStart { get; set; }
+
+ ///
+ /// The date until which statement shows transactions.
+ ///
+ [JsonProperty(PropertyName = "date_end")]
+ public string DateEnd { get; set; }
+
+ ///
+ /// The regional format of a CSV statement.
+ ///
+ [JsonProperty(PropertyName = "regional_format")]
+ public string RegionalFormat { get; set; }
+
///
/// The id of the customer statement model.
///
@@ -57,18 +81,6 @@ public class CustomerStatementExport : BunqModel
[JsonProperty(PropertyName = "updated")]
public string Updated { get; set; }
- ///
- /// The date from when this statement shows transactions.
- ///
- [JsonProperty(PropertyName = "date_start")]
- public string DateStart { get; set; }
-
- ///
- /// The date until which statement shows transactions.
- ///
- [JsonProperty(PropertyName = "date_end")]
- public string DateEnd { get; set; }
-
///
/// The status of the export.
///
@@ -81,18 +93,6 @@ public class CustomerStatementExport : BunqModel
[JsonProperty(PropertyName = "statement_number")]
public int? StatementNumber { get; set; }
- ///
- /// The format of statement.
- ///
- [JsonProperty(PropertyName = "statement_format")]
- public string StatementFormat { get; set; }
-
- ///
- /// The regional format of a CSV statement.
- ///
- [JsonProperty(PropertyName = "regional_format")]
- public string RegionalFormat { get; set; }
-
///
/// The monetary account for which this statement was created.
///
@@ -179,7 +179,6 @@ public static BunqResponse