Skip to content

Commit

Permalink
Update sdk (#35)
Browse files Browse the repository at this point in the history
* beta 1

* using kotlin

* kotlin

* mockkon

* ignore model test

* fix java version

* java 11

* kotlin

* kotlin

* java 8

* java 11

* using android

* changes

* config java 11

* fix models

* chore: Update build process to use Makefile and Gradle 7.3.1

* 6.0.0 beta version

* Remove OasAnyTypeNotMapped class

This commit removes the OasAnyTypeNotMapped class from the codebase. The class was no longer needed and has been deleted.

* Update artifact and user agent versions

- Updated the artifact version in config.json and README.md from "6.0.0-beta" to "6.0.0-SNAPSHOT".
- Updated the user agent version in ApiInvoker.java from "6.0.0-beta" to "6.0.0-SNAPSHOT".

* Fix null return in ApiInvoker and JsonUtil

- In ApiInvoker, changed the return value from an empty string to null when the parameter is null.
- In JsonUtil, removed the serialization of null values.

Created a new test file CustomerApiTest.java for testing the creation of a customer.

* .gitignore and add Token.java gradle.properties, and AndroidManifest.xml

- Updated .gitignore to ignore local.properties instead of gradle.properties
- Added Token.java file with code for creating a token using Conekta API
- Created gradle.properties file with AndroidX and Jetifier configuration
- Modified AndroidManifest.xml to include the org.apache.http.legacy library

* chore: Update dependencies and add new fields

- Updated OpenAPI generator version to 7.9.0
- Added `org.bouncycastle:bcprov-jdk15on:1.70` as a new dependency in the `build.gradle` file
- Added `customerIpAddress` field to the following classes:
  - ChargeOrderResponsePaymentMethod
  - ChargeRequestPaymentMethod
  - ChargeResponsePaymentMethod
  - PaymentMethodBankTransfer
  - PaymentMethodCard
  - PaymentMethodCardRequest
  - PaymentMethodCash
  - PaymentMethodGeneralRequest

* chore: Update code and dependencies

- Updated version to 6.0.1-SNAPSHOT in build.gradle
- Updated artifactVersion to 6.0.1-SNAPSHOT in config.json
- Added new files ChargesOrderResponse.java and ChargesOrderResponseAllOfData.java
- Added new method ordersCreateCharges() in ChargesApi.java
- Updated httpUserAgent to "Conekta/v2 Android/6.0.1-SNAPSHOT" in config.json

* Refactor metadata initialization in Product, ProductDataResponse, and ProductOrderResponse classes

- Initialize the metadata field with an empty HashMap instead of an empty Map
- This change ensures that the metadata field is always initialized correctly

* Update publishing credentials and add deploy task to Makefile

- Update the publishing credentials in build.gradle to use environment variables if available, otherwise fallback to project properties.
- Add a new deploy task to the Makefile that runs `./gradlew publish`.
- These changes ensure that the publishing process is more secure and streamlined.

* Add dependency on "bundleReleaseAar" task for publishing to OSSRH repository

This commit adds a dependency on the "bundleReleaseAar" task for the "publishMavenJavaPublicationToOSSRHRepository" task in the build.gradle file. This ensures that the AAR bundle is generated before publishing to the OSSRH repository.

* Update artifact upload action to version 4

The code changes update the artifact upload action from version 2 to version 4 in the build workflow. This ensures that the correct version of the action is used for archiving artifacts.

* Refactor Makefile for better readability and consistency

- Removed unnecessary blank lines
- Fixed indentation issues
- Replaced tabs with spaces for consistent formatting

* feat: Add new API endpoint for canceling a payout order

This commit adds a new API endpoint `cancelPayoutOrderById` to the `PayoutOrdersApi` class. This endpoint allows users to cancel a payout order by providing the ID of the resource. The method is a PUT request and is located at `/payout_orders/{id}/cancel`.

The commit also includes updates to the documentation, specifically in the `PayoutOrdersApi.md` file, where the new endpoint is described along with its parameters and return type.

Additionally, there are some changes made to other files such as `Makefile`, `README.md`, `EncryptedTypeAdapter.java`, `ApiKeyCreateResponse.java`, `ApiKeyRequest.java`, `ApiKeyResponse.java`, `ApiKeyResponseOnDelete.java`, `ApiKeyUpdateRequest.java`,  and 	`BalanceCommonField.java`. These changes include code refactoring, imports optimization, and minor updates to class descriptions.

These changes aim to improve code readability and maintainability.

* Refactor TokenCard setters to encrypt sensitive data

- Encrypt the expiration month, year, and cardholder name using the `EncryptedTypeAdapter` class in the setters for `expMonth`, `expYear`, and `name` respectively. This ensures that sensitive information is stored securely.

* Change language parameter in createToken method to "en" instead of "es"

- Update TokensApiTest.java
- Change language parameter in createToken method from "es" to "en"
  • Loading branch information
fcarrero authored Nov 26, 2024
1 parent 71294f6 commit bf4175b
Show file tree
Hide file tree
Showing 496 changed files with 51,269 additions and 2,393 deletions.
12 changes: 0 additions & 12 deletions .codeclimate.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
- name: Run Mockoon CLI
uses: mockoon/cli-action@v2
with:
version: 'latest'
data-file: 'https://raw.githubusercontent.com/conekta/openapi/main/mocks/conekta_api.json'
port: 3000
- name: Build
run: |
make build
- name: test
run: |
make test
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: app
path: app/build/outputs/aar/conektasdk-debug.aar
48 changes: 41 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,41 @@
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
maven_push.gradle
# Built application files
*.apk
*.ap_

# Files for the Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# Intellij
*.iml

#Keystore files
*.jks
.idea/
local.properties
1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

14 changes: 0 additions & 14 deletions .idea/assetWizardSettings.xml

This file was deleted.

Binary file removed .idea/caches/build_file_checksums.ser
Binary file not shown.
29 changes: 0 additions & 29 deletions .idea/codeStyles/Project.xml

This file was deleted.

22 changes: 0 additions & 22 deletions .idea/compiler.xml

This file was deleted.

3 changes: 0 additions & 3 deletions .idea/copyright/profiles_settings.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/encodings.xml

This file was deleted.

27 changes: 0 additions & 27 deletions .idea/gradle.xml

This file was deleted.

33 changes: 0 additions & 33 deletions .idea/misc.xml

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/modules.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

25 changes: 25 additions & 0 deletions .openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
pom.xml
.gitignore
Loading

0 comments on commit bf4175b

Please sign in to comment.