-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Auto generate codes (Models, Enums and Request Builders) (#92) * Auto generate codes * Add documentation to model classes + rename points to points_citi * Add Schedule namespace * Remove base Model from PlatformFee (#94) * Remove base Model from PlatformFee * Update test fixtures to include platform_fee and percentage * Change float to Double * Generate payload methods (#95) * Regenerate codes + fix some tests * Fix wrong fixtures path when class name contains more than 1 word e.g. ChargeSchedule * Fix tests * Fix inconsistencies in parameter's order from v3 * Update format * Fix wrong property name * Remove extra spaces * Register Webhook type + update tests * Rename date & time field names to make them consistence with API * Add migration guide * Remove test apk * Add Github Actions for publishing package
- Loading branch information
Showing
75 changed files
with
3,902 additions
and
2,076 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created | ||
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path | ||
|
||
name: Maven Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | ||
settings-path: ${{ github.workspace }} # location for the settings.xml file | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew test | ||
|
||
- name: Publish package | ||
run: ./gradlew uploadArchives | ||
env: | ||
PGP_SIGNING_KEY: ${{ secrets.PGP_SIGNING_KEY }} | ||
PGP_SIGNING_PASSWORD: ${{ secrets.PGP_SIGNING_PASSWORD }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Migration Guide | ||
|
||
### Migrating from v3 to v4 | ||
|
||
Most of the changes are related to the consistency of field, method and class names. | ||
|
||
The benefit of having these consistencies allow the users of library to have predictable and consistent usage. | ||
|
||
It also allows us to update our library quickly by using code generation in future releases. | ||
|
||
The following contain all changes from v3 to v4. | ||
|
||
#### Schedules | ||
* Rename `ChargeScheduling` and `TransferScheduling` to `ChargeSchedule` and `TransferSchedule` respectively. | ||
|
||
#### Cards | ||
* Change order of params | ||
- `Card.UpdateRequestBuilder(cardId, customerId)` contains wrong order of params (it should be `Card.UpdateRequestBuilder(customerId, cardId)`. | ||
|
||
- `Document.GetRequestBuilder(documentId, disputeId)` to `Document.GetRequestBuilder(disputeId, documentId)` | ||
|
||
#### Date & Time | ||
- `Dispute.closedDate` -> `closedAt` (`closed_at` in API) | ||
- `Receipt.issuedDate` -> `issuedOn` (`issued_on` in API) | ||
- `Occurrence.scheduleDate` -> `scheduleOn` (`scheduled_on` in API) | ||
- `Occurrence.retryDate` -> `retryOn` (`retry_on` in API) | ||
- `Schedule.startDate` -> `startOn` (`start_on` in API) | ||
- `Schedule.endDate` -> `endOn` (`end_on` in API) | ||
- `Schedule.nextOccurrencesDates` -> `nextOccurrencesOn` (`next_occurrences_on` in API) | ||
|
||
### Migrating to v3 | ||
|
||
The alteration made in the v3.0.0 of `omise-java` are breaking changes and would require code changes | ||
from your side if you have already been using this library from previous versions. We have put | ||
together a guide to make this process easier by pointing the changes to you. You can find the complete [version 3 migration guide here][1]. | ||
|
||
[1]: https://www.omise.co/omise-java-v3-migration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
[![Maven Central][9]][10] [![Github Actions][0]][1] [![Discourse Forum][14]][15] | ||
|
||
`Omise-java` provides a set of Java bindings to the [Omise REST API][5]. Please contact | ||
`omise-java` provides a set of Java bindings to the [Omise REST API][5]. Please contact | ||
[[email protected]][7] if you have any questions regarding this | ||
library and the functionality it provides. | ||
|
||
|
@@ -21,7 +21,7 @@ Adds to your `build.gradle` file. | |
|
||
```gradle | ||
dependencies { | ||
compile 'co.omise:omise-java:3.1.+' | ||
compile 'co.omise:omise-java:4.0.+' | ||
} | ||
``` | ||
|
||
|
@@ -46,14 +46,13 @@ $ gradle shadowJar | |
BUILD SUCCESSFUL | ||
|
||
$ ls builds/libs | ||
omise-java-3.1.1-all.jar | ||
omise-java-4.0.0-all.jar | ||
``` | ||
|
||
### Migrate to version 3 | ||
### Migration Guide | ||
|
||
The alteration made in the v3.0.0 of `omise-java` are breaking changes and would require code changes | ||
from your side if you have already been using this library from previous versions. We have put | ||
together a guide to make this process easier by pointing the changes to you. You can find the complete [version 3 migration guide here][16]. | ||
* [v4](MIGRATING.md#migrating-from-v3-to-v4) | ||
* [v3](MIGRATING.md#migrating-to-v3) | ||
|
||
## USAGE | ||
|
||
|
@@ -112,5 +111,4 @@ System.out.println("created charge: " + charge.getId()); | |
[12]: https://dashboard.omise.co/test/api-keys | ||
[13]: https://github.com/johnrengelman/shadow | ||
[14]: https://img.shields.io/badge/discourse-forum-1a53f0.svg?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bX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oFmYsOS5HZIaxVwKYsLSbJJn2kfU%2BlNdms5WMLqQRklX0FX26eFRnKYwzX0XRsgR0uUrWxplM7oqPIq8r8cZrdLNLqaABayxZMTTx2HVfglbP4xkcvqZEMNfmglevRi1ny5mGfJfTuQiBEq%2FMBvG0NqDh2TY47sbtJAuO%2Fe9%2Fn3STRFosm2WIxsFSFrFUfwHb11JNBNcaZSp8yb%2FEhHW3suWRNZRzDGvxb0oifk5lmnX2V2J2dEJkX1Q0baZ1MvYXPXHvhAga7x9PTEyj8a%2BF%2BXbxiTn78bSQAAAABJRU5ErkJggg%3D%3D | ||
[15]: https://forum.omise.co | ||
[16]: https://www.omise.co/omise-java-v3-migration | ||
[15]: https://forum.omise.co |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.