-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit represents an effort made by the Checkout team to build a brand new SDK for GO. It ships a new instantiation layer that makes easier a less confusing to set up the SDK. From the point of view of usability, the new version follows similar principles, although major interfaces are now split/duplicated to reference different data schemes which makes it fully compatible with `default` (NAS) and `Previous` (ABC) account structures. This separation is statically forced during instantiation. The SDK supports the following modules: * Tokens (default/previous) * Instruments (default/previous) * Customers (default/previous) * Disputes (default/previous) * Payments (default/previous) * Alternative Payments (default/previous) * Forex (default) * Sessions (default) * Accounts (default) * Events (previous) * Sources (previous) `README.md` was updated to match the new setup. Code of conduct and license were reviewed.
- Loading branch information
1 parent
6c534a9
commit 9382a5b
Showing
198 changed files
with
20,702 additions
and
4,850 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: build-master | ||
on: | ||
push: | ||
branches: | ||
- beta | ||
jobs: | ||
build: | ||
if: "!contains(github.event.commits[0].message, 'Release')" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 1 | ||
fail-fast: false | ||
matrix: | ||
go: | ||
- "1.14" | ||
- "1.16" | ||
- "1.18" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- id: setup-go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- id: build-and-test | ||
env: | ||
CHECKOUT_PREVIOUS_SECRET_KEY: ${{ secrets.IT_CHECKOUT_PREVIOUS_SECRET_KEY }} | ||
CHECKOUT_PREVIOUS_PUBLIC_KEY: ${{ secrets.IT_CHECKOUT_PREVIOUS_PUBLIC_KEY }} | ||
CHECKOUT_DEFAULT_SECRET_KEY: ${{ secrets.IT_CHECKOUT_DEFAULT_SECRET_KEY }} | ||
CHECKOUT_DEFAULT_PUBLIC_KEY: ${{ secrets.IT_CHECKOUT_DEFAULT_PUBLIC_KEY }} | ||
CHECKOUT_DEFAULT_OAUTH_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_CLIENT_ID }} | ||
CHECKOUT_DEFAULT_OAUTH_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_CLIENT_SECRET }} | ||
CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_ID }} | ||
CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_SECRET }} | ||
run: | ||
go build && go test -v ./... | ||
|
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,35 @@ | ||
name: build-pull-request | ||
on: | ||
pull_request: | ||
branches: | ||
- beta | ||
- "feature/**" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 1 | ||
fail-fast: false | ||
matrix: | ||
go: | ||
- "1.14" | ||
- "1.16" | ||
- "1.18" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- id: setup-go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- id: build-and-test | ||
env: | ||
CHECKOUT_PREVIOUS_SECRET_KEY: ${{ secrets.IT_CHECKOUT_PREVIOUS_SECRET_KEY }} | ||
CHECKOUT_PREVIOUS_PUBLIC_KEY: ${{ secrets.IT_CHECKOUT_PREVIOUS_PUBLIC_KEY }} | ||
CHECKOUT_DEFAULT_SECRET_KEY: ${{ secrets.IT_CHECKOUT_DEFAULT_SECRET_KEY }} | ||
CHECKOUT_DEFAULT_PUBLIC_KEY: ${{ secrets.IT_CHECKOUT_DEFAULT_PUBLIC_KEY }} | ||
CHECKOUT_DEFAULT_OAUTH_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_CLIENT_ID }} | ||
CHECKOUT_DEFAULT_OAUTH_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_CLIENT_SECRET }} | ||
CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_ID }} | ||
CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_SECRET }} | ||
run: | ||
go build && go test -v ./... |
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,48 @@ | ||
name: build-release | ||
on: | ||
push: | ||
branches: | ||
- beta | ||
paths: | ||
- client/version.go | ||
jobs: | ||
build: | ||
if: github.ref == 'refs/heads/beta' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: | ||
- "1.14" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- id: setup-go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- id: build-and-test | ||
env: | ||
CHECKOUT_PREVIOUS_SECRET_KEY: ${{ secrets.IT_CHECKOUT_PREVIOUS_SECRET_KEY }} | ||
CHECKOUT_PREVIOUS_PUBLIC_KEY: ${{ secrets.IT_CHECKOUT_PREVIOUS_PUBLIC_KEY }} | ||
CHECKOUT_DEFAULT_SECRET_KEY: ${{ secrets.IT_CHECKOUT_DEFAULT_SECRET_KEY }} | ||
CHECKOUT_DEFAULT_PUBLIC_KEY: ${{ secrets.IT_CHECKOUT_DEFAULT_PUBLIC_KEY }} | ||
CHECKOUT_DEFAULT_OAUTH_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_CLIENT_ID }} | ||
CHECKOUT_DEFAULT_OAUTH_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_CLIENT_SECRET }} | ||
CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_ID }} | ||
CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_SECRET }} | ||
run: | ||
go build && go test -v ./... | ||
- id: read-version | ||
run: echo "CURRENT_VERSION=v$( grep "VERSION" client/version.go | awk '{ print $4 }' | tr -d "\"")" >> $GITHUB_ENV | ||
- id: print-version | ||
run: echo "Releasing $CURRENT_VERSION" | ||
- id: create-release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ env.CURRENT_VERSION }} | ||
release_name: ${{ env.CURRENT_VERSION }} | ||
body: ${{ github.event.head_commit.message }} | ||
draft: false | ||
prerelease: false | ||
|
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 |
---|---|---|
@@ -1,5 +1,18 @@ | ||
.DS_Store | ||
.env | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
*.coverprofile | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
.idea | ||
*.DS_Store* |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.