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.0 Bunq.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 Delete(int customerStatementExportId, int? mo return new BunqResponse(null, responseRaw.Headers); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/CustomerStatementExportContent.cs b/BunqSdk/Model/Generated/Endpoint/CustomerStatementExportContent.cs index 9c26220..693e8e8 100644 --- a/BunqSdk/Model/Generated/Endpoint/CustomerStatementExportContent.cs +++ b/BunqSdk/Model/Generated/Endpoint/CustomerStatementExportContent.cs @@ -43,7 +43,6 @@ public static BunqResponse List(int customerStatementId, int? monetaryAc return new BunqResponse(responseRaw.BodyBytes, responseRaw.Headers); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/Device.cs b/BunqSdk/Model/Generated/Endpoint/Device.cs index 9052e97..7491c49 100644 --- a/BunqSdk/Model/Generated/Endpoint/Device.cs +++ b/BunqSdk/Model/Generated/Endpoint/Device.cs @@ -66,7 +66,6 @@ public static BunqResponse> List(IDictionary urlPar return FromJsonList(responseRaw); } - /// /// public BunqModel GetReferencedObject() diff --git a/BunqSdk/Model/Generated/Endpoint/DeviceServer.cs b/BunqSdk/Model/Generated/Endpoint/DeviceServer.cs index 0ee6a7e..2adbd1b 100644 --- a/BunqSdk/Model/Generated/Endpoint/DeviceServer.cs +++ b/BunqSdk/Model/Generated/Endpoint/DeviceServer.cs @@ -36,6 +36,25 @@ public class DeviceServer : BunqModel /// private const string OBJECT_TYPE_GET = "DeviceServer"; + /// + /// The description of the DeviceServer. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The API key. You can request an API key in the bunq app. + /// + [JsonProperty(PropertyName = "secret")] + public string Secret { get; set; } + + /// + /// An array of IPs (v4 or v6) this DeviceServer will be able to do calls from. These will be linked to the API + /// key. + /// + [JsonProperty(PropertyName = "permitted_ips")] + public List PermittedIps { get; set; } + /// /// The id of the DeviceServer as created on the server. /// @@ -54,12 +73,6 @@ public class DeviceServer : BunqModel [JsonProperty(PropertyName = "updated")] public string Updated { get; set; } - /// - /// The description of the DeviceServer. - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - /// /// The ip address which was used to create the DeviceServer. /// @@ -133,7 +146,6 @@ public static BunqResponse> List(IDictionary return FromJsonList(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/DraftPayment.cs b/BunqSdk/Model/Generated/Endpoint/DraftPayment.cs index a6bc109..467227e 100644 --- a/BunqSdk/Model/Generated/Endpoint/DraftPayment.cs +++ b/BunqSdk/Model/Generated/Endpoint/DraftPayment.cs @@ -39,6 +39,32 @@ public class DraftPayment : BunqModel /// private const string OBJECT_TYPE_GET = "DraftPayment"; + /// + /// The status of the DraftPayment. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// The entries in the DraftPayment. + /// + [JsonProperty(PropertyName = "entries")] + public List Entries { get; set; } + + /// + /// The last updated_timestamp that you received for this DraftPayment. This needs to be provided to prevent + /// race conditions. + /// + [JsonProperty(PropertyName = "previous_updated_timestamp")] + public string PreviousUpdatedTimestamp { get; set; } + + /// + /// The number of accepts that are required for the draft payment to receive status ACCEPTED. Currently only 1 + /// is valid. + /// + [JsonProperty(PropertyName = "number_of_required_accepts")] + public int? NumberOfRequiredAccepts { get; set; } + /// /// The id of the created DrafPayment. /// @@ -63,24 +89,12 @@ public class DraftPayment : BunqModel [JsonProperty(PropertyName = "responses")] public List Responses { get; set; } - /// - /// The status of the DraftPayment. - /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - /// /// The type of the DraftPayment. /// [JsonProperty(PropertyName = "type")] public string Type { get; set; } - /// - /// The entries in the DraftPayment. - /// - [JsonProperty(PropertyName = "entries")] - public List Entries { get; set; } - /// /// The Payment or PaymentBatch. This will only be present after the DraftPayment has been accepted. /// @@ -190,7 +204,6 @@ public static BunqResponse Get(int draftPaymentId, int? monetaryAc return FromJson(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/DraftShareInviteApiKey.cs b/BunqSdk/Model/Generated/Endpoint/DraftShareInviteApiKey.cs index 79b42d5..9ac1abf 100644 --- a/BunqSdk/Model/Generated/Endpoint/DraftShareInviteApiKey.cs +++ b/BunqSdk/Model/Generated/Endpoint/DraftShareInviteApiKey.cs @@ -40,12 +40,6 @@ public class DraftShareInviteApiKey : BunqModel private const string OBJECT_TYPE_PUT = "DraftShareInviteApiKey"; - /// - /// The user who created the draft share invite. - /// - [JsonProperty(PropertyName = "user_alias_created")] - public LabelUser UserAliasCreated { get; set; } - /// /// The status of the draft share invite. Can be USED, CANCELLED and PENDING. /// @@ -64,6 +58,12 @@ public class DraftShareInviteApiKey : BunqModel [JsonProperty(PropertyName = "expiration")] public string Expiration { get; set; } + /// + /// The user who created the draft share invite. + /// + [JsonProperty(PropertyName = "user_alias_created")] + public LabelUser UserAliasCreated { get; set; } + /// /// The URL redirecting user to the draft share invite in the app. Only works on mobile devices. /// @@ -167,7 +167,6 @@ public static BunqResponse> List(IDictionary(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/DraftShareInviteApiKeyQrCodeContent.cs b/BunqSdk/Model/Generated/Endpoint/DraftShareInviteApiKeyQrCodeContent.cs index fe5910f..4c0e733 100644 --- a/BunqSdk/Model/Generated/Endpoint/DraftShareInviteApiKeyQrCodeContent.cs +++ b/BunqSdk/Model/Generated/Endpoint/DraftShareInviteApiKeyQrCodeContent.cs @@ -42,7 +42,6 @@ public static BunqResponse List(int draftShareInviteApiKeyId, return new BunqResponse(responseRaw.BodyBytes, responseRaw.Headers); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/DraftShareInviteBank.cs b/BunqSdk/Model/Generated/Endpoint/DraftShareInviteBank.cs index e2d4930..53b0826 100644 --- a/BunqSdk/Model/Generated/Endpoint/DraftShareInviteBank.cs +++ b/BunqSdk/Model/Generated/Endpoint/DraftShareInviteBank.cs @@ -39,12 +39,6 @@ public class DraftShareInviteBank : BunqModel /// private const string OBJECT_TYPE_GET = "DraftShareInviteBank"; - /// - /// The user who created the draft share invite. - /// - [JsonProperty(PropertyName = "user_alias_created")] - public LabelUser UserAliasCreated { get; set; } - /// /// The status of the draft share invite. Can be USED, CANCELLED and PENDING. /// @@ -57,6 +51,18 @@ public class DraftShareInviteBank : BunqModel [JsonProperty(PropertyName = "expiration")] public string Expiration { get; set; } + /// + /// The draft share invite details. + /// + [JsonProperty(PropertyName = "draft_share_settings")] + public DraftShareInviteEntry DraftShareSettings { get; set; } + + /// + /// The user who created the draft share invite. + /// + [JsonProperty(PropertyName = "user_alias_created")] + public LabelUser UserAliasCreated { get; set; } + /// /// The id of the share invite bank response this draft share belongs to. /// @@ -69,12 +75,6 @@ public class DraftShareInviteBank : BunqModel [JsonProperty(PropertyName = "draft_share_url")] public string DraftShareUrl { get; set; } - /// - /// The draft share invite details. - /// - [JsonProperty(PropertyName = "draft_share_settings")] - public DraftShareInviteEntry DraftShareSettings { get; set; } - /// /// The id of the newly created draft share invite. /// @@ -166,7 +166,6 @@ public static BunqResponse> List(IDictionary(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/DraftShareInviteBankQrCodeContent.cs b/BunqSdk/Model/Generated/Endpoint/DraftShareInviteBankQrCodeContent.cs index f50c726..5c61cb9 100644 --- a/BunqSdk/Model/Generated/Endpoint/DraftShareInviteBankQrCodeContent.cs +++ b/BunqSdk/Model/Generated/Endpoint/DraftShareInviteBankQrCodeContent.cs @@ -42,7 +42,6 @@ public static BunqResponse List(int draftShareInviteBankId, return new BunqResponse(responseRaw.BodyBytes, responseRaw.Headers); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/ExportAnnualOverview.cs b/BunqSdk/Model/Generated/Endpoint/ExportAnnualOverview.cs index dfb61d9..c179eb3 100644 --- a/BunqSdk/Model/Generated/Endpoint/ExportAnnualOverview.cs +++ b/BunqSdk/Model/Generated/Endpoint/ExportAnnualOverview.cs @@ -35,6 +35,12 @@ public class ExportAnnualOverview : BunqModel /// private const string OBJECT_TYPE_GET = "ExportAnnualOverview"; + /// + /// The year for which the overview is. + /// + [JsonProperty(PropertyName = "year")] + public int? Year { get; set; } + /// /// The id of the annual overview as created on the server. /// @@ -53,12 +59,6 @@ public class ExportAnnualOverview : BunqModel [JsonProperty(PropertyName = "updated")] public string Updated { get; set; } - /// - /// The year for which the overview is. - /// - [JsonProperty(PropertyName = "year")] - public int? Year { get; set; } - /// /// The user to which this annual overview belongs. /// @@ -133,7 +133,6 @@ public static BunqResponse> List(IDictionary(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/ExportAnnualOverviewContent.cs b/BunqSdk/Model/Generated/Endpoint/ExportAnnualOverviewContent.cs index 9fc62c3..a987dc9 100644 --- a/BunqSdk/Model/Generated/Endpoint/ExportAnnualOverviewContent.cs +++ b/BunqSdk/Model/Generated/Endpoint/ExportAnnualOverviewContent.cs @@ -41,7 +41,6 @@ public static BunqResponse List(int exportAnnualOverviewId, return new BunqResponse(responseRaw.BodyBytes, responseRaw.Headers); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/IdealMerchantTransaction.cs b/BunqSdk/Model/Generated/Endpoint/IdealMerchantTransaction.cs index fa2d304..4c0b045 100644 --- a/BunqSdk/Model/Generated/Endpoint/IdealMerchantTransaction.cs +++ b/BunqSdk/Model/Generated/Endpoint/IdealMerchantTransaction.cs @@ -35,6 +35,18 @@ public class IdealMerchantTransaction : BunqModel /// private const string OBJECT_TYPE_GET = "IdealMerchantTransaction"; + /// + /// The requested amount of money to add. + /// + [JsonProperty(PropertyName = "amount_requested")] + public Amount AmountRequested { get; set; } + + /// + /// The BIC of the issuer. + /// + [JsonProperty(PropertyName = "issuer")] + public string Issuer { get; set; } + /// /// The id of the monetary account this ideal merchant transaction links to. /// @@ -59,24 +71,12 @@ public class IdealMerchantTransaction : BunqModel [JsonProperty(PropertyName = "amount_guaranteed")] public Amount AmountGuaranteed { get; set; } - /// - /// The requested amount of money to add. - /// - [JsonProperty(PropertyName = "amount_requested")] - public Amount AmountRequested { get; set; } - /// /// When the transaction will expire. /// [JsonProperty(PropertyName = "expiration")] public string Expiration { get; set; } - /// - /// The BIC of the issuer. - /// - [JsonProperty(PropertyName = "issuer")] - public string Issuer { get; set; } - /// /// The Name of the issuer. /// @@ -178,7 +178,6 @@ public static BunqResponse> List(int? monetaryAcc return FromJsonList(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/InstallationServerPublicKey.cs b/BunqSdk/Model/Generated/Endpoint/InstallationServerPublicKey.cs index ab0fb97..d86dbc2 100644 --- a/BunqSdk/Model/Generated/Endpoint/InstallationServerPublicKey.cs +++ b/BunqSdk/Model/Generated/Endpoint/InstallationServerPublicKey.cs @@ -47,7 +47,6 @@ public static BunqResponse> List(int installat return FromJsonList(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/Invoice.cs b/BunqSdk/Model/Generated/Endpoint/Invoice.cs index babc6cb..5e3ce7c 100644 --- a/BunqSdk/Model/Generated/Endpoint/Invoice.cs +++ b/BunqSdk/Model/Generated/Endpoint/Invoice.cs @@ -35,6 +35,24 @@ public class Invoice : BunqModel /// private const string OBJECT_TYPE_GET = "Invoice"; + /// + /// The invoice status. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// The description provided by the admin. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The external url provided by the admin. + /// + [JsonProperty(PropertyName = "external_url")] + public string ExternalUrl { get; set; } + /// /// The id of the invoice object. /// @@ -65,12 +83,6 @@ public class Invoice : BunqModel [JsonProperty(PropertyName = "invoice_number")] public string InvoiceNumber { get; set; } - /// - /// The invoice status. - /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - /// /// The invoice item groups. /// @@ -170,7 +182,6 @@ public static BunqResponse Get(int invoiceId, int? monetaryAccountId = return FromJson(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/InvoiceByUser.cs b/BunqSdk/Model/Generated/Endpoint/InvoiceByUser.cs index f176321..a6ee7f1 100644 --- a/BunqSdk/Model/Generated/Endpoint/InvoiceByUser.cs +++ b/BunqSdk/Model/Generated/Endpoint/InvoiceByUser.cs @@ -152,7 +152,6 @@ public static BunqResponse Get(int invoiceByUserId, return FromJson(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/MasterCardAction.cs b/BunqSdk/Model/Generated/Endpoint/MasterCardAction.cs index 3b476a8..dec7ca8 100644 --- a/BunqSdk/Model/Generated/Endpoint/MasterCardAction.cs +++ b/BunqSdk/Model/Generated/Endpoint/MasterCardAction.cs @@ -75,6 +75,12 @@ public class MasterCardAction : BunqModel [JsonProperty(PropertyName = "amount_fee")] public Amount AmountFee { get; set; } + /// + /// The response code by which authorised transaction can be identified as authorised by bunq. + /// + [JsonProperty(PropertyName = "card_authorisation_id_response")] + public string CardAuthorisationIdResponse { get; set; } + /// /// Why the transaction was denied, if it was denied, or just ALLOWED. /// @@ -117,6 +123,12 @@ public class MasterCardAction : BunqModel [JsonProperty(PropertyName = "pan_entry_mode_user")] public string PanEntryModeUser { get; set; } + /// + /// The setlement status in the authorisation process. + /// + [JsonProperty(PropertyName = "settlement_status")] + public string SettlementStatus { get; set; } + /// /// The city where the message originates from as announced by the terminal. /// @@ -224,7 +236,6 @@ public static BunqResponse> List(int? monetaryAccountId = return FromJsonList(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() @@ -269,6 +280,11 @@ public override bool IsAllFieldNull() return false; } + if (this.CardAuthorisationIdResponse != null) + { + return false; + } + if (this.Decision != null) { return false; @@ -304,6 +320,11 @@ public override bool IsAllFieldNull() return false; } + if (this.SettlementStatus != null) + { + return false; + } + if (this.City != null) { return false; diff --git a/BunqSdk/Model/Generated/Endpoint/MonetaryAccount.cs b/BunqSdk/Model/Generated/Endpoint/MonetaryAccount.cs index b75b836..b601255 100644 --- a/BunqSdk/Model/Generated/Endpoint/MonetaryAccount.cs +++ b/BunqSdk/Model/Generated/Endpoint/MonetaryAccount.cs @@ -83,7 +83,6 @@ public static BunqResponse> List(IDictionary(responseRaw); } - /// /// public BunqModel GetReferencedObject() diff --git a/BunqSdk/Model/Generated/Endpoint/MonetaryAccountBank.cs b/BunqSdk/Model/Generated/Endpoint/MonetaryAccountBank.cs index b408283..795e7f9 100644 --- a/BunqSdk/Model/Generated/Endpoint/MonetaryAccountBank.cs +++ b/BunqSdk/Model/Generated/Endpoint/MonetaryAccountBank.cs @@ -48,6 +48,71 @@ public class MonetaryAccountBank : BunqModel /// private const string OBJECT_TYPE_GET = "MonetaryAccountBank"; + /// + /// The currency of the MonetaryAccountBank as an ISO 4217 formatted currency code. + /// + [JsonProperty(PropertyName = "currency")] + public string Currency { get; set; } + + /// + /// The description of the MonetaryAccountBank. Defaults to 'bunq account'. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The daily spending limit Amount of the MonetaryAccountBank. Defaults to 1000 EUR. Currency must match the + /// MonetaryAccountBank's currency. Limited to 10000 EUR. + /// + [JsonProperty(PropertyName = "daily_limit")] + public Amount DailyLimit { get; set; } + + /// + /// The UUID of the Avatar of the MonetaryAccountBank. + /// + [JsonProperty(PropertyName = "avatar_uuid")] + public string AvatarUuid { get; set; } + + /// + /// The status of the MonetaryAccountBank. Can be: ACTIVE, BLOCKED, CANCELLED or PENDING_REOPEN + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// The sub-status of the MonetaryAccountBank providing extra information regarding the status. Will be NONE for + /// ACTIVE or PENDING_REOPEN, COMPLETELY or ONLY_ACCEPTING_INCOMING for BLOCKED and REDEMPTION_INVOLUNTARY, + /// REDEMPTION_VOLUNTARY or PERMANENT for CANCELLED. + /// + [JsonProperty(PropertyName = "sub_status")] + public string SubStatus { get; set; } + + /// + /// The reason for voluntarily cancelling (closing) the MonetaryAccountBank, can only be OTHER. + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + /// + /// The optional free-form reason for voluntarily cancelling (closing) the MonetaryAccountBank. Can be any user + /// provided message. + /// + [JsonProperty(PropertyName = "reason_description")] + public string ReasonDescription { get; set; } + + /// + /// The types of notifications that will result in a push notification or URL callback for this + /// MonetaryAccountBank. + /// + [JsonProperty(PropertyName = "notification_filters")] + public List NotificationFilters { get; set; } + + /// + /// The settings of the MonetaryAccountBank. + /// + [JsonProperty(PropertyName = "setting")] + public MonetaryAccountSetting Setting { get; set; } + /// /// The id of the MonetaryAccountBank. /// @@ -72,25 +137,6 @@ public class MonetaryAccountBank : BunqModel [JsonProperty(PropertyName = "avatar")] public Avatar Avatar { get; set; } - /// - /// The currency of the MonetaryAccountBank as an ISO 4217 formatted currency code. - /// - [JsonProperty(PropertyName = "currency")] - public string Currency { get; set; } - - /// - /// The description of the MonetaryAccountBank. Defaults to 'bunq account'. - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - /// - /// The daily spending limit Amount of the MonetaryAccountBank. Defaults to 1000 EUR. Currency must match the - /// MonetaryAccountBank's currency. Limited to 10000 EUR. - /// - [JsonProperty(PropertyName = "daily_limit")] - public Amount DailyLimit { get; set; } - /// /// Total Amount of money spent today. Timezone aware. /// @@ -121,33 +167,6 @@ public class MonetaryAccountBank : BunqModel [JsonProperty(PropertyName = "public_uuid")] public string PublicUuid { get; set; } - /// - /// The status of the MonetaryAccountBank. Can be: ACTIVE, BLOCKED, CANCELLED or PENDING_REOPEN - /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - - /// - /// The sub-status of the MonetaryAccountBank providing extra information regarding the status. Will be NONE for - /// ACTIVE or PENDING_REOPEN, COMPLETELY or ONLY_ACCEPTING_INCOMING for BLOCKED and REDEMPTION_INVOLUNTARY, - /// REDEMPTION_VOLUNTARY or PERMANENT for CANCELLED. - /// - [JsonProperty(PropertyName = "sub_status")] - public string SubStatus { get; set; } - - /// - /// The reason for voluntarily cancelling (closing) the MonetaryAccountBank, can only be OTHER. - /// - [JsonProperty(PropertyName = "reason")] - public string Reason { get; set; } - - /// - /// The optional free-form reason for voluntarily cancelling (closing) the MonetaryAccountBank. Can be any user - /// provided message. - /// - [JsonProperty(PropertyName = "reason_description")] - public string ReasonDescription { get; set; } - /// /// The id of the User who owns the MonetaryAccountBank. /// @@ -160,19 +179,6 @@ public class MonetaryAccountBank : BunqModel [JsonProperty(PropertyName = "monetary_account_profile")] public MonetaryAccountProfile MonetaryAccountProfile { get; set; } - /// - /// The types of notifications that will result in a push notification or URL callback for this - /// MonetaryAccountBank. - /// - [JsonProperty(PropertyName = "notification_filters")] - public List NotificationFilters { get; set; } - - /// - /// The settings of the MonetaryAccountBank. - /// - [JsonProperty(PropertyName = "setting")] - public MonetaryAccountSetting Setting { get; set; } - /// /// Create new MonetaryAccountBank. /// @@ -289,7 +295,6 @@ public static BunqResponse> List(IDictionary(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/MonetaryAccountJoint.cs b/BunqSdk/Model/Generated/Endpoint/MonetaryAccountJoint.cs index bac6e06..7fbdec6 100644 --- a/BunqSdk/Model/Generated/Endpoint/MonetaryAccountJoint.cs +++ b/BunqSdk/Model/Generated/Endpoint/MonetaryAccountJoint.cs @@ -47,30 +47,6 @@ public class MonetaryAccountJoint : BunqModel /// private const string OBJECT_TYPE_GET = "MonetaryAccountJoint"; - /// - /// The id of the MonetaryAccountJoint. - /// - [JsonProperty(PropertyName = "id")] - public int? Id { get; set; } - - /// - /// The timestamp of the MonetaryAccountJoint's creation. - /// - [JsonProperty(PropertyName = "created")] - public string Created { get; set; } - - /// - /// The timestamp of the MonetaryAccountJoint's last update. - /// - [JsonProperty(PropertyName = "updated")] - public string Updated { get; set; } - - /// - /// The Avatar of the MonetaryAccountJoint. - /// - [JsonProperty(PropertyName = "avatar")] - public Avatar Avatar { get; set; } - /// /// The currency of the MonetaryAccountJoint as an ISO 4217 formatted currency code. /// @@ -90,24 +66,12 @@ public class MonetaryAccountJoint : BunqModel [JsonProperty(PropertyName = "daily_limit")] public Amount DailyLimit { get; set; } - /// - /// Total Amount of money spent today. Timezone aware. - /// - [JsonProperty(PropertyName = "daily_spent")] - public Amount DailySpent { get; set; } - /// /// The maximum Amount the MonetaryAccountJoint can be 'in the red'. /// [JsonProperty(PropertyName = "overdraft_limit")] public Amount OverdraftLimit { get; set; } - /// - /// The current balance Amount of the MonetaryAccountJoint. - /// - [JsonProperty(PropertyName = "balance")] - public Amount Balance { get; set; } - /// /// The Aliases for the MonetaryAccountJoint. /// @@ -115,10 +79,10 @@ public class MonetaryAccountJoint : BunqModel public List Alias { get; set; } /// - /// The MonetaryAccountJoint's public UUID. + /// The UUID of the Avatar of the MonetaryAccountJoint. /// - [JsonProperty(PropertyName = "public_uuid")] - public string PublicUuid { get; set; } + [JsonProperty(PropertyName = "avatar_uuid")] + public string AvatarUuid { get; set; } /// /// The status of the MonetaryAccountJoint. Can be: ACTIVE, BLOCKED, CANCELLED or PENDING_REOPEN @@ -153,18 +117,6 @@ public class MonetaryAccountJoint : BunqModel [JsonProperty(PropertyName = "all_co_owner")] public List AllCoOwner { get; set; } - /// - /// The id of the User who owns the MonetaryAccountJoint. - /// - [JsonProperty(PropertyName = "user_id")] - public int? UserId { get; set; } - - /// - /// The profile of the account. - /// - [JsonProperty(PropertyName = "monetary_account_profile")] - public MonetaryAccountProfile MonetaryAccountProfile { get; set; } - /// /// The types of notifications that will result in a push notification or URL callback for this /// MonetaryAccountJoint. @@ -178,6 +130,60 @@ public class MonetaryAccountJoint : BunqModel [JsonProperty(PropertyName = "setting")] public MonetaryAccountSetting Setting { get; set; } + /// + /// The id of the MonetaryAccountJoint. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the MonetaryAccountJoint's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the MonetaryAccountJoint's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The Avatar of the MonetaryAccountJoint. + /// + [JsonProperty(PropertyName = "avatar")] + public Avatar Avatar { get; set; } + + /// + /// Total Amount of money spent today. Timezone aware. + /// + [JsonProperty(PropertyName = "daily_spent")] + public Amount DailySpent { get; set; } + + /// + /// The current balance Amount of the MonetaryAccountJoint. + /// + [JsonProperty(PropertyName = "balance")] + public Amount Balance { get; set; } + + /// + /// The MonetaryAccountJoint's public UUID. + /// + [JsonProperty(PropertyName = "public_uuid")] + public string PublicUuid { get; set; } + + /// + /// The id of the User who owns the MonetaryAccountJoint. + /// + [JsonProperty(PropertyName = "user_id")] + public int? UserId { get; set; } + + /// + /// The profile of the account. + /// + [JsonProperty(PropertyName = "monetary_account_profile")] + public MonetaryAccountProfile MonetaryAccountProfile { get; set; } + /// /// /// The currency of the MonetaryAccountJoint as an ISO 4217 formatted currency code. @@ -297,7 +303,6 @@ public static BunqResponse> List(IDictionary(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/MonetaryAccountLight.cs b/BunqSdk/Model/Generated/Endpoint/MonetaryAccountLight.cs index c5e8a93..f5cc014 100644 --- a/BunqSdk/Model/Generated/Endpoint/MonetaryAccountLight.cs +++ b/BunqSdk/Model/Generated/Endpoint/MonetaryAccountLight.cs @@ -47,30 +47,6 @@ public class MonetaryAccountLight : BunqModel /// private const string OBJECT_TYPE_GET = "MonetaryAccountLight"; - /// - /// The id of the MonetaryAccountLight. - /// - [JsonProperty(PropertyName = "id")] - public int? Id { get; set; } - - /// - /// The timestamp of the MonetaryAccountLight's creation. - /// - [JsonProperty(PropertyName = "created")] - public string Created { get; set; } - - /// - /// The timestamp of the MonetaryAccountLight's last update. - /// - [JsonProperty(PropertyName = "updated")] - public string Updated { get; set; } - - /// - /// The Avatar of the MonetaryAccountLight. - /// - [JsonProperty(PropertyName = "avatar")] - public Avatar Avatar { get; set; } - /// /// The currency of the MonetaryAccountLight as an ISO 4217 formatted currency code. /// @@ -91,28 +67,10 @@ public class MonetaryAccountLight : BunqModel public Amount DailyLimit { get; set; } /// - /// Total Amount of money spent today. Timezone aware. - /// - [JsonProperty(PropertyName = "daily_spent")] - public Amount DailySpent { get; set; } - - /// - /// The current balance Amount of the MonetaryAccountLight. - /// - [JsonProperty(PropertyName = "balance")] - public Amount Balance { get; set; } - - /// - /// The Aliases for the MonetaryAccountLight. + /// The UUID of the Avatar of the MonetaryAccountLight. /// - [JsonProperty(PropertyName = "alias")] - public List Alias { get; set; } - - /// - /// The MonetaryAccountLight's public UUID. - /// - [JsonProperty(PropertyName = "public_uuid")] - public string PublicUuid { get; set; } + [JsonProperty(PropertyName = "avatar_uuid")] + public string AvatarUuid { get; set; } /// /// The status of the MonetaryAccountLight. Can be: ACTIVE, BLOCKED, CANCELLED or PENDING_REOPEN @@ -141,6 +99,67 @@ public class MonetaryAccountLight : BunqModel [JsonProperty(PropertyName = "reason_description")] public string ReasonDescription { get; set; } + /// + /// The types of notifications that will result in a push notification or URL callback for this + /// MonetaryAccountLight. + /// + [JsonProperty(PropertyName = "notification_filters")] + public List NotificationFilters { get; set; } + + /// + /// The settings of the MonetaryAccountLight. + /// + [JsonProperty(PropertyName = "setting")] + public MonetaryAccountSetting Setting { get; set; } + + /// + /// The id of the MonetaryAccountLight. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the MonetaryAccountLight's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the MonetaryAccountLight's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The Avatar of the MonetaryAccountLight. + /// + [JsonProperty(PropertyName = "avatar")] + public Avatar Avatar { get; set; } + + /// + /// Total Amount of money spent today. Timezone aware. + /// + [JsonProperty(PropertyName = "daily_spent")] + public Amount DailySpent { get; set; } + + /// + /// The current balance Amount of the MonetaryAccountLight. + /// + [JsonProperty(PropertyName = "balance")] + public Amount Balance { get; set; } + + /// + /// The Aliases for the MonetaryAccountLight. + /// + [JsonProperty(PropertyName = "alias")] + public List Alias { get; set; } + + /// + /// The MonetaryAccountLight's public UUID. + /// + [JsonProperty(PropertyName = "public_uuid")] + public string PublicUuid { get; set; } + /// /// The id of the User who owns the MonetaryAccountLight. /// @@ -189,19 +208,6 @@ public class MonetaryAccountLight : BunqModel [JsonProperty(PropertyName = "budget_withdrawal_year_maximum")] public Amount BudgetWithdrawalYearMaximum { get; set; } - /// - /// The types of notifications that will result in a push notification or URL callback for this - /// MonetaryAccountLight. - /// - [JsonProperty(PropertyName = "notification_filters")] - public List NotificationFilters { get; set; } - - /// - /// The settings of the MonetaryAccountLight. - /// - [JsonProperty(PropertyName = "setting")] - public MonetaryAccountSetting Setting { get; set; } - /// /// Create new MonetaryAccountLight. /// @@ -318,7 +324,6 @@ public static BunqResponse> List(IDictionary(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/MonetaryAccountProfile.cs b/BunqSdk/Model/Generated/Endpoint/MonetaryAccountProfile.cs index 458892f..3115daf 100644 --- a/BunqSdk/Model/Generated/Endpoint/MonetaryAccountProfile.cs +++ b/BunqSdk/Model/Generated/Endpoint/MonetaryAccountProfile.cs @@ -17,7 +17,6 @@ public class MonetaryAccountProfile : BunqModel public const string FIELD_PROFILE_DRAIN = "profile_drain"; - /// /// The profile settings for triggering the fill of a monetary account. /// @@ -30,7 +29,6 @@ public class MonetaryAccountProfile : BunqModel [JsonProperty(PropertyName = "profile_drain")] public MonetaryAccountProfileDrain ProfileDrain { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/NoteAttachmentBankSwitchServiceNetherlandsIncomingPayment.cs b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentBankSwitchServiceNetherlandsIncomingPayment.cs new file mode 100644 index 0000000..b85529b --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentBankSwitchServiceNetherlandsIncomingPayment.cs @@ -0,0 +1,241 @@ +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 manage attachment notes. + /// + public class NoteAttachmentBankSwitchServiceNetherlandsIncomingPayment : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = + "user/{0}/monetary-account/{1}/switch-service-payment/{2}/note-attachment"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/switch-service-payment/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/switch-service-payment/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_LISTING = + "user/{0}/monetary-account/{1}/switch-service-payment/{2}/note-attachment"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/switch-service-payment/{2}/note-attachment/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_DESCRIPTION = "description"; + + public const string FIELD_ATTACHMENT_ID = "attachment_id"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteAttachment"; + + /// + /// Optional description of the attachment. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The reference to the uploaded file to attach to this note. + /// + [JsonProperty(PropertyName = "attachment_id")] + public int? AttachmentId { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// The attachment attached to the note. + /// + [JsonProperty(PropertyName = "attachment")] + public List Attachment { get; set; } + + /// + /// + /// The reference to the uploaded file to attach to this note. + /// Optional description of the attachment. + public static BunqResponse Create(int switchServicePaymentId, int? attachmentId, + int? monetaryAccountId = null, string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + {FIELD_ATTACHMENT_ID, attachmentId}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + switchServicePaymentId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// Optional description of the attachment. + public static BunqResponse Update(int switchServicePaymentId, + int noteAttachmentBankSwitchServiceNetherlandsIncomingPaymentId, int? monetaryAccountId = null, + string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + switchServicePaymentId, noteAttachmentBankSwitchServiceNetherlandsIncomingPaymentId), requestBytes, + customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int switchServicePaymentId, + int noteAttachmentBankSwitchServiceNetherlandsIncomingPaymentId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + switchServicePaymentId, noteAttachmentBankSwitchServiceNetherlandsIncomingPaymentId), + customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List( + int switchServicePaymentId, int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), switchServicePaymentId), urlParams, + customHeaders); + + return FromJsonList(responseRaw, + OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get( + int switchServicePaymentId, int noteAttachmentBankSwitchServiceNetherlandsIncomingPaymentId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + switchServicePaymentId, noteAttachmentBankSwitchServiceNetherlandsIncomingPaymentId), + new Dictionary(), customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Description != null) + { + return false; + } + + if (this.Attachment != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteAttachmentBankSwitchServiceNetherlandsIncomingPayment CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteAttachmentBunqMeFundraiserResult.cs b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentBunqMeFundraiserResult.cs new file mode 100644 index 0000000..e1c3dcf --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentBunqMeFundraiserResult.cs @@ -0,0 +1,238 @@ +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 manage attachment notes. + /// + public class NoteAttachmentBunqMeFundraiserResult : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = + "user/{0}/monetary-account/{1}/bunqme-fundraiser-result/{2}/note-attachment"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/bunqme-fundraiser-result/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/bunqme-fundraiser-result/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_LISTING = + "user/{0}/monetary-account/{1}/bunqme-fundraiser-result/{2}/note-attachment"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/bunqme-fundraiser-result/{2}/note-attachment/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_DESCRIPTION = "description"; + + public const string FIELD_ATTACHMENT_ID = "attachment_id"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteAttachment"; + + /// + /// Optional description of the attachment. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The reference to the uploaded file to attach to this note. + /// + [JsonProperty(PropertyName = "attachment_id")] + public int? AttachmentId { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// The attachment attached to the note. + /// + [JsonProperty(PropertyName = "attachment")] + public List Attachment { get; set; } + + /// + /// + /// The reference to the uploaded file to attach to this note. + /// Optional description of the attachment. + public static BunqResponse Create(int bunqmeFundraiserResultId, int? attachmentId, + int? monetaryAccountId = null, string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + {FIELD_ATTACHMENT_ID, attachmentId}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + bunqmeFundraiserResultId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// Optional description of the attachment. + public static BunqResponse Update(int bunqmeFundraiserResultId, int noteAttachmentBunqMeFundraiserResultId, + int? monetaryAccountId = null, string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + bunqmeFundraiserResultId, noteAttachmentBunqMeFundraiserResultId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int bunqmeFundraiserResultId, + int noteAttachmentBunqMeFundraiserResultId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + bunqmeFundraiserResultId, noteAttachmentBunqMeFundraiserResultId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int bunqmeFundraiserResultId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), bunqmeFundraiserResultId), urlParams, + customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int bunqmeFundraiserResultId, + int noteAttachmentBunqMeFundraiserResultId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + bunqmeFundraiserResultId, noteAttachmentBunqMeFundraiserResultId), new Dictionary(), + customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Description != null) + { + return false; + } + + if (this.Attachment != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteAttachmentBunqMeFundraiserResult CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteAttachmentDraftPayment.cs b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentDraftPayment.cs new file mode 100644 index 0000000..409c11e --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentDraftPayment.cs @@ -0,0 +1,233 @@ +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 manage attachment notes. + /// + public class NoteAttachmentDraftPayment : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = "user/{0}/monetary-account/{1}/draft-payment/{2}/note-attachment"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/draft-payment/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/draft-payment/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_LISTING = "user/{0}/monetary-account/{1}/draft-payment/{2}/note-attachment"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/draft-payment/{2}/note-attachment/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_DESCRIPTION = "description"; + + public const string FIELD_ATTACHMENT_ID = "attachment_id"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteAttachment"; + + /// + /// Optional description of the attachment. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The reference to the uploaded file to attach to this note. + /// + [JsonProperty(PropertyName = "attachment_id")] + public int? AttachmentId { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// The attachment attached to the note. + /// + [JsonProperty(PropertyName = "attachment")] + public List Attachment { get; set; } + + /// + /// + /// The reference to the uploaded file to attach to this note. + /// Optional description of the attachment. + public static BunqResponse Create(int draftPaymentId, int? attachmentId, int? monetaryAccountId = null, + string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + {FIELD_ATTACHMENT_ID, attachmentId}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + draftPaymentId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// Optional description of the attachment. + public static BunqResponse Update(int draftPaymentId, int noteAttachmentDraftPaymentId, + int? monetaryAccountId = null, string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + draftPaymentId, noteAttachmentDraftPaymentId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int draftPaymentId, int noteAttachmentDraftPaymentId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + draftPaymentId, noteAttachmentDraftPaymentId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int draftPaymentId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), draftPaymentId), urlParams, customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int draftPaymentId, int noteAttachmentDraftPaymentId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + draftPaymentId, noteAttachmentDraftPaymentId), new Dictionary(), customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Description != null) + { + return false; + } + + if (this.Attachment != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteAttachmentDraftPayment CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteAttachmentIdealMerchantTransaction.cs b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentIdealMerchantTransaction.cs new file mode 100644 index 0000000..94dff83 --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentIdealMerchantTransaction.cs @@ -0,0 +1,240 @@ +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 manage attachment notes. + /// + public class NoteAttachmentIdealMerchantTransaction : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = + "user/{0}/monetary-account/{1}/ideal-merchant-transaction/{2}/note-attachment"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/ideal-merchant-transaction/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/ideal-merchant-transaction/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_LISTING = + "user/{0}/monetary-account/{1}/ideal-merchant-transaction/{2}/note-attachment"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/ideal-merchant-transaction/{2}/note-attachment/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_DESCRIPTION = "description"; + + public const string FIELD_ATTACHMENT_ID = "attachment_id"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteAttachment"; + + /// + /// Optional description of the attachment. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The reference to the uploaded file to attach to this note. + /// + [JsonProperty(PropertyName = "attachment_id")] + public int? AttachmentId { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// The attachment attached to the note. + /// + [JsonProperty(PropertyName = "attachment")] + public List Attachment { get; set; } + + /// + /// + /// The reference to the uploaded file to attach to this note. + /// Optional description of the attachment. + public static BunqResponse Create(int idealMerchantTransactionId, int? attachmentId, + int? monetaryAccountId = null, string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + {FIELD_ATTACHMENT_ID, attachmentId}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + idealMerchantTransactionId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// Optional description of the attachment. + public static BunqResponse Update(int idealMerchantTransactionId, + int noteAttachmentIdealMerchantTransactionId, int? monetaryAccountId = null, string description = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + idealMerchantTransactionId, noteAttachmentIdealMerchantTransactionId), requestBytes, + customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int idealMerchantTransactionId, + int noteAttachmentIdealMerchantTransactionId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + idealMerchantTransactionId, noteAttachmentIdealMerchantTransactionId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int idealMerchantTransactionId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), idealMerchantTransactionId), urlParams, + customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int idealMerchantTransactionId, + int noteAttachmentIdealMerchantTransactionId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + idealMerchantTransactionId, noteAttachmentIdealMerchantTransactionId), + new Dictionary(), customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Description != null) + { + return false; + } + + if (this.Attachment != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteAttachmentIdealMerchantTransaction CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteAttachmentMasterCardAction.cs b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentMasterCardAction.cs new file mode 100644 index 0000000..d8cd5f0 --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentMasterCardAction.cs @@ -0,0 +1,237 @@ +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 manage attachment notes. + /// + public class NoteAttachmentMasterCardAction : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = + "user/{0}/monetary-account/{1}/mastercard-action/{2}/note-attachment"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/mastercard-action/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/mastercard-action/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_LISTING = + "user/{0}/monetary-account/{1}/mastercard-action/{2}/note-attachment"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/mastercard-action/{2}/note-attachment/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_DESCRIPTION = "description"; + + public const string FIELD_ATTACHMENT_ID = "attachment_id"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteAttachment"; + + /// + /// Optional description of the attachment. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The reference to the uploaded file to attach to this note. + /// + [JsonProperty(PropertyName = "attachment_id")] + public int? AttachmentId { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// The attachment attached to the note. + /// + [JsonProperty(PropertyName = "attachment")] + public List Attachment { get; set; } + + /// + /// + /// The reference to the uploaded file to attach to this note. + /// Optional description of the attachment. + public static BunqResponse Create(int mastercardActionId, int? attachmentId, int? monetaryAccountId = null, + string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + {FIELD_ATTACHMENT_ID, attachmentId}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + mastercardActionId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// Optional description of the attachment. + public static BunqResponse Update(int mastercardActionId, int noteAttachmentMasterCardActionId, + int? monetaryAccountId = null, string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + mastercardActionId, noteAttachmentMasterCardActionId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int mastercardActionId, int noteAttachmentMasterCardActionId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + mastercardActionId, noteAttachmentMasterCardActionId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int mastercardActionId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), mastercardActionId), urlParams, customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int mastercardActionId, + int noteAttachmentMasterCardActionId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + mastercardActionId, noteAttachmentMasterCardActionId), new Dictionary(), + customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Description != null) + { + return false; + } + + if (this.Attachment != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteAttachmentMasterCardAction CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteAttachmentPayment.cs b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentPayment.cs new file mode 100644 index 0000000..4f3890b --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentPayment.cs @@ -0,0 +1,226 @@ +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 manage attachment notes. + /// + public class NoteAttachmentPayment : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = "user/{0}/monetary-account/{1}/payment/{2}/note-attachment"; + + protected const string ENDPOINT_URL_UPDATE = "user/{0}/monetary-account/{1}/payment/{2}/note-attachment/{3}"; + protected const string ENDPOINT_URL_DELETE = "user/{0}/monetary-account/{1}/payment/{2}/note-attachment/{3}"; + protected const string ENDPOINT_URL_LISTING = "user/{0}/monetary-account/{1}/payment/{2}/note-attachment"; + protected const string ENDPOINT_URL_READ = "user/{0}/monetary-account/{1}/payment/{2}/note-attachment/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_DESCRIPTION = "description"; + + public const string FIELD_ATTACHMENT_ID = "attachment_id"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteAttachment"; + + /// + /// Optional description of the attachment. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The reference to the uploaded file to attach to this note. + /// + [JsonProperty(PropertyName = "attachment_id")] + public int? AttachmentId { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// The attachment attached to the note. + /// + [JsonProperty(PropertyName = "attachment")] + public List Attachment { get; set; } + + /// + /// + /// The reference to the uploaded file to attach to this note. + /// Optional description of the attachment. + public static BunqResponse Create(int paymentId, int? attachmentId, int? monetaryAccountId = null, + string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + {FIELD_ATTACHMENT_ID, attachmentId}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + paymentId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// Optional description of the attachment. + public static BunqResponse Update(int paymentId, int noteAttachmentPaymentId, + int? monetaryAccountId = null, string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + paymentId, noteAttachmentPaymentId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int paymentId, int noteAttachmentPaymentId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + paymentId, noteAttachmentPaymentId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int paymentId, int? monetaryAccountId = null, + IDictionary urlParams = null, IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), paymentId), urlParams, customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int paymentId, int noteAttachmentPaymentId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + paymentId, noteAttachmentPaymentId), new Dictionary(), customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Description != null) + { + return false; + } + + if (this.Attachment != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteAttachmentPayment CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteAttachmentPaymentBatch.cs b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentPaymentBatch.cs new file mode 100644 index 0000000..3acae03 --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentPaymentBatch.cs @@ -0,0 +1,233 @@ +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 manage attachment notes. + /// + public class NoteAttachmentPaymentBatch : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = "user/{0}/monetary-account/{1}/payment-batch/{2}/note-attachment"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/payment-batch/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/payment-batch/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_LISTING = "user/{0}/monetary-account/{1}/payment-batch/{2}/note-attachment"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/payment-batch/{2}/note-attachment/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_DESCRIPTION = "description"; + + public const string FIELD_ATTACHMENT_ID = "attachment_id"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteAttachment"; + + /// + /// Optional description of the attachment. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The reference to the uploaded file to attach to this note. + /// + [JsonProperty(PropertyName = "attachment_id")] + public int? AttachmentId { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// The attachment attached to the note. + /// + [JsonProperty(PropertyName = "attachment")] + public List Attachment { get; set; } + + /// + /// + /// The reference to the uploaded file to attach to this note. + /// Optional description of the attachment. + public static BunqResponse Create(int paymentBatchId, int? attachmentId, int? monetaryAccountId = null, + string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + {FIELD_ATTACHMENT_ID, attachmentId}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + paymentBatchId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// Optional description of the attachment. + public static BunqResponse Update(int paymentBatchId, int noteAttachmentPaymentBatchId, + int? monetaryAccountId = null, string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + paymentBatchId, noteAttachmentPaymentBatchId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int paymentBatchId, int noteAttachmentPaymentBatchId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + paymentBatchId, noteAttachmentPaymentBatchId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int paymentBatchId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), paymentBatchId), urlParams, customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int paymentBatchId, int noteAttachmentPaymentBatchId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + paymentBatchId, noteAttachmentPaymentBatchId), new Dictionary(), customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Description != null) + { + return false; + } + + if (this.Attachment != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteAttachmentPaymentBatch CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteAttachmentRequestInquiry.cs b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentRequestInquiry.cs new file mode 100644 index 0000000..e3fc1ae --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentRequestInquiry.cs @@ -0,0 +1,237 @@ +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 manage attachment notes. + /// + public class NoteAttachmentRequestInquiry : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = + "user/{0}/monetary-account/{1}/request-inquiry/{2}/note-attachment"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/request-inquiry/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/request-inquiry/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_LISTING = + "user/{0}/monetary-account/{1}/request-inquiry/{2}/note-attachment"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/request-inquiry/{2}/note-attachment/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_DESCRIPTION = "description"; + + public const string FIELD_ATTACHMENT_ID = "attachment_id"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteAttachment"; + + /// + /// Optional description of the attachment. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The reference to the uploaded file to attach to this note. + /// + [JsonProperty(PropertyName = "attachment_id")] + public int? AttachmentId { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// The attachment attached to the note. + /// + [JsonProperty(PropertyName = "attachment")] + public List Attachment { get; set; } + + /// + /// + /// The reference to the uploaded file to attach to this note. + /// Optional description of the attachment. + public static BunqResponse Create(int requestInquiryId, int? attachmentId, int? monetaryAccountId = null, + string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + {FIELD_ATTACHMENT_ID, attachmentId}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestInquiryId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// Optional description of the attachment. + public static BunqResponse Update(int requestInquiryId, int noteAttachmentRequestInquiryId, + int? monetaryAccountId = null, string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestInquiryId, noteAttachmentRequestInquiryId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int requestInquiryId, int noteAttachmentRequestInquiryId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestInquiryId, noteAttachmentRequestInquiryId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int requestInquiryId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), requestInquiryId), urlParams, customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int requestInquiryId, + int noteAttachmentRequestInquiryId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestInquiryId, noteAttachmentRequestInquiryId), new Dictionary(), + customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Description != null) + { + return false; + } + + if (this.Attachment != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteAttachmentRequestInquiry CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteAttachmentRequestInquiryBatch.cs b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentRequestInquiryBatch.cs new file mode 100644 index 0000000..7bc0d48 --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentRequestInquiryBatch.cs @@ -0,0 +1,238 @@ +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 manage attachment notes. + /// + public class NoteAttachmentRequestInquiryBatch : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = + "user/{0}/monetary-account/{1}/request-inquiry-batch/{2}/note-attachment"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/request-inquiry-batch/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/request-inquiry-batch/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_LISTING = + "user/{0}/monetary-account/{1}/request-inquiry-batch/{2}/note-attachment"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/request-inquiry-batch/{2}/note-attachment/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_DESCRIPTION = "description"; + + public const string FIELD_ATTACHMENT_ID = "attachment_id"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteAttachment"; + + /// + /// Optional description of the attachment. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The reference to the uploaded file to attach to this note. + /// + [JsonProperty(PropertyName = "attachment_id")] + public int? AttachmentId { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// The attachment attached to the note. + /// + [JsonProperty(PropertyName = "attachment")] + public List Attachment { get; set; } + + /// + /// + /// The reference to the uploaded file to attach to this note. + /// Optional description of the attachment. + public static BunqResponse Create(int requestInquiryBatchId, int? attachmentId, + int? monetaryAccountId = null, string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + {FIELD_ATTACHMENT_ID, attachmentId}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestInquiryBatchId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// Optional description of the attachment. + public static BunqResponse Update(int requestInquiryBatchId, int noteAttachmentRequestInquiryBatchId, + int? monetaryAccountId = null, string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestInquiryBatchId, noteAttachmentRequestInquiryBatchId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int requestInquiryBatchId, int noteAttachmentRequestInquiryBatchId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestInquiryBatchId, noteAttachmentRequestInquiryBatchId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int requestInquiryBatchId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), requestInquiryBatchId), urlParams, + customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int requestInquiryBatchId, + int noteAttachmentRequestInquiryBatchId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestInquiryBatchId, noteAttachmentRequestInquiryBatchId), new Dictionary(), + customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Description != null) + { + return false; + } + + if (this.Attachment != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteAttachmentRequestInquiryBatch CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteAttachmentRequestResponse.cs b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentRequestResponse.cs new file mode 100644 index 0000000..f2e0c97 --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentRequestResponse.cs @@ -0,0 +1,237 @@ +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 manage attachment notes. + /// + public class NoteAttachmentRequestResponse : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = + "user/{0}/monetary-account/{1}/request-response/{2}/note-attachment"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/request-response/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/request-response/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_LISTING = + "user/{0}/monetary-account/{1}/request-response/{2}/note-attachment"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/request-response/{2}/note-attachment/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_DESCRIPTION = "description"; + + public const string FIELD_ATTACHMENT_ID = "attachment_id"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteAttachment"; + + /// + /// Optional description of the attachment. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The reference to the uploaded file to attach to this note. + /// + [JsonProperty(PropertyName = "attachment_id")] + public int? AttachmentId { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// The attachment attached to the note. + /// + [JsonProperty(PropertyName = "attachment")] + public List Attachment { get; set; } + + /// + /// + /// The reference to the uploaded file to attach to this note. + /// Optional description of the attachment. + public static BunqResponse Create(int requestResponseId, int? attachmentId, int? monetaryAccountId = null, + string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + {FIELD_ATTACHMENT_ID, attachmentId}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestResponseId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// Optional description of the attachment. + public static BunqResponse Update(int requestResponseId, int noteAttachmentRequestResponseId, + int? monetaryAccountId = null, string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestResponseId, noteAttachmentRequestResponseId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int requestResponseId, int noteAttachmentRequestResponseId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestResponseId, noteAttachmentRequestResponseId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int requestResponseId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), requestResponseId), urlParams, customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int requestResponseId, + int noteAttachmentRequestResponseId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestResponseId, noteAttachmentRequestResponseId), new Dictionary(), + customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Description != null) + { + return false; + } + + if (this.Attachment != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteAttachmentRequestResponse CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteAttachmentScheduleInstance.cs b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentScheduleInstance.cs new file mode 100644 index 0000000..72c4838 --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentScheduleInstance.cs @@ -0,0 +1,239 @@ +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 manage attachment notes. + /// + public class NoteAttachmentScheduleInstance : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = + "user/{0}/monetary-account/{1}/schedule/{2}/schedule-instance/{3}/note-attachment"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/schedule/{2}/schedule-instance/{3}/note-attachment/{4}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/schedule/{2}/schedule-instance/{3}/note-attachment/{4}"; + + protected const string ENDPOINT_URL_LISTING = + "user/{0}/monetary-account/{1}/schedule/{2}/schedule-instance/{3}/note-attachment"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/schedule/{2}/schedule-instance/{3}/note-attachment/{4}"; + + /// + /// Field constants. + /// + public const string FIELD_DESCRIPTION = "description"; + + public const string FIELD_ATTACHMENT_ID = "attachment_id"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteAttachment"; + + /// + /// Optional description of the attachment. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The reference to the uploaded file to attach to this note. + /// + [JsonProperty(PropertyName = "attachment_id")] + public int? AttachmentId { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// The attachment attached to the note. + /// + [JsonProperty(PropertyName = "attachment")] + public List Attachment { get; set; } + + /// + /// + /// The reference to the uploaded file to attach to this note. + /// Optional description of the attachment. + public static BunqResponse Create(int scheduleId, int scheduleInstanceId, int? attachmentId, + int? monetaryAccountId = null, string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + {FIELD_ATTACHMENT_ID, attachmentId}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + scheduleId, scheduleInstanceId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// Optional description of the attachment. + public static BunqResponse Update(int scheduleId, int scheduleInstanceId, + int noteAttachmentScheduleInstanceId, int? monetaryAccountId = null, string description = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + scheduleId, scheduleInstanceId, noteAttachmentScheduleInstanceId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int scheduleId, int scheduleInstanceId, + int noteAttachmentScheduleInstanceId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + scheduleId, scheduleInstanceId, noteAttachmentScheduleInstanceId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int scheduleId, int scheduleInstanceId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), scheduleId, scheduleInstanceId), urlParams, + customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int scheduleId, int scheduleInstanceId, + int noteAttachmentScheduleInstanceId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + scheduleId, scheduleInstanceId, noteAttachmentScheduleInstanceId), new Dictionary(), + customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Description != null) + { + return false; + } + + if (this.Attachment != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteAttachmentScheduleInstance CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteAttachmentSofortMerchantTransaction.cs b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentSofortMerchantTransaction.cs new file mode 100644 index 0000000..9e74f00 --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentSofortMerchantTransaction.cs @@ -0,0 +1,240 @@ +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 manage attachment notes. + /// + public class NoteAttachmentSofortMerchantTransaction : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = + "user/{0}/monetary-account/{1}/sofort-merchant-transaction/{2}/note-attachment"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/sofort-merchant-transaction/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/sofort-merchant-transaction/{2}/note-attachment/{3}"; + + protected const string ENDPOINT_URL_LISTING = + "user/{0}/monetary-account/{1}/sofort-merchant-transaction/{2}/note-attachment"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/sofort-merchant-transaction/{2}/note-attachment/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_DESCRIPTION = "description"; + + public const string FIELD_ATTACHMENT_ID = "attachment_id"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteAttachment"; + + /// + /// Optional description of the attachment. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The reference to the uploaded file to attach to this note. + /// + [JsonProperty(PropertyName = "attachment_id")] + public int? AttachmentId { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// The attachment attached to the note. + /// + [JsonProperty(PropertyName = "attachment")] + public List Attachment { get; set; } + + /// + /// + /// The reference to the uploaded file to attach to this note. + /// Optional description of the attachment. + public static BunqResponse Create(int sofortMerchantTransactionId, int? attachmentId, + int? monetaryAccountId = null, string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + {FIELD_ATTACHMENT_ID, attachmentId}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + sofortMerchantTransactionId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// Optional description of the attachment. + public static BunqResponse Update(int sofortMerchantTransactionId, + int noteAttachmentSofortMerchantTransactionId, int? monetaryAccountId = null, string description = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + sofortMerchantTransactionId, noteAttachmentSofortMerchantTransactionId), requestBytes, + customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int sofortMerchantTransactionId, + int noteAttachmentSofortMerchantTransactionId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + sofortMerchantTransactionId, noteAttachmentSofortMerchantTransactionId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int sofortMerchantTransactionId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), sofortMerchantTransactionId), urlParams, + customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int sofortMerchantTransactionId, + int noteAttachmentSofortMerchantTransactionId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + sofortMerchantTransactionId, noteAttachmentSofortMerchantTransactionId), + new Dictionary(), customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Description != null) + { + return false; + } + + if (this.Attachment != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteAttachmentSofortMerchantTransaction CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteAttachmentWhitelistResult.cs b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentWhitelistResult.cs new file mode 100644 index 0000000..37feccb --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteAttachmentWhitelistResult.cs @@ -0,0 +1,239 @@ +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 manage attachment notes. + /// + public class NoteAttachmentWhitelistResult : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = + "user/{0}/monetary-account/{1}/whitelist/{2}/whitelist-result/{3}/note-attachment"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/whitelist/{2}/whitelist-result/{3}/note-attachment/{4}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/whitelist/{2}/whitelist-result/{3}/note-attachment/{4}"; + + protected const string ENDPOINT_URL_LISTING = + "user/{0}/monetary-account/{1}/whitelist/{2}/whitelist-result/{3}/note-attachment"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/whitelist/{2}/whitelist-result/{3}/note-attachment/{4}"; + + /// + /// Field constants. + /// + public const string FIELD_DESCRIPTION = "description"; + + public const string FIELD_ATTACHMENT_ID = "attachment_id"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteAttachment"; + + /// + /// Optional description of the attachment. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The reference to the uploaded file to attach to this note. + /// + [JsonProperty(PropertyName = "attachment_id")] + public int? AttachmentId { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// The attachment attached to the note. + /// + [JsonProperty(PropertyName = "attachment")] + public List Attachment { get; set; } + + /// + /// + /// The reference to the uploaded file to attach to this note. + /// Optional description of the attachment. + public static BunqResponse Create(int whitelistId, int whitelistResultId, int? attachmentId, + int? monetaryAccountId = null, string description = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + {FIELD_ATTACHMENT_ID, attachmentId}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + whitelistId, whitelistResultId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// Optional description of the attachment. + public static BunqResponse Update(int whitelistId, int whitelistResultId, + int noteAttachmentWhitelistResultId, int? monetaryAccountId = null, string description = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_DESCRIPTION, description}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + whitelistId, whitelistResultId, noteAttachmentWhitelistResultId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int whitelistId, int whitelistResultId, + int noteAttachmentWhitelistResultId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + whitelistId, whitelistResultId, noteAttachmentWhitelistResultId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int whitelistId, int whitelistResultId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), whitelistId, whitelistResultId), urlParams, + customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int whitelistId, int whitelistResultId, + int noteAttachmentWhitelistResultId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + whitelistId, whitelistResultId, noteAttachmentWhitelistResultId), new Dictionary(), + customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Description != null) + { + return false; + } + + if (this.Attachment != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteAttachmentWhitelistResult CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteTextBankSwitchServiceNetherlandsIncomingPayment.cs b/BunqSdk/Model/Generated/Endpoint/NoteTextBankSwitchServiceNetherlandsIncomingPayment.cs new file mode 100644 index 0000000..8e37e60 --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteTextBankSwitchServiceNetherlandsIncomingPayment.cs @@ -0,0 +1,219 @@ +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 manage text notes. + /// + public class NoteTextBankSwitchServiceNetherlandsIncomingPayment : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = + "user/{0}/monetary-account/{1}/switch-service-payment/{2}/note-text"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/switch-service-payment/{2}/note-text/{3}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/switch-service-payment/{2}/note-text/{3}"; + + protected const string ENDPOINT_URL_LISTING = + "user/{0}/monetary-account/{1}/switch-service-payment/{2}/note-text"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/switch-service-payment/{2}/note-text/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_CONTENT = "content"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteText"; + + /// + /// The content of the note. + /// + [JsonProperty(PropertyName = "content")] + public string Content { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// + /// The content of the note. + public static BunqResponse Create(int switchServicePaymentId, int? monetaryAccountId = null, + string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + switchServicePaymentId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// The content of the note. + public static BunqResponse Update(int switchServicePaymentId, + int noteTextBankSwitchServiceNetherlandsIncomingPaymentId, int? monetaryAccountId = null, + string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + switchServicePaymentId, noteTextBankSwitchServiceNetherlandsIncomingPaymentId), requestBytes, + customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int switchServicePaymentId, + int noteTextBankSwitchServiceNetherlandsIncomingPaymentId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + switchServicePaymentId, noteTextBankSwitchServiceNetherlandsIncomingPaymentId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List( + int switchServicePaymentId, int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), switchServicePaymentId), urlParams, + customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int switchServicePaymentId, + int noteTextBankSwitchServiceNetherlandsIncomingPaymentId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + switchServicePaymentId, noteTextBankSwitchServiceNetherlandsIncomingPaymentId), + new Dictionary(), customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Content != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteTextBankSwitchServiceNetherlandsIncomingPayment CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteTextBunqMeFundraiserResult.cs b/BunqSdk/Model/Generated/Endpoint/NoteTextBunqMeFundraiserResult.cs new file mode 100644 index 0000000..6b17a70 --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteTextBunqMeFundraiserResult.cs @@ -0,0 +1,217 @@ +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 manage text notes. + /// + public class NoteTextBunqMeFundraiserResult : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = + "user/{0}/monetary-account/{1}/bunqme-fundraiser-result/{2}/note-text"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/bunqme-fundraiser-result/{2}/note-text/{3}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/bunqme-fundraiser-result/{2}/note-text/{3}"; + + protected const string ENDPOINT_URL_LISTING = + "user/{0}/monetary-account/{1}/bunqme-fundraiser-result/{2}/note-text"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/bunqme-fundraiser-result/{2}/note-text/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_CONTENT = "content"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteText"; + + /// + /// The content of the note. + /// + [JsonProperty(PropertyName = "content")] + public string Content { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// + /// The content of the note. + public static BunqResponse Create(int bunqmeFundraiserResultId, int? monetaryAccountId = null, + string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + bunqmeFundraiserResultId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// The content of the note. + public static BunqResponse Update(int bunqmeFundraiserResultId, int noteTextBunqMeFundraiserResultId, + int? monetaryAccountId = null, string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + bunqmeFundraiserResultId, noteTextBunqMeFundraiserResultId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int bunqmeFundraiserResultId, int noteTextBunqMeFundraiserResultId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + bunqmeFundraiserResultId, noteTextBunqMeFundraiserResultId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int bunqmeFundraiserResultId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), bunqmeFundraiserResultId), urlParams, + customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int bunqmeFundraiserResultId, + int noteTextBunqMeFundraiserResultId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + bunqmeFundraiserResultId, noteTextBunqMeFundraiserResultId), new Dictionary(), + customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Content != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteTextBunqMeFundraiserResult CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteTextDraftPayment.cs b/BunqSdk/Model/Generated/Endpoint/NoteTextDraftPayment.cs new file mode 100644 index 0000000..82a1168 --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteTextDraftPayment.cs @@ -0,0 +1,205 @@ +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 manage text notes. + /// + public class NoteTextDraftPayment : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = "user/{0}/monetary-account/{1}/draft-payment/{2}/note-text"; + + protected const string ENDPOINT_URL_UPDATE = "user/{0}/monetary-account/{1}/draft-payment/{2}/note-text/{3}"; + protected const string ENDPOINT_URL_DELETE = "user/{0}/monetary-account/{1}/draft-payment/{2}/note-text/{3}"; + protected const string ENDPOINT_URL_LISTING = "user/{0}/monetary-account/{1}/draft-payment/{2}/note-text"; + protected const string ENDPOINT_URL_READ = "user/{0}/monetary-account/{1}/draft-payment/{2}/note-text/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_CONTENT = "content"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteText"; + + /// + /// The content of the note. + /// + [JsonProperty(PropertyName = "content")] + public string Content { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// + /// The content of the note. + public static BunqResponse Create(int draftPaymentId, int? monetaryAccountId = null, string content = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + draftPaymentId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// The content of the note. + public static BunqResponse Update(int draftPaymentId, int noteTextDraftPaymentId, + int? monetaryAccountId = null, string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + draftPaymentId, noteTextDraftPaymentId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int draftPaymentId, int noteTextDraftPaymentId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + draftPaymentId, noteTextDraftPaymentId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int draftPaymentId, int? monetaryAccountId = null, + IDictionary urlParams = null, IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), draftPaymentId), urlParams, customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int draftPaymentId, int noteTextDraftPaymentId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + draftPaymentId, noteTextDraftPaymentId), new Dictionary(), customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Content != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteTextDraftPayment CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteTextIdealMerchantTransaction.cs b/BunqSdk/Model/Generated/Endpoint/NoteTextIdealMerchantTransaction.cs new file mode 100644 index 0000000..86ed4c0 --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteTextIdealMerchantTransaction.cs @@ -0,0 +1,217 @@ +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 manage text notes. + /// + public class NoteTextIdealMerchantTransaction : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = + "user/{0}/monetary-account/{1}/ideal-merchant-transaction/{2}/note-text"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/ideal-merchant-transaction/{2}/note-text/{3}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/ideal-merchant-transaction/{2}/note-text/{3}"; + + protected const string ENDPOINT_URL_LISTING = + "user/{0}/monetary-account/{1}/ideal-merchant-transaction/{2}/note-text"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/ideal-merchant-transaction/{2}/note-text/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_CONTENT = "content"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteText"; + + /// + /// The content of the note. + /// + [JsonProperty(PropertyName = "content")] + public string Content { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// + /// The content of the note. + public static BunqResponse Create(int idealMerchantTransactionId, int? monetaryAccountId = null, + string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + idealMerchantTransactionId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// The content of the note. + public static BunqResponse Update(int idealMerchantTransactionId, int noteTextIdealMerchantTransactionId, + int? monetaryAccountId = null, string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + idealMerchantTransactionId, noteTextIdealMerchantTransactionId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int idealMerchantTransactionId, + int noteTextIdealMerchantTransactionId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + idealMerchantTransactionId, noteTextIdealMerchantTransactionId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int idealMerchantTransactionId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), idealMerchantTransactionId), urlParams, + customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int idealMerchantTransactionId, + int noteTextIdealMerchantTransactionId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + idealMerchantTransactionId, noteTextIdealMerchantTransactionId), new Dictionary(), + customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Content != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteTextIdealMerchantTransaction CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteTextMasterCardAction.cs b/BunqSdk/Model/Generated/Endpoint/NoteTextMasterCardAction.cs new file mode 100644 index 0000000..4aae79b --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteTextMasterCardAction.cs @@ -0,0 +1,211 @@ +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 manage text notes. + /// + public class NoteTextMasterCardAction : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = "user/{0}/monetary-account/{1}/mastercard-action/{2}/note-text"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/mastercard-action/{2}/note-text/{3}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/mastercard-action/{2}/note-text/{3}"; + + protected const string ENDPOINT_URL_LISTING = "user/{0}/monetary-account/{1}/mastercard-action/{2}/note-text"; + protected const string ENDPOINT_URL_READ = "user/{0}/monetary-account/{1}/mastercard-action/{2}/note-text/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_CONTENT = "content"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteText"; + + /// + /// The content of the note. + /// + [JsonProperty(PropertyName = "content")] + public string Content { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// + /// The content of the note. + public static BunqResponse Create(int mastercardActionId, int? monetaryAccountId = null, + string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + mastercardActionId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// The content of the note. + public static BunqResponse Update(int mastercardActionId, int noteTextMasterCardActionId, + int? monetaryAccountId = null, string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + mastercardActionId, noteTextMasterCardActionId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int mastercardActionId, int noteTextMasterCardActionId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + mastercardActionId, noteTextMasterCardActionId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int mastercardActionId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), mastercardActionId), urlParams, customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int mastercardActionId, int noteTextMasterCardActionId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + mastercardActionId, noteTextMasterCardActionId), new Dictionary(), + customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Content != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteTextMasterCardAction CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteTextPayment.cs b/BunqSdk/Model/Generated/Endpoint/NoteTextPayment.cs new file mode 100644 index 0000000..074cbc7 --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteTextPayment.cs @@ -0,0 +1,205 @@ +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 manage text notes. + /// + public class NoteTextPayment : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = "user/{0}/monetary-account/{1}/payment/{2}/note-text"; + + protected const string ENDPOINT_URL_UPDATE = "user/{0}/monetary-account/{1}/payment/{2}/note-text/{3}"; + protected const string ENDPOINT_URL_DELETE = "user/{0}/monetary-account/{1}/payment/{2}/note-text/{3}"; + protected const string ENDPOINT_URL_LISTING = "user/{0}/monetary-account/{1}/payment/{2}/note-text"; + protected const string ENDPOINT_URL_READ = "user/{0}/monetary-account/{1}/payment/{2}/note-text/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_CONTENT = "content"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteText"; + + /// + /// The content of the note. + /// + [JsonProperty(PropertyName = "content")] + public string Content { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// + /// The content of the note. + public static BunqResponse Create(int paymentId, int? monetaryAccountId = null, string content = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + paymentId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// The content of the note. + public static BunqResponse Update(int paymentId, int noteTextPaymentId, int? monetaryAccountId = null, + string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + paymentId, noteTextPaymentId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int paymentId, int noteTextPaymentId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + paymentId, noteTextPaymentId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int paymentId, int? monetaryAccountId = null, + IDictionary urlParams = null, IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), paymentId), urlParams, customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int paymentId, int noteTextPaymentId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + paymentId, noteTextPaymentId), new Dictionary(), customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Content != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteTextPayment CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteTextPaymentBatch.cs b/BunqSdk/Model/Generated/Endpoint/NoteTextPaymentBatch.cs new file mode 100644 index 0000000..d369904 --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteTextPaymentBatch.cs @@ -0,0 +1,205 @@ +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 manage text notes. + /// + public class NoteTextPaymentBatch : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = "user/{0}/monetary-account/{1}/payment-batch/{2}/note-text"; + + protected const string ENDPOINT_URL_UPDATE = "user/{0}/monetary-account/{1}/payment-batch/{2}/note-text/{3}"; + protected const string ENDPOINT_URL_DELETE = "user/{0}/monetary-account/{1}/payment-batch/{2}/note-text/{3}"; + protected const string ENDPOINT_URL_LISTING = "user/{0}/monetary-account/{1}/payment-batch/{2}/note-text"; + protected const string ENDPOINT_URL_READ = "user/{0}/monetary-account/{1}/payment-batch/{2}/note-text/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_CONTENT = "content"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteText"; + + /// + /// The content of the note. + /// + [JsonProperty(PropertyName = "content")] + public string Content { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// + /// The content of the note. + public static BunqResponse Create(int paymentBatchId, int? monetaryAccountId = null, string content = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + paymentBatchId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// The content of the note. + public static BunqResponse Update(int paymentBatchId, int noteTextPaymentBatchId, + int? monetaryAccountId = null, string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + paymentBatchId, noteTextPaymentBatchId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int paymentBatchId, int noteTextPaymentBatchId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + paymentBatchId, noteTextPaymentBatchId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int paymentBatchId, int? monetaryAccountId = null, + IDictionary urlParams = null, IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), paymentBatchId), urlParams, customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int paymentBatchId, int noteTextPaymentBatchId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + paymentBatchId, noteTextPaymentBatchId), new Dictionary(), customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Content != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteTextPaymentBatch CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteTextRequestInquiry.cs b/BunqSdk/Model/Generated/Endpoint/NoteTextRequestInquiry.cs new file mode 100644 index 0000000..8689aa1 --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteTextRequestInquiry.cs @@ -0,0 +1,206 @@ +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 manage text notes. + /// + public class NoteTextRequestInquiry : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = "user/{0}/monetary-account/{1}/request-inquiry/{2}/note-text"; + + protected const string ENDPOINT_URL_UPDATE = "user/{0}/monetary-account/{1}/request-inquiry/{2}/note-text/{3}"; + protected const string ENDPOINT_URL_DELETE = "user/{0}/monetary-account/{1}/request-inquiry/{2}/note-text/{3}"; + protected const string ENDPOINT_URL_LISTING = "user/{0}/monetary-account/{1}/request-inquiry/{2}/note-text"; + protected const string ENDPOINT_URL_READ = "user/{0}/monetary-account/{1}/request-inquiry/{2}/note-text/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_CONTENT = "content"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteText"; + + /// + /// The content of the note. + /// + [JsonProperty(PropertyName = "content")] + public string Content { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// + /// The content of the note. + public static BunqResponse Create(int requestInquiryId, int? monetaryAccountId = null, + string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestInquiryId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// The content of the note. + public static BunqResponse Update(int requestInquiryId, int noteTextRequestInquiryId, + int? monetaryAccountId = null, string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestInquiryId, noteTextRequestInquiryId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int requestInquiryId, int noteTextRequestInquiryId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestInquiryId, noteTextRequestInquiryId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int requestInquiryId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), requestInquiryId), urlParams, customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int requestInquiryId, int noteTextRequestInquiryId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestInquiryId, noteTextRequestInquiryId), new Dictionary(), customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Content != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteTextRequestInquiry CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteTextRequestInquiryBatch.cs b/BunqSdk/Model/Generated/Endpoint/NoteTextRequestInquiryBatch.cs new file mode 100644 index 0000000..837dac9 --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteTextRequestInquiryBatch.cs @@ -0,0 +1,217 @@ +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 manage text notes. + /// + public class NoteTextRequestInquiryBatch : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = + "user/{0}/monetary-account/{1}/request-inquiry-batch/{2}/note-text"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/request-inquiry-batch/{2}/note-text/{3}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/request-inquiry-batch/{2}/note-text/{3}"; + + protected const string ENDPOINT_URL_LISTING = + "user/{0}/monetary-account/{1}/request-inquiry-batch/{2}/note-text"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/request-inquiry-batch/{2}/note-text/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_CONTENT = "content"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteText"; + + /// + /// The content of the note. + /// + [JsonProperty(PropertyName = "content")] + public string Content { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// + /// The content of the note. + public static BunqResponse Create(int requestInquiryBatchId, int? monetaryAccountId = null, + string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestInquiryBatchId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// The content of the note. + public static BunqResponse Update(int requestInquiryBatchId, int noteTextRequestInquiryBatchId, + int? monetaryAccountId = null, string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestInquiryBatchId, noteTextRequestInquiryBatchId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int requestInquiryBatchId, int noteTextRequestInquiryBatchId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestInquiryBatchId, noteTextRequestInquiryBatchId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int requestInquiryBatchId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), requestInquiryBatchId), urlParams, + customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int requestInquiryBatchId, + int noteTextRequestInquiryBatchId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestInquiryBatchId, noteTextRequestInquiryBatchId), new Dictionary(), + customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Content != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteTextRequestInquiryBatch CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteTextRequestResponse.cs b/BunqSdk/Model/Generated/Endpoint/NoteTextRequestResponse.cs new file mode 100644 index 0000000..d375178 --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteTextRequestResponse.cs @@ -0,0 +1,206 @@ +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 manage text notes. + /// + public class NoteTextRequestResponse : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = "user/{0}/monetary-account/{1}/request-response/{2}/note-text"; + + protected const string ENDPOINT_URL_UPDATE = "user/{0}/monetary-account/{1}/request-response/{2}/note-text/{3}"; + protected const string ENDPOINT_URL_DELETE = "user/{0}/monetary-account/{1}/request-response/{2}/note-text/{3}"; + protected const string ENDPOINT_URL_LISTING = "user/{0}/monetary-account/{1}/request-response/{2}/note-text"; + protected const string ENDPOINT_URL_READ = "user/{0}/monetary-account/{1}/request-response/{2}/note-text/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_CONTENT = "content"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteText"; + + /// + /// The content of the note. + /// + [JsonProperty(PropertyName = "content")] + public string Content { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// + /// The content of the note. + public static BunqResponse Create(int requestResponseId, int? monetaryAccountId = null, + string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestResponseId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// The content of the note. + public static BunqResponse Update(int requestResponseId, int noteTextRequestResponseId, + int? monetaryAccountId = null, string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestResponseId, noteTextRequestResponseId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int requestResponseId, int noteTextRequestResponseId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestResponseId, noteTextRequestResponseId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int requestResponseId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), requestResponseId), urlParams, customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int requestResponseId, int noteTextRequestResponseId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + requestResponseId, noteTextRequestResponseId), new Dictionary(), customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Content != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteTextRequestResponse CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteTextScheduleInstance.cs b/BunqSdk/Model/Generated/Endpoint/NoteTextScheduleInstance.cs new file mode 100644 index 0000000..402beda --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteTextScheduleInstance.cs @@ -0,0 +1,218 @@ +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 manage text notes. + /// + public class NoteTextScheduleInstance : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = + "user/{0}/monetary-account/{1}/schedule/{2}/schedule-instance/{3}/note-text"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/schedule/{2}/schedule-instance/{3}/note-text/{4}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/schedule/{2}/schedule-instance/{3}/note-text/{4}"; + + protected const string ENDPOINT_URL_LISTING = + "user/{0}/monetary-account/{1}/schedule/{2}/schedule-instance/{3}/note-text"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/schedule/{2}/schedule-instance/{3}/note-text/{4}"; + + /// + /// Field constants. + /// + public const string FIELD_CONTENT = "content"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteText"; + + /// + /// The content of the note. + /// + [JsonProperty(PropertyName = "content")] + public string Content { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// + /// The content of the note. + public static BunqResponse Create(int scheduleId, int scheduleInstanceId, int? monetaryAccountId = null, + string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + scheduleId, scheduleInstanceId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// The content of the note. + public static BunqResponse Update(int scheduleId, int scheduleInstanceId, int noteTextScheduleInstanceId, + int? monetaryAccountId = null, string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + scheduleId, scheduleInstanceId, noteTextScheduleInstanceId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int scheduleId, int scheduleInstanceId, + int noteTextScheduleInstanceId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + scheduleId, scheduleInstanceId, noteTextScheduleInstanceId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int scheduleId, int scheduleInstanceId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), scheduleId, scheduleInstanceId), urlParams, + customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int scheduleId, int scheduleInstanceId, + int noteTextScheduleInstanceId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + scheduleId, scheduleInstanceId, noteTextScheduleInstanceId), new Dictionary(), + customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Content != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteTextScheduleInstance CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteTextSofortMerchantTransaction.cs b/BunqSdk/Model/Generated/Endpoint/NoteTextSofortMerchantTransaction.cs new file mode 100644 index 0000000..edb1adf --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteTextSofortMerchantTransaction.cs @@ -0,0 +1,217 @@ +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 manage text notes. + /// + public class NoteTextSofortMerchantTransaction : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = + "user/{0}/monetary-account/{1}/sofort-merchant-transaction/{2}/note-text"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/sofort-merchant-transaction/{2}/note-text/{3}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/sofort-merchant-transaction/{2}/note-text/{3}"; + + protected const string ENDPOINT_URL_LISTING = + "user/{0}/monetary-account/{1}/sofort-merchant-transaction/{2}/note-text"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/sofort-merchant-transaction/{2}/note-text/{3}"; + + /// + /// Field constants. + /// + public const string FIELD_CONTENT = "content"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteText"; + + /// + /// The content of the note. + /// + [JsonProperty(PropertyName = "content")] + public string Content { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// + /// The content of the note. + public static BunqResponse Create(int sofortMerchantTransactionId, int? monetaryAccountId = null, + string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + sofortMerchantTransactionId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// The content of the note. + public static BunqResponse Update(int sofortMerchantTransactionId, int noteTextSofortMerchantTransactionId, + int? monetaryAccountId = null, string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + sofortMerchantTransactionId, noteTextSofortMerchantTransactionId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int sofortMerchantTransactionId, + int noteTextSofortMerchantTransactionId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + sofortMerchantTransactionId, noteTextSofortMerchantTransactionId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int sofortMerchantTransactionId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), sofortMerchantTransactionId), urlParams, + customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int sofortMerchantTransactionId, + int noteTextSofortMerchantTransactionId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + sofortMerchantTransactionId, noteTextSofortMerchantTransactionId), new Dictionary(), + customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Content != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteTextSofortMerchantTransaction CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/NoteTextWhitelistResult.cs b/BunqSdk/Model/Generated/Endpoint/NoteTextWhitelistResult.cs new file mode 100644 index 0000000..560b7f8 --- /dev/null +++ b/BunqSdk/Model/Generated/Endpoint/NoteTextWhitelistResult.cs @@ -0,0 +1,217 @@ +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 manage text notes. + /// + public class NoteTextWhitelistResult : BunqModel + { + /// + /// Endpoint constants. + /// + protected const string ENDPOINT_URL_CREATE = + "user/{0}/monetary-account/{1}/whitelist/{2}/whitelist-result/{3}/note-text"; + + protected const string ENDPOINT_URL_UPDATE = + "user/{0}/monetary-account/{1}/whitelist/{2}/whitelist-result/{3}/note-text/{4}"; + + protected const string ENDPOINT_URL_DELETE = + "user/{0}/monetary-account/{1}/whitelist/{2}/whitelist-result/{3}/note-text/{4}"; + + protected const string ENDPOINT_URL_LISTING = + "user/{0}/monetary-account/{1}/whitelist/{2}/whitelist-result/{3}/note-text"; + + protected const string ENDPOINT_URL_READ = + "user/{0}/monetary-account/{1}/whitelist/{2}/whitelist-result/{3}/note-text/{4}"; + + /// + /// Field constants. + /// + public const string FIELD_CONTENT = "content"; + + /// + /// Object type. + /// + private const string OBJECT_TYPE_GET = "NoteText"; + + /// + /// The content of the note. + /// + [JsonProperty(PropertyName = "content")] + public string Content { get; set; } + + /// + /// The id of the note. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the note's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the note's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The label of the user who created this note. + /// + [JsonProperty(PropertyName = "label_user_creator")] + public LabelUser LabelUserCreator { get; set; } + + /// + /// + /// The content of the note. + public static BunqResponse Create(int whitelistId, int whitelistResultId, int? monetaryAccountId = null, + string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Post( + string.Format(ENDPOINT_URL_CREATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + whitelistId, whitelistResultId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + /// The content of the note. + public static BunqResponse Update(int whitelistId, int whitelistResultId, int noteTextWhitelistResultId, + int? monetaryAccountId = null, string content = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + + var requestMap = new Dictionary + { + {FIELD_CONTENT, content}, + }; + + var requestBytes = Encoding.UTF8.GetBytes(BunqJsonConvert.SerializeObject(requestMap)); + var responseRaw = + apiClient.Put( + string.Format(ENDPOINT_URL_UPDATE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + whitelistId, whitelistResultId, noteTextWhitelistResultId), requestBytes, customHeaders); + + return ProcessForId(responseRaw); + } + + /// + /// + public static BunqResponse Delete(int whitelistId, int whitelistResultId, int noteTextWhitelistResultId, + int? monetaryAccountId = null, IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Delete( + string.Format(ENDPOINT_URL_DELETE, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + whitelistId, whitelistResultId, noteTextWhitelistResultId), customHeaders); + + return new BunqResponse(null, responseRaw.Headers); + } + + /// + /// Manage the notes for a given user. + /// + public static BunqResponse> List(int whitelistId, int whitelistResultId, + int? monetaryAccountId = null, IDictionary urlParams = null, + IDictionary customHeaders = null) + { + if (urlParams == null) urlParams = new Dictionary(); + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_LISTING, DetermineUserId(), + DetermineMonetaryAccountId(monetaryAccountId), whitelistId, whitelistResultId), urlParams, + customHeaders); + + return FromJsonList(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public static BunqResponse Get(int whitelistId, int whitelistResultId, + int noteTextWhitelistResultId, int? monetaryAccountId = null, + IDictionary customHeaders = null) + { + if (customHeaders == null) customHeaders = new Dictionary(); + + var apiClient = new ApiClient(GetApiContext()); + var responseRaw = + apiClient.Get( + string.Format(ENDPOINT_URL_READ, DetermineUserId(), DetermineMonetaryAccountId(monetaryAccountId), + whitelistId, whitelistResultId, noteTextWhitelistResultId), new Dictionary(), + customHeaders); + + return FromJson(responseRaw, OBJECT_TYPE_GET); + } + + /// + /// + public override bool IsAllFieldNull() + { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + + if (this.LabelUserCreator != null) + { + return false; + } + + if (this.Content != null) + { + return false; + } + + return true; + } + + /// + /// + public static NoteTextWhitelistResult CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Endpoint/Payment.cs b/BunqSdk/Model/Generated/Endpoint/Payment.cs index 4bc8166..b44a83e 100644 --- a/BunqSdk/Model/Generated/Endpoint/Payment.cs +++ b/BunqSdk/Model/Generated/Endpoint/Payment.cs @@ -41,6 +41,38 @@ public class Payment : BunqModel /// private const string OBJECT_TYPE_GET = "Payment"; + /// + /// The Amount transferred by the Payment. Will be negative for outgoing Payments and positive for incoming + /// Payments (relative to the MonetaryAccount indicated by monetary_account_id). + /// + [JsonProperty(PropertyName = "amount")] + public Amount Amount { get; set; } + + /// + /// The LabelMonetaryAccount containing the public information of the other (counterparty) side of the Payment. + /// + [JsonProperty(PropertyName = "counterparty_alias")] + public MonetaryAccountReference CounterpartyAlias { get; set; } + + /// + /// The description for the Payment. Maximum 140 characters for Payments to external IBANs, 9000 characters for + /// Payments to only other bunq MonetaryAccounts. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The Attachments attached to the Payment. + /// + [JsonProperty(PropertyName = "attachment")] + public List Attachment { get; set; } + + /// + /// Optional data included with the Payment specific to the merchant. + /// + [JsonProperty(PropertyName = "merchant_reference")] + public string MerchantReference { get; set; } + /// /// The id of the created Payment. /// @@ -66,32 +98,12 @@ public class Payment : BunqModel [JsonProperty(PropertyName = "monetary_account_id")] public int? MonetaryAccountId { get; set; } - /// - /// The Amount transferred by the Payment. Will be negative for outgoing Payments and positive for incoming - /// Payments (relative to the MonetaryAccount indicated by monetary_account_id). - /// - [JsonProperty(PropertyName = "amount")] - public Amount Amount { get; set; } - /// /// The LabelMonetaryAccount containing the public information of 'this' (party) side of the Payment. /// [JsonProperty(PropertyName = "alias")] public MonetaryAccountReference Alias { get; set; } - /// - /// The LabelMonetaryAccount containing the public information of the other (counterparty) side of the Payment. - /// - [JsonProperty(PropertyName = "counterparty_alias")] - public MonetaryAccountReference CounterpartyAlias { get; set; } - - /// - /// The description for the Payment. Maximum 140 characters for Payments to external IBANs, 9000 characters for - /// Payments to only other bunq MonetaryAccounts. - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - /// /// The type of Payment, can be BUNQ, EBA_SCT, EBA_SDD, IDEAL, SWIFT or FIS (card). /// @@ -134,18 +146,6 @@ public class Payment : BunqModel [JsonProperty(PropertyName = "bunqto_time_responded")] public string BunqtoTimeResponded { get; set; } - /// - /// The Attachments attached to the Payment. - /// - [JsonProperty(PropertyName = "attachment")] - public List Attachment { get; set; } - - /// - /// Optional data included with the Payment specific to the merchant. - /// - [JsonProperty(PropertyName = "merchant_reference")] - public string MerchantReference { get; set; } - /// /// The id of the PaymentBatch if this Payment was part of one. /// @@ -257,7 +257,6 @@ public static BunqResponse> List(int? monetaryAccountId = null, return FromJsonList(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/PaymentBatch.cs b/BunqSdk/Model/Generated/Endpoint/PaymentBatch.cs index 5452af2..11d8b7d 100644 --- a/BunqSdk/Model/Generated/Endpoint/PaymentBatch.cs +++ b/BunqSdk/Model/Generated/Endpoint/PaymentBatch.cs @@ -122,7 +122,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/PermittedIp.cs b/BunqSdk/Model/Generated/Endpoint/PermittedIp.cs index 157b138..cc1a99b 100644 --- a/BunqSdk/Model/Generated/Endpoint/PermittedIp.cs +++ b/BunqSdk/Model/Generated/Endpoint/PermittedIp.cs @@ -129,7 +129,6 @@ public static BunqResponse Update(int credentialPasswordIpId, int permitted return ProcessForId(responseRaw); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/RequestInquiry.cs b/BunqSdk/Model/Generated/Endpoint/RequestInquiry.cs index 7c0cd15..095cd71 100644 --- a/BunqSdk/Model/Generated/Endpoint/RequestInquiry.cs +++ b/BunqSdk/Model/Generated/Endpoint/RequestInquiry.cs @@ -53,6 +53,93 @@ public class RequestInquiry : BunqModel private const string OBJECT_TYPE_GET = "RequestInquiry"; + /// + /// The requested amount. + /// + [JsonProperty(PropertyName = "amount_inquired")] + public Amount AmountInquired { get; set; } + + /// + /// The LabelMonetaryAccount with the public information of the MonetaryAccount the money was requested from. + /// + [JsonProperty(PropertyName = "counterparty_alias")] + public MonetaryAccountReference CounterpartyAlias { get; set; } + + /// + /// The description of the inquiry. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The attachments attached to the payment. + /// + [JsonProperty(PropertyName = "attachment")] + public List Attachment { get; set; } + + /// + /// The client's custom reference that was attached to the request and the mutation. + /// + [JsonProperty(PropertyName = "merchant_reference")] + public string MerchantReference { get; set; } + + /// + /// The status of the request. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// The minimum age the user accepting the RequestInquiry must have. + /// + [JsonProperty(PropertyName = "minimum_age")] + public int? MinimumAge { get; set; } + + /// + /// Whether or not an address must be provided on accept. + /// + [JsonProperty(PropertyName = "require_address")] + public string RequireAddress { get; set; } + + /// + /// [DEPRECATED] Whether or not the accepting user can give an extra tip on top of the requested Amount. + /// Defaults to false. + /// + [JsonProperty(PropertyName = "want_tip")] + public bool? WantTip { get; set; } + + /// + /// [DEPRECATED] Whether or not the accepting user can choose to accept with a lower amount than requested. + /// Defaults to false. + /// + [JsonProperty(PropertyName = "allow_amount_lower")] + public bool? AllowAmountLower { get; set; } + + /// + /// [DEPRECATED] Whether or not the accepting user can choose to accept with a higher amount than requested. + /// Defaults to false. + /// + [JsonProperty(PropertyName = "allow_amount_higher")] + public bool? AllowAmountHigher { get; set; } + + /// + /// Whether or not sending a bunq.me request is allowed. + /// + [JsonProperty(PropertyName = "allow_bunqme")] + public bool? AllowBunqme { get; set; } + + /// + /// The URL which the user is sent to after accepting or rejecting the Request. + /// + [JsonProperty(PropertyName = "redirect_url")] + public string RedirectUrl { get; set; } + + /// + /// The ID of the associated event if the request was made using 'split the bill'. + /// + [JsonProperty(PropertyName = "event_id")] + public int? EventId { get; set; } + /// /// The id of the created RequestInquiry. /// @@ -89,12 +176,6 @@ public class RequestInquiry : BunqModel [JsonProperty(PropertyName = "monetary_account_id")] public int? MonetaryAccountId { get; set; } - /// - /// The requested amount. - /// - [JsonProperty(PropertyName = "amount_inquired")] - public Amount AmountInquired { get; set; } - /// /// The responded amount. /// @@ -113,36 +194,6 @@ public class RequestInquiry : BunqModel [JsonProperty(PropertyName = "user_alias_revoked")] public LabelUser UserAliasRevoked { get; set; } - /// - /// The LabelMonetaryAccount with the public information of the MonetaryAccount the money was requested from. - /// - [JsonProperty(PropertyName = "counterparty_alias")] - public MonetaryAccountReference CounterpartyAlias { get; set; } - - /// - /// The description of the inquiry. - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - /// - /// The client's custom reference that was attached to the request and the mutation. - /// - [JsonProperty(PropertyName = "merchant_reference")] - public string MerchantReference { get; set; } - - /// - /// The attachments attached to the payment. - /// - [JsonProperty(PropertyName = "attachment")] - public List Attachment { get; set; } - - /// - /// The status of the request. - /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - /// /// The id of the batch if the request was part of a batch. /// @@ -155,30 +206,12 @@ public class RequestInquiry : BunqModel [JsonProperty(PropertyName = "scheduled_id")] public int? ScheduledId { get; set; } - /// - /// The minimum age the user accepting the RequestInquiry must have. - /// - [JsonProperty(PropertyName = "minimum_age")] - public int? MinimumAge { get; set; } - - /// - /// Whether or not an address must be provided on accept. - /// - [JsonProperty(PropertyName = "require_address")] - public string RequireAddress { get; set; } - /// /// The url that points to the bunq.me request. /// [JsonProperty(PropertyName = "bunqme_share_url")] public string BunqmeShareUrl { get; set; } - /// - /// The URL which the user is sent to after accepting or rejecting the Request. - /// - [JsonProperty(PropertyName = "redirect_url")] - public string RedirectUrl { get; set; } - /// /// The shipping address provided by the accepting user if an address was requested. /// @@ -324,7 +357,6 @@ public static BunqResponse Get(int requestInquiryId, int? moneta return FromJson(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/RequestInquiryBatch.cs b/BunqSdk/Model/Generated/Endpoint/RequestInquiryBatch.cs index b322615..eca6c4d 100644 --- a/BunqSdk/Model/Generated/Endpoint/RequestInquiryBatch.cs +++ b/BunqSdk/Model/Generated/Endpoint/RequestInquiryBatch.cs @@ -44,12 +44,24 @@ public class RequestInquiryBatch : BunqModel [JsonProperty(PropertyName = "request_inquiries")] public List RequestInquiries { get; set; } + /// + /// The status of the request. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + /// /// The total amount originally inquired for this batch. /// [JsonProperty(PropertyName = "total_amount_inquired")] public Amount TotalAmountInquired { get; set; } + /// + /// The ID of the associated event if the request batch was made using 'split the bill'. + /// + [JsonProperty(PropertyName = "event_id")] + public int? EventId { get; set; } + /// /// The reference to the object used for split the bill. Can be Payment, PaymentBatch, ScheduleInstance, /// RequestResponse and MasterCardAction @@ -149,7 +161,6 @@ public static BunqResponse> List(int? monetaryAccountI return FromJsonList(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/RequestResponse.cs b/BunqSdk/Model/Generated/Endpoint/RequestResponse.cs index 5f30ccb..e717933 100644 --- a/BunqSdk/Model/Generated/Endpoint/RequestResponse.cs +++ b/BunqSdk/Model/Generated/Endpoint/RequestResponse.cs @@ -42,6 +42,31 @@ public class RequestResponse : BunqModel private const string OBJECT_TYPE_GET = "RequestResponse"; + /// + /// The Amount the RequestResponse was accepted with. + /// + [JsonProperty(PropertyName = "amount_responded")] + public Amount AmountResponded { get; set; } + + /// + /// The status of the RequestResponse. Can be ACCEPTED, PENDING, REJECTED, REFUND_REQUESTED, REFUNDED or + /// REVOKED. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// The shipping address provided by the accepting user if an address was requested. + /// + [JsonProperty(PropertyName = "address_shipping")] + public Address AddressShipping { get; set; } + + /// + /// The billing address provided by the accepting user if an address was requested. + /// + [JsonProperty(PropertyName = "address_billing")] + public Address AddressBilling { get; set; } + /// /// The id of the Request Response. /// @@ -73,28 +98,34 @@ public class RequestResponse : BunqModel public string TimeExpiry { get; set; } /// - /// The id of the MonetaryAccount the RequestResponse was received on. + /// The timestamp of when a refund request for the RequestResponse was claimed. /// - [JsonProperty(PropertyName = "monetary_account_id")] - public int? MonetaryAccountId { get; set; } + [JsonProperty(PropertyName = "time_refund_requested")] + public string TimeRefundRequested { get; set; } /// - /// The requested Amount. + /// The timestamp of when the RequestResponse was refunded. /// - [JsonProperty(PropertyName = "amount_inquired")] - public Amount AmountInquired { get; set; } + [JsonProperty(PropertyName = "time_refunded")] + public string TimeRefunded { get; set; } /// - /// The Amount the RequestResponse was accepted with. + /// The label of the user that requested the refund. /// - [JsonProperty(PropertyName = "amount_responded")] - public Amount AmountResponded { get; set; } + [JsonProperty(PropertyName = "user_refund_requested")] + public LabelUser UserRefundRequested { get; set; } /// - /// The status of the RequestResponse. Can be ACCEPTED, PENDING, REJECTED or REVOKED. + /// The id of the MonetaryAccount the RequestResponse was received on. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [JsonProperty(PropertyName = "monetary_account_id")] + public int? MonetaryAccountId { get; set; } + + /// + /// The requested Amount. + /// + [JsonProperty(PropertyName = "amount_inquired")] + public Amount AmountInquired { get; set; } /// /// The description for the RequestResponse provided by the requesting party. Maximum 9000 characters. @@ -159,18 +190,6 @@ public class RequestResponse : BunqModel [JsonProperty(PropertyName = "redirect_url")] public string RedirectUrl { get; set; } - /// - /// The billing address provided by the accepting user if an address was requested. - /// - [JsonProperty(PropertyName = "address_billing")] - public Address AddressBilling { get; set; } - - /// - /// The shipping address provided by the accepting user if an address was requested. - /// - [JsonProperty(PropertyName = "address_shipping")] - public Address AddressShipping { get; set; } - /// /// Whether or not chat messages are allowed. /// @@ -268,7 +287,6 @@ public static BunqResponse Get(int requestResponseId, int? mone return FromJson(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() @@ -298,6 +316,21 @@ public override bool IsAllFieldNull() return false; } + if (this.TimeRefundRequested != null) + { + return false; + } + + if (this.TimeRefunded != null) + { + return false; + } + + if (this.UserRefundRequested != null) + { + return false; + } + if (this.MonetaryAccountId != null) { return false; diff --git a/BunqSdk/Model/Generated/Endpoint/SandboxUser.cs b/BunqSdk/Model/Generated/Endpoint/SandboxUser.cs index 38aee0f..9bed7e0 100644 --- a/BunqSdk/Model/Generated/Endpoint/SandboxUser.cs +++ b/BunqSdk/Model/Generated/Endpoint/SandboxUser.cs @@ -48,7 +48,6 @@ public static BunqResponse Create(IDictionary custo return FromJson(responseRaw, OBJECT_TYPE_POST); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/Schedule.cs b/BunqSdk/Model/Generated/Endpoint/Schedule.cs index 185d012..c9d5e63 100644 --- a/BunqSdk/Model/Generated/Endpoint/Schedule.cs +++ b/BunqSdk/Model/Generated/Endpoint/Schedule.cs @@ -109,7 +109,6 @@ public static BunqResponse> List(int? monetaryAccountId = null, return FromJsonList(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/ScheduleInstance.cs b/BunqSdk/Model/Generated/Endpoint/ScheduleInstance.cs index 208c4c8..6526b08 100644 --- a/BunqSdk/Model/Generated/Endpoint/ScheduleInstance.cs +++ b/BunqSdk/Model/Generated/Endpoint/ScheduleInstance.cs @@ -132,7 +132,6 @@ public static BunqResponse> List(int scheduleId, int? mon return FromJsonList(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/SchedulePayment.cs b/BunqSdk/Model/Generated/Endpoint/SchedulePayment.cs index 859304d..8bbec16 100644 --- a/BunqSdk/Model/Generated/Endpoint/SchedulePayment.cs +++ b/BunqSdk/Model/Generated/Endpoint/SchedulePayment.cs @@ -151,7 +151,6 @@ public static BunqResponse Update(int schedulePaymentId, int? monetaryAccou return ProcessForId(responseRaw); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/SchedulePaymentBatch.cs b/BunqSdk/Model/Generated/Endpoint/SchedulePaymentBatch.cs index 8efa099..b99658a 100644 --- a/BunqSdk/Model/Generated/Endpoint/SchedulePaymentBatch.cs +++ b/BunqSdk/Model/Generated/Endpoint/SchedulePaymentBatch.cs @@ -30,7 +30,6 @@ public class SchedulePaymentBatch : BunqModel public const string FIELD_SCHEDULE = "schedule"; - /// /// The payment details. /// @@ -112,7 +111,6 @@ public static BunqResponse Delete(int schedulePaymentBatchId, int? monet return new BunqResponse(null, responseRaw.Headers); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/ScheduleUser.cs b/BunqSdk/Model/Generated/Endpoint/ScheduleUser.cs index a915878..93fd354 100644 --- a/BunqSdk/Model/Generated/Endpoint/ScheduleUser.cs +++ b/BunqSdk/Model/Generated/Endpoint/ScheduleUser.cs @@ -43,7 +43,6 @@ public static BunqResponse> List(IDictionary return FromJsonList(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/Session.cs b/BunqSdk/Model/Generated/Endpoint/Session.cs index 5c08763..3bf1e64 100644 --- a/BunqSdk/Model/Generated/Endpoint/Session.cs +++ b/BunqSdk/Model/Generated/Endpoint/Session.cs @@ -19,7 +19,6 @@ public class Session : BunqModel /// protected const string ENDPOINT_URL_DELETE = "session/{0}"; - /// /// Deletes the current session. /// @@ -33,7 +32,6 @@ public static BunqResponse Delete(int sessionId, IDictionary(null, responseRaw.Headers); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/ShareInviteBankAmountUsed.cs b/BunqSdk/Model/Generated/Endpoint/ShareInviteBankAmountUsed.cs index 1dc6289..aa2af1d 100644 --- a/BunqSdk/Model/Generated/Endpoint/ShareInviteBankAmountUsed.cs +++ b/BunqSdk/Model/Generated/Endpoint/ShareInviteBankAmountUsed.cs @@ -22,7 +22,6 @@ public class ShareInviteBankAmountUsed : BunqModel protected const string ENDPOINT_URL_DELETE = "user/{0}/monetary-account/{1}/share-invite-bank-inquiry/{2}/amount-used/{3}"; - /// /// Reset the available budget for a bank account share. To be called without any ID at the end of the path. /// @@ -40,7 +39,6 @@ public static BunqResponse Delete(int shareInviteBankInquiryId, int shar return new BunqResponse(null, responseRaw.Headers); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/ShareInviteBankInquiry.cs b/BunqSdk/Model/Generated/Endpoint/ShareInviteBankInquiry.cs index d1b3019..94cbbf5 100644 --- a/BunqSdk/Model/Generated/Endpoint/ShareInviteBankInquiry.cs +++ b/BunqSdk/Model/Generated/Endpoint/ShareInviteBankInquiry.cs @@ -43,36 +43,12 @@ public class ShareInviteBankInquiry : BunqModel /// private const string OBJECT_TYPE_GET = "ShareInviteBankInquiry"; - /// - /// The label of the monetary account that's being shared. - /// - [JsonProperty(PropertyName = "alias")] - public MonetaryAccountReference Alias { get; set; } - - /// - /// The user who created the share. - /// - [JsonProperty(PropertyName = "user_alias_created")] - public LabelUser UserAliasCreated { get; set; } - - /// - /// The user who revoked the share. - /// - [JsonProperty(PropertyName = "user_alias_revoked")] - public LabelUser UserAliasRevoked { get; set; } - /// /// The label of the user to share with. /// [JsonProperty(PropertyName = "counter_user_alias")] public LabelUser CounterUserAlias { get; set; } - /// - /// The id of the monetary account the share applies to. - /// - [JsonProperty(PropertyName = "monetary_account_id")] - public int? MonetaryAccountId { get; set; } - /// /// The id of the draft share invite bank. /// @@ -111,6 +87,30 @@ public class ShareInviteBankInquiry : BunqModel [JsonProperty(PropertyName = "end_date")] public string EndDate { get; set; } + /// + /// The label of the monetary account that's being shared. + /// + [JsonProperty(PropertyName = "alias")] + public MonetaryAccountReference Alias { get; set; } + + /// + /// The user who created the share. + /// + [JsonProperty(PropertyName = "user_alias_created")] + public LabelUser UserAliasCreated { get; set; } + + /// + /// The user who revoked the share. + /// + [JsonProperty(PropertyName = "user_alias_revoked")] + public LabelUser UserAliasRevoked { get; set; } + + /// + /// The id of the monetary account the share applies to. + /// + [JsonProperty(PropertyName = "monetary_account_id")] + public int? MonetaryAccountId { get; set; } + /// /// The id of the newly created share invite. /// @@ -225,7 +225,6 @@ public static BunqResponse> List(int? monetaryAccou return FromJsonList(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/ShareInviteBankResponse.cs b/BunqSdk/Model/Generated/Endpoint/ShareInviteBankResponse.cs index 496459d..be80fff 100644 --- a/BunqSdk/Model/Generated/Endpoint/ShareInviteBankResponse.cs +++ b/BunqSdk/Model/Generated/Endpoint/ShareInviteBankResponse.cs @@ -34,6 +34,32 @@ public class ShareInviteBankResponse : BunqModel /// private const string OBJECT_TYPE_GET = "ShareInviteBankResponse"; + /// + /// The status of the share. Can be PENDING, REVOKED (the user deletes the share inquiry before it's accepted), + /// ACCEPTED, CANCELLED (the user deletes an active share) or CANCELLATION_PENDING, CANCELLATION_ACCEPTED, + /// CANCELLATION_REJECTED (for canceling mutual connects) + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// The id of the ShareInviteBankResponse. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the ShareInviteBankResponse creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the ShareInviteBankResponse last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + /// /// The monetary account and user who created the share. /// @@ -64,14 +90,6 @@ public class ShareInviteBankResponse : BunqModel [JsonProperty(PropertyName = "share_detail")] public ShareDetail ShareDetail { get; set; } - /// - /// The status of the share. Can be PENDING, REVOKED (the user deletes the share inquiry before it's accepted), - /// ACCEPTED, CANCELLED (the user deletes an active share) or CANCELLATION_PENDING, CANCELLATION_ACCEPTED, - /// CANCELLATION_REJECTED (for canceling mutual connects) - /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - /// /// The share type, either STANDARD or MUTUAL. /// @@ -152,11 +170,25 @@ public static BunqResponse> List(IDictionary(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() { + if (this.Id != null) + { + return false; + } + + if (this.Created != null) + { + return false; + } + + if (this.Updated != null) + { + return false; + } + if (this.CounterAlias != null) { return false; diff --git a/BunqSdk/Model/Generated/Endpoint/Tab.cs b/BunqSdk/Model/Generated/Endpoint/Tab.cs index c2630ce..47e40d2 100644 --- a/BunqSdk/Model/Generated/Endpoint/Tab.cs +++ b/BunqSdk/Model/Generated/Endpoint/Tab.cs @@ -81,7 +81,6 @@ public static BunqResponse> List(int cashRegisterId, int? monetaryAcco return FromJsonList(responseRaw); } - /// /// public BunqModel GetReferencedObject() diff --git a/BunqSdk/Model/Generated/Endpoint/TabAttachmentTab.cs b/BunqSdk/Model/Generated/Endpoint/TabAttachmentTab.cs index 2c70fd9..19543f8 100644 --- a/BunqSdk/Model/Generated/Endpoint/TabAttachmentTab.cs +++ b/BunqSdk/Model/Generated/Endpoint/TabAttachmentTab.cs @@ -64,7 +64,6 @@ public static BunqResponse Get(string tabUuid, int tabAttachme return FromJson(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/TabAttachmentTabContent.cs b/BunqSdk/Model/Generated/Endpoint/TabAttachmentTabContent.cs index 420fc63..bfb4be1 100644 --- a/BunqSdk/Model/Generated/Endpoint/TabAttachmentTabContent.cs +++ b/BunqSdk/Model/Generated/Endpoint/TabAttachmentTabContent.cs @@ -40,7 +40,6 @@ public static BunqResponse List(string tabUuid, int attachmentId, return new BunqResponse(responseRaw.BodyBytes, responseRaw.Headers); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/TabItem.cs b/BunqSdk/Model/Generated/Endpoint/TabItem.cs index c2050fe..41ee6c8 100644 --- a/BunqSdk/Model/Generated/Endpoint/TabItem.cs +++ b/BunqSdk/Model/Generated/Endpoint/TabItem.cs @@ -53,7 +53,6 @@ public class TabItem : BunqModel [JsonProperty(PropertyName = "amount")] public Amount Amount { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/TabItemShop.cs b/BunqSdk/Model/Generated/Endpoint/TabItemShop.cs index 230622f..2ed13f1 100644 --- a/BunqSdk/Model/Generated/Endpoint/TabItemShop.cs +++ b/BunqSdk/Model/Generated/Endpoint/TabItemShop.cs @@ -52,12 +52,6 @@ public class TabItemShop : BunqModel /// private const string OBJECT_TYPE_GET = "TabItem"; - /// - /// The id of the created TabItem. - /// - [JsonProperty(PropertyName = "id")] - public int? Id { get; set; } - /// /// The TabItem's brief description. /// @@ -71,10 +65,10 @@ public class TabItemShop : BunqModel public string EanCode { get; set; } /// - /// A struct with an AttachmentPublic UUID that used as an avatar for the TabItem. + /// An AttachmentPublic UUID that used as an avatar for the TabItem. /// - [JsonProperty(PropertyName = "avatar_attachment")] - public AttachmentPublic AvatarAttachment { get; set; } + [JsonProperty(PropertyName = "avatar_attachment_uuid")] + public string AvatarAttachmentUuid { get; set; } /// /// A list of AttachmentTab attached to the TabItem. @@ -94,6 +88,18 @@ public class TabItemShop : BunqModel [JsonProperty(PropertyName = "amount")] public Amount Amount { get; set; } + /// + /// The id of the created TabItem. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// A struct with an AttachmentPublic UUID that used as an avatar for the TabItem. + /// + [JsonProperty(PropertyName = "avatar_attachment")] + public AttachmentPublic AvatarAttachment { get; set; } + /// /// Create a new TabItem for a given Tab. /// @@ -222,7 +228,6 @@ public static BunqResponse Get(int cashRegisterId, string tabUuid, return FromJson(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/TabItemShopBatch.cs b/BunqSdk/Model/Generated/Endpoint/TabItemShopBatch.cs index df17b61..e1feb51 100644 --- a/BunqSdk/Model/Generated/Endpoint/TabItemShopBatch.cs +++ b/BunqSdk/Model/Generated/Endpoint/TabItemShopBatch.cs @@ -25,7 +25,6 @@ public class TabItemShopBatch : BunqModel /// public const string FIELD_TAB_ITEMS = "tab_items"; - /// /// The list of tab items in the batch. /// @@ -57,7 +56,6 @@ public static BunqResponse Create(int cashRegisterId, string tabUuid, List< return ProcessForId(responseRaw); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/TabQrCodeContent.cs b/BunqSdk/Model/Generated/Endpoint/TabQrCodeContent.cs index e9b93a9..2378531 100644 --- a/BunqSdk/Model/Generated/Endpoint/TabQrCodeContent.cs +++ b/BunqSdk/Model/Generated/Endpoint/TabQrCodeContent.cs @@ -45,7 +45,6 @@ public static BunqResponse List(int cashRegisterId, string tabUuid, int? return new BunqResponse(responseRaw.BodyBytes, responseRaw.Headers); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/TabResultInquiry.cs b/BunqSdk/Model/Generated/Endpoint/TabResultInquiry.cs index 5795ade..b9a1df1 100644 --- a/BunqSdk/Model/Generated/Endpoint/TabResultInquiry.cs +++ b/BunqSdk/Model/Generated/Endpoint/TabResultInquiry.cs @@ -78,7 +78,6 @@ public static BunqResponse> List(int cashRegisterId, stri return FromJsonList(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/TabResultResponse.cs b/BunqSdk/Model/Generated/Endpoint/TabResultResponse.cs index a660548..a0dca01 100644 --- a/BunqSdk/Model/Generated/Endpoint/TabResultResponse.cs +++ b/BunqSdk/Model/Generated/Endpoint/TabResultResponse.cs @@ -81,7 +81,6 @@ public static BunqResponse> List(int? monetaryAccountId return FromJsonList(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/TabUsageMultiple.cs b/BunqSdk/Model/Generated/Endpoint/TabUsageMultiple.cs index 41f8425..bb4c380 100644 --- a/BunqSdk/Model/Generated/Endpoint/TabUsageMultiple.cs +++ b/BunqSdk/Model/Generated/Endpoint/TabUsageMultiple.cs @@ -63,24 +63,6 @@ public class TabUsageMultiple : BunqModel private const string OBJECT_TYPE_PUT = "Uuid"; private const string OBJECT_TYPE_GET = "TabUsageMultiple"; - /// - /// The uuid of the created TabUsageMultiple. - /// - [JsonProperty(PropertyName = "uuid")] - public string Uuid { get; set; } - - /// - /// The timestamp of the Tab's creation. - /// - [JsonProperty(PropertyName = "created")] - public string Created { get; set; } - - /// - /// The timestamp of the Tab's last update. - /// - [JsonProperty(PropertyName = "updated")] - public string Updated { get; set; } - /// /// The description of the TabUsageMultiple. Maximum 9000 characters. /// @@ -100,23 +82,23 @@ public class TabUsageMultiple : BunqModel public Amount AmountTotal { get; set; } /// - /// The token used to redirect mobile devices directly to the bunq app. Because they can't scan a QR code. + /// [DEPRECATED] Whether or not a higher amount can be paid. /// - [JsonProperty(PropertyName = "qr_code_token")] - public string QrCodeToken { get; set; } + [JsonProperty(PropertyName = "allow_amount_higher")] + public bool? AllowAmountHigher { get; set; } /// - /// The URL redirecting user to the tab payment in the bunq app. Only works on mobile devices. + /// [DEPRECATED] Whether or not a lower amount can be paid. /// - [JsonProperty(PropertyName = "tab_url")] - public string TabUrl { get; set; } + [JsonProperty(PropertyName = "allow_amount_lower")] + public bool? AllowAmountLower { get; set; } /// - /// The visibility of a Tab. A Tab can be visible trough NearPay, the QR code of the CashRegister and its own QR - /// code. + /// [DEPRECATED] Whether or not the user paying the Tab should be asked if he wants to give a tip. When want_tip + /// is set to true, allow_amount_higher must also be set to true and allow_amount_lower must be false. /// - [JsonProperty(PropertyName = "visibility")] - public TabVisibility Visibility { get; set; } + [JsonProperty(PropertyName = "want_tip")] + public bool? WantTip { get; set; } /// /// The minimum age of the user paying the Tab. @@ -136,12 +118,56 @@ public class TabUsageMultiple : BunqModel [JsonProperty(PropertyName = "redirect_url")] public string RedirectUrl { get; set; } + /// + /// The visibility of a Tab. A Tab can be visible trough NearPay, the QR code of the CashRegister and its own QR + /// code. + /// + [JsonProperty(PropertyName = "visibility")] + public TabVisibility Visibility { get; set; } + /// /// The moment when this Tab expires. /// [JsonProperty(PropertyName = "expiration")] public string Expiration { get; set; } + /// + /// An array of attachments that describe the tab. Viewable through the GET + /// /tab/{tabid}/attachment/{attachmentid}/content endpoint. + /// + [JsonProperty(PropertyName = "tab_attachment")] + public List TabAttachment { get; set; } + + /// + /// The uuid of the created TabUsageMultiple. + /// + [JsonProperty(PropertyName = "uuid")] + public string Uuid { get; set; } + + /// + /// The timestamp of the Tab's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the Tab's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The token used to redirect mobile devices directly to the bunq app. Because they can't scan a QR code. + /// + [JsonProperty(PropertyName = "qr_code_token")] + public string QrCodeToken { get; set; } + + /// + /// The URL redirecting user to the tab payment in the bunq app. Only works on mobile devices. + /// + [JsonProperty(PropertyName = "tab_url")] + public string TabUrl { get; set; } + /// /// The alias of the party that owns this tab. /// @@ -160,13 +186,6 @@ public class TabUsageMultiple : BunqModel [JsonProperty(PropertyName = "tab_item")] public List TabItem { get; set; } - /// - /// An array of attachments that describe the tab. Viewable through the GET - /// /tab/{tabid}/attachment/{attachmentid}/content endpoint. - /// - [JsonProperty(PropertyName = "tab_attachment")] - public List TabAttachment { get; set; } - /// /// Create a TabUsageMultiple. On creation the status must be set to OPEN /// @@ -307,7 +326,6 @@ public static BunqResponse> List(int cashRegisterId, int? return FromJsonList(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/TabUsageSingle.cs b/BunqSdk/Model/Generated/Endpoint/TabUsageSingle.cs index 08cbf30..54610b9 100644 --- a/BunqSdk/Model/Generated/Endpoint/TabUsageSingle.cs +++ b/BunqSdk/Model/Generated/Endpoint/TabUsageSingle.cs @@ -63,24 +63,6 @@ public class TabUsageSingle : BunqModel private const string OBJECT_TYPE_PUT = "Uuid"; private const string OBJECT_TYPE_GET = "TabUsageSingle"; - /// - /// The uuid of the created TabUsageSingle. - /// - [JsonProperty(PropertyName = "uuid")] - public string Uuid { get; set; } - - /// - /// The timestamp of the Tab's creation. - /// - [JsonProperty(PropertyName = "created")] - public string Created { get; set; } - - /// - /// The timestamp of the Tab's last update. - /// - [JsonProperty(PropertyName = "updated")] - public string Updated { get; set; } - /// /// The merchant reference of the Tab, as defined by the owner. /// @@ -106,29 +88,23 @@ public class TabUsageSingle : BunqModel public Amount AmountTotal { get; set; } /// - /// The amount that has been paid for this Tab. - /// - [JsonProperty(PropertyName = "amount_paid")] - public Amount AmountPaid { get; set; } - - /// - /// The token used to redirect mobile devices directly to the bunq app. Because they can't scan a QR code. + /// [DEPRECATED] Whether or not a higher amount can be paid. /// - [JsonProperty(PropertyName = "qr_code_token")] - public string QrCodeToken { get; set; } + [JsonProperty(PropertyName = "allow_amount_higher")] + public bool? AllowAmountHigher { get; set; } /// - /// The URL redirecting user to the tab payment in the bunq app. Only works on mobile devices. + /// [DEPRECATED] Whether or not a lower amount can be paid. /// - [JsonProperty(PropertyName = "tab_url")] - public string TabUrl { get; set; } + [JsonProperty(PropertyName = "allow_amount_lower")] + public bool? AllowAmountLower { get; set; } /// - /// The visibility of a Tab. A Tab can be visible trough NearPay, the QR code of the CashRegister and its own QR - /// code. + /// [DEPRECATED] Whether or not the user paying the Tab should be asked if he wants to give a tip. When want_tip + /// is set to true, allow_amount_higher must also be set to true and allow_amount_lower must be false. /// - [JsonProperty(PropertyName = "visibility")] - public TabVisibility Visibility { get; set; } + [JsonProperty(PropertyName = "want_tip")] + public bool? WantTip { get; set; } /// /// The minimum age of the user paying the Tab. @@ -148,12 +124,62 @@ public class TabUsageSingle : BunqModel [JsonProperty(PropertyName = "redirect_url")] public string RedirectUrl { get; set; } + /// + /// The visibility of a Tab. A Tab can be visible trough NearPay, the QR code of the CashRegister and its own QR + /// code. + /// + [JsonProperty(PropertyName = "visibility")] + public TabVisibility Visibility { get; set; } + /// /// The moment when this Tab expires. /// [JsonProperty(PropertyName = "expiration")] public string Expiration { get; set; } + /// + /// An array of attachments that describe the tab. Uploaded through the POST /user/{userid}/attachment-tab + /// endpoint. + /// + [JsonProperty(PropertyName = "tab_attachment")] + public List TabAttachment { get; set; } + + /// + /// The uuid of the created TabUsageSingle. + /// + [JsonProperty(PropertyName = "uuid")] + public string Uuid { get; set; } + + /// + /// The timestamp of the Tab's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the Tab's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The amount that has been paid for this Tab. + /// + [JsonProperty(PropertyName = "amount_paid")] + public Amount AmountPaid { get; set; } + + /// + /// The token used to redirect mobile devices directly to the bunq app. Because they can't scan a QR code. + /// + [JsonProperty(PropertyName = "qr_code_token")] + public string QrCodeToken { get; set; } + + /// + /// The URL redirecting user to the tab payment in the bunq app. Only works on mobile devices. + /// + [JsonProperty(PropertyName = "tab_url")] + public string TabUrl { get; set; } + /// /// The alias of the party that owns this tab. /// @@ -172,13 +198,6 @@ public class TabUsageSingle : BunqModel [JsonProperty(PropertyName = "tab_item")] public List TabItem { get; set; } - /// - /// An array of attachments that describe the tab. Uploaded through the POST /user/{userid}/attachment-tab - /// endpoint. - /// - [JsonProperty(PropertyName = "tab_attachment")] - public List TabAttachment { get; set; } - /// /// Create a TabUsageSingle. The initial status must be OPEN /// @@ -321,7 +340,6 @@ public static BunqResponse> List(int cashRegisterId, int? m return FromJsonList(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/TokenQrRequestIdeal.cs b/BunqSdk/Model/Generated/Endpoint/TokenQrRequestIdeal.cs index 7ef1510..603c17a 100644 --- a/BunqSdk/Model/Generated/Endpoint/TokenQrRequestIdeal.cs +++ b/BunqSdk/Model/Generated/Endpoint/TokenQrRequestIdeal.cs @@ -33,6 +33,12 @@ public class TokenQrRequestIdeal : BunqModel /// private const string OBJECT_TYPE_POST = "RequestResponse"; + /// + /// The token passed from a site or read from a QR code. + /// + [JsonProperty(PropertyName = "token")] + public string Token { get; set; } + /// /// The id of the RequestResponse. /// @@ -184,7 +190,6 @@ public static BunqResponse Create(string token, return FromJson(responseRaw, OBJECT_TYPE_POST); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/TokenQrRequestSofort.cs b/BunqSdk/Model/Generated/Endpoint/TokenQrRequestSofort.cs index b91e866..b7d6744 100644 --- a/BunqSdk/Model/Generated/Endpoint/TokenQrRequestSofort.cs +++ b/BunqSdk/Model/Generated/Endpoint/TokenQrRequestSofort.cs @@ -29,6 +29,12 @@ public class TokenQrRequestSofort : BunqModel /// private const string OBJECT_TYPE_POST = "RequestResponse"; + /// + /// The token passed from a site or read from a QR code. + /// + [JsonProperty(PropertyName = "token")] + public string Token { get; set; } + /// /// Create a request from an SOFORT transaction. /// @@ -52,7 +58,6 @@ public static BunqResponse Create(string token, return FromJson(responseRaw, OBJECT_TYPE_POST); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/User.cs b/BunqSdk/Model/Generated/Endpoint/User.cs index 07a0495..71b2210 100644 --- a/BunqSdk/Model/Generated/Endpoint/User.cs +++ b/BunqSdk/Model/Generated/Endpoint/User.cs @@ -82,7 +82,6 @@ public static BunqResponse> List(IDictionary urlParam return FromJsonList(responseRaw); } - /// /// public BunqModel GetReferencedObject() diff --git a/BunqSdk/Model/Generated/Endpoint/UserApiKey.cs b/BunqSdk/Model/Generated/Endpoint/UserApiKey.cs index c0bedad..740beef 100644 --- a/BunqSdk/Model/Generated/Endpoint/UserApiKey.cs +++ b/BunqSdk/Model/Generated/Endpoint/UserApiKey.cs @@ -40,7 +40,6 @@ public class UserApiKey : BunqModel [JsonProperty(PropertyName = "granted_by_user")] public UserApiKeyAnchoredUser GrantedByUser { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/UserCompany.cs b/BunqSdk/Model/Generated/Endpoint/UserCompany.cs index 223f7df..97b98c5 100644 --- a/BunqSdk/Model/Generated/Endpoint/UserCompany.cs +++ b/BunqSdk/Model/Generated/Endpoint/UserCompany.cs @@ -50,52 +50,60 @@ public class UserCompany : BunqModel private const string OBJECT_TYPE_GET = "UserCompany"; /// - /// The id of the modified company. + /// The company name. /// - [JsonProperty(PropertyName = "id")] - public int? Id { get; set; } + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } /// - /// The timestamp of the company object's creation. + /// The company's public nick name. /// - [JsonProperty(PropertyName = "created")] - public string Created { get; set; } + [JsonProperty(PropertyName = "public_nick_name")] + public string PublicNickName { get; set; } /// - /// The timestamp of the company object's last update. + /// The public UUID of the company's avatar. /// - [JsonProperty(PropertyName = "updated")] - public string Updated { get; set; } + [JsonProperty(PropertyName = "avatar_uuid")] + public string AvatarUuid { get; set; } /// - /// The company's public UUID. + /// The company's main address. /// - [JsonProperty(PropertyName = "public_uuid")] - public string PublicUuid { get; set; } + [JsonProperty(PropertyName = "address_main")] + public Address AddressMain { get; set; } /// - /// The company name. + /// The company's postal address. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [JsonProperty(PropertyName = "address_postal")] + public Address AddressPostal { get; set; } /// - /// The company's display name. + /// The person's preferred language. Formatted as a ISO 639-1 language code plus a ISO 3166-1 alpha-2 country + /// code, seperated by an underscore. /// - [JsonProperty(PropertyName = "display_name")] - public string DisplayName { get; set; } + [JsonProperty(PropertyName = "language")] + public string Language { get; set; } /// - /// The company's public nick name. + /// The person's preferred region. Formatted as a ISO 639-1 language code plus a ISO 3166-1 alpha-2 country + /// code, seperated by an underscore. /// - [JsonProperty(PropertyName = "public_nick_name")] - public string PublicNickName { get; set; } + [JsonProperty(PropertyName = "region")] + public string Region { get; set; } /// - /// The aliases of the account. + /// The country as an ISO 3166-1 alpha-2 country code.. /// - [JsonProperty(PropertyName = "alias")] - public List Alias { get; set; } + [JsonProperty(PropertyName = "country")] + public string Country { get; set; } + + /// + /// The names of the company's ultimate beneficiary owners. Minimum zero, maximum four. + /// + [JsonProperty(PropertyName = "ubo")] + public List Ubo { get; set; } /// /// The company's chamber of commerce number. @@ -104,121 +112,119 @@ public class UserCompany : BunqModel public string ChamberOfCommerceNumber { get; set; } /// - /// The type of business entity. + /// The user status. Can be: ACTIVE, SIGNUP, RECOVERY. /// - [JsonProperty(PropertyName = "type_of_business_entity")] - public string TypeOfBusinessEntity { get; set; } + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } /// - /// The sector of industry. + /// The user sub-status. Can be: NONE, FACE_RESET, APPROVAL, APPROVAL_DIRECTOR, APPROVAL_PARENT, + /// APPROVAL_SUPPORT, COUNTER_IBAN, IDEAL or SUBMIT. /// - [JsonProperty(PropertyName = "sector_of_industry")] - public string SectorOfIndustry { get; set; } + [JsonProperty(PropertyName = "sub_status")] + public string SubStatus { get; set; } /// - /// The company's other bank account IBAN, through which we verify it. + /// The setting for the session timeout of the company in seconds. /// - [JsonProperty(PropertyName = "counter_bank_iban")] - public string CounterBankIban { get; set; } + [JsonProperty(PropertyName = "session_timeout")] + public int? SessionTimeout { get; set; } /// - /// The company's avatar. + /// The amount the company can pay in the session without asking for credentials. /// - [JsonProperty(PropertyName = "avatar")] - public Avatar Avatar { get; set; } + [JsonProperty(PropertyName = "daily_limit_without_confirmation_login")] + public Amount DailyLimitWithoutConfirmationLogin { get; set; } /// - /// The company's main address. + /// The types of notifications that will result in a push notification or URL callback for this UserCompany. /// - [JsonProperty(PropertyName = "address_main")] - public Address AddressMain { get; set; } + [JsonProperty(PropertyName = "notification_filters")] + public List NotificationFilters { get; set; } /// - /// The company's postal address. + /// The id of the modified company. /// - [JsonProperty(PropertyName = "address_postal")] - public Address AddressPostal { get; set; } + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } /// - /// The version of the terms of service accepted by the user. + /// The timestamp of the company object's creation. /// - [JsonProperty(PropertyName = "version_terms_of_service")] - public string VersionTermsOfService { get; set; } + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } /// - /// The existing bunq user alias for the company's director. + /// The timestamp of the company object's last update. /// - [JsonProperty(PropertyName = "director_alias")] - public LabelUser DirectorAlias { get; set; } + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } /// - /// The person's preferred language. Formatted as a ISO 639-1 language code plus a ISO 3166-1 alpha-2 country - /// code, seperated by an underscore. + /// The company's public UUID. /// - [JsonProperty(PropertyName = "language")] - public string Language { get; set; } + [JsonProperty(PropertyName = "public_uuid")] + public string PublicUuid { get; set; } /// - /// The country as an ISO 3166-1 alpha-2 country code.. + /// The company's display name. /// - [JsonProperty(PropertyName = "country")] - public string Country { get; set; } + [JsonProperty(PropertyName = "display_name")] + public string DisplayName { get; set; } /// - /// The person's preferred region. Formatted as a ISO 639-1 language code plus a ISO 3166-1 alpha-2 country - /// code, seperated by an underscore. + /// The aliases of the account. /// - [JsonProperty(PropertyName = "region")] - public string Region { get; set; } + [JsonProperty(PropertyName = "alias")] + public List Alias { get; set; } /// - /// The names of the company's ultimate beneficiary owners. Minimum zero, maximum four. + /// The type of business entity. /// - [JsonProperty(PropertyName = "ubo")] - public List Ubo { get; set; } + [JsonProperty(PropertyName = "type_of_business_entity")] + public string TypeOfBusinessEntity { get; set; } /// - /// The user status. Can be: ACTIVE, SIGNUP, RECOVERY. + /// The sector of industry. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [JsonProperty(PropertyName = "sector_of_industry")] + public string SectorOfIndustry { get; set; } /// - /// The user sub-status. Can be: NONE, FACE_RESET, APPROVAL, APPROVAL_DIRECTOR, APPROVAL_PARENT, - /// APPROVAL_SUPPORT, COUNTER_IBAN, IDEAL or SUBMIT. + /// The company's other bank account IBAN, through which we verify it. /// - [JsonProperty(PropertyName = "sub_status")] - public string SubStatus { get; set; } + [JsonProperty(PropertyName = "counter_bank_iban")] + public string CounterBankIban { get; set; } /// - /// The setting for the session timeout of the company in seconds. + /// The company's avatar. /// - [JsonProperty(PropertyName = "session_timeout")] - public int? SessionTimeout { get; set; } + [JsonProperty(PropertyName = "avatar")] + public Avatar Avatar { get; set; } /// - /// Card ids used for centralized card limits. + /// The version of the terms of service accepted by the user. /// - [JsonProperty(PropertyName = "card_ids")] - public List CardIds { get; set; } + [JsonProperty(PropertyName = "version_terms_of_service")] + public string VersionTermsOfService { get; set; } /// - /// The centralized limits for user's cards. + /// The existing bunq user alias for the company's director. /// - [JsonProperty(PropertyName = "card_limits")] - public List CardLimits { get; set; } + [JsonProperty(PropertyName = "director_alias")] + public LabelUser DirectorAlias { get; set; } /// - /// The amount the company can pay in the session without asking for credentials. + /// Card ids used for centralized card limits. /// - [JsonProperty(PropertyName = "daily_limit_without_confirmation_login")] - public Amount DailyLimitWithoutConfirmationLogin { get; set; } + [JsonProperty(PropertyName = "card_ids")] + public List CardIds { get; set; } /// - /// The types of notifications that will result in a push notification or URL callback for this UserCompany. + /// The centralized limits for user's cards. /// - [JsonProperty(PropertyName = "notification_filters")] - public List NotificationFilters { get; set; } + [JsonProperty(PropertyName = "card_limits")] + public List CardLimits { get; set; } /// /// The customer profile of the company. @@ -307,7 +313,6 @@ public static BunqResponse Update(string name = null, string publicNickName return ProcessForId(responseRaw); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/UserCredentialPasswordIp.cs b/BunqSdk/Model/Generated/Endpoint/UserCredentialPasswordIp.cs index 3d0346a..d764cc2 100644 --- a/BunqSdk/Model/Generated/Endpoint/UserCredentialPasswordIp.cs +++ b/BunqSdk/Model/Generated/Endpoint/UserCredentialPasswordIp.cs @@ -101,7 +101,6 @@ public static BunqResponse> List(IDictionary(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/UserLight.cs b/BunqSdk/Model/Generated/Endpoint/UserLight.cs index 8fe9174..66e74c4 100644 --- a/BunqSdk/Model/Generated/Endpoint/UserLight.cs +++ b/BunqSdk/Model/Generated/Endpoint/UserLight.cs @@ -57,30 +57,6 @@ public class UserLight : BunqModel /// private const string OBJECT_TYPE_GET = "UserPerson"; - /// - /// The id of the user. - /// - [JsonProperty(PropertyName = "id")] - public int? Id { get; set; } - - /// - /// The timestamp of the user object's creation. - /// - [JsonProperty(PropertyName = "created")] - public string Created { get; set; } - - /// - /// The timestamp of the user object's last update. - /// - [JsonProperty(PropertyName = "updated")] - public string Updated { get; set; } - - /// - /// The user's public UUID. - /// - [JsonProperty(PropertyName = "public_uuid")] - public string PublicUuid { get; set; } - /// /// The user's first name. /// @@ -100,28 +76,28 @@ public class UserLight : BunqModel public string LastName { get; set; } /// - /// The user's legal name. + /// The public nick name for the user. /// - [JsonProperty(PropertyName = "legal_name")] - public string LegalName { get; set; } + [JsonProperty(PropertyName = "public_nick_name")] + public string PublicNickName { get; set; } /// - /// The display name for the user. + /// The user's main address. /// - [JsonProperty(PropertyName = "display_name")] - public string DisplayName { get; set; } + [JsonProperty(PropertyName = "address_main")] + public Address AddressMain { get; set; } /// - /// The public nick name for the user. + /// The user's postal address. /// - [JsonProperty(PropertyName = "public_nick_name")] - public string PublicNickName { get; set; } + [JsonProperty(PropertyName = "address_postal")] + public Address AddressPostal { get; set; } /// - /// The aliases of the user. + /// The public UUID of the user's avatar. /// - [JsonProperty(PropertyName = "alias")] - public List Alias { get; set; } + [JsonProperty(PropertyName = "avatar_uuid")] + public string AvatarUuid { get; set; } /// /// The user's social security number. @@ -154,16 +130,16 @@ public class UserLight : BunqModel public string DocumentCountryOfIssuance { get; set; } /// - /// The user's main address. + /// The reference to the uploaded picture/scan of the front side of the identification document. /// - [JsonProperty(PropertyName = "address_main")] - public Address AddressMain { get; set; } + [JsonProperty(PropertyName = "document_front_attachment_id")] + public int? DocumentFrontAttachmentId { get; set; } /// - /// The user's postal address. + /// The reference to the uploaded picture/scan of the back side of the identification document. /// - [JsonProperty(PropertyName = "address_postal")] - public Address AddressPostal { get; set; } + [JsonProperty(PropertyName = "document_back_attachment_id")] + public int? DocumentBackAttachmentId { get; set; } /// /// The user's date of birth. Accepts ISO8601 date formats. @@ -209,18 +185,6 @@ public class UserLight : BunqModel [JsonProperty(PropertyName = "gender")] public string Gender { get; set; } - /// - /// The user's avatar. - /// - [JsonProperty(PropertyName = "avatar")] - public Avatar Avatar { get; set; } - - /// - /// The version of the terms of service accepted by the user. - /// - [JsonProperty(PropertyName = "version_terms_of_service")] - public string VersionTermsOfService { get; set; } - /// /// The user status. The user status. Can be: ACTIVE, BLOCKED, SIGNUP, DENIED or ABORTED. /// @@ -234,6 +198,12 @@ public class UserLight : BunqModel [JsonProperty(PropertyName = "sub_status")] public string SubStatus { get; set; } + /// + /// The legal guardian of the user. Required for minors. + /// + [JsonProperty(PropertyName = "legal_guardian_alias")] + public MonetaryAccountReference LegalGuardianAlias { get; set; } + /// /// The setting for the session timeout of the user in seconds. /// @@ -252,6 +222,60 @@ public class UserLight : BunqModel [JsonProperty(PropertyName = "notification_filters")] public List NotificationFilters { get; set; } + /// + /// The id of the user. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the user object's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the user object's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The user's public UUID. + /// + [JsonProperty(PropertyName = "public_uuid")] + public string PublicUuid { get; set; } + + /// + /// The user's legal name. + /// + [JsonProperty(PropertyName = "legal_name")] + public string LegalName { get; set; } + + /// + /// The display name for the user. + /// + [JsonProperty(PropertyName = "display_name")] + public string DisplayName { get; set; } + + /// + /// The aliases of the user. + /// + [JsonProperty(PropertyName = "alias")] + public List Alias { get; set; } + + /// + /// The user's avatar. + /// + [JsonProperty(PropertyName = "avatar")] + public Avatar Avatar { get; set; } + + /// + /// The version of the terms of service accepted by the user. + /// + [JsonProperty(PropertyName = "version_terms_of_service")] + public string VersionTermsOfService { get; set; } + /// /// Get a specific bunq light user. /// @@ -266,7 +290,6 @@ public static BunqResponse Get(int userLightId, IDictionary(responseRaw, OBJECT_TYPE_GET); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/UserPerson.cs b/BunqSdk/Model/Generated/Endpoint/UserPerson.cs index 63e3789..a9e76f8 100644 --- a/BunqSdk/Model/Generated/Endpoint/UserPerson.cs +++ b/BunqSdk/Model/Generated/Endpoint/UserPerson.cs @@ -62,30 +62,6 @@ public class UserPerson : BunqModel /// private const string OBJECT_TYPE_GET = "UserPerson"; - /// - /// The id of the modified person object. - /// - [JsonProperty(PropertyName = "id")] - public int? Id { get; set; } - - /// - /// The timestamp of the person object's creation. - /// - [JsonProperty(PropertyName = "created")] - public string Created { get; set; } - - /// - /// The timestamp of the person object's last update. - /// - [JsonProperty(PropertyName = "updated")] - public string Updated { get; set; } - - /// - /// The person's public UUID. - /// - [JsonProperty(PropertyName = "public_uuid")] - public string PublicUuid { get; set; } - /// /// The person's first name. /// @@ -105,28 +81,28 @@ public class UserPerson : BunqModel public string LastName { get; set; } /// - /// The person's legal name. + /// The public nick name for the person. /// - [JsonProperty(PropertyName = "legal_name")] - public string LegalName { get; set; } + [JsonProperty(PropertyName = "public_nick_name")] + public string PublicNickName { get; set; } /// - /// The display name for the person. + /// The person's main address. /// - [JsonProperty(PropertyName = "display_name")] - public string DisplayName { get; set; } + [JsonProperty(PropertyName = "address_main")] + public Address AddressMain { get; set; } /// - /// The public nick name for the person. + /// The person's postal address. /// - [JsonProperty(PropertyName = "public_nick_name")] - public string PublicNickName { get; set; } + [JsonProperty(PropertyName = "address_postal")] + public Address AddressPostal { get; set; } /// - /// The aliases of the user. + /// The public UUID of the user's avatar. /// - [JsonProperty(PropertyName = "alias")] - public List Alias { get; set; } + [JsonProperty(PropertyName = "avatar_uuid")] + public string AvatarUuid { get; set; } /// /// The user's tax residence numbers for different countries. @@ -153,16 +129,16 @@ public class UserPerson : BunqModel public string DocumentCountryOfIssuance { get; set; } /// - /// The person's main address. + /// The reference to the uploaded picture/scan of the front side of the identification document. /// - [JsonProperty(PropertyName = "address_main")] - public Address AddressMain { get; set; } + [JsonProperty(PropertyName = "document_front_attachment_id")] + public int? DocumentFrontAttachmentId { get; set; } /// - /// The person's postal address. + /// The reference to the uploaded picture/scan of the back side of the identification document. /// - [JsonProperty(PropertyName = "address_postal")] - public Address AddressPostal { get; set; } + [JsonProperty(PropertyName = "document_back_attachment_id")] + public int? DocumentBackAttachmentId { get; set; } /// /// The person's date of birth. Accepts ISO8601 date formats. @@ -208,18 +184,6 @@ public class UserPerson : BunqModel [JsonProperty(PropertyName = "gender")] public string Gender { get; set; } - /// - /// The user's avatar. - /// - [JsonProperty(PropertyName = "avatar")] - public Avatar Avatar { get; set; } - - /// - /// The version of the terms of service accepted by the user. - /// - [JsonProperty(PropertyName = "version_terms_of_service")] - public string VersionTermsOfService { get; set; } - /// /// The user status. The user status. Can be: ACTIVE, BLOCKED, SIGNUP, RECOVERY, DENIED or ABORTED. /// @@ -233,12 +197,30 @@ public class UserPerson : BunqModel [JsonProperty(PropertyName = "sub_status")] public string SubStatus { get; set; } + /// + /// The legal guardian of the user. Required for minors. + /// + [JsonProperty(PropertyName = "legal_guardian_alias")] + public MonetaryAccountReference LegalGuardianAlias { get; set; } + /// /// The setting for the session timeout of the user in seconds. /// [JsonProperty(PropertyName = "session_timeout")] public int? SessionTimeout { get; set; } + /// + /// Card ids used for centralized card limits. + /// + [JsonProperty(PropertyName = "card_ids")] + public List CardIds { get; set; } + + /// + /// The centralized limits for user's cards. + /// + [JsonProperty(PropertyName = "card_limits")] + public List CardLimits { get; set; } + /// /// The amount the user can pay in the session without asking for credentials. /// @@ -251,6 +233,60 @@ public class UserPerson : BunqModel [JsonProperty(PropertyName = "notification_filters")] public List NotificationFilters { get; set; } + /// + /// The id of the modified person object. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// The timestamp of the person object's creation. + /// + [JsonProperty(PropertyName = "created")] + public string Created { get; set; } + + /// + /// The timestamp of the person object's last update. + /// + [JsonProperty(PropertyName = "updated")] + public string Updated { get; set; } + + /// + /// The person's public UUID. + /// + [JsonProperty(PropertyName = "public_uuid")] + public string PublicUuid { get; set; } + + /// + /// The person's legal name. + /// + [JsonProperty(PropertyName = "legal_name")] + public string LegalName { get; set; } + + /// + /// The display name for the person. + /// + [JsonProperty(PropertyName = "display_name")] + public string DisplayName { get; set; } + + /// + /// The aliases of the user. + /// + [JsonProperty(PropertyName = "alias")] + public List Alias { get; set; } + + /// + /// The user's avatar. + /// + [JsonProperty(PropertyName = "avatar")] + public Avatar Avatar { get; set; } + + /// + /// The version of the terms of service accepted by the user. + /// + [JsonProperty(PropertyName = "version_terms_of_service")] + public string VersionTermsOfService { get; set; } + /// /// Get a specific person. /// @@ -350,7 +386,6 @@ public static BunqResponse Update(string firstName = null, string middleNam return ProcessForId(responseRaw); } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Endpoint/WhitelistResult.cs b/BunqSdk/Model/Generated/Endpoint/WhitelistResult.cs index 3245cb8..f569d51 100644 --- a/BunqSdk/Model/Generated/Endpoint/WhitelistResult.cs +++ b/BunqSdk/Model/Generated/Endpoint/WhitelistResult.cs @@ -52,7 +52,6 @@ public class WhitelistResult : BunqModel [JsonProperty(PropertyName = "request_reference_split_the_bill")] public List RequestReferenceSplitTheBill { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/Address.cs b/BunqSdk/Model/Generated/Object/Address.cs index 1f61f24..9c1c207 100644 --- a/BunqSdk/Model/Generated/Object/Address.cs +++ b/BunqSdk/Model/Generated/Object/Address.cs @@ -59,7 +59,6 @@ public Address(string street, string houseNumber, string postalCode, string city Country = country; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/Amount.cs b/BunqSdk/Model/Generated/Object/Amount.cs index 575c3cb..8448471 100644 --- a/BunqSdk/Model/Generated/Object/Amount.cs +++ b/BunqSdk/Model/Generated/Object/Amount.cs @@ -26,7 +26,6 @@ public Amount(string value, string currency) Currency = currency; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/Attachment.cs b/BunqSdk/Model/Generated/Object/Attachment.cs index 55cc30f..8ebc9a5 100644 --- a/BunqSdk/Model/Generated/Object/Attachment.cs +++ b/BunqSdk/Model/Generated/Object/Attachment.cs @@ -20,7 +20,6 @@ public class Attachment : BunqModel [JsonProperty(PropertyName = "content_type")] public string ContentType { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/AttachmentMonetaryAccountPayment.cs b/BunqSdk/Model/Generated/Object/AttachmentMonetaryAccountPayment.cs index 204d48d..6f9adca 100644 --- a/BunqSdk/Model/Generated/Object/AttachmentMonetaryAccountPayment.cs +++ b/BunqSdk/Model/Generated/Object/AttachmentMonetaryAccountPayment.cs @@ -25,7 +25,6 @@ public AttachmentMonetaryAccountPayment(int? id) Id = id; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/AttachmentPublic.cs b/BunqSdk/Model/Generated/Object/AttachmentPublic.cs index 4efce35..96100c1 100644 --- a/BunqSdk/Model/Generated/Object/AttachmentPublic.cs +++ b/BunqSdk/Model/Generated/Object/AttachmentPublic.cs @@ -26,7 +26,6 @@ public class AttachmentPublic : BunqModel [JsonProperty(PropertyName = "content_type")] public string ContentType { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/AttachmentTab.cs b/BunqSdk/Model/Generated/Object/AttachmentTab.cs index 069c863..675e620 100644 --- a/BunqSdk/Model/Generated/Object/AttachmentTab.cs +++ b/BunqSdk/Model/Generated/Object/AttachmentTab.cs @@ -26,7 +26,6 @@ public class AttachmentTab : BunqModel [JsonProperty(PropertyName = "content_type")] public string ContentType { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/Avatar.cs b/BunqSdk/Model/Generated/Object/Avatar.cs index b6de06d..4517ce9 100644 --- a/BunqSdk/Model/Generated/Object/Avatar.cs +++ b/BunqSdk/Model/Generated/Object/Avatar.cs @@ -31,7 +31,6 @@ public Avatar(string uuid) Uuid = uuid; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/BudgetRestriction.cs b/BunqSdk/Model/Generated/Object/BudgetRestriction.cs index c339f30..8bc5526 100644 --- a/BunqSdk/Model/Generated/Object/BudgetRestriction.cs +++ b/BunqSdk/Model/Generated/Object/BudgetRestriction.cs @@ -20,7 +20,6 @@ public class BudgetRestriction : BunqModel [JsonProperty(PropertyName = "frequency")] public string Frequency { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/BunqId.cs b/BunqSdk/Model/Generated/Object/BunqId.cs index 5ead736..8d59302 100644 --- a/BunqSdk/Model/Generated/Object/BunqId.cs +++ b/BunqSdk/Model/Generated/Object/BunqId.cs @@ -19,7 +19,6 @@ public BunqId(int? id) Id = id; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/BunqMeMerchantAvailable.cs b/BunqSdk/Model/Generated/Object/BunqMeMerchantAvailable.cs index 09c2079..0e172d0 100644 --- a/BunqSdk/Model/Generated/Object/BunqMeMerchantAvailable.cs +++ b/BunqSdk/Model/Generated/Object/BunqMeMerchantAvailable.cs @@ -20,7 +20,6 @@ public class BunqMeMerchantAvailable : BunqModel [JsonProperty(PropertyName = "available")] public bool? Available { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/CardBatchEntry.cs b/BunqSdk/Model/Generated/Object/CardBatchEntry.cs new file mode 100644 index 0000000..0ff7188 --- /dev/null +++ b/BunqSdk/Model/Generated/Object/CardBatchEntry.cs @@ -0,0 +1,80 @@ +using Bunq.Sdk.Model.Core; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace Bunq.Sdk.Model.Generated.Object +{ + /// + /// + public class CardBatchEntry : BunqModel + { + /// + /// The ID of the card that needs to be updated. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { 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 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. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// The limits to define for the card, among CARD_LIMIT_ATM and CARD_LIMIT_POS_ICC. All the limits must be + /// provided on update. + /// + [JsonProperty(PropertyName = "limit")] + public List Limit { get; set; } + + /// + /// Whether or not it is allowed to use the mag stripe for 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; } + + /// + /// 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; } + + public CardBatchEntry(int? id) + { + Id = id; + } + + /// + /// + public override bool IsAllFieldNull() + { + return true; + } + + /// + /// + public static CardBatchEntry CreateFromJsonString(string json) + { + return BunqModel.CreateFromJsonString(json); + } + } +} \ No newline at end of file diff --git a/BunqSdk/Model/Generated/Object/CardCountryPermission.cs b/BunqSdk/Model/Generated/Object/CardCountryPermission.cs index a6bac3e..1cd9346 100644 --- a/BunqSdk/Model/Generated/Object/CardCountryPermission.cs +++ b/BunqSdk/Model/Generated/Object/CardCountryPermission.cs @@ -31,7 +31,6 @@ public CardCountryPermission(string country) Country = country; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/CardLimit.cs b/BunqSdk/Model/Generated/Object/CardLimit.cs index 1b28c17..9a5fc6a 100644 --- a/BunqSdk/Model/Generated/Object/CardLimit.cs +++ b/BunqSdk/Model/Generated/Object/CardLimit.cs @@ -40,7 +40,6 @@ public CardLimit(string dailyLimit, string currency, string type) Type = type; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/CardMagStripePermission.cs b/BunqSdk/Model/Generated/Object/CardMagStripePermission.cs index 2944daf..1e12c1d 100644 --- a/BunqSdk/Model/Generated/Object/CardMagStripePermission.cs +++ b/BunqSdk/Model/Generated/Object/CardMagStripePermission.cs @@ -14,7 +14,6 @@ public class CardMagStripePermission : BunqModel [JsonProperty(PropertyName = "expiry_time")] public string ExpiryTime { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/CardPinAssignment.cs b/BunqSdk/Model/Generated/Object/CardPinAssignment.cs index 10a3551..73e9d67 100644 --- a/BunqSdk/Model/Generated/Object/CardPinAssignment.cs +++ b/BunqSdk/Model/Generated/Object/CardPinAssignment.cs @@ -31,7 +31,6 @@ public CardPinAssignment(string type) Type = type; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/Certificate.cs b/BunqSdk/Model/Generated/Object/Certificate.cs index 71af29b..f1f89d8 100644 --- a/BunqSdk/Model/Generated/Object/Certificate.cs +++ b/BunqSdk/Model/Generated/Object/Certificate.cs @@ -19,7 +19,6 @@ public Certificate(string certificateString) CertificateString = certificateString; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/DraftPaymentAnchorObject.cs b/BunqSdk/Model/Generated/Object/DraftPaymentAnchorObject.cs index 0802254..7eba2a5 100644 --- a/BunqSdk/Model/Generated/Object/DraftPaymentAnchorObject.cs +++ b/BunqSdk/Model/Generated/Object/DraftPaymentAnchorObject.cs @@ -15,7 +15,6 @@ public class DraftPaymentAnchorObject : BunqModel, IAnchorObjectInterface /// private const string ERROR_NULL_FIELDS = "All fields of an extended model or object are null."; - /// /// [JsonProperty(PropertyName = "Payment")] @@ -26,7 +25,6 @@ public class DraftPaymentAnchorObject : BunqModel, IAnchorObjectInterface [JsonProperty(PropertyName = "PaymentBatch")] public PaymentBatch PaymentBatch { get; set; } - /// /// public BunqModel GetReferencedObject() diff --git a/BunqSdk/Model/Generated/Object/DraftPaymentEntry.cs b/BunqSdk/Model/Generated/Object/DraftPaymentEntry.cs index a6a5d2e..f405f5c 100644 --- a/BunqSdk/Model/Generated/Object/DraftPaymentEntry.cs +++ b/BunqSdk/Model/Generated/Object/DraftPaymentEntry.cs @@ -65,7 +65,6 @@ public DraftPaymentEntry(Amount amount, MonetaryAccountReference counterpartyAli Description = description; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/DraftPaymentResponse.cs b/BunqSdk/Model/Generated/Object/DraftPaymentResponse.cs index ed3219f..1be4dbd 100644 --- a/BunqSdk/Model/Generated/Object/DraftPaymentResponse.cs +++ b/BunqSdk/Model/Generated/Object/DraftPaymentResponse.cs @@ -20,7 +20,6 @@ public class DraftPaymentResponse : BunqModel [JsonProperty(PropertyName = "user_alias_created")] public LabelUser UserAliasCreated { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/DraftShareInviteEntry.cs b/BunqSdk/Model/Generated/Object/DraftShareInviteEntry.cs index 608cb14..b8a9f11 100644 --- a/BunqSdk/Model/Generated/Object/DraftShareInviteEntry.cs +++ b/BunqSdk/Model/Generated/Object/DraftShareInviteEntry.cs @@ -31,7 +31,6 @@ public DraftShareInviteEntry(ShareDetail shareDetail) ShareDetail = shareDetail; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/Error.cs b/BunqSdk/Model/Generated/Object/Error.cs index 50b07ce..e17a49f 100644 --- a/BunqSdk/Model/Generated/Object/Error.cs +++ b/BunqSdk/Model/Generated/Object/Error.cs @@ -20,7 +20,6 @@ public class Error : BunqModel [JsonProperty(PropertyName = "error_description_translated")] public string ErrorDescriptionTranslated { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/Geolocation.cs b/BunqSdk/Model/Generated/Object/Geolocation.cs index 578409f..0723422 100644 --- a/BunqSdk/Model/Generated/Object/Geolocation.cs +++ b/BunqSdk/Model/Generated/Object/Geolocation.cs @@ -32,7 +32,6 @@ public class Geolocation : BunqModel [JsonProperty(PropertyName = "radius")] public double? Radius { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/Image.cs b/BunqSdk/Model/Generated/Object/Image.cs index dc38e36..82b0468 100644 --- a/BunqSdk/Model/Generated/Object/Image.cs +++ b/BunqSdk/Model/Generated/Object/Image.cs @@ -32,7 +32,6 @@ public class Image : BunqModel [JsonProperty(PropertyName = "width")] public int? Width { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/InvoiceItem.cs b/BunqSdk/Model/Generated/Object/InvoiceItem.cs index 4839b7c..31e85d0 100644 --- a/BunqSdk/Model/Generated/Object/InvoiceItem.cs +++ b/BunqSdk/Model/Generated/Object/InvoiceItem.cs @@ -62,7 +62,6 @@ public class InvoiceItem : BunqModel [JsonProperty(PropertyName = "total_vat_inclusive")] public Amount TotalVatInclusive { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/InvoiceItemGroup.cs b/BunqSdk/Model/Generated/Object/InvoiceItemGroup.cs index 37fed9f..87c0237 100644 --- a/BunqSdk/Model/Generated/Object/InvoiceItemGroup.cs +++ b/BunqSdk/Model/Generated/Object/InvoiceItemGroup.cs @@ -50,7 +50,6 @@ public class InvoiceItemGroup : BunqModel [JsonProperty(PropertyName = "item")] public InvoiceItem Item { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/Issuer.cs b/BunqSdk/Model/Generated/Object/Issuer.cs index a56c2c6..2ec0399 100644 --- a/BunqSdk/Model/Generated/Object/Issuer.cs +++ b/BunqSdk/Model/Generated/Object/Issuer.cs @@ -25,7 +25,6 @@ public Issuer(string bic) Bic = bic; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/LabelCard.cs b/BunqSdk/Model/Generated/Object/LabelCard.cs index 3864f92..d6414ae 100644 --- a/BunqSdk/Model/Generated/Object/LabelCard.cs +++ b/BunqSdk/Model/Generated/Object/LabelCard.cs @@ -44,7 +44,6 @@ public class LabelCard : BunqModel [JsonProperty(PropertyName = "label_user")] public LabelUser LabelUser { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/LabelMonetaryAccount.cs b/BunqSdk/Model/Generated/Object/LabelMonetaryAccount.cs index 870050d..0187e5e 100644 --- a/BunqSdk/Model/Generated/Object/LabelMonetaryAccount.cs +++ b/BunqSdk/Model/Generated/Object/LabelMonetaryAccount.cs @@ -62,7 +62,6 @@ public class LabelMonetaryAccount : BunqModel [JsonProperty(PropertyName = "swift_account_number")] public string SwiftAccountNumber { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/LabelUser.cs b/BunqSdk/Model/Generated/Object/LabelUser.cs index bbbcfe6..fb97a74 100644 --- a/BunqSdk/Model/Generated/Object/LabelUser.cs +++ b/BunqSdk/Model/Generated/Object/LabelUser.cs @@ -45,7 +45,6 @@ public LabelUser(string uuid, string displayName, string country) Country = country; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/MonetaryAccountProfileDrain.cs b/BunqSdk/Model/Generated/Object/MonetaryAccountProfileDrain.cs index 9a9fa3d..d453b14 100644 --- a/BunqSdk/Model/Generated/Object/MonetaryAccountProfileDrain.cs +++ b/BunqSdk/Model/Generated/Object/MonetaryAccountProfileDrain.cs @@ -41,7 +41,6 @@ public MonetaryAccountProfileDrain(string status, Amount balancePreferred, Amoun SavingsAccountAlias = savingsAccountAlias; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/MonetaryAccountProfileFill.cs b/BunqSdk/Model/Generated/Object/MonetaryAccountProfileFill.cs index e465388..8a1b103 100644 --- a/BunqSdk/Model/Generated/Object/MonetaryAccountProfileFill.cs +++ b/BunqSdk/Model/Generated/Object/MonetaryAccountProfileFill.cs @@ -47,7 +47,6 @@ public MonetaryAccountProfileFill(string status, Amount balancePreferred, Amount MethodFill = methodFill; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/MonetaryAccountSetting.cs b/BunqSdk/Model/Generated/Object/MonetaryAccountSetting.cs index b928280..82b2a2f 100644 --- a/BunqSdk/Model/Generated/Object/MonetaryAccountSetting.cs +++ b/BunqSdk/Model/Generated/Object/MonetaryAccountSetting.cs @@ -26,7 +26,6 @@ public class MonetaryAccountSetting : BunqModel [JsonProperty(PropertyName = "restriction_chat")] public string RestrictionChat { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/NotificationAnchorObject.cs b/BunqSdk/Model/Generated/Object/NotificationAnchorObject.cs index e124d3b..9ff04c3 100644 --- a/BunqSdk/Model/Generated/Object/NotificationAnchorObject.cs +++ b/BunqSdk/Model/Generated/Object/NotificationAnchorObject.cs @@ -15,7 +15,6 @@ public class NotificationAnchorObject : BunqModel, IAnchorObjectInterface /// private const string ERROR_NULL_FIELDS = "All fields of an extended model or object are null."; - /// /// [JsonProperty(PropertyName = "BunqMeFundraiserResult")] @@ -126,7 +125,6 @@ public class NotificationAnchorObject : BunqModel, IAnchorObjectInterface [JsonProperty(PropertyName = "User")] public User User { get; set; } - /// /// public BunqModel GetReferencedObject() diff --git a/BunqSdk/Model/Generated/Object/NotificationFilter.cs b/BunqSdk/Model/Generated/Object/NotificationFilter.cs index b530d1a..0a15599 100644 --- a/BunqSdk/Model/Generated/Object/NotificationFilter.cs +++ b/BunqSdk/Model/Generated/Object/NotificationFilter.cs @@ -38,7 +38,6 @@ public NotificationFilter(string notificationDeliveryMethod, string notification Category = category; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/NotificationUrl.cs b/BunqSdk/Model/Generated/Object/NotificationUrl.cs index 430bece..09eb4cc 100644 --- a/BunqSdk/Model/Generated/Object/NotificationUrl.cs +++ b/BunqSdk/Model/Generated/Object/NotificationUrl.cs @@ -28,7 +28,6 @@ public class NotificationUrl : BunqModel [JsonProperty(PropertyName = "object")] public NotificationAnchorObject Object { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/PermittedDevice.cs b/BunqSdk/Model/Generated/Object/PermittedDevice.cs index e70915b..f8ecd9c 100644 --- a/BunqSdk/Model/Generated/Object/PermittedDevice.cs +++ b/BunqSdk/Model/Generated/Object/PermittedDevice.cs @@ -20,7 +20,6 @@ public class PermittedDevice : BunqModel [JsonProperty(PropertyName = "ip")] public string Ip { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/Pointer.cs b/BunqSdk/Model/Generated/Object/Pointer.cs index 6060633..238858a 100644 --- a/BunqSdk/Model/Generated/Object/Pointer.cs +++ b/BunqSdk/Model/Generated/Object/Pointer.cs @@ -32,7 +32,6 @@ public Pointer(string type, string value) Value = value; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/RequestInquiryReference.cs b/BunqSdk/Model/Generated/Object/RequestInquiryReference.cs index 5cd2689..07067fd 100644 --- a/BunqSdk/Model/Generated/Object/RequestInquiryReference.cs +++ b/BunqSdk/Model/Generated/Object/RequestInquiryReference.cs @@ -20,7 +20,6 @@ public class RequestInquiryReference : BunqModel [JsonProperty(PropertyName = "id")] public int? Id { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/RequestReferenceSplitTheBillAnchorObject.cs b/BunqSdk/Model/Generated/Object/RequestReferenceSplitTheBillAnchorObject.cs index 78cb664..c502056 100644 --- a/BunqSdk/Model/Generated/Object/RequestReferenceSplitTheBillAnchorObject.cs +++ b/BunqSdk/Model/Generated/Object/RequestReferenceSplitTheBillAnchorObject.cs @@ -15,7 +15,6 @@ public class RequestReferenceSplitTheBillAnchorObject : BunqModel, IAnchorObject /// private const string ERROR_NULL_FIELDS = "All fields of an extended model or object are null."; - /// /// [JsonProperty(PropertyName = "BillingInvoice")] @@ -61,7 +60,6 @@ public class RequestReferenceSplitTheBillAnchorObject : BunqModel, IAnchorObject [JsonProperty(PropertyName = "WhitelistResult")] public WhitelistResult WhitelistResult { get; set; } - /// /// public BunqModel GetReferencedObject() diff --git a/BunqSdk/Model/Generated/Object/ScheduleAnchorObject.cs b/BunqSdk/Model/Generated/Object/ScheduleAnchorObject.cs index 5628776..97de701 100644 --- a/BunqSdk/Model/Generated/Object/ScheduleAnchorObject.cs +++ b/BunqSdk/Model/Generated/Object/ScheduleAnchorObject.cs @@ -15,7 +15,6 @@ public class ScheduleAnchorObject : BunqModel, IAnchorObjectInterface /// private const string ERROR_NULL_FIELDS = "All fields of an extended model or object are null."; - /// /// [JsonProperty(PropertyName = "Payment")] @@ -26,7 +25,6 @@ public class ScheduleAnchorObject : BunqModel, IAnchorObjectInterface [JsonProperty(PropertyName = "PaymentBatch")] public PaymentBatch PaymentBatch { get; set; } - /// /// public BunqModel GetReferencedObject() diff --git a/BunqSdk/Model/Generated/Object/ScheduleInstanceAnchorObject.cs b/BunqSdk/Model/Generated/Object/ScheduleInstanceAnchorObject.cs index f1534e0..0010671 100644 --- a/BunqSdk/Model/Generated/Object/ScheduleInstanceAnchorObject.cs +++ b/BunqSdk/Model/Generated/Object/ScheduleInstanceAnchorObject.cs @@ -15,7 +15,6 @@ public class ScheduleInstanceAnchorObject : BunqModel, IAnchorObjectInterface /// private const string ERROR_NULL_FIELDS = "All fields of an extended model or object are null."; - /// /// [JsonProperty(PropertyName = "Payment")] @@ -26,7 +25,6 @@ public class ScheduleInstanceAnchorObject : BunqModel, IAnchorObjectInterface [JsonProperty(PropertyName = "PaymentBatch")] public PaymentBatch PaymentBatch { get; set; } - /// /// public BunqModel GetReferencedObject() diff --git a/BunqSdk/Model/Generated/Object/SchedulePaymentEntry.cs b/BunqSdk/Model/Generated/Object/SchedulePaymentEntry.cs index 4ce8a8f..fc40ba3 100644 --- a/BunqSdk/Model/Generated/Object/SchedulePaymentEntry.cs +++ b/BunqSdk/Model/Generated/Object/SchedulePaymentEntry.cs @@ -59,7 +59,6 @@ public SchedulePaymentEntry(Amount amount, MonetaryAccountReference counterparty Description = description; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/ShareDetail.cs b/BunqSdk/Model/Generated/Object/ShareDetail.cs index ebd6fa3..f53fa4f 100644 --- a/BunqSdk/Model/Generated/Object/ShareDetail.cs +++ b/BunqSdk/Model/Generated/Object/ShareDetail.cs @@ -27,7 +27,6 @@ public class ShareDetail : BunqModel [JsonProperty(PropertyName = "ShareDetailDraftPayment")] public ShareDetailDraftPayment DraftPayment { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/ShareDetailDraftPayment.cs b/BunqSdk/Model/Generated/Object/ShareDetailDraftPayment.cs index 49883ff..36f4b75 100644 --- a/BunqSdk/Model/Generated/Object/ShareDetailDraftPayment.cs +++ b/BunqSdk/Model/Generated/Object/ShareDetailDraftPayment.cs @@ -41,7 +41,6 @@ public ShareDetailDraftPayment(bool? makeDraftPayments, bool? viewBalance, bool? ViewNewEvents = viewNewEvents; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/ShareDetailPayment.cs b/BunqSdk/Model/Generated/Object/ShareDetailPayment.cs index f0cbd44..21bbdbb 100644 --- a/BunqSdk/Model/Generated/Object/ShareDetailPayment.cs +++ b/BunqSdk/Model/Generated/Object/ShareDetailPayment.cs @@ -52,7 +52,6 @@ public ShareDetailPayment(bool? makePayments, bool? viewBalance, bool? viewOldEv ViewNewEvents = viewNewEvents; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/ShareDetailReadOnly.cs b/BunqSdk/Model/Generated/Object/ShareDetailReadOnly.cs index 721d0e1..757e99d 100644 --- a/BunqSdk/Model/Generated/Object/ShareDetailReadOnly.cs +++ b/BunqSdk/Model/Generated/Object/ShareDetailReadOnly.cs @@ -33,7 +33,6 @@ public ShareDetailReadOnly(bool? viewBalance, bool? viewOldEvents, bool? viewNew ViewNewEvents = viewNewEvents; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/TabTextWaitingScreen.cs b/BunqSdk/Model/Generated/Object/TabTextWaitingScreen.cs index 5a653d0..74fb6a1 100644 --- a/BunqSdk/Model/Generated/Object/TabTextWaitingScreen.cs +++ b/BunqSdk/Model/Generated/Object/TabTextWaitingScreen.cs @@ -26,7 +26,6 @@ public TabTextWaitingScreen(string language, string description) Description = description; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/TabVisibility.cs b/BunqSdk/Model/Generated/Object/TabVisibility.cs index febae7a..f3ee6d1 100644 --- a/BunqSdk/Model/Generated/Object/TabVisibility.cs +++ b/BunqSdk/Model/Generated/Object/TabVisibility.cs @@ -33,7 +33,6 @@ public TabVisibility(bool? cashRegisterQrCode, bool? tabQrCode) TabQrCode = tabQrCode; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/TaxResident.cs b/BunqSdk/Model/Generated/Object/TaxResident.cs index 64ecb4d..b7942a8 100644 --- a/BunqSdk/Model/Generated/Object/TaxResident.cs +++ b/BunqSdk/Model/Generated/Object/TaxResident.cs @@ -20,13 +20,18 @@ public class TaxResident : BunqModel [JsonProperty(PropertyName = "tax_number")] public string TaxNumber { get; set; } + /// + /// The status of the tax number. Either CONFIRMED or UNCONFIRMED. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + public TaxResident(string country, string taxNumber) { Country = country; TaxNumber = taxNumber; } - /// /// public override bool IsAllFieldNull() @@ -41,6 +46,11 @@ public override bool IsAllFieldNull() return false; } + if (this.Status != null) + { + return false; + } + return true; } diff --git a/BunqSdk/Model/Generated/Object/Ubo.cs b/BunqSdk/Model/Generated/Object/Ubo.cs index 5e846f8..9217d3b 100644 --- a/BunqSdk/Model/Generated/Object/Ubo.cs +++ b/BunqSdk/Model/Generated/Object/Ubo.cs @@ -26,7 +26,6 @@ public class Ubo : BunqModel [JsonProperty(PropertyName = "nationality")] public string Nationality { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Model/Generated/Object/UserApiKeyAnchoredUser.cs b/BunqSdk/Model/Generated/Object/UserApiKeyAnchoredUser.cs index e38308a..50713fa 100644 --- a/BunqSdk/Model/Generated/Object/UserApiKeyAnchoredUser.cs +++ b/BunqSdk/Model/Generated/Object/UserApiKeyAnchoredUser.cs @@ -15,7 +15,6 @@ public class UserApiKeyAnchoredUser : BunqModel, IAnchorObjectInterface /// private const string ERROR_NULL_FIELDS = "All fields of an extended model or object are null."; - /// /// [JsonProperty(PropertyName = "UserPerson")] @@ -26,7 +25,6 @@ public class UserApiKeyAnchoredUser : BunqModel, IAnchorObjectInterface [JsonProperty(PropertyName = "UserCompany")] public UserCompany UserCompany { get; set; } - /// /// public BunqModel GetReferencedObject() diff --git a/BunqSdk/Model/Generated/Object/WhitelistResultViewAnchoredObject.cs b/BunqSdk/Model/Generated/Object/WhitelistResultViewAnchoredObject.cs index 9b1ef92..8cca6a4 100644 --- a/BunqSdk/Model/Generated/Object/WhitelistResultViewAnchoredObject.cs +++ b/BunqSdk/Model/Generated/Object/WhitelistResultViewAnchoredObject.cs @@ -27,7 +27,6 @@ public class WhitelistResultViewAnchoredObject : BunqModel [JsonProperty(PropertyName = "draftPayment")] public DraftPayment DraftPayment { get; set; } - /// /// public override bool IsAllFieldNull() diff --git a/BunqSdk/Security/SecurityUtils.cs b/BunqSdk/Security/SecurityUtils.cs index c08004e..d8a9b60 100644 --- a/BunqSdk/Security/SecurityUtils.cs +++ b/BunqSdk/Security/SecurityUtils.cs @@ -230,9 +230,12 @@ public static RSA CreatePublicKeyFromPublicKeyFormattedString(string publicKeySt /// public static RSA GenerateKeyPair() { +#if NETSTANDARD2_0 || NET46 || NET45 || NET451 || NET452 || NET40 || NET35 + var rsa = (RSA)new RSACryptoServiceProvider(RSA_KEY_SIZE); +#else var rsa = RSA.Create(); rsa.KeySize = RSA_KEY_SIZE; - +#endif return rsa; } diff --git a/CHANGELOG.md b/CHANGELOG.md index f4f7a5b..468a20f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,51 +1,65 @@ # Change Log -## [Unreleased](https://github.com/bunq/sdk_csharp/tree/1.0.0) +## [Unreleased](https://github.com/bunq/sdk_csharp/tree/1.1.0) +[Full Changelog](https://github.com/bunq/sdk_csharp/compare/1.0.0...1.1.0) + +**Fixed bugs:** + +- Provided client public key has an incorrect modulus length. Modulus length must be "2048", got "1024" [\#92](https://github.com/bunq/sdk_csharp/issues/92) + +**Closed issues:** + +- Unable to Authenticate with Bunq [\#114](https://github.com/bunq/sdk_csharp/issues/114) + +**Merged pull requests:** + +- Fix key generation on .NET Framework. \(bunq/sdk\_csharp\#92\) [\#116](https://github.com/bunq/sdk_csharp/pull/116) ([kojoru](https://github.com/kojoru)) + +## [1.0.0](https://github.com/bunq/sdk_csharp/tree/1.0.0) (2018-07-24) [Full Changelog](https://github.com/bunq/sdk_csharp/compare/0.13.1...1.0.0) **Implemented enhancements:** +- Monetary account joint cannot be retrieved. [\#50](https://github.com/bunq/sdk_csharp/issues/50) - \[csharp\] Update examples in readme [\#91](https://github.com/bunq/sdk_csharp/issues/91) - Add test CI [\#90](https://github.com/bunq/sdk_csharp/issues/90) - It is not possible to refresh userContext data [\#89](https://github.com/bunq/sdk_csharp/issues/89) - Optimise test framework. [\#87](https://github.com/bunq/sdk_csharp/issues/87) - Add more example scripts [\#77](https://github.com/bunq/sdk_csharp/issues/77) - Auto save the session after automatic session reset has been executed  [\#72](https://github.com/bunq/sdk_csharp/issues/72) +- Added support for netstandard15. \(bunq/sdk\_csharp\#26\) [\#88](https://github.com/bunq/sdk_csharp/pull/88) ([OGKevin](https://github.com/OGKevin)) + +**Fixed bugs:** + +- NullReferenceException when calling CustomerStatementExport.List [\#96](https://github.com/bunq/sdk_csharp/issues/96) **Closed issues:** -- Add oauth support. [\#112](https://github.com/bunq/sdk_csharp/issues/112) - Singleton ApiContext with multi-thread code [\#103](https://github.com/bunq/sdk_csharp/issues/103) +- Add oauth support. [\#112](https://github.com/bunq/sdk_csharp/issues/112) - Update Sandbox API key procedure [\#101](https://github.com/bunq/sdk_csharp/issues/101) +- Move to new sandbox. [\#99](https://github.com/bunq/sdk_csharp/issues/99) +- BunqSdk.Tests mention Java instead of C\# [\#97](https://github.com/bunq/sdk_csharp/issues/97) - .net standard 2.0 support [\#93](https://github.com/bunq/sdk_csharp/issues/93) **Merged pull requests:** +- Added travis config. \(bunq/sdk\_csharp\#90\) [\#110](https://github.com/bunq/sdk_csharp/pull/110) ([OGKevin](https://github.com/OGKevin)) - Oauth bunq/sdk\_csharp\#112 [\#113](https://github.com/bunq/sdk_csharp/pull/113) ([OGKevin](https://github.com/OGKevin)) - Auto reload context bunq/sdk\_csharp\#72 [\#111](https://github.com/bunq/sdk_csharp/pull/111) ([OGKevin](https://github.com/OGKevin)) -- Added travis config. \(bunq/sdk\_csharp\#90\) [\#110](https://github.com/bunq/sdk_csharp/pull/110) ([OGKevin](https://github.com/OGKevin)) - Updated the examples on readme. \(bunq/sdk\_csharp\#91\) [\#109](https://github.com/bunq/sdk_csharp/pull/109) ([OGKevin](https://github.com/OGKevin)) - Use tinker as examples bunq/sdk\_csharp\#77 [\#108](https://github.com/bunq/sdk_csharp/pull/108) ([OGKevin](https://github.com/OGKevin)) - Optimise test framework bunq/sdk\_csharp\#87 [\#107](https://github.com/bunq/sdk_csharp/pull/107) ([OGKevin](https://github.com/OGKevin)) - Added net standard 2 support. \(bunq/sdk\_csharp\#93\) [\#105](https://github.com/bunq/sdk_csharp/pull/105) ([nduijvelshoff](https://github.com/nduijvelshoff)) - Update Sandbox API key procedure \(bunq/sdk\_csharp\#101\) [\#102](https://github.com/bunq/sdk_csharp/pull/102) ([sandervdo](https://github.com/sandervdo)) +- Changed sandbox url to the new one. \(bunq/sdk\_csharp\#99\) [\#100](https://github.com/bunq/sdk_csharp/pull/100) ([OGKevin](https://github.com/OGKevin)) ## [0.13.1](https://github.com/bunq/sdk_csharp/tree/0.13.1) (2018-05-30) [Full Changelog](https://github.com/bunq/sdk_csharp/compare/0.13.0...0.13.1) -**Implemented enhancements:** - -- Added support for netstandard15. \(bunq/sdk\_csharp\#26\) [\#88](https://github.com/bunq/sdk_csharp/pull/88) ([OGKevin](https://github.com/OGKevin)) - -**Closed issues:** - -- Move to new sandbox. [\#99](https://github.com/bunq/sdk_csharp/issues/99) -- BunqSdk.Tests mention Java instead of C\# [\#97](https://github.com/bunq/sdk_csharp/issues/97) - **Merged pull requests:** -- Changed sandbox url to the new one. \(bunq/sdk\_csharp\#99\) [\#100](https://github.com/bunq/sdk_csharp/pull/100) ([OGKevin](https://github.com/OGKevin)) - Change Java to Csharp in readme. \(bunq/sdk\_csharp\#97\) [\#98](https://github.com/bunq/sdk_csharp/pull/98) ([robinvanpoppel](https://github.com/robinvanpoppel)) ## [0.13.0](https://github.com/bunq/sdk_csharp/tree/0.13.0) (2018-03-20) diff --git a/README.md b/README.md index 2359315..df9020d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # bunq C# SDK -Version 0.9.0 **BETA** +Version 1.1.0 ## Introduction Hi developers!