Skip to content

Commit 98b1178

Browse files
committed
Fix sending with attachment API through Json Serializer
1 parent 6783e9d commit 98b1178

File tree

5 files changed

+184
-101
lines changed

5 files changed

+184
-101
lines changed

pom.xml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
<configuration>
127127
<sources>
128128
<source>
129-
src/main/java</source>
129+
src/main/java</source>
130130
</sources>
131131
</configuration>
132132
</execution>
@@ -139,7 +139,7 @@
139139
<configuration>
140140
<sources>
141141
<source>
142-
src/test/java</source>
142+
src/test/java</source>
143143
</sources>
144144
</configuration>
145145
</execution>
@@ -209,6 +209,11 @@
209209
<artifactId>okhttp</artifactId>
210210
<version>${okhttp-version}</version>
211211
</dependency>
212+
<dependency>
213+
<groupId>com.squareup.okio</groupId>
214+
<artifactId>okio</artifactId>
215+
<version>${okio-version}</version>
216+
</dependency>
212217
<dependency>
213218
<groupId>com.squareup.okhttp</groupId>
214219
<artifactId>logging-interceptor</artifactId>
@@ -224,11 +229,11 @@
224229
<artifactId>gson-fire</artifactId>
225230
<version>${gson-fire-version}</version>
226231
</dependency>
227-
<dependency>
228-
<groupId>org.threeten</groupId>
229-
<artifactId>threetenbp</artifactId>
230-
<version>${threetenbp-version}</version>
231-
</dependency>
232+
<dependency>
233+
<groupId>org.threeten</groupId>
234+
<artifactId>threetenbp</artifactId>
235+
<version>${threetenbp-version}</version>
236+
</dependency>
232237
<!-- test dependencies -->
233238
<dependency>
234239
<groupId>junit</groupId>
@@ -243,14 +248,15 @@
243248
</dependency>
244249
</dependencies>
245250
<properties>
246-
<java.version>1.7</java.version>
251+
<java.version>1.8</java.version>
247252
<maven.compiler.source>${java.version}</maven.compiler.source>
248253
<maven.compiler.target>${java.version}</maven.compiler.target>
249-
<gson-fire-version>1.8.0</gson-fire-version>
254+
<gson-fire-version>1.8.2</gson-fire-version>
250255
<swagger-core-version>1.5.15</swagger-core-version>
251256
<okhttp-version>2.7.5</okhttp-version>
252-
<gson-version>2.8.1</gson-version>
253-
<threetenbp-version>1.3.5</threetenbp-version>
257+
<okio-version>1.14.0</okio-version>
258+
<gson-version>2.8.2</gson-version>
259+
<threetenbp-version>1.3.5</threetenbp-version>
254260
<maven-plugin-version>1.0.0</maven-plugin-version>
255261
<junit-version>4.12</junit-version>
256262
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

src/main/java/sendinblue/ApiClient.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public class ApiClient {
6969
private KeyManager[] keyManagers;
7070

7171
private OkHttpClient httpClient;
72-
private JSON json;
72+
private Json json;
7373

7474
private HttpLoggingInterceptor loggingInterceptor;
7575

@@ -82,7 +82,7 @@ public ApiClient() {
8282

8383
verifyingSsl = true;
8484

85-
json = new JSON();
85+
json = new Json();
8686

8787
// Set default User-Agent.
8888
setUserAgent("Swagger-Codegen/1.0.0/java");
@@ -139,7 +139,7 @@ public ApiClient setHttpClient(OkHttpClient httpClient) {
139139
*
140140
* @return JSON object
141141
*/
142-
public JSON getJSON() {
142+
public Json getJSON() {
143143
return json;
144144
}
145145

@@ -149,7 +149,7 @@ public JSON getJSON() {
149149
* @param json JSON object
150150
* @return Api client
151151
*/
152-
public ApiClient setJSON(JSON json) {
152+
public ApiClient setJSON(Json json) {
153153
this.json = json;
154154
return this;
155155
}

0 commit comments

Comments
 (0)