-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
163 additions
and
0 deletions.
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
src/main/java/com/bunq/sdk/model/generated/endpoint/AttachmentContent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
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. | ||
*/ | ||
public class AttachmentContent extends BunqModel { | ||
|
||
/** | ||
* Endpoint constants. | ||
*/ | ||
protected static final String ENDPOINT_URL_READ = "attachment-content/%s"; | ||
|
||
/** | ||
* Object type. | ||
*/ | ||
protected static final String OBJECT_TYPE_GET = "AttachmentContent"; | ||
|
||
/** | ||
*/ | ||
public static BunqResponse<AttachmentContent> get(String attachmentContentUuid, Map<String, String> params, Map<String, String> customHeaders) { | ||
ApiClient apiClient = new ApiClient(getApiContext()); | ||
BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, attachmentContentUuid), params, customHeaders); | ||
|
||
return fromJson(AttachmentContent.class, responseRaw, OBJECT_TYPE_GET); | ||
} | ||
|
||
public static BunqResponse<AttachmentContent> get() { | ||
return get(null, null, null); | ||
} | ||
|
||
public static BunqResponse<AttachmentContent> get(String attachmentContentUuid) { | ||
return get(attachmentContentUuid, null, null); | ||
} | ||
|
||
public static BunqResponse<AttachmentContent> get(String attachmentContentUuid, Map<String, String> params) { | ||
return get(attachmentContentUuid, params, null); | ||
} | ||
|
||
/** | ||
*/ | ||
public boolean isAllFieldNull() { | ||
return true; | ||
} | ||
|
||
/** | ||
*/ | ||
public static AttachmentContent fromJsonReader(JsonReader reader) { | ||
return fromJsonReader(AttachmentContent.class, reader); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
src/main/java/com/bunq/sdk/model/generated/object/AttachmentUrl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
package com.bunq.sdk.model.generated.object; | ||
|
||
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; | ||
|
||
/** | ||
*/ | ||
public class AttachmentUrl extends BunqModel { | ||
|
||
/** | ||
* The file type of attachment. | ||
*/ | ||
@Expose | ||
@SerializedName("type") | ||
private String type; | ||
|
||
/** | ||
* The URL where the attachment can be downloaded. | ||
*/ | ||
@Expose | ||
@SerializedName("url") | ||
private String url; | ||
|
||
/** | ||
* The file type of attachment. | ||
*/ | ||
public String getType() { | ||
return this.type; | ||
} | ||
|
||
public void setType(String type) { | ||
this.type = type; | ||
} | ||
|
||
/** | ||
* The URL where the attachment can be downloaded. | ||
*/ | ||
public String getUrl() { | ||
return this.url; | ||
} | ||
|
||
public void setUrl(String url) { | ||
this.url = url; | ||
} | ||
|
||
/** | ||
*/ | ||
public boolean isAllFieldNull() { | ||
if (this.type != null) { | ||
return false; | ||
} | ||
|
||
if (this.url != null) { | ||
return false; | ||
} | ||
|
||
return true; | ||
} | ||
|
||
/** | ||
*/ | ||
public static AttachmentUrl fromJsonReader(JsonReader reader) { | ||
return fromJsonReader(AttachmentUrl.class, reader); | ||
} | ||
|
||
} |