Skip to content

Commit 6567269

Browse files
authored
Merge pull request #29 from pagarme/CodeGen-Java
Code gen java
2 parents bbb66e6 + e01e434 commit 6567269

File tree

70 files changed

+6972
-1011
lines changed

Some content is hidden

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

70 files changed

+6972
-1011
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ License:
33
The MIT License (MIT)
44
http://opensource.org/licenses/MIT
55

6-
Copyright (c) 2014 - 2023 APIMATIC Limited
6+
Copyright (c) 2014 - 2024 APIMATIC Limited
77

88
Permission is hereby granted, free of charge, to any person obtaining a copy
99
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 44 additions & 51 deletions
Large diffs are not rendered by default.

doc/client.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ The following parameters are configurable for the API Client:
77
| --- | --- | --- |
88
| `serviceRefererName` | `String` | |
99
| `httpClientConfig` | [`ReadonlyHttpClientConfiguration`](http-client-configuration.md) | Http Client Configuration instance. |
10-
| `basicAuthUserName` | `String` | The username to use with basic authentication |
11-
| `basicAuthPassword` | `String` | The password to use with basic authentication |
1210

1311
The API client can be initialized as follows:
1412

@@ -17,7 +15,6 @@ PagarmeApiSDKClient client = new PagarmeApiSDKClient.Builder()
1715
.httpClientConfig(configBuilder -> configBuilder
1816
.timeout(0))
1917
.serviceRefererName("ServiceRefererName")
20-
.basicAuthCredentials("BasicAuthUserName", "BasicAuthPassword")
2118
.build();
2219
```
2320

doc/configuration-interface.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# Configuration Interface
33

4-
This is the base class for all exceptions that represent an error response from the server.
4+
This is the interface for client class that holds the configuration getters.
55

66
## Methods
77

doc/controllers/balance-operations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ GetBalanceOperationResponse getBalanceOperationById(
7171
## Example Usage
7272

7373
```java
74-
long id = 112L;
74+
long id = 112L;
7575

7676
try {
7777
GetBalanceOperationResponse result = balanceOperationsController.getBalanceOperationById(id);

doc/controllers/charges.md

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ GetChargeResponse updateChargeMetadata(
5151
## Example Usage
5252

5353
```java
54-
String chargeId = "charge_id8";
55-
UpdateMetadataRequest request = new UpdateMetadataRequest.Builder(
56-
new LinkedHashMap<String, String>() {{
57-
put("key0", "metadata3");
54+
String chargeId = "charge_id8";
55+
UpdateMetadataRequest request = new UpdateMetadataRequest.Builder(
56+
new LinkedHashMap<String, String>() {{
57+
put("key0", "metadata3");
5858
}}
59-
)
59+
)
6060
.build();
61-
61+
6262

6363
try {
6464
GetChargeResponse result = chargesController.updateChargeMetadata(chargeId, request, null);
@@ -97,21 +97,21 @@ GetChargeResponse updateChargePaymentMethod(
9797
## Example Usage
9898

9999
```java
100-
String chargeId = "charge_id8";
101-
UpdateChargePaymentMethodRequest request = new UpdateChargePaymentMethodRequest.Builder(
100+
String chargeId = "charge_id8";
101+
UpdateChargePaymentMethodRequest request = new UpdateChargePaymentMethodRequest.Builder(
102102
false,
103103
"payment_method4",
104-
new CreateCreditCardPaymentRequest.Builder()
105-
.installments(1)
106-
.capture(true)
107-
.recurrencyCycle("\"first\" or \"subsequent\"")
104+
new CreateCreditCardPaymentRequest.Builder()
105+
.installments(1)
106+
.capture(true)
107+
.recurrencyCycle("\"first\" or \"subsequent\"")
108108
.build(),
109-
new CreateDebitCardPaymentRequest.Builder()
109+
new CreateDebitCardPaymentRequest.Builder()
110110
.build(),
111-
new CreateBoletoPaymentRequest.Builder(
111+
new CreateBoletoPaymentRequest.Builder(
112112
226,
113113
"instructions2",
114-
new CreateAddressRequest.Builder(
114+
new CreateAddressRequest.Builder(
115115
"street8",
116116
"number4",
117117
"zip_code2",
@@ -122,33 +122,33 @@ UpdateChargePaymentMethodRequest request = new UpdateChargePaymentMethodRequest.
122122
"complement6",
123123
"line_18",
124124
"line_26"
125-
)
125+
)
126126
.build(),
127127
"document_number6",
128128
"statement_descriptor0"
129-
)
129+
)
130130
.build(),
131-
new CreateVoucherPaymentRequest.Builder()
132-
.recurrencyCycle("\"first\" or \"subsequent\"")
131+
new CreateVoucherPaymentRequest.Builder()
132+
.recurrencyCycle("\"first\" or \"subsequent\"")
133133
.build(),
134-
new CreateCashPaymentRequest.Builder(
134+
new CreateCashPaymentRequest.Builder(
135135
"description0",
136136
false
137-
)
137+
)
138138
.build(),
139-
new CreateBankTransferPaymentRequest.Builder(
139+
new CreateBankTransferPaymentRequest.Builder(
140140
"bank0",
141141
236
142-
)
142+
)
143143
.build(),
144-
new CreatePrivateLabelPaymentRequest.Builder()
145-
.installments(1)
146-
.capture(true)
147-
.recurrencyCycle("\"first\" or \"subsequent\"")
144+
new CreatePrivateLabelPaymentRequest.Builder()
145+
.installments(1)
146+
.capture(true)
147+
.recurrencyCycle("\"first\" or \"subsequent\"")
148148
.build()
149-
)
149+
)
150150
.build();
151-
151+
152152

153153
try {
154154
GetChargeResponse result = chargesController.updateChargePaymentMethod(chargeId, request, null);
@@ -185,7 +185,7 @@ ListChargeTransactionsResponse getChargeTransactions(
185185
## Example Usage
186186

187187
```java
188-
String chargeId = "charge_id8";
188+
String chargeId = "charge_id8";
189189

190190
try {
191191
ListChargeTransactionsResponse result = chargesController.getChargeTransactions(chargeId, null, null);
@@ -224,10 +224,10 @@ GetChargeResponse updateChargeDueDate(
224224
## Example Usage
225225

226226
```java
227-
String chargeId = "charge_id8";
228-
UpdateChargeDueDateRequest request = new UpdateChargeDueDateRequest.Builder()
227+
String chargeId = "charge_id8";
228+
UpdateChargeDueDateRequest request = new UpdateChargeDueDateRequest.Builder()
229229
.build();
230-
230+
231231

232232
try {
233233
GetChargeResponse result = chargesController.updateChargeDueDate(chargeId, request, null);
@@ -315,7 +315,7 @@ GetChargeResponse captureCharge(
315315
## Example Usage
316316

317317
```java
318-
String chargeId = "charge_id8";
318+
String chargeId = "charge_id8";
319319

320320
try {
321321
GetChargeResponse result = chargesController.captureCharge(chargeId, null, null);
@@ -354,17 +354,17 @@ GetChargeResponse updateChargeCard(
354354
## Example Usage
355355

356356
```java
357-
String chargeId = "charge_id8";
358-
UpdateChargeCardRequest request = new UpdateChargeCardRequest.Builder(
357+
String chargeId = "charge_id8";
358+
UpdateChargeCardRequest request = new UpdateChargeCardRequest.Builder(
359359
false,
360360
"card_id2",
361-
new CreateCardRequest.Builder()
362-
.type("credit")
361+
new CreateCardRequest.Builder()
362+
.type("credit")
363363
.build(),
364364
false
365-
)
365+
)
366366
.build();
367-
367+
368368

369369
try {
370370
GetChargeResponse result = chargesController.updateChargeCard(chargeId, request, null);
@@ -399,7 +399,7 @@ GetChargeResponse getCharge(
399399
## Example Usage
400400

401401
```java
402-
String chargeId = "charge_id8";
402+
String chargeId = "charge_id8";
403403

404404
try {
405405
GetChargeResponse result = chargesController.getCharge(chargeId);
@@ -436,7 +436,7 @@ GetChargesSummaryResponse getChargesSummary(
436436
## Example Usage
437437

438438
```java
439-
String status = "status8";
439+
String status = "status8";
440440

441441
try {
442442
GetChargesSummaryResponse result = chargesController.getChargesSummary(status, null, null);
@@ -473,7 +473,7 @@ GetChargeResponse retryCharge(
473473
## Example Usage
474474

475475
```java
476-
String chargeId = "charge_id8";
476+
String chargeId = "charge_id8";
477477

478478
try {
479479
GetChargeResponse result = chargesController.retryCharge(chargeId, null);
@@ -512,7 +512,7 @@ GetChargeResponse cancelCharge(
512512
## Example Usage
513513

514514
```java
515-
String chargeId = "charge_id8";
515+
String chargeId = "charge_id8";
516516

517517
try {
518518
GetChargeResponse result = chargesController.cancelCharge(chargeId, null, null);
@@ -549,16 +549,16 @@ GetChargeResponse createCharge(
549549
## Example Usage
550550

551551
```java
552-
CreateChargeRequest request = new CreateChargeRequest.Builder(
552+
CreateChargeRequest request = new CreateChargeRequest.Builder(
553553
242,
554-
new CreatePaymentRequest.Builder(
554+
new CreatePaymentRequest.Builder(
555555
"payment_method4"
556-
)
556+
)
557557
.build(),
558558
"order_id0"
559-
)
559+
)
560560
.build();
561-
561+
562562

563563
try {
564564
GetChargeResponse result = chargesController.createCharge(request, null);
@@ -595,7 +595,7 @@ GetChargeResponse confirmPayment(
595595
## Example Usage
596596

597597
```java
598-
String chargeId = "charge_id8";
598+
String chargeId = "charge_id8";
599599

600600
try {
601601
GetChargeResponse result = chargesController.confirmPayment(chargeId, null, null);

0 commit comments

Comments
 (0)