From bbb3e440f73565cc5cefab93cce229d858a965ec Mon Sep 17 00:00:00 2001 From: Ingenico ePayments Date: Wed, 14 Feb 2024 09:22:59 +0100 Subject: [PATCH] Release 2.47.0. --- communicator/MetaDataProvider.go | 2 +- .../GetPaymentProductGroupExample.go | 1 + .../GetPaymentProductGroupsExample.go | 1 + .../products/GetPaymentProductExample.go | 1 + .../products/GetPaymentProductsExample.go | 1 + merchant/productgroups/FindParams.go | 17 +++++++++++------ merchant/productgroups/GetParams.go | 17 +++++++++++------ merchant/products/FindParams.go | 17 +++++++++++------ merchant/products/GetParams.go | 5 +++++ 9 files changed, 43 insertions(+), 19 deletions(-) diff --git a/communicator/MetaDataProvider.go b/communicator/MetaDataProvider.go index d68e8e3..baea814 100644 --- a/communicator/MetaDataProvider.go +++ b/communicator/MetaDataProvider.go @@ -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 diff --git a/examples/merchant/productgroups/GetPaymentProductGroupExample.go b/examples/merchant/productgroups/GetPaymentProductGroupExample.go index 5bdc237..999e4d5 100644 --- a/examples/merchant/productgroups/GetPaymentProductGroupExample.go +++ b/examples/merchant/productgroups/GetPaymentProductGroupExample.go @@ -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) diff --git a/examples/merchant/productgroups/GetPaymentProductGroupsExample.go b/examples/merchant/productgroups/GetPaymentProductGroupsExample.go index 69a5091..86a351e 100644 --- a/examples/merchant/productgroups/GetPaymentProductGroupsExample.go +++ b/examples/merchant/productgroups/GetPaymentProductGroupsExample.go @@ -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) diff --git a/examples/merchant/products/GetPaymentProductExample.go b/examples/merchant/products/GetPaymentProductExample.go index 858eebf..aa34ae7 100644 --- a/examples/merchant/products/GetPaymentProductExample.go +++ b/examples/merchant/products/GetPaymentProductExample.go @@ -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") diff --git a/examples/merchant/products/GetPaymentProductsExample.go b/examples/merchant/products/GetPaymentProductsExample.go index 797cfb2..07720cd 100644 --- a/examples/merchant/products/GetPaymentProductsExample.go +++ b/examples/merchant/products/GetPaymentProductsExample.go @@ -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) diff --git a/merchant/productgroups/FindParams.go b/merchant/productgroups/FindParams.go index 7ea68c2..a773850 100644 --- a/merchant/productgroups/FindParams.go +++ b/merchant/productgroups/FindParams.go @@ -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. @@ -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) diff --git a/merchant/productgroups/GetParams.go b/merchant/productgroups/GetParams.go index 2261f4e..15b863c 100644 --- a/merchant/productgroups/GetParams.go +++ b/merchant/productgroups/GetParams.go @@ -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. @@ -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) diff --git a/merchant/products/FindParams.go b/merchant/products/FindParams.go index 84d4a1e..2df34df 100644 --- a/merchant/products/FindParams.go +++ b/merchant/products/FindParams.go @@ -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. @@ -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) diff --git a/merchant/products/GetParams.go b/merchant/products/GetParams.go index ee591b9..630f800 100644 --- a/merchant/products/GetParams.go +++ b/merchant/products/GetParams.go @@ -17,6 +17,7 @@ type GetParams struct { Locale *string Amount *int64 IsRecurring *bool + IsInstallments *bool Hide []string ForceBasicFlow *bool } @@ -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)