Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v7.3.0 #240

Merged
merged 3 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4

- uses: actions/setup-go@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
name: Generate Models
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-go@v4
with:
go-version: 1.18
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ openapi-generator-cli:=java -jar $(openapi-generator-jar)
goimports:=$(shell go env GOPATH)/bin/goimports

generator:=go
services:=balancecontrol balanceplatform acswebhook configurationwebhook reportwebhook transferwebhook binlookup checkout legalentity management managementwebhook payments payout posterminalmanagement recurring storedvalue transfers
services:=balancecontrol balanceplatform acswebhook configurationwebhook reportwebhook transferwebhook binlookup checkout legalentity management managementwebhook payments payout posterminalmanagement recurring storedvalue transfers dataprotection
output:=src
templates:=templates/custom

Expand Down Expand Up @@ -56,6 +56,8 @@ management: hasRestServiceError=true
managementwebhook: spec=ManagementNotificationService-v1
posterminalmanagement: spec=TfmAPIService-v1
posterminalmanagement: serviceName=PosTerminalManagementApi
dataprotection: spec=DataProtectionService-v1
dataprotection: serviceName=DataProtection

# Generate a full client (models and service classes)
$(services): schema $(openapi-generator-jar) $(goimports)
Expand Down
31 changes: 16 additions & 15 deletions Readme.md

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions src/adyen/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package adyen

import (
"fmt"
"github.com/adyen/adyen-go-api-library/v7/src/dataprotection"
"net/http"

"github.com/adyen/adyen-go-api-library/v7/src/balancecontrol"
Expand Down Expand Up @@ -53,6 +54,8 @@ const (
LegalEntityEntityLive = "https://kyc-live.adyen.com/lem"
PosTerminalManagementEndpointTest = "https://postfmapi-test.adyen.com/postfmapi/terminal"
PosTerminalManagementEndpointLive = "https://postfmapi-live.adyen.com/postfmapi/terminal"
DataProtectionEndpointTest = "https://ca-test.adyen.com/ca/services/DataProtectionService"
DataProtectionEndpointLive = "https://ca-live.adyen.com/ca/services/DataProtectionService"
)

// also update LibVersion in src/common/configuration.go when a version is updated and a major lib version is released
Expand All @@ -74,6 +77,7 @@ const (
ManagementAPIVersion = "v1"
LegalEntityAPIVersion = "v3"
PosTerminalManagementAPIVersion = "v1"
DataProtectionAPIVersion = "v1"
)

// APIClient Manages access to Adyen API services.
Expand Down Expand Up @@ -102,6 +106,7 @@ type APIClient struct {
transfers *transfers.APIClient
management *management.APIClient
legalEntity *legalentity.APIClient
dataProtection *dataprotection.GeneralApi
}

// NewClient creates a new API client. Requires Config object.
Expand Down Expand Up @@ -368,6 +373,18 @@ func (c *APIClient) PlatformsNotificationConfiguration() *platformsnotificationc
return c.platformsNotificationConfiguration
}

func (c *APIClient) DataProtection() *dataprotection.GeneralApi {
if c.dataProtection == nil {
c.dataProtection = &dataprotection.GeneralApi{
Client: c.client,
BasePath: func() string {
return fmt.Sprintf("%s/%s", c.client.Cfg.DataProtectionEndpoint, DataProtectionAPIVersion)
},
}
}
return c.dataProtection
}

/*
SetEnvironment This defines the payment environment for live or test

Expand All @@ -392,6 +409,7 @@ func (c *APIClient) SetEnvironment(env common.Environment, liveEndpointURLPrefix
c.client.Cfg.ManagementEndpoint = ManagementEndpointLive
c.client.Cfg.LegalEntityEndpoint = LegalEntityEntityLive
c.client.Cfg.PosTerminalManagementEndpoint = PosTerminalManagementEndpointLive
c.client.Cfg.DataProtectionEndpoint = DataProtectionEndpointLive
} else {
c.client.Cfg.Environment = env
c.client.Cfg.Endpoint = EndpointTest
Expand All @@ -404,6 +422,7 @@ func (c *APIClient) SetEnvironment(env common.Environment, liveEndpointURLPrefix
c.client.Cfg.ManagementEndpoint = ManagementEndpointTest
c.client.Cfg.LegalEntityEndpoint = LegalEntityEntityTest
c.client.Cfg.PosTerminalManagementEndpoint = PosTerminalManagementEndpointTest
c.client.Cfg.DataProtectionEndpoint = DataProtectionEndpointTest
}

c.client.Cfg.CheckoutEndpoint += "/" + CheckoutAPIVersion
Expand Down
3 changes: 2 additions & 1 deletion src/common/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const (

const (
LibName = "adyen-go-api-library"
LibVersion = "7.2.0"
LibVersion = "7.3.0"
)

// Config stores the configuration of the API client
Expand All @@ -71,6 +71,7 @@ type Config struct {
LegalEntityEndpoint string `json:"legalEntityEndpoint,omitempty"`
TransfersEndpoint string `json:"transfersEndpoint,omitempty"`
PosTerminalManagementEndpoint string `json:"posTerminalManagementEndpoint,omitempty"`
DataProtectionEndpoint string `json:"dataProtectionEndpoint,omitempty"`

//Checkout Specific
CheckoutEndpoint string `json:"checkoutEndpoint,omitempty"`
Expand Down
4 changes: 4 additions & 0 deletions src/dataprotection/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# OpenAPI Generator Ignore

# Single class service does not need an "index" to group multiple tags
client.go
67 changes: 67 additions & 0 deletions src/dataprotection/api_general.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading