Skip to content

Commit

Permalink
fix models
Browse files Browse the repository at this point in the history
  • Loading branch information
fcarrero committed Aug 28, 2024
1 parent 160cc3f commit 3ac8fe9
Show file tree
Hide file tree
Showing 212 changed files with 2,040 additions and 302 deletions.
2 changes: 1 addition & 1 deletion .openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.gitignore
README.md
build.gradle
docs/AntifraudApi.md
Expand Down Expand Up @@ -411,3 +410,4 @@ src/main/java/io/conekta/model/WebhookRequest.java
src/main/java/io/conekta/model/WebhookResponse.java
src/main/java/io/conekta/model/WebhookUpdateRequest.java
src/main/java/io/conekta/model/WhitelistlistRuleResponse.java
src/mainjava/io/conekta/model/OasAnyTypeNotMapped.java
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test:
mvn -B package --no-transfer-progress --file pom.xml
./gradlew test
android:
rm -rf src/main/kotlin && \
rm -rf docs && \
Expand Down
10 changes: 9 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,13 @@
"serializationLibrary": "gson",
"httpUserAgent": "Conekta/v2 Android/6.0.0-beta",
"openApiNullable" : false,
"apiVersion" :"application/vnd.conekta-v2.1.0+json"
"apiVersion" :"application/vnd.conekta-v2.1.0+json",
"templateDir": "local/templates",
"files": {
"OasAnyTypeNotMapped.mustache" : {
"templateType": "SupportingFiles",
"destinationFilename": "OasAnyTypeNotMapped.java",
"folder": "src/mainjava/io/conekta/model"
}
}
}
2 changes: 1 addition & 1 deletion docs/TransactionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ String previous = null; // String | previous page
String id = 65412a893cd69a0001c25892; // String | id of the object to be retrieved
String chargeId = 65412a893cd69a0001c25892; // String | id of the charge used for filtering
String type = capture; // String | type of the object to be retrieved
String currency = "MXN"; // String | currency of the object to be retrieved
String currency = MXN; // String | currency of the object to be retrieved
try {
GetTransactionsResponse result = apiInstance.getTransactions(acceptLanguage, xChildCompanyId, limit, next, previous, id, chargeId, type, currency);
System.out.println(result);
Expand Down
39 changes: 27 additions & 12 deletions src/main/java/io/conekta/AntifraudApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

public class AntifraudApi {
String basePath = "https://api.conekta.io";
String apiKey;
ApiInvoker apiInvoker = ApiInvoker.getInstance();

public void addHeader(String key, String value) {
Expand All @@ -53,6 +54,14 @@ public void setBasePath(String basePath) {
public String getBasePath() {
return basePath;
}

public void setApiKey(String apiKey){
this.apiKey = apiKey;
}

public String GetApiKey(){
return this.apiKey;
}

/**
* Create blacklisted rule
Expand All @@ -78,9 +87,10 @@ public BlacklistRuleResponse createRuleBlacklist (CreateRiskRulesData createRis
// form params
Map<String, String> localVarFormParams = new HashMap<String, String>();


localVarHeaderParams.put("Accept-Language", ApiInvoker.parameterToString(acceptLanguage));


localVarHeaderParams.put("Authorization", ApiInvoker.parameterToString("Bearer " + apiKey));

String[] localVarContentTypes = {
"application/json"
};
Expand Down Expand Up @@ -128,9 +138,10 @@ public WhitelistlistRuleResponse createRuleWhitelist (String acceptLanguage, Cr
// form params
Map<String, String> localVarFormParams = new HashMap<String, String>();


localVarHeaderParams.put("Accept-Language", ApiInvoker.parameterToString(acceptLanguage));


localVarHeaderParams.put("Authorization", ApiInvoker.parameterToString("Bearer " + apiKey));

String[] localVarContentTypes = {
"application/json"
};
Expand Down Expand Up @@ -183,10 +194,11 @@ public DeletedBlacklistRuleResponse deleteRuleBlacklist (String id, String acce
// form params
Map<String, String> localVarFormParams = new HashMap<String, String>();


localVarHeaderParams.put("Accept-Language", ApiInvoker.parameterToString(acceptLanguage));
localVarHeaderParams.put("X-Child-Company-Id", ApiInvoker.parameterToString(xChildCompanyId));


localVarHeaderParams.put("Authorization", ApiInvoker.parameterToString("Bearer " + apiKey));

String[] localVarContentTypes = {

};
Expand Down Expand Up @@ -239,10 +251,11 @@ public DeletedWhitelistRuleResponse deleteRuleWhitelist (String id, String acce
// form params
Map<String, String> localVarFormParams = new HashMap<String, String>();


localVarHeaderParams.put("Accept-Language", ApiInvoker.parameterToString(acceptLanguage));
localVarHeaderParams.put("X-Child-Company-Id", ApiInvoker.parameterToString(xChildCompanyId));


localVarHeaderParams.put("Authorization", ApiInvoker.parameterToString("Bearer " + apiKey));

String[] localVarContentTypes = {

};
Expand Down Expand Up @@ -289,9 +302,10 @@ public RiskRulesList getRuleBlacklist (String acceptLanguage) throws ApiExcepti
// form params
Map<String, String> localVarFormParams = new HashMap<String, String>();


localVarHeaderParams.put("Accept-Language", ApiInvoker.parameterToString(acceptLanguage));


localVarHeaderParams.put("Authorization", ApiInvoker.parameterToString("Bearer " + apiKey));

String[] localVarContentTypes = {

};
Expand Down Expand Up @@ -338,9 +352,10 @@ public RiskRulesList getRuleWhitelist (String acceptLanguage) throws ApiExcepti
// form params
Map<String, String> localVarFormParams = new HashMap<String, String>();


localVarHeaderParams.put("Accept-Language", ApiInvoker.parameterToString(acceptLanguage));


localVarHeaderParams.put("Authorization", ApiInvoker.parameterToString("Bearer " + apiKey));

String[] localVarContentTypes = {

};
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/conekta/ApiInvoker.java
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public String invokeAPI(String host, String path, String method, List<Pair> quer
try {
if ("GET".equals(method)) {
HttpGet get = new HttpGet(url);
get.addHeader("Accept", "Accept: application/vnd.conekta-v2.1.0+json");
get.addHeader("Accept", "application/json");
for(String key : headers.keySet()) {
get.setHeader(key, headers.get(key));
}
Expand Down
34 changes: 24 additions & 10 deletions src/main/java/io/conekta/ApiKeysApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

public class ApiKeysApi {
String basePath = "https://api.conekta.io";
String apiKey;
ApiInvoker apiInvoker = ApiInvoker.getInstance();

public void addHeader(String key, String value) {
Expand All @@ -53,6 +54,14 @@ public void setBasePath(String basePath) {
public String getBasePath() {
return basePath;
}

public void setApiKey(String apiKey){
this.apiKey = apiKey;
}

public String GetApiKey(){
return this.apiKey;
}

/**
* Create Api Key
Expand All @@ -79,10 +88,11 @@ public ApiKeyCreateResponse createApiKey (ApiKeyRequest apiKeyRequest, String a
// form params
Map<String, String> localVarFormParams = new HashMap<String, String>();


localVarHeaderParams.put("Accept-Language", ApiInvoker.parameterToString(acceptLanguage));
localVarHeaderParams.put("X-Child-Company-Id", ApiInvoker.parameterToString(xChildCompanyId));


localVarHeaderParams.put("Authorization", ApiInvoker.parameterToString("Bearer " + apiKey));

String[] localVarContentTypes = {
"application/json"
};
Expand Down Expand Up @@ -134,9 +144,10 @@ public DeleteApiKeysResponse deleteApiKey (String id, String acceptLanguage) th
// form params
Map<String, String> localVarFormParams = new HashMap<String, String>();


localVarHeaderParams.put("Accept-Language", ApiInvoker.parameterToString(acceptLanguage));


localVarHeaderParams.put("Authorization", ApiInvoker.parameterToString("Bearer " + apiKey));

String[] localVarContentTypes = {

};
Expand Down Expand Up @@ -189,10 +200,11 @@ public ApiKeyResponse getApiKey (String id, String acceptLanguage, String xChil
// form params
Map<String, String> localVarFormParams = new HashMap<String, String>();


localVarHeaderParams.put("Accept-Language", ApiInvoker.parameterToString(acceptLanguage));
localVarHeaderParams.put("X-Child-Company-Id", ApiInvoker.parameterToString(xChildCompanyId));


localVarHeaderParams.put("Authorization", ApiInvoker.parameterToString("Bearer " + apiKey));

String[] localVarContentTypes = {

};
Expand Down Expand Up @@ -248,10 +260,11 @@ public GetApiKeysResponse getApiKeys (String acceptLanguage, String xChildCompa
localVarQueryParams.addAll(ApiInvoker.parameterToPairs("", "next", next));
localVarQueryParams.addAll(ApiInvoker.parameterToPairs("", "previous", previous));
localVarQueryParams.addAll(ApiInvoker.parameterToPairs("", "search", search));

localVarHeaderParams.put("Accept-Language", ApiInvoker.parameterToString(acceptLanguage));
localVarHeaderParams.put("X-Child-Company-Id", ApiInvoker.parameterToString(xChildCompanyId));


localVarHeaderParams.put("Authorization", ApiInvoker.parameterToString("Bearer " + apiKey));

String[] localVarContentTypes = {

};
Expand Down Expand Up @@ -304,9 +317,10 @@ public ApiKeyResponse updateApiKey (String id, String acceptLanguage, ApiKeyUpd
// form params
Map<String, String> localVarFormParams = new HashMap<String, String>();


localVarHeaderParams.put("Accept-Language", ApiInvoker.parameterToString(acceptLanguage));


localVarHeaderParams.put("Authorization", ApiInvoker.parameterToString("Bearer " + apiKey));

String[] localVarContentTypes = {
"application/json"
};
Expand Down
14 changes: 12 additions & 2 deletions src/main/java/io/conekta/BalancesApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

public class BalancesApi {
String basePath = "https://api.conekta.io";
String apiKey;
ApiInvoker apiInvoker = ApiInvoker.getInstance();

public void addHeader(String key, String value) {
Expand All @@ -48,6 +49,14 @@ public void setBasePath(String basePath) {
public String getBasePath() {
return basePath;
}

public void setApiKey(String apiKey){
this.apiKey = apiKey;
}

public String GetApiKey(){
return this.apiKey;
}

/**
* Get a company&#39;s balance
Expand All @@ -68,9 +77,10 @@ public BalanceResponse getBalance (String acceptLanguage) throws ApiException {
// form params
Map<String, String> localVarFormParams = new HashMap<String, String>();


localVarHeaderParams.put("Accept-Language", ApiInvoker.parameterToString(acceptLanguage));


localVarHeaderParams.put("Authorization", ApiInvoker.parameterToString("Bearer " + apiKey));

String[] localVarContentTypes = {

};
Expand Down
24 changes: 18 additions & 6 deletions src/main/java/io/conekta/ChargesApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

public class ChargesApi {
String basePath = "https://api.conekta.io";
String apiKey;
ApiInvoker apiInvoker = ApiInvoker.getInstance();

public void addHeader(String key, String value) {
Expand All @@ -52,6 +53,14 @@ public void setBasePath(String basePath) {
public String getBasePath() {
return basePath;
}

public void setApiKey(String apiKey){
this.apiKey = apiKey;
}

public String GetApiKey(){
return this.apiKey;
}

/**
* Get A List of Charges
Expand Down Expand Up @@ -81,10 +90,11 @@ public GetChargesResponse getCharges (String acceptLanguage, String xChildCompa
localVarQueryParams.addAll(ApiInvoker.parameterToPairs("", "search", search));
localVarQueryParams.addAll(ApiInvoker.parameterToPairs("", "next", next));
localVarQueryParams.addAll(ApiInvoker.parameterToPairs("", "previous", previous));

localVarHeaderParams.put("Accept-Language", ApiInvoker.parameterToString(acceptLanguage));
localVarHeaderParams.put("X-Child-Company-Id", ApiInvoker.parameterToString(xChildCompanyId));


localVarHeaderParams.put("Authorization", ApiInvoker.parameterToString("Bearer " + apiKey));

String[] localVarContentTypes = {

};
Expand Down Expand Up @@ -142,10 +152,11 @@ public ChargeOrderResponse ordersCreateCharge (String id, ChargeRequest chargeR
// form params
Map<String, String> localVarFormParams = new HashMap<String, String>();


localVarHeaderParams.put("Accept-Language", ApiInvoker.parameterToString(acceptLanguage));
localVarHeaderParams.put("X-Child-Company-Id", ApiInvoker.parameterToString(xChildCompanyId));


localVarHeaderParams.put("Authorization", ApiInvoker.parameterToString("Bearer " + apiKey));

String[] localVarContentTypes = {
"application/json"
};
Expand Down Expand Up @@ -203,10 +214,11 @@ public ChargeResponse updateCharge (String id, ChargeUpdateRequest chargeUpdate
// form params
Map<String, String> localVarFormParams = new HashMap<String, String>();


localVarHeaderParams.put("Accept-Language", ApiInvoker.parameterToString(acceptLanguage));
localVarHeaderParams.put("X-Child-Company-Id", ApiInvoker.parameterToString(xChildCompanyId));


localVarHeaderParams.put("Authorization", ApiInvoker.parameterToString("Bearer " + apiKey));

String[] localVarContentTypes = {
"application/json"
};
Expand Down
19 changes: 15 additions & 4 deletions src/main/java/io/conekta/CompaniesApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

public class CompaniesApi {
String basePath = "https://api.conekta.io";
String apiKey;
ApiInvoker apiInvoker = ApiInvoker.getInstance();

public void addHeader(String key, String value) {
Expand All @@ -49,6 +50,14 @@ public void setBasePath(String basePath) {
public String getBasePath() {
return basePath;
}

public void setApiKey(String apiKey){
this.apiKey = apiKey;
}

public String GetApiKey(){
return this.apiKey;
}

/**
* Get List of Companies
Expand Down Expand Up @@ -77,9 +86,10 @@ public GetCompaniesResponse getCompanies (String acceptLanguage, Integer limit,
localVarQueryParams.addAll(ApiInvoker.parameterToPairs("", "search", search));
localVarQueryParams.addAll(ApiInvoker.parameterToPairs("", "next", next));
localVarQueryParams.addAll(ApiInvoker.parameterToPairs("", "previous", previous));

localVarHeaderParams.put("Accept-Language", ApiInvoker.parameterToString(acceptLanguage));


localVarHeaderParams.put("Authorization", ApiInvoker.parameterToString("Bearer " + apiKey));

String[] localVarContentTypes = {

};
Expand Down Expand Up @@ -131,9 +141,10 @@ public CompanyResponse getCompany (String id, String acceptLanguage) throws Api
// form params
Map<String, String> localVarFormParams = new HashMap<String, String>();


localVarHeaderParams.put("Accept-Language", ApiInvoker.parameterToString(acceptLanguage));


localVarHeaderParams.put("Authorization", ApiInvoker.parameterToString("Bearer " + apiKey));

String[] localVarContentTypes = {

};
Expand Down
Loading

0 comments on commit 3ac8fe9

Please sign in to comment.