From a1896f9d9000f4113b593fce10af4616bcb3fc36 Mon Sep 17 00:00:00 2001 From: "vikram.sahu" Date: Wed, 26 Sep 2018 17:25:08 +0530 Subject: [PATCH] updating core class and abstract --- LICENSE | 222 +------- README.md | 251 ++++++--- docs/Attributes.md | 11 - docs/EmailApi.md | 128 ----- docs/EmailDetails.md | 15 - docs/Emailv1.md | 16 - docs/Files.md | 11 - docs/Settings.md | 16 - pom.xml | 185 ++----- src/main/java/com/pepipost/api/APIHelper.java | 505 ++++++++++++++++++ .../java/com/pepipost/api/Configuration.java | 13 + .../java/com/pepipost/api/PepipostClient.java | 42 ++ .../api/controllers/BaseController.java | 80 +++ .../api/controllers/EmailController.java | 163 ++++++ .../syncwrapper/APICallBackCatcher.java | 104 ++++ .../syncwrapper/SynchronousBase.java | 62 +++ .../pepipost/api/exceptions/APIException.java | 66 +++ .../pepipost/api/http/client/APICallBack.java | 27 + .../api/http/client/HttpCallBack.java | 25 + .../pepipost/api/http/client/HttpClient.java | 180 +++++++ .../pepipost/api/http/client/HttpContext.java | 35 ++ .../pepipost/api/http/client/OkClient.java | 423 +++++++++++++++ .../api/http/request/HttpBodyRequest.java | 57 ++ .../pepipost/api/http/request/HttpMethod.java | 18 + .../api/http/request/HttpRequest.java | 102 ++++ .../api/http/response/HttpResponse.java | 70 +++ .../api/http/response/HttpStringResponse.java | 34 ++ .../com/pepipost/api/models/Attachments.java | 50 ++ .../api/models/AttachmentsBuilder.java | 36 ++ .../com/pepipost/api/models/Attribute.java | 50 ++ .../pepipost/api/models/AttributeBuilder.java | 36 ++ .../com/pepipost/api/models/EmailBody.java | 169 ++++++ .../api/models/EmailBodyAttachments.java | 50 ++ .../models/EmailBodyAttachmentsBuilder.java | 36 ++ .../pepipost/api/models/EmailBodyBuilder.java | 71 +++ .../java/com/pepipost/api/models/From.java | 50 ++ .../com/pepipost/api/models/FromBuilder.java | 36 ++ .../pepipost/api/models/Personalizations.java | 118 ++++ .../api/models/PersonalizationsBuilder.java | 59 ++ .../pepipost/api/models/SendEmailError.java | 50 ++ .../api/models/SendEmailErrorBuilder.java | 36 ++ .../api/models/SendEmailResponse.java | 67 +++ .../api/models/SendEmailResponseBuilder.java | 36 ++ .../com/pepipost/api/models/Settings.java | 101 ++++ .../pepipost/api/models/SettingsBuilder.java | 51 ++ target/classes/META-INF/MANIFEST.MF | 5 + .../PepipostLib/PepipostLib/pom.properties | 7 + .../maven/PepipostLib/PepipostLib/pom.xml | 81 +++ .../com/pepipost/api/APIHelper$1.class | Bin 0 -> 1131 bytes .../com/pepipost/api/APIHelper$2.class | Bin 0 -> 616 bytes .../classes/com/pepipost/api/APIHelper.class | Bin 0 -> 13239 bytes .../com/pepipost/api/Configuration.class | Bin 0 -> 439 bytes .../com/pepipost/api/PepipostClient.class | Bin 0 -> 939 bytes .../api/controllers/BaseController.class | Bin 0 -> 1819 bytes .../api/controllers/EmailController$1$1.class | Bin 0 -> 995 bytes .../controllers/EmailController$1$2$1.class | Bin 0 -> 920 bytes .../api/controllers/EmailController$1$2.class | Bin 0 -> 3330 bytes .../api/controllers/EmailController$1.class | Bin 0 -> 3290 bytes .../api/controllers/EmailController.class | Bin 0 -> 2623 bytes .../syncwrapper/APICallBackCatcher.class | Bin 0 -> 2403 bytes .../syncwrapper/SynchronousBase.class | Bin 0 -> 1061 bytes .../api/exceptions/APIException.class | Bin 0 -> 1659 bytes .../api/http/client/APICallBack.class | Bin 0 -> 429 bytes .../api/http/client/HttpCallBack.class | Bin 0 -> 283 bytes .../pepipost/api/http/client/HttpClient.class | Bin 0 -> 2467 bytes .../api/http/client/HttpContext.class | Bin 0 -> 873 bytes .../pepipost/api/http/client/OkClient$1.class | Bin 0 -> 1573 bytes .../pepipost/api/http/client/OkClient$2.class | Bin 0 -> 1525 bytes .../pepipost/api/http/client/OkClient.class | Bin 0 -> 15102 bytes .../api/http/request/HttpBodyRequest.class | Bin 0 -> 1884 bytes .../api/http/request/HttpMethod.class | Bin 0 -> 1290 bytes .../api/http/request/HttpRequest.class | Bin 0 -> 2716 bytes .../api/http/response/HttpResponse.class | Bin 0 -> 1781 bytes .../http/response/HttpStringResponse.class | Bin 0 -> 957 bytes .../com/pepipost/api/models/Attachments.class | Bin 0 -> 1063 bytes .../api/models/AttachmentsBuilder.class | Bin 0 -> 923 bytes .../com/pepipost/api/models/Attribute.class | Bin 0 -> 1027 bytes .../api/models/AttributeBuilder.class | Bin 0 -> 887 bytes .../com/pepipost/api/models/EmailBody.class | Bin 0 -> 3530 bytes .../api/models/EmailBodyAttachments.class | Bin 0 -> 1090 bytes .../models/EmailBodyAttachmentsBuilder.class | Bin 0 -> 995 bytes .../api/models/EmailBodyBuilder.class | Bin 0 -> 2672 bytes .../com/pepipost/api/models/From.class | Bin 0 -> 1036 bytes .../com/pepipost/api/models/FromBuilder.class | Bin 0 -> 863 bytes .../api/models/Personalizations.class | Bin 0 -> 2624 bytes .../api/models/PersonalizationsBuilder.class | Bin 0 -> 2060 bytes .../pepipost/api/models/SendEmailError.class | Bin 0 -> 1124 bytes .../api/models/SendEmailErrorBuilder.class | Bin 0 -> 1015 bytes .../api/models/SendEmailResponse.class | Bin 0 -> 1503 bytes .../api/models/SendEmailResponseBuilder.class | Bin 0 -> 1143 bytes .../com/pepipost/api/models/Settings.class | Bin 0 -> 1797 bytes .../pepipost/api/models/SettingsBuilder.class | Bin 0 -> 1348 bytes 92 files changed, 3459 insertions(+), 597 deletions(-) delete mode 100644 docs/Attributes.md delete mode 100644 docs/EmailApi.md delete mode 100644 docs/EmailDetails.md delete mode 100644 docs/Emailv1.md delete mode 100644 docs/Files.md delete mode 100644 docs/Settings.md create mode 100644 src/main/java/com/pepipost/api/APIHelper.java create mode 100644 src/main/java/com/pepipost/api/Configuration.java create mode 100644 src/main/java/com/pepipost/api/PepipostClient.java create mode 100644 src/main/java/com/pepipost/api/controllers/BaseController.java create mode 100644 src/main/java/com/pepipost/api/controllers/EmailController.java create mode 100644 src/main/java/com/pepipost/api/controllers/syncwrapper/APICallBackCatcher.java create mode 100644 src/main/java/com/pepipost/api/controllers/syncwrapper/SynchronousBase.java create mode 100644 src/main/java/com/pepipost/api/exceptions/APIException.java create mode 100644 src/main/java/com/pepipost/api/http/client/APICallBack.java create mode 100644 src/main/java/com/pepipost/api/http/client/HttpCallBack.java create mode 100644 src/main/java/com/pepipost/api/http/client/HttpClient.java create mode 100644 src/main/java/com/pepipost/api/http/client/HttpContext.java create mode 100644 src/main/java/com/pepipost/api/http/client/OkClient.java create mode 100644 src/main/java/com/pepipost/api/http/request/HttpBodyRequest.java create mode 100644 src/main/java/com/pepipost/api/http/request/HttpMethod.java create mode 100644 src/main/java/com/pepipost/api/http/request/HttpRequest.java create mode 100644 src/main/java/com/pepipost/api/http/response/HttpResponse.java create mode 100644 src/main/java/com/pepipost/api/http/response/HttpStringResponse.java create mode 100644 src/main/java/com/pepipost/api/models/Attachments.java create mode 100644 src/main/java/com/pepipost/api/models/AttachmentsBuilder.java create mode 100644 src/main/java/com/pepipost/api/models/Attribute.java create mode 100644 src/main/java/com/pepipost/api/models/AttributeBuilder.java create mode 100644 src/main/java/com/pepipost/api/models/EmailBody.java create mode 100644 src/main/java/com/pepipost/api/models/EmailBodyAttachments.java create mode 100644 src/main/java/com/pepipost/api/models/EmailBodyAttachmentsBuilder.java create mode 100644 src/main/java/com/pepipost/api/models/EmailBodyBuilder.java create mode 100644 src/main/java/com/pepipost/api/models/From.java create mode 100644 src/main/java/com/pepipost/api/models/FromBuilder.java create mode 100644 src/main/java/com/pepipost/api/models/Personalizations.java create mode 100644 src/main/java/com/pepipost/api/models/PersonalizationsBuilder.java create mode 100644 src/main/java/com/pepipost/api/models/SendEmailError.java create mode 100644 src/main/java/com/pepipost/api/models/SendEmailErrorBuilder.java create mode 100644 src/main/java/com/pepipost/api/models/SendEmailResponse.java create mode 100644 src/main/java/com/pepipost/api/models/SendEmailResponseBuilder.java create mode 100644 src/main/java/com/pepipost/api/models/Settings.java create mode 100644 src/main/java/com/pepipost/api/models/SettingsBuilder.java create mode 100644 target/classes/META-INF/MANIFEST.MF create mode 100644 target/classes/META-INF/maven/PepipostLib/PepipostLib/pom.properties create mode 100644 target/classes/META-INF/maven/PepipostLib/PepipostLib/pom.xml create mode 100644 target/classes/com/pepipost/api/APIHelper$1.class create mode 100644 target/classes/com/pepipost/api/APIHelper$2.class create mode 100644 target/classes/com/pepipost/api/APIHelper.class create mode 100644 target/classes/com/pepipost/api/Configuration.class create mode 100644 target/classes/com/pepipost/api/PepipostClient.class create mode 100644 target/classes/com/pepipost/api/controllers/BaseController.class create mode 100644 target/classes/com/pepipost/api/controllers/EmailController$1$1.class create mode 100644 target/classes/com/pepipost/api/controllers/EmailController$1$2$1.class create mode 100644 target/classes/com/pepipost/api/controllers/EmailController$1$2.class create mode 100644 target/classes/com/pepipost/api/controllers/EmailController$1.class create mode 100644 target/classes/com/pepipost/api/controllers/EmailController.class create mode 100644 target/classes/com/pepipost/api/controllers/syncwrapper/APICallBackCatcher.class create mode 100644 target/classes/com/pepipost/api/controllers/syncwrapper/SynchronousBase.class create mode 100644 target/classes/com/pepipost/api/exceptions/APIException.class create mode 100644 target/classes/com/pepipost/api/http/client/APICallBack.class create mode 100644 target/classes/com/pepipost/api/http/client/HttpCallBack.class create mode 100644 target/classes/com/pepipost/api/http/client/HttpClient.class create mode 100644 target/classes/com/pepipost/api/http/client/HttpContext.class create mode 100644 target/classes/com/pepipost/api/http/client/OkClient$1.class create mode 100644 target/classes/com/pepipost/api/http/client/OkClient$2.class create mode 100644 target/classes/com/pepipost/api/http/client/OkClient.class create mode 100644 target/classes/com/pepipost/api/http/request/HttpBodyRequest.class create mode 100644 target/classes/com/pepipost/api/http/request/HttpMethod.class create mode 100644 target/classes/com/pepipost/api/http/request/HttpRequest.class create mode 100644 target/classes/com/pepipost/api/http/response/HttpResponse.class create mode 100644 target/classes/com/pepipost/api/http/response/HttpStringResponse.class create mode 100644 target/classes/com/pepipost/api/models/Attachments.class create mode 100644 target/classes/com/pepipost/api/models/AttachmentsBuilder.class create mode 100644 target/classes/com/pepipost/api/models/Attribute.class create mode 100644 target/classes/com/pepipost/api/models/AttributeBuilder.class create mode 100644 target/classes/com/pepipost/api/models/EmailBody.class create mode 100644 target/classes/com/pepipost/api/models/EmailBodyAttachments.class create mode 100644 target/classes/com/pepipost/api/models/EmailBodyAttachmentsBuilder.class create mode 100644 target/classes/com/pepipost/api/models/EmailBodyBuilder.class create mode 100644 target/classes/com/pepipost/api/models/From.class create mode 100644 target/classes/com/pepipost/api/models/FromBuilder.class create mode 100644 target/classes/com/pepipost/api/models/Personalizations.class create mode 100644 target/classes/com/pepipost/api/models/PersonalizationsBuilder.class create mode 100644 target/classes/com/pepipost/api/models/SendEmailError.class create mode 100644 target/classes/com/pepipost/api/models/SendEmailErrorBuilder.class create mode 100644 target/classes/com/pepipost/api/models/SendEmailResponse.class create mode 100644 target/classes/com/pepipost/api/models/SendEmailResponseBuilder.class create mode 100644 target/classes/com/pepipost/api/models/Settings.class create mode 100644 target/classes/com/pepipost/api/models/SettingsBuilder.class diff --git a/LICENSE b/LICENSE index 8dada3e..bb58f7b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,21 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +MIT License + +Copyright (c) 2018 Vikram Sahu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 4bde002..1591f91 100644 --- a/README.md +++ b/README.md @@ -1,103 +1,208 @@ -# Pepipost Java SDK +![pepipostlogo](https://pepipost.com/assets/img/pepipost-footLogo.png) -This is a JavaSDK/Client for Pepipost's API. +[![Twitter Follow](https://img.shields.io/twitter/follow/pepi_post.svg?style=social&label=Follow)](https://twitter.com/pepi_post) -## Requirements +# Official Java library :coffee: for [Pepipost](http://www.pepipost.com/?utm_campaign=GitHubSDK&utm_medium=GithubSDK&utm_source=GithubSDK) -Building the API client library requires [Maven](https://maven.apache.org/) to be installed. +This library contains methods for easily interacting with the Pepipost Email Sending API to send emails within few seconds. -## Installation +We are trying to make our libraries Community Driven- which means we need your help in building the right things in proper order we would request you to help us by sharing comments, creating new [issues](https://github.com/pepipost/pepipost-sdk-java/issues) or [pull requests](https://github.com/pepipost/pepipost-sdk-java/pulls). +We welcome any sort of contribution to this library. -```shell +The latest 2.5.0 version of this library provides is fully compatible with the latest Pepipost v2.0 API. -mkdir pepipost-sdk-java +For any update of this library check [Releases](https://github.com/pepipost/pepipost-sdk-java/releases). -cd pepipost-sdk-java +# Table of Content + +* [Installation](#installation) +* [Quick Start](#quick-start) +* [Usage of library in Project](#inproject) +* [Sample Example](#eg) +* [Announcements](#announcements) +* [Roadmap](#roadmap) +* [About](#about) +* [License](#license) -git clone https://github.com/pepipost/pepipost-sdk-java.git . + +# Installation -mvn install + +## Prerequisites +* Java version Oracle JDK 7, 8 or OpenJDK 7 +* Java Maven Dependencies + * Jackson + * UniRest + * Apache HttpClient +* Java Development Enviromment (IDE). +* A free account on Pepipost. If you don't have a one, click [here]((https://app.pepipost.com/index.php/signup/registeruser?utm_campaign=GitHubSDK&utm_medium=GithubSDK&utm_source=GithubSDK)) to signup and get 30,000 emails free every month. -``` + +## Quick Start -Now create the Example.java (put the values of API key, email, etc as per your requirements) +This Java library uses few Maven Dependencies ([mentioned above](#prereq)). The reference to these dependencies are added in pom.xml file which will be installed automatically. Just need internet access for successful build. -```java +* [Download zip](https://github.com/pepipost/pepipost-sdk-java/archive/master.zip) or get a clone for the pepipost repository using -import io.swagger.client.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; -import io.swagger.client.api.EmailApi; + ``` git clone https://github.com/pepipost/pepipost-sdk-java.git ``` -import java.io.File; -import java.util.*; +* In order to open the client library in Eclipse click on ``` File -> Import ```. + + ![Importing SDK into Eclipse - Step 1](https://apidocs.io/illustration/java?step=import0&workspaceFolder=pepipost-Java&workspaceName=Pepipost&projectName=PepipostLib&rootNamespace=com.pepipost.api) + +* In the import dialog, select ``` Existing Java Project ``` and click ``` Next ```. + + ![Importing SDK into Eclipse - Step 2](https://apidocs.io/illustration/java?step=import1&workspaceFolder=pepipost-Java&workspaceName=Pepipost&projectName=PepipostLib&rootNamespace=com.pepipost.api) + +* Browse to locate the folder containing the source code. Select the detected location of the project and click ``` Finish ```. + + ![Importing SDK into Eclipse - Step 3](https://apidocs.io/illustration/java?step=import2&workspaceFolder=pepipost-Java&workspaceName=Pepipost&projectName=PepipostLib&rootNamespace=com.pepipost.api) + +* Upon successful import, the project will be automatically built by Eclipse after automatically resolving the dependencies. + + ![Importing SDK into Eclipse - Step 4](https://apidocs.io/illustration/java?step=import3&workspaceFolder=pepipost-Java&workspaceName=Pepipost&projectName=PepipostLib&rootNamespace=com.pepipost.api) + + +### Usage of Pepipost library in project + +1. Starting a new project + + * Click the menu command ``` File > New > Project ```. + + ![Add a new project in Eclipse](https://apidocs.io/illustration/java?step=createNewProject0&workspaceFolder=pepipost-Java&workspaceName=Pepipost&projectName=PepipostLib&rootNamespace=com.pepipost.api) + + * Choose ``` Maven > Maven Project ```. + + * Click ``` Next ```. + + ![Create a new Maven Project - Step 1](https://apidocs.io/illustration/java?step=createNewProject1&workspaceFolder=pepipost-Java&workspaceName=Pepipost&projectName=PepipostLib&rootNamespace=com.pepipost.api) + + * Here, make sure to use the current workspace by choosing ``` Use default Workspace location ```, as shown in the screenshot below. + + * Click ``` Next ```. + + ![Create a new Maven Project - Step 2](https://apidocs.io/illustration/java?step=createNewProject2&workspaceFolder=pepipost-Java&workspaceName=Pepipost&projectName=PepipostLib&rootNamespace=com.pepipost.api) + + * Select the *quick start* project type to create a simple project with an existing class. + * A ``` main ``` method. + * To do this, choose ``` maven-archetype-quickstart ``` item from the list. + * Click ``` Next ```. + + ![Create a new Maven Project - Step 3](https://apidocs.io/illustration/java?step=createNewProject3&workspaceFolder=pepipost-Java&workspaceName=Pepipost&projectName=PepipostLib&rootNamespace=com.pepipost.api) -public class Example { - - public static void main(String[] args) { - //Getting the SDK object - EmailApi pepipostSDK = new EmailApi(); - - //Getting the data object - Emailv1 data = new Emailv1(); // Emailv1 | Data in JSON format - - //setting the apikey - data.setApiKey("yoursecretapikey"); - - //setting the data - EmailDetails email_details = new EmailDetails(); // Emailv1 | Data in JSON format - email_details.setFromname("yourfromname"); - email_details.setFrom("from@example.com"); - email_details.subject("This is the test email subject sent via Pepipost Java SDK"); - email_details.setContent("

hi, this is a test email sent via Pepipost Java SDK using its JSON API.

"); - data.setEmailDetails(email_details); - - //adding recipients - List recipients = new ArrayList(); - recipients.add("to@example.com"); - data.setRecipients(recipients); - - //making the call - try { - pepipostSDK.apiWebSendJsonPost(data); - System.out.println("Email sent successfully."); - } catch (ApiException e) { - System.out.println("Exception occurred while calling Pepipost API"); - System.out.println("Errormessage("+e.getMessage()+")"); - System.out.println("Errorcode("+e.getCode()+")"); - //e.printStackTrace(); - } + * In the last step, provide a ``` Group Id ```.and ``` Artifact Id ``` as shown in the picture below. + * Click ``` Finish ```. + + ![Create a new Maven Project - Step 4](https://apidocs.io/illustration/java?step=createNewProject4&workspaceFolder=pepipost-Java&workspaceName=Pepipost&projectName=PepipostLib&rootNamespace=com.pepipost.api) + +2. Add reference of the library project + + * The created Maven project manages its dependencies using its ``` pom.xml ``` file. + * In order to add a dependency on the **PepipostLib** client library, double click on the ``` pom.xml ``` file in the ``` Package Explorer ```. + * Opening the ``` pom.xml ``` file will render a graphical view on the canvas. + * Here, switch to the ``` Dependencies ``` tab. + * Click the ``` Add ``` button as shown in the picture below. + + ![Adding dependency to the client library - Step 1](https://apidocs.io/illustration/java?step=testProject0&workspaceFolder=pepipost-Java&workspaceName=Pepipost&projectName=PepipostLib&rootNamespace=com.pepipost.api) + + * Click the ``` Add ``` button. A dialog will open, where you need to specify Pepipost in ``` Group Id ``` and PepipostLib in the ``` Artifact Id ``` fields. + * Once added click ``` OK ```. + * Save the ``` pom.xml ``` file. + + ![Adding dependency to the client library - Step 2](https://apidocs.io/illustration/java?step=testProject1&workspaceFolder=pepipost-Java&workspaceName=Pepipost&projectName=PepipostLib&rootNamespace=com.pepipost.api) + +3. Getting started with code + + * Once the ``` SimpleConsoleApp ``` is created, a file named ``` App.java ``` will be visible in the *Package Explorer* with a ``` main ``` method. + * This is the entry point for the execution of the created project. + + ![Adding dependency to the client library - Step 2](https://apidocs.io/illustration/java?step=testProject2&workspaceFolder=pepipost-Java&workspaceName=Pepipost&projectName=PepipostLib&rootNamespace=com.pepipost.api) + + +## Sample Usage + +```java +package testApp.SimpleConsoleApp; +import com.pepipost.api.*; +import com.pepipost.api.models.*; +import com.pepipost.api.controllers.*; +import com.pepipost.api.http.client.*; +import java.util.*; +import java.io.*; +import com.fasterxml.jackson.core.JsonProcessingException; + +public class App { + + public static void main(String[] args) throws JsonProcessingException { + + PepipostClient client = new PepipostClient(); + + EmailController emailController = client.getEmail(); + String apiKey = "my-api-here"; + EmailBody body = new EmailBody(); + + body.setPersonalizations(new LinkedList()); + Personalizations body_personalizations_0 = new Personalizations(); + + body_personalizations_0.setRecipient("your-rcpt_email@gmail.com"); + body.getPersonalizations().add(body_personalizations_0); + body.setTags("tagsjava"); + body.setFrom(new From()); + + body.getFrom().setFromEmail("my-verified-domain@m3m.in"); + body.getFrom().setFromName("info"); + body.setSubject("JAVA SDK"); + body.setContent("Test mail ready to sent"); + body.setSettings(new Settings()); + + body.getSettings().setFooter(0); + body.getSettings().setClicktrack(1); + body.getSettings().setOpentrack(1); + body.getSettings().setUnsubscribe(1); + + + emailController.createSendEmailAsync(apiKey, body, new APICallBack() { + public void onSuccess(HttpContext context, SendEmailResponse response) { + // TODO success callback handler + System.out.print("Message :: " + response.getMessage() + "\n" + "Error :: " + response.getErrorInfo().getErrorMessage()); + } + public void onFailure(HttpContext context, Throwable error) { + System.out.print(context.getResponse()); + } + + }); } } ``` -Compile the Example.java -``` -javac -cp '.:target/pepipost-sdk-java-1.0.0.jar:target/lib/*' Example.java -``` -Now run +* Change your api-key and sending domain respectively + * **apikey** will be available under Login to Pepipost -> Settings -> Integration + * **Sending Domain** will be available under Login to Pepiost -> Settings -> Sending Domains + ``` -java -cp '.:target/pepipost-sdk-java-1.0.0.jar:target/lib/*' Example + *Note :: Domains showing with Active status on Sending Domain dashboard are only allowed to send any sort of emails.* In case there are no Sending Domain added under your account, then first add the domain, get the DNS (SPF/DKIM) settings done and get it reviewed by our compliance team for approval. Once the domain is approved, it will be in ACTIVE status and will be ready to send any sort of emails. ``` +* Run your project -To get your api key, you need to signup at [Pepipost.com](http://pepipost.com/) - -## Documentation for API Endpoints - -For API documentation, please visit the below url: - -[**docs.pepipost.com**](https://docs.pepipost.com/send.web.json/) - + +# Announcements -## Recommendation +v2.5.0 has been released! Please see the [release notes](https://github.com/pepipost/pepipost-sdk-java/releases/) for details. -It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issue. +All updates to this library are documented in our [releases](https://github.com/pepipost/pepipost-sdk-java/releases). For any queries, feel free to reach out us at dx@pepipost.com -## Author -[Tabby](http://github.com/itabrezshaikh) + +## Roadmap -Thanks to Swagger Codegen Project. This library has been semi-automatically generated using [swagger codegen project](https://github.com/swagger-api/swagger-codegen) +If you are interested in the future direction of this project, please take a look at our open [issues](https://github.com/pepipost/pepipost-sdk-java/issues) and [pull requests](https://github.com/pepipost/pepipost-sdk-java/pulls). We would love to hear your feedback. + +## About +pepipost-sdk-java library is guided and supported by the [Pepipost Developer Experience Team](https://github.com/orgs/pepipost/teams/pepis/members) . +This pepipost library is maintained and funded by Pepipost Ltd. The names and logos for pepipost gem are trademarks of Pepipost Ltd. + +## License +This code library was semi-automatically generated by APIMATIC v2.0 and licensed under The MIT License (MIT). diff --git a/docs/Attributes.md b/docs/Attributes.md deleted file mode 100644 index ff351d3..0000000 --- a/docs/Attributes.md +++ /dev/null @@ -1,11 +0,0 @@ - -# Attributes - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**NAME** | **List<String>** | | [optional] -**REGID** | **List<String>** | | [optional] - - - diff --git a/docs/EmailApi.md b/docs/EmailApi.md deleted file mode 100644 index 9e205c8..0000000 --- a/docs/EmailApi.md +++ /dev/null @@ -1,128 +0,0 @@ -# EmailApi - -All URIs are relative to *https://api.pepipost.com/* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**apiWebSendJsonPost**](EmailApi.md#apiWebSendJsonPost) | **POST** /api/web.send.json | -[**apiWebSendRestGet**](EmailApi.md#apiWebSendRestGet) | **GET** /api/web.send.rest | - - - -# **apiWebSendJsonPost** -> apiWebSendJsonPost(data) - - - -`Sending Mails` – This API is used for sending emails. Pepipost supports REST as well JSON formats for the input. This is JSON API. - -### Example -```java -// Import classes: -//import io.swagger.client.ApiException; -//import io.swagger.client.api.EmailApi; - - -EmailApi apiInstance = new EmailApi(); -Emailv1 data = new Emailv1(); // Emailv1 | Data in JSON format -try { - apiInstance.apiWebSendJsonPost(data); -} catch (ApiException e) { - System.err.println("Exception when calling EmailApi#apiWebSendJsonPost"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **data** | [**Emailv1**](Emailv1.md)| Data in JSON format | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -# **apiWebSendRestGet** -> apiWebSendRestGet(apiKey, from, subject, content, recipients, fromname, replytoid, footer, template, attachmentid, clicktrack, opentrack, bcc, ATT_NAME, X_APIHEADER, tags) - - - -`Sending Mails` – This API is used for sending emails. Pepipost supports REST as well JSON formats for the input - -### Example -```java -// Import classes: -//import io.swagger.client.ApiException; -//import io.swagger.client.api.EmailApi; - - -EmailApi apiInstance = new EmailApi(); -String apiKey = "apiKey_example"; // String | Your API Key -String from = "from_example"; // String | From email address -String subject = "subject_example"; // String | Subject of the Email -String content = "content_example"; // String | Email body in html (to use attributes to display dynamic values such as name, account number, etc. for ex. [% NAME %] for ATT_NAME , [% AGE %] for ATT_AGE etc.) -String recipients = "recipients_example"; // String | Email addresses for recipients (multiple values allowed) -String fromname = "fromname_example"; // String | Email Sender name -String replytoid = "replytoid_example"; // String | Reply to email address -Boolean footer = true; // Boolean | Set '0' or '1' in order to include footer or not -Integer template = 56; // Integer | Email template ID -String attachmentid = "attachmentid_example"; // String | specify uploaded attachments id (Multiple attachments are allowed) -Boolean clicktrack = true; // Boolean | set ‘0’ or ‘1’ in-order to disable or enable the click-track -Boolean opentrack = true; // Boolean | set open-track value to ‘0’ or ‘1’ in-order to disable or enable -String bcc = "bcc_example"; // String | Email address for bcc -String ATT_NAME = "ATT_NAME_example"; // String | Specify attributes followed by ATT_ for recipient to personalized email for ex. ATT_NAME for name, ATT_AGE for age etc. (Multiple attributes are allowed) -String X_APIHEADER = "X_APIHEADER_example"; // String | Your defined unique identifier -String tags = ""; // String | To relate each message. Useful for reports. -try { - apiInstance.apiWebSendRestGet(apiKey, from, subject, content, recipients, fromname, replytoid, footer, template, attachmentid, clicktrack, opentrack, bcc, ATT_NAME, X_APIHEADER, tags); -} catch (ApiException e) { - System.err.println("Exception when calling EmailApi#apiWebSendRestGet"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **apiKey** | **String**| Your API Key | - **from** | **String**| From email address | - **subject** | **String**| Subject of the Email | - **content** | **String**| Email body in html (to use attributes to display dynamic values such as name, account number, etc. for ex. [% NAME %] for ATT_NAME , [% AGE %] for ATT_AGE etc.) | - **recipients** | **String**| Email addresses for recipients (multiple values allowed) | - **fromname** | **String**| Email Sender name | [optional] - **replytoid** | **String**| Reply to email address | [optional] - **footer** | **Boolean**| Set '0' or '1' in order to include footer or not | [optional] [default to true] - **template** | **Integer**| Email template ID | [optional] - **attachmentid** | **String**| specify uploaded attachments id (Multiple attachments are allowed) | [optional] - **clicktrack** | **Boolean**| set ‘0’ or ‘1’ in-order to disable or enable the click-track | [optional] [default to true] - **opentrack** | **Boolean**| set open-track value to ‘0’ or ‘1’ in-order to disable or enable | [optional] [default to true] - **bcc** | **String**| Email address for bcc | [optional] - **ATT_NAME** | **String**| Specify attributes followed by ATT_ for recipient to personalized email for ex. ATT_NAME for name, ATT_AGE for age etc. (Multiple attributes are allowed) | [optional] - **X_APIHEADER** | **String**| Your defined unique identifier | [optional] - **tags** | **String**| To relate each message. Useful for reports. | [optional] [default to ] - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - diff --git a/docs/EmailDetails.md b/docs/EmailDetails.md deleted file mode 100644 index 7bee64e..0000000 --- a/docs/EmailDetails.md +++ /dev/null @@ -1,15 +0,0 @@ - -# EmailDetails - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**fromname** | **String** | | [optional] -**subject** | **String** | | [optional] -**from** | **String** | | [optional] -**replytoid** | **String** | | [optional] -**tags** | **String** | | [optional] -**content** | **String** | | [optional] - - - diff --git a/docs/Emailv1.md b/docs/Emailv1.md deleted file mode 100644 index b010e7c..0000000 --- a/docs/Emailv1.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Emailv1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiKey** | **String** | Your secret API Key | [optional] -**emailDetails** | [**EmailDetails**](EmailDetails.md) | | [optional] -**X_APIHEADER** | **List<String>** | | [optional] -**settings** | [**Settings**](Settings.md) | | [optional] -**recipients** | **List<String>** | | [optional] -**attributes** | [**Attributes**](Attributes.md) | | [optional] -**files** | [**Files**](Files.md) | | [optional] - - - diff --git a/docs/Files.md b/docs/Files.md deleted file mode 100644 index ffb7cfd..0000000 --- a/docs/Files.md +++ /dev/null @@ -1,11 +0,0 @@ - -# Files - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**exampleAttachment1Txt** | **String** | | [optional] -**exampleAttachment2Txt** | **String** | | [optional] - - - diff --git a/docs/Settings.md b/docs/Settings.md deleted file mode 100644 index 54d3237..0000000 --- a/docs/Settings.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Settings - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**footer** | **Boolean** | | [optional] -**clicktrack** | **Boolean** | | [optional] -**opentrack** | **Boolean** | | [optional] -**unsubscribe** | **Boolean** | | [optional] -**bcc** | **String** | | [optional] -**attachmentid** | **String** | | [optional] -**template** | **Integer** | | [optional] - - - diff --git a/pom.xml b/pom.xml index d17acbd..abdc777 100644 --- a/pom.xml +++ b/pom.xml @@ -1,148 +1,81 @@ - + + 4.0.0 - io.swagger - pepipost-sdk-java + + PepipostLib + PepipostLib + 2.5.0 jar - pepipost-sdk-java - 1.0.0 - - scm:git:git@github.com:pepipost/pepipost-sdk-java.git - scm:git:git@github.com:pepipost/pepipost-sdk-java.git - https://github.com/pepipost/pepipost-sdk-java - - - 2.2.0 - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.12 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - pertest - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - + PepipostLib + + + + jitpack.io + https://jitpack.io + + - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - - jar - test-jar - - - - - - + + 2.9.0 + - - org.codehaus.mojo - build-helper-maven-plugin - 1.10 - - - add_sources - generate-sources - - add-source - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - src/test/java - - - - - - - - io.swagger - swagger-annotations - ${swagger-core-version} + com.squareup.okhttp3 + okhttp + 3.10.0 - com.squareup.okhttp - okhttp - ${okhttp-version} + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} - com.squareup.okhttp - logging-interceptor - ${okhttp-version} + com.fasterxml.jackson.core + jackson-core + ${jackson.version} - com.google.code.gson - gson - ${gson-version} + com.fasterxml.jackson.core + jackson-annotations + ${jackson.version} - joda-time - joda-time - ${jodatime-version} + org.apache.httpcomponents + httpasyncclient + 4.0.1 + + + org.apache.httpcomponents + httpclient + 4.4.1 + + + org.apache.httpcomponents + httpcore + 4.4.1 + + + org.apache.httpcomponents + httpmime + 4.3.4 + + + org.apache.httpcomponents + httpcore-nio + 4.3.2 - - junit junit - ${junit-version} + 4.12 test - - 1.7 - ${java.version} - ${java.version} - 1.5.9 - 2.7.5 - 2.6.2 - 2.9.3 - 1.0.0 - 4.12 - UTF-8 - - + \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/APIHelper.java b/src/main/java/com/pepipost/api/APIHelper.java new file mode 100644 index 0000000..f1ae352 --- /dev/null +++ b/src/main/java/com/pepipost/api/APIHelper.java @@ -0,0 +1,505 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api; + +import java.io.File; +import java.io.IOException; +import java.io.InvalidObjectException; +import java.lang.annotation.Annotation; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.net.URLEncoder; + +import java.util.*; +import java.util.AbstractMap.SimpleEntry; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.pepipost.api.exceptions.APIException; + +public class APIHelper { + /* used for async execution of API calls using a thread pool */ + private static ExecutorService scheduler = null; + private static Object syncRoot = new Object(); + + /** + * Singleton access to the threadpool scheduler + */ + public static ExecutorService getScheduler() { + synchronized(syncRoot) { + if(null == scheduler) { + scheduler = Executors.newCachedThreadPool(); + } + return scheduler; + } + } + + /** + * Shutdown all the threads + */ + public static void shutdown() { + if(null != scheduler) { + scheduler.shutdown(); + } + } + + /* used for deserialization of json data */ + public static ObjectMapper mapper = new ObjectMapper() + { + private static final long serialVersionUID = -174113593500315394L; + { + configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + setSerializationInclusion(JsonInclude.Include.NON_NULL); + } + }; + + /** + * JSON Serialization of a given object. + * @param obj The object to serialize into JSON + * @return The serialized Json string representation of the given object + */ + public static String serialize(Object obj) + throws JsonProcessingException { + if(null == obj) + return null; + + return mapper.writeValueAsString(obj); + } + + /** + * JSON Deserialization of the given json string. + * @param json The json string to deserialize + * @param The type of the object to deserialize into + * @return The deserialized object + */ + public static T deserialize(String json, TypeReference typeReference) + throws IOException { + if (isNullOrWhiteSpace(json)) + return null; + + return mapper.readValue(json, typeReference); + } + + /** + * JSON Deserialization of the given json string. + * @param jParser The json parser for reading json to deserialize + * @param The type of the object to deserialize into + * @return The deserialized object + */ + public static T deserialize(String json, Class typeReference) + throws IOException { + if (isNullOrWhiteSpace(json)) + return null; + + return mapper.readValue(json, typeReference); + } + + /** + * Populates an object of an APIException subclass with the required properties. + * @param json The json string to deserialize + * @param The object to populate. + */ + public static void populate(String json, APIException obj) + throws IOException { + if (!isNullOrWhiteSpace(json)) + mapper.readerForUpdating(obj).readValue(json);; + } + + /** + * JSON Deserialization of the given json string. + * @param json The json string to deserialize + * @return The deserialized json as a Map + */ + public static LinkedHashMap deserialize(String json) + throws IOException { + if (isNullOrWhiteSpace(json)) + return null; + + TypeReference> typeRef + = new TypeReference>() {}; + return deserialize(json, typeRef); + } + + /** + * Replaces template parameters in the given url + * @param queryBuilder The query string builder to replace the template parameters + * @param parameters The parameters to replace in the url + */ + public static void appendUrlWithTemplateParameters(StringBuilder queryBuilder, Map parameters) { + //perform parameter validation + if (null == queryBuilder) + throw new IllegalArgumentException("Given value for parameter \"queryBuilder\" is invalid." ); + + if (null == parameters) + return; + + //iterate and append parameters + for (Map.Entry pair : parameters.entrySet()) { + String replaceValue = ""; + + //load element value as string + if (null == pair.getValue()) + replaceValue = ""; + else if (pair.getValue() instanceof Collection) + replaceValue = flattenCollection("", (Collection) pair.getValue(), "%s%s%s", '/'); + else + replaceValue = tryUrlEncode(pair.getValue().toString()); + + //find the template parameter and replace it with its value + replaceAll(queryBuilder, "{" + pair.getKey() + "}", replaceValue); + } + } + + /** + * Appends the given set of parameters to the given query string + * @param queryBuilder The query url string to append the parameters + * @param parameters The parameters to append + */ + public static void appendUrlWithQueryParameters(StringBuilder queryBuilder, Map parameters) { + //perform parameter validation + if (null == queryBuilder) + throw new IllegalArgumentException("Given value for parameter \"queryBuilder\" is invalid."); + + if (null == parameters) + return; + + //does the query string already has parameters + boolean hasParams = (queryBuilder.indexOf("?") > 0) || (queryBuilder.indexOf("http") != 0); + queryBuilder.append((hasParams) ? '&' : '?'); + + encodeObjectAsQueryString("", parameters, queryBuilder); + } + + /** + * Validates if the string is null, empty or whitespace + * @param s The string to validate + * @return The result of validation + */ + public static boolean isNullOrWhiteSpace(String s) { + if(s == null) + return true; + + int length = s.length(); + if (length > 0) { + for (int start = 0, middle = length / 2, end = length - 1; start <= middle; start++, end--) { + if (s.charAt(start) > ' ' || s.charAt(end) > ' ') { + return false; + } + } + return true; + } + return false; + } + + /** + * Replaces all occurrences of the given string in the string builder + * @param stringBuilder The string builder to update with replaced strings + * @param toReplace The string to replace in the string builder + * @param replaceWith The string to replace with + */ + public static void replaceAll(StringBuilder stringBuilder, String toReplace, String replaceWith) { + int index = stringBuilder.indexOf(toReplace); + + while (index != -1) { + stringBuilder.replace(index, index + toReplace.length(), replaceWith); + index += replaceWith.length(); // Move to the end of the replacement + index = stringBuilder.indexOf(toReplace, index); + } + } + + /** + * Removes null values from the given map + */ + public static void removeNullValues(Map map) { + if(map == null) + return; + map.values().removeAll(Collections.singleton(null)); + } + + /** + * Validates and processes the given Url + * @param url The given Url to process + * @return Pre-process Url as string + */ + public static String cleanUrl(StringBuilder url) + { + //ensure that the urls are absolute + Pattern pattern = Pattern.compile("^(https?://[^/]+)"); + Matcher matcher = pattern.matcher(url); + if (!matcher.find()) + throw new IllegalArgumentException("Invalid Url format."); + + //get the http protocol match + String protocol = matcher.group(1); + + //remove redundant forward slashes + String query = url.substring(protocol.length()); + query = query.replaceAll("//+", "/"); + + //return process url + return protocol.concat(query); + } + + /** + * Prepares Array style form fields from a given array of values + * @param value Value for the form fields + * @return Dictionary of form fields created from array elements + */ + public static List> prepareFormFields(Object value) { + List> formFields = new ArrayList>(); + if(value != null) { + try { + objectToList("", value, formFields, new HashSet()); + } catch (Exception ex) { + } + } + return formFields; + } + + /** + * Encodes a given object to url encoded string + * @param name + * @param obj + * @param objBuilder + */ + private static void encodeObjectAsQueryString(String name, Object obj, StringBuilder objBuilder) { + try { + if(obj == null) + return; + + List> objectList = new ArrayList>(); + objectToList(name, obj, objectList, new HashSet()); + boolean hasParam = false; + + List arrays = new ArrayList(); + + for (SimpleEntry pair : objectList) { + String paramKeyValPair; + String accessor = pair.getKey(); + //ignore nulls + Object value = pair.getValue(); + if(value == null) + continue; + + hasParam = true; + //load element value as string + paramKeyValPair = String.format("%s=%s&", accessor, tryUrlEncode(value.toString())); + objBuilder.append(paramKeyValPair); + + } + + //remove the last & + if(hasParam) { + objBuilder.setLength(objBuilder.length() - 1); + } + } catch (Exception ex) { + } + } + + /** + * Used for flattening a collection of objects into a string + * @param array Array of elements to flatten + * @param fmt Format string to use for array flattening + * @param separator Separator to use for string concat + * @return Representative string made up of array elements + */ + private static String flattenCollection(String elemName, Collection array, String fmt, char separator) { + StringBuilder builder = new StringBuilder(); + + //append all elements in the array into a string + for (Object element : array) { + String elemValue = null; + + //replace null values with empty string to maintain index order + if (null == element) { + elemValue = ""; + } else { + elemValue = element.toString(); + } + elemValue = tryUrlEncode(elemValue); + builder.append(String.format(fmt, elemName, elemValue, separator)); + } + + //remove the last separator, if appended + if ((builder.length() > 1) && (builder.charAt(builder.length() - 1) == separator)) + builder.deleteCharAt(builder.length() - 1); + + return builder.toString(); + } + + /** + * Tries Url encode using UTF-8 + * @param value The value to url encode + * @return + */ + private static String tryUrlEncode(String value) { + try { + return URLEncoder.encode(value, "UTF-8"); + }catch (Exception ex) { + return value; + } + } + + /** + * Converts a given object to a form encoded map + * @param objName Name of the object + * @param obj The object to convert into a map + * @param objectList The object list to populate + * @param processed List of objects hashCodes that are already parsed + * @throws InvalidObjectException + */ + private static void objectToList( + String objName, Object obj, List> objectList, HashSet processed) + throws InvalidObjectException { + //null values need not to be processed + if(obj == null) + return; + + //wrapper types are autoboxed, so reference checking is not needed + if(!isWrapperType(obj.getClass())) { + //avoid infinite recursion + if(processed.contains(objName.hashCode())) + return; + processed.add(objName.hashCode()); + } + + //process arrays + if(obj instanceof Collection) { + //process array + if((objName == null) ||(objName.isEmpty())) + throw new InvalidObjectException("Object name cannot be empty"); + + Collection array = (Collection) obj; + //append all elements in the array into a string + int index = 0; + for (Object element : array) { + //load key value pair + String key = String.format("%s[%d]", objName, index++); + loadKeyValuePairForEncoding(key, element, objectList, processed); + } + } else if(obj.getClass().isArray()) { + //process array + if((objName == null) ||(objName.isEmpty())) + throw new InvalidObjectException("Object name cannot be empty"); + + Object[] array = (Object[]) obj; + //append all elements in the array into a string + int index = 0; + for (Object element : array) { + //load key value pair + String key = String.format("%s[%d]", objName, index++); + loadKeyValuePairForEncoding(key, element, objectList, processed); + } + } else if(obj instanceof Map) { + //process map + Map map = (Map) obj; + //append all elements in the array into a string + for (Map.Entry pair : map.entrySet()) { + String attribName = pair.getKey().toString(); + String key = attribName; + if((objName != null) && (!objName.isEmpty())) { + key = String.format("%s[%s]", objName, attribName); + } + loadKeyValuePairForEncoding(key, pair.getValue(), objectList, processed); + } + } else if(obj instanceof UUID) { + String key = objName; + String value = obj.toString(); + //UUIDs can be converted to string + loadKeyValuePairForEncoding(key, value, objectList, processed); + } else { + //process objects + // invoke getter methods + Method[] methods = obj.getClass().getMethods(); + for (Method method : methods) { + //is a getter? + if ((method.getParameterTypes().length != 0) + || (!method.getName().startsWith("get"))) + continue; + + //get json attribute name + Annotation getterAnnotation = method.getAnnotation(JsonGetter.class); + if (getterAnnotation == null) + continue; + + //load key name + String attribName = ((JsonGetter) getterAnnotation).value(); + String key = attribName; + if ((objName != null) && (!objName.isEmpty())) { + key = String.format("%s[%s]", objName, attribName); + } + + try { + //load key value pair + Object value = method.invoke(obj); + loadKeyValuePairForEncoding(key, value, objectList, processed); + } catch (Exception ex) { + } + } + // load fields + Field[] fields = obj.getClass().getFields(); + for (Field field : fields) { + //load key name + String attribName = field.getName(); + String key = attribName; + if ((objName != null) && (!objName.isEmpty())) { + key = String.format("%s[%s]", objName, attribName); + } + + try { + //load key value pair + Object value = field.get(obj); + loadKeyValuePairForEncoding(key, value, objectList, processed); + } catch (Exception ex) { } + } + } + } + + /** + * While processing objects to map, decides whether to perform recursion or load value + * @param key The key to used for creating key value pair + * @param value The value to process against the given key + * @param objectList The object list to process with key value pair + * @param processed List of processed objects hashCodes + * @throws InvalidObjectException + */ + private static void loadKeyValuePairForEncoding( + String key, Object value, List> objectList, HashSet processed) + throws InvalidObjectException { + if(value == null) + return; + if (isWrapperType(value.getClass())) + objectList.add( new SimpleEntry(key, value)); + else + objectToList(key, value, objectList, processed); + } + + /** + * List of classes that are wrapped directly. This information is need when + * traversing object trees for reference matching + */ + private static final Set WRAPPER_TYPES = new HashSet(Arrays.asList( + Boolean.class, Character.class, Byte.class, Short.class, String.class, + Integer.class, Long.class, Float.class, Double.class, Void.class, File.class)); + + /** + * Checks if the given class can be wrapped directly + * @param clazz The given class + * @return true if the given class is an autoboxed class e.g., Integer + */ + private static boolean isWrapperType(Class clazz) { + return WRAPPER_TYPES.contains(clazz) || clazz.isPrimitive() || clazz.isEnum(); + } +} \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/Configuration.java b/src/main/java/com/pepipost/api/Configuration.java new file mode 100644 index 0000000..5810ef8 --- /dev/null +++ b/src/main/java/com/pepipost/api/Configuration.java @@ -0,0 +1,13 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api; + + +public class Configuration { + //The base Uri for API calls + public static String baseUri = "http://api.pepipost.com"; + +} diff --git a/src/main/java/com/pepipost/api/PepipostClient.java b/src/main/java/com/pepipost/api/PepipostClient.java new file mode 100644 index 0000000..eaf12ec --- /dev/null +++ b/src/main/java/com/pepipost/api/PepipostClient.java @@ -0,0 +1,42 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api; + +import com.pepipost.api.controllers.*; +import com.pepipost.api.http.client.HttpClient; + +public class PepipostClient { + /** + * Singleton access to Email controller + * @return Returns the EmailController instance + */ + public EmailController getEmail() { + return EmailController.getInstance(); + } + + /** + * Get the shared http client currently being used for API calls + * @return The http client instance currently being used + */ + public HttpClient getSharedHttpClient() { + return BaseController.getClientInstance(); + } + + /** + * Set a shared http client to be used for API calls + * @param httpClient The http client to use + */ + public void setSharedHttpClient(HttpClient httpClient) { + BaseController.setClientInstance(httpClient); + } + + /** + * Default constructor + */ + public PepipostClient() { + } + +} \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/controllers/BaseController.java b/src/main/java/com/pepipost/api/controllers/BaseController.java new file mode 100644 index 0000000..bee96d5 --- /dev/null +++ b/src/main/java/com/pepipost/api/controllers/BaseController.java @@ -0,0 +1,80 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.controllers; + +import com.pepipost.api.exceptions.*; +import com.pepipost.api.http.client.HttpClient; +import com.pepipost.api.http.client.HttpContext; +import com.pepipost.api.http.client.HttpCallBack; +import com.pepipost.api.http.client.OkClient; +import com.pepipost.api.http.response.HttpResponse; + +public abstract class BaseController { + /** + * Private variable to keep shared reference of client instance + */ + private static HttpClient clientInstance = null; + private static Object syncObject = new Object(); + + /** + * Protected variable to keep reference of httpCallBack instance if user provides any + */ + protected HttpCallBack httpCallBack = null; + + /** + * Get httpCallBack associated with this controller + * @return HttpCallBack + */ + public HttpCallBack getHttpCallBack() { + return httpCallBack; + } + + /** + * Set the httpCallBack for this controller + * @param httpCallBack + */ + public void setHttpCallBack(HttpCallBack httpCallBack) { + this.httpCallBack = httpCallBack; + } + + /** + * Shared instance of the Http client + * @return The shared instance of the http client + */ + public static HttpClient getClientInstance() { + synchronized (syncObject) { + if (null == clientInstance) { + clientInstance = OkClient.getSharedInstance(); + } + } + return clientInstance; + } + + /** + * Shared instance of the Http client + * @param client The shared instance of the http client + */ + public static void setClientInstance(HttpClient client) { + synchronized (syncObject) { + if (null != client) { + clientInstance = client; + } + } + } + + /** + * Validates the response against HTTP errors defined at the API level + * @param response The response recieved + * @param context Context of the request and the recieved response + */ + protected void validateResponse(HttpResponse response, HttpContext context) + throws APIException { + //get response status code to validate + int responseCode = response.getStatusCode(); + //if ((responseCode < 200) || (responseCode > 208)) //[200,208] = HTTP OK + // throw new APIException("HTTP Response Not OK", context); + } +} diff --git a/src/main/java/com/pepipost/api/controllers/EmailController.java b/src/main/java/com/pepipost/api/controllers/EmailController.java new file mode 100644 index 0000000..56c3133 --- /dev/null +++ b/src/main/java/com/pepipost/api/controllers/EmailController.java @@ -0,0 +1,163 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.controllers; + +import java.io.*; +import java.util.*; +import java.util.concurrent.*; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; + +import com.pepipost.api.*; +import com.pepipost.api.models.*; +import com.pepipost.api.exceptions.*; +import com.pepipost.api.http.client.HttpClient; +import com.pepipost.api.http.client.HttpContext; +import com.pepipost.api.http.request.HttpRequest; +import com.pepipost.api.http.response.HttpResponse; +import com.pepipost.api.http.response.HttpStringResponse; +import com.pepipost.api.http.client.APICallBack; +import com.pepipost.api.controllers.syncwrapper.APICallBackCatcher; + +public class EmailController extends BaseController { + //private static variables for the singleton pattern + private static Object syncObject = new Object(); + private static EmailController instance = null; + + /** + * Singleton pattern implementation + * @return The singleton instance of the EmailController class + */ + public static EmailController getInstance() { + synchronized (syncObject) { + if (null == instance) { + instance = new EmailController(); + } + } + return instance; + } + + /** + * This Endpoint sends emails with the credentials passed. + * @param apiKey Optional parameter: Generated header parameter. Example value ='5ce7096ed4bf2b39dfa932ff5fa84ed9ed8' + * @param body Optional parameter: The body passed will be json format. + * @return Returns the SendEmailResponse response from the API call + */ + public SendEmailResponse createSendEmail( + final String apiKey, + final EmailBody body + ) throws Throwable { + APICallBackCatcher callback = new APICallBackCatcher(); + createSendEmailAsync(apiKey, body, callback); + if(!callback.isSuccess()) + throw callback.getError(); + return callback.getResult(); + } + + /** + * This Endpoint sends emails with the credentials passed. + * @param apiKey Optional parameter: Generated header parameter. Example value ='5ce7096ed4bf2b39dfa932ff5fa84ed9ed8' + * @param body Optional parameter: The body passed will be json format. + * @return Returns the void response from the API call + */ + public void createSendEmailAsync( + final String apiKey, + final EmailBody body, + final APICallBack callBack + ) { + Runnable _responseTask = new Runnable() { + public void run() { + //the base uri for api requests + String _baseUri = Configuration.baseUri; + + //prepare query string for API call + StringBuilder _queryBuilder = new StringBuilder(_baseUri); + _queryBuilder.append("/v2/sendEmail"); + //validate and preprocess url + String _queryUrl = APIHelper.cleanUrl(_queryBuilder); + + //load all headers for the outgoing API request + Map _headers = new HashMap() { + private static final long serialVersionUID = -4724524578217928859L; + { + put( "api_key", apiKey ); + put( "user-agent", "APIMATIC 2.0" ); + put( "accept", "application/json" ); + put( "content-type", "application/json" ); + } + }; + + //prepare and invoke the API call request to fetch the response + HttpRequest _request; + try { + _request = getClientInstance().postBody(_queryUrl, _headers, APIHelper.serialize(body)); + } catch (JsonProcessingException jsonProcessingException) { + //let the caller know of the error + callBack.onFailure(null, jsonProcessingException); + return; + } + //invoke the callback before request if its not null + if (getHttpCallBack() != null) + { + getHttpCallBack().OnBeforeRequest(_request); + } + + //invoke request and get response + getClientInstance().executeAsStringAsync(_request, new APICallBack() { + public void onSuccess(HttpContext _context, HttpResponse _response) { + try { + + //invoke the callback after response if its not null + if (getHttpCallBack() != null) + { + getHttpCallBack().OnAfterResponse(_context); + } + + //Error handling using HTTP status codes + int _responseCode = _response.getStatusCode(); + if (_responseCode == 405) + throw new APIException("Method not allowed", _context); + + //handle errors defined at the API level + validateResponse(_response, _context); + + //extract result from the http response + String _responseBody = ((HttpStringResponse)_response).getBody(); + SendEmailResponse _result = APIHelper.deserialize(_responseBody, + new TypeReference(){}); + + //let the caller know of the success + callBack.onSuccess(_context, _result); + } catch (APIException error) { + //let the caller know of the error + callBack.onFailure(_context, error); + } catch (IOException ioException) { + //let the caller know of the caught IO Exception + callBack.onFailure(_context, ioException); + } catch (Exception exception) { + //let the caller know of the caught Exception + callBack.onFailure(_context, exception); + } + } + public void onFailure(HttpContext _context, Throwable _error) { + //invoke the callback after response if its not null + if (getHttpCallBack() != null) + { + getHttpCallBack().OnAfterResponse(_context); + } + + //let the caller know of the failure + callBack.onFailure(_context, _error); + } + }); + } + }; + + //execute async using thread pool + APIHelper.getScheduler().execute(_responseTask); + } + +} \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/controllers/syncwrapper/APICallBackCatcher.java b/src/main/java/com/pepipost/api/controllers/syncwrapper/APICallBackCatcher.java new file mode 100644 index 0000000..2d561db --- /dev/null +++ b/src/main/java/com/pepipost/api/controllers/syncwrapper/APICallBackCatcher.java @@ -0,0 +1,104 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.controllers.syncwrapper; + +import com.pepipost.api.http.client.APICallBack; +import com.pepipost.api.http.client.HttpContext; + +/** + * An APICallBack that captures the HTTP response and can be waited on + * + * An instance of this class can be passed to an API call as the APICallBack + * instance to capture the results of that call. Call await() to block until + * completion of the API call. Trying to get results of API call before + * calling wait() will also block. + * + * @param Type of the response object + */ +public class APICallBackCatcher extends SynchronousBase implements APICallBack { + + private T result = null; + private Throwable error = null; + private boolean success = false; + + /** + * Get the result from the API callback. + * Blocks if API call is not complete yet. + * @return + * @throws Throwable + */ + public T getResult() throws Throwable { + await(); + return result; + } + + /** + * Set API callback result + * @param response + */ + private void setResult(T response) { + this.result = response; + } + + /** + * Get the exception object thrown by this API callback if any. + * Blocks if API call is not complete yet. + * @return + * @throws InterruptedException + */ + public Throwable getError() throws InterruptedException { + await(); + return error; + } + + /** + * Set the exception object. + * @param error + */ + private void setError(Throwable error) { + this.error = error; + } + + /** + * Was the API call successful? + * Blocks if API call is not complete yet. + * @return + * @throws InterruptedException + */ + public boolean isSuccess() throws InterruptedException { + await(); + return success; + } + + /** + * Set the success for API call. + * @param success + */ + private void setSuccess(boolean success) { + this.success = success; + } + + /** + * On Success handler for APICallBack. + */ + public void onSuccess(HttpContext context, T response) { + setResult(response); + setSuccess(true); + setError(null); + markAsDone(); + } + + /** + * OnFailure handler for APICallBack. + */ + public void onFailure(HttpContext responseContext, Throwable error) { + setResult(null); + setSuccess(false); + setError(error); + markAsDone(); + } +} + diff --git a/src/main/java/com/pepipost/api/controllers/syncwrapper/SynchronousBase.java b/src/main/java/com/pepipost/api/controllers/syncwrapper/SynchronousBase.java new file mode 100644 index 0000000..a392beb --- /dev/null +++ b/src/main/java/com/pepipost/api/controllers/syncwrapper/SynchronousBase.java @@ -0,0 +1,62 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.controllers.syncwrapper; + +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +/** + * Base class to help convert an asynchronous callback to synchronous one + */ +public class SynchronousBase { + + private CountDownLatch lock; + + /** + * Initiate class with a task count + * @param count Number of tasks we will wait on + */ + public SynchronousBase(int count) { + this.lock = new CountDownLatch(count); + } + + /** + * Initiate class with a count down of one only + */ + public SynchronousBase() { + this(1); + } + + /** + * Mark as done one task + */ + protected void markAsDone() + { + lock.countDown(); + } + + /** + * Wait until all tasks are marked as done + * @throws InterruptedException + */ + public void await() throws InterruptedException { + lock.await(); + } + + /** + * Wait until all tasks are marked as done or timeout after given time + * @param timeout Time to wait + * @param unit Unit for time + * @return + * @throws InterruptedException + */ + public boolean await(long timeout, TimeUnit unit) throws InterruptedException { + boolean t = lock.await(timeout, unit); + return t; + } + +} + diff --git a/src/main/java/com/pepipost/api/exceptions/APIException.java b/src/main/java/com/pepipost/api/exceptions/APIException.java new file mode 100644 index 0000000..4e89ad5 --- /dev/null +++ b/src/main/java/com/pepipost/api/exceptions/APIException.java @@ -0,0 +1,66 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.exceptions; + +import java.io.IOException; +import java.io.InputStream; +import com.pepipost.api.APIHelper; +import com.pepipost.api.http.client.HttpContext; +import com.pepipost.api.http.response.HttpStringResponse; + +public class APIException extends Exception { + //UID for serialization + private static final long serialVersionUID = 6424174253911720338L; + + //private fields + private int responseCode; + + //private fields + private HttpContext httpContext; + + /** + * The HTTP response code from the API request + */ + public int getResponseCode() { + return (httpContext != null) ? httpContext.getResponse().getStatusCode() : -1; + } + + /** + * The HTTP response body from the API request + */ + public HttpContext getHttpContext() { + return httpContext; + } + + /** + * Initialization constructor + * @param reason The reason for throwing exception + */ + public APIException(String reason) { + super(reason); + } + + /** + * Initialization constructor + * @param reason The reason for throwing exception + * @param context The http context of the API exception + */ + public APIException(String reason, HttpContext context) { + super(reason); + this.httpContext = context; + + //if a derived exception class is used, then perform deserialization of response body + if (getClass().equals(APIException.class) + || (context == null) || (context.getResponse() == null) + || (context.getResponse().getRawBody() == null)) + return; + + try { + String response_body = ((HttpStringResponse)context.getResponse()).getBody(); + APIHelper.populate(response_body, this); + } catch (IOException ioException) { } + } +} \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/http/client/APICallBack.java b/src/main/java/com/pepipost/api/http/client/APICallBack.java new file mode 100644 index 0000000..9cb16f4 --- /dev/null +++ b/src/main/java/com/pepipost/api/http/client/APICallBack.java @@ -0,0 +1,27 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.http.client; + +import com.pepipost.api.http.client.HttpContext; + +/** + * Callback class for handling API calls with a templated response type T + */ +public interface APICallBack { + /** + * On Completed callback for API calls + * @param context The context of the API request + * @param response The response received from the API Call + */ + public void onSuccess(HttpContext context, T response); + + /** + * On Completed callback for API calls + * @param context The context of the API request + * @param error Any error detected during the API Call and/or deserialization + */ + public void onFailure(HttpContext context, Throwable error); +} \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/http/client/HttpCallBack.java b/src/main/java/com/pepipost/api/http/client/HttpCallBack.java new file mode 100644 index 0000000..dca7ba9 --- /dev/null +++ b/src/main/java/com/pepipost/api/http/client/HttpCallBack.java @@ -0,0 +1,25 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.http.client; + +import com.pepipost.api.http.request.HttpRequest; + +/** + * Callback to be called before and after the HTTP call for an endpoint is made + */ +public interface HttpCallBack { + /** + * Callback called just before the HTTP request is sent + * @param request The HTTP request to be executed + */ + public void OnBeforeRequest(HttpRequest request); + + /** + * Callback called just after the HTTP response is received + * @param context Context for the HTTP call + */ + public void OnAfterResponse(HttpContext context); +} \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/http/client/HttpClient.java b/src/main/java/com/pepipost/api/http/client/HttpClient.java new file mode 100644 index 0000000..0d51424 --- /dev/null +++ b/src/main/java/com/pepipost/api/http/client/HttpClient.java @@ -0,0 +1,180 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.http.client; + +import com.pepipost.api.exceptions.APIException; +import com.pepipost.api.http.request.HttpBodyRequest; +import com.pepipost.api.http.request.HttpRequest; +import com.pepipost.api.http.response.HttpResponse; +import java.util.Map; +import java.util.AbstractMap.SimpleEntry; +import java.util.List; + +public interface HttpClient { + + /** + * Sets a timeout for HTTP requests + * @param timeout The timeout in seconds + */ + public void setTimeout(long timeout); + + /** + * Execute a given HttpRequest to get string response back + * @param request The given HttpRequest to execute + * @param callBack Callback after execution + */ + public void executeAsStringAsync(final HttpRequest request, final APICallBack callBack); + + /** + * Execute a given HttpRequest to get binary response back + * @param request The given HttpRequest to execute + * @param callBack Callback after execution + */ + public void executeAsBinaryAsync(final HttpRequest request, final APICallBack callBack); + + /** + * Execute a given HttpRequest to get binary response back + * @param request The given HttpRequest to execute + */ + public HttpResponse executeAsBinary(final HttpRequest request) throws APIException; + + /** + * Execute a given HttpRequest to get string response back + * @param request The given HttpRequest to execute + */ + public HttpResponse executeAsString(final HttpRequest request) throws APIException; + + /** + * Create a simple HTTP GET request with basic authentication + */ + public HttpRequest get(String _queryUrl, + Map _headers, List> _parameters, + String _username, String _password); + + /** + * Create a simple HTTP GET request + */ + public HttpRequest get(String _queryUrl, + Map _headers, List> _parameters); + + /** + * Create a simple HTTP HEAD request with basic authentication + */ + public HttpRequest head(String _queryUrl, + Map _headers, List> _parameters, + String _username, String _password); + + /** + * Create a simple HTTP HEAD request + */ + public HttpRequest head(String _queryUrl, + Map _headers, List> _parameters); + + /** + * Create an HTTP POST request with parameters + */ + public HttpRequest post(String _queryUrl, + Map _headers, List> _parameters); + + + /** + * Create an HTTP POST request with parameters and with basic authentication + */ + public HttpRequest post(String _queryUrl, + Map _headers, List> _parameters, + String _username, String _password); + + /** + * Create an HTTP POST request with body + */ + public HttpBodyRequest postBody(String _queryUrl, + Map _headers, String _body); + + /** + * Create an HTTP POST request with body and with basic authentication + */ + public HttpBodyRequest postBody(String _queryUrl, + Map _headers, String _body, + String _username, String _password); + + /** + * Create an HTTP PUT request with parameters + */ + public HttpRequest put(String _queryUrl, + Map _headers, List> _parameters); + + /** + * Create an HTTP PUT request with parameters and with basic authentication + */ + HttpRequest put(String _queryUrl, + Map _headers, List> _parameters, + String _username, String _password); + + /** + * Create an HTTP PUT request with body + */ + HttpBodyRequest putBody(String _queryUrl, + Map _headers, String _body); + + /** + * Create an HTTP PUT request with body and with basic authentication + */ + public HttpBodyRequest putBody(String _queryUrl, + Map _headers, String _body, + String _username, String _password); + + /** + * Create an HTTP PATCH request with parameters + */ + public HttpRequest patch(String _queryUrl, + Map _headers, List> _parameters); + + /** + * Create an HTTP PATCH request with parameters and with basic authentication + */ + HttpRequest patch(String _queryUrl, + Map _headers, List> _parameters, + String _username, String _password); + + /** + * Create an HTTP PATCH request with body + */ + public HttpBodyRequest patchBody(String _queryUrl, + Map _headers, String _body); + + /** + * Create an HTTP PATCH request with body and with basic authentication + */ + public HttpBodyRequest patchBody(String _queryUrl, + Map _headers, String _body, + String _username, String _password); + + /** + * Create an HTTP DELETE request with parameters + */ + HttpRequest delete(String _queryUrl, + Map _headers, List> _parameters); + + /** + * Create an HTTP DELETE request with parameters and with basic authentication + */ + public HttpRequest delete(String _queryUrl, + Map _headers, List> _parameters, + String _username, String _password); + + /** + * Create an HTTP DELETE request with body + */ + public HttpBodyRequest deleteBody(String _queryUrl, + Map _headers, String _body); + + /** + * Create an HTTP DELETE request with body and with basic authentication + */ + public HttpBodyRequest deleteBody(String _queryUrl, + Map _headers, String _body, + String _username, String _password); +} \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/http/client/HttpContext.java b/src/main/java/com/pepipost/api/http/client/HttpContext.java new file mode 100644 index 0000000..9882e95 --- /dev/null +++ b/src/main/java/com/pepipost/api/http/client/HttpContext.java @@ -0,0 +1,35 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.http.client; + +import com.pepipost.api.http.request.HttpRequest; +import com.pepipost.api.http.response.HttpResponse; + +public class HttpContext { + private HttpRequest _request; + private HttpResponse _response; + + public HttpContext(HttpRequest request, HttpResponse response) { + _request = request; + _response = response; + } + + /** + * Getter for the Http Request + * @return HttpRequest request + */ + public HttpRequest getRequest() { + return _request; + } + + /** + * Getter for the Http Response + * @return HttpResponse response + */ + public HttpResponse getResponse() { + return _response; + } +} \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/http/client/OkClient.java b/src/main/java/com/pepipost/api/http/client/OkClient.java new file mode 100644 index 0000000..7633429 --- /dev/null +++ b/src/main/java/com/pepipost/api/http/client/OkClient.java @@ -0,0 +1,423 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.http.client; + +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.util.AbstractMap.SimpleEntry; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.concurrent.TimeUnit; + +import com.pepipost.api.http.request.HttpBodyRequest; +import com.pepipost.api.http.request.HttpMethod; +import com.pepipost.api.http.request.HttpRequest; +import com.pepipost.api.http.response.HttpResponse; +import com.pepipost.api.http.response.HttpStringResponse; +import com.pepipost.api.exceptions.APIException; + + +public class OkClient implements HttpClient { + /** + * Private variables to implement singleton pattern + */ + private static Object synRoot = new Object(); + private static HttpClient sharedInstance = null; + private static okhttp3.OkHttpClient client = new okhttp3.OkHttpClient(); + + /** + * Singleton access to the shared instance + * @return A shared instance of UnirestClient + */ + public static HttpClient getSharedInstance() { + synchronized (synRoot) { + if (sharedInstance == null) { + sharedInstance = new OkClient(); + } + return sharedInstance; + } + } + + /** + * Sets a timeout for HTTP requests + * @param timeout The timeout in seconds + */ + public void setTimeout(long timeout) { + client = client.newBuilder().connectTimeout(timeout, TimeUnit.MILLISECONDS) + .writeTimeout(timeout, TimeUnit.MILLISECONDS).readTimeout(timeout, TimeUnit.MILLISECONDS).build(); + } + + /** + * Execute a given HttpRequest to get string response back + * @param request The given HttpRequest to execute + * @param callBack Async callback for events + */ + public void executeAsStringAsync(final HttpRequest httpRequest, final APICallBack callBack) { + okhttp3.Request okHttpRequest = convertRequest(httpRequest); + client.newCall(okHttpRequest).enqueue(new okhttp3.Callback() { + + public void onFailure(okhttp3.Call call, IOException e) { + publishResponse(null, httpRequest, callBack, e, false); + } + + public void onResponse(okhttp3.Call call, okhttp3.Response okHttpResponse) throws IOException { + publishResponse(okHttpResponse, httpRequest, callBack, null, false); + okHttpResponse.close(); + } + }); + } + + /** + * Execute a given HttpRequest to get binary response back + * @param request The given HttpRequest to execute + * @param callBack Async callback for events + */ + public void executeAsBinaryAsync(final HttpRequest httpRequest, final APICallBack callBack) { + okhttp3.Request okHttpRequest = convertRequest(httpRequest); + client.newCall(okHttpRequest).enqueue(new okhttp3.Callback() { + + public void onFailure(okhttp3.Call call, IOException e) { + publishResponse(null, httpRequest, callBack, e, true); + } + + public void onResponse(okhttp3.Call call, okhttp3.Response okHttpResponse) throws IOException { + publishResponse(okHttpResponse, httpRequest, callBack, null, true); + } + }); + } + + /** + * Execute a given HttpRequest to get string response back + * @param request The given HttpRequest to execute + */ + public HttpResponse executeAsString(HttpRequest httpRequest) throws APIException { + okhttp3.Request okHttpRequest = convertRequest(httpRequest); + try { + okhttp3.Response okHttpResponse = client.newCall(okHttpRequest).execute(); + return convertResponse(okHttpResponse, false); + } catch (IOException e) { + throw new APIException(e.getMessage()); + } + } + + /** + * Execute a given HttpRequest to get binary response back + * @param request The given HttpRequest to execute + */ + public HttpResponse executeAsBinary(HttpRequest httpRequest) throws APIException { + okhttp3.Request okHttpRequest = convertRequest(httpRequest); + try { + okhttp3.Response okHttpResponse = client.newCall(okHttpRequest).execute(); + return convertResponse(okHttpResponse, true); + } catch (IOException e) { + throw new APIException(e.getMessage()); + } + } + + /** + * Publishes success or failure result as HttpResponse from a HttpRequest + * @param okHttpResponse The okhttp response to publish + * @param httpRequest The internal http request + * @param completionBlock The success and failure code block reference to invoke the delegate + * @param error The reported errors for getting the http response + */ + protected static void publishResponse(okhttp3.Response okHttpResponse, HttpRequest httpRequest, + APICallBack completionBlock, Throwable error, boolean binaryResponse) { + try { + HttpResponse httpResponse = (okHttpResponse == null) ? null + : OkClient.convertResponse(okHttpResponse, binaryResponse); + HttpContext context = new HttpContext(httpRequest, httpResponse); + + // if there are no errors, pass on to the callback function + if (error == null && httpResponse != null) { + completionBlock.onSuccess(context, httpResponse); + } else { + completionBlock.onFailure(context, new APIException(error.getMessage())); + } + + } catch (IOException e) { + completionBlock.onFailure(null, new APIException(e.getMessage())); + } + } + + /** + * Converts a given OkHttp response into our internal http response model + * @param response The given OkHttp response + * @return The converted http response + * @throws IOException + */ + public static HttpResponse convertResponse(okhttp3.Response response, boolean binaryResponse) throws IOException { + HttpResponse httpResponse = null; + + if (null == response) { + return null; + } + + okhttp3.ResponseBody responseBody = response.body(); + + String responseString; + InputStream responseStream; + + if (binaryResponse) { + responseString = "binary response"; + responseStream = responseBody.byteStream(); + } else { + responseString = responseBody.string(); + responseStream = new ByteArrayInputStream(responseString.getBytes()); + + responseBody.close(); + response.close(); + } + + Map headers = new HashMap(); + for (Entry> kv : response.headers().toMultimap().entrySet()) + headers.put(kv.getKey(), kv.getValue().get(0)); + + httpResponse = new HttpStringResponse(response.code(), headers, responseStream, responseString); + return httpResponse; + } + + /** + * Converts a given internal http request into an okhttp request model + * @param request The given http request in internal format + * @return The converted okhttp request + */ + private okhttp3.Request convertRequest(HttpRequest httpRequest) { + String url = httpRequest.getQueryUrl(); + + okhttp3.RequestBody requestBody; + + if (httpRequest instanceof HttpBodyRequest) { + + // set request media type + String contentType; + if (!httpRequest.getHeaders().containsKey("content-type")) + httpRequest.getHeaders().put("content-type", "application/json; charset=UTF-8"); + contentType = httpRequest.getHeaders().get("content-type"); + + // set request body + requestBody = okhttp3.RequestBody.create(okhttp3.MediaType.parse(contentType), + ((HttpBodyRequest) httpRequest).getBody().getBytes()); + } else { + + List> parameters = httpRequest.getParameters(); + boolean multipartRequest = false; + + // set request fields + if (parameters != null && parameters.size() > 0) { + okhttp3.MultipartBody.Builder multipartBuilder = new okhttp3.MultipartBody.Builder() + .setType(okhttp3.MultipartBody.FORM); + okhttp3.FormBody.Builder formBuilder = new okhttp3.FormBody.Builder(); + + for (SimpleEntry param : parameters) { + if (param.getValue() instanceof File) { + multipartRequest = true; + multipartBuilder.addFormDataPart(param.getKey(), ((File) param.getValue()).getName(), + okhttp3.RequestBody.create(okhttp3.MultipartBody.FORM, (File) param.getValue())); + } else { + multipartBuilder.addFormDataPart(param.getKey(), + (param.getValue() == null) ? "" : param.getValue().toString()); + formBuilder.add(param.getKey(), (param.getValue() == null) ? "" : param.getValue().toString()); + } + } + // make a multipart request if a file is being sent + if (multipartRequest) { + requestBody = multipartBuilder.build(); + } else { + requestBody = formBuilder.build(); + } + } else if (httpRequest.getHttpMethod().equals(HttpMethod.GET)) { + requestBody = null; + } else { + requestBody = okhttp3.RequestBody.create(null, new byte[0]); + } + } + + // set request headers + okhttp3.Headers.Builder requestHeaders = new okhttp3.Headers.Builder(); + if (httpRequest.getHeaders() != null) { + for (Entry kv : httpRequest.getHeaders().entrySet()) { + requestHeaders.add(kv.getKey(), kv.getValue()); + } + } + + // set basic auth credentials if needed + if ((null != httpRequest.getUsername()) && (!httpRequest.getUsername().isEmpty())) { + String credentials = okhttp3.Credentials.basic(httpRequest.getUsername(), httpRequest.getPassword()); + requestHeaders.add("Authorization", credentials); + } + + // build the request + okhttp3.Request okHttpRequest = new okhttp3.Request.Builder() + .method(httpRequest.getHttpMethod().toString(), requestBody).headers(requestHeaders.build()).url(url) + .build(); + + return okHttpRequest; + } + + /** + * Create a simple HTTP GET request with basic authentication + */ + public HttpRequest get(String _queryUrl, Map _headers, + List> _parameters, String _username, String _password) { + return new HttpRequest(HttpMethod.GET, _queryUrl, _headers, _parameters, _username, _password); + } + + /** + * Create a simple HTTP GET request + */ + public HttpRequest get(String _queryUrl, Map _headers, + List> _parameters) { + return new HttpRequest(HttpMethod.GET, _queryUrl, _headers, _parameters); + } + + /** + * Create a simple HTTP HEAD request with basic authentication + */ + public HttpRequest head(String _queryUrl, Map _headers, + List> _parameters, String _username, String _password) { + return new HttpRequest(HttpMethod.HEAD, _queryUrl, _headers, _parameters, _username, _password); + } + + /** + * Create a simple HTTP HEAD request + */ + public HttpRequest head(String _queryUrl, Map _headers, + List> _parameters) { + return new HttpRequest(HttpMethod.HEAD, _queryUrl, _headers, _parameters); + } + + /** + * Create an HTTP POST request with parameters + */ + public HttpRequest post(String _queryUrl, Map _headers, + List> _parameters) { + return new HttpRequest(HttpMethod.POST, _queryUrl, _headers, _parameters); + } + + /** + * Create an HTTP POST request with parameters and with basic authentication + */ + public HttpRequest post(String _queryUrl, Map _headers, + List> _parameters, String _username, String _password) { + return new HttpRequest(HttpMethod.POST, _queryUrl, _headers, _parameters, _username, _password); + } + + /** + * Create an HTTP POST request with body + */ + public HttpBodyRequest postBody(String _queryUrl, Map _headers, String _body) { + return new HttpBodyRequest(HttpMethod.POST, _queryUrl, _headers, _body); + } + + /** + * Create an HTTP POST request with body and with basic authentication + */ + public HttpBodyRequest postBody(String _queryUrl, Map _headers, String _body, String _username, + String _password) { + return new HttpBodyRequest(HttpMethod.POST, _queryUrl, _headers, _body, _username, _password); + } + + /** + * Create an HTTP PUT request with parameters + */ + public HttpRequest put(String _queryUrl, Map _headers, + List> _parameters) { + return new HttpRequest(HttpMethod.PUT, _queryUrl, _headers, _parameters); + } + + /** + * Create an HTTP PUT request with parameters and with basic authentication + */ + public HttpRequest put(String _queryUrl, Map _headers, + List> _parameters, String _username, String _password) { + return new HttpRequest(HttpMethod.PUT, _queryUrl, _headers, _parameters, _username, _password); + } + + /** + * Create an HTTP PUT request with body + */ + public HttpBodyRequest putBody(String _queryUrl, Map _headers, String _body) { + return new HttpBodyRequest(HttpMethod.PUT, _queryUrl, _headers, _body); + } + + /** + * Create an HTTP PUT request with body and with basic authentication + */ + public HttpBodyRequest putBody(String _queryUrl, Map _headers, String _body, String _username, + String _password) { + return new HttpBodyRequest(HttpMethod.PUT, _queryUrl, _headers, _body, _username, _password); + } + + /** + * Create an HTTP PATCH request with parameters + */ + public HttpRequest patch(String _queryUrl, Map _headers, + List> _parameters) { + return new HttpRequest(HttpMethod.PATCH, _queryUrl, _headers, _parameters); + } + + /** + * Create an HTTP PATCH request with parameters and with basic + * authentication + */ + public HttpRequest patch(String _queryUrl, Map _headers, + List> _parameters, String _username, String _password) { + return new HttpRequest(HttpMethod.PATCH, _queryUrl, _headers, _parameters, _username, _password); + } + + /** + * Create an HTTP PATCH request with body + */ + public HttpBodyRequest patchBody(String _queryUrl, Map _headers, String _body) { + return new HttpBodyRequest(HttpMethod.PATCH, _queryUrl, _headers, _body); + } + + /** + * Create an HTTP PATCH request with body and with basic authentication + */ + public HttpBodyRequest patchBody(String _queryUrl, Map _headers, String _body, String _username, + String _password) { + return new HttpBodyRequest(HttpMethod.PATCH, _queryUrl, _headers, _body, _username, _password); + } + + /** + * Create an HTTP DELETE request with parameters + */ + public HttpRequest delete(String _queryUrl, Map _headers, + List> _parameters) { + return new HttpRequest(HttpMethod.DELETE, _queryUrl, _headers, _parameters); + } + + /** + * Create an HTTP DELETE request with parameters and with basic + * authentication + */ + public HttpRequest delete(String _queryUrl, Map _headers, + List> _parameters, String _username, String _password) { + return new HttpRequest(HttpMethod.DELETE, _queryUrl, _headers, _parameters, _username, _password); + } + + /** + * Create an HTTP DELETE request with body + */ + public HttpBodyRequest deleteBody(String _queryUrl, Map _headers, String _body) { + return new HttpBodyRequest(HttpMethod.DELETE, _queryUrl, _headers, _body); + } + + /** + * Create an HTTP DELETE request with body and with basic authentication + */ + public HttpBodyRequest deleteBody(String _queryUrl, Map _headers, String _body, String _username, + String _password) { + return new HttpBodyRequest(HttpMethod.DELETE, _queryUrl, _headers, _body, _username, _password); + } + +} diff --git a/src/main/java/com/pepipost/api/http/request/HttpBodyRequest.java b/src/main/java/com/pepipost/api/http/request/HttpBodyRequest.java new file mode 100644 index 0000000..052fe3e --- /dev/null +++ b/src/main/java/com/pepipost/api/http/request/HttpBodyRequest.java @@ -0,0 +1,57 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.http.request; + +import com.pepipost.api.http.request.HttpMethod; + +import java.util.Map; + +public class HttpBodyRequest extends HttpRequest { + /** + * Private store for properties + */ + private String body; + + /** + * Body for the http request + */ + public String getBody() { + return body; + } + + /** + * Create a request with explicit body + * + * @param _method The HTTP method to use. Can be PUT, POST, DELETE and PATCH + * @param _queryUrl The http url to create the HTTP Request. Expect a fully qualified absolute Url + * @param _headers The key-value map of all http headers to be sent + * @param _body The object to be sent as body after serialization + * @return Http request initialized with the given method, url, headers and request body + */ + public HttpBodyRequest(HttpMethod _method, String _queryUrl, + Map _headers, String _body) { + super(_method, _queryUrl, _headers, null); + this.body = _body!=null ? _body : ""; + } + + /** + * Create a request with explicit body + * + * @param _method The HTTP method to use. Can be PUT, POST, DELETE and PATCH + * @param _queryUrl The http url to create the HTTP Request. Expect a fully qualified absolute Url + * @param _headers The key-value map of all http headers to be sent + * @param _body The object to be sent as body after serialization + * @param _username Username for basic authentication + * @param _password Password for basic authentication + * @return Http request initialized with the given method, url, headers and request body + */ + public HttpBodyRequest(HttpMethod _method, String _queryUrl, + Map _headers, String _body, + String _username, String _password) { + super(_method, _queryUrl, _headers, null, _username, _password); + this.body = _body!=null ? _body : ""; + } +} diff --git a/src/main/java/com/pepipost/api/http/request/HttpMethod.java b/src/main/java/com/pepipost/api/http/request/HttpMethod.java new file mode 100644 index 0000000..e2437bc --- /dev/null +++ b/src/main/java/com/pepipost/api/http/request/HttpMethod.java @@ -0,0 +1,18 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.http.request; + +/** + * HTTP methods enumeration + */ +public enum HttpMethod { + GET, + POST, + PUT, + PATCH, + DELETE, + HEAD +} diff --git a/src/main/java/com/pepipost/api/http/request/HttpRequest.java b/src/main/java/com/pepipost/api/http/request/HttpRequest.java new file mode 100644 index 0000000..028dba4 --- /dev/null +++ b/src/main/java/com/pepipost/api/http/request/HttpRequest.java @@ -0,0 +1,102 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.http.request; + +import com.pepipost.api.http.request.HttpMethod; + +import java.util.Map; +import java.util.AbstractMap.SimpleEntry; +import java.util.List; + +public class HttpRequest { + /** + * Private store for properties + */ + private HttpMethod httpMethod; + private Map headers; + private String queryUrl; + private List> parameters; + private String username; + private String password; + + /** + * Headers for the http request + */ + public HttpMethod getHttpMethod() { + return httpMethod; + } + + /** + * Headers for the http request + */ + public Map getHeaders() { + return headers; + } + + /** + * Query url for the http request + */ + public String getQueryUrl() { + return queryUrl; + } + + /** + * Parameters for the http request + */ + public List> getParameters() { + return parameters; + } + + /** + * Username for basic authentication + */ + public String getUsername() { + return username; + } + + /** + * Password for basic authentication + */ + public String getPassword() { + return password; + } + + /** + * Initializes a simple http request + * + * @param _method The HTTP method to use. Can be GET, HEAD, PUT, POST, DELETE and PATCH + * @param _queryUrl The http url to create the HTTP Request. Expect a fully qualified absolute Url + * @param _headers The key-value map of all http headers to be sent + * @param _parameters The form data values in a key-value map + * @return Http request initialized with the given method, url and headers + */ + public HttpRequest(HttpMethod _method, String _queryUrl, + Map _headers, List> _parameters) { + this.httpMethod = _method; + this.queryUrl = _queryUrl; + this.headers = _headers; + this.parameters = _parameters; + } + + /** + * Initializes a simple http request + * + * @param _method The HTTP method to use. Can be GET, HEAD, PUT, POST, DELETE and PATCH + * @param _queryUrl The http url to create the HTTP Request. Expect a fully qualified absolute Url + * @param _headers The key-value map of all http headers to be sent + * @param _parameters The form data values in a key-value map + * @param _username Username for basic authentication + * @param _password Password for basic authentication + * @return Http request initialized with the given method, url and headers + */ + public HttpRequest(HttpMethod _method, String _queryUrl, + Map _headers, List> _parameters, + String _username, String _password) { + this(_method, _queryUrl, _headers, _parameters); + this.username = _username; + this.password = _password; + } +} diff --git a/src/main/java/com/pepipost/api/http/response/HttpResponse.java b/src/main/java/com/pepipost/api/http/response/HttpResponse.java new file mode 100644 index 0000000..c4aab0f --- /dev/null +++ b/src/main/java/com/pepipost/api/http/response/HttpResponse.java @@ -0,0 +1,70 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.http.response; + +import java.io.InputStream; +import java.util.Map; +import org.apache.http.client.methods.HttpRequestBase; +public class HttpResponse { + /** + * Private store for properties + */ + int statusCode; + Map headers; + InputStream rawBody; + HttpRequestBase baseRequest; + /** + * HTTP Status code of the http response + */ + public int getStatusCode() { return statusCode; } + + /** + * Headers of the http response + */ + public Map getHeaders() { + return headers; + } + + /** + * Raw body of the http response + */ + public InputStream getRawBody() { + return rawBody; + } + + /** + * @param _code The HTTP status code + * @param _headers The HTTP headers read from response + * @param _rawBody The raw data returned by the HTTP request + * @return Http response initialized with the given code, headers and rawBody + */ + public HttpResponse(int _code, Map _headers, InputStream _rawBody) { + this.statusCode = _code; + this.headers = _headers; + this.rawBody = _rawBody; + } + + /** + * @param _code The HTTP status code + * @param _headers The HTTP headers read from response + * @param _rawBody The raw data returned by the HTTP request + * @param _baseReq The underlying http base request from the apache http library + * @return Http response initialized with the given code, headers and rawBody + */ + public HttpResponse(int _code, Map _headers, InputStream _rawBody, HttpRequestBase _baseReq) { + this(_code, _headers, _rawBody); + this.baseRequest = _baseReq; + } + + /** + * Shutdowns any pending http resources e.g., input streams and realses connection + */ + public void shutdown(){ + if(baseRequest != null) { + baseRequest.releaseConnection(); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/http/response/HttpStringResponse.java b/src/main/java/com/pepipost/api/http/response/HttpStringResponse.java new file mode 100644 index 0000000..3e6f0dd --- /dev/null +++ b/src/main/java/com/pepipost/api/http/response/HttpStringResponse.java @@ -0,0 +1,34 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.http.response; + +import java.io.InputStream; +import java.util.Map; + +public class HttpStringResponse extends HttpResponse { + /** + * Private store for properties + */ + private String body; + + /** + * String body of the http response + */ + public String getBody() { + return body; + } + + /** + * @param _code The HTTP status code + * @param _headers The HTTP headers read from response + * @param _rawBody The raw data returned by the HTTP request + * @return Http response initialized with the given code, headers and rawBody + */ + public HttpStringResponse(int _code, Map _headers, InputStream _rawBody, String body) { + super(_code, _headers, _rawBody); + this.body = body; + } +} diff --git a/src/main/java/com/pepipost/api/models/Attachments.java b/src/main/java/com/pepipost/api/models/Attachments.java new file mode 100644 index 0000000..61d4e8c --- /dev/null +++ b/src/main/java/com/pepipost/api/models/Attachments.java @@ -0,0 +1,50 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.models; + +import java.util.*; +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; + +public class Attachments + implements java.io.Serializable { + private static final long serialVersionUID = -5233646732061200556L; + private String fileContent; + private String fileName; + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("fileContent") + public String getFileContent ( ) { + return this.fileContent; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("fileContent") + public void setFileContent (String value) { + this.fileContent = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("fileName") + public String getFileName ( ) { + return this.fileName; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("fileName") + public void setFileName (String value) { + this.fileName = value; + } + +} + \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/models/AttachmentsBuilder.java b/src/main/java/com/pepipost/api/models/AttachmentsBuilder.java new file mode 100644 index 0000000..352758c --- /dev/null +++ b/src/main/java/com/pepipost/api/models/AttachmentsBuilder.java @@ -0,0 +1,36 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.models; + +import java.util.*; + +public class AttachmentsBuilder { + //the instance to build + private Attachments attachments; + + /** + * Default constructor to initialize the instance + */ + public AttachmentsBuilder() { + attachments = new Attachments(); + } + + public AttachmentsBuilder fileContent(String fileContent) { + attachments.setFileContent(fileContent); + return this; + } + + public AttachmentsBuilder fileName(String fileName) { + attachments.setFileName(fileName); + return this; + } + /** + * Build the instance with the given values + */ + public Attachments build() { + return attachments; + } +} \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/models/Attribute.java b/src/main/java/com/pepipost/api/models/Attribute.java new file mode 100644 index 0000000..74dd53c --- /dev/null +++ b/src/main/java/com/pepipost/api/models/Attribute.java @@ -0,0 +1,50 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.models; + +import java.util.*; +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; + +public class Attribute + implements java.io.Serializable { + private static final long serialVersionUID = -401645198716144096L; + private String myname; + private String age; + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("myname") + public String getMyname ( ) { + return this.myname; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("myname") + public void setMyname (String value) { + this.myname = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("age") + public String getAge ( ) { + return this.age; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("age") + public void setAge (String value) { + this.age = value; + } + +} + \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/models/AttributeBuilder.java b/src/main/java/com/pepipost/api/models/AttributeBuilder.java new file mode 100644 index 0000000..332856d --- /dev/null +++ b/src/main/java/com/pepipost/api/models/AttributeBuilder.java @@ -0,0 +1,36 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.models; + +import java.util.*; + +public class AttributeBuilder { + //the instance to build + private Attribute attribute; + + /** + * Default constructor to initialize the instance + */ + public AttributeBuilder() { + attribute = new Attribute(); + } + + public AttributeBuilder myname(String myname) { + attribute.setMyname(myname); + return this; + } + + public AttributeBuilder age(String age) { + attribute.setAge(age); + return this; + } + /** + * Build the instance with the given values + */ + public Attribute build() { + return attribute; + } +} \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/models/EmailBody.java b/src/main/java/com/pepipost/api/models/EmailBody.java new file mode 100644 index 0000000..b12414f --- /dev/null +++ b/src/main/java/com/pepipost/api/models/EmailBody.java @@ -0,0 +1,169 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.models; + +import java.util.*; +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; + +public class EmailBody + implements java.io.Serializable { + private static final long serialVersionUID = -8339168689734442111L; + private List personalizations; + private String tags; + private From from; + private String subject; + private String content; + private List attachments; + private Settings settings; + private String replyToId; + private Integer templateId; + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("personalizations") + public List getPersonalizations ( ) { + return this.personalizations; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("personalizations") + public void setPersonalizations (List value) { + this.personalizations = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("tags") + public String getTags ( ) { + return this.tags; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("tags") + public void setTags (String value) { + this.tags = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("from") + public From getFrom ( ) { + return this.from; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("from") + public void setFrom (From value) { + this.from = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("subject") + public String getSubject ( ) { + return this.subject; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("subject") + public void setSubject (String value) { + this.subject = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("content") + public String getContent ( ) { + return this.content; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("content") + public void setContent (String value) { + this.content = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("attachments") + public List getAttachments ( ) { + return this.attachments; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("attachments") + public void setAttachments (List value) { + this.attachments = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("settings") + public Settings getSettings ( ) { + return this.settings; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("settings") + public void setSettings (Settings value) { + this.settings = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("replyToId") + public String getReplyToId ( ) { + return this.replyToId; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("replyToId") + public void setReplyToId (String value) { + this.replyToId = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("templateId") + public Integer getTemplateId ( ) { + return this.templateId; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("templateId") + public void setTemplateId (Integer value) { + this.templateId = value; + } + +} + \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/models/EmailBodyAttachments.java b/src/main/java/com/pepipost/api/models/EmailBodyAttachments.java new file mode 100644 index 0000000..771a412 --- /dev/null +++ b/src/main/java/com/pepipost/api/models/EmailBodyAttachments.java @@ -0,0 +1,50 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.models; + +import java.util.*; +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; + +public class EmailBodyAttachments + implements java.io.Serializable { + private static final long serialVersionUID = 1809495909420244490L; + private String fileContent; + private String fileName; + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("fileContent") + public String getFileContent ( ) { + return this.fileContent; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("fileContent") + public void setFileContent (String value) { + this.fileContent = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("fileName") + public String getFileName ( ) { + return this.fileName; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("fileName") + public void setFileName (String value) { + this.fileName = value; + } + +} + \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/models/EmailBodyAttachmentsBuilder.java b/src/main/java/com/pepipost/api/models/EmailBodyAttachmentsBuilder.java new file mode 100644 index 0000000..e005bee --- /dev/null +++ b/src/main/java/com/pepipost/api/models/EmailBodyAttachmentsBuilder.java @@ -0,0 +1,36 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.models; + +import java.util.*; + +public class EmailBodyAttachmentsBuilder { + //the instance to build + private EmailBodyAttachments emailBodyAttachments; + + /** + * Default constructor to initialize the instance + */ + public EmailBodyAttachmentsBuilder() { + emailBodyAttachments = new EmailBodyAttachments(); + } + + public EmailBodyAttachmentsBuilder fileContent(String fileContent) { + emailBodyAttachments.setFileContent(fileContent); + return this; + } + + public EmailBodyAttachmentsBuilder fileName(String fileName) { + emailBodyAttachments.setFileName(fileName); + return this; + } + /** + * Build the instance with the given values + */ + public EmailBodyAttachments build() { + return emailBodyAttachments; + } +} \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/models/EmailBodyBuilder.java b/src/main/java/com/pepipost/api/models/EmailBodyBuilder.java new file mode 100644 index 0000000..4b70421 --- /dev/null +++ b/src/main/java/com/pepipost/api/models/EmailBodyBuilder.java @@ -0,0 +1,71 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.models; + +import java.util.*; + +public class EmailBodyBuilder { + //the instance to build + private EmailBody emailBody; + + /** + * Default constructor to initialize the instance + */ + public EmailBodyBuilder() { + emailBody = new EmailBody(); + } + + public EmailBodyBuilder personalizations(List personalizations) { + emailBody.setPersonalizations(personalizations); + return this; + } + + public EmailBodyBuilder tags(String tags) { + emailBody.setTags(tags); + return this; + } + + public EmailBodyBuilder from(From from) { + emailBody.setFrom(from); + return this; + } + + public EmailBodyBuilder subject(String subject) { + emailBody.setSubject(subject); + return this; + } + + public EmailBodyBuilder content(String content) { + emailBody.setContent(content); + return this; + } + + public EmailBodyBuilder attachments(List attachments) { + emailBody.setAttachments(attachments); + return this; + } + + public EmailBodyBuilder settings(Settings settings) { + emailBody.setSettings(settings); + return this; + } + + public EmailBodyBuilder replyToId(String replyToId) { + emailBody.setReplyToId(replyToId); + return this; + } + + public EmailBodyBuilder templateId(Integer templateId) { + emailBody.setTemplateId(templateId); + return this; + } + /** + * Build the instance with the given values + */ + public EmailBody build() { + return emailBody; + } +} \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/models/From.java b/src/main/java/com/pepipost/api/models/From.java new file mode 100644 index 0000000..8b8bbc3 --- /dev/null +++ b/src/main/java/com/pepipost/api/models/From.java @@ -0,0 +1,50 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.models; + +import java.util.*; +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; + +public class From + implements java.io.Serializable { + private static final long serialVersionUID = -3373572935892553842L; + private String fromEmail; + private String fromName; + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("fromEmail") + public String getFromEmail ( ) { + return this.fromEmail; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("fromEmail") + public void setFromEmail (String value) { + this.fromEmail = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("fromName") + public String getFromName ( ) { + return this.fromName; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("fromName") + public void setFromName (String value) { + this.fromName = value; + } + +} + \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/models/FromBuilder.java b/src/main/java/com/pepipost/api/models/FromBuilder.java new file mode 100644 index 0000000..3ebdd18 --- /dev/null +++ b/src/main/java/com/pepipost/api/models/FromBuilder.java @@ -0,0 +1,36 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.models; + +import java.util.*; + +public class FromBuilder { + //the instance to build + private From from; + + /** + * Default constructor to initialize the instance + */ + public FromBuilder() { + from = new From(); + } + + public FromBuilder fromEmail(String fromEmail) { + from.setFromEmail(fromEmail); + return this; + } + + public FromBuilder fromName(String fromName) { + from.setFromName(fromName); + return this; + } + /** + * Build the instance with the given values + */ + public From build() { + return from; + } +} \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/models/Personalizations.java b/src/main/java/com/pepipost/api/models/Personalizations.java new file mode 100644 index 0000000..e7aedd1 --- /dev/null +++ b/src/main/java/com/pepipost/api/models/Personalizations.java @@ -0,0 +1,118 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.models; + +import java.util.*; +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; + +public class Personalizations + implements java.io.Serializable { + private static final long serialVersionUID = 123272188473706523L; + private String recipient; + private String xApiheaderCc; + private String xApiheader; + private Object attributes; + private List attachments; + private List recipientCc; + /** GETTER + * Emails to be passed in Apicall + */ + @JsonGetter("recipient") + public String getRecipient ( ) { + return this.recipient; + } + + /** SETTER + * Emails to be passed in Apicall + */ + @JsonSetter("recipient") + public void setRecipient (String value) { + this.recipient = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("x-apiheader_cc") + public String getXApiheaderCc ( ) { + return this.xApiheaderCc; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("x-apiheader_cc") + public void setXApiheaderCc (String value) { + this.xApiheaderCc = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("x-apiheader") + public String getXApiheader ( ) { + return this.xApiheader; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("x-apiheader") + public void setXApiheader (String value) { + this.xApiheader = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("attributes") + public Object getAttributes ( ) { + return this.attributes; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("attributes") + public void setAttributes (Object value) { + this.attributes = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("attachments") + public List getAttachments ( ) { + return this.attachments; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("attachments") + public void setAttachments (List value) { + this.attachments = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("recipient_cc") + public List getRecipientCc ( ) { + return this.recipientCc; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("recipient_cc") + public void setRecipientCc (List value) { + this.recipientCc = value; + } + +} + \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/models/PersonalizationsBuilder.java b/src/main/java/com/pepipost/api/models/PersonalizationsBuilder.java new file mode 100644 index 0000000..869a104 --- /dev/null +++ b/src/main/java/com/pepipost/api/models/PersonalizationsBuilder.java @@ -0,0 +1,59 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.models; + +import java.util.*; + +public class PersonalizationsBuilder { + //the instance to build + private Personalizations personalizations; + + /** + * Default constructor to initialize the instance + */ + public PersonalizationsBuilder() { + personalizations = new Personalizations(); + } + + /** + * Emails to be passed in Apicall + */ + public PersonalizationsBuilder recipient(String recipient) { + personalizations.setRecipient(recipient); + return this; + } + + public PersonalizationsBuilder xApiheaderCc(String xApiheaderCc) { + personalizations.setXApiheaderCc(xApiheaderCc); + return this; + } + + public PersonalizationsBuilder xApiheader(String xApiheader) { + personalizations.setXApiheader(xApiheader); + return this; + } + + public PersonalizationsBuilder attributes(Object attributes) { + personalizations.setAttributes(attributes); + return this; + } + + public PersonalizationsBuilder attachments(List attachments) { + personalizations.setAttachments(attachments); + return this; + } + + public PersonalizationsBuilder recipientCc(List recipientCc) { + personalizations.setRecipientCc(recipientCc); + return this; + } + /** + * Build the instance with the given values + */ + public Personalizations build() { + return personalizations; + } +} \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/models/SendEmailError.java b/src/main/java/com/pepipost/api/models/SendEmailError.java new file mode 100644 index 0000000..ee60af0 --- /dev/null +++ b/src/main/java/com/pepipost/api/models/SendEmailError.java @@ -0,0 +1,50 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.models; + +import java.util.*; +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; + +public class SendEmailError + implements java.io.Serializable { + private static final long serialVersionUID = -7638280116293860302L; + private String errorMessage; + private int errorCode; + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("error_message") + public String getErrorMessage ( ) { + return this.errorMessage; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("error_message") + public void setErrorMessage (String value) { + this.errorMessage = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("error_code") + public int getErrorCode ( ) { + return this.errorCode; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("error_code") + public void setErrorCode (int value) { + this.errorCode = value; + } + +} + \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/models/SendEmailErrorBuilder.java b/src/main/java/com/pepipost/api/models/SendEmailErrorBuilder.java new file mode 100644 index 0000000..408b5fe --- /dev/null +++ b/src/main/java/com/pepipost/api/models/SendEmailErrorBuilder.java @@ -0,0 +1,36 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.models; + +import java.util.*; + +public class SendEmailErrorBuilder { + //the instance to build + private SendEmailError sendEmailError; + + /** + * Default constructor to initialize the instance + */ + public SendEmailErrorBuilder() { + sendEmailError = new SendEmailError(); + } + + public SendEmailErrorBuilder errorMessage(String errorMessage) { + sendEmailError.setErrorMessage(errorMessage); + return this; + } + + public SendEmailErrorBuilder errorCode(int errorCode) { + sendEmailError.setErrorCode(errorCode); + return this; + } + /** + * Build the instance with the given values + */ + public SendEmailError build() { + return sendEmailError; + } +} \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/models/SendEmailResponse.java b/src/main/java/com/pepipost/api/models/SendEmailResponse.java new file mode 100644 index 0000000..3efce10 --- /dev/null +++ b/src/main/java/com/pepipost/api/models/SendEmailResponse.java @@ -0,0 +1,67 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.models; + +import java.util.*; +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; + +public class SendEmailResponse + implements java.io.Serializable { + private static final long serialVersionUID = -4221350437312414359L; + private Object data; + private String message; + private SendEmailError errorInfo; + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("data") + public Object getData ( ) { + return this.data; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("data") + public void setData (Object value) { + this.data = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("message") + public String getMessage ( ) { + return this.message; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("message") + private void setMessage (String value) { + this.message = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("error_info") + public SendEmailError getErrorInfo ( ) { + return this.errorInfo; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("error_info") + public void setErrorInfo (SendEmailError value) { + this.errorInfo = value; + } + +} + \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/models/SendEmailResponseBuilder.java b/src/main/java/com/pepipost/api/models/SendEmailResponseBuilder.java new file mode 100644 index 0000000..f41870b --- /dev/null +++ b/src/main/java/com/pepipost/api/models/SendEmailResponseBuilder.java @@ -0,0 +1,36 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.models; + +import java.util.*; + +public class SendEmailResponseBuilder { + //the instance to build + private SendEmailResponse sendEmailResponse; + + /** + * Default constructor to initialize the instance + */ + public SendEmailResponseBuilder() { + sendEmailResponse = new SendEmailResponse(); + } + + public SendEmailResponseBuilder data(Object data) { + sendEmailResponse.setData(data); + return this; + } + + public SendEmailResponseBuilder errorInfo(SendEmailError errorInfo) { + sendEmailResponse.setErrorInfo(errorInfo); + return this; + } + /** + * Build the instance with the given values + */ + public SendEmailResponse build() { + return sendEmailResponse; + } +} \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/models/Settings.java b/src/main/java/com/pepipost/api/models/Settings.java new file mode 100644 index 0000000..3596215 --- /dev/null +++ b/src/main/java/com/pepipost/api/models/Settings.java @@ -0,0 +1,101 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.models; + +import java.util.*; +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; + +public class Settings + implements java.io.Serializable { + private static final long serialVersionUID = 8009324548759081864L; + private Integer footer; + private Integer clicktrack; + private Integer opentrack; + private Integer unsubscribe; + private String bcc; + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("footer") + public Integer getFooter ( ) { + return this.footer; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("footer") + public void setFooter (Integer value) { + this.footer = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("clicktrack") + public Integer getClicktrack ( ) { + return this.clicktrack; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("clicktrack") + public void setClicktrack (Integer value) { + this.clicktrack = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("opentrack") + public Integer getOpentrack ( ) { + return this.opentrack; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("opentrack") + public void setOpentrack (Integer value) { + this.opentrack = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("unsubscribe") + public Integer getUnsubscribe ( ) { + return this.unsubscribe; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("unsubscribe") + public void setUnsubscribe (Integer value) { + this.unsubscribe = value; + } + + /** GETTER + * TODO: Write general description for this method + */ + @JsonGetter("bcc") + public String getBcc ( ) { + return this.bcc; + } + + /** SETTER + * TODO: Write general description for this method + */ + @JsonSetter("bcc") + public void setBcc (String value) { + this.bcc = value; + } + +} + \ No newline at end of file diff --git a/src/main/java/com/pepipost/api/models/SettingsBuilder.java b/src/main/java/com/pepipost/api/models/SettingsBuilder.java new file mode 100644 index 0000000..777996b --- /dev/null +++ b/src/main/java/com/pepipost/api/models/SettingsBuilder.java @@ -0,0 +1,51 @@ +/* + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ +package com.pepipost.api.models; + +import java.util.*; + +public class SettingsBuilder { + //the instance to build + private Settings settings; + + /** + * Default constructor to initialize the instance + */ + public SettingsBuilder() { + settings = new Settings(); + } + + public SettingsBuilder footer(Integer footer) { + settings.setFooter(footer); + return this; + } + + public SettingsBuilder clicktrack(Integer clicktrack) { + settings.setClicktrack(clicktrack); + return this; + } + + public SettingsBuilder opentrack(Integer opentrack) { + settings.setOpentrack(opentrack); + return this; + } + + public SettingsBuilder unsubscribe(Integer unsubscribe) { + settings.setUnsubscribe(unsubscribe); + return this; + } + + public SettingsBuilder bcc(String bcc) { + settings.setBcc(bcc); + return this; + } + /** + * Build the instance with the given values + */ + public Settings build() { + return settings; + } +} \ No newline at end of file diff --git a/target/classes/META-INF/MANIFEST.MF b/target/classes/META-INF/MANIFEST.MF new file mode 100644 index 0000000..77d97f7 --- /dev/null +++ b/target/classes/META-INF/MANIFEST.MF @@ -0,0 +1,5 @@ +Manifest-Version: 1.0 +Built-By: vikram +Build-Jdk: 1.8.0_181 +Created-By: Maven Integration for Eclipse + diff --git a/target/classes/META-INF/maven/PepipostLib/PepipostLib/pom.properties b/target/classes/META-INF/maven/PepipostLib/PepipostLib/pom.properties new file mode 100644 index 0000000..47bbe24 --- /dev/null +++ b/target/classes/META-INF/maven/PepipostLib/PepipostLib/pom.properties @@ -0,0 +1,7 @@ +#Generated by Maven Integration for Eclipse +#Tue Sep 25 11:28:33 IST 2018 +version=2.5.0 +groupId=PepipostLib +m2e.projectName=pepipost-Java +m2e.projectLocation=/home/vikram/Desktop/pepipost-Java +artifactId=PepipostLib diff --git a/target/classes/META-INF/maven/PepipostLib/PepipostLib/pom.xml b/target/classes/META-INF/maven/PepipostLib/PepipostLib/pom.xml new file mode 100644 index 0000000..abdc777 --- /dev/null +++ b/target/classes/META-INF/maven/PepipostLib/PepipostLib/pom.xml @@ -0,0 +1,81 @@ + + + 4.0.0 + + PepipostLib + PepipostLib + 2.5.0 + jar + + PepipostLib + + + + jitpack.io + https://jitpack.io + + + + + 2.9.0 + + + + + com.squareup.okhttp3 + okhttp + 3.10.0 + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-core + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson.version} + + + org.apache.httpcomponents + httpasyncclient + 4.0.1 + + + org.apache.httpcomponents + httpclient + 4.4.1 + + + org.apache.httpcomponents + httpcore + 4.4.1 + + + org.apache.httpcomponents + httpmime + 4.3.4 + + + org.apache.httpcomponents + httpcore-nio + 4.3.2 + + + junit + junit + 4.12 + test + + + \ No newline at end of file diff --git a/target/classes/com/pepipost/api/APIHelper$1.class b/target/classes/com/pepipost/api/APIHelper$1.class new file mode 100644 index 0000000000000000000000000000000000000000..9442abfd42b340f10a2bcf536db2f36c9a635f8e GIT binary patch literal 1131 zcmbVLOHUI~6#fn^46Vb%DkzAEipony5+92ig#eAkVcPIa+>qPprCc2DG&8rx_&;3v zD|CU03x9wsm;Mm95>JQ5xS$YN%z5RU^UeLvIX{lReFrdyM;1B=BYt?`)MZ`O!`L{Y zuAGH(@s$kfG8&(=kS0twGj>I6Wc2)=)L8B_iTiV7=j1sy%rp4QIUBc5g@Td1lco?&B8+Qmpu{7(+0<`9kfHgOP zAlvbBM*s7%Lg;gqmR{qaBBKpa33wtoH}rWW1urK1tzg>hshBXDJi6Th)wqZI?4|I4Wd|lO$vTZGmNWe2I5v!jaOQ`Sd=C8uNo+|A literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/APIHelper$2.class b/target/classes/com/pepipost/api/APIHelper$2.class new file mode 100644 index 0000000000000000000000000000000000000000..a569c80284b548a7854c5c3a348a4aee9dfba532 GIT binary patch literal 616 zcma)3O-~y!5Pc2{DND+C`4Xyn=mC(x0**mQ2o-@8pdyI7vl$Wx$6nbEDqQ(RoRB#1 z1Nx&XW|yeyg$k`SZ~SKb{ATC(pXV0<+gPrmBCwjdzRW4txeHOMT+4%>C&y%R^51u= zNCY;Ej%yVn`Cok_dn&sL&dSVrlJPDldCB2|uE~?lNMLMFTOIcWM%LD^1d>D7rW7L> zuVEBp0#glb>1@z%k-tq@8d0m``WD>hN2z+h)&tP33ZMuQa=tvhzlYh-` z_0+8r7;oy1RdL|Cn3qx?o@B34NXS9dMzZA_Y9Fi6JyrRzV3h61X7t*2>Tj(jbKdGv z7VG=`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UoBrD@B!AaLGF*pL!?q`Q*OAN;FF$xlow8kLpny zA9J9fC=RCNL&rzKfE+fQ+4F_!^gzE-(3zF-REL|A_~vj(E$?u69A11%Ybk(F`ER@V U!D}5phy4E`_tR~TF>ddF0TK;ntym!nS*S`gUPv}p`GcI-CD&5rF4}~_l0R~m z@qEs1lBGyB!A*E2?n+6BCO@xJUCMlZLGVUtCUdDT3C{7!jL;sdd*Pu+7%sFf&Y6{p zzjb3{!Utg^LR-tr_9Rz;;eoAFZGdJT3*jYa?mQHTLNqoWtHA{I j2C;nOY|UXNT2|-u1zUe9enSbr8nBHW(@5BD#_W9p-_~0H literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/PepipostClient.class b/target/classes/com/pepipost/api/PepipostClient.class new file mode 100644 index 0000000000000000000000000000000000000000..66ba4705f35e28406499ca5858ff6f2e91b73ebf GIT binary patch literal 939 zcmb7DTQ37a6#k~#E^AS(TishkU1Etxmj?|YX^;@_(>2kN?e1oG_+2~^4}O3jCC*+b zZArYG*>mQ6moqc__Wtq;U<*qcQVesJ+cZ7lNzV< zH|AOWR#=Lm_eQA0CYLtDW@V+;!D6|N@?F~&eqcs@)vv-1L%Ql-3mtvv*Pt`3{|9cs zK$fAO44gQD;*KR4hHBCgr+3Y|@Gp7Yrb@o%THLzsaBN)>#N~k~QJK%w6osNNVB;E zCX#64k20QnrwdRpeVMzR?|kRm=Fi`+-vNwbB8?7#qFY|EE3)EM%3)+X70-6dK~ydK zzO07!loQJ7#yO3oK+kJu&9QwacxBHnyq0bxka2xa2GL9qMo!>Lfx%J>>rxa|>=<`(@&fsIb!9?;}Rv^2sTDzuZuW}w+{H^XqDRYXe}>I5n^y%Z7GrCG{i zTQcHe8aRvdX`BT);r=c7DmJ%EhMJUPiN9%H?+AiIu2mQY<{Xk{!F| z_}-!u$vGKT%0b8?zSxhdT7&2wt>eer$RmeDzKO<_W8?lCS5_jAuF@D1D6}L)HURd$ zCo>JW0UM)fjO;a)x^R1{GckrM0tZ>V`N)Y@L)GBA+h^GRb(1|?a(_~`WLh;WV-m31 zkDt?8_ZZ6%6k*JlSF5gk;Hmk^?fj<0C5(b5thk#E{& zw3IAukJ5Qo+bcW8dKAaF3LM9Y8k5acy>(h2kblojEFh&X2euh^HjGc=RLyvjXcbAy zD(;XF%P%k&gPNf~M%5UI*I5z#p2k3p>m@Nt$f*tFoHAiu>se7~$(E(=^6pjWF12jr4WnA}-Z@IkZu_^U7E0r}YbIi++mA zPjTzVx^~io93eT@L#^AL+@X_6X7esGxI+h1+tQRrfv>9YgRp2-)O&%;y6|%pkmOCO t_zA<4&6>ptD=~yw&1J=?Z3(-|P*i$SxQ-j-?d0huZn4$^w|U=z@qgaysm%ZY literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/controllers/EmailController$1$1.class b/target/classes/com/pepipost/api/controllers/EmailController$1$1.class new file mode 100644 index 0000000000000000000000000000000000000000..5798a013d2ab2ba8f19b83219ff4203a825dcae0 GIT binary patch literal 995 zcmb7D-EI;=6#fQi`Ee_-*1u{MEh^B$0#_QECJoj|18PF0dS!;~1colNo84KH-uO;l zXcI5`0KR}v;VT%=LSq`aVv^lC=Q}@h=6q*<{`qkMpn+x*F^0PBPAyM((sKiCaZg&d ztF-Srj_?EPV9KS_{s$Br#YPedhWvzo=2obsW4-3VxW_$)Tp)bOodLy3SH17NWMGF3 zYZM-6uJnLAp;)YOt+2HQ1bcd^v)z`jM zqgHvqkZ8LnA`QBQfefx?5Qk~Nzzv3YsXR#GCPR|C^XXKaWytNefjhWMMlaM1&r4Ub zz8y}4ty_yoc@awC9z!Oi&Q`*NhX4t;WYF~9xQnc2P4kV`HWkv%#qd!TH`4T!9s z&|~)`i5f#~xv4QwpRwtOirUptO89Mu2Z0DsAVTBxCSusY3RX!=&a_l67Yzf+j6MTv zv|lIbl)NMVYGwNyvXyh>E9UyncicLzm>cH(x$wX&%!S8u;VT8iP^A9`9TBBmK_6)h ykjF7$AFzdwctRFqc3c%t@r<+tO7xGRjLK}^#?B0_!lFkEm}INc9<8WMT7LnJo&ziZ literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/controllers/EmailController$1$2$1.class b/target/classes/com/pepipost/api/controllers/EmailController$1$2$1.class new file mode 100644 index 0000000000000000000000000000000000000000..6f74dd0924e32b859cfff451fdbdfaa33b25158e GIT binary patch literal 920 zcmb7D%Wl&^6g`uKngl~aDNxF*3oiE3(A7n^4y2-@jdt9pTEBU0MN&Jf`-7LFjZbtt!m?ZE^Cz+Mtf_@ zlB~;jDyhoRxg+amgRGyRCGa%hj->NsPpdLNk;MmRG=nYW{!>l)9v{1OM3!_x0!x0T zTsGi@<3%$L8NH>n^4kJ0HWr6J+81bz%#_*?xRT-$mO5zSYKjEc1ezNmpgUHY-p#8+ zvU~EdWX8*5Q^;~(S{3XwXDgH;@O)twS)a@3Ow8OC^h$;Aul&{A%@g@i3bZHcSW7>* z9C8rT{CAhPF0!h)?9$~E($ko3mt1YMqv1Bw>F(&FG*0Q`x8!GLn&6JWvqi^~;x6tn zZ=)ykq9DiZdH;_o&AhMkqEw`P{+ji$Rdniy7dgjBdqy(%QkB-(cl~CJbv<(k8eo7u+=~}_~IMExXGT9+8XD5z%pE`e?-Ky`Wu|i1%Lnm literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/controllers/EmailController$1$2.class b/target/classes/com/pepipost/api/controllers/EmailController$1$2.class new file mode 100644 index 0000000000000000000000000000000000000000..fe0f3cac88a56ed80c60b517d1c00b96c4f6f3ff GIT binary patch literal 3330 zcmb7G-E$LF6#v~c?LxB95I_Y1D@JWT+NA~jAW&#av4KL7lqz4A?dG=KcDoyQH_$TU zj5>n@qvJTEeb6W0d}c-p$c*yjgMXCcxtmS0bvFevlihpoo_jui=XcM!|NQ&Mp8y81 zA|b|bNVAreDzEBQ%W)O8swtWrkZ-9*Mr*3d zg*CJ>OMAPH>!$7wG2G}4Z`<5(SiYT^>@-7s)T;2UVCa@1VT%~;kg*ks1Uj%&MiRRi zI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l;;7OyhR+FV@pcGqvAPd6+@{f9(zTD?;wP9Uey8iN{{W8lxXJ(k literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/controllers/EmailController$1.class b/target/classes/com/pepipost/api/controllers/EmailController$1.class new file mode 100644 index 0000000000000000000000000000000000000000..5f6d0a2f281e1f9091189e81ce706bf9c89e85af GIT binary patch literal 3290 zcmbtWTT|Oc6#f<)3yc!LB{WXc^b!)VxhT*iO);eb3ISp+;jkmUtLgycvvfh7G8 z{Q-UNYttzql$k#Ep+BnAvyw<0Bs^v68C$FMxqj#DclPgp{`eC>FMgCz!_cEyJ4%U{ z^pfScidxbY%`#ovG7N4z%IJ=&8zXNv+Il6#8Jf1$T~#qub5ofqY;(<(kYGr?-JL6& zrdlvKL&DwCowi%#Cx0GCIflAj)o3eN#eIhBVci|8$c-SrVG<$*Stw|#VGOIie~8Cbd{mmiIG5-bdy4tl7Gm_T`K=JlX=(H%}tU>4Ctor4l?}I5jI=}vRqg? z6nj|YtVqL=WtJG?BZNjh7~Yd1p-!wW$*4zCtlpQ=09mZkGA`g^5;1%rqY+mbVjV)g zF|V6^y1Y~1_JUuvRNf*WmsDF9@4;qVl#=0AINB=dxAhWsF}rNm<2r6gXk)k*Y6NPq z4Sln0tFCUDGH&7`gH%u*zG&+bIw*(J1sN{uMv>b|v?D8W>7f{6G8nkcCGi>VNVv^#C6o*`);Kpx+?H_{pHm-e23O5R z+lX{>Vlfl)m6PxVp&hbc73{X&B<>+6AQ@m7JzuL*t-?`cmXa96eF|D_sSI-~&~5bwim_OHsI;k)h3>lsPf2NKu%d z^WSp~n8vJx8HSFkfmZOAjBhYUs95G0v2@ucRE8re9!itwobS1nF)wV{)>CoRbAGuO zWGq530~OD!#T!=b{!gVlA=U;w!nYDu7&29ps`Me_JA6;BXUt)~Vc9$Yh$hHcxm7}X z0%vAP!Vl*^K7C27VqF{`m0>l)Vb#+Y!S$8kSCo!$7M-cdD1yq?!uPmVcKMLwx7U!f zZ)yyWA_DL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Ze-P S2`opL?&C9_D(h1``TG~_o61K3 literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/controllers/syncwrapper/APICallBackCatcher.class b/target/classes/com/pepipost/api/controllers/syncwrapper/APICallBackCatcher.class new file mode 100644 index 0000000000000000000000000000000000000000..b84cc9dcc8776e35245ffa7cb1a8ce274ec7a296 GIT binary patch literal 2403 zcmbtUU31%15Z!CLc5DP`8^=j0ltTGXlv02^Oe0}d;?b)+uckjQ?|Ne)FKBBK{R1(y&y#2N> zecSiKsBQXo+w$Bf@Ek`5VLN>4S_gsY`!Z-R-(T;Wj?*)($9*%h_GD0_ilAF#18f3p zFYsJ%81~Fi)~G5-FL>`ok>9o)Te?v`q@Zdb!=V!iI=}JA{Ml?frn}p|xBW<3QAbdH z)82K>Xc$OA<-q`!GcpLgK+tsV^8w-?nA?uTeJvbXmJCBdVhiYtwrfXSIO}r{1y%aq zj%-kwrZk$QvvmTFMm3t?-Hb-BkjA?U8of%d37XunU3qu7zb%6S!!t?GGM$HJVDmXK zR-!!{@osMvvL0V_FmH`wKlP9BdoKgL2-Ui*arbHf_F zD`+Y!NUAUjpw9ua0hvC~NT;)~mh2>FM4bS&6;;)l z5oT%BPK~Y$x|H!*cO&${(2wL!N*X{QkO0l*<7YS=xo(G>M?HeJK$kS&mzpa2R{WLc zrluvmSb=;)uc5j7m@oMx>YSYR^%p>h1!8?W8qJZxyW1Mwpqso~(lFy6^KMzA9;@Hj zH-pE^;T_L~lr`=+&=6#dPZ^SU?y6}!@tE~qfNCz;QH>{$s+-6Hnw#D*u;i-EV>DBI zb*^!71^v1>SjeF!z1b}$bJ}PfdyYCq&wS-_Jk+4j+mN=5-x;hWej2c^<7F*T13x?v z@gC0u{`sxIGlKOTPCw#a;J;}c(s@HX!v;&sC_kgwKVUD@>sVVrCYq)S&A@*aI2ULN z=Zmmv%Aek#H*vZ&VtETEL6^a=Oz&V{!RboE?7cYtIxHN&Zu~{>8-G&scN|nurcQ9H zz$FV*F9c!>2P$#nVO5FG$M9P?GfLH%M`~F@3VR-DU5&9@>Z=4B-^0!#ayr=^M^Sg& z%Yr_nYw$ZttbJlat>X#ZKteaiObAnhFkGkm`9xaB6X_z6rBf2&>Z?RlrK*Wsf7 z|Cj#kZwQ{R#~SFbk4YcnU!Z?+q_I>Tz5)FQr_kr7J(>PzbPM!VwLgzV`UU4Q_%@BJ zhqPc+4r$R4htx%HeUV9~n)zGA{0`%>g<<#}&HO_g|FZH=`=CjEx`X(@j60%~>xgC| zq`Kow1g+3&l5v!B0fPmj%v`|gL@wLlVu8yJxJYpM=@c$srd+tFic2O HUB3Dc5CP)9 literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/controllers/syncwrapper/SynchronousBase.class b/target/classes/com/pepipost/api/controllers/syncwrapper/SynchronousBase.class new file mode 100644 index 0000000000000000000000000000000000000000..735d5c119d584deddb670114385369f929a99a29 GIT binary patch literal 1061 zcmbW0VNcUg6o%hBx)sV8n*yRJ69>3eSz}^|f-zChWMt?EkVL*+%8e^@z0K{d=zsEy ziLyi!e}F&Acy2erOpV4SZEw$c&(m|>+kXA_=?j26@NDE5?)kFo#Uc)3nP`v4f#=Ie zD;b7DC0_D2@=p|xW1+kqT6dI;WSTtYiLhZYl#lpp?u9&hUWOk=~RiQJZVOv(8X>5JZ7~NOkpAV~=hd@=!P!!FUliiVP$5#-5E5 zL+u}c4kl1Gg`;C&xKKnM1%}CX5Q%4L_duv!eh>=Ew589(J+1=tJP2C46C@04?fx9;KnB)wsDUzr)8*>;QL-r`nrZ@9i@0W{8q0LX2&&;HJfIrq$s1q9I*?IfV}W7* z+}u{Ag;Hs(#o?LA;A%z88(giv^?Sc}gRXc%2Cp~vjegna7a43#ahaM%x5)F96b#kB zAV_Qq_NmhynJQmA4UCslLmx)dw2cKCe}uj>hMd_1TIFd?8$;JIdfJ9X8KC0!;JBYL z@p7(*$&aYKr(g~j=~~JFGbFr(GG;MFv6+4mrfFr43gu=AY0$+1`Yvf0*d$m8kQ2HeCq~ RxaLoz^A>Jr9j|1Z=645e%P0T< literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/exceptions/APIException.class b/target/classes/com/pepipost/api/exceptions/APIException.class new file mode 100644 index 0000000000000000000000000000000000000000..4f72f9a9795fb5cc772436ba9ee11c941e324d72 GIT binary patch literal 1659 zcma)6TW=Fb6#mASY*;qrO1PAka%r*GhHbdCfYT&SxWo_zL};Y)QfKK&ct- zIFXFJC`^>&MxG;IH)W)}Fi4#G!^Z7wXP_W3{oH-&I=&lhJNpL$6N!vH*WZ+JLbvZ4 zw*uHTZy?=LLHKmA(&S-^^A67fu~gij@H8v=))DHYLP$=6E2UOT`_ zpF2(8lYw$pd$u)!@olLdeE^s*l?hqU=!YOMWx>Lji5biqI65fhA>bB{;W)YV1rTsb z#dzF89#Qne2O=< z7B(rp%K~uU{a8@Xykww^LyAiok1$l9umaVgi4H8o$h;SLYC+&=X|2~K8!GmK?OJ)$ zL>?C`oW~aeBe8UoFwo==SPCo-@E@Z103te46_*TLWMB5sA8b9BO=ZEsR|2CHxxlj{80R>_-4bWPdDi|D zlY5xZQybH5ocIle-0!L1XB;&ma0;h6S{)C3&Zyw}EY5M%Xbxv>SJW_naFIjL`COlK zao?G3-gRD}b&ftGcI7X8xx4Rere7;etC}LrcC5Mxnpz3vH1K)YU92~>DG;HaV%gO< zn6%rdOo=w;e!=nT9%iaca}Q&BYUA2l6n6FUKip`ewtmt68;ew6eV2e$%wrL^38|B@ zsV8uibgprA9kXn>Gq{NgYP4KnhcD88iNAVE*X|J6r(5sRB{|$>MRN2gVwEZ68LN?| GeeZuGcAO*t literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/http/client/APICallBack.class b/target/classes/com/pepipost/api/http/client/APICallBack.class new file mode 100644 index 0000000000000000000000000000000000000000..e35d24805b2b366cdd628f5d4a64d636715202b8 GIT binary patch literal 429 zcmb7=L23dq7=>S~b*i<+W9X)7w@#^4L0S+LW^n%-f=1IM%w*c0&4mZ(p^9;IF|;7K z33&A literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/http/client/HttpCallBack.class b/target/classes/com/pepipost/api/http/client/HttpCallBack.class new file mode 100644 index 0000000000000000000000000000000000000000..b350c3ead718b945576c5170b662475bbd0b01b0 GIT binary patch literal 283 zcmZ{f%?<%E6opUy4P$|~Fbf)MDbUIV!NxwV)ZB5^aLi{=;{hXxH9Kd k(ll27x$|ASpEs^CFqHjlpyXFnQA55aK;09DM$Qqw05pP9u>b%7 literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/http/client/HttpClient.class b/target/classes/com/pepipost/api/http/client/HttpClient.class new file mode 100644 index 0000000000000000000000000000000000000000..b3e15bf44883566ac84a17e53c9a90956f45ad9b GIT binary patch literal 2467 zcmcIl&2G~`5T0$*xJe5srKNQY^+TW4I1f#3Po$u6MUhgGmTk- zBTEHV2vie~z@iH(CN{cGV9YdlNCNXchVT5L+8$Rza8wU8uHd@*gj#X2%^eZSe(9V8 z#5L0+OV$U0pQ$7crm>7WJ(Q`2C_j?Mi6d;P35;m3!v~hmjtpTBXB!TF4XlBY>A1Tj zrEF2ZNsU^Lr=HEhk5mVoeNL=Hzua0*l_#G`m9r-PBMg zlAY-pe=Sx*VfoWuH#8*JXP;|ZIr>R)q@ncLtuU4H3CbqW|b#^eH%wUKpAKF0_4G)*g@`iN2A)Q}M$mi{q;aX(xI@&A4jYz(U@}`8}l>BW; u_$>*)E#bE%d_}@nB>awq-;waU5`H(1$Gq?P*}nz1aV=tG`%r_sQ1}gT!rRLL literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/http/client/HttpContext.class b/target/classes/com/pepipost/api/http/client/HttpContext.class new file mode 100644 index 0000000000000000000000000000000000000000..45daae585214180d502d088d6a2e064276b8b5d9 GIT binary patch literal 873 zcmaKq*-FDe6o&t4t6hwCajm;|UDUyA#hZe7Q4~}P;)SGfXs6U9HdFDj6fA-lK7bD; zo=M`KNMQ1xIp;fP=4W2to?ig$U@eUVL&b8gxhq`hI-cUDD|uHbms@=)Y{d^rHym4u zJC#O?q0lpLP2M-{4nJ=9gryiVmjiJ#6duWXGrCz=;CDL-igy{Z1bVJxdxBvrmJBLF zGzf?t-;=gf`wSPASkgb#kD0NhQA4UNhE&735;-I>X&{R!hGeDM%7T0_FotohN(R!% zFyx!k7DvPDwiuk5?LOV9)O0Mf-!cbM$Khs5b*0Bpi#f_)+v&3DPlGdGj^#Q+gLU`HBNQKeV4BtvQaVj*fv_T`XlI6Y)&mT)n4?Hn%+na=s|6aA uAYH~{IEK?-=f-M}$lsGlKsOJ7vft1M3c`jAOIVJ8i@)KGNO;8`vHA|F8q(kZ literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/http/client/OkClient$1.class b/target/classes/com/pepipost/api/http/client/OkClient$1.class new file mode 100644 index 0000000000000000000000000000000000000000..7c05783029bb43f3ea876697bcdb382ba343a742 GIT binary patch literal 1573 zcmcIkZBNrs7(I6zOlsNY2EHpO1I8Fs#P<;+Opqm06bMnjb>)VYmEPKRh@bQ?nSdHU z_yhb=#^-kHhGruq#wFc-diR`jp4a{S_5BBcIV{8xVVE?;p5}1JbcE+?x?^fJ-*+^_ zGP&(*YxPoKWar|DF{F0&eOXdK7!ObqlSBYnMQ#wise1vCRj-a85-WXQY);F#ttc!z#`~RS?Am6@$3Q z5Y0(YvSQl&MPskZ-A%n}afWn7P%XA}*Oc$A%b4s6!_>(Ug*j&Ds4@e>UeQgf;S%RW zu5!H7#Y!*@rqIf3%LfK`d{fxPsVxPgxEaR{hVfJNUd0%)l!Mc#TBcW9=bj^MkMuru z^uo*kQ}<>f!B}tBT=8C(toSzQh8!q{#Gi>XFbZ$DYyJ$1u)}Z}#yUC3c`LSwLKi9+ zLE826;+Ub1cd4ub4YY-{Q|)~VIaJ)1v(RT)Le?!I>dn;%3rWM!+RzX|omDnO!!`Jd zDaU0nZ2GKJre-YLlFYPso^!t@wpBdDBZeVS8_7rhPNr5_i)54OSZy4TkH`#Pv) z+vaY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ecKz39JxY0tFQ5 No1>&xu}+7Q{Rc2Y0y+Qy literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/http/request/HttpMethod.class b/target/classes/com/pepipost/api/http/request/HttpMethod.class new file mode 100644 index 0000000000000000000000000000000000000000..a3f47052729c7cc25a0a11e3a07655ac32b75307 GIT binary patch literal 1290 zcmb7DYfsZq7=8}j+O8BBL#JE>MUZV=<`nRIy3Iz*Puop5eeC=Z`T;4cSeaJRlF%nmLasaYf_A~w@>fz zUZJ$U$slhSMWbZU-%X>i!O(B)>~GJM3&nlIWSIYOn*?gEQg!RDpQj{=WSKbE8;6dH zum*+^9d~e-66QKC@kFuPl<9kJ{V2PYEJw)qo{lhN6$%GqIus664j$-GIf!uZP)CFV zjf2NJG!FVXc%q{pGXF~G&@sR;RCMdkPP=yCcqRLw>M+ELjf!0@+n&p@IMg6vgv$1h z-4<1PYFB9&42y~6E#{!%DV{0FFhqO$J8St)O~-RAGem69v(GAx<{53UcM7`)Cr-uB zZuJc2-w{oQK@k=0eq_k^hINLQy!ozpqc3%=;1$D4FV%Y0Znd&K`LDUVy>J1NoHVo1 z_A1U>mk)EOtJfv&NllvWQQh|29{tVr5c25U%`44k*D|z5iEfUvHp*oIkR?S3OJWd~ zbRaBAKv>#75FO*Yr^pbAW)MTf6D4#`m_MJtgITd*=>oBH#09t?5@1w-@vs0B0!+#R zObPHv5nx(?8C8JUsQiQYqyTZ#3I!N7t#E(|(~<*BnU)e@+O*UFv*tPGzEb)=B=r7G7A{S4v9D=Jh?aBo=yW98iyE2YJTDZ^IbBT9MB2U#kYb5J_))f zi&*M}uhJBGcs#(I^HSI-^?z{x}esC#E>vE-+Vu3zB6<7>yOW009?RI91(_GwZ5%c+%l|s z!_joh(6$`M(ro^+$;q%ni%0G}jwr+E3;mU@)pT=Hdr*17s}4g_1l;4!R(*p(E&V;8 z>sw%mZ*hHt+YN@1lFZw5jGA^&w`ec1W^9_e)3iCm+^@R}?oxtSb8N%hEOc9nlw*j_ zVDCJ!YYeGw4?=F~w!Y0B31Ku)q+~Q4ihmk1d4(m)8s5!)POKT*R*l~_9ed}` z*xZ&Ciu5CN%?7tks!vl(Z!})lZEE12P40-Mw;MV&nfsTPMwjXvJOPHZf~+yU z@pu;Yyn;~yQ=DqmBVE|fDcC3Mu?534oFc>X$z4$4y`=8D9bzJ|lpV;eGkoh~fnCxX zg3-^O=hl-Lz(oZbW*G)1#R=nOdfQT!66KB(43&M=87>C}ApPsR*suKJbe$!9l1;pZ*9FyuGO1%l`k7Y+C~GPt8+q( z7?iuF$?c^Y1@J~3w-`=#RO&Y(9>+4nSWh>4xdFAuNkTY4U(*;OLT+gm5voPjgq$a7 zO|m5CqzArzgzTgP(oXN5MiG<3e)>N^D~(1*cCu9;D`G)lZmF^DT_2Q!R|E(=8lRGtm~#exTg}2x_vD{SuW(y(LTzw zk239}Orwo5?V%JHi*yFjt2D0DEEYg6{9WY2Um%ZQkvt=~ftxgnSH6VXxP!z`EPt2& literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/http/response/HttpResponse.class b/target/classes/com/pepipost/api/http/response/HttpResponse.class new file mode 100644 index 0000000000000000000000000000000000000000..b145abf018430e6d8f5a7bd7669e3f4ead02985c GIT binary patch literal 1781 zcmbtV-%ry}82v6AY?QJweu_g;QQXQ#Q9%@li4YAW6B97Rx24-|wvw%_Z70D8{vsbV zagzApqYwU3#&g@QK*5B?huz*E-#zzy=Y03>_n#j>iRclnC8&?lLe*@k7PoZEbX--l zbhY8SmTGgyG7X2T+ZgQyg9ODHjT~wpHMOZ3b@grKkXKzslH+P_+u1T}oDth$lxT3R z#%+gDy5xnoUA?Kk(X4ewgZp~jK)8+Am5Zwz{?NnTcWvFMuV0>d0gQyL9c`MmV@4Bx zfNrWghSheli)$@J3{^CT@9__9?ttJ@$+YW8POCP!pI^19bHi0z+-;aOC&0#AfXGib_-?yZ;r2VN(nL<9C9|qE4>VgB<6tuGHgu>_ zEcKu^NJt>D-IX$v%U_fW0jtruYf30mn2{+#N&k?&uAWm}z=)z^!yTE1NMAEF6Jd0v8~Fo9yV1~V68#6DL@|0G(_NZp1ZQwSf4Sc>-j;*dS z@1wkeii@P*YyAjDCsFACNx63d5*%9;65SKtEy*-YDMrb1a52zz8f~{`9vKoX)6)d4 zAilS2BGalcAY=0;$F12i4Fm6iZW<`6eY0&>`DO&0wVB%kb@2zR~DsboyvK2qK!K3G`(@0HZ047~P<0 zMEUSHFM(vgL_lV)1i3}G0TpF18{Is2^%qIv^PQduBEH!^kxdZU0^F-}lBYw{pLx;G{{o$M Bj@|$O literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/http/response/HttpStringResponse.class b/target/classes/com/pepipost/api/http/response/HttpStringResponse.class new file mode 100644 index 0000000000000000000000000000000000000000..be7d62c214fe4597d869a4e5a183b5f86b896dfe GIT binary patch literal 957 zcma)4O>a^`6g?LnP!Pe^(psyw>?nRr8tuk5U1(w?K^J1WtpiM88hCH=n5U_~s!cQ| zF8TxfQN}y-Xd)jAHZyb2+2fXD>RAaNF~Qp@c+sV&IrYh9)!{+F>CxXPjs?a>>_fydb$#_ zsFiUKTZG1ZvgI^RWA41i{UuO~uy#IFvae!pTXn8#_ZiD?>7;5)dqCKlox`QMoyE~C z+lr+VN}VW)d+MEbQ{G^OwcJau^R=oHCj~Pw%IIkzZm_5ca*#8HOcJyWd literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/models/Attachments.class b/target/classes/com/pepipost/api/models/Attachments.class new file mode 100644 index 0000000000000000000000000000000000000000..b75169f49d64b8a9a54af5be7bf4909d1e420af2 GIT binary patch literal 1063 zcma))+invv5Qcx}*e2TpAq}+j0ECvbh+15ODpf@ws;Ee$%>@@o&f=yHyWVK+RESsM zApi*!i3=WpheC`up-Iz7^uk_`J^TOPjQ#u1&tCwZpq599q3TB=@5-*~M#gf{RXmK| z%fRq`YlVLnN^MOZ8HUA**jVZIQ-&FrawI}h z&plIG**%7IZM(^kIUwQ!(zxki0gDU^b*1G|FKo&9c)(MtN4^M}f*6T!xS6qM$}nu! zuh9Ymm~Tt_VjQzv+nxrx{HCX^3T0CnMP~b2M^;#B19?48yiSF&GX59_yd(S%CemD7 zB=JLvUrI{}nX6cNsi{={?ar!d1 zyVFPMTas3$IhSmDSfaHzNI(U*C}OycWfEPXb&;YwG*%5IT~_;!wXc+s!bq($Rc!-z z$JAUQ7ixQSkRp-X&Z8e#8^O7nfOV>5Bay5OvW9>Tew8Y9b={waI)4SVI*Gb96?JnO W>Ok!hYIPEImr(hCP`8q9J^TyqFwgt| literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/models/AttachmentsBuilder.class b/target/classes/com/pepipost/api/models/AttachmentsBuilder.class new file mode 100644 index 0000000000000000000000000000000000000000..1efe0af045645968462230f050ac2bea557b5580 GIT binary patch literal 923 zcmb7?+fExX5QhKB5q7r;gpyDQXAmK+SaA(P93-wHdI3V>(pd}`?IGHA`dme7i_}Uy z01t&2FDrr+kkT95GxmJ`|FIvR{yqTM##$LULfeZ1w>?`rSuc`Kx^UM z1TxggVPE-|GA^S)n79=`gzJm&+Wp?Wm7XTpVsMnO-Wh?oLn!U4Q0YBFzO{KyC>-&% z7V@wilrdJuC&KCoBnuAgaj-B4MU)8Djtb>TKj_N%OmuxosC6Pw_~#;4CeD%teWMb> zw^7t){#mqrrF?l5g__$!*l%?P-8j{;3a@uI{|9Kq&p7ykSwba|`uHt<`aL>#sy2Kn zVay0S5dpW*!GeQDgS0cG$rFlQ^NfUz)<_!Jt#umpV^11YgvRiP*fQ?1%+1g9k0RvE z3-GGIYkor>$2mIWUE+D7eGjYs56;CsD!);^<6I7tJXX^BNv^A*iYXq!F47u~K66Bv zM*WqS<2o?w7phA#ck_317VvU0@oP#Y_>?FfG;^S^?{A3wj1HW@j=TP*_oSZU2{+OXHXdyKN8hb`y6(#jqn zZ0vRzzi^7Em#Dv%vz6kM8GhgMj04U;>G$tz*3jNSx3?+fp>2{jkfB7TJUk+dj) zU49gwOOY6@yX4Xw0L%IyLn4n8Y_3O+@BPy`=)ViQ~D5+)PDf3*wl3M=>n z{88fRalGJ#_|nr=-SyR}({umu{|>-9eio4tsJBAj>8OtGgx%PY9qstxnew{Mb{t3A z?Zs-Rr@b>36_FDdxsaFA@nq0;4&4jYiUmsY`J%vbvoCE!ps=X}9d8L_>#HXMxm`B2 zkj0>lA_j^W5?JiZv0!7c1WK}zM?s+6)PXwa`L2qNrRynyN;7Op??gu0#Az}YpX;tb zqrcL0ZX?*g3ZzfsR=xRZz!Cik+8e9iCmGFCHl{H{+qx>=Pq7o9Vd+feV>g;6+jPsu zyp06|DiE~YrntOo9!g-P{tZc-$~p>rQA_P<? zdq&Y}*rsEDZSFc2jD0aITMgg#+@19mjkFDoPA_||&rFwdA6CHVTX^Yf{<=9+c65Z&t^61DcV)nWX%Rnm{XSL3TbX^Dblm^km_V+6^9H-72#Ep zHEg%a*Y+D;O{2@HifdShUDj`kK;W(7xy*8zMtvq@X5~o@1IRC&7&40W;_-d~ddjyL z0~ge;rUDfM8y=&ERdW!qmKMU8LlrQ z^}WR_^yJ+VP}EtN3x4`=487E_ag zROBa=Xu)*8ZSp1aJht6*nO(EWwr>M>(RDp$1{F3fX!lK@S&gr1j&WdCzC;lkW@Kb+ zV0;h36|w3%$sYPi5BI$fZP*a3m~j?s8&g&RcL zi(a!)vDR$+dgWiZb0{=~Rnj0Z4AHH&u?pLn8v z#1l0lo=9J0e-`!#oS28l;t6m(bFjg^i2qkGGVs*!?3(CL zb-IC(Mz7LqfRgc3gD}G8u?< zPfqD(VhU%c-a`s>?~JBWnd_B5&6Sd;}s&+pdh4bOXIC`^myYn zfqs~Z&ab4_#ycxYRE}>V-DcM=I*iiKw5_XEC)P bs#2{5^^uDDD^Pz+MZGAZ`WR)Dq0j#Vi2{#B literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/models/EmailBodyAttachments.class b/target/classes/com/pepipost/api/models/EmailBodyAttachments.class new file mode 100644 index 0000000000000000000000000000000000000000..2b72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}l7gaElUiRq77Y7NeO7??=^SB@|({g1mjn-Z%dDWn)-c$wVzAf#3 zvs2zekMBUaa2BLfXLXB-4n1gP8F@i{&_u6V_z{Z&DJELc(AmSFOm8}t+#QQT-bG24YCi}4r~njr>H8WKuB|^t)!tm z;jV>y9fytBEHLg!=~VX`^kMn^-Z3zD@!*tr@)a=nR6elqP)+3oMR$P&9v^$03_=7> zkSRGp%xlM7>~i8XXh+v9JjN3iP?h^2(Bg3dv9niF-yM6H{Px zSN%N%7PH4VADL{X9JZsXyXC0^eD^|NidDjfQl|u&FWe NSdSijKrgk|t1l%HWZM7$ literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/models/From.class b/target/classes/com/pepipost/api/models/From.class new file mode 100644 index 0000000000000000000000000000000000000000..edb941374d99ffaad5a73862b86d0cb7a05104a6 GIT binary patch literal 1036 zcma))%We}f6o!B2+9cBpAuY6|El?>p4jq?HKvA{6jP+A@iqPC2m4r$5_(-C1y5Fycx4m0kBvJ7jDzg14o zL03B8gb`h(wl$4!`N=>#70H&eiahRXZJcmaJ6YUHERKYAGJX|>yeB#@tP20Ov9SUZd0Tk)Sp&EH0)QE9%f-tJm}Id4}Q*$w+$Y??vb zk$cKNY{9pp?jHzO=!-OsEX^y(V}|wx`lV7R(je|+PlB{&>5d+U=5rKrTA4rH{*3a6 zB&|YoE;$UaNc&)zfF)d@h~XlZNpywwC5kT5s9H*zRQrh4_mq*sSZ!&l+Bz=(q2>!Y zQQM)56p7@vZ+^n+7|z!OtWhQFiR98SYXs=wt5m74>*_SrxihF6r%^YjqF$edI#ioL S-8hX}Csh6q)Xk(@H+}(A#l=_v literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/models/FromBuilder.class b/target/classes/com/pepipost/api/models/FromBuilder.class new file mode 100644 index 0000000000000000000000000000000000000000..bc3ed90735a86b488dd2f2417c427307a16a7ed4 GIT binary patch literal 863 zcma))OHUgy6ot>tlS~E@0t8x8-bf*p7hUlFBp_mA`(FEgKIhth|NZ&{;0rd2$OzWEVc-q)zzo7+?5TnAg0QFkp?4I8 z!NJJ*JslO16I8F%weoz`zwo|wu5>pRf&?L9HEjm4BupW8*ZLi!aSkusK#= z>X9-_*3Q>J8DFr|Y(M!ui6hg$*xh;;$BJEW@c|zN?oh|Jk12HSH7FZWdwG{&!m2q| z0XyYl$;Gk-mQ$e33-TTNK7y6zcxm+JoP?vOtB;IrR@G`seQ#TvSY>mw{1t+X?J!q4 zuK73|ONK2us%w;gmaVn{wW?c;x%y0yCCpC;_842c4f8=FY z2eNKZ`Fw}@)(=JxBq!Oa^X~bCQhzv^QdmRIB02mtZ}L99;4PBZc!SqSc`HdDtY0tT X19_|ONm_wvVC|W?{G++G#K8K0+mWu{ literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/models/Personalizations.class b/target/classes/com/pepipost/api/models/Personalizations.class new file mode 100644 index 0000000000000000000000000000000000000000..f0ff77cd580e0e863c73972e57fc27690ae4375f GIT binary patch literal 2624 zcmb7^U31e$6o$__aYBOffk^@cTA)C13_%b+Qj*jVOi2mmV`A_y+%RjgBpYnWBdwXh zKjN;;z%bK`{(%0S-gY{DS5jnsWk@e%Y2|a?^So!z>aTzQ_>+jP(c@t%Fe+P4$Lxx( z>^hz@c~_bp=Z$E4<}=}Xj?LThBUjR~yM_6i@h8RuxZ>3{4 zge(1wR$Cz0^OsEsLEy#1`;6EIqp=#)6t`8Aw|k<s*DE8^G!yBHSEDC z4bUlrj?)Q76Lo2eC%sNfxX-!Y+)~}Kc)Q8baIC|ZgKAsCTV-F^^roV;u_e@IzwuM$ z`MlPj*zDO#c0^Np67|+>+fl(>Fk0}-z2%+~?rx`T?r`fJM#tn)khy{Nx=;u}#o~Lt z@gv0OqCp0Yfx$~KOqa6=x-ADR)YvOD0c$T4BQw6cfDsQy=(S~OhARe*YlaChB!kBi z>Dbv=vd+A2(1gw$OJrh=JWNG2jmegV^QZ-WHfWNL1OoAdg#R#J`yUU4`$JsX+pPE) z-_E=|=T&6_x(FMj`%76c^dH`j@HKz%k)}Tpv#NfB;bhga(`mqC!9of5CUj=u#f)QWkYBNz2HEyvWt z0SMF*s7qr`yXbG`DPx$V1erY0eFw`y8r+H literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/models/PersonalizationsBuilder.class b/target/classes/com/pepipost/api/models/PersonalizationsBuilder.class new file mode 100644 index 0000000000000000000000000000000000000000..3bf44354f2f02f999039ce64712eb5525dd50a41 GIT binary patch literal 2060 zcmbW1YfsZq7{~u-7Y3!U0fK_aMW*foR6s%8oWi277BxapUv{N|L%Oc%I-`CnO;i$1 z`~ZF^<8#{XTAIwgX?sqe^ZP%y^Zfby^EZGkJWC+LplJ1)V(AvQ>J3LxEw0q+r@GNl zUh8(FZmI_VtUA1IHV&KIIMwY0VhpJZ^@FMys(Gfos$S@tLt9p#JwvWCD7(NgQsgFg zN(|9V_Jko;CNCsJF)ky4(F7(KGK1nI$QU03IVB^G5r$-ioBGRUt*YC{YSqvgrYm(# zHBMBUi?zQQbIy5#VQXN&{hW~dW45kwi|Zz(;(4ah$iaDye(r*7*6yUl9}pI zP}QcRQ?h!3^_pSGVDHJuAnVB;bSd;i+fwL@*576rC*M@RBzgv{(_51u^2K4H-#crY05-toH9hjsG+Y>`lg9R&oNpZ(qBgJRPGW| z?ib|umzeyHNt7%s;xa>_C6#zF^tvK=9a9xszQf%PCsLvuEvC$S zsTpdm^JPIGg`O}`E~mVuT74ez%B!I=(i0u2B^f?e$~W9lAmq0d`Mu-Xh~T5=+I{YP z(7v+yX_388^Jl_P0hy+c!pJDXD22CP990esH!WCLAS^wLwOl((6-ISV@AlZ+8Xq_g zpYo>o^D&4+sfQFb3ztx!n;cWbwW(S&bj-K?Vc>|TGJG6M|Guv6@UF2=8cAwt>aQV- z3pCErQ%xXGjSd)%$%4LV+M_F`zDP5hzARjAe87CaKZ>F-Iv5+jucHzy!Rnd%q&!~*1MhwJO!pE&CH~{Kz-=$b-4_&JnZP8k z1$lS(L|`4VzKuLq9F%aQgqwn$?!|5 zMJA1>n^yAC!~$xBj7OkHZH;H7)~KT7U9cz|s-`di6_W|79Kax5rx)5#FD+-3Rn&F+Nb zsHfkU^hvfBPTKR-No?~m^PE;eE`3q{S^Vc%a4j=B;HmJt+PZ|@`UdCp5|wjQzi=;y zHLjH`e~o!HRB?+d=x~<9Xq}N@1N9j%$2^er71g~9Y_>i#nvm@5q|Vx#8KpkCIi)a% zoCZ09ChjicH7;=P8m~cK^Dn$69%j5pcs%8KSqv0XeRF9=ZiAQS%@trFWmkl^zv*)6>MS%;kFp00AIB~pJHzZXA!{3#hF_qpbbCd<7h4;f`#p%kw} zHU7Gy1L@WAdRPR3A8dOEKBIj3)J&UUH9ku}lAhFSjE3@sDgf4zJxfD0W6>mCU^G^i zo_Nu6_eAijooTY{*SJ&V$cc>6!=!#I6{FJW#+_z{iRwacn7~u{!l1}=yDd*kS5&2v z@OtWbzUCU8gw?XKI^ar+;JxeE4PJYve9z`bMfMKX&xA$+%upVK>g`QR#SO5$Jhmm%1}W`xN@;EgGdUMp^hDRd*po#UX+PNwZh&oh_nKXWrYa zITCLq&P3>ITQp7+kc4kcvUKLt67pm#ek-VnEg2r~nZ93SB|Nya0JkArDN52M%FsE? zhw;lLD2oftH*++>jDW(JK@CnE?o(LV7#YS?@jFd_F=ey3r_Do)E@E!A3uq1&g!yH< z0`aSupU3JNu6c!`ZndwJ`;3YN9jna_RJ%?$Vrq+VwKcp*KqOr(eWTnlT$qh$9;tIi za;9As0fzANNFL_8Nw@H>2X(X$b*UG1X#i@13RH}#MW}7HF4U!7R2!&wPDC9us3p1` s6OX#O+=sf-i~3*yDudfXQ>uCk*Ocv$6O71HyGKJpcdz literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/models/SendEmailResponseBuilder.class b/target/classes/com/pepipost/api/models/SendEmailResponseBuilder.class new file mode 100644 index 0000000000000000000000000000000000000000..35c848d272b3ad485f04e80d1283669e63b7bf8f GIT binary patch literal 1143 zcmbW0ZBG+H5Xb-1UVHR7=>t+wit;4%A$sClh%XRGOd3tZkdW|Z+b+1x_3maa@ zl4#-w@Iw*jwhbg;F`*pY4j{DJsp;E<{EqTe z{FacdH;xF#I~HOgi)kAsrc68{G*a^{*qAPWrP|0LPbjvPCqE1a9T|QW9aj=6ZNDqr zBN3{^9v>R<7ZnlSq*p%f3m0JYL@Wpg_4e)dY&Y)DODb5f@dQr^W+dZ14WIiLoV!)I zo0CwGVd#hNy;GlXQvbh%{lxvDTA$lk#tOk^tr|4S+e)98%Si1^$aRu|B)qKOqq+P_ z)}cQPyYfIKGq5yi%wHu>h!q~7EdMQpOfp5hGkDL_$ZLVEUA`s$mYSEan!jKlUt;Dv ziWhvAL7CSX9be|S3W}KJ75uI`hONhJ5#~_6=4Chz%=(66>j&nW=WLBgmcFTS?s-kA zjy%T{j$zIsa|ksoP2fGd!&_utZ33@`Rn1$&`k3cv8^|U4ZlvY;80>sgT<*HK7rKCr Ezr>;!@c;k- literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/models/Settings.class b/target/classes/com/pepipost/api/models/Settings.class new file mode 100644 index 0000000000000000000000000000000000000000..2c4dbfd4068bb09f064561df9b83053602ed0ad6 GIT binary patch literal 1797 zcma)*?M~BB7{{M8*yctzV7w^40xE1ER1jbAEddM$vPfjI#E)$~%mZD!v}eS41>S;p zp^3)C4_<&@O}q*3!T3L2Wm{J>KXm7`{rCU;{?B>#{rA^zM6^Qp)0AK|ZMk*5!5gCC z`cgLEf&qu%B|9HnJb?Ca1dyK})?J_%#e7GQ4R!tn_#jS1E5;*pJmi61Z8rFwRL(Ns$5Z{yegMNx%L}I8kBo~&q@hz zXf&*Z8ic1W80DcmXrH4}-qdJBDf3Wvyuvv`yQxljysM+(Ijc`^Ycxs)DDi2aoajs* z3RUoI#cg^P-xg|MbCqz`m(~2y42%YFB`HPcDNSdv&)_eUpe!ylH`pU}up(5j0y$Vw zAL|gl!EE7o0(UxAhBdkHg(g1+vUB)N1rIfv!d`0$Q1Alo7+s`GD0UfpWpxGDv=33Y z+b5d&07Zh@Zd0*tSLs@Z+x1Sj$9R!|Nory7GtIQ&R8~SSk~AAwPPSAbpn{)9VwGzy z4mIC{Iv+(X#iEwtP+M+YsPj?O6`-#6L0yPL9qvJ0jH0f`qAtauw%oc<7o(^fK;7(v zx*Uf((u1l;QFmfdSK?4xZe6H)6!ke!_xqr((k%=}WL8IeP}icUFJn>f(A^HVa8_Gx XU8rkOR0F8yKT!+8tlkU$F6(~)M{Xjc literal 0 HcmV?d00001 diff --git a/target/classes/com/pepipost/api/models/SettingsBuilder.class b/target/classes/com/pepipost/api/models/SettingsBuilder.class new file mode 100644 index 0000000000000000000000000000000000000000..c4b50b78d5572e56dca74b52246b38a83452443f GIT binary patch literal 1348 zcmb7^TTc@~6vzM5E8Pw)6f7!LTP)CvvZ9YD4<#WnY2=|w;^XczmVxbVvll*>CMt<0 zegHp|@yxQen08ZrncXwzoZq?b{`~dr2Y`LN$RowDYq=wREXH!|`hjkYr9N`cgzf7C z5d_j1`n^!vXTr-P!?1E;Tp7A;I79u!ybxBvu;j;f3|sw0tOJJJOXeiX3??<+03AUxd-XQ7nM+;m9J#Q0_}dya`99@ZK7xEf^|&*D~x=!;?ymFEhcp z^cmU<^Ned&>3(qCKzIy?t^Tz5*G?dY!aMkPl1lk5$35IPW~tuilO6&rf+%DqzQ2BaO^6x z5}Cc5s%TQCWihE4ONoBQa!6wTKMO*5a78Qv!GY6-kr%&RBz8Z*2)@fr!dddzDk^0sGq+r-;R;5B1j v3+;sdb!K=S;&l^vE$l`8)A20k>5&X%)jX!7$kDa>KTe04oeXn78rbvS3C9UR literal 0 HcmV?d00001