From 73d2985769912ce447be60f6594f6c1f81375ef0 Mon Sep 17 00:00:00 2001 From: Daniil Belyakov Date: Sun, 3 Sep 2017 11:43:07 +0200 Subject: [PATCH] Add pagination; cleanup; add missing endpoitns and fields [#4] --- .../bunq/sdk/examples/PaymentListExample.java | 12 +- .../java/com/bunq/sdk/http/ApiClient.java | 32 ++- .../java/com/bunq/sdk/http/BunqResponse.java | 10 + .../java/com/bunq/sdk/http/Pagination.java | 119 ++++++++ .../com/bunq/sdk/json/PaginationAdapter.java | 99 +++++++ .../bunq/sdk/json/SessionServerAdapter.java | 9 +- .../AttachmentConversationContent.java | 17 +- .../generated/AttachmentMonetaryAccount.java | 14 +- .../sdk/model/generated/AttachmentPublic.java | 17 +- .../generated/AttachmentPublicContent.java | 13 +- .../sdk/model/generated/AttachmentTab.java | 24 +- .../model/generated/AttachmentTabContent.java | 17 +- .../com/bunq/sdk/model/generated/Avatar.java | 13 +- .../BillingContractSubscription.java | 199 ++++++++++++++ .../com/bunq/sdk/model/generated/Card.java | 51 +++- .../bunq/sdk/model/generated/CardDebit.java | 127 ++++++++- .../bunq/sdk/model/generated/CardName.java | 14 +- .../sdk/model/generated/CashRegister.java | 51 ++-- .../model/generated/CashRegisterQrCode.java | 61 ++--- .../generated/CashRegisterQrCodeContent.java | 18 +- .../model/generated/CertificatePinned.java | 51 ++-- .../sdk/model/generated/ChatConversation.java | 25 +- .../bunq/sdk/model/generated/ChatMessage.java | 17 +- .../generated/ChatMessageAttachment.java | 15 +- .../sdk/model/generated/ChatMessageText.java | 15 +- .../bunq/sdk/model/generated/Customer.java | 156 +++++++++++ .../sdk/model/generated/CustomerLimit.java | 105 +++++++ .../generated/CustomerStatementExport.java | 51 ++-- .../CustomerStatementExportContent.java | 17 +- .../com/bunq/sdk/model/generated/Device.java | 19 +- .../bunq/sdk/model/generated/DevicePhone.java | 6 + .../sdk/model/generated/DeviceServer.java | 25 +- .../sdk/model/generated/DraftPayment.java | 256 ++++++++++++++++++ .../model/generated/DraftShareInviteBank.java | 46 ++-- .../DraftShareInviteBankQrCodeContent.java | 16 +- .../model/generated/ExportAnnualOverview.java | 35 ++- .../ExportAnnualOverviewContent.java | 16 +- .../InstallationServerPublicKey.java | 17 +- .../com/bunq/sdk/model/generated/Invoice.java | 28 +- .../sdk/model/generated/InvoiceByUser.java | 25 +- .../sdk/model/generated/MonetaryAccount.java | 23 +- .../model/generated/MonetaryAccountBank.java | 45 ++- .../generated/MonetaryAccountProfile.java | 6 + .../com/bunq/sdk/model/generated/Payment.java | 38 ++- .../sdk/model/generated/PaymentBatch.java | 51 ++-- .../bunq/sdk/model/generated/PaymentChat.java | 44 ++- .../bunq/sdk/model/generated/PermittedIp.java | 51 ++-- .../sdk/model/generated/RequestInquiry.java | 54 ++-- .../model/generated/RequestInquiryBatch.java | 51 ++-- .../model/generated/RequestInquiryChat.java | 47 ++-- .../sdk/model/generated/RequestResponse.java | 84 ++++-- .../model/generated/RequestResponseChat.java | 47 ++-- .../bunq/sdk/model/generated/Schedule.java | 29 +- .../sdk/model/generated/ScheduleInstance.java | 46 ++-- .../sdk/model/generated/SchedulePayment.java | 60 ++-- .../model/generated/SchedulePaymentBatch.java | 38 +-- .../sdk/model/generated/ScheduleUser.java | 16 +- .../com/bunq/sdk/model/generated/Session.java | 12 +- .../generated/ShareInviteBankAmountUsed.java | 21 +- .../generated/ShareInviteBankInquiry.java | 55 ++-- .../generated/ShareInviteBankResponse.java | 39 ++- .../com/bunq/sdk/model/generated/Tab.java | 29 +- .../sdk/model/generated/TabAttachmentTab.java | 14 +- .../generated/TabAttachmentTabContent.java | 16 +- .../com/bunq/sdk/model/generated/TabItem.java | 5 + .../bunq/sdk/model/generated/TabItemShop.java | 74 ++--- .../sdk/model/generated/TabItemShopBatch.java | 18 +- .../sdk/model/generated/TabQrCodeContent.java | 18 +- .../sdk/model/generated/TabResultInquiry.java | 34 +-- .../model/generated/TabResultResponse.java | 27 +- .../sdk/model/generated/TabUsageMultiple.java | 76 ++---- .../sdk/model/generated/TabUsageSingle.java | 76 ++---- .../model/generated/TokenQrRequestIdeal.java | 26 +- .../com/bunq/sdk/model/generated/User.java | 19 +- .../bunq/sdk/model/generated/UserCompany.java | 92 ++++++- .../generated/UserCredentialPasswordIp.java | 27 +- .../bunq/sdk/model/generated/UserLight.java | 11 +- .../bunq/sdk/model/generated/UserPerson.java | 20 +- .../sdk/model/generated/object/Address.java | 27 +- .../sdk/model/generated/object/Amount.java | 6 + .../model/generated/object/Attachment.java | 6 + .../AttachmentMonetaryAccountPayment.java | 6 + .../generated/object/AttachmentPublic.java | 6 + .../model/generated/object/AttachmentTab.java | 6 + .../sdk/model/generated/object/Avatar.java | 5 + .../generated/object/BudgetRestriction.java | 6 + .../sdk/model/generated/object/BunqId.java | 6 + .../object/CardCountryPermission.java | 24 ++ .../sdk/model/generated/object/CardLimit.java | 24 ++ .../object/CardMagStripePermission.java | 6 + .../generated/object/CardPinAssignment.java | 6 + .../model/generated/object/Certificate.java | 6 + .../generated/object/DraftPaymentEntry.java | 180 ++++++++++++ .../object/DraftPaymentResponse.java | 53 ++++ .../object/DraftShareInviteBankEntry.java | 6 + .../sdk/model/generated/object/Error.java | 6 + .../model/generated/object/Geolocation.java | 5 + .../sdk/model/generated/object/Image.java | 6 + .../model/generated/object/InvoiceItem.java | 5 + .../generated/object/InvoiceItemGroup.java | 6 + .../sdk/model/generated/object/Issuer.java | 6 + .../object/LabelMonetaryAccount.java | 23 ++ .../sdk/model/generated/object/LabelUser.java | 6 + .../object/MonetaryAccountProfileDrain.java | 8 +- .../object/MonetaryAccountProfileFill.java | 9 +- .../object/MonetaryAccountSetting.java | 6 + .../generated/object/NotificationFilter.java | 9 +- .../generated/object/PermittedDevice.java | 6 + .../sdk/model/generated/object/Pointer.java | 6 + .../sdk/model/generated/object/Schedule.java | 6 + .../object/SchedulePaymentEntry.java | 7 +- .../model/generated/object/ShareDetail.java | 6 + .../object/ShareDetailDraftPayment.java | 9 +- .../generated/object/ShareDetailPayment.java | 9 +- .../generated/object/ShareDetailReadOnly.java | 6 + .../object/TabTextWaitingScreen.java | 6 + .../model/generated/object/TabVisibility.java | 6 + .../model/generated/object/TaxResident.java | 6 + .../bunq/sdk/model/generated/object/Ubo.java | 6 + 119 files changed, 2727 insertions(+), 1123 deletions(-) create mode 100644 src/main/java/com/bunq/sdk/http/Pagination.java create mode 100644 src/main/java/com/bunq/sdk/json/PaginationAdapter.java create mode 100644 src/main/java/com/bunq/sdk/model/generated/BillingContractSubscription.java create mode 100644 src/main/java/com/bunq/sdk/model/generated/Customer.java create mode 100644 src/main/java/com/bunq/sdk/model/generated/CustomerLimit.java create mode 100644 src/main/java/com/bunq/sdk/model/generated/DraftPayment.java create mode 100644 src/main/java/com/bunq/sdk/model/generated/object/DraftPaymentEntry.java create mode 100644 src/main/java/com/bunq/sdk/model/generated/object/DraftPaymentResponse.java diff --git a/src/main/java/com/bunq/sdk/examples/PaymentListExample.java b/src/main/java/com/bunq/sdk/examples/PaymentListExample.java index f4de28e0..967e0567 100644 --- a/src/main/java/com/bunq/sdk/examples/PaymentListExample.java +++ b/src/main/java/com/bunq/sdk/examples/PaymentListExample.java @@ -1,7 +1,9 @@ package com.bunq.sdk.examples; import com.bunq.sdk.context.ApiContext; +import com.bunq.sdk.http.Pagination; import com.bunq.sdk.model.generated.Payment; +import java.util.HashMap; import java.util.List; /** @@ -18,8 +20,14 @@ public class PaymentListExample { */ public static void main(String[] args) { ApiContext apiContext = ApiContext.restore(API_CONTEXT_FILE_PATH); - List payments = Payment.list(apiContext, USER_ITEM_ID, MONETARY_ACCOUNT_ITEM_ID) - .getValue(); + HashMap params = new HashMap<>(); + params.put(Pagination.PARAM_COUNT, "3"); + List payments = Payment.list( + apiContext, + USER_ITEM_ID, + MONETARY_ACCOUNT_ITEM_ID, + params + ).getValue(); printPayments(payments); } diff --git a/src/main/java/com/bunq/sdk/http/ApiClient.java b/src/main/java/com/bunq/sdk/http/ApiClient.java index d9bc6eaa..8afbad5a 100644 --- a/src/main/java/com/bunq/sdk/http/ApiClient.java +++ b/src/main/java/com/bunq/sdk/http/ApiClient.java @@ -15,12 +15,15 @@ import java.io.IOException; import java.net.MalformedURLException; import java.net.URI; +import java.net.URISyntaxException; import java.security.KeyManagementException; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.SortedMap; +import java.util.TreeMap; import java.util.UUID; import org.apache.http.Header; import org.apache.http.HttpHost; @@ -32,6 +35,7 @@ import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPut; import org.apache.http.client.methods.HttpUriRequest; +import org.apache.http.client.utils.URIBuilder; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.entity.ByteArrayEntity; import org.apache.http.entity.ContentType; @@ -135,13 +139,24 @@ public BunqResponseRaw post(String uri, byte[] requestBodyBytes, CloseableHttpResponse response = executeRequest(httpPost, customHeaders); return createBunqResponseRaw(response); - } catch (IOException exception) { + } catch (IOException | URISyntaxException exception) { throw new UncaughtExceptionError(exception); } } - private URI determineFullUri(String uri) { - return URI.create(apiContext.getBaseUri().toString() + uri); + private URI determineFullUri(String uri) throws URISyntaxException { + return determineFullUri(uri, new HashMap<>()); + } + + private URI determineFullUri(String uri, Map params) throws URISyntaxException { + URIBuilder builder = new URIBuilder(apiContext.getBaseUri().toString() + uri); + SortedMap paramsSorted = new TreeMap<>(params); + + for (Map.Entry param : paramsSorted.entrySet()) { + builder.addParameter(param.getKey(), param.getValue()); + } + + return builder.build(); } private CloseableHttpResponse executeRequest(HttpUriRequest request, @@ -279,13 +294,14 @@ private static Map getHeadersMap(CloseableHttpResponse response) * * @return The raw response of the GET request. */ - public BunqResponseRaw get(String uri, Map customHeaders) { + public BunqResponseRaw get(String uri, Map params, + Map customHeaders) { try { - HttpGet httpGet = new HttpGet(determineFullUri(uri)); + HttpGet httpGet = new HttpGet(determineFullUri(uri, params)); CloseableHttpResponse response = executeRequest(httpGet, customHeaders); return createBunqResponseRaw(response); - } catch (IOException exception) { + } catch (IOException | URISyntaxException exception) { throw new UncaughtExceptionError(exception); } } @@ -303,7 +319,7 @@ public BunqResponseRaw put(String uri, byte[] requestBodyBytes, CloseableHttpResponse response = executeRequest(httpPut, customHeaders); return createBunqResponseRaw(response); - } catch (IOException exception) { + } catch (IOException | URISyntaxException exception) { throw new UncaughtExceptionError(exception); } } @@ -319,7 +335,7 @@ public BunqResponseRaw delete(String uri, Map customHeaders) { CloseableHttpResponse response = executeRequest(httpDelete, customHeaders); return createBunqResponseRaw(response); - } catch (IOException exception) { + } catch (IOException | URISyntaxException exception) { throw new UncaughtExceptionError(exception); } } diff --git a/src/main/java/com/bunq/sdk/http/BunqResponse.java b/src/main/java/com/bunq/sdk/http/BunqResponse.java index 3253d3c9..688b6004 100644 --- a/src/main/java/com/bunq/sdk/http/BunqResponse.java +++ b/src/main/java/com/bunq/sdk/http/BunqResponse.java @@ -6,10 +6,16 @@ public class BunqResponse { private T value; private Map headers; + private Pagination pagination; public BunqResponse(T value, Map headers) { + this(value, headers, null); + } + + public BunqResponse(T value, Map headers, Pagination pagination) { this.value = value; this.headers = headers; + this.pagination = pagination; } public T getValue() { @@ -20,4 +26,8 @@ public Map getHeaders() { return headers; } + public Pagination getPagination() { + return pagination; + } + } diff --git a/src/main/java/com/bunq/sdk/http/Pagination.java b/src/main/java/com/bunq/sdk/http/Pagination.java new file mode 100644 index 00000000..b87869a9 --- /dev/null +++ b/src/main/java/com/bunq/sdk/http/Pagination.java @@ -0,0 +1,119 @@ +package com.bunq.sdk.http; + +import com.bunq.sdk.exception.BunqException; +import java.util.HashMap; +import java.util.Map; + +public class Pagination { + + /** + * Error constants. + */ + private static final String ERROR_NO_PREVIOUS_PAGE = + "Could not generate previous page URL params: there is no previous page."; + + /** + * URL Param constants. + */ + public static final String PARAM_OLDER_ID = "older_id"; + public static final String PARAM_NEWER_ID = "newer_id"; + public static final String PARAM_FUTURE_ID = "future_id"; + public static final String PARAM_COUNT = "count"; + + /** + * Field constants. + */ + private static final String FIELD_OLDER_URL = "older_url"; + private static final String FIELD_NEWER_URL = "newer_url"; + private static final String FIELD_FUTURE_URL = "future_url"; + + private Integer olderId; + private Integer newerId; + private Integer futureId; + private Integer count; + + /** + * Get the URL params required to request the next page of the listing. + */ + public Map getUrlParamsNextPage() { + Map params = new HashMap<>(); + params.put(PARAM_NEWER_ID, Integer.toString(getNextId())); + addCountToParamsIfNeeded(params); + + return params; + } + + private Integer getNextId() { + if (hasNextItemAssured()) { + return newerId; + } else { + return futureId; + } + } + + public boolean hasNextItemAssured() { + return newerId != null; + } + + private void addCountToParamsIfNeeded(Map params) { + if (count != null) { + params.put(PARAM_COUNT, Integer.toString(count)); + } + } + + public Map getUrlParamsPreviousPage() { + if (!hasPreviousItem()) { + throw new BunqException(ERROR_NO_PREVIOUS_PAGE); + } + + Map params = new HashMap<>(); + params.put(PARAM_OLDER_ID, Integer.toString(olderId)); + addCountToParamsIfNeeded(params); + + return params; + } + + public boolean hasPreviousItem() { + return this.olderId != null; + } + + public Map getUrlParamsCountOnly() { + Map params = new HashMap<>(); + addCountToParamsIfNeeded(params); + + return params; + } + + public Integer getOlderId() { + return olderId; + } + + public void setOlderId(Integer olderId) { + this.olderId = olderId; + } + + public Integer getNewerId() { + return newerId; + } + + public void setNewerId(Integer newerId) { + this.newerId = newerId; + } + + public Integer getFutureId() { + return futureId; + } + + public void setFutureId(Integer futureId) { + this.futureId = futureId; + } + + public Integer getCount() { + return count; + } + + public void setCount(Integer count) { + this.count = count; + } + +} diff --git a/src/main/java/com/bunq/sdk/json/PaginationAdapter.java b/src/main/java/com/bunq/sdk/json/PaginationAdapter.java new file mode 100644 index 00000000..0d5d08cf --- /dev/null +++ b/src/main/java/com/bunq/sdk/json/PaginationAdapter.java @@ -0,0 +1,99 @@ +package com.bunq.sdk.json; + +import com.bunq.sdk.http.Pagination; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import java.lang.reflect.Type; +import java.net.URI; +import java.net.URISyntaxException; +import java.nio.charset.Charset; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.apache.http.NameValuePair; +import org.apache.http.client.utils.URLEncodedUtils; + +/** + * Custom (de)serialization of SessionServer required due to the specific way we handle pagination. + */ +public class PaginationAdapter implements JsonDeserializer { + + /** + * Field constants. + */ + private static final String FIELD_OLDER_URL = "older_url"; + private static final String FIELD_NEWER_URL = "newer_url"; + private static final String FIELD_FUTURE_URL = "future_url"; + + @Override + public Pagination deserialize(JsonElement json, Type typeOfT, + JsonDeserializationContext context) throws JsonParseException { + try { + JsonObject responseJson = json.getAsJsonObject(); + Map paginationBody = parsePaginationBody(responseJson); + Pagination pagination = new Pagination(); + pagination.setOlderId(paginationBody.get(Pagination.PARAM_OLDER_ID)); + pagination.setNewerId(paginationBody.get(Pagination.PARAM_NEWER_ID)); + pagination.setFutureId(paginationBody.get(Pagination.PARAM_FUTURE_ID)); + pagination.setCount(paginationBody.get(Pagination.PARAM_COUNT)); + + return pagination; + } catch (URISyntaxException exception) { + throw new JsonParseException(exception); + } + } + + private Map parsePaginationBody(JsonObject responseJson) + throws URISyntaxException { + Map paginationBody = new HashMap<>(); + updatePaginationBodyFromResponseField( + paginationBody, + Pagination.PARAM_OLDER_ID, + responseJson, + FIELD_OLDER_URL, + Pagination.PARAM_OLDER_ID + ); + updatePaginationBodyFromResponseField( + paginationBody, + Pagination.PARAM_NEWER_ID, + responseJson, + FIELD_NEWER_URL, + Pagination.PARAM_NEWER_ID + ); + updatePaginationBodyFromResponseField( + paginationBody, + Pagination.PARAM_FUTURE_ID, + responseJson, + FIELD_FUTURE_URL, + Pagination.PARAM_NEWER_ID + ); + + return paginationBody; + } + + private void updatePaginationBodyFromResponseField( + Map paginationBody, + String idField, + JsonObject responseJson, + String responseField, + String responseParam + ) throws URISyntaxException { + if (responseJson.has(responseField)) { + URI uri = new URI(responseJson.get(responseField).getAsString()); + List params = URLEncodedUtils.parse(uri, Charset.defaultCharset()); + + for (NameValuePair param : params) { + if (responseParam.equals(param.getName())) { + paginationBody.put(idField, Integer.parseInt(param.getValue())); + } else if (Pagination.PARAM_COUNT.equals(param.getName()) && + paginationBody.get(Pagination.PARAM_COUNT) != null) { + paginationBody.put(Pagination.PARAM_COUNT, Integer.parseInt(param.getValue())); + } + } + } + } + +} diff --git a/src/main/java/com/bunq/sdk/json/SessionServerAdapter.java b/src/main/java/com/bunq/sdk/json/SessionServerAdapter.java index 52c336e9..3357aad3 100644 --- a/src/main/java/com/bunq/sdk/json/SessionServerAdapter.java +++ b/src/main/java/com/bunq/sdk/json/SessionServerAdapter.java @@ -29,13 +29,10 @@ public class SessionServerAdapter implements JsonDeserializer { private static final String FIELD_USER_COMPANY = "UserCompany"; private static final String FIELD_USER_PERSON = "UserPerson"; - private static JsonElement getByIndexAndFieldName(JsonArray values, int index, String fieldName) { - return values.get(index).getAsJsonObject().get(fieldName); - } - @Override public SessionServer deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { + System.out.println(json); JsonArray values = json.getAsJsonArray(); Id id = context.deserialize( @@ -65,4 +62,8 @@ public SessionServer deserialize(JsonElement json, Type typeOfT, } } + private static JsonElement getByIndexAndFieldName(JsonArray values, int index, String fieldName) { + return values.get(index).getAsJsonObject().get(fieldName); + } + } diff --git a/src/main/java/com/bunq/sdk/model/generated/AttachmentConversationContent.java b/src/main/java/com/bunq/sdk/model/generated/AttachmentConversationContent.java index 31b103cf..4f20e54e 100644 --- a/src/main/java/com/bunq/sdk/model/generated/AttachmentConversationContent.java +++ b/src/main/java/com/bunq/sdk/model/generated/AttachmentConversationContent.java @@ -5,8 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Fetch the raw content of an attachment with given ID. The raw content is the base64 of a @@ -24,20 +31,16 @@ public class AttachmentConversationContent extends BunqModel { */ private static final String OBJECT_TYPE = "AttachmentConversationContent"; - public static BunqResponse list(ApiContext apiContext, Integer userId, - Integer chatConversationId, Integer attachmentId) { + public static BunqResponse list(ApiContext apiContext, Integer userId, Integer chatConversationId, Integer attachmentId) { return list(apiContext, userId, chatConversationId, attachmentId, new HashMap<>()); } /** * Get the raw content of a specific attachment. */ - public static BunqResponse list(ApiContext apiContext, Integer userId, - Integer chatConversationId, Integer attachmentId, Map customHeaders) { + public static BunqResponse list(ApiContext apiContext, Integer userId, Integer chatConversationId, Integer attachmentId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, chatConversationId, attachmentId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, chatConversationId, attachmentId), new HashMap<>(), customHeaders); return new BunqResponse<>(responseRaw.getBodyBytes(), responseRaw.getHeaders()); } diff --git a/src/main/java/com/bunq/sdk/model/generated/AttachmentMonetaryAccount.java b/src/main/java/com/bunq/sdk/model/generated/AttachmentMonetaryAccount.java index c434b82a..c829d85a 100644 --- a/src/main/java/com/bunq/sdk/model/generated/AttachmentMonetaryAccount.java +++ b/src/main/java/com/bunq/sdk/model/generated/AttachmentMonetaryAccount.java @@ -6,10 +6,15 @@ import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; import com.bunq.sdk.model.generated.object.Attachment; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * This call is used to upload an attachment that can be referenced to in payment requests and @@ -41,8 +46,7 @@ public class AttachmentMonetaryAccount extends BunqModel { @SerializedName("id") private Integer id; - public static BunqResponse create(ApiContext apiContext, byte[] bytes, Integer userId, - Integer monetaryAccountId) { + public static BunqResponse create(ApiContext apiContext, byte[] bytes, Integer userId, Integer monetaryAccountId) { return create(apiContext, bytes, userId, monetaryAccountId, new HashMap<>()); } @@ -52,11 +56,9 @@ public static BunqResponse create(ApiContext apiContext, byte[] bytes, * MIME type (i.e. image/jpeg) in the Content-Type header. You are required to provide a * description of the attachment using the X-Bunq-Attachment-Description header. */ - public static BunqResponse create(ApiContext apiContext, byte[] bytes, Integer userId, - Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, byte[] bytes, Integer userId, Integer monetaryAccountId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), bytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), bytes, customHeaders); return processForId(responseRaw); } diff --git a/src/main/java/com/bunq/sdk/model/generated/AttachmentPublic.java b/src/main/java/com/bunq/sdk/model/generated/AttachmentPublic.java index 0aad3221..ab88cce7 100644 --- a/src/main/java/com/bunq/sdk/model/generated/AttachmentPublic.java +++ b/src/main/java/com/bunq/sdk/model/generated/AttachmentPublic.java @@ -6,10 +6,15 @@ import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; import com.bunq.sdk.model.generated.object.Attachment; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * This call is used to upload an attachment that can be referenced to as an avatar (through the @@ -66,16 +71,14 @@ public static BunqResponse create(ApiContext apiContext, byte[] bytes) { * (i.e. image/jpeg, or image/png) in the Content-Type header. You are required to provide a * description of the attachment using the X-Bunq-Attachment-Description header. */ - public static BunqResponse create(ApiContext apiContext, byte[] bytes, - Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, byte[] bytes, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); BunqResponseRaw responseRaw = apiClient.post(ENDPOINT_URL_CREATE, bytes, customHeaders); return processForUuid(responseRaw); } - public static BunqResponse get(ApiContext apiContext, - String attachmentPublicUuid) { + public static BunqResponse get(ApiContext apiContext, String attachmentPublicUuid) { return get(apiContext, attachmentPublicUuid, new HashMap<>()); } @@ -83,11 +86,9 @@ public static BunqResponse get(ApiContext apiContext, * Get a specific attachment's metadata through its UUID. The Content-Type header of the * response will describe the MIME type of the attachment file. */ - public static BunqResponse get(ApiContext apiContext, - String attachmentPublicUuid, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, String attachmentPublicUuid, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, attachmentPublicUuid), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, attachmentPublicUuid), new HashMap<>(), customHeaders); return fromJson(AttachmentPublic.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/AttachmentPublicContent.java b/src/main/java/com/bunq/sdk/model/generated/AttachmentPublicContent.java index a58404e1..91f62a72 100644 --- a/src/main/java/com/bunq/sdk/model/generated/AttachmentPublicContent.java +++ b/src/main/java/com/bunq/sdk/model/generated/AttachmentPublicContent.java @@ -5,8 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Fetch the raw content of a public attachment with given ID. The raw content is the binary @@ -31,11 +38,9 @@ public static BunqResponse list(ApiContext apiContext, String attachment /** * Get the raw content of a specific attachment. */ - public static BunqResponse list(ApiContext apiContext, String attachmentPublicUuid, - Map customHeaders) { + public static BunqResponse list(ApiContext apiContext, String attachmentPublicUuid, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, attachmentPublicUuid), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, attachmentPublicUuid), new HashMap<>(), customHeaders); return new BunqResponse<>(responseRaw.getBodyBytes(), responseRaw.getHeaders()); } diff --git a/src/main/java/com/bunq/sdk/model/generated/AttachmentTab.java b/src/main/java/com/bunq/sdk/model/generated/AttachmentTab.java index 10721d0f..e923462c 100644 --- a/src/main/java/com/bunq/sdk/model/generated/AttachmentTab.java +++ b/src/main/java/com/bunq/sdk/model/generated/AttachmentTab.java @@ -6,10 +6,15 @@ import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; import com.bunq.sdk.model.generated.object.Attachment; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * This call is used to upload an attachment that will be accessible only through tabs. This can @@ -57,8 +62,7 @@ public class AttachmentTab extends BunqModel { @SerializedName("attachment") private Attachment attachment; - public static BunqResponse create(ApiContext apiContext, byte[] bytes, Integer userId, - Integer monetaryAccountId) { + public static BunqResponse create(ApiContext apiContext, byte[] bytes, Integer userId, Integer monetaryAccountId) { return create(apiContext, bytes, userId, monetaryAccountId, new HashMap<>()); } @@ -69,17 +73,14 @@ public static BunqResponse create(ApiContext apiContext, byte[] bytes, * You are required to provide a description of the attachment using the * X-Bunq-Attachment-Description header. */ - public static BunqResponse create(ApiContext apiContext, byte[] bytes, Integer userId, - Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, byte[] bytes, Integer userId, Integer monetaryAccountId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), bytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), bytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer attachmentTabId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer attachmentTabId) { return get(apiContext, userId, monetaryAccountId, attachmentTabId, new HashMap<>()); } @@ -87,12 +88,9 @@ public static BunqResponse get(ApiContext apiContext, Integer use * Get a specific attachment. The header of the response contains the content-type of the * attachment. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer attachmentTabId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer attachmentTabId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, attachmentTabId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, attachmentTabId), new HashMap<>(), customHeaders); return fromJson(AttachmentTab.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/AttachmentTabContent.java b/src/main/java/com/bunq/sdk/model/generated/AttachmentTabContent.java index 883f1d7e..9795f69b 100644 --- a/src/main/java/com/bunq/sdk/model/generated/AttachmentTabContent.java +++ b/src/main/java/com/bunq/sdk/model/generated/AttachmentTabContent.java @@ -5,8 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Fetch the raw content of a tab attachment with given ID. The raw content is the binary @@ -24,20 +31,16 @@ public class AttachmentTabContent extends BunqModel { */ private static final String OBJECT_TYPE = "AttachmentTabContent"; - public static BunqResponse list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer attachmentTabId) { + public static BunqResponse list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer attachmentTabId) { return list(apiContext, userId, monetaryAccountId, attachmentTabId, new HashMap<>()); } /** * Get the raw content of a specific attachment. */ - public static BunqResponse list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer attachmentTabId, Map customHeaders) { + public static BunqResponse list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer attachmentTabId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, attachmentTabId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, attachmentTabId), new HashMap<>(), customHeaders); return new BunqResponse<>(responseRaw.getBodyBytes(), responseRaw.getHeaders()); } diff --git a/src/main/java/com/bunq/sdk/model/generated/Avatar.java b/src/main/java/com/bunq/sdk/model/generated/Avatar.java index 5565935d..1c277273 100644 --- a/src/main/java/com/bunq/sdk/model/generated/Avatar.java +++ b/src/main/java/com/bunq/sdk/model/generated/Avatar.java @@ -6,11 +6,15 @@ import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; import com.bunq.sdk.model.generated.object.Image; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Avatars are public images used to represent you or your company. Avatars are used to @@ -57,8 +61,7 @@ public static BunqResponse create(ApiContext apiContext, Map create(ApiContext apiContext, Map requestMap, - Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); BunqResponseRaw responseRaw = apiClient.post(ENDPOINT_URL_CREATE, requestBytes, customHeaders); @@ -72,11 +75,9 @@ public static BunqResponse get(ApiContext apiContext, String avatarUuid) /** */ - public static BunqResponse get(ApiContext apiContext, String avatarUuid, - Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, String avatarUuid, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, avatarUuid), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, avatarUuid), new HashMap<>(), customHeaders); return fromJson(Avatar.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/BillingContractSubscription.java b/src/main/java/com/bunq/sdk/model/generated/BillingContractSubscription.java new file mode 100644 index 00000000..1db9360d --- /dev/null +++ b/src/main/java/com/bunq/sdk/model/generated/BillingContractSubscription.java @@ -0,0 +1,199 @@ +package com.bunq.sdk.model.generated; + +import com.bunq.sdk.context.ApiContext; +import com.bunq.sdk.http.ApiClient; +import com.bunq.sdk.http.BunqResponse; +import com.bunq.sdk.http.BunqResponseRaw; +import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.lang.model.type.NullType; + +/** + * Show the subscription billing contract for the authenticated user. + */ +public class BillingContractSubscription extends BunqModel { + + /** + * Field constants. + */ + public static final String FIELD_SUBSCRIPTION_TYPE = "subscription_type"; + + /** + * Endpoint constants. + */ + private static final String ENDPOINT_URL_CREATE = "user/%s/billing-contract-subscription"; + private static final String ENDPOINT_URL_LISTING = "user/%s/billing-contract-subscription"; + + /** + * Object type. + */ + private static final String OBJECT_TYPE = "BillingContractSubscription"; + + /** + * The id of the billing contract. + */ + @Expose + @SerializedName("id") + private Integer id; + + /** + * The timestamp when the billing contract was made. + */ + @Expose + @SerializedName("created") + private String created; + + /** + * The timestamp when the billing contract was last updated. + */ + @Expose + @SerializedName("updated") + private String updated; + + /** + * The date from when the billing contract is valid. + */ + @Expose + @SerializedName("contract_date_start") + private String contractDateStart; + + /** + * The date until when the billing contract is valid. + */ + @Expose + @SerializedName("contract_date_end") + private String contractDateEnd; + + /** + * The version of the billing contract. + */ + @Expose + @SerializedName("contract_version") + private Integer contractVersion; + + /** + * 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. + */ + @Expose + @SerializedName("subscription_type") + private String subscriptionType; + + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId) { + return create(apiContext, requestMap, userId, new HashMap<>()); + } + + /** + */ + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Map customHeaders) { + ApiClient apiClient = new ApiClient(apiContext); + byte[] requestBytes = gson.toJson(requestMap).getBytes(); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId), requestBytes, customHeaders); + + return fromJson(BillingContractSubscription.class, responseRaw, OBJECT_TYPE); + } + + public static BunqResponse> list(ApiContext apiContext, Integer userId) { + return list(apiContext, userId, new HashMap<>()); + } + + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params) { + return list(apiContext, userId, params, new HashMap<>()); + } + + /** + * Get all subscription billing contract for the authenticated user. + */ + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params, Map customHeaders) { + ApiClient apiClient = new ApiClient(apiContext); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId), params, customHeaders); + + return fromJsonList(BillingContractSubscription.class, responseRaw, OBJECT_TYPE); + } + + /** + * The id of the billing contract. + */ + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + /** + * The timestamp when the billing contract was made. + */ + public String getCreated() { + return this.created; + } + + public void setCreated(String created) { + this.created = created; + } + + /** + * The timestamp when the billing contract was last updated. + */ + public String getUpdated() { + return this.updated; + } + + public void setUpdated(String updated) { + this.updated = updated; + } + + /** + * The date from when the billing contract is valid. + */ + public String getContractDateStart() { + return this.contractDateStart; + } + + public void setContractDateStart(String contractDateStart) { + this.contractDateStart = contractDateStart; + } + + /** + * The date until when the billing contract is valid. + */ + public String getContractDateEnd() { + return this.contractDateEnd; + } + + public void setContractDateEnd(String contractDateEnd) { + this.contractDateEnd = contractDateEnd; + } + + /** + * The version of the billing contract. + */ + public Integer getContractVersion() { + return this.contractVersion; + } + + public void setContractVersion(Integer contractVersion) { + this.contractVersion = contractVersion; + } + + /** + * 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. + */ + public String getSubscriptionType() { + return this.subscriptionType; + } + + public void setSubscriptionType(String subscriptionType) { + this.subscriptionType = subscriptionType; + } + +} diff --git a/src/main/java/com/bunq/sdk/model/generated/Card.java b/src/main/java/com/bunq/sdk/model/generated/Card.java index 88cc0649..b4547c13 100644 --- a/src/main/java/com/bunq/sdk/model/generated/Card.java +++ b/src/main/java/com/bunq/sdk/model/generated/Card.java @@ -5,17 +5,21 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; -import com.bunq.sdk.model.MonetaryAccountReference; import com.bunq.sdk.model.generated.object.CardCountryPermission; import com.bunq.sdk.model.generated.object.CardLimit; import com.bunq.sdk.model.generated.object.CardMagStripePermission; import com.bunq.sdk.model.generated.object.CardPinAssignment; +import com.bunq.sdk.model.generated.object.LabelMonetaryAccount; +import com.bunq.sdk.model.MonetaryAccountReference; import com.bunq.sdk.security.SecurityUtils; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Endpoint for retrieving details for the cards the user has access to. @@ -162,8 +166,15 @@ public class Card extends BunqModel { @SerializedName("pin_code_assignment") private List pinCodeAssignment; - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer cardId) { + /** + * ID of the MA to be used as fallback for this card if insufficient balance. Fallback account + * is removed if not supplied. + */ + @Expose + @SerializedName("monetary_account_id_fallback") + private Integer monetaryAccountIdFallback; + + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer cardId) { return update(apiContext, requestMap, userId, cardId, new HashMap<>()); } @@ -172,13 +183,11 @@ public static BunqResponse update(ApiContext apiContext, Map update(ApiContext apiContext, Map requestMap, - Integer userId, Integer cardId, Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer cardId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); requestBytes = SecurityUtils.encrypt(apiContext, requestBytes, customHeaders); - BunqResponseRaw responseRaw = apiClient - .put(String.format(ENDPOINT_URL_UPDATE, userId, cardId), requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, cardId), requestBytes, customHeaders); return fromJson(Card.class, responseRaw, OBJECT_TYPE); } @@ -190,11 +199,9 @@ public static BunqResponse get(ApiContext apiContext, Integer userId, Inte /** * Return the details of a specific card. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, Integer cardId, - Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer cardId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, cardId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, cardId), new HashMap<>(), customHeaders); return fromJson(Card.class, responseRaw, OBJECT_TYPE); } @@ -203,14 +210,16 @@ public static BunqResponse> list(ApiContext apiContext, Integer userI return list(apiContext, userId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params) { + return list(apiContext, userId, params, new HashMap<>()); + } + /** * Return all the cards available to the user. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId), params, customHeaders); return fromJsonList(Card.class, responseRaw, OBJECT_TYPE); } @@ -394,4 +403,16 @@ public void setPinCodeAssignment(List pinCodeAssignment) { this.pinCodeAssignment = pinCodeAssignment; } + /** + * ID of the MA to be used as fallback for this card if insufficient balance. Fallback account + * is removed if not supplied. + */ + public Integer getMonetaryAccountIdFallback() { + return this.monetaryAccountIdFallback; + } + + public void setMonetaryAccountIdFallback(Integer monetaryAccountIdFallback) { + this.monetaryAccountIdFallback = monetaryAccountIdFallback; + } + } diff --git a/src/main/java/com/bunq/sdk/model/generated/CardDebit.java b/src/main/java/com/bunq/sdk/model/generated/CardDebit.java index 588f6793..fafd0004 100644 --- a/src/main/java/com/bunq/sdk/model/generated/CardDebit.java +++ b/src/main/java/com/bunq/sdk/model/generated/CardDebit.java @@ -7,13 +7,19 @@ import com.bunq.sdk.model.BunqModel; import com.bunq.sdk.model.generated.object.CardCountryPermission; import com.bunq.sdk.model.generated.object.CardLimit; +import com.bunq.sdk.model.generated.object.CardPinAssignment; +import com.bunq.sdk.model.generated.object.LabelMonetaryAccount; import com.bunq.sdk.model.generated.object.LabelUser; +import com.bunq.sdk.model.MonetaryAccountReference; import com.bunq.sdk.security.SecurityUtils; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * With bunq it is possible to order debit cards that can then be connected with each one of the @@ -29,6 +35,8 @@ public class CardDebit extends BunqModel { public static final String FIELD_PIN_CODE = "pin_code"; public static final String FIELD_ALIAS = "alias"; public static final String FIELD_TYPE = "type"; + public static final String FIELD_PIN_CODE_ASSIGNMENT = "pin_code_assignment"; + public static final String FIELD_MONETARY_ACCOUNT_ID_FALLBACK = "monetary_account_id_fallback"; /** * Endpoint constants. @@ -61,6 +69,13 @@ public class CardDebit extends BunqModel { @SerializedName("updated") private String updated; + /** + * The public UUID of the card. + */ + @Expose + @SerializedName("public_uuid") + private String publicUuid; + /** * The second line of text on the card */ @@ -75,6 +90,13 @@ public class CardDebit extends BunqModel { @SerializedName("name_on_card") private String nameOnCard; + /** + * The last 4 digits of the PAN of the card. + */ + @Expose + @SerializedName("primary_account_number_four_digit") + private String primaryAccountNumberFourDigit; + /** * The status to set for the card. After ordering the card it will be DEACTIVATED. */ @@ -110,6 +132,20 @@ public class CardDebit extends BunqModel { @SerializedName("country_permission") private List countryPermission; + /** + * The monetary account this card was ordered on and the label user that owns the card. + */ + @Expose + @SerializedName("label_monetary_account_ordered") + private MonetaryAccountReference labelMonetaryAccountOrdered; + + /** + * The monetary account that this card is currently linked to and the label user viewing it. + */ + @Expose + @SerializedName("label_monetary_account_current") + private MonetaryAccountReference labelMonetaryAccountCurrent; + /** * The label for the user who requested the card. */ @@ -117,21 +153,33 @@ public class CardDebit extends BunqModel { @SerializedName("alias") private LabelUser alias; - public static BunqResponse create(ApiContext apiContext, - Map requestMap, Integer userId) { + /** + * Array of Types, PINs, account IDs assigned to the card. + */ + @Expose + @SerializedName("pin_code_assignment") + private List pinCodeAssignment; + + /** + * ID of the MA to be used as fallback for this card if insufficient balance. Fallback account + * is removed if not supplied. + */ + @Expose + @SerializedName("monetary_account_id_fallback") + private Integer monetaryAccountIdFallback; + + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId) { return create(apiContext, requestMap, userId, new HashMap<>()); } /** * Create a new debit card request. */ - public static BunqResponse create(ApiContext apiContext, - Map requestMap, Integer userId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); requestBytes = SecurityUtils.encrypt(apiContext, requestBytes, customHeaders); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId), requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId), requestBytes, customHeaders); return fromJson(CardDebit.class, responseRaw, OBJECT_TYPE); } @@ -169,6 +217,17 @@ public void setUpdated(String updated) { this.updated = updated; } + /** + * The public UUID of the card. + */ + public String getPublicUuid() { + return this.publicUuid; + } + + public void setPublicUuid(String publicUuid) { + this.publicUuid = publicUuid; + } + /** * The second line of text on the card */ @@ -191,6 +250,17 @@ public void setNameOnCard(String nameOnCard) { this.nameOnCard = nameOnCard; } + /** + * The last 4 digits of the PAN of the card. + */ + public String getPrimaryAccountNumberFourDigit() { + return this.primaryAccountNumberFourDigit; + } + + public void setPrimaryAccountNumberFourDigit(String primaryAccountNumberFourDigit) { + this.primaryAccountNumberFourDigit = primaryAccountNumberFourDigit; + } + /** * The status to set for the card. After ordering the card it will be DEACTIVATED. */ @@ -246,6 +316,28 @@ public void setCountryPermission(List countryPermission) this.countryPermission = countryPermission; } + /** + * The monetary account this card was ordered on and the label user that owns the card. + */ + public MonetaryAccountReference getLabelMonetaryAccountOrdered() { + return this.labelMonetaryAccountOrdered; + } + + public void setLabelMonetaryAccountOrdered(MonetaryAccountReference labelMonetaryAccountOrdered) { + this.labelMonetaryAccountOrdered = labelMonetaryAccountOrdered; + } + + /** + * The monetary account that this card is currently linked to and the label user viewing it. + */ + public MonetaryAccountReference getLabelMonetaryAccountCurrent() { + return this.labelMonetaryAccountCurrent; + } + + public void setLabelMonetaryAccountCurrent(MonetaryAccountReference labelMonetaryAccountCurrent) { + this.labelMonetaryAccountCurrent = labelMonetaryAccountCurrent; + } + /** * The label for the user who requested the card. */ @@ -257,4 +349,27 @@ public void setAlias(LabelUser alias) { this.alias = alias; } + /** + * Array of Types, PINs, account IDs assigned to the card. + */ + public List getPinCodeAssignment() { + return this.pinCodeAssignment; + } + + public void setPinCodeAssignment(List pinCodeAssignment) { + this.pinCodeAssignment = pinCodeAssignment; + } + + /** + * ID of the MA to be used as fallback for this card if insufficient balance. Fallback account + * is removed if not supplied. + */ + public Integer getMonetaryAccountIdFallback() { + return this.monetaryAccountIdFallback; + } + + public void setMonetaryAccountIdFallback(Integer monetaryAccountIdFallback) { + this.monetaryAccountIdFallback = monetaryAccountIdFallback; + } + } diff --git a/src/main/java/com/bunq/sdk/model/generated/CardName.java b/src/main/java/com/bunq/sdk/model/generated/CardName.java index f14042f5..5272448a 100644 --- a/src/main/java/com/bunq/sdk/model/generated/CardName.java +++ b/src/main/java/com/bunq/sdk/model/generated/CardName.java @@ -5,11 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Endpoint for getting all the accepted card names for a user. As bunq do not allow total @@ -39,14 +43,16 @@ public static BunqResponse> list(ApiContext apiContext, Integer u return list(apiContext, userId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params) { + return list(apiContext, userId, params, new HashMap<>()); + } + /** * Return all the accepted card names for a specific user. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId), params, customHeaders); return fromJsonList(CardName.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/CashRegister.java b/src/main/java/com/bunq/sdk/model/generated/CashRegister.java index d6af7b33..d8993ff5 100644 --- a/src/main/java/com/bunq/sdk/model/generated/CashRegister.java +++ b/src/main/java/com/bunq/sdk/model/generated/CashRegister.java @@ -9,11 +9,15 @@ import com.bunq.sdk.model.generated.object.Geolocation; import com.bunq.sdk.model.generated.object.NotificationFilter; import com.bunq.sdk.model.generated.object.TabTextWaitingScreen; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * CashRegisters act as an point of sale. They have a specific name and avatar, and optionally a @@ -109,8 +113,7 @@ public class CashRegister extends BunqModel { @SerializedName("tab_text_waiting_screen") private List tabTextWaitingScreen; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId) { return create(apiContext, requestMap, userId, monetaryAccountId, new HashMap<>()); } @@ -120,39 +123,30 @@ public static BunqResponse create(ApiContext apiContext, Map create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, - customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId) { return get(apiContext, userId, monetaryAccountId, cashRegisterId, new HashMap<>()); } /** * Get a specific CashRegister. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, cashRegisterId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, cashRegisterId), new HashMap<>(), customHeaders); return fromJson(CashRegister.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId) { - return update(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, - new HashMap<>()); + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId) { + return update(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, new HashMap<>()); } /** @@ -160,31 +154,28 @@ public static BunqResponse update(ApiContext apiContext, Map update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId, - Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, cashRegisterId), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, cashRegisterId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId) { return list(apiContext, userId, monetaryAccountId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params) { + return list(apiContext, userId, monetaryAccountId, params, new HashMap<>()); + } + /** * Get a collection of CashRegister for a given user and monetary account. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), params, customHeaders); return fromJsonList(CashRegister.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/CashRegisterQrCode.java b/src/main/java/com/bunq/sdk/model/generated/CashRegisterQrCode.java index eee76ddd..5ec82cf5 100644 --- a/src/main/java/com/bunq/sdk/model/generated/CashRegisterQrCode.java +++ b/src/main/java/com/bunq/sdk/model/generated/CashRegisterQrCode.java @@ -5,11 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Once your CashRegister has been activated you can create a QR code for it. The visibility of @@ -81,86 +85,67 @@ public class CashRegisterQrCode extends BunqModel { @SerializedName("tab_object") private Tab tabObject; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId) { - return create(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, - new HashMap<>()); + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId) { + return create(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, new HashMap<>()); } /** * Create a new QR code for this CashRegister. You can only have one ACTIVE CashRegister QR code * at the time. */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId, - Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId, cashRegisterId), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId, cashRegisterId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId, - Integer cashRegisterQrCodeId) { - return update(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, - cashRegisterQrCodeId, new HashMap<>()); + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Integer cashRegisterQrCodeId) { + return update(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, cashRegisterQrCodeId, new HashMap<>()); } /** * Modify a QR code in a given CashRegister. You can only have one ACTIVE CashRegister QR code * at the time. */ - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId, - Integer cashRegisterQrCodeId, Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Integer cashRegisterQrCodeId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient.put(String - .format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, cashRegisterId, - cashRegisterQrCodeId), requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, cashRegisterId, cashRegisterQrCodeId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, Integer cashRegisterQrCodeId) { - return get(apiContext, userId, monetaryAccountId, cashRegisterId, cashRegisterQrCodeId, - new HashMap<>()); + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Integer cashRegisterQrCodeId) { + return get(apiContext, userId, monetaryAccountId, cashRegisterId, cashRegisterQrCodeId, new HashMap<>()); } /** * Get the information of a specific QR code. To get the RAW content of the QR code use * ../qr-code/{id}/content */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, Integer cashRegisterQrCodeId, - Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Integer cashRegisterQrCodeId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.get(String - .format(ENDPOINT_URL_READ, userId, monetaryAccountId, cashRegisterId, cashRegisterQrCodeId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, cashRegisterId, cashRegisterQrCodeId), new HashMap<>(), customHeaders); return fromJson(CashRegisterQrCode.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId) { return list(apiContext, userId, monetaryAccountId, cashRegisterId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Map params) { + return list(apiContext, userId, monetaryAccountId, cashRegisterId, params, new HashMap<>()); + } + /** * Get a collection of QR code information from a given CashRegister */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, cashRegisterId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, cashRegisterId), params, customHeaders); return fromJsonList(CashRegisterQrCode.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/CashRegisterQrCodeContent.java b/src/main/java/com/bunq/sdk/model/generated/CashRegisterQrCodeContent.java index 7f563110..3ad09eb5 100644 --- a/src/main/java/com/bunq/sdk/model/generated/CashRegisterQrCodeContent.java +++ b/src/main/java/com/bunq/sdk/model/generated/CashRegisterQrCodeContent.java @@ -5,8 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Show the raw contents of a QR code. First you need to created a QR code using @@ -24,21 +31,16 @@ public class CashRegisterQrCodeContent extends BunqModel { */ private static final String OBJECT_TYPE = "CashRegisterQrCodeContent"; - public static BunqResponse list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, Integer qrCodeId) { + public static BunqResponse list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Integer qrCodeId) { return list(apiContext, userId, monetaryAccountId, cashRegisterId, qrCodeId, new HashMap<>()); } /** * Show the raw contents of a QR code */ - public static BunqResponse list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, Integer qrCodeId, - Map customHeaders) { + public static BunqResponse list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Integer qrCodeId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.get( - String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, cashRegisterId, qrCodeId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, cashRegisterId, qrCodeId), new HashMap<>(), customHeaders); return new BunqResponse<>(responseRaw.getBodyBytes(), responseRaw.getHeaders()); } diff --git a/src/main/java/com/bunq/sdk/model/generated/CertificatePinned.java b/src/main/java/com/bunq/sdk/model/generated/CertificatePinned.java index a9b908a4..bc98d39e 100644 --- a/src/main/java/com/bunq/sdk/model/generated/CertificatePinned.java +++ b/src/main/java/com/bunq/sdk/model/generated/CertificatePinned.java @@ -5,9 +5,11 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; -import com.bunq.sdk.model.generated.object.Certificate; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -39,11 +41,11 @@ public class CertificatePinned extends BunqModel { private static final String OBJECT_TYPE = "CertificatePinned"; /** - * The certificate chain in .PEM format. + * The certificate chain in .PEM format. Certificates are glued with newline characters. */ @Expose @SerializedName("certificate_chain") - private List certificateChain; + private String certificateChain; /** * The id generated for the pinned certificate chain. @@ -52,37 +54,31 @@ public class CertificatePinned extends BunqModel { @SerializedName("id") private Integer id; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId) { return create(apiContext, requestMap, userId, new HashMap<>()); } /** * Pin the certificate chain. */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId), requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse delete(ApiContext apiContext, Integer userId, - Integer certificatePinnedId) { + public static BunqResponse delete(ApiContext apiContext, Integer userId, Integer certificatePinnedId) { return delete(apiContext, userId, certificatePinnedId, new HashMap<>()); } /** * Remove the pinned certificate chain with the specific ID. */ - public static BunqResponse delete(ApiContext apiContext, Integer userId, - Integer certificatePinnedId, Map customHeaders) { + public static BunqResponse delete(ApiContext apiContext, Integer userId, Integer certificatePinnedId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .delete(String.format(ENDPOINT_URL_DELETE, userId, certificatePinnedId), customHeaders); + BunqResponseRaw responseRaw = apiClient.delete(String.format(ENDPOINT_URL_DELETE, userId, certificatePinnedId), customHeaders); return new BunqResponse<>(null, responseRaw.getHeaders()); } @@ -91,43 +87,42 @@ public static BunqResponse> list(ApiContext apiContext, return list(apiContext, userId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params) { + return list(apiContext, userId, params, new HashMap<>()); + } + /** * List all the pinned certificate chain for the given user. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId), params, customHeaders); return fromJsonList(CertificatePinned.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer certificatePinnedId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer certificatePinnedId) { return get(apiContext, userId, certificatePinnedId, new HashMap<>()); } /** * Get the pinned certificate chain with the specified ID. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer certificatePinnedId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer certificatePinnedId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, certificatePinnedId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, certificatePinnedId), new HashMap<>(), customHeaders); return fromJson(CertificatePinned.class, responseRaw, OBJECT_TYPE); } /** - * The certificate chain in .PEM format. + * The certificate chain in .PEM format. Certificates are glued with newline characters. */ - public List getCertificateChain() { + public String getCertificateChain() { return this.certificateChain; } - public void setCertificateChain(List certificateChain) { + public void setCertificateChain(String certificateChain) { this.certificateChain = certificateChain; } diff --git a/src/main/java/com/bunq/sdk/model/generated/ChatConversation.java b/src/main/java/com/bunq/sdk/model/generated/ChatConversation.java index 7259a672..1116c440 100644 --- a/src/main/java/com/bunq/sdk/model/generated/ChatConversation.java +++ b/src/main/java/com/bunq/sdk/model/generated/ChatConversation.java @@ -5,9 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Manages user's conversations. @@ -29,29 +35,28 @@ public static BunqResponse> list(ApiContext apiContext, I return list(apiContext, userId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params) { + return list(apiContext, userId, params, new HashMap<>()); + } + /** */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId), params, customHeaders); return fromJsonList(ChatConversation.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer chatConversationId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer chatConversationId) { return get(apiContext, userId, chatConversationId, new HashMap<>()); } /** */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer chatConversationId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer chatConversationId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, chatConversationId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, chatConversationId), new HashMap<>(), customHeaders); return fromJson(ChatConversation.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/ChatMessage.java b/src/main/java/com/bunq/sdk/model/generated/ChatMessage.java index c783a326..7e049503 100644 --- a/src/main/java/com/bunq/sdk/model/generated/ChatMessage.java +++ b/src/main/java/com/bunq/sdk/model/generated/ChatMessage.java @@ -6,11 +6,15 @@ import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; import com.bunq.sdk.model.generated.object.LabelUser; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Endpoint for retrieving the messages that are part of a conversation. @@ -83,19 +87,20 @@ public class ChatMessage extends BunqModel { @SerializedName("content") private BunqModel content; - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer chatConversationId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer chatConversationId) { return list(apiContext, userId, chatConversationId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer chatConversationId, Map params) { + return list(apiContext, userId, chatConversationId, params, new HashMap<>()); + } + /** * Get all the messages that are part of a specific conversation. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer chatConversationId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer chatConversationId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, chatConversationId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, chatConversationId), params, customHeaders); return fromJsonList(ChatMessage.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/ChatMessageAttachment.java b/src/main/java/com/bunq/sdk/model/generated/ChatMessageAttachment.java index 6af38961..6ec9e71d 100644 --- a/src/main/java/com/bunq/sdk/model/generated/ChatMessageAttachment.java +++ b/src/main/java/com/bunq/sdk/model/generated/ChatMessageAttachment.java @@ -5,10 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Create new messages holding file attachments. @@ -38,21 +43,17 @@ public class ChatMessageAttachment extends BunqModel { @SerializedName("id") private Integer id; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer chatConversationId) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer chatConversationId) { return create(apiContext, requestMap, userId, chatConversationId, new HashMap<>()); } /** * Create a new message holding a file attachment to a specific conversation. */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer chatConversationId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer chatConversationId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, chatConversationId), requestBytes, - customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, chatConversationId), requestBytes, customHeaders); return processForId(responseRaw); } diff --git a/src/main/java/com/bunq/sdk/model/generated/ChatMessageText.java b/src/main/java/com/bunq/sdk/model/generated/ChatMessageText.java index 9173d3f6..e16bc7a6 100644 --- a/src/main/java/com/bunq/sdk/model/generated/ChatMessageText.java +++ b/src/main/java/com/bunq/sdk/model/generated/ChatMessageText.java @@ -5,10 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Endpoint for the type of chat message that carries text. @@ -38,21 +43,17 @@ public class ChatMessageText extends BunqModel { @SerializedName("id") private Integer id; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer chatConversationId) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer chatConversationId) { return create(apiContext, requestMap, userId, chatConversationId, new HashMap<>()); } /** * Add a new text message to a specific conversation. */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer chatConversationId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer chatConversationId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, chatConversationId), requestBytes, - customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, chatConversationId), requestBytes, customHeaders); return processForId(responseRaw); } diff --git a/src/main/java/com/bunq/sdk/model/generated/Customer.java b/src/main/java/com/bunq/sdk/model/generated/Customer.java new file mode 100644 index 00000000..e790e53e --- /dev/null +++ b/src/main/java/com/bunq/sdk/model/generated/Customer.java @@ -0,0 +1,156 @@ +package com.bunq.sdk.model.generated; + +import com.bunq.sdk.context.ApiContext; +import com.bunq.sdk.http.ApiClient; +import com.bunq.sdk.http.BunqResponse; +import com.bunq.sdk.http.BunqResponseRaw; +import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.lang.model.type.NullType; + +/** + * Used to view a customer. + */ +public class Customer extends BunqModel { + + /** + * Field constants. + */ + public static final String FIELD_BILLING_ACCOUNT_ID = "billing_account_id"; + + /** + * Endpoint constants. + */ + private static final String ENDPOINT_URL_LISTING = "user/%s/customer"; + private static final String ENDPOINT_URL_READ = "user/%s/customer/%s"; + private static final String ENDPOINT_URL_UPDATE = "user/%s/customer/%s"; + + /** + * Object type. + */ + private static final String OBJECT_TYPE = "Customer"; + + /** + * The id of the customer. + */ + @Expose + @SerializedName("id") + private Integer id; + + /** + * The timestamp of the customer object's creation. + */ + @Expose + @SerializedName("created") + private String created; + + /** + * The timestamp of the customer object's last update. + */ + @Expose + @SerializedName("updated") + private String updated; + + /** + * The primary billing account account's id. + */ + @Expose + @SerializedName("billing_account_id") + private String billingAccountId; + + public static BunqResponse> list(ApiContext apiContext, Integer userId) { + return list(apiContext, userId, new HashMap<>()); + } + + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params) { + return list(apiContext, userId, params, new HashMap<>()); + } + + /** + */ + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params, Map customHeaders) { + ApiClient apiClient = new ApiClient(apiContext); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId), params, customHeaders); + + return fromJsonList(Customer.class, responseRaw, OBJECT_TYPE); + } + + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer customerId) { + return get(apiContext, userId, customerId, new HashMap<>()); + } + + /** + */ + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer customerId, Map customHeaders) { + ApiClient apiClient = new ApiClient(apiContext); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, customerId), new HashMap<>(), customHeaders); + + return fromJson(Customer.class, responseRaw, OBJECT_TYPE); + } + + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer customerId) { + return update(apiContext, requestMap, userId, customerId, new HashMap<>()); + } + + /** + */ + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer customerId, Map customHeaders) { + ApiClient apiClient = new ApiClient(apiContext); + byte[] requestBytes = gson.toJson(requestMap).getBytes(); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, customerId), requestBytes, customHeaders); + + return processForId(responseRaw); + } + + /** + * The id of the customer. + */ + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + /** + * The timestamp of the customer object's creation. + */ + public String getCreated() { + return this.created; + } + + public void setCreated(String created) { + this.created = created; + } + + /** + * The timestamp of the customer object's last update. + */ + public String getUpdated() { + return this.updated; + } + + public void setUpdated(String updated) { + this.updated = updated; + } + + /** + * The primary billing account account's id. + */ + public String getBillingAccountId() { + return this.billingAccountId; + } + + public void setBillingAccountId(String billingAccountId) { + this.billingAccountId = billingAccountId; + } + +} diff --git a/src/main/java/com/bunq/sdk/model/generated/CustomerLimit.java b/src/main/java/com/bunq/sdk/model/generated/CustomerLimit.java new file mode 100644 index 00000000..a5864fe3 --- /dev/null +++ b/src/main/java/com/bunq/sdk/model/generated/CustomerLimit.java @@ -0,0 +1,105 @@ +package com.bunq.sdk.model.generated; + +import com.bunq.sdk.context.ApiContext; +import com.bunq.sdk.http.ApiClient; +import com.bunq.sdk.http.BunqResponse; +import com.bunq.sdk.http.BunqResponseRaw; +import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.lang.model.type.NullType; + +/** + * Show the limits for the authenticated user. + */ +public class CustomerLimit extends BunqModel { + + /** + * Endpoint constants. + */ + private static final String ENDPOINT_URL_LISTING = "user/%s/limit"; + + /** + * Object type. + */ + private static final String OBJECT_TYPE = "CustomerLimit"; + + /** + * The limit of monetary accounts. + */ + @Expose + @SerializedName("limit_monetary_account") + private Integer limitMonetaryAccount; + + /** + * The limit of Maestro cards. + */ + @Expose + @SerializedName("limit_card_debit_maestro") + private Integer limitCardDebitMaestro; + + /** + * The limit of MasterCard cards. + */ + @Expose + @SerializedName("limit_card_debit_mastercard") + private Integer limitCardDebitMastercard; + + public static BunqResponse> list(ApiContext apiContext, Integer userId) { + return list(apiContext, userId, new HashMap<>()); + } + + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params) { + return list(apiContext, userId, params, new HashMap<>()); + } + + /** + * Get all limits for the authenticated user. + */ + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params, Map customHeaders) { + ApiClient apiClient = new ApiClient(apiContext); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId), params, customHeaders); + + return fromJsonList(CustomerLimit.class, responseRaw, OBJECT_TYPE); + } + + /** + * The limit of monetary accounts. + */ + public Integer getLimitMonetaryAccount() { + return this.limitMonetaryAccount; + } + + public void setLimitMonetaryAccount(Integer limitMonetaryAccount) { + this.limitMonetaryAccount = limitMonetaryAccount; + } + + /** + * The limit of Maestro cards. + */ + public Integer getLimitCardDebitMaestro() { + return this.limitCardDebitMaestro; + } + + public void setLimitCardDebitMaestro(Integer limitCardDebitMaestro) { + this.limitCardDebitMaestro = limitCardDebitMaestro; + } + + /** + * The limit of MasterCard cards. + */ + public Integer getLimitCardDebitMastercard() { + return this.limitCardDebitMastercard; + } + + public void setLimitCardDebitMastercard(Integer limitCardDebitMastercard) { + this.limitCardDebitMastercard = limitCardDebitMastercard; + } + +} diff --git a/src/main/java/com/bunq/sdk/model/generated/CustomerStatementExport.java b/src/main/java/com/bunq/sdk/model/generated/CustomerStatementExport.java index 4f09b31d..12fe1743 100644 --- a/src/main/java/com/bunq/sdk/model/generated/CustomerStatementExport.java +++ b/src/main/java/com/bunq/sdk/model/generated/CustomerStatementExport.java @@ -5,9 +5,12 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.generated.object.LabelMonetaryAccount; import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -110,73 +113,59 @@ public class CustomerStatementExport extends BunqModel { @SerializedName("alias_monetary_account") private MonetaryAccountReference aliasMonetaryAccount; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId) { return create(apiContext, requestMap, userId, monetaryAccountId, new HashMap<>()); } /** */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, - customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer customerStatementExportId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer customerStatementExportId) { return get(apiContext, userId, monetaryAccountId, customerStatementExportId, new HashMap<>()); } /** */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer customerStatementExportId, - Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer customerStatementExportId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, customerStatementExportId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, customerStatementExportId), new HashMap<>(), customHeaders); return fromJson(CustomerStatementExport.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, - Integer userId, Integer monetaryAccountId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId) { return list(apiContext, userId, monetaryAccountId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params) { + return list(apiContext, userId, monetaryAccountId, params, new HashMap<>()); + } + /** */ - public static BunqResponse> list(ApiContext apiContext, - Integer userId, Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), params, customHeaders); return fromJsonList(CustomerStatementExport.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse delete(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer customerStatementExportId) { - return delete(apiContext, userId, monetaryAccountId, customerStatementExportId, - new HashMap<>()); + public static BunqResponse delete(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer customerStatementExportId) { + return delete(apiContext, userId, monetaryAccountId, customerStatementExportId, new HashMap<>()); } /** */ - public static BunqResponse delete(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer customerStatementExportId, - Map customHeaders) { + public static BunqResponse delete(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer customerStatementExportId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.delete( - String.format(ENDPOINT_URL_DELETE, userId, monetaryAccountId, customerStatementExportId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.delete(String.format(ENDPOINT_URL_DELETE, userId, monetaryAccountId, customerStatementExportId), customHeaders); return new BunqResponse<>(null, responseRaw.getHeaders()); } diff --git a/src/main/java/com/bunq/sdk/model/generated/CustomerStatementExportContent.java b/src/main/java/com/bunq/sdk/model/generated/CustomerStatementExportContent.java index 2e6301f8..5137f7b9 100644 --- a/src/main/java/com/bunq/sdk/model/generated/CustomerStatementExportContent.java +++ b/src/main/java/com/bunq/sdk/model/generated/CustomerStatementExportContent.java @@ -5,8 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Fetch the raw content of a statement export. The returned file format could be MT940, CSV or @@ -25,19 +32,15 @@ public class CustomerStatementExportContent extends BunqModel { */ private static final String OBJECT_TYPE = "CustomerStatementExportContent"; - public static BunqResponse list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer customerStatementId) { + public static BunqResponse list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer customerStatementId) { return list(apiContext, userId, monetaryAccountId, customerStatementId, new HashMap<>()); } /** */ - public static BunqResponse list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer customerStatementId, Map customHeaders) { + public static BunqResponse list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer customerStatementId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, customerStatementId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, customerStatementId), new HashMap<>(), customHeaders); return new BunqResponse<>(responseRaw.getBodyBytes(), responseRaw.getHeaders()); } diff --git a/src/main/java/com/bunq/sdk/model/generated/Device.java b/src/main/java/com/bunq/sdk/model/generated/Device.java index c8357fb3..596987f6 100644 --- a/src/main/java/com/bunq/sdk/model/generated/Device.java +++ b/src/main/java/com/bunq/sdk/model/generated/Device.java @@ -5,11 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Used to get a Device or a listing of Devices. Creating a DeviceServer should happen via @@ -47,11 +51,9 @@ public static BunqResponse get(ApiContext apiContext, Integer deviceId) /** * Get a single Device. A Device is either a DevicePhone or a DeviceServer. */ - public static BunqResponse get(ApiContext apiContext, Integer deviceId, - Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer deviceId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, deviceId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, deviceId), new HashMap<>(), customHeaders); return fromJson(Device.class, responseRaw); } @@ -60,13 +62,16 @@ public static BunqResponse> list(ApiContext apiContext) { return list(apiContext, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Map params) { + return list(apiContext, params, new HashMap<>()); + } + /** * Get a collection of Devices. A Device is either a DevicePhone or a DeviceServer. */ - public static BunqResponse> list(ApiContext apiContext, - Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.get(ENDPOINT_URL_LISTING, customHeaders); + BunqResponseRaw responseRaw = apiClient.get(ENDPOINT_URL_LISTING, params, customHeaders); return fromJsonList(Device.class, responseRaw); } diff --git a/src/main/java/com/bunq/sdk/model/generated/DevicePhone.java b/src/main/java/com/bunq/sdk/model/generated/DevicePhone.java index 5b7090ce..e6fc098c 100644 --- a/src/main/java/com/bunq/sdk/model/generated/DevicePhone.java +++ b/src/main/java/com/bunq/sdk/model/generated/DevicePhone.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * Used to register a device. This is the only unsigned/verified request. diff --git a/src/main/java/com/bunq/sdk/model/generated/DeviceServer.java b/src/main/java/com/bunq/sdk/model/generated/DeviceServer.java index ac11438d..e485fd79 100644 --- a/src/main/java/com/bunq/sdk/model/generated/DeviceServer.java +++ b/src/main/java/com/bunq/sdk/model/generated/DeviceServer.java @@ -5,11 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * After having created an Installation you can now create a DeviceServer. A DeviceServer is @@ -78,8 +82,7 @@ public class DeviceServer extends BunqModel { @SerializedName("status") private String status; - public static BunqResponse create(ApiContext apiContext, - Map requestMap) { + public static BunqResponse create(ApiContext apiContext, Map requestMap) { return create(apiContext, requestMap, new HashMap<>()); } @@ -89,8 +92,7 @@ public static BunqResponse create(ApiContext apiContext, * the public part to create the Installation. Your API key will be bound to the ip address of * this DeviceServer. */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); BunqResponseRaw responseRaw = apiClient.post(ENDPOINT_URL_CREATE, requestBytes, customHeaders); @@ -105,11 +107,9 @@ public static BunqResponse get(ApiContext apiContext, Integer devi /** * Get one of your DeviceServers. */ - public static BunqResponse get(ApiContext apiContext, Integer deviceServerId, - Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer deviceServerId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, deviceServerId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, deviceServerId), new HashMap<>(), customHeaders); return fromJson(DeviceServer.class, responseRaw, OBJECT_TYPE); } @@ -118,13 +118,16 @@ public static BunqResponse> list(ApiContext apiContext) { return list(apiContext, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Map params) { + return list(apiContext, params, new HashMap<>()); + } + /** * Get a collection of all the DeviceServers you have created. */ - public static BunqResponse> list(ApiContext apiContext, - Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.get(ENDPOINT_URL_LISTING, customHeaders); + BunqResponseRaw responseRaw = apiClient.get(ENDPOINT_URL_LISTING, params, customHeaders); return fromJsonList(DeviceServer.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/DraftPayment.java b/src/main/java/com/bunq/sdk/model/generated/DraftPayment.java new file mode 100644 index 00000000..4c49e3a3 --- /dev/null +++ b/src/main/java/com/bunq/sdk/model/generated/DraftPayment.java @@ -0,0 +1,256 @@ +package com.bunq.sdk.model.generated; + +import com.bunq.sdk.context.ApiContext; +import com.bunq.sdk.http.ApiClient; +import com.bunq.sdk.http.BunqResponse; +import com.bunq.sdk.http.BunqResponseRaw; +import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.generated.object.DraftPaymentEntry; +import com.bunq.sdk.model.generated.object.DraftPaymentResponse; +import com.bunq.sdk.model.generated.object.LabelUser; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.lang.model.type.NullType; + +/** + * A DraftPayment is like a regular Payment, but it needs to be accepted by the sending party + * before the actual Payment is done. + */ +public class DraftPayment extends BunqModel { + + /** + * Field constants. + */ + public static final String FIELD_STATUS = "status"; + public static final String FIELD_ENTRIES = "entries"; + public static final String FIELD_PREVIOUS_UPDATED_TIMESTAMP = "previous_updated_timestamp"; + public static final String FIELD_NUMBER_OF_REQUIRED_ACCEPTS = "number_of_required_accepts"; + + /** + * Endpoint constants. + */ + private static final String ENDPOINT_URL_CREATE = "user/%s/monetary-account/%s/draft-payment"; + private static final String ENDPOINT_URL_UPDATE = "user/%s/monetary-account/%s/draft-payment/%s"; + private static final String ENDPOINT_URL_LISTING = "user/%s/monetary-account/%s/draft-payment"; + private static final String ENDPOINT_URL_READ = "user/%s/monetary-account/%s/draft-payment/%s"; + + /** + * Object type. + */ + private static final String OBJECT_TYPE = "DraftPayment"; + + /** + * The id of the DraftPayment. + */ + @Expose + @SerializedName("id") + private Integer id; + + /** + * The id of the MonetaryAccount the DraftPayment applies to. + */ + @Expose + @SerializedName("monetary_account_id") + private Integer monetaryAccountId; + + /** + * The label of the User who created the DraftPayment. + */ + @Expose + @SerializedName("user_alias_created") + private LabelUser userAliasCreated; + + /** + * All responses to this draft payment. + */ + @Expose + @SerializedName("responses") + private List responses; + + /** + * The status of the DraftPayment. + */ + @Expose + @SerializedName("status") + private String status; + + /** + * The type of the DraftPayment. + */ + @Expose + @SerializedName("type") + private String type; + + /** + * The entries in the DraftPayment. + */ + @Expose + @SerializedName("entries") + private List entries; + + /** + * The Payment or PaymentBatch. This will only be present after the DraftPayment has been + * accepted. + */ + @Expose + @SerializedName("object") + private BunqModel object; + + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId) { + return create(apiContext, requestMap, userId, monetaryAccountId, new HashMap<>()); + } + + /** + * Create a new DraftPayment. + */ + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Map customHeaders) { + ApiClient apiClient = new ApiClient(apiContext); + byte[] requestBytes = gson.toJson(requestMap).getBytes(); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, customHeaders); + + return processForId(responseRaw); + } + + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer draftPaymentId) { + return update(apiContext, requestMap, userId, monetaryAccountId, draftPaymentId, new HashMap<>()); + } + + /** + * Update a DraftPayment. + */ + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer draftPaymentId, Map customHeaders) { + ApiClient apiClient = new ApiClient(apiContext); + byte[] requestBytes = gson.toJson(requestMap).getBytes(); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, draftPaymentId), requestBytes, customHeaders); + + return processForId(responseRaw); + } + + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId) { + return list(apiContext, userId, monetaryAccountId, new HashMap<>()); + } + + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params) { + return list(apiContext, userId, monetaryAccountId, params, new HashMap<>()); + } + + /** + * Get a listing of all DraftPayments from a given MonetaryAccount. + */ + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params, Map customHeaders) { + ApiClient apiClient = new ApiClient(apiContext); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), params, customHeaders); + + return fromJsonList(DraftPayment.class, responseRaw, OBJECT_TYPE); + } + + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer draftPaymentId) { + return get(apiContext, userId, monetaryAccountId, draftPaymentId, new HashMap<>()); + } + + /** + * Get a specific DraftPayment. + */ + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer draftPaymentId, Map customHeaders) { + ApiClient apiClient = new ApiClient(apiContext); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, draftPaymentId), new HashMap<>(), customHeaders); + + return fromJson(DraftPayment.class, responseRaw, OBJECT_TYPE); + } + + /** + * The id of the DraftPayment. + */ + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + /** + * The id of the MonetaryAccount the DraftPayment applies to. + */ + public Integer getMonetaryAccountId() { + return this.monetaryAccountId; + } + + public void setMonetaryAccountId(Integer monetaryAccountId) { + this.monetaryAccountId = monetaryAccountId; + } + + /** + * The label of the User who created the DraftPayment. + */ + public LabelUser getUserAliasCreated() { + return this.userAliasCreated; + } + + public void setUserAliasCreated(LabelUser userAliasCreated) { + this.userAliasCreated = userAliasCreated; + } + + /** + * All responses to this draft payment. + */ + public List getResponses() { + return this.responses; + } + + public void setResponses(List responses) { + this.responses = responses; + } + + /** + * The status of the DraftPayment. + */ + public String getStatus() { + return this.status; + } + + public void setStatus(String status) { + this.status = status; + } + + /** + * The type of the DraftPayment. + */ + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + + /** + * The entries in the DraftPayment. + */ + public List getEntries() { + return this.entries; + } + + public void setEntries(List entries) { + this.entries = entries; + } + + /** + * The Payment or PaymentBatch. This will only be present after the DraftPayment has been + * accepted. + */ + public BunqModel getObject() { + return this.object; + } + + public void setObject(BunqModel object) { + this.object = object; + } + +} diff --git a/src/main/java/com/bunq/sdk/model/generated/DraftShareInviteBank.java b/src/main/java/com/bunq/sdk/model/generated/DraftShareInviteBank.java index 425da608..b02f872b 100644 --- a/src/main/java/com/bunq/sdk/model/generated/DraftShareInviteBank.java +++ b/src/main/java/com/bunq/sdk/model/generated/DraftShareInviteBank.java @@ -7,11 +7,15 @@ import com.bunq.sdk.model.BunqModel; import com.bunq.sdk.model.generated.object.DraftShareInviteBankEntry; import com.bunq.sdk.model.generated.object.LabelUser; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Used to create a draft share invite for a monetary account with another bunq user, as in the @@ -89,42 +93,35 @@ public class DraftShareInviteBank extends BunqModel { @SerializedName("id") private Integer id; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId) { return create(apiContext, requestMap, userId, new HashMap<>()); } /** */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId), requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer draftShareInviteBankId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer draftShareInviteBankId) { return get(apiContext, userId, draftShareInviteBankId, new HashMap<>()); } /** * Get the details of a specific draft of a share invite. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer draftShareInviteBankId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer draftShareInviteBankId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, draftShareInviteBankId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, draftShareInviteBankId), new HashMap<>(), customHeaders); return fromJson(DraftShareInviteBank.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse update(ApiContext apiContext, - Map requestMap, Integer userId, Integer draftShareInviteBankId) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer draftShareInviteBankId) { return update(apiContext, requestMap, userId, draftShareInviteBankId, new HashMap<>()); } @@ -132,30 +129,27 @@ public static BunqResponse update(ApiContext apiContext, * Update a draft share invite. When sending status CANCELLED it is possible to cancel the draft * share invite. */ - public static BunqResponse update(ApiContext apiContext, - Map requestMap, Integer userId, Integer draftShareInviteBankId, - Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer draftShareInviteBankId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .put(String.format(ENDPOINT_URL_UPDATE, userId, draftShareInviteBankId), requestBytes, - customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, draftShareInviteBankId), requestBytes, customHeaders); return fromJson(DraftShareInviteBank.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, - Integer userId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId) { return list(apiContext, userId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params) { + return list(apiContext, userId, params, new HashMap<>()); + } + /** */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId), params, customHeaders); return fromJsonList(DraftShareInviteBank.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/DraftShareInviteBankQrCodeContent.java b/src/main/java/com/bunq/sdk/model/generated/DraftShareInviteBankQrCodeContent.java index 715cd406..a36465b9 100644 --- a/src/main/java/com/bunq/sdk/model/generated/DraftShareInviteBankQrCodeContent.java +++ b/src/main/java/com/bunq/sdk/model/generated/DraftShareInviteBankQrCodeContent.java @@ -5,8 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * This call returns the raw content of the QR code that links to this draft share invite. When @@ -25,8 +32,7 @@ public class DraftShareInviteBankQrCodeContent extends BunqModel { */ private static final String OBJECT_TYPE = "DraftShareInviteBankQrCodeContent"; - public static BunqResponse list(ApiContext apiContext, Integer userId, - Integer draftShareInviteBankId) { + public static BunqResponse list(ApiContext apiContext, Integer userId, Integer draftShareInviteBankId) { return list(apiContext, userId, draftShareInviteBankId, new HashMap<>()); } @@ -34,11 +40,9 @@ public static BunqResponse list(ApiContext apiContext, Integer userId, * Returns the raw content of the QR code that links to this draft share invite. The raw content * is the binary representation of a file, without any JSON wrapping. */ - public static BunqResponse list(ApiContext apiContext, Integer userId, - Integer draftShareInviteBankId, Map customHeaders) { + public static BunqResponse list(ApiContext apiContext, Integer userId, Integer draftShareInviteBankId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, draftShareInviteBankId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, draftShareInviteBankId), new HashMap<>(), customHeaders); return new BunqResponse<>(responseRaw.getBodyBytes(), responseRaw.getHeaders()); } diff --git a/src/main/java/com/bunq/sdk/model/generated/ExportAnnualOverview.java b/src/main/java/com/bunq/sdk/model/generated/ExportAnnualOverview.java index d6f6fa35..48c6f123 100644 --- a/src/main/java/com/bunq/sdk/model/generated/ExportAnnualOverview.java +++ b/src/main/java/com/bunq/sdk/model/generated/ExportAnnualOverview.java @@ -6,11 +6,15 @@ import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; import com.bunq.sdk.model.generated.object.LabelUser; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Used to create new and read existing annual overviews of all the user's monetary accounts. @@ -71,8 +75,7 @@ public class ExportAnnualOverview extends BunqModel { @SerializedName("alias_user") private LabelUser aliasUser; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId) { return create(apiContext, requestMap, userId, new HashMap<>()); } @@ -80,46 +83,42 @@ public static BunqResponse create(ApiContext apiContext, Map create(ApiContext apiContext, Map requestMap, - Integer userId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId), requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer exportAnnualOverviewId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer exportAnnualOverviewId) { return get(apiContext, userId, exportAnnualOverviewId, new HashMap<>()); } /** * Get an annual overview for a user by its id. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer exportAnnualOverviewId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer exportAnnualOverviewId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, exportAnnualOverviewId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, exportAnnualOverviewId), new HashMap<>(), customHeaders); return fromJson(ExportAnnualOverview.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, - Integer userId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId) { return list(apiContext, userId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params) { + return list(apiContext, userId, params, new HashMap<>()); + } + /** * List all the annual overviews for a user. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId), params, customHeaders); return fromJsonList(ExportAnnualOverview.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/ExportAnnualOverviewContent.java b/src/main/java/com/bunq/sdk/model/generated/ExportAnnualOverviewContent.java index f4589145..371b9f66 100644 --- a/src/main/java/com/bunq/sdk/model/generated/ExportAnnualOverviewContent.java +++ b/src/main/java/com/bunq/sdk/model/generated/ExportAnnualOverviewContent.java @@ -5,8 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Fetch the raw content of an annual overview. The annual overview is always in PDF format. Doc @@ -24,19 +31,16 @@ public class ExportAnnualOverviewContent extends BunqModel { */ private static final String OBJECT_TYPE = "ExportAnnualOverviewContent"; - public static BunqResponse list(ApiContext apiContext, Integer userId, - Integer exportAnnualOverviewId) { + public static BunqResponse list(ApiContext apiContext, Integer userId, Integer exportAnnualOverviewId) { return list(apiContext, userId, exportAnnualOverviewId, new HashMap<>()); } /** * Used to retrieve the raw content of an annual overview. */ - public static BunqResponse list(ApiContext apiContext, Integer userId, - Integer exportAnnualOverviewId, Map customHeaders) { + public static BunqResponse list(ApiContext apiContext, Integer userId, Integer exportAnnualOverviewId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, exportAnnualOverviewId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, exportAnnualOverviewId), new HashMap<>(), customHeaders); return new BunqResponse<>(responseRaw.getBodyBytes(), responseRaw.getHeaders()); } diff --git a/src/main/java/com/bunq/sdk/model/generated/InstallationServerPublicKey.java b/src/main/java/com/bunq/sdk/model/generated/InstallationServerPublicKey.java index 472b3547..ca4c4214 100644 --- a/src/main/java/com/bunq/sdk/model/generated/InstallationServerPublicKey.java +++ b/src/main/java/com/bunq/sdk/model/generated/InstallationServerPublicKey.java @@ -5,11 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Using /installation/_/server-public-key you can request the ServerPublicKey again. This is @@ -34,19 +38,20 @@ public class InstallationServerPublicKey extends BunqModel { @SerializedName("server_public_key") private String serverPublicKey; - public static BunqResponse> list(ApiContext apiContext, - Integer installationId) { + public static BunqResponse> list(ApiContext apiContext, Integer installationId) { return list(apiContext, installationId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer installationId, Map params) { + return list(apiContext, installationId, params, new HashMap<>()); + } + /** * Show the ServerPublicKey for this Installation. */ - public static BunqResponse> list(ApiContext apiContext, - Integer installationId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer installationId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, installationId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, installationId), params, customHeaders); return fromJsonList(InstallationServerPublicKey.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/Invoice.java b/src/main/java/com/bunq/sdk/model/generated/Invoice.java index 5852519c..4e2372fb 100644 --- a/src/main/java/com/bunq/sdk/model/generated/Invoice.java +++ b/src/main/java/com/bunq/sdk/model/generated/Invoice.java @@ -5,15 +5,19 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; -import com.bunq.sdk.model.MonetaryAccountReference; import com.bunq.sdk.model.generated.object.Address; import com.bunq.sdk.model.generated.object.Amount; import com.bunq.sdk.model.generated.object.InvoiceItemGroup; +import com.bunq.sdk.model.generated.object.LabelMonetaryAccount; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Used to view a bunq invoice. @@ -150,34 +154,32 @@ public class Invoice extends BunqModel { @SerializedName("vat_number") private String vatNumber; - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId) { return list(apiContext, userId, monetaryAccountId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params) { + return list(apiContext, userId, monetaryAccountId, params, new HashMap<>()); + } + /** */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), params, customHeaders); return fromJsonList(Invoice.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer invoiceId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer invoiceId) { return get(apiContext, userId, monetaryAccountId, invoiceId, new HashMap<>()); } /** */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer invoiceId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer invoiceId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, invoiceId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, invoiceId), new HashMap<>(), customHeaders); return fromJson(Invoice.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/InvoiceByUser.java b/src/main/java/com/bunq/sdk/model/generated/InvoiceByUser.java index 6b8beece..3d2613dc 100644 --- a/src/main/java/com/bunq/sdk/model/generated/InvoiceByUser.java +++ b/src/main/java/com/bunq/sdk/model/generated/InvoiceByUser.java @@ -5,15 +5,19 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; -import com.bunq.sdk.model.MonetaryAccountReference; import com.bunq.sdk.model.generated.object.Address; import com.bunq.sdk.model.generated.object.Amount; import com.bunq.sdk.model.generated.object.InvoiceItemGroup; +import com.bunq.sdk.model.generated.object.LabelMonetaryAccount; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Used to list bunq invoices by user. @@ -147,29 +151,28 @@ public static BunqResponse> list(ApiContext apiContext, Inte return list(apiContext, userId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params) { + return list(apiContext, userId, params, new HashMap<>()); + } + /** */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId), params, customHeaders); return fromJsonList(InvoiceByUser.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer invoiceByUserId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer invoiceByUserId) { return get(apiContext, userId, invoiceByUserId, new HashMap<>()); } /** */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer invoiceByUserId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer invoiceByUserId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, invoiceByUserId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, invoiceByUserId), new HashMap<>(), customHeaders); return fromJson(InvoiceByUser.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/MonetaryAccount.java b/src/main/java/com/bunq/sdk/model/generated/MonetaryAccount.java index 78d60146..24391744 100644 --- a/src/main/java/com/bunq/sdk/model/generated/MonetaryAccount.java +++ b/src/main/java/com/bunq/sdk/model/generated/MonetaryAccount.java @@ -5,11 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Used to show the MonetaryAccounts that you can access. Currently the only MonetaryAccount @@ -36,19 +40,16 @@ public class MonetaryAccount extends BunqModel { @SerializedName("MonetaryAccountBank") private MonetaryAccountBank monetaryAccountBank; - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId) { return get(apiContext, userId, monetaryAccountId, new HashMap<>()); } /** * Get a specific MonetaryAccount. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId), new HashMap<>(), customHeaders); return fromJson(MonetaryAccount.class, responseRaw); } @@ -57,14 +58,16 @@ public static BunqResponse> list(ApiContext apiContext, In return list(apiContext, userId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params) { + return list(apiContext, userId, params, new HashMap<>()); + } + /** * Get a collection of all your MonetaryAccounts. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId), params, customHeaders); return fromJsonList(MonetaryAccount.class, responseRaw); } diff --git a/src/main/java/com/bunq/sdk/model/generated/MonetaryAccountBank.java b/src/main/java/com/bunq/sdk/model/generated/MonetaryAccountBank.java index 1210386a..fc9b97b2 100644 --- a/src/main/java/com/bunq/sdk/model/generated/MonetaryAccountBank.java +++ b/src/main/java/com/bunq/sdk/model/generated/MonetaryAccountBank.java @@ -10,11 +10,15 @@ import com.bunq.sdk.model.generated.object.MonetaryAccountSetting; import com.bunq.sdk.model.generated.object.NotificationFilter; import com.bunq.sdk.model.generated.object.Pointer; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * With MonetaryAccountBank you can create a new bank account, retrieve information regarding @@ -201,73 +205,64 @@ public class MonetaryAccountBank extends BunqModel { @SerializedName("setting") private MonetaryAccountSetting setting; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId) { return create(apiContext, requestMap, userId, new HashMap<>()); } /** * Create new MonetaryAccountBank. */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId), requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountBankId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountBankId) { return get(apiContext, userId, monetaryAccountBankId, new HashMap<>()); } /** * Get a specific MonetaryAccountBank. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountBankId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountBankId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountBankId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountBankId), new HashMap<>(), customHeaders); return fromJson(MonetaryAccountBank.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountBankId) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountBankId) { return update(apiContext, requestMap, userId, monetaryAccountBankId, new HashMap<>()); } /** * Update a specific existing MonetaryAccountBank. */ - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountBankId, Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountBankId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountBankId), requestBytes, - customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountBankId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse> list(ApiContext apiContext, - Integer userId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId) { return list(apiContext, userId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params) { + return list(apiContext, userId, params, new HashMap<>()); + } + /** * Gets a listing of all MonetaryAccountBanks of a given user. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId), params, customHeaders); return fromJsonList(MonetaryAccountBank.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/MonetaryAccountProfile.java b/src/main/java/com/bunq/sdk/model/generated/MonetaryAccountProfile.java index f0121651..a53e30cf 100644 --- a/src/main/java/com/bunq/sdk/model/generated/MonetaryAccountProfile.java +++ b/src/main/java/com/bunq/sdk/model/generated/MonetaryAccountProfile.java @@ -3,8 +3,14 @@ import com.bunq.sdk.model.BunqModel; import com.bunq.sdk.model.generated.object.MonetaryAccountProfileDrain; import com.bunq.sdk.model.generated.object.MonetaryAccountProfileFill; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * Used to update and read up monetary account profiles, to keep the balance between specific diff --git a/src/main/java/com/bunq/sdk/model/generated/Payment.java b/src/main/java/com/bunq/sdk/model/generated/Payment.java index 0f39a269..57af7be5 100644 --- a/src/main/java/com/bunq/sdk/model/generated/Payment.java +++ b/src/main/java/com/bunq/sdk/model/generated/Payment.java @@ -5,16 +5,20 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; -import com.bunq.sdk.model.MonetaryAccountReference; import com.bunq.sdk.model.generated.object.Address; import com.bunq.sdk.model.generated.object.Amount; import com.bunq.sdk.model.generated.object.AttachmentMonetaryAccountPayment; import com.bunq.sdk.model.generated.object.Geolocation; +import com.bunq.sdk.model.generated.object.LabelMonetaryAccount; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Using Payment, you can send payments to bunq and non-bunq users from your bunq @@ -216,55 +220,49 @@ public class Payment extends BunqModel { @SerializedName("allow_chat") private Boolean allowChat; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId) { return create(apiContext, requestMap, userId, monetaryAccountId, new HashMap<>()); } /** * Create a new Payment. */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, - customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer paymentId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer paymentId) { return get(apiContext, userId, monetaryAccountId, paymentId, new HashMap<>()); } /** * Get a specific previous Payment. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer paymentId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer paymentId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, paymentId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, paymentId), new HashMap<>(), customHeaders); return fromJson(Payment.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId) { return list(apiContext, userId, monetaryAccountId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params) { + return list(apiContext, userId, monetaryAccountId, params, new HashMap<>()); + } + /** * Get a listing of all Payments performed on a given MonetaryAccount (incoming and outgoing). */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), params, customHeaders); return fromJsonList(Payment.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/PaymentBatch.java b/src/main/java/com/bunq/sdk/model/generated/PaymentBatch.java index a5f68fbf..eefbbdbc 100644 --- a/src/main/java/com/bunq/sdk/model/generated/PaymentBatch.java +++ b/src/main/java/com/bunq/sdk/model/generated/PaymentBatch.java @@ -5,11 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Create a payment batch, or show the payment batches of a monetary account. @@ -42,8 +46,7 @@ public class PaymentBatch extends BunqModel { @SerializedName("payments") private List payments; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId) { return create(apiContext, requestMap, userId, monetaryAccountId, new HashMap<>()); } @@ -51,69 +54,57 @@ public static BunqResponse create(ApiContext apiContext, Map create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, - customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer paymentBatchId) { - return update(apiContext, requestMap, userId, monetaryAccountId, paymentBatchId, - new HashMap<>()); + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer paymentBatchId) { + return update(apiContext, requestMap, userId, monetaryAccountId, paymentBatchId, new HashMap<>()); } /** * Revoke a bunq.to payment batch. The status of all the payments will be set to REVOKED. */ - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer paymentBatchId, - Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer paymentBatchId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, paymentBatchId), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, paymentBatchId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer paymentBatchId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer paymentBatchId) { return get(apiContext, userId, monetaryAccountId, paymentBatchId, new HashMap<>()); } /** * Return the details of a specific payment batch. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer paymentBatchId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer paymentBatchId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, paymentBatchId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, paymentBatchId), new HashMap<>(), customHeaders); return fromJson(PaymentBatch.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId) { return list(apiContext, userId, monetaryAccountId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params) { + return list(apiContext, userId, monetaryAccountId, params, new HashMap<>()); + } + /** * Return all the payment batches for a monetary account. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), params, customHeaders); return fromJsonList(PaymentBatch.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/PaymentChat.java b/src/main/java/com/bunq/sdk/model/generated/PaymentChat.java index 4a02fc02..609ad366 100644 --- a/src/main/java/com/bunq/sdk/model/generated/PaymentChat.java +++ b/src/main/java/com/bunq/sdk/model/generated/PaymentChat.java @@ -5,11 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Manage the chat connected to a payment. @@ -61,62 +65,50 @@ public class PaymentChat extends BunqModel { @SerializedName("unread_message_count") private Integer unreadMessageCount; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer paymentId) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer paymentId) { return create(apiContext, requestMap, userId, monetaryAccountId, paymentId, new HashMap<>()); } /** * Create a chat for a specific payment. */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer paymentId, - Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer paymentId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId, paymentId), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId, paymentId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse update(ApiContext apiContext, - Map requestMap, Integer userId, Integer monetaryAccountId, Integer paymentId, - Integer paymentChatId) { - return update(apiContext, requestMap, userId, monetaryAccountId, paymentId, paymentChatId, - new HashMap<>()); + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer paymentId, Integer paymentChatId) { + return update(apiContext, requestMap, userId, monetaryAccountId, paymentId, paymentChatId, new HashMap<>()); } /** * Update the last read message in the chat of a specific payment. */ - public static BunqResponse update(ApiContext apiContext, - Map requestMap, Integer userId, Integer monetaryAccountId, Integer paymentId, - Integer paymentChatId, Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer paymentId, Integer paymentChatId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient.put( - String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, paymentId, paymentChatId), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, paymentId, paymentChatId), requestBytes, customHeaders); return fromJson(PaymentChat.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer paymentId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer paymentId) { return list(apiContext, userId, monetaryAccountId, paymentId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer paymentId, Map params) { + return list(apiContext, userId, monetaryAccountId, paymentId, params, new HashMap<>()); + } + /** * Get the chat for a specific payment. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer paymentId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer paymentId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, paymentId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, paymentId), params, customHeaders); return fromJsonList(PaymentChat.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/PermittedIp.java b/src/main/java/com/bunq/sdk/model/generated/PermittedIp.java index 044eb377..1e2ee59e 100644 --- a/src/main/java/com/bunq/sdk/model/generated/PermittedIp.java +++ b/src/main/java/com/bunq/sdk/model/generated/PermittedIp.java @@ -5,11 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Manage the IPs which may be used for a credential of a user for server authentication. @@ -50,73 +54,60 @@ public class PermittedIp extends BunqModel { @SerializedName("status") private String status; - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer credentialPasswordIpId, Integer permittedIpId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer credentialPasswordIpId, Integer permittedIpId) { return get(apiContext, userId, credentialPasswordIpId, permittedIpId, new HashMap<>()); } /** */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer credentialPasswordIpId, Integer permittedIpId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer credentialPasswordIpId, Integer permittedIpId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, credentialPasswordIpId, permittedIpId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, credentialPasswordIpId, permittedIpId), new HashMap<>(), customHeaders); return fromJson(PermittedIp.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer credentialPasswordIpId) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer credentialPasswordIpId) { return create(apiContext, requestMap, userId, credentialPasswordIpId, new HashMap<>()); } /** */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer credentialPasswordIpId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer credentialPasswordIpId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, credentialPasswordIpId), requestBytes, - customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, credentialPasswordIpId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer credentialPasswordIpId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer credentialPasswordIpId) { return list(apiContext, userId, credentialPasswordIpId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer credentialPasswordIpId, Map params) { + return list(apiContext, userId, credentialPasswordIpId, params, new HashMap<>()); + } + /** */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer credentialPasswordIpId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer credentialPasswordIpId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, credentialPasswordIpId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, credentialPasswordIpId), params, customHeaders); return fromJsonList(PermittedIp.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer credentialPasswordIpId, Integer permittedIpId) { - return update(apiContext, requestMap, userId, credentialPasswordIpId, permittedIpId, - new HashMap<>()); + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer credentialPasswordIpId, Integer permittedIpId) { + return update(apiContext, requestMap, userId, credentialPasswordIpId, permittedIpId, new HashMap<>()); } /** */ - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer credentialPasswordIpId, Integer permittedIpId, - Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer credentialPasswordIpId, Integer permittedIpId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .put(String.format(ENDPOINT_URL_UPDATE, userId, credentialPasswordIpId, permittedIpId), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, credentialPasswordIpId, permittedIpId), requestBytes, customHeaders); return processForId(responseRaw); } diff --git a/src/main/java/com/bunq/sdk/model/generated/RequestInquiry.java b/src/main/java/com/bunq/sdk/model/generated/RequestInquiry.java index d27a0d02..bdfa2da9 100644 --- a/src/main/java/com/bunq/sdk/model/generated/RequestInquiry.java +++ b/src/main/java/com/bunq/sdk/model/generated/RequestInquiry.java @@ -5,17 +5,21 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; -import com.bunq.sdk.model.MonetaryAccountReference; import com.bunq.sdk.model.generated.object.Address; import com.bunq.sdk.model.generated.object.Amount; import com.bunq.sdk.model.generated.object.BunqId; import com.bunq.sdk.model.generated.object.Geolocation; +import com.bunq.sdk.model.generated.object.LabelMonetaryAccount; import com.bunq.sdk.model.generated.object.LabelUser; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * RequestInquiry, aka 'RFP' (Request for Payment), is one of the innovative features that bunq @@ -232,78 +236,64 @@ public class RequestInquiry extends BunqModel { @SerializedName("allow_chat") private Boolean allowChat; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId) { return create(apiContext, requestMap, userId, monetaryAccountId, new HashMap<>()); } /** * Create a new payment request. */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, - customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse update(ApiContext apiContext, - Map requestMap, Integer userId, Integer monetaryAccountId, - Integer requestInquiryId) { - return update(apiContext, requestMap, userId, monetaryAccountId, requestInquiryId, - new HashMap<>()); + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer requestInquiryId) { + return update(apiContext, requestMap, userId, monetaryAccountId, requestInquiryId, new HashMap<>()); } /** * Revoke a request for payment, by updating the status to REVOKED. */ - public static BunqResponse update(ApiContext apiContext, - Map requestMap, Integer userId, Integer monetaryAccountId, - Integer requestInquiryId, Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer requestInquiryId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, requestInquiryId), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, requestInquiryId), requestBytes, customHeaders); return fromJson(RequestInquiry.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId) { return list(apiContext, userId, monetaryAccountId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params) { + return list(apiContext, userId, monetaryAccountId, params, new HashMap<>()); + } + /** * Get all payment requests for a user's monetary account. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), params, customHeaders); return fromJsonList(RequestInquiry.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer requestInquiryId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer requestInquiryId) { return get(apiContext, userId, monetaryAccountId, requestInquiryId, new HashMap<>()); } /** * Get the details of a specific payment request, including its status. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer requestInquiryId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer requestInquiryId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, requestInquiryId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, requestInquiryId), new HashMap<>(), customHeaders); return fromJson(RequestInquiry.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/RequestInquiryBatch.java b/src/main/java/com/bunq/sdk/model/generated/RequestInquiryBatch.java index ffd4c378..523bde97 100644 --- a/src/main/java/com/bunq/sdk/model/generated/RequestInquiryBatch.java +++ b/src/main/java/com/bunq/sdk/model/generated/RequestInquiryBatch.java @@ -6,11 +6,15 @@ import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; import com.bunq.sdk.model.generated.object.Amount; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Create a batch of requests for payment, or show the request batches of a monetary account. @@ -51,8 +55,7 @@ public class RequestInquiryBatch extends BunqModel { @SerializedName("total_amount_inquired") private Amount totalAmountInquired; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId) { return create(apiContext, requestMap, userId, monetaryAccountId, new HashMap<>()); } @@ -60,69 +63,57 @@ public static BunqResponse create(ApiContext apiContext, Map create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, - customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer requestInquiryBatchId) { - return update(apiContext, requestMap, userId, monetaryAccountId, requestInquiryBatchId, - new HashMap<>()); + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer requestInquiryBatchId) { + return update(apiContext, requestMap, userId, monetaryAccountId, requestInquiryBatchId, new HashMap<>()); } /** * Revoke a request batch. The status of all the requests will be set to REVOKED. */ - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer requestInquiryBatchId, - Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer requestInquiryBatchId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, requestInquiryBatchId), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, requestInquiryBatchId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer requestInquiryBatchId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer requestInquiryBatchId) { return get(apiContext, userId, monetaryAccountId, requestInquiryBatchId, new HashMap<>()); } /** * Return the details of a specific request batch. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer requestInquiryBatchId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer requestInquiryBatchId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, requestInquiryBatchId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, requestInquiryBatchId), new HashMap<>(), customHeaders); return fromJson(RequestInquiryBatch.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId) { return list(apiContext, userId, monetaryAccountId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params) { + return list(apiContext, userId, monetaryAccountId, params, new HashMap<>()); + } + /** * Return all the request batches for a monetary account. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), params, customHeaders); return fromJsonList(RequestInquiryBatch.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/RequestInquiryChat.java b/src/main/java/com/bunq/sdk/model/generated/RequestInquiryChat.java index f4320793..9a9f902a 100644 --- a/src/main/java/com/bunq/sdk/model/generated/RequestInquiryChat.java +++ b/src/main/java/com/bunq/sdk/model/generated/RequestInquiryChat.java @@ -5,11 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Manage the chat connected to a request inquiry. In the same way a request inquiry and a @@ -64,63 +68,50 @@ public class RequestInquiryChat extends BunqModel { @SerializedName("unread_message_count") private Integer unreadMessageCount; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer requestInquiryId) { - return create(apiContext, requestMap, userId, monetaryAccountId, requestInquiryId, - new HashMap<>()); + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer requestInquiryId) { + return create(apiContext, requestMap, userId, monetaryAccountId, requestInquiryId, new HashMap<>()); } /** * Create a chat for a specific request inquiry. */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer requestInquiryId, - Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer requestInquiryId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId, requestInquiryId), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId, requestInquiryId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse update(ApiContext apiContext, - Map requestMap, Integer userId, Integer monetaryAccountId, - Integer requestInquiryId, Integer requestInquiryChatId) { - return update(apiContext, requestMap, userId, monetaryAccountId, requestInquiryId, - requestInquiryChatId, new HashMap<>()); + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer requestInquiryId, Integer requestInquiryChatId) { + return update(apiContext, requestMap, userId, monetaryAccountId, requestInquiryId, requestInquiryChatId, new HashMap<>()); } /** * Update the last read message in the chat of a specific request inquiry. */ - public static BunqResponse update(ApiContext apiContext, - Map requestMap, Integer userId, Integer monetaryAccountId, - Integer requestInquiryId, Integer requestInquiryChatId, Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer requestInquiryId, Integer requestInquiryChatId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient.put(String - .format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, requestInquiryId, - requestInquiryChatId), requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, requestInquiryId, requestInquiryChatId), requestBytes, customHeaders); return fromJson(RequestInquiryChat.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer requestInquiryId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer requestInquiryId) { return list(apiContext, userId, monetaryAccountId, requestInquiryId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer requestInquiryId, Map params) { + return list(apiContext, userId, monetaryAccountId, requestInquiryId, params, new HashMap<>()); + } + /** * Get the chat for a specific request inquiry. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer requestInquiryId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer requestInquiryId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, requestInquiryId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, requestInquiryId), params, customHeaders); return fromJsonList(RequestInquiryChat.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/RequestResponse.java b/src/main/java/com/bunq/sdk/model/generated/RequestResponse.java index 7cd130c4..58366b7a 100644 --- a/src/main/java/com/bunq/sdk/model/generated/RequestResponse.java +++ b/src/main/java/com/bunq/sdk/model/generated/RequestResponse.java @@ -5,16 +5,20 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; -import com.bunq.sdk.model.MonetaryAccountReference; import com.bunq.sdk.model.generated.object.Address; import com.bunq.sdk.model.generated.object.Amount; import com.bunq.sdk.model.generated.object.Attachment; import com.bunq.sdk.model.generated.object.Geolocation; +import com.bunq.sdk.model.generated.object.LabelMonetaryAccount; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * A RequestResponse is what a user on the other side of a RequestInquiry gets when he is sent @@ -161,7 +165,7 @@ public class RequestResponse extends BunqModel { private Geolocation geolocation; /** - * The type of the RequestInquiry. Can be DIRECT_DEBIT, IDEAL or INTERNAL. + * The type of the RequestInquiry. Can be DIRECT_DEBIT, DIRECT_DEBIT_B2B, IDEAL or INTERNAL. */ @Expose @SerializedName("type") @@ -203,6 +207,20 @@ public class RequestResponse extends BunqModel { @SerializedName("allow_chat") private Boolean allowChat; + /** + * The credit scheme id provided by the counterparty for DIRECT_DEBIT inquiries. + */ + @Expose + @SerializedName("credit_scheme_identifier") + private String creditSchemeIdentifier; + + /** + * The mandate id provided by the counterparty for DIRECT_DEBIT inquiries. + */ + @Expose + @SerializedName("mandate_identifier") + private String mandateIdentifier; + /** * The whitelist id for this action or null. */ @@ -210,59 +228,49 @@ public class RequestResponse extends BunqModel { @SerializedName("eligible_whitelist_id") private Integer eligibleWhitelistId; - public static BunqResponse update(ApiContext apiContext, - Map requestMap, Integer userId, Integer monetaryAccountId, - Integer requestResponseId) { - return update(apiContext, requestMap, userId, monetaryAccountId, requestResponseId, - new HashMap<>()); + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer requestResponseId) { + return update(apiContext, requestMap, userId, monetaryAccountId, requestResponseId, new HashMap<>()); } /** * Update the status to accept or reject the RequestResponse. */ - public static BunqResponse update(ApiContext apiContext, - Map requestMap, Integer userId, Integer monetaryAccountId, - Integer requestResponseId, Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer requestResponseId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, requestResponseId), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, requestResponseId), requestBytes, customHeaders); return fromJson(RequestResponse.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId) { return list(apiContext, userId, monetaryAccountId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params) { + return list(apiContext, userId, monetaryAccountId, params, new HashMap<>()); + } + /** * Get all RequestResponses for a MonetaryAccount. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), params, customHeaders); return fromJsonList(RequestResponse.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer requestResponseId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer requestResponseId) { return get(apiContext, userId, monetaryAccountId, requestResponseId, new HashMap<>()); } /** * Get the details for a specific existing RequestResponse. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer requestResponseId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer requestResponseId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, requestResponseId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, requestResponseId), new HashMap<>(), customHeaders); return fromJson(RequestResponse.class, responseRaw, OBJECT_TYPE); } @@ -448,7 +456,7 @@ public void setGeolocation(Geolocation geolocation) { } /** - * The type of the RequestInquiry. Can be DIRECT_DEBIT, IDEAL or INTERNAL. + * The type of the RequestInquiry. Can be DIRECT_DEBIT, DIRECT_DEBIT_B2B, IDEAL or INTERNAL. */ public String getType() { return this.type; @@ -514,6 +522,28 @@ public void setAllowChat(Boolean allowChat) { this.allowChat = allowChat; } + /** + * The credit scheme id provided by the counterparty for DIRECT_DEBIT inquiries. + */ + public String getCreditSchemeIdentifier() { + return this.creditSchemeIdentifier; + } + + public void setCreditSchemeIdentifier(String creditSchemeIdentifier) { + this.creditSchemeIdentifier = creditSchemeIdentifier; + } + + /** + * The mandate id provided by the counterparty for DIRECT_DEBIT inquiries. + */ + public String getMandateIdentifier() { + return this.mandateIdentifier; + } + + public void setMandateIdentifier(String mandateIdentifier) { + this.mandateIdentifier = mandateIdentifier; + } + /** * The whitelist id for this action or null. */ diff --git a/src/main/java/com/bunq/sdk/model/generated/RequestResponseChat.java b/src/main/java/com/bunq/sdk/model/generated/RequestResponseChat.java index b2b5902e..5dba905c 100644 --- a/src/main/java/com/bunq/sdk/model/generated/RequestResponseChat.java +++ b/src/main/java/com/bunq/sdk/model/generated/RequestResponseChat.java @@ -5,11 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Manage the chat connected to a request response. In the same way a request inquiry and a @@ -64,63 +68,50 @@ public class RequestResponseChat extends BunqModel { @SerializedName("unread_message_count") private Integer unreadMessageCount; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer requestResponseId) { - return create(apiContext, requestMap, userId, monetaryAccountId, requestResponseId, - new HashMap<>()); + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer requestResponseId) { + return create(apiContext, requestMap, userId, monetaryAccountId, requestResponseId, new HashMap<>()); } /** * Create a chat for a specific request response. */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer requestResponseId, - Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer requestResponseId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId, requestResponseId), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId, requestResponseId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse update(ApiContext apiContext, - Map requestMap, Integer userId, Integer monetaryAccountId, - Integer requestResponseId, Integer requestResponseChatId) { - return update(apiContext, requestMap, userId, monetaryAccountId, requestResponseId, - requestResponseChatId, new HashMap<>()); + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer requestResponseId, Integer requestResponseChatId) { + return update(apiContext, requestMap, userId, monetaryAccountId, requestResponseId, requestResponseChatId, new HashMap<>()); } /** * Update the last read message in the chat of a specific request response. */ - public static BunqResponse update(ApiContext apiContext, - Map requestMap, Integer userId, Integer monetaryAccountId, - Integer requestResponseId, Integer requestResponseChatId, Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer requestResponseId, Integer requestResponseChatId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient.put(String - .format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, requestResponseId, - requestResponseChatId), requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, requestResponseId, requestResponseChatId), requestBytes, customHeaders); return fromJson(RequestResponseChat.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer requestResponseId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer requestResponseId) { return list(apiContext, userId, monetaryAccountId, requestResponseId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer requestResponseId, Map params) { + return list(apiContext, userId, monetaryAccountId, requestResponseId, params, new HashMap<>()); + } + /** * Get the chat for a specific request response. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer requestResponseId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer requestResponseId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, requestResponseId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, requestResponseId), params, customHeaders); return fromJsonList(RequestResponseChat.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/Schedule.java b/src/main/java/com/bunq/sdk/model/generated/Schedule.java index 6b422249..225f7ee5 100644 --- a/src/main/java/com/bunq/sdk/model/generated/Schedule.java +++ b/src/main/java/com/bunq/sdk/model/generated/Schedule.java @@ -5,9 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * view for reading the scheduled definitions. @@ -25,40 +31,37 @@ public class Schedule extends BunqModel { */ private static final String OBJECT_TYPE = "Schedule"; - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer scheduleId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer scheduleId) { return get(apiContext, userId, monetaryAccountId, scheduleId, new HashMap<>()); } /** * Get a specific schedule definition for a given monetary account. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer scheduleId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer scheduleId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, scheduleId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, scheduleId), new HashMap<>(), customHeaders); return fromJson(Schedule.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId) { return list(apiContext, userId, monetaryAccountId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params) { + return list(apiContext, userId, monetaryAccountId, params, new HashMap<>()); + } + /** * Get a collection of scheduled definition for a given monetary account. You can add the * parameter type to filter the response. When * type={SCHEDULE_DEFINITION_PAYMENT,SCHEDULE_DEFINITION_PAYMENT_BATCH} is provided only * schedule definition object that relate to these definitions are returned. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), params, customHeaders); return fromJsonList(Schedule.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/ScheduleInstance.java b/src/main/java/com/bunq/sdk/model/generated/ScheduleInstance.java index e70db9ad..8904845a 100644 --- a/src/main/java/com/bunq/sdk/model/generated/ScheduleInstance.java +++ b/src/main/java/com/bunq/sdk/model/generated/ScheduleInstance.java @@ -6,11 +6,15 @@ import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; import com.bunq.sdk.model.generated.object.Error; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * view for reading, updating and listing the scheduled instance. @@ -76,58 +80,46 @@ public class ScheduleInstance extends BunqModel { @SerializedName("result_object") private BunqModel resultObject; - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer scheduleId, Integer scheduleInstanceId) { - return get(apiContext, userId, monetaryAccountId, scheduleId, scheduleInstanceId, - new HashMap<>()); + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer scheduleId, Integer scheduleInstanceId) { + return get(apiContext, userId, monetaryAccountId, scheduleId, scheduleInstanceId, new HashMap<>()); } /** */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer scheduleId, Integer scheduleInstanceId, - Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer scheduleId, Integer scheduleInstanceId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.get( - String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, scheduleId, scheduleInstanceId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, scheduleId, scheduleInstanceId), new HashMap<>(), customHeaders); return fromJson(ScheduleInstance.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer scheduleId, Integer scheduleInstanceId) { - return update(apiContext, requestMap, userId, monetaryAccountId, scheduleId, scheduleInstanceId, - new HashMap<>()); + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer scheduleId, Integer scheduleInstanceId) { + return update(apiContext, requestMap, userId, monetaryAccountId, scheduleId, scheduleInstanceId, new HashMap<>()); } /** */ - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer scheduleId, Integer scheduleInstanceId, - Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer scheduleId, Integer scheduleInstanceId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient.put(String - .format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, scheduleId, scheduleInstanceId), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, scheduleId, scheduleInstanceId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer scheduleId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer scheduleId) { return list(apiContext, userId, monetaryAccountId, scheduleId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer scheduleId, Map params) { + return list(apiContext, userId, monetaryAccountId, scheduleId, params, new HashMap<>()); + } + /** */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer scheduleId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer scheduleId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, scheduleId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, scheduleId), params, customHeaders); return fromJsonList(ScheduleInstance.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/SchedulePayment.java b/src/main/java/com/bunq/sdk/model/generated/SchedulePayment.java index 0d5d8ddd..0593bed3 100644 --- a/src/main/java/com/bunq/sdk/model/generated/SchedulePayment.java +++ b/src/main/java/com/bunq/sdk/model/generated/SchedulePayment.java @@ -7,8 +7,11 @@ import com.bunq.sdk.model.BunqModel; import com.bunq.sdk.model.generated.object.Schedule; import com.bunq.sdk.model.generated.object.SchedulePaymentEntry; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -53,90 +56,73 @@ public class SchedulePayment extends BunqModel { @SerializedName("schedule") private Schedule schedule; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId) { return create(apiContext, requestMap, userId, monetaryAccountId, new HashMap<>()); } /** */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, - customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse delete(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer schedulePaymentId) { + public static BunqResponse delete(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer schedulePaymentId) { return delete(apiContext, userId, monetaryAccountId, schedulePaymentId, new HashMap<>()); } /** */ - public static BunqResponse delete(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer schedulePaymentId, Map customHeaders) { + public static BunqResponse delete(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer schedulePaymentId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .delete(String.format(ENDPOINT_URL_DELETE, userId, monetaryAccountId, schedulePaymentId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.delete(String.format(ENDPOINT_URL_DELETE, userId, monetaryAccountId, schedulePaymentId), customHeaders); return new BunqResponse<>(null, responseRaw.getHeaders()); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer schedulePaymentId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer schedulePaymentId) { return get(apiContext, userId, monetaryAccountId, schedulePaymentId, new HashMap<>()); } /** */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer schedulePaymentId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer schedulePaymentId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, schedulePaymentId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, schedulePaymentId), new HashMap<>(), customHeaders); return fromJson(SchedulePayment.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId) { return list(apiContext, userId, monetaryAccountId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params) { + return list(apiContext, userId, monetaryAccountId, params, new HashMap<>()); + } + /** */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), params, customHeaders); return fromJsonList(SchedulePayment.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer schedulePaymentId) { - return update(apiContext, requestMap, userId, monetaryAccountId, schedulePaymentId, - new HashMap<>()); + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer schedulePaymentId) { + return update(apiContext, requestMap, userId, monetaryAccountId, schedulePaymentId, new HashMap<>()); } /** */ - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer schedulePaymentId, - Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer schedulePaymentId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, schedulePaymentId), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, schedulePaymentId), requestBytes, customHeaders); return processForId(responseRaw); } diff --git a/src/main/java/com/bunq/sdk/model/generated/SchedulePaymentBatch.java b/src/main/java/com/bunq/sdk/model/generated/SchedulePaymentBatch.java index 8e2dcfcf..204df187 100644 --- a/src/main/java/com/bunq/sdk/model/generated/SchedulePaymentBatch.java +++ b/src/main/java/com/bunq/sdk/model/generated/SchedulePaymentBatch.java @@ -7,8 +7,11 @@ import com.bunq.sdk.model.BunqModel; import com.bunq.sdk.model.generated.object.Schedule; import com.bunq.sdk.model.generated.object.SchedulePaymentEntry; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -51,58 +54,43 @@ public class SchedulePaymentBatch extends BunqModel { @SerializedName("schedule") private Schedule schedule; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId) { return create(apiContext, requestMap, userId, monetaryAccountId, new HashMap<>()); } /** */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, - customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer schedulePaymentBatchId) { - return update(apiContext, requestMap, userId, monetaryAccountId, schedulePaymentBatchId, - new HashMap<>()); + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer schedulePaymentBatchId) { + return update(apiContext, requestMap, userId, monetaryAccountId, schedulePaymentBatchId, new HashMap<>()); } /** */ - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer schedulePaymentBatchId, - Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer schedulePaymentBatchId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, schedulePaymentBatchId), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, schedulePaymentBatchId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse delete(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer schedulePaymentBatchId) { + public static BunqResponse delete(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer schedulePaymentBatchId) { return delete(apiContext, userId, monetaryAccountId, schedulePaymentBatchId, new HashMap<>()); } /** */ - public static BunqResponse delete(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer schedulePaymentBatchId, - Map customHeaders) { + public static BunqResponse delete(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer schedulePaymentBatchId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.delete( - String.format(ENDPOINT_URL_DELETE, userId, monetaryAccountId, schedulePaymentBatchId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.delete(String.format(ENDPOINT_URL_DELETE, userId, monetaryAccountId, schedulePaymentBatchId), customHeaders); return new BunqResponse<>(null, responseRaw.getHeaders()); } diff --git a/src/main/java/com/bunq/sdk/model/generated/ScheduleUser.java b/src/main/java/com/bunq/sdk/model/generated/ScheduleUser.java index 7c336434..6bbcc9c9 100644 --- a/src/main/java/com/bunq/sdk/model/generated/ScheduleUser.java +++ b/src/main/java/com/bunq/sdk/model/generated/ScheduleUser.java @@ -5,9 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * view for reading the scheduled definitions. @@ -28,17 +34,19 @@ public static BunqResponse> list(ApiContext apiContext, Integ return list(apiContext, userId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params) { + return list(apiContext, userId, params, new HashMap<>()); + } + /** * Get a collection of scheduled definition for all accessible monetary accounts of the user. * You can add the parameter type to filter the response. When * type={SCHEDULE_DEFINITION_PAYMENT,SCHEDULE_DEFINITION_PAYMENT_BATCH} is provided only * schedule definition object that relate to these definitions are returned. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId), params, customHeaders); return fromJsonList(ScheduleUser.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/Session.java b/src/main/java/com/bunq/sdk/model/generated/Session.java index 06df47d3..9c669c59 100644 --- a/src/main/java/com/bunq/sdk/model/generated/Session.java +++ b/src/main/java/com/bunq/sdk/model/generated/Session.java @@ -5,7 +5,13 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import javax.lang.model.type.NullType; @@ -31,11 +37,9 @@ public static BunqResponse delete(ApiContext apiContext, Integer sessi /** * Deletes the current session. No response is returned for this request. */ - public static BunqResponse delete(ApiContext apiContext, Integer sessionId, - Map customHeaders) { + public static BunqResponse delete(ApiContext apiContext, Integer sessionId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .delete(String.format(ENDPOINT_URL_DELETE, sessionId), customHeaders); + BunqResponseRaw responseRaw = apiClient.delete(String.format(ENDPOINT_URL_DELETE, sessionId), customHeaders); return new BunqResponse<>(null, responseRaw.getHeaders()); } diff --git a/src/main/java/com/bunq/sdk/model/generated/ShareInviteBankAmountUsed.java b/src/main/java/com/bunq/sdk/model/generated/ShareInviteBankAmountUsed.java index 73a55813..5adee68e 100644 --- a/src/main/java/com/bunq/sdk/model/generated/ShareInviteBankAmountUsed.java +++ b/src/main/java/com/bunq/sdk/model/generated/ShareInviteBankAmountUsed.java @@ -5,7 +5,13 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import javax.lang.model.type.NullType; @@ -27,24 +33,17 @@ public class ShareInviteBankAmountUsed extends BunqModel { */ private static final String OBJECT_TYPE = "ShareInviteBankAmountUsed"; - public static BunqResponse delete(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer shareInviteBankInquiryId, - Integer shareInviteBankAmountUsedId) { - return delete(apiContext, userId, monetaryAccountId, shareInviteBankInquiryId, - shareInviteBankAmountUsedId, new HashMap<>()); + public static BunqResponse delete(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer shareInviteBankInquiryId, Integer shareInviteBankAmountUsedId) { + return delete(apiContext, userId, monetaryAccountId, shareInviteBankInquiryId, shareInviteBankAmountUsedId, new HashMap<>()); } /** * Reset the available budget for a bank account share. To be called without any ID at the end * of the path. */ - public static BunqResponse delete(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer shareInviteBankInquiryId, - Integer shareInviteBankAmountUsedId, Map customHeaders) { + public static BunqResponse delete(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer shareInviteBankInquiryId, Integer shareInviteBankAmountUsedId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.delete(String - .format(ENDPOINT_URL_DELETE, userId, monetaryAccountId, shareInviteBankInquiryId, - shareInviteBankAmountUsedId), customHeaders); + BunqResponseRaw responseRaw = apiClient.delete(String.format(ENDPOINT_URL_DELETE, userId, monetaryAccountId, shareInviteBankInquiryId, shareInviteBankAmountUsedId), customHeaders); return new BunqResponse<>(null, responseRaw.getHeaders()); } diff --git a/src/main/java/com/bunq/sdk/model/generated/ShareInviteBankInquiry.java b/src/main/java/com/bunq/sdk/model/generated/ShareInviteBankInquiry.java index 8822e34b..f20abe20 100644 --- a/src/main/java/com/bunq/sdk/model/generated/ShareInviteBankInquiry.java +++ b/src/main/java/com/bunq/sdk/model/generated/ShareInviteBankInquiry.java @@ -5,14 +5,18 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; -import com.bunq.sdk.model.MonetaryAccountReference; +import com.bunq.sdk.model.generated.object.LabelMonetaryAccount; import com.bunq.sdk.model.generated.object.LabelUser; import com.bunq.sdk.model.generated.object.ShareDetail; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Used to share a monetary account with another bunq user, as in the 'Connect' feature in the @@ -122,8 +126,7 @@ public class ShareInviteBankInquiry extends BunqModel { @SerializedName("id") private Integer id; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId) { return create(apiContext, requestMap, userId, monetaryAccountId, new HashMap<>()); } @@ -131,73 +134,59 @@ public static BunqResponse create(ApiContext apiContext, Map create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, - customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer shareInviteBankInquiryId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer shareInviteBankInquiryId) { return get(apiContext, userId, monetaryAccountId, shareInviteBankInquiryId, new HashMap<>()); } /** * Get the details of a specific share inquiry. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer shareInviteBankInquiryId, - Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer shareInviteBankInquiryId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, shareInviteBankInquiryId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, shareInviteBankInquiryId), new HashMap<>(), customHeaders); return fromJson(ShareInviteBankInquiry.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse update(ApiContext apiContext, - Map requestMap, Integer userId, Integer monetaryAccountId, - Integer shareInviteBankInquiryId) { - return update(apiContext, requestMap, userId, monetaryAccountId, shareInviteBankInquiryId, - new HashMap<>()); + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer shareInviteBankInquiryId) { + return update(apiContext, requestMap, userId, monetaryAccountId, shareInviteBankInquiryId, new HashMap<>()); } /** * Update the details of a share. This includes updating status (revoking or cancelling it), * granted permission and validity period of this share. */ - public static BunqResponse update(ApiContext apiContext, - Map requestMap, Integer userId, Integer monetaryAccountId, - Integer shareInviteBankInquiryId, Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer shareInviteBankInquiryId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient.put( - String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, shareInviteBankInquiryId), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, shareInviteBankInquiryId), requestBytes, customHeaders); return fromJson(ShareInviteBankInquiry.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, - Integer userId, Integer monetaryAccountId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId) { return list(apiContext, userId, monetaryAccountId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params) { + return list(apiContext, userId, monetaryAccountId, params, new HashMap<>()); + } + /** * Get a list with all the share inquiries for a monetary account, only if the requesting user * has permission to change the details of the various ones. */ - public static BunqResponse> list(ApiContext apiContext, - Integer userId, Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), params, customHeaders); return fromJsonList(ShareInviteBankInquiry.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/ShareInviteBankResponse.java b/src/main/java/com/bunq/sdk/model/generated/ShareInviteBankResponse.java index 74e8ff76..300595fc 100644 --- a/src/main/java/com/bunq/sdk/model/generated/ShareInviteBankResponse.java +++ b/src/main/java/com/bunq/sdk/model/generated/ShareInviteBankResponse.java @@ -5,14 +5,18 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; -import com.bunq.sdk.model.MonetaryAccountReference; +import com.bunq.sdk.model.generated.object.LabelMonetaryAccount; import com.bunq.sdk.model.generated.object.LabelUser; import com.bunq.sdk.model.generated.object.ShareDetail; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Used to view or respond to shares a user was invited to. See 'share-invite-bank-inquiry' for @@ -105,56 +109,49 @@ public class ShareInviteBankResponse extends BunqModel { @SerializedName("description") private String description; - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer shareInviteBankResponseId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer shareInviteBankResponseId) { return get(apiContext, userId, shareInviteBankResponseId, new HashMap<>()); } /** * Return the details of a specific share a user was invited to. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer shareInviteBankResponseId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer shareInviteBankResponseId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, shareInviteBankResponseId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, shareInviteBankResponseId), new HashMap<>(), customHeaders); return fromJson(ShareInviteBankResponse.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse update(ApiContext apiContext, - Map requestMap, Integer userId, Integer shareInviteBankResponseId) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer shareInviteBankResponseId) { return update(apiContext, requestMap, userId, shareInviteBankResponseId, new HashMap<>()); } /** * Accept or reject a share a user was invited to. */ - public static BunqResponse update(ApiContext apiContext, - Map requestMap, Integer userId, Integer shareInviteBankResponseId, - Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer shareInviteBankResponseId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .put(String.format(ENDPOINT_URL_UPDATE, userId, shareInviteBankResponseId), requestBytes, - customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, shareInviteBankResponseId), requestBytes, customHeaders); return fromJson(ShareInviteBankResponse.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, - Integer userId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId) { return list(apiContext, userId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params) { + return list(apiContext, userId, params, new HashMap<>()); + } + /** * Return all the shares a user was invited to. */ - public static BunqResponse> list(ApiContext apiContext, - Integer userId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId), params, customHeaders); return fromJsonList(ShareInviteBankResponse.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/Tab.java b/src/main/java/com/bunq/sdk/model/generated/Tab.java index 48f8a5be..93991bd4 100644 --- a/src/main/java/com/bunq/sdk/model/generated/Tab.java +++ b/src/main/java/com/bunq/sdk/model/generated/Tab.java @@ -5,11 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Once your CashRegister has been activated you can use it to create Tabs. A Tab is a template @@ -43,39 +47,34 @@ public class Tab extends BunqModel { @SerializedName("TabUsageMultiple") private TabUsageMultiple tabUsageMultiple; - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUuid) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid) { return get(apiContext, userId, monetaryAccountId, cashRegisterId, tabUuid, new HashMap<>()); } /** * Get a specific tab. This returns a TabUsageSingle or TabUsageMultiple. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, - Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, cashRegisterId, tabUuid), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, cashRegisterId, tabUuid), new HashMap<>(), customHeaders); return fromJson(Tab.class, responseRaw); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId) { return list(apiContext, userId, monetaryAccountId, cashRegisterId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Map params) { + return list(apiContext, userId, monetaryAccountId, cashRegisterId, params, new HashMap<>()); + } + /** * Get a collection of tabs. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, cashRegisterId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, cashRegisterId), params, customHeaders); return fromJsonList(Tab.class, responseRaw); } diff --git a/src/main/java/com/bunq/sdk/model/generated/TabAttachmentTab.java b/src/main/java/com/bunq/sdk/model/generated/TabAttachmentTab.java index 553f2969..15537e86 100644 --- a/src/main/java/com/bunq/sdk/model/generated/TabAttachmentTab.java +++ b/src/main/java/com/bunq/sdk/model/generated/TabAttachmentTab.java @@ -6,10 +6,15 @@ import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; import com.bunq.sdk.model.generated.object.Attachment; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * This call is used to view an attachment that is linked to a tab. @@ -54,8 +59,7 @@ public class TabAttachmentTab extends BunqModel { @SerializedName("attachment") private Attachment attachment; - public static BunqResponse get(ApiContext apiContext, String tabUuid, - Integer tabAttachmentTabId) { + public static BunqResponse get(ApiContext apiContext, String tabUuid, Integer tabAttachmentTabId) { return get(apiContext, tabUuid, tabAttachmentTabId, new HashMap<>()); } @@ -63,11 +67,9 @@ public static BunqResponse get(ApiContext apiContext, String t * Get a specific attachment. The header of the response contains the content-type of the * attachment. */ - public static BunqResponse get(ApiContext apiContext, String tabUuid, - Integer tabAttachmentTabId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, String tabUuid, Integer tabAttachmentTabId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, tabUuid, tabAttachmentTabId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, tabUuid, tabAttachmentTabId), new HashMap<>(), customHeaders); return fromJson(TabAttachmentTab.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/TabAttachmentTabContent.java b/src/main/java/com/bunq/sdk/model/generated/TabAttachmentTabContent.java index edc1f750..afd5ae2a 100644 --- a/src/main/java/com/bunq/sdk/model/generated/TabAttachmentTabContent.java +++ b/src/main/java/com/bunq/sdk/model/generated/TabAttachmentTabContent.java @@ -5,8 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Fetch the raw content of a tab attachment with given ID. The raw content is the binary @@ -24,19 +31,16 @@ public class TabAttachmentTabContent extends BunqModel { */ private static final String OBJECT_TYPE = "TabAttachmentTabContent"; - public static BunqResponse list(ApiContext apiContext, String tabUuid, - Integer attachmentId) { + public static BunqResponse list(ApiContext apiContext, String tabUuid, Integer attachmentId) { return list(apiContext, tabUuid, attachmentId, new HashMap<>()); } /** * Get the raw content of a specific attachment. */ - public static BunqResponse list(ApiContext apiContext, String tabUuid, - Integer attachmentId, Map customHeaders) { + public static BunqResponse list(ApiContext apiContext, String tabUuid, Integer attachmentId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, tabUuid, attachmentId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, tabUuid, attachmentId), new HashMap<>(), customHeaders); return new BunqResponse<>(responseRaw.getBodyBytes(), responseRaw.getHeaders()); } diff --git a/src/main/java/com/bunq/sdk/model/generated/TabItem.java b/src/main/java/com/bunq/sdk/model/generated/TabItem.java index 135f3124..5fcd7651 100644 --- a/src/main/java/com/bunq/sdk/model/generated/TabItem.java +++ b/src/main/java/com/bunq/sdk/model/generated/TabItem.java @@ -4,9 +4,14 @@ import com.bunq.sdk.model.generated.object.Amount; import com.bunq.sdk.model.generated.object.AttachmentPublic; import com.bunq.sdk.model.generated.object.AttachmentTab; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * Used to get items on a tab. diff --git a/src/main/java/com/bunq/sdk/model/generated/TabItemShop.java b/src/main/java/com/bunq/sdk/model/generated/TabItemShop.java index 08a5cf45..ffaaa229 100644 --- a/src/main/java/com/bunq/sdk/model/generated/TabItemShop.java +++ b/src/main/java/com/bunq/sdk/model/generated/TabItemShop.java @@ -8,9 +8,11 @@ import com.bunq.sdk.model.generated.object.Amount; import com.bunq.sdk.model.generated.object.AttachmentPublic; import com.bunq.sdk.model.generated.object.AttachmentTab; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -99,104 +101,78 @@ public class TabItemShop extends BunqModel { @SerializedName("amount") private Amount amount; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid) { - return create(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, tabUuid, - new HashMap<>()); + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid) { + return create(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, tabUuid, new HashMap<>()); } /** * Create a new TabItem for a given Tab. */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, - Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient.post( - String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId, cashRegisterId, tabUuid), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId, cashRegisterId, tabUuid), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, - Integer tabItemShopId) { - return update(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, tabUuid, - tabItemShopId, new HashMap<>()); + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Integer tabItemShopId) { + return update(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, tabUuid, tabItemShopId, new HashMap<>()); } /** * Modify a TabItem from a given Tab. */ - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, - Integer tabItemShopId, Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Integer tabItemShopId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient.put(String - .format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, cashRegisterId, tabUuid, - tabItemShopId), requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, cashRegisterId, tabUuid, tabItemShopId), requestBytes, customHeaders); return processForId(responseRaw); } - public static BunqResponse delete(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Integer tabItemShopId) { - return delete(apiContext, userId, monetaryAccountId, cashRegisterId, tabUuid, tabItemShopId, - new HashMap<>()); + public static BunqResponse delete(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Integer tabItemShopId) { + return delete(apiContext, userId, monetaryAccountId, cashRegisterId, tabUuid, tabItemShopId, new HashMap<>()); } /** * Delete a specific TabItem from a Tab. This request returns an empty response. */ - public static BunqResponse delete(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Integer tabItemShopId, - Map customHeaders) { + public static BunqResponse delete(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Integer tabItemShopId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.delete(String - .format(ENDPOINT_URL_DELETE, userId, monetaryAccountId, cashRegisterId, tabUuid, - tabItemShopId), customHeaders); + BunqResponseRaw responseRaw = apiClient.delete(String.format(ENDPOINT_URL_DELETE, userId, monetaryAccountId, cashRegisterId, tabUuid, tabItemShopId), customHeaders); return new BunqResponse<>(null, responseRaw.getHeaders()); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUuid) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid) { return list(apiContext, userId, monetaryAccountId, cashRegisterId, tabUuid, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Map params) { + return list(apiContext, userId, monetaryAccountId, cashRegisterId, tabUuid, params, new HashMap<>()); + } + /** * Get a collection of TabItems from a given Tab. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, - Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.get( - String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, cashRegisterId, tabUuid), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, cashRegisterId, tabUuid), params, customHeaders); return fromJsonList(TabItemShop.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Integer tabItemShopId) { - return get(apiContext, userId, monetaryAccountId, cashRegisterId, tabUuid, tabItemShopId, - new HashMap<>()); + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Integer tabItemShopId) { + return get(apiContext, userId, monetaryAccountId, cashRegisterId, tabUuid, tabItemShopId, new HashMap<>()); } /** * Get a specific TabItem from a given Tab. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Integer tabItemShopId, - Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Integer tabItemShopId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.get(String - .format(ENDPOINT_URL_READ, userId, monetaryAccountId, cashRegisterId, tabUuid, - tabItemShopId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, cashRegisterId, tabUuid, tabItemShopId), new HashMap<>(), customHeaders); return fromJson(TabItemShop.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/TabItemShopBatch.java b/src/main/java/com/bunq/sdk/model/generated/TabItemShopBatch.java index 5fcd77a3..c2d1aa33 100644 --- a/src/main/java/com/bunq/sdk/model/generated/TabItemShopBatch.java +++ b/src/main/java/com/bunq/sdk/model/generated/TabItemShopBatch.java @@ -5,11 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Create a batch of tab items. @@ -38,23 +42,17 @@ public class TabItemShopBatch extends BunqModel { @SerializedName("tab_items") private List tabItems; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid) { - return create(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, tabUuid, - new HashMap<>()); + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid) { + return create(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, tabUuid, new HashMap<>()); } /** * Create tab items as a batch. */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, - Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient.post( - String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId, cashRegisterId, tabUuid), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId, cashRegisterId, tabUuid), requestBytes, customHeaders); return processForId(responseRaw); } diff --git a/src/main/java/com/bunq/sdk/model/generated/TabQrCodeContent.java b/src/main/java/com/bunq/sdk/model/generated/TabQrCodeContent.java index 1a4779bd..bffc3e12 100644 --- a/src/main/java/com/bunq/sdk/model/generated/TabQrCodeContent.java +++ b/src/main/java/com/bunq/sdk/model/generated/TabQrCodeContent.java @@ -5,8 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * This call returns the raw content of the QR code that links to this Tab. When a bunq user @@ -24,8 +31,7 @@ public class TabQrCodeContent extends BunqModel { */ private static final String OBJECT_TYPE = "TabQrCodeContent"; - public static BunqResponse list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUuid) { + public static BunqResponse list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid) { return list(apiContext, userId, monetaryAccountId, cashRegisterId, tabUuid, new HashMap<>()); } @@ -33,13 +39,9 @@ public static BunqResponse list(ApiContext apiContext, Integer userId, * Returns the raw content of the QR code that links to this Tab. The raw content is the binary * representation of a file, without any JSON wrapping. */ - public static BunqResponse list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, - Map customHeaders) { + public static BunqResponse list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.get( - String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, cashRegisterId, tabUuid), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, cashRegisterId, tabUuid), new HashMap<>(), customHeaders); return new BunqResponse<>(responseRaw.getBodyBytes(), responseRaw.getHeaders()); } diff --git a/src/main/java/com/bunq/sdk/model/generated/TabResultInquiry.java b/src/main/java/com/bunq/sdk/model/generated/TabResultInquiry.java index 92746b4f..f54501ed 100644 --- a/src/main/java/com/bunq/sdk/model/generated/TabResultInquiry.java +++ b/src/main/java/com/bunq/sdk/model/generated/TabResultInquiry.java @@ -5,11 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Used to view TabResultInquiry objects belonging to a tab. A TabResultInquiry is an object @@ -42,42 +46,34 @@ public class TabResultInquiry extends BunqModel { @SerializedName("payment") private Payment payment; - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, - Integer tabResultInquiryId) { - return get(apiContext, userId, monetaryAccountId, cashRegisterId, tabUuid, tabResultInquiryId, - new HashMap<>()); + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Integer tabResultInquiryId) { + return get(apiContext, userId, monetaryAccountId, cashRegisterId, tabUuid, tabResultInquiryId, new HashMap<>()); } /** * Used to view a single TabResultInquiry belonging to a tab. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Integer tabResultInquiryId, - Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Integer tabResultInquiryId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.get(String - .format(ENDPOINT_URL_READ, userId, monetaryAccountId, cashRegisterId, tabUuid, - tabResultInquiryId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, cashRegisterId, tabUuid, tabResultInquiryId), new HashMap<>(), customHeaders); return fromJson(TabResultInquiry.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUuid) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid) { return list(apiContext, userId, monetaryAccountId, cashRegisterId, tabUuid, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Map params) { + return list(apiContext, userId, monetaryAccountId, cashRegisterId, tabUuid, params, new HashMap<>()); + } + /** * Used to view a list of TabResultInquiry objects belonging to a tab. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, - Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUuid, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.get( - String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, cashRegisterId, tabUuid), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, cashRegisterId, tabUuid), params, customHeaders); return fromJsonList(TabResultInquiry.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/TabResultResponse.java b/src/main/java/com/bunq/sdk/model/generated/TabResultResponse.java index 8c60a7b8..d50a962c 100644 --- a/src/main/java/com/bunq/sdk/model/generated/TabResultResponse.java +++ b/src/main/java/com/bunq/sdk/model/generated/TabResultResponse.java @@ -5,11 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Used to view TabResultResponse objects belonging to a tab. A TabResultResponse is an object @@ -42,37 +46,34 @@ public class TabResultResponse extends BunqModel { @SerializedName("payment") private Payment payment; - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer tabResultResponseId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer tabResultResponseId) { return get(apiContext, userId, monetaryAccountId, tabResultResponseId, new HashMap<>()); } /** * Used to view a single TabResultResponse belonging to a tab. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer tabResultResponseId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer tabResultResponseId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, tabResultResponseId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, tabResultResponseId), new HashMap<>(), customHeaders); return fromJson(TabResultResponse.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId) { return list(apiContext, userId, monetaryAccountId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params) { + return list(apiContext, userId, monetaryAccountId, params, new HashMap<>()); + } + /** * Used to view a list of TabResultResponse objects belonging to a tab. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId), params, customHeaders); return fromJsonList(TabResultResponse.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/TabUsageMultiple.java b/src/main/java/com/bunq/sdk/model/generated/TabUsageMultiple.java index caaa7f5c..ac58a288 100644 --- a/src/main/java/com/bunq/sdk/model/generated/TabUsageMultiple.java +++ b/src/main/java/com/bunq/sdk/model/generated/TabUsageMultiple.java @@ -5,13 +5,16 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; -import com.bunq.sdk.model.MonetaryAccountReference; import com.bunq.sdk.model.generated.object.Amount; import com.bunq.sdk.model.generated.object.BunqId; import com.bunq.sdk.model.generated.object.Geolocation; +import com.bunq.sdk.model.generated.object.LabelMonetaryAccount; import com.bunq.sdk.model.generated.object.TabVisibility; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -180,32 +183,23 @@ public class TabUsageMultiple extends BunqModel { @SerializedName("tab_attachment") private List tabAttachment; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId) { - return create(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, - new HashMap<>()); + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId) { + return create(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, new HashMap<>()); } /** * Create a TabUsageMultiple. On creation the status must be set to OPEN */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId, - Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId, cashRegisterId), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId, cashRegisterId), requestBytes, customHeaders); return processForUuid(responseRaw); } - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId, - String tabUsageMultipleUuid) { - return update(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, - tabUsageMultipleUuid, new HashMap<>()); + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUsageMultipleUuid) { + return update(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, tabUsageMultipleUuid, new HashMap<>()); } /** @@ -214,72 +208,56 @@ public static BunqResponse update(ApiContext apiContext, Map update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId, - String tabUsageMultipleUuid, Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUsageMultipleUuid, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient.put(String - .format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, cashRegisterId, - tabUsageMultipleUuid), requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, cashRegisterId, tabUsageMultipleUuid), requestBytes, customHeaders); return processForUuid(responseRaw); } - public static BunqResponse delete(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUsageMultipleUuid) { - return delete(apiContext, userId, monetaryAccountId, cashRegisterId, tabUsageMultipleUuid, - new HashMap<>()); + public static BunqResponse delete(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUsageMultipleUuid) { + return delete(apiContext, userId, monetaryAccountId, cashRegisterId, tabUsageMultipleUuid, new HashMap<>()); } /** * Close a specific TabUsageMultiple. This request returns an empty response. */ - public static BunqResponse delete(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUsageMultipleUuid, - Map customHeaders) { + public static BunqResponse delete(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUsageMultipleUuid, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.delete(String - .format(ENDPOINT_URL_DELETE, userId, monetaryAccountId, cashRegisterId, - tabUsageMultipleUuid), customHeaders); + BunqResponseRaw responseRaw = apiClient.delete(String.format(ENDPOINT_URL_DELETE, userId, monetaryAccountId, cashRegisterId, tabUsageMultipleUuid), customHeaders); return new BunqResponse<>(null, responseRaw.getHeaders()); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUsageMultipleUuid) { - return get(apiContext, userId, monetaryAccountId, cashRegisterId, tabUsageMultipleUuid, - new HashMap<>()); + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUsageMultipleUuid) { + return get(apiContext, userId, monetaryAccountId, cashRegisterId, tabUsageMultipleUuid, new HashMap<>()); } /** * Get a specific TabUsageMultiple. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUsageMultipleUuid, - Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUsageMultipleUuid, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.get(String - .format(ENDPOINT_URL_READ, userId, monetaryAccountId, cashRegisterId, tabUsageMultipleUuid), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, cashRegisterId, tabUsageMultipleUuid), new HashMap<>(), customHeaders); return fromJson(TabUsageMultiple.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId) { return list(apiContext, userId, monetaryAccountId, cashRegisterId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Map params) { + return list(apiContext, userId, monetaryAccountId, cashRegisterId, params, new HashMap<>()); + } + /** * Get a collection of TabUsageMultiple. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, cashRegisterId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, cashRegisterId), params, customHeaders); return fromJsonList(TabUsageMultiple.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/TabUsageSingle.java b/src/main/java/com/bunq/sdk/model/generated/TabUsageSingle.java index ac3c0309..5add3197 100644 --- a/src/main/java/com/bunq/sdk/model/generated/TabUsageSingle.java +++ b/src/main/java/com/bunq/sdk/model/generated/TabUsageSingle.java @@ -5,13 +5,16 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; -import com.bunq.sdk.model.MonetaryAccountReference; import com.bunq.sdk.model.generated.object.Amount; import com.bunq.sdk.model.generated.object.BunqId; import com.bunq.sdk.model.generated.object.Geolocation; +import com.bunq.sdk.model.generated.object.LabelMonetaryAccount; import com.bunq.sdk.model.generated.object.TabVisibility; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -195,32 +198,23 @@ public class TabUsageSingle extends BunqModel { @SerializedName("tab_attachment") private List tabAttachment; - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId) { - return create(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, - new HashMap<>()); + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId) { + return create(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, new HashMap<>()); } /** * Create a TabUsageSingle. The initial status must be OPEN */ - public static BunqResponse create(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId, - Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId, cashRegisterId), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId, cashRegisterId), requestBytes, customHeaders); return processForUuid(responseRaw); } - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId, - String tabUsageSingleUuid) { - return update(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, - tabUsageSingleUuid, new HashMap<>()); + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUsageSingleUuid) { + return update(apiContext, requestMap, userId, monetaryAccountId, cashRegisterId, tabUsageSingleUuid, new HashMap<>()); } /** @@ -228,72 +222,56 @@ public static BunqResponse update(ApiContext apiContext, Map update(ApiContext apiContext, Map requestMap, - Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUsageSingleUuid, - Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUsageSingleUuid, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient.put(String - .format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, cashRegisterId, tabUsageSingleUuid), - requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userId, monetaryAccountId, cashRegisterId, tabUsageSingleUuid), requestBytes, customHeaders); return processForUuid(responseRaw); } - public static BunqResponse delete(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUsageSingleUuid) { - return delete(apiContext, userId, monetaryAccountId, cashRegisterId, tabUsageSingleUuid, - new HashMap<>()); + public static BunqResponse delete(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUsageSingleUuid) { + return delete(apiContext, userId, monetaryAccountId, cashRegisterId, tabUsageSingleUuid, new HashMap<>()); } /** * Cancel a specific TabUsageSingle. This request returns an empty response. */ - public static BunqResponse delete(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUsageSingleUuid, - Map customHeaders) { + public static BunqResponse delete(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUsageSingleUuid, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.delete(String - .format(ENDPOINT_URL_DELETE, userId, monetaryAccountId, cashRegisterId, tabUsageSingleUuid), - customHeaders); + BunqResponseRaw responseRaw = apiClient.delete(String.format(ENDPOINT_URL_DELETE, userId, monetaryAccountId, cashRegisterId, tabUsageSingleUuid), customHeaders); return new BunqResponse<>(null, responseRaw.getHeaders()); } - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUsageSingleUuid) { - return get(apiContext, userId, monetaryAccountId, cashRegisterId, tabUsageSingleUuid, - new HashMap<>()); + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUsageSingleUuid) { + return get(apiContext, userId, monetaryAccountId, cashRegisterId, tabUsageSingleUuid, new HashMap<>()); } /** * Get a specific TabUsageSingle. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, String tabUsageSingleUuid, - Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, String tabUsageSingleUuid, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.get(String - .format(ENDPOINT_URL_READ, userId, monetaryAccountId, cashRegisterId, tabUsageSingleUuid), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, monetaryAccountId, cashRegisterId, tabUsageSingleUuid), new HashMap<>(), customHeaders); return fromJson(TabUsageSingle.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId) { return list(apiContext, userId, monetaryAccountId, cashRegisterId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Map params) { + return list(apiContext, userId, monetaryAccountId, cashRegisterId, params, new HashMap<>()); + } + /** * Get a collection of TabUsageSingle. */ - public static BunqResponse> list(ApiContext apiContext, Integer userId, - Integer monetaryAccountId, Integer cashRegisterId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Integer monetaryAccountId, Integer cashRegisterId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, cashRegisterId), - customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, monetaryAccountId, cashRegisterId), params, customHeaders); return fromJsonList(TabUsageSingle.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/TokenQrRequestIdeal.java b/src/main/java/com/bunq/sdk/model/generated/TokenQrRequestIdeal.java index 09ce8999..9026b4c8 100644 --- a/src/main/java/com/bunq/sdk/model/generated/TokenQrRequestIdeal.java +++ b/src/main/java/com/bunq/sdk/model/generated/TokenQrRequestIdeal.java @@ -5,23 +5,28 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; -import com.bunq.sdk.model.MonetaryAccountReference; import com.bunq.sdk.model.generated.object.Address; import com.bunq.sdk.model.generated.object.Amount; import com.bunq.sdk.model.generated.object.Attachment; import com.bunq.sdk.model.generated.object.Geolocation; +import com.bunq.sdk.model.generated.object.LabelMonetaryAccount; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** - * Using this call you create a request for payment from an external token provided with an ideal - * transaction. Make sure your iDEAL payments are compliant with the iDEAL standards, by following - * the following manual: https://www.bunq.com/files/media/legal/en/20170315_ideal_standards_en.pdf. - * It's very important to keep these points in mind when you are using the endpoint to make iDEAL - * payments from your application. + * Using this call you create a request for payment from an external token provided with an + * ideal transaction. Make sure your iDEAL payments are compliant with the iDEAL standards, by + * following the following manual: https://www.bunq.com/files/media/legal/en/20170315_ideal_standards_en.pdf. + * It's very important to keep these points in mind when you are using the endpoint to make + * iDEAL payments from your application. */ public class TokenQrRequestIdeal extends BunqModel { @@ -183,20 +188,17 @@ public class TokenQrRequestIdeal extends BunqModel { @SerializedName("eligible_whitelist_id") private Integer eligibleWhitelistId; - public static BunqResponse create(ApiContext apiContext, - Map requestMap, Integer userId) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId) { return create(apiContext, requestMap, userId, new HashMap<>()); } /** * Create a request from an ideal transaction. */ - public static BunqResponse create(ApiContext apiContext, - Map requestMap, Integer userId, Map customHeaders) { + public static BunqResponse create(ApiContext apiContext, Map requestMap, Integer userId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .post(String.format(ENDPOINT_URL_CREATE, userId), requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId), requestBytes, customHeaders); return fromJson(TokenQrRequestIdeal.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/User.java b/src/main/java/com/bunq/sdk/model/generated/User.java index 0ca8878f..32ff3731 100644 --- a/src/main/java/com/bunq/sdk/model/generated/User.java +++ b/src/main/java/com/bunq/sdk/model/generated/User.java @@ -5,11 +5,15 @@ import com.bunq.sdk.http.BunqResponse; import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Using this call you can retrieve information of the user you are logged in as. This includes @@ -53,11 +57,9 @@ public static BunqResponse get(ApiContext apiContext, Integer userId) { /** * Get a specific user. */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId), new HashMap<>(), customHeaders); return fromJson(User.class, responseRaw); } @@ -66,13 +68,16 @@ public static BunqResponse> list(ApiContext apiContext) { return list(apiContext, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Map params) { + return list(apiContext, params, new HashMap<>()); + } + /** * Get a collection of all available users. */ - public static BunqResponse> list(ApiContext apiContext, - Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient.get(ENDPOINT_URL_LISTING, customHeaders); + BunqResponseRaw responseRaw = apiClient.get(ENDPOINT_URL_LISTING, params, customHeaders); return fromJsonList(User.class, responseRaw); } diff --git a/src/main/java/com/bunq/sdk/model/generated/UserCompany.java b/src/main/java/com/bunq/sdk/model/generated/UserCompany.java index 920ed4fe..7a8bb9c6 100644 --- a/src/main/java/com/bunq/sdk/model/generated/UserCompany.java +++ b/src/main/java/com/bunq/sdk/model/generated/UserCompany.java @@ -12,11 +12,15 @@ import com.bunq.sdk.model.generated.object.NotificationFilter; import com.bunq.sdk.model.generated.object.Pointer; import com.bunq.sdk.model.generated.object.Ubo; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Show the authenticated user, if it is a company. @@ -29,7 +33,6 @@ public class UserCompany extends BunqModel { public static final String FIELD_NAME = "name"; public static final String FIELD_PUBLIC_NICK_NAME = "public_nick_name"; public static final String FIELD_AVATAR_UUID = "avatar_uuid"; - public static final String FIELD_ADDRESS = "address"; public static final String FIELD_ADDRESS_MAIN = "address_main"; public static final String FIELD_ADDRESS_POSTAL = "address_postal"; public static final String FIELD_LANGUAGE = "language"; @@ -182,6 +185,13 @@ public class UserCompany extends BunqModel { @SerializedName("language") private String language; + /** + * The country as an ISO 3166-1 alpha-2 country code.. + */ + @Expose + @SerializedName("country") + private String country; + /** * 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. @@ -234,6 +244,27 @@ public class UserCompany extends BunqModel { @SerializedName("notification_filters") private List notificationFilters; + /** + * The customer profile of the company. + */ + @Expose + @SerializedName("customer") + private Customer customer; + + /** + * The customer limits of the company. + */ + @Expose + @SerializedName("customer_limit") + private CustomerLimit customerLimit; + + /** + * The subscription of the company. + */ + @Expose + @SerializedName("billing_contract") + private List billingContract; + public static BunqResponse get(ApiContext apiContext, Integer userCompanyId) { return get(apiContext, userCompanyId, new HashMap<>()); } @@ -241,29 +272,24 @@ public static BunqResponse get(ApiContext apiContext, Integer userC /** * Get a specific company. */ - public static BunqResponse get(ApiContext apiContext, Integer userCompanyId, - Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userCompanyId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userCompanyId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userCompanyId), new HashMap<>(), customHeaders); return fromJson(UserCompany.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userCompanyId) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userCompanyId) { return update(apiContext, requestMap, userCompanyId, new HashMap<>()); } /** * Modify a specific company's data. */ - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userCompanyId, Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userCompanyId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .put(String.format(ENDPOINT_URL_UPDATE, userCompanyId), requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userCompanyId), requestBytes, customHeaders); return processForId(responseRaw); } @@ -467,6 +493,17 @@ public void setLanguage(String language) { this.language = language; } + /** + * The country as an ISO 3166-1 alpha-2 country code.. + */ + public String getCountry() { + return this.country; + } + + public void setCountry(String country) { + this.country = country; + } + /** * 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. @@ -547,4 +584,37 @@ public void setNotificationFilters(List notificationFilters) this.notificationFilters = notificationFilters; } + /** + * The customer profile of the company. + */ + public Customer getCustomer() { + return this.customer; + } + + public void setCustomer(Customer customer) { + this.customer = customer; + } + + /** + * The customer limits of the company. + */ + public CustomerLimit getCustomerLimit() { + return this.customerLimit; + } + + public void setCustomerLimit(CustomerLimit customerLimit) { + this.customerLimit = customerLimit; + } + + /** + * The subscription of the company. + */ + public List getBillingContract() { + return this.billingContract; + } + + public void setBillingContract(List billingContract) { + this.billingContract = billingContract; + } + } diff --git a/src/main/java/com/bunq/sdk/model/generated/UserCredentialPasswordIp.java b/src/main/java/com/bunq/sdk/model/generated/UserCredentialPasswordIp.java index 07eca68b..8dbdf54d 100644 --- a/src/main/java/com/bunq/sdk/model/generated/UserCredentialPasswordIp.java +++ b/src/main/java/com/bunq/sdk/model/generated/UserCredentialPasswordIp.java @@ -6,11 +6,16 @@ import com.bunq.sdk.http.BunqResponseRaw; import com.bunq.sdk.model.BunqModel; import com.bunq.sdk.model.generated.object.PermittedDevice; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.bunq.sdk.security.SecurityUtils; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Create a credential of a user for server authentication, or delete the credential of a user @@ -78,34 +83,32 @@ public class UserCredentialPasswordIp extends BunqModel { @SerializedName("permitted_device") private PermittedDevice permittedDevice; - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer userCredentialPasswordIpId) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer userCredentialPasswordIpId) { return get(apiContext, userId, userCredentialPasswordIpId, new HashMap<>()); } /** */ - public static BunqResponse get(ApiContext apiContext, Integer userId, - Integer userCredentialPasswordIpId, Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userId, Integer userCredentialPasswordIpId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userId, userCredentialPasswordIpId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userId, userCredentialPasswordIpId), new HashMap<>(), customHeaders); return fromJson(UserCredentialPasswordIp.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse> list(ApiContext apiContext, - Integer userId) { + public static BunqResponse> list(ApiContext apiContext, Integer userId) { return list(apiContext, userId, new HashMap<>()); } + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params) { + return list(apiContext, userId, params, new HashMap<>()); + } + /** */ - public static BunqResponse> list(ApiContext apiContext, - Integer userId, Map customHeaders) { + public static BunqResponse> list(ApiContext apiContext, Integer userId, Map params, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_LISTING, userId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId), params, customHeaders); return fromJsonList(UserCredentialPasswordIp.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/UserLight.java b/src/main/java/com/bunq/sdk/model/generated/UserLight.java index f2d22404..2b495bbb 100644 --- a/src/main/java/com/bunq/sdk/model/generated/UserLight.java +++ b/src/main/java/com/bunq/sdk/model/generated/UserLight.java @@ -11,11 +11,15 @@ import com.bunq.sdk.model.generated.object.NotificationFilter; import com.bunq.sdk.model.generated.object.Pointer; import com.bunq.sdk.model.generated.object.TaxResident; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Show the authenticated user, if it is a light user. @@ -30,7 +34,6 @@ public class UserLight extends BunqModel { public static final String FIELD_LAST_NAME = "last_name"; public static final String FIELD_PUBLIC_NICK_NAME = "public_nick_name"; public static final String FIELD_COUNTER_BANK_IBAN = "counter_bank_iban"; - public static final String FIELD_ADDRESS = "address"; public static final String FIELD_ADDRESS_MAIN = "address_main"; public static final String FIELD_ADDRESS_POSTAL = "address_postal"; public static final String FIELD_AVATAR_UUID = "avatar_uuid"; @@ -300,11 +303,9 @@ public static BunqResponse get(ApiContext apiContext, Integer userLig /** * Get a specific bunq light user. */ - public static BunqResponse get(ApiContext apiContext, Integer userLightId, - Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userLightId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userLightId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userLightId), new HashMap<>(), customHeaders); return fromJson(UserLight.class, responseRaw, OBJECT_TYPE); } diff --git a/src/main/java/com/bunq/sdk/model/generated/UserPerson.java b/src/main/java/com/bunq/sdk/model/generated/UserPerson.java index b03219b7..447ce9d9 100644 --- a/src/main/java/com/bunq/sdk/model/generated/UserPerson.java +++ b/src/main/java/com/bunq/sdk/model/generated/UserPerson.java @@ -11,11 +11,15 @@ import com.bunq.sdk.model.generated.object.NotificationFilter; import com.bunq.sdk.model.generated.object.Pointer; import com.bunq.sdk.model.generated.object.TaxResident; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.lang.model.type.NullType; /** * Show the authenticated user, if it is a person. @@ -29,7 +33,6 @@ public class UserPerson extends BunqModel { public static final String FIELD_MIDDLE_NAME = "middle_name"; public static final String FIELD_LAST_NAME = "last_name"; public static final String FIELD_PUBLIC_NICK_NAME = "public_nick_name"; - public static final String FIELD_ADDRESS = "address"; public static final String FIELD_ADDRESS_MAIN = "address_main"; public static final String FIELD_ADDRESS_POSTAL = "address_postal"; public static final String FIELD_AVATAR_UUID = "avatar_uuid"; @@ -294,29 +297,24 @@ public static BunqResponse get(ApiContext apiContext, Integer userPe /** * Get a specific person. */ - public static BunqResponse get(ApiContext apiContext, Integer userPersonId, - Map customHeaders) { + public static BunqResponse get(ApiContext apiContext, Integer userPersonId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); - BunqResponseRaw responseRaw = apiClient - .get(String.format(ENDPOINT_URL_READ, userPersonId), customHeaders); + BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, userPersonId), new HashMap<>(), customHeaders); return fromJson(UserPerson.class, responseRaw, OBJECT_TYPE); } - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userPersonId) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userPersonId) { return update(apiContext, requestMap, userPersonId, new HashMap<>()); } /** * Modify a specific person object's data. */ - public static BunqResponse update(ApiContext apiContext, Map requestMap, - Integer userPersonId, Map customHeaders) { + public static BunqResponse update(ApiContext apiContext, Map requestMap, Integer userPersonId, Map customHeaders) { ApiClient apiClient = new ApiClient(apiContext); byte[] requestBytes = gson.toJson(requestMap).getBytes(); - BunqResponseRaw responseRaw = apiClient - .put(String.format(ENDPOINT_URL_UPDATE, userPersonId), requestBytes, customHeaders); + BunqResponseRaw responseRaw = apiClient.put(String.format(ENDPOINT_URL_UPDATE, userPersonId), requestBytes, customHeaders); return processForId(responseRaw); } diff --git a/src/main/java/com/bunq/sdk/model/generated/object/Address.java b/src/main/java/com/bunq/sdk/model/generated/object/Address.java index 1dfa59db..add401e7 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/Address.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/Address.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ @@ -50,8 +56,14 @@ public class Address extends BunqModel { @SerializedName("country") private String country; - public Address(String street, String houseNumber, String postalCode, String city, - String country) { + /** + * The province according to local standard. + */ + @Expose + @SerializedName("province") + private String province; + + public Address(String street, String houseNumber, String postalCode, String city, String country) { this.street = street; this.houseNumber = houseNumber; this.postalCode = postalCode; @@ -125,4 +137,15 @@ public void setCountry(String country) { this.country = country; } + /** + * The province according to local standard. + */ + public String getProvince() { + return this.province; + } + + public void setProvince(String province) { + this.province = province; + } + } diff --git a/src/main/java/com/bunq/sdk/model/generated/object/Amount.java b/src/main/java/com/bunq/sdk/model/generated/object/Amount.java index 394c4c49..e19e520c 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/Amount.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/Amount.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/Attachment.java b/src/main/java/com/bunq/sdk/model/generated/object/Attachment.java index da0bf3fe..80127fa4 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/Attachment.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/Attachment.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/AttachmentMonetaryAccountPayment.java b/src/main/java/com/bunq/sdk/model/generated/object/AttachmentMonetaryAccountPayment.java index d9a4dc58..319f9d3f 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/AttachmentMonetaryAccountPayment.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/AttachmentMonetaryAccountPayment.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/AttachmentPublic.java b/src/main/java/com/bunq/sdk/model/generated/object/AttachmentPublic.java index c7a8b8eb..8aef46ad 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/AttachmentPublic.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/AttachmentPublic.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/AttachmentTab.java b/src/main/java/com/bunq/sdk/model/generated/object/AttachmentTab.java index 10ea080d..716514fc 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/AttachmentTab.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/AttachmentTab.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/Avatar.java b/src/main/java/com/bunq/sdk/model/generated/object/Avatar.java index 1ca75c14..56021702 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/Avatar.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/Avatar.java @@ -1,9 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/BudgetRestriction.java b/src/main/java/com/bunq/sdk/model/generated/object/BudgetRestriction.java index bc564a85..63c8c38f 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/BudgetRestriction.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/BudgetRestriction.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/BunqId.java b/src/main/java/com/bunq/sdk/model/generated/object/BunqId.java index 00eef290..bfc7c312 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/BunqId.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/BunqId.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/CardCountryPermission.java b/src/main/java/com/bunq/sdk/model/generated/object/CardCountryPermission.java index 6991b03f..eebdc17c 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/CardCountryPermission.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/CardCountryPermission.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ @@ -22,10 +28,28 @@ public class CardCountryPermission extends BunqModel { @SerializedName("expiry_time") private String expiryTime; + /** + * The id of the card country permission entry. + */ + @Expose + @SerializedName("id") + private Integer id; + public CardCountryPermission(String country) { this.country = country; } + /** + * The id of the card country permission entry. + */ + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + /** * The country to allow transactions in (e.g. NL, DE). */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/CardLimit.java b/src/main/java/com/bunq/sdk/model/generated/object/CardLimit.java index c551af4a..d9a2b299 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/CardLimit.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/CardLimit.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ @@ -30,12 +36,30 @@ public class CardLimit extends BunqModel { @SerializedName("type") private String type; + /** + * The id of the card limit entry. + */ + @Expose + @SerializedName("id") + private Integer id; + public CardLimit(String dailyLimit, String currency, String type) { this.dailyLimit = dailyLimit; this.currency = currency; this.type = type; } + /** + * The id of the card limit entry. + */ + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + /** * The daily limit amount. */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/CardMagStripePermission.java b/src/main/java/com/bunq/sdk/model/generated/object/CardMagStripePermission.java index f6a73d2b..c5dd927a 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/CardMagStripePermission.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/CardMagStripePermission.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/CardPinAssignment.java b/src/main/java/com/bunq/sdk/model/generated/object/CardPinAssignment.java index 5834742c..344d7f46 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/CardPinAssignment.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/CardPinAssignment.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/Certificate.java b/src/main/java/com/bunq/sdk/model/generated/object/Certificate.java index 4ffff96c..58a4eb72 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/Certificate.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/Certificate.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/DraftPaymentEntry.java b/src/main/java/com/bunq/sdk/model/generated/object/DraftPaymentEntry.java new file mode 100644 index 00000000..ef28daea --- /dev/null +++ b/src/main/java/com/bunq/sdk/model/generated/object/DraftPaymentEntry.java @@ -0,0 +1,180 @@ +package com.bunq.sdk.model.generated.object; + +import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + */ +public class DraftPaymentEntry extends BunqModel { + + /** + * The amount of the payment. + */ + @Expose + @SerializedName("amount") + private Amount amount; + + /** + * The LabelMonetaryAccount containing the public information of the other (counterparty) side + * of the DraftPayment. + */ + @Expose + @SerializedName("counterparty_alias") + private MonetaryAccountReference counterpartyAlias; + + /** + * The description for the DraftPayment. Maximum 140 characters for DraftPayments to external + * IBANs, 9000 characters for DraftPayments to only other bunq MonetaryAccounts. + */ + @Expose + @SerializedName("description") + private String description; + + /** + * Optional data to be included with the Payment specific to the merchant. + */ + @Expose + @SerializedName("merchant_reference") + private String merchantReference; + + /** + * The Attachments attached to the DraftPayment. + */ + @Expose + @SerializedName("attachment") + private List attachment; + + /** + * Whether or not sending a bunq.to payment is allowed. + */ + @Expose + @SerializedName("allow_bunqto") + private Boolean allowBunqto; + + /** + * The id of the draft payment entry. + */ + @Expose + @SerializedName("id") + private Integer id; + + /** + * The LabelMonetaryAccount containing the public information of 'this' (party) side of the + * DraftPayment. + */ + @Expose + @SerializedName("alias") + private MonetaryAccountReference alias; + + /** + * The type of the draft payment entry. + */ + @Expose + @SerializedName("type") + private String type; + + public DraftPaymentEntry(Amount amount, MonetaryAccountReference counterpartyAlias, String description) { + this.amount = amount; + this.counterpartyAlias = counterpartyAlias; + this.description = description; + } + + /** + * The id of the draft payment entry. + */ + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + /** + * The amount of the payment. + */ + public Amount getAmount() { + return this.amount; + } + + public void setAmount(Amount amount) { + this.amount = amount; + } + + /** + * The LabelMonetaryAccount containing the public information of 'this' (party) side of the + * DraftPayment. + */ + public MonetaryAccountReference getAlias() { + return this.alias; + } + + public void setAlias(MonetaryAccountReference alias) { + this.alias = alias; + } + + /** + * The LabelMonetaryAccount containing the public information of the other (counterparty) side + * of the DraftPayment. + */ + public MonetaryAccountReference getCounterpartyAlias() { + return this.counterpartyAlias; + } + + public void setCounterpartyAlias(MonetaryAccountReference counterpartyAlias) { + this.counterpartyAlias = counterpartyAlias; + } + + /** + * The description for the DraftPayment. Maximum 140 characters for DraftPayments to external + * IBANs, 9000 characters for DraftPayments to only other bunq MonetaryAccounts. + */ + public String getDescription() { + return this.description; + } + + public void setDescription(String description) { + this.description = description; + } + + /** + * Optional data to be included with the Payment specific to the merchant. + */ + public String getMerchantReference() { + return this.merchantReference; + } + + public void setMerchantReference(String merchantReference) { + this.merchantReference = merchantReference; + } + + /** + * The type of the draft payment entry. + */ + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + + /** + * The Attachments attached to the DraftPayment. + */ + public List getAttachment() { + return this.attachment; + } + + public void setAttachment(List attachment) { + this.attachment = attachment; + } + +} diff --git a/src/main/java/com/bunq/sdk/model/generated/object/DraftPaymentResponse.java b/src/main/java/com/bunq/sdk/model/generated/object/DraftPaymentResponse.java new file mode 100644 index 00000000..e80c59ea --- /dev/null +++ b/src/main/java/com/bunq/sdk/model/generated/object/DraftPaymentResponse.java @@ -0,0 +1,53 @@ +package com.bunq.sdk.model.generated.object; + +import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + */ +public class DraftPaymentResponse extends BunqModel { + + /** + * The status with which was responded. + */ + @Expose + @SerializedName("status") + private String status; + + /** + * The user that responded to the DraftPayment. + */ + @Expose + @SerializedName("user_alias_created") + private LabelUser userAliasCreated; + + /** + * The status with which was responded. + */ + public String getStatus() { + return this.status; + } + + public void setStatus(String status) { + this.status = status; + } + + /** + * The user that responded to the DraftPayment. + */ + public LabelUser getUserAliasCreated() { + return this.userAliasCreated; + } + + public void setUserAliasCreated(LabelUser userAliasCreated) { + this.userAliasCreated = userAliasCreated; + } + +} diff --git a/src/main/java/com/bunq/sdk/model/generated/object/DraftShareInviteBankEntry.java b/src/main/java/com/bunq/sdk/model/generated/object/DraftShareInviteBankEntry.java index c81a1941..cb5797e3 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/DraftShareInviteBankEntry.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/DraftShareInviteBankEntry.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/Error.java b/src/main/java/com/bunq/sdk/model/generated/object/Error.java index 8839919c..279bb44c 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/Error.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/Error.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/Geolocation.java b/src/main/java/com/bunq/sdk/model/generated/object/Geolocation.java index eaa383e0..51bc25cf 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/Geolocation.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/Geolocation.java @@ -1,9 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/Image.java b/src/main/java/com/bunq/sdk/model/generated/object/Image.java index ecd2bdb2..dc4c0d29 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/Image.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/Image.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/InvoiceItem.java b/src/main/java/com/bunq/sdk/model/generated/object/InvoiceItem.java index 2d9b062a..1aba6fce 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/InvoiceItem.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/InvoiceItem.java @@ -1,9 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/InvoiceItemGroup.java b/src/main/java/com/bunq/sdk/model/generated/object/InvoiceItemGroup.java index 70da89fa..e33e7579 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/InvoiceItemGroup.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/InvoiceItemGroup.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/Issuer.java b/src/main/java/com/bunq/sdk/model/generated/object/Issuer.java index 818826a2..ff99a0ae 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/Issuer.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/Issuer.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/LabelMonetaryAccount.java b/src/main/java/com/bunq/sdk/model/generated/object/LabelMonetaryAccount.java index 04ef73c6..375dc5cb 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/LabelMonetaryAccount.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/LabelMonetaryAccount.java @@ -4,6 +4,11 @@ import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ @@ -51,6 +56,13 @@ public class LabelMonetaryAccount extends BunqModel { @SerializedName("bunq_me") private MonetaryAccountReference bunqMe; + /** + * Whether or not the monetary account is light. + */ + @Expose + @SerializedName("is_light") + private Boolean isLight; + /** * The IBAN of the monetary account. */ @@ -117,4 +129,15 @@ public void setBunqMe(MonetaryAccountReference bunqMe) { this.bunqMe = bunqMe; } + /** + * Whether or not the monetary account is light. + */ + public Boolean getIsLight() { + return this.isLight; + } + + public void setIsLight(Boolean isLight) { + this.isLight = isLight; + } + } diff --git a/src/main/java/com/bunq/sdk/model/generated/object/LabelUser.java b/src/main/java/com/bunq/sdk/model/generated/object/LabelUser.java index 1ffaea73..f47bd57e 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/LabelUser.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/LabelUser.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/MonetaryAccountProfileDrain.java b/src/main/java/com/bunq/sdk/model/generated/object/MonetaryAccountProfileDrain.java index 07e2cd4a..26dcf64a 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/MonetaryAccountProfileDrain.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/MonetaryAccountProfileDrain.java @@ -4,6 +4,11 @@ import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ @@ -37,8 +42,7 @@ public class MonetaryAccountProfileDrain extends BunqModel { @SerializedName("savings_account_alias") private MonetaryAccountReference savingsAccountAlias; - public MonetaryAccountProfileDrain(String status, Amount balancePreferred, - Amount balanceThresholdHigh, MonetaryAccountReference savingsAccountAlias) { + public MonetaryAccountProfileDrain(String status, Amount balancePreferred, Amount balanceThresholdHigh, MonetaryAccountReference savingsAccountAlias) { this.status = status; this.balancePreferred = balancePreferred; this.balanceThresholdHigh = balanceThresholdHigh; diff --git a/src/main/java/com/bunq/sdk/model/generated/object/MonetaryAccountProfileFill.java b/src/main/java/com/bunq/sdk/model/generated/object/MonetaryAccountProfileFill.java index 0bc6bdd7..9de70c94 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/MonetaryAccountProfileFill.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/MonetaryAccountProfileFill.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ @@ -44,8 +50,7 @@ public class MonetaryAccountProfileFill extends BunqModel { @SerializedName("issuer") private Issuer issuer; - public MonetaryAccountProfileFill(String status, Amount balancePreferred, - Amount balanceThresholdLow, String methodFill) { + public MonetaryAccountProfileFill(String status, Amount balancePreferred, Amount balanceThresholdLow, String methodFill) { this.status = status; this.balancePreferred = balancePreferred; this.balanceThresholdLow = balanceThresholdLow; diff --git a/src/main/java/com/bunq/sdk/model/generated/object/MonetaryAccountSetting.java b/src/main/java/com/bunq/sdk/model/generated/object/MonetaryAccountSetting.java index 2c21a09c..d5235437 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/MonetaryAccountSetting.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/MonetaryAccountSetting.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/NotificationFilter.java b/src/main/java/com/bunq/sdk/model/generated/object/NotificationFilter.java index c94c9a60..6583ff58 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/NotificationFilter.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/NotificationFilter.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ @@ -36,8 +42,7 @@ public class NotificationFilter extends BunqModel { @SerializedName("category") private String category; - public NotificationFilter(String notificationDeliveryMethod, String notificationTarget, - String category) { + public NotificationFilter(String notificationDeliveryMethod, String notificationTarget, String category) { this.notificationDeliveryMethod = notificationDeliveryMethod; this.notificationTarget = notificationTarget; this.category = category; diff --git a/src/main/java/com/bunq/sdk/model/generated/object/PermittedDevice.java b/src/main/java/com/bunq/sdk/model/generated/object/PermittedDevice.java index 697a918c..da87f2b1 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/PermittedDevice.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/PermittedDevice.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/Pointer.java b/src/main/java/com/bunq/sdk/model/generated/object/Pointer.java index f85b5d47..9f85d457 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/Pointer.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/Pointer.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/Schedule.java b/src/main/java/com/bunq/sdk/model/generated/object/Schedule.java index fe375bd9..500d7e7f 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/Schedule.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/Schedule.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/SchedulePaymentEntry.java b/src/main/java/com/bunq/sdk/model/generated/object/SchedulePaymentEntry.java index 8f25d341..61786d1d 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/SchedulePaymentEntry.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/SchedulePaymentEntry.java @@ -4,7 +4,11 @@ import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** */ @@ -63,8 +67,7 @@ public class SchedulePaymentEntry extends BunqModel { @SerializedName("alias") private MonetaryAccountReference alias; - public SchedulePaymentEntry(Amount amount, MonetaryAccountReference counterpartyAlias, - String description) { + public SchedulePaymentEntry(Amount amount, MonetaryAccountReference counterpartyAlias, String description) { this.amount = amount; this.counterpartyAlias = counterpartyAlias; this.description = description; diff --git a/src/main/java/com/bunq/sdk/model/generated/object/ShareDetail.java b/src/main/java/com/bunq/sdk/model/generated/object/ShareDetail.java index 94347383..3192d04d 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/ShareDetail.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/ShareDetail.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/ShareDetailDraftPayment.java b/src/main/java/com/bunq/sdk/model/generated/object/ShareDetailDraftPayment.java index b7f533be..8780230e 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/ShareDetailDraftPayment.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/ShareDetailDraftPayment.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ @@ -38,8 +44,7 @@ public class ShareDetailDraftPayment extends BunqModel { @SerializedName("view_new_events") private Boolean viewNewEvents; - public ShareDetailDraftPayment(Boolean makeDraftPayments, Boolean viewBalance, - Boolean viewOldEvents, Boolean viewNewEvents) { + public ShareDetailDraftPayment(Boolean makeDraftPayments, Boolean viewBalance, Boolean viewOldEvents, Boolean viewNewEvents) { this.makeDraftPayments = makeDraftPayments; this.viewBalance = viewBalance; this.viewOldEvents = viewOldEvents; diff --git a/src/main/java/com/bunq/sdk/model/generated/object/ShareDetailPayment.java b/src/main/java/com/bunq/sdk/model/generated/object/ShareDetailPayment.java index c43ede79..b94dff75 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/ShareDetailPayment.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/ShareDetailPayment.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ @@ -52,8 +58,7 @@ public class ShareDetailPayment extends BunqModel { @SerializedName("budget") private BudgetRestriction budget; - public ShareDetailPayment(Boolean makePayments, Boolean viewBalance, Boolean viewOldEvents, - Boolean viewNewEvents) { + public ShareDetailPayment(Boolean makePayments, Boolean viewBalance, Boolean viewOldEvents, Boolean viewNewEvents) { this.makePayments = makePayments; this.viewBalance = viewBalance; this.viewOldEvents = viewOldEvents; diff --git a/src/main/java/com/bunq/sdk/model/generated/object/ShareDetailReadOnly.java b/src/main/java/com/bunq/sdk/model/generated/object/ShareDetailReadOnly.java index a4d5382a..afa28be7 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/ShareDetailReadOnly.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/ShareDetailReadOnly.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/TabTextWaitingScreen.java b/src/main/java/com/bunq/sdk/model/generated/object/TabTextWaitingScreen.java index 6ddad3b0..7b9ccee8 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/TabTextWaitingScreen.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/TabTextWaitingScreen.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/TabVisibility.java b/src/main/java/com/bunq/sdk/model/generated/object/TabVisibility.java index fae5b842..becf5a18 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/TabVisibility.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/TabVisibility.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/TaxResident.java b/src/main/java/com/bunq/sdk/model/generated/object/TaxResident.java index dfb42259..97463c4a 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/TaxResident.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/TaxResident.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */ diff --git a/src/main/java/com/bunq/sdk/model/generated/object/Ubo.java b/src/main/java/com/bunq/sdk/model/generated/object/Ubo.java index afdd58d7..1c8b1ce2 100644 --- a/src/main/java/com/bunq/sdk/model/generated/object/Ubo.java +++ b/src/main/java/com/bunq/sdk/model/generated/object/Ubo.java @@ -1,8 +1,14 @@ package com.bunq.sdk.model.generated.object; import com.bunq.sdk.model.BunqModel; +import com.bunq.sdk.model.MonetaryAccountReference; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** */