Skip to content

Commit

Permalink
Update all services (#345)
Browse files Browse the repository at this point in the history
* [reformat][adyen-sdk-automation] automated change

* style(fmt): code formatted

* Add paymehts app api base url (#349)

* style(fmt): code formatted

---------

Co-authored-by: AdyenAutomationBot <Adyen Automation [email protected]>
Co-authored-by: jillingk <[email protected]>
  • Loading branch information
3 people authored Aug 15, 2024
1 parent ff89472 commit 2366dce
Show file tree
Hide file tree
Showing 136 changed files with 5,504 additions and 272 deletions.
19 changes: 19 additions & 0 deletions src/adyen/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"fmt"
"net/http"

"github.com/adyen/adyen-go-api-library/v11/src/paymentsapp"

"github.com/adyen/adyen-go-api-library/v11/src/dataprotection"

"github.com/adyen/adyen-go-api-library/v11/src/balancecontrol"
Expand Down Expand Up @@ -66,6 +68,7 @@ const (
MarketpayNotificationAPIVersion = "v6"
MarketpayHopAPIVersion = "v6"
PaymentAPIVersion = "v68"
PaymentsAppAPIVersion = "v1"
RecurringAPIVersion = "v68"
CheckoutAPIVersion = "v71"
BinLookupAPIVersion = "v54"
Expand All @@ -88,6 +91,7 @@ type APIClient struct {
// API Services
checkout *checkout.APIClient
payments *payments.APIClient
paymentsApp *paymentsapp.PaymentsAppApi
payout *payout.APIClient
recurring *recurring.GeneralApi
binLookup *binlookup.GeneralApi
Expand Down Expand Up @@ -191,6 +195,18 @@ func NewClient(cfg *common.Config) *APIClient {
}

// API Services
func (c *APIClient) PaymentsApp() *paymentsapp.PaymentsAppApi {
if c.paymentsApp == nil {
c.paymentsApp = &paymentsapp.PaymentsAppApi{
Client: c.client,
BasePath: func() string {
// enpdoint has same base url as management
return fmt.Sprintf("%s/%s", c.client.Cfg.PaymentsAppEndpoint, PaymentsAppAPIVersion)
},
}
}
return c.paymentsApp
}

func (c *APIClient) Checkout() *checkout.APIClient {
if c.checkout == nil {
Expand Down Expand Up @@ -408,6 +424,7 @@ func (c *APIClient) SetEnvironment(env common.Environment, liveEndpointURLPrefix
c.client.Cfg.BalancePlatformEndpoint = BalancePlatformEndpointLive
c.client.Cfg.TransfersEndpoint = TransfersEndpointLive
c.client.Cfg.ManagementEndpoint = ManagementEndpointLive
c.client.Cfg.PaymentsAppEndpoint = ManagementEndpointLive
c.client.Cfg.LegalEntityEndpoint = LegalEntityEntityLive
c.client.Cfg.PosTerminalManagementEndpoint = PosTerminalManagementEndpointLive
c.client.Cfg.DataProtectionEndpoint = DataProtectionEndpointLive
Expand All @@ -421,6 +438,7 @@ func (c *APIClient) SetEnvironment(env common.Environment, liveEndpointURLPrefix
c.client.Cfg.BalancePlatformEndpoint = BalancePlatformEndpointTest
c.client.Cfg.TransfersEndpoint = TransfersEndpointTest
c.client.Cfg.ManagementEndpoint = ManagementEndpointTest
c.client.Cfg.PaymentsAppEndpoint = ManagementEndpointTest
c.client.Cfg.LegalEntityEndpoint = LegalEntityEntityTest
c.client.Cfg.PosTerminalManagementEndpoint = PosTerminalManagementEndpointTest
c.client.Cfg.DataProtectionEndpoint = DataProtectionEndpointTest
Expand All @@ -429,6 +447,7 @@ func (c *APIClient) SetEnvironment(env common.Environment, liveEndpointURLPrefix
c.client.Cfg.CheckoutEndpoint += "/" + CheckoutAPIVersion
c.client.Cfg.BalancePlatformEndpoint += "/" + BalancePlatformAPIVersion
c.client.Cfg.ManagementEndpoint += "/" + ManagementAPIVersion
c.client.Cfg.PaymentsAppEndpoint += "/" + PaymentsAppAPIVersion
c.client.Cfg.LegalEntityEndpoint += "/" + LegalEntityAPIVersion
}

Expand Down
1 change: 1 addition & 0 deletions src/balancecontrol/api_general.go

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

2 changes: 2 additions & 0 deletions src/balanceplatform/api_account_holders.go

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

3 changes: 1 addition & 2 deletions src/balanceplatform/api_manage_card_pin.go

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

2 changes: 2 additions & 0 deletions src/balanceplatform/api_manage_sca_devices.go

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

2 changes: 1 addition & 1 deletion src/balanceplatform/api_payment_instruments.go

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

10 changes: 5 additions & 5 deletions src/balanceplatform/client.go

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

4 changes: 2 additions & 2 deletions src/checkout/api_classic_checkout_sdk.go

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

57 changes: 57 additions & 0 deletions src/checkout/api_donations.go

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

2 changes: 1 addition & 1 deletion src/checkout/api_modifications.go

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

4 changes: 4 additions & 0 deletions src/checkout/api_payments.go

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

2 changes: 2 additions & 0 deletions src/checkout/api_recurring.go

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

2 changes: 1 addition & 1 deletion src/checkout/api_utility.go

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

10 changes: 5 additions & 5 deletions src/checkout/client.go

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

37 changes: 37 additions & 0 deletions src/checkout/model_ach_details.go

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

Loading

0 comments on commit 2366dce

Please sign in to comment.