Skip to content

Commit bbb66e6

Browse files
authored
Merge pull request #27 from pagarme/CodeGen-Java
Code gen java
2 parents 1da50a7 + 3377574 commit bbb66e6

File tree

356 files changed

+8254
-5900
lines changed

Some content is hidden

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

356 files changed

+8254
-5900
lines changed

README.md

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ you will need internet access for a successful build.
1616

1717
* In order to open the client library in Eclipse click on `File -> Import`.
1818

19-
![Importing SDK into Eclipse - Step 1](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.0&step=import0)
19+
![Importing SDK into Eclipse - Step 1](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.1&step=import0)
2020

2121
* In the import dialog, select `Existing Java Project` and click `Next`.
2222

23-
![Importing SDK into Eclipse - Step 2](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.0&step=import1)
23+
![Importing SDK into Eclipse - Step 2](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.1&step=import1)
2424

2525
* Browse to locate the folder containing the source code. Select the detected location of the project and click `Finish`.
2626

27-
![Importing SDK into Eclipse - Step 3](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.0&step=import2)
27+
![Importing SDK into Eclipse - Step 3](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.1&step=import2)
2828

2929
* Upon successful import, the project will be automatically built by Eclipse after automatically resolving the dependencies.
3030

31-
![Importing SDK into Eclipse - Step 4](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.0&step=import3)
31+
![Importing SDK into Eclipse - Step 4](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.1&step=import3)
3232

3333
## Installation
3434

@@ -38,35 +38,35 @@ The following section explains how to use the PagarmeApiSDKLib library in a new
3838

3939
For starting a new project, click the menu command `File > New > Project`.
4040

41-
![Add a new project in Eclipse](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.0&step=createNewProject0)
41+
![Add a new project in Eclipse](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.1&step=createNewProject0)
4242

4343
Next, choose `Maven > Maven Project` and click `Next`.
4444

45-
![Create a new Maven Project - Step 1](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.0&step=createNewProject1)
45+
![Create a new Maven Project - Step 1](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.1&step=createNewProject1)
4646

4747
Here, make sure to use the current workspace by choosing `Use default Workspace location`, as shown in the picture below and click `Next`.
4848

49-
![Create a new Maven Project - Step 2](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.0&step=createNewProject2)
49+
![Create a new Maven Project - Step 2](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.1&step=createNewProject2)
5050

5151
Following this, select the *quick start* project type to create a simple project with an existing class and a `main` method. To do this, choose `maven-archetype-quickstart` item from the list and click `Next`.
5252

53-
![Create a new Maven Project - Step 3](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.0&step=createNewProject3)
53+
![Create a new Maven Project - Step 3](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.1&step=createNewProject3)
5454

5555
In the last step, provide a `Group Id` and `Artifact Id` as shown in the picture below and click `Finish`.
5656

57-
![Create a new Maven Project - Step 4](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.0&step=createNewProject4)
57+
![Create a new Maven Project - Step 4](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.1&step=createNewProject4)
5858

5959
### 2. Add reference of the library project
6060

6161
The created Maven project manages its dependencies using its `pom.xml` file. In order to add a dependency on the *PagarmeApiSDKLib* 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 and click the `Add` button as shown in the picture below.
6262

63-
![Adding dependency to the client library - Step 1](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.0&step=testProject0)
63+
![Adding dependency to the client library - Step 1](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.1&step=testProject0)
6464

65-
Clicking the `Add` button will open a dialog where you need to specify PagarmeApiSDKLib in `Group Id`, pagarme-api-sdklib in `Artifact Id` and 6.8.0 in the `Version` fields. Once added click `OK`. Save the `pom.xml` file.
65+
Clicking the `Add` button will open a dialog where you need to specify PagarmeApiSDKLib in `Group Id`, pagarme-api-sdklib in `Artifact Id` and 6.8.1 in the `Version` fields. Once added click `OK`. Save the `pom.xml` file.
6666

67-
![Adding dependency to the client library - Step 2](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.0&step=testProject1)
67+
![Adding dependency to the client library - Step 2](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.1&step=testProject1)
6868

69-
![Adding sample code](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.0&step=testProject2)
69+
![Adding sample code](https://apidocs.io/illustration/java?workspaceFolder=PagarmeApiSDK-Java&workspaceName=PagarmeApiSDK&projectName=PagarmeApiSDKLib&rootNamespace=me.pagar.api&groupId=PagarmeApiSDKLib&artifactId=pagarme-api-sdklib&version=6.8.1&step=testProject2)
7070

7171
### 3. Write sample code
7272

@@ -75,14 +75,14 @@ Here, you can add code to initialize the client library and instantiate a *Contr
7575

7676
## Initialize the API Client
7777

78-
**_Note:_** Documentation for the client can be found [here.](doc/client.md)
78+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/client.md)
7979

8080
The following parameters are configurable for the API Client:
8181

8282
| Parameter | Type | Description |
8383
| --- | --- | --- |
8484
| `serviceRefererName` | `String` | |
85-
| `httpClientConfig` | [`ReadonlyHttpClientConfiguration`](__base_path/http-client-configuration.md) | Http Client Configuration instance. |
85+
| `httpClientConfig` | [`ReadonlyHttpClientConfiguration`](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/http-client-configuration.md) | Http Client Configuration instance. |
8686
| `basicAuthUserName` | `String` | The username to use with basic authentication |
8787
| `basicAuthPassword` | `String` | The password to use with basic authentication |
8888

@@ -107,39 +107,39 @@ Here is the list of errors that the API might throw.
107107

108108
| HTTP Status Code | Error Description | Exception Class |
109109
| --- | --- | --- |
110-
| 400 | Invalid request | [`ErrorException`](doc/models/error-exception.md) |
111-
| 401 | Invalid API key | [`ErrorException`](doc/models/error-exception.md) |
112-
| 404 | An informed resource was not found | [`ErrorException`](doc/models/error-exception.md) |
113-
| 412 | Business validation error | [`ErrorException`](doc/models/error-exception.md) |
114-
| 422 | Contract validation error | [`ErrorException`](doc/models/error-exception.md) |
115-
| 500 | Internal server error | [`ErrorException`](doc/models/error-exception.md) |
110+
| 400 | Invalid request | [`ErrorException`](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/models/error-exception.md) |
111+
| 401 | Invalid API key | [`ErrorException`](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/models/error-exception.md) |
112+
| 404 | An informed resource was not found | [`ErrorException`](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/models/error-exception.md) |
113+
| 412 | Business validation error | [`ErrorException`](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/models/error-exception.md) |
114+
| 422 | Contract validation error | [`ErrorException`](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/models/error-exception.md) |
115+
| 500 | Internal server error | [`ErrorException`](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/models/error-exception.md) |
116116

117117
## List of APIs
118118

119-
* [Subscriptions](doc/controllers/subscriptions.md)
120-
* [Orders](doc/controllers/orders.md)
121-
* [Plans](doc/controllers/plans.md)
122-
* [Invoices](doc/controllers/invoices.md)
123-
* [Customers](doc/controllers/customers.md)
124-
* [Charges](doc/controllers/charges.md)
125-
* [Recipients](doc/controllers/recipients.md)
126-
* [Tokens](doc/controllers/tokens.md)
127-
* [Transactions](doc/controllers/transactions.md)
128-
* [Transfers](doc/controllers/transfers.md)
129-
* [Payables](doc/controllers/payables.md)
130-
* [Balance Operations](doc/controllers/balance-operations.md)
119+
* [Subscriptions](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/controllers/subscriptions.md)
120+
* [Orders](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/controllers/orders.md)
121+
* [Plans](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/controllers/plans.md)
122+
* [Invoices](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/controllers/invoices.md)
123+
* [Customers](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/controllers/customers.md)
124+
* [Charges](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/controllers/charges.md)
125+
* [Recipients](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/controllers/recipients.md)
126+
* [Tokens](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/controllers/tokens.md)
127+
* [Transactions](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/controllers/transactions.md)
128+
* [Transfers](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/controllers/transfers.md)
129+
* [Payables](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/controllers/payables.md)
130+
* [Balance Operations](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/controllers/balance-operations.md)
131131

132132
## Classes Documentation
133133

134-
* [Utility Classes](doc/utility-classes.md)
135-
* [HttpRequest](doc/http-request.md)
136-
* [HttpResponse](doc/http-response.md)
137-
* [HttpStringResponse](doc/http-string-response.md)
138-
* [HttpContext](doc/http-context.md)
139-
* [HttpBodyRequest](doc/http-body-request.md)
140-
* [Headers](doc/headers.md)
141-
* [ApiException](doc/api-exception.md)
142-
* [Configuration Interface](doc/configuration-interface.md)
143-
* [HttpClientConfiguration](doc/http-client-configuration.md)
144-
* [HttpClientConfiguration.Builder](doc/http-client-configuration-builder.md)
134+
* [Utility Classes](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/utility-classes.md)
135+
* [HttpRequest](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/http-request.md)
136+
* [HttpResponse](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/http-response.md)
137+
* [HttpStringResponse](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/http-string-response.md)
138+
* [HttpContext](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/http-context.md)
139+
* [HttpBodyRequest](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/http-body-request.md)
140+
* [Headers](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/headers.md)
141+
* [ApiException](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/api-exception.md)
142+
* [Configuration Interface](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/configuration-interface.md)
143+
* [HttpClientConfiguration](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/http-client-configuration.md)
144+
* [HttpClientConfiguration.Builder](https://www.github.com/pagarme/pagarme-java-sdk/tree/6.8.1/doc/http-client-configuration-builder.md)
145145

doc/client.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ The gateway for the SDK. This class acts as a factory for the Controllers and al
2929

3030
| Name | Description | Return Type |
3131
| --- | --- | --- |
32+
| `getSubscriptionsController()` | Provides access to Subscriptions controller. | `SubscriptionsController` |
3233
| `getOrdersController()` | Provides access to Orders controller. | `OrdersController` |
3334
| `getPlansController()` | Provides access to Plans controller. | `PlansController` |
34-
| `getSubscriptionsController()` | Provides access to Subscriptions controller. | `SubscriptionsController` |
3535
| `getInvoicesController()` | Provides access to Invoices controller. | `InvoicesController` |
3636
| `getCustomersController()` | Provides access to Customers controller. | `CustomersController` |
37-
| `getRecipientsController()` | Provides access to Recipients controller. | `RecipientsController` |
3837
| `getChargesController()` | Provides access to Charges controller. | `ChargesController` |
38+
| `getRecipientsController()` | Provides access to Recipients controller. | `RecipientsController` |
3939
| `getTokensController()` | Provides access to Tokens controller. | `TokensController` |
40-
| `getTransfersController()` | Provides access to Transfers controller. | `TransfersController` |
4140
| `getTransactionsController()` | Provides access to Transactions controller. | `TransactionsController` |
41+
| `getTransfersController()` | Provides access to Transfers controller. | `TransfersController` |
4242
| `getPayablesController()` | Provides access to Payables controller. | `PayablesController` |
4343
| `getBalanceOperationsController()` | Provides access to BalanceOperations controller. | `BalanceOperationsController` |
4444

doc/controllers/balance-operations.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ BalanceOperationsController balanceOperationsController = client.getBalanceOpera
2020
ListBalanceOperationResponse getBalanceOperations(
2121
final String status,
2222
final LocalDateTime createdSince,
23-
final LocalDateTime createdUntil)
23+
final LocalDateTime createdUntil,
24+
final String recipientId)
2425
```
2526

2627
## Parameters
@@ -30,6 +31,7 @@ ListBalanceOperationResponse getBalanceOperations(
3031
| `status` | `String` | Query, Optional | - |
3132
| `createdSince` | `LocalDateTime` | Query, Optional | - |
3233
| `createdUntil` | `LocalDateTime` | Query, Optional | - |
34+
| `recipientId` | `String` | Query, Optional | - |
3335

3436
## Response Type
3537

@@ -39,7 +41,7 @@ ListBalanceOperationResponse getBalanceOperations(
3941

4042
```java
4143
try {
42-
ListBalanceOperationResponse result = balanceOperationsController.getBalanceOperations(null, null, null);
44+
ListBalanceOperationResponse result = balanceOperationsController.getBalanceOperations(null, null, null, null);
4345
System.out.println(result);
4446
} catch (ApiException e) {
4547
e.printStackTrace();

0 commit comments

Comments
 (0)