Skip to content

Commit 68f86ba

Browse files
author
Konstantin Yakushev
committed
Merge branch 'release/1.10.0'
2 parents c9c7f00 + 464066f commit 68f86ba

File tree

65 files changed

+10934
-996
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+10934
-996
lines changed

CHANGELOG.md

Lines changed: 49 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,38 @@
11
# Change Log
22

3-
## [Unreleased](https://github.com/bunq/sdk_java/tree/1.0.0)
3+
## [1.10.0](https://github.com/bunq/sdk_java/tree/1.10.0) (2019-05-09)
44

5-
[Full Changelog](https://github.com/bunq/sdk_java/compare/0.13.1...1.0.0)
5+
[Full Changelog](https://github.com/bunq/sdk_java/compare/1.1.0...1.10.0)
66

7-
**Implemented enhancements:**
7+
**Closed issues:**
88

9-
- Add optional parameters to constructor  [\#50](https://github.com/bunq/sdk_java/issues/50)
10-
- Monetary account joint cannot be retrieved. [\#45](https://github.com/bunq/sdk_java/issues/45)
11-
- Add java 7 compatibility  [\#42](https://github.com/bunq/sdk_java/issues/42)
9+
- Certificate pinning issue after bunq certificate renewal [\#115](https://github.com/bunq/sdk_java/issues/115)
10+
- Used package javax.xml.bind not included in Android [\#111](https://github.com/bunq/sdk_java/issues/111)
1211

13-
**Fixed bugs:**
12+
**Merged pull requests:**
1413

15-
- SDK build fails on jitpack [\#6](https://github.com/bunq/sdk_java/issues/6)
14+
- Changed pinned key to match new sandbox certificate [\#116](https://github.com/bunq/sdk_java/pull/116) ([erwindeg](https://github.com/erwindeg))
15+
16+
## [1.1.0](https://github.com/bunq/sdk_java/tree/1.1.0) (2018-10-09)
17+
[Full Changelog](https://github.com/bunq/sdk_java/compare/1.0.1...1.1.0)
18+
19+
**Merged pull requests:**
20+
21+
- bunq header handling as enum \(bunq/sdk\_java\#93\) [\#105](https://github.com/bunq/sdk_java/pull/105) ([tubbynl](https://github.com/tubbynl))
22+
23+
## [1.0.1](https://github.com/bunq/sdk_java/tree/1.0.1) (2018-09-01)
24+
[Full Changelog](https://github.com/bunq/sdk_java/compare/1.0.0...1.0.1)
1625

1726
**Closed issues:**
1827

19-
- Add oauth support [\#107](https://github.com/bunq/sdk_java/issues/107)
20-
- Java 7 compatibility: java.util.Base64 [\#104](https://github.com/bunq/sdk_java/issues/104)
21-
- Please share code formatter [\#103](https://github.com/bunq/sdk_java/issues/103)
22-
- expose ApiEnvironmentType members and add pinnedKey [\#100](https://github.com/bunq/sdk_java/issues/100)
23-
- Update Sandbox API key procedure [\#96](https://github.com/bunq/sdk_java/issues/96)
24-
- Can not construct a BunqMeTabEntry to create a BunqMeTab [\#77](https://github.com/bunq/sdk_java/issues/77)
28+
- 1.0.0 build aild on jitpack [\#109](https://github.com/bunq/sdk_java/issues/109)
2529

2630
**Merged pull requests:**
2731

28-
- Oauth bunq/sdk\_java\#107 [\#108](https://github.com/bunq/sdk_java/pull/108) ([OGKevin](https://github.com/OGKevin))
29-
- Add java 7 support bunq/sdk\_java\#42 [\#106](https://github.com/bunq/sdk_java/pull/106) ([OGKevin](https://github.com/OGKevin))
30-
- \#100 moved pinnedKey to ApiEnvironmentType [\#101](https://github.com/bunq/sdk_java/pull/101) ([tubbynl](https://github.com/tubbynl))
31-
- UserContext building without static references. \(bunq/sdk\_java\#93\) [\#99](https://github.com/bunq/sdk_java/pull/99) ([tubbynl](https://github.com/tubbynl))
32-
- Update Sandbox API key procedure. \(bunq/sdk\_java\#96\) [\#97](https://github.com/bunq/sdk_java/pull/97) ([sandervdo](https://github.com/sandervdo))
33-
- Add constructor with request field bunq/sdk\_java\#50 [\#95](https://github.com/bunq/sdk_java/pull/95) ([OGKevin](https://github.com/OGKevin))
34-
- Fix monetary account joint retrieval bunq/sdk\_java\#45 [\#91](https://github.com/bunq/sdk_java/pull/91) ([OGKevin](https://github.com/OGKevin))
32+
- Exclude examples and test files from build. \(bunq/sdk\_java\#109\) [\#110](https://github.com/bunq/sdk_java/pull/110) ([OGKevin](https://github.com/OGKevin))
3533

36-
## [0.13.1](https://github.com/bunq/sdk_java/tree/0.13.1) (2018-05-30)
37-
[Full Changelog](https://github.com/bunq/sdk_java/compare/0.13.0...0.13.1)
34+
## [1.0.0](https://github.com/bunq/sdk_java/tree/1.0.0) (2018-07-24)
35+
[Full Changelog](https://github.com/bunq/sdk_java/compare/0.13.1...1.0.0)
3836

3937
**Implemented enhancements:**
4038

@@ -44,24 +42,50 @@
4442
- Optimise test framework [\#78](https://github.com/bunq/sdk_java/issues/78)
4543
- Add more example scripts [\#66](https://github.com/bunq/sdk_java/issues/66)
4644
- Auto save the session after automatic session reset has been executed  [\#60](https://github.com/bunq/sdk_java/issues/60)
45+
- Add optional parameters to constructor  [\#50](https://github.com/bunq/sdk_java/issues/50)
46+
- Monetary account joint cannot be retrieved. [\#45](https://github.com/bunq/sdk_java/issues/45)
47+
- Add java 7 compatibility  [\#42](https://github.com/bunq/sdk_java/issues/42)
4748
- Endpoint HTTP methods should not be static [\#34](https://github.com/bunq/sdk_java/issues/34)
4849
- Remove the examples from the published artifacts [\#2](https://github.com/bunq/sdk_java/issues/2)
4950

51+
**Fixed bugs:**
52+
53+
- SDK build fails on jitpack [\#6](https://github.com/bunq/sdk_java/issues/6)
54+
5055
**Closed issues:**
5156

57+
- Java 7 compatibility: java.util.Base64 [\#104](https://github.com/bunq/sdk_java/issues/104)
58+
- Please share code formatter [\#103](https://github.com/bunq/sdk_java/issues/103)
59+
- expose ApiEnvironmentType members and add pinnedKey [\#100](https://github.com/bunq/sdk_java/issues/100)
60+
- Add oauth support [\#107](https://github.com/bunq/sdk_java/issues/107)
61+
- Update Sandbox API key procedure [\#96](https://github.com/bunq/sdk_java/issues/96)
5262
- Move to new sandbox [\#89](https://github.com/bunq/sdk_java/issues/89)
53-
- Android issue: HttpClient was deprecated in API Level 22 and removed in API Level 23 [\#69](https://github.com/bunq/sdk_java/issues/69)
63+
- Can not construct a BunqMeTabEntry to create a BunqMeTab [\#77](https://github.com/bunq/sdk_java/issues/77)
5464

5565
**Merged pull requests:**
5666

67+
- Add java 7 support bunq/sdk\_java\#42 [\#106](https://github.com/bunq/sdk_java/pull/106) ([OGKevin](https://github.com/OGKevin))
68+
- Oauth bunq/sdk\_java\#107 [\#108](https://github.com/bunq/sdk_java/pull/108) ([OGKevin](https://github.com/OGKevin))
69+
- \#100 moved pinnedKey to ApiEnvironmentType [\#101](https://github.com/bunq/sdk_java/pull/101) ([tubbynl](https://github.com/tubbynl))
70+
- UserContext building without static references. \(bunq/sdk\_java\#93\) [\#99](https://github.com/bunq/sdk_java/pull/99) ([tubbynl](https://github.com/tubbynl))
71+
- Update Sandbox API key procedure. \(bunq/sdk\_java\#96\) [\#97](https://github.com/bunq/sdk_java/pull/97) ([sandervdo](https://github.com/sandervdo))
72+
- Add constructor with request field bunq/sdk\_java\#50 [\#95](https://github.com/bunq/sdk_java/pull/95) ([OGKevin](https://github.com/OGKevin))
5773
- Changed sandbox url and pinned key. \(bunq/sdk\_java\#89\) [\#92](https://github.com/bunq/sdk_java/pull/92) ([OGKevin](https://github.com/OGKevin))
74+
- Fix monetary account joint retrieval bunq/sdk\_java\#45 [\#91](https://github.com/bunq/sdk_java/pull/91) ([OGKevin](https://github.com/OGKevin))
5875
- Auto update bunq context bunq/sdk\_java\#60 [\#90](https://github.com/bunq/sdk_java/pull/90) ([OGKevin](https://github.com/OGKevin))
5976
- Add travis ci bunq/sdk\_java\#80 [\#87](https://github.com/bunq/sdk_java/pull/87) ([OGKevin](https://github.com/OGKevin))
6077
- Optimise test framework \(bunq/sdk\_java\#78\) [\#85](https://github.com/bunq/sdk_java/pull/85) ([OGKevin](https://github.com/OGKevin))
6178
- Updated read me to point to tinker for examples. \(bunq/sdk\_java\#81\) [\#84](https://github.com/bunq/sdk_java/pull/84) ([OGKevin](https://github.com/OGKevin))
6279
- Refresh user context bunq/sdk\_java\#79 [\#83](https://github.com/bunq/sdk_java/pull/83) ([OGKevin](https://github.com/OGKevin))
6380
- Replace examples with tinker bunq/sdk\_java\#66 [\#82](https://github.com/bunq/sdk_java/pull/82) ([OGKevin](https://github.com/OGKevin))
6481

82+
## [0.13.1](https://github.com/bunq/sdk_java/tree/0.13.1) (2018-05-30)
83+
[Full Changelog](https://github.com/bunq/sdk_java/compare/0.13.0...0.13.1)
84+
85+
**Closed issues:**
86+
87+
- Android issue: HttpClient was deprecated in API Level 22 and removed in API Level 23 [\#69](https://github.com/bunq/sdk_java/issues/69)
88+
6589
## [0.13.0](https://github.com/bunq/sdk_java/tree/0.13.0) (2018-03-20)
6690
[Full Changelog](https://github.com/bunq/sdk_java/compare/0.12.4...0.13.0)
6791

@@ -211,4 +235,4 @@
211235

212236

213237

214-
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
238+
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group 'com.bunq.sdk'
2-
version '1.1.0'
2+
version '1.10.0'
33

44
apply plugin: 'java'
55
apply plugin: 'maven'

src/main/java/com/bunq/sdk/context/ApiEnvironmentType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public enum ApiEnvironmentType {
1313
SANDBOX(
1414
"public-api.sandbox.bunq.com",
1515
"v1",
16-
"sha256/GhNvDokiMyXzhGft+xXWFGchUmmh8R5dQEnO4xu81NY="
16+
"sha256/9Y+oZve6H+r17Kdn+lN5sT0ijgxLyDGIuQtUwLupawA="
1717
);
1818

1919
/**

src/main/java/com/bunq/sdk/http/BunqHeader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public enum BunqHeader {
1818
LANGUAGE("X-Bunq-Language", "en_US"),
1919
REGION("X-Bunq-Region", "nl_NL"),
2020
SERVER_SIGNATURE("X-Bunq-Server-Signature"),
21-
USER_AGENT("User-Agent", "bunq-sdk-java/0.13.1");
21+
USER_AGENT("User-Agent", "bunq-sdk-java/1.10.0");
2222

2323
private static final String PREFIX = "X-Bunq-";
2424

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
package com.bunq.sdk.model.generated.endpoint;
2+
3+
import com.bunq.sdk.http.ApiClient;
4+
import com.bunq.sdk.http.BunqResponse;
5+
import com.bunq.sdk.http.BunqResponseRaw;
6+
import com.bunq.sdk.model.core.BunqModel;
7+
import com.bunq.sdk.model.generated.object.Attachment;
8+
import com.google.gson.annotations.Expose;
9+
import com.google.gson.annotations.SerializedName;
10+
import com.google.gson.stream.JsonReader;
11+
12+
import java.util.Map;
13+
14+
/**
15+
* This call is used to upload an attachment that is accessible only by a specific user. This
16+
* can be used for example to upload passport scans or other documents. Attachments supported
17+
* are png, jpg and gif.
18+
*/
19+
public class AttachmentUser extends BunqModel {
20+
21+
/**
22+
* Endpoint constants.
23+
*/
24+
protected static final String ENDPOINT_URL_READ = "user/%s/attachment/%s";
25+
26+
/**
27+
* Object type.
28+
*/
29+
protected static final String OBJECT_TYPE_GET = "AttachmentUser";
30+
31+
/**
32+
* The id of the attachment.
33+
*/
34+
@Expose
35+
@SerializedName("id")
36+
private Integer id;
37+
38+
/**
39+
* The timestamp of the attachment's creation.
40+
*/
41+
@Expose
42+
@SerializedName("created")
43+
private String created;
44+
45+
/**
46+
* The timestamp of the attachment's last update.
47+
*/
48+
@Expose
49+
@SerializedName("updated")
50+
private String updated;
51+
52+
/**
53+
* The attachment.
54+
*/
55+
@Expose
56+
@SerializedName("attachment")
57+
private Attachment attachment;
58+
59+
/**
60+
* Get a specific attachment. The header of the response contains the content-type of the
61+
* attachment.
62+
*/
63+
public static BunqResponse<AttachmentUser> get(Integer attachmentUserId, Map<String, String> params, Map<String, String> customHeaders) {
64+
ApiClient apiClient = new ApiClient(getApiContext());
65+
BunqResponseRaw responseRaw = apiClient.get(String.format(ENDPOINT_URL_READ, determineUserId(), attachmentUserId), params, customHeaders);
66+
67+
return fromJson(AttachmentUser.class, responseRaw);
68+
}
69+
70+
public static BunqResponse<AttachmentUser> get() {
71+
return get(null, null, null);
72+
}
73+
74+
public static BunqResponse<AttachmentUser> get(Integer attachmentUserId) {
75+
return get(attachmentUserId, null, null);
76+
}
77+
78+
public static BunqResponse<AttachmentUser> get(Integer attachmentUserId, Map<String, String> params) {
79+
return get(attachmentUserId, params, null);
80+
}
81+
82+
/**
83+
* The id of the attachment.
84+
*/
85+
public Integer getId() {
86+
return this.id;
87+
}
88+
89+
public void setId(Integer id) {
90+
this.id = id;
91+
}
92+
93+
/**
94+
* The timestamp of the attachment's creation.
95+
*/
96+
public String getCreated() {
97+
return this.created;
98+
}
99+
100+
public void setCreated(String created) {
101+
this.created = created;
102+
}
103+
104+
/**
105+
* The timestamp of the attachment's last update.
106+
*/
107+
public String getUpdated() {
108+
return this.updated;
109+
}
110+
111+
public void setUpdated(String updated) {
112+
this.updated = updated;
113+
}
114+
115+
/**
116+
* The attachment.
117+
*/
118+
public Attachment getAttachment() {
119+
return this.attachment;
120+
}
121+
122+
public void setAttachment(Attachment attachment) {
123+
this.attachment = attachment;
124+
}
125+
126+
/**
127+
*/
128+
public boolean isAllFieldNull() {
129+
if (this.id != null) {
130+
return false;
131+
}
132+
133+
if (this.created != null) {
134+
return false;
135+
}
136+
137+
if (this.updated != null) {
138+
return false;
139+
}
140+
141+
if (this.attachment != null) {
142+
return false;
143+
}
144+
145+
return true;
146+
}
147+
148+
/**
149+
*/
150+
public static AttachmentUser fromJsonReader(JsonReader reader) {
151+
return fromJsonReader(AttachmentUser.class, reader);
152+
}
153+
154+
}

0 commit comments

Comments
 (0)