Skip to content

Commit

Permalink
Regenerated code. (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
OGKevin committed Mar 20, 2018
1 parent a64caab commit c88b2d5
Show file tree
Hide file tree
Showing 106 changed files with 7,778 additions and 2,075 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
package com.bunq.sdk.model.generated.endpoint;

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.core.BunqModel;
import com.bunq.sdk.model.core.MonetaryAccountReference;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
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
Expand All @@ -25,27 +17,36 @@ public class AttachmentConversationContent extends BunqModel {
/**
* Endpoint constants.
*/
private static final String ENDPOINT_URL_LISTING = "user/%s/chat-conversation/%s/attachment/%s/content";
protected static final String ENDPOINT_URL_LISTING = "user/%s/chat-conversation/%s/attachment/%s/content";

/**
* Object type.
*/
private static final String OBJECT_TYPE_GET = "AttachmentConversationContent";

public static BunqResponse<byte[]> list(ApiContext apiContext, Integer userId, Integer chatConversationId, Integer attachmentId) {
return list(apiContext, userId, chatConversationId, attachmentId, new HashMap<>());
}
protected static final String OBJECT_TYPE_GET = "AttachmentConversationContent";

/**
* Get the raw content of a specific attachment.
*/
public static BunqResponse<byte[]> list(ApiContext apiContext, Integer userId, Integer chatConversationId, Integer attachmentId, Map<String, String> customHeaders) {
ApiClient apiClient = new ApiClient(apiContext);
BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, userId, chatConversationId, attachmentId), new HashMap<>(), customHeaders);
public static BunqResponse<byte[]> list(Integer chatConversationId, Integer attachmentId, Map<String, String> params, Map<String, String> customHeaders) {
ApiClient apiClient = new ApiClient(getApiContext());
BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, determineUserId(), chatConversationId, attachmentId), params, customHeaders);

return new BunqResponse<>(responseRaw.getBodyBytes(), responseRaw.getHeaders());
}

public static BunqResponse<byte[]> list() {
return list(null, null, null, null);
}
public static BunqResponse<byte[]> list(Integer chatConversationId) {
return list(chatConversationId, null, null, null);
}
public static BunqResponse<byte[]> list(Integer chatConversationId, Integer attachmentId) {
return list(chatConversationId, attachmentId, null, null);
}
public static BunqResponse<byte[]> list(Integer chatConversationId, Integer attachmentId, Map<String, String> params) {
return list(chatConversationId, attachmentId, params, null);
}

/**
*/
public boolean isAllFieldNull() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
package com.bunq.sdk.model.generated.endpoint;

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.core.BunqModel;
import com.bunq.sdk.model.core.MonetaryAccountReference;
import com.bunq.sdk.model.generated.object.Attachment;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
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
Expand All @@ -26,7 +20,7 @@ public class AttachmentMonetaryAccount extends BunqModel {
/**
* Endpoint constants.
*/
private static final String ENDPOINT_URL_CREATE = "user/%s/monetary-account/%s/attachment";
protected static final String ENDPOINT_URL_CREATE = "user/%s/monetary-account/%s/attachment";

/**
* The attachment.
Expand All @@ -42,23 +36,27 @@ public class AttachmentMonetaryAccount extends BunqModel {
@SerializedName("id")
private Integer id;

public static BunqResponse<Integer> create(ApiContext apiContext, byte[] bytes, Integer userId, Integer monetaryAccountId) {
return create(apiContext, bytes, userId, monetaryAccountId, new HashMap<>());
}

/**
* Create a new monetary account attachment. Create a POST request with a payload that contains
* the binary representation of the file, without any JSON wrapping. Make sure you define the
* MIME type (i.e. image/jpeg) 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<Integer> create(ApiContext apiContext, byte[] bytes, Integer userId, Integer monetaryAccountId, Map<String, String> customHeaders) {
ApiClient apiClient = new ApiClient(apiContext);
BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, userId, monetaryAccountId), bytes, customHeaders);
public static BunqResponse<Integer> create(Integer monetaryAccountId, Map<String, String> customHeaders, byte[] bytes) {
ApiClient apiClient = new ApiClient(getApiContext());
BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, determineUserId(), determineMonetaryAccountId(monetaryAccountId)), bytes, customHeaders);

return processForId(responseRaw);
}

public static BunqResponse<Integer> create(byte[] bytes) {
return create(null, null, bytes);
}

public static BunqResponse<Integer> create(Integer monetaryAccountId, byte[] bytes) {
return create(monetaryAccountId, null, bytes);
}

/**
* The attachment.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
package com.bunq.sdk.model.generated.endpoint;

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.core.BunqModel;
import com.bunq.sdk.model.core.MonetaryAccountReference;
import com.bunq.sdk.model.generated.object.Attachment;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
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
Expand All @@ -26,14 +20,14 @@ public class AttachmentPublic extends BunqModel {
/**
* Endpoint constants.
*/
private static final String ENDPOINT_URL_CREATE = "attachment-public";
private static final String ENDPOINT_URL_READ = "attachment-public/%s";
protected static final String ENDPOINT_URL_CREATE = "attachment-public";
protected static final String ENDPOINT_URL_READ = "attachment-public/%s";

/**
* Object type.
*/
private static final String OBJECT_TYPE_POST = "Uuid";
private static final String OBJECT_TYPE_GET = "AttachmentPublic";
protected static final String OBJECT_TYPE_POST = "Uuid";
protected static final String OBJECT_TYPE_GET = "AttachmentPublic";

/**
* The UUID of the attachment.
Expand Down Expand Up @@ -63,38 +57,46 @@ public class AttachmentPublic extends BunqModel {
@SerializedName("attachment")
private Attachment attachment;

public static BunqResponse<String> create(ApiContext apiContext, byte[] bytes) {
return create(apiContext, bytes, new HashMap<>());
}

/**
* Create a new public attachment. Create a POST request with a payload that contains a binary
* representation of the file, without any JSON wrapping. Make sure you define the MIME type
* (i.e. image/jpeg, or image/png) 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<String> create(ApiContext apiContext, byte[] bytes, Map<String, String> customHeaders) {
ApiClient apiClient = new ApiClient(apiContext);
public static BunqResponse<String> create(Map<String, String> customHeaders, byte[] bytes) {
ApiClient apiClient = new ApiClient(getApiContext());
BunqResponseRaw responseRaw = apiClient.post(ENDPOINT_URL_CREATE, bytes, customHeaders);

return processForUuid(responseRaw);
}

public static BunqResponse<AttachmentPublic> get(ApiContext apiContext, String attachmentPublicUuid) {
return get(apiContext, attachmentPublicUuid, new HashMap<>());
public static BunqResponse<String> create(byte[] bytes) {
return create(null, bytes);
}

/**
* 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<AttachmentPublic> get(ApiContext apiContext, String attachmentPublicUuid, Map<String, String> customHeaders) {
ApiClient apiClient = new ApiClient(apiContext);
BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, attachmentPublicUuid), new HashMap<>(), customHeaders);
public static BunqResponse<AttachmentPublic> get(String attachmentPublicUuid, Map<String, String> params, Map<String, String> customHeaders) {
ApiClient apiClient = new ApiClient(getApiContext());
BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, attachmentPublicUuid), params, customHeaders);

return fromJson(AttachmentPublic.class, responseRaw, OBJECT_TYPE_GET);
}

public static BunqResponse<AttachmentPublic> get() {
return get(null, null, null);
}

public static BunqResponse<AttachmentPublic> get(String attachmentPublicUuid) {
return get(attachmentPublicUuid, null, null);
}

public static BunqResponse<AttachmentPublic> get(String attachmentPublicUuid, Map<String, String> params) {
return get(attachmentPublicUuid, params, null);
}

/**
* The UUID of the attachment.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
package com.bunq.sdk.model.generated.endpoint;

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.core.BunqModel;
import com.bunq.sdk.model.core.MonetaryAccountReference;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
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
Expand All @@ -25,27 +17,33 @@ public class AttachmentPublicContent extends BunqModel {
/**
* Endpoint constants.
*/
private static final String ENDPOINT_URL_LISTING = "attachment-public/%s/content";
protected static final String ENDPOINT_URL_LISTING = "attachment-public/%s/content";

/**
* Object type.
*/
private static final String OBJECT_TYPE_GET = "AttachmentPublicContent";

public static BunqResponse<byte[]> list(ApiContext apiContext, String attachmentPublicUuid) {
return list(apiContext, attachmentPublicUuid, new HashMap<>());
}
protected static final String OBJECT_TYPE_GET = "AttachmentPublicContent";

/**
* Get the raw content of a specific attachment.
*/
public static BunqResponse<byte[]> list(ApiContext apiContext, String attachmentPublicUuid, Map<String, String> customHeaders) {
ApiClient apiClient = new ApiClient(apiContext);
BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, attachmentPublicUuid), new HashMap<>(), customHeaders);
public static BunqResponse<byte[]> list(String attachmentPublicUuid, Map<String, String> params, Map<String, String> customHeaders) {
ApiClient apiClient = new ApiClient(getApiContext());
BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_LISTING, attachmentPublicUuid), params, customHeaders);

return new BunqResponse<>(responseRaw.getBodyBytes(), responseRaw.getHeaders());
}

public static BunqResponse<byte[]> list() {
return list(null, null, null);
}
public static BunqResponse<byte[]> list(String attachmentPublicUuid) {
return list(attachmentPublicUuid, null, null);
}
public static BunqResponse<byte[]> list(String attachmentPublicUuid, Map<String, String> params) {
return list(attachmentPublicUuid, params, null);
}

/**
*/
public boolean isAllFieldNull() {
Expand Down
Loading

0 comments on commit c88b2d5

Please sign in to comment.