Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
Release 2.47.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
IngenicoEPayments committed Feb 14, 2024
1 parent cc8f000 commit bbb3e44
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 19 deletions.
2 changes: 1 addition & 1 deletion communicator/MetaDataProvider.go
Expand Up @@ -40,7 +40,7 @@ func getPlatformIdentifier() string {
}

const sdkIdentifier = "GoServerSDK/v" + sdkVersion
const sdkVersion = "2.46.0"
const sdkVersion = "2.47.0"
const serverMetaInfoHeader = "X-GCS-ServerMetaInfo"

// NewMetaDataProviderWithBuilder creates a MetaDataProvider with the given MetaDataProviderBuilder
Expand Down
Expand Up @@ -27,6 +27,7 @@ func getPaymentProductGroupExample() {
query.Locale = newString("en_US")
query.Amount = newInt64(1000)
query.IsRecurring = newBool(true)
query.IsInstallments = newBool(true)
query.AddHide("fields")

response, err := client.Merchant("merchantId").Productgroups().Get("cards", query, nil)
Expand Down
Expand Up @@ -27,6 +27,7 @@ func getPaymentProductGroupsExample() {
query.Locale = newString("en_US")
query.Amount = newInt64(1000)
query.IsRecurring = newBool(true)
query.IsInstallments = newBool(true)
query.AddHide("fields")

response, err := client.Merchant("merchantId").Productgroups().Find(query, nil)
Expand Down
1 change: 1 addition & 0 deletions examples/merchant/products/GetPaymentProductExample.go
Expand Up @@ -27,6 +27,7 @@ func getPaymentProductExample() {
query.Locale = newString("en_US")
query.Amount = newInt64(1000)
query.IsRecurring = newBool(true)
query.IsInstallments = newBool(true)
query.ForceBasicFlow = newBool(false)
query.AddHide("fields")

Expand Down
1 change: 1 addition & 0 deletions examples/merchant/products/GetPaymentProductsExample.go
Expand Up @@ -27,6 +27,7 @@ func getPaymentProductsExample() {
query.Locale = newString("en_US")
query.Amount = newInt64(1000)
query.IsRecurring = newBool(true)
query.IsInstallments = newBool(true)
query.AddHide("fields")

response, err := client.Merchant("merchantId").Products().Find(query, nil)
Expand Down
17 changes: 11 additions & 6 deletions merchant/productgroups/FindParams.go
Expand Up @@ -12,12 +12,13 @@ import (
// FindParams represents query parameters for Get payment product groups
// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/productgroups/find.html
type FindParams struct {
CountryCode *string
CurrencyCode *string
Locale *string
Amount *int64
IsRecurring *bool
Hide []string
CountryCode *string
CurrencyCode *string
Locale *string
Amount *int64
IsRecurring *bool
IsInstallments *bool
Hide []string
}

// AddHide adds an element to the Hide array.
Expand Down Expand Up @@ -50,6 +51,10 @@ func (params *FindParams) ToRequestParameters() communicator.RequestParams {
param, _ := communicator.NewRequestParam("isRecurring", strconv.FormatBool(*params.IsRecurring))
reqParams = append(reqParams, *param)
}
if params.IsInstallments != nil {
param, _ := communicator.NewRequestParam("isInstallments", strconv.FormatBool(*params.IsInstallments))
reqParams = append(reqParams, *param)
}
for _, hideElement := range params.Hide {
param, _ := communicator.NewRequestParam("hide", hideElement)
reqParams = append(reqParams, *param)
Expand Down
17 changes: 11 additions & 6 deletions merchant/productgroups/GetParams.go
Expand Up @@ -12,12 +12,13 @@ import (
// GetParams represents query parameters for Get payment product group
// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/productgroups/get.html
type GetParams struct {
CountryCode *string
CurrencyCode *string
Locale *string
Amount *int64
IsRecurring *bool
Hide []string
CountryCode *string
CurrencyCode *string
Locale *string
Amount *int64
IsRecurring *bool
IsInstallments *bool
Hide []string
}

// AddHide adds an element to the Hide array.
Expand Down Expand Up @@ -50,6 +51,10 @@ func (params *GetParams) ToRequestParameters() communicator.RequestParams {
param, _ := communicator.NewRequestParam("isRecurring", strconv.FormatBool(*params.IsRecurring))
reqParams = append(reqParams, *param)
}
if params.IsInstallments != nil {
param, _ := communicator.NewRequestParam("isInstallments", strconv.FormatBool(*params.IsInstallments))
reqParams = append(reqParams, *param)
}
for _, hideElement := range params.Hide {
param, _ := communicator.NewRequestParam("hide", hideElement)
reqParams = append(reqParams, *param)
Expand Down
17 changes: 11 additions & 6 deletions merchant/products/FindParams.go
Expand Up @@ -12,12 +12,13 @@ import (
// FindParams represents query parameters for Get payment products
// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/products/find.html
type FindParams struct {
CountryCode *string
CurrencyCode *string
Locale *string
Amount *int64
IsRecurring *bool
Hide []string
CountryCode *string
CurrencyCode *string
Locale *string
Amount *int64
IsRecurring *bool
IsInstallments *bool
Hide []string
}

// AddHide adds an element to the Hide array.
Expand Down Expand Up @@ -50,6 +51,10 @@ func (params *FindParams) ToRequestParameters() communicator.RequestParams {
param, _ := communicator.NewRequestParam("isRecurring", strconv.FormatBool(*params.IsRecurring))
reqParams = append(reqParams, *param)
}
if params.IsInstallments != nil {
param, _ := communicator.NewRequestParam("isInstallments", strconv.FormatBool(*params.IsInstallments))
reqParams = append(reqParams, *param)
}
for _, hideElement := range params.Hide {
param, _ := communicator.NewRequestParam("hide", hideElement)
reqParams = append(reqParams, *param)
Expand Down
5 changes: 5 additions & 0 deletions merchant/products/GetParams.go
Expand Up @@ -17,6 +17,7 @@ type GetParams struct {
Locale *string
Amount *int64
IsRecurring *bool
IsInstallments *bool
Hide []string
ForceBasicFlow *bool
}
Expand Down Expand Up @@ -51,6 +52,10 @@ func (params *GetParams) ToRequestParameters() communicator.RequestParams {
param, _ := communicator.NewRequestParam("isRecurring", strconv.FormatBool(*params.IsRecurring))
reqParams = append(reqParams, *param)
}
if params.IsInstallments != nil {
param, _ := communicator.NewRequestParam("isInstallments", strconv.FormatBool(*params.IsInstallments))
reqParams = append(reqParams, *param)
}
for _, hideElement := range params.Hide {
param, _ := communicator.NewRequestParam("hide", hideElement)
reqParams = append(reqParams, *param)
Expand Down

0 comments on commit bbb3e44

Please sign in to comment.