Skip to content

Fix sending with attachment API through Json Serializer #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.sendinblue</groupId>
<artifactId>sib-api-v3-sdk</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -32,7 +32,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:

```groovy
compile "com.sendinblue:sib-api-v3-sdk:1.0.0"
compile "com.sendinblue:sib-api-v3-sdk:1.0.1"
```

### Others
Expand All @@ -45,7 +45,7 @@ At first generate the JAR by executing:

Then manually install the following JARs:

* target/sib-api-v3-sdk-1.0.0.jar
* target/sib-api-v3-sdk-1.0.1.jar
* target/lib/*.jar

## Getting Started
Expand Down
2 changes: 1 addition & 1 deletion docs/SendEmail.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Name | Type | Description | Notes
**emailCc** | **List&lt;String&gt;** | Email addresses of the recipients in cc | [optional]
**replyTo** | **String** | Email on which campaign recipients will be able to reply to | [optional]
**attachmentUrl** | **String** | Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional]
**attachment** | [**List&lt;SendEmailAttachment&gt;**](SendEmailAttachment.md) | Pass the base64 content of the attachment. Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional]
**attachment** | [**List&lt;SendEmailAttachment&gt;**](SendEmailAttachment.md) | Pass the byte array of the attachment ( Encoded to base64 chunk data at our end ). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional]
**headers** | **Map&lt;String, String&gt;** | | [optional]
**attributes** | **Map&lt;String, String&gt;** | | [optional]

Expand Down
7 changes: 2 additions & 5 deletions docs/SendEmailAttachment.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**content** | **byte[]** | Base64 encoded chunk data of the attachment generated on the fly | [optional]
**name** | **String** | Required for content. Name of the attachment | [optional]



**content** | **byte[]** | Byte array of the attachment generated on the fly ( Encoded to base64 chunk data at our end ) | [optional]
**name** | **String** | Required for content. Name of the attachment | [optional]
2 changes: 1 addition & 1 deletion docs/SendSmtpEmail.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Name | Type | Description | Notes
**textContent** | **String** | Plain Text body of the message ( Ignored if templateId is passed ) | [optional]
**subject** | **String** | Subject of the message |
**replyTo** | [**SendSmtpEmailReplyTo**](SendSmtpEmailReplyTo.md) | | [optional]
**attachment** | [**List&lt;SendSmtpEmailAttachment&gt;**](SendSmtpEmailAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional]
**attachment** | [**List&lt;SendSmtpEmailAttachment&gt;**](SendSmtpEmailAttachment.md) | Pass the absolute URL (no local file) or the byte array of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional]
**headers** | **Map&lt;String, String&gt;** | | [optional]
**templateId** | **Long** | Id of the template | [optional]
**params** | **Map&lt;String, String&gt;** | | [optional]
Expand Down
7 changes: 2 additions & 5 deletions docs/SendSmtpEmailAttachment.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**url** | **String** | Absolute url of the attachment (no local file). | [optional]
**content** | **byte[]** | Base64 encoded chunk data of the attachment generated on the fly | [optional]
**name** | **String** | Required for content. Name of the attachment | [optional]



**content** | **byte[]** | Byte array of the attachment generated on the fly ( Encoded to base64 chunk data at our end ) | [optional]
**name** | **String** | Required for content. Name of the attachment | [optional]
30 changes: 18 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>sib-api-v3-sdk</artifactId>
<packaging>jar</packaging>
<name>sib-api-v3-sdk</name>
<version>1.0.0</version>
<version>1.0.1</version>
<url>https://github.com/sendinblue/APIv3-java-library</url>
<description>SendinBlue&#39;s API v3 Java Library</description>
<scm>
Expand Down Expand Up @@ -126,7 +126,7 @@
<configuration>
<sources>
<source>
src/main/java</source>
src/main/java</source>
</sources>
</configuration>
</execution>
Expand All @@ -139,7 +139,7 @@
<configuration>
<sources>
<source>
src/test/java</source>
src/test/java</source>
</sources>
</configuration>
</execution>
Expand Down Expand Up @@ -209,6 +209,11 @@
<artifactId>okhttp</artifactId>
<version>${okhttp-version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>${okio-version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp</groupId>
<artifactId>logging-interceptor</artifactId>
Expand All @@ -224,11 +229,11 @@
<artifactId>gson-fire</artifactId>
<version>${gson-fire-version}</version>
</dependency>
<dependency>
<groupId>org.threeten</groupId>
<artifactId>threetenbp</artifactId>
<version>${threetenbp-version}</version>
</dependency>
<dependency>
<groupId>org.threeten</groupId>
<artifactId>threetenbp</artifactId>
<version>${threetenbp-version}</version>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
Expand All @@ -243,14 +248,15 @@
</dependency>
</dependencies>
<properties>
<java.version>1.7</java.version>
<java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<gson-fire-version>1.8.0</gson-fire-version>
<gson-fire-version>1.8.2</gson-fire-version>
<swagger-core-version>1.5.15</swagger-core-version>
<okhttp-version>2.7.5</okhttp-version>
<gson-version>2.8.1</gson-version>
<threetenbp-version>1.3.5</threetenbp-version>
<okio-version>1.14.0</okio-version>
<gson-version>2.8.2</gson-version>
<threetenbp-version>1.3.5</threetenbp-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.12</junit-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/sendinblue/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public class ApiClient {
private KeyManager[] keyManagers;

private OkHttpClient httpClient;
private JSON json;
private Json json;

private HttpLoggingInterceptor loggingInterceptor;

Expand All @@ -82,7 +82,7 @@ public ApiClient() {

verifyingSsl = true;

json = new JSON();
json = new Json();

// Set default User-Agent.
setUserAgent("Swagger-Codegen/1.0.0/java");
Expand Down Expand Up @@ -139,7 +139,7 @@ public ApiClient setHttpClient(OkHttpClient httpClient) {
*
* @return JSON object
*/
public JSON getJSON() {
public Json getJSON() {
return json;
}

Expand All @@ -149,7 +149,7 @@ public JSON getJSON() {
* @param json JSON object
* @return Api client
*/
public ApiClient setJSON(JSON json) {
public ApiClient setJSON(Json json) {
this.json = json;
return this;
}
Expand Down
Loading