From 93d6d451accbad80ec7471bb588cec7164c2f9a1 Mon Sep 17 00:00:00 2001 From: Chagas Date: Wed, 28 Aug 2024 17:33:55 -0300 Subject: [PATCH 1/4] added external-reference in response --- CHANGELOG.md | 4 ++++ pkg/payment/response.go | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd7bd38..1700a36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## VERSION 1.0.6 + +Include `external_reference_id` in `DataResponse` in `PaymentMethodResponse` in `Payment`. + ## VERSION 1.0.5 Fix `is_same_bank_account_owner` type. Now it is `bool` instead of `string`. diff --git a/pkg/payment/response.go b/pkg/payment/response.go index 8da9cc8..4505973 100644 --- a/pkg/payment/response.go +++ b/pkg/payment/response.go @@ -296,7 +296,8 @@ type PaymentMethodResponse struct { // DataResponse represents data within PaymentMethodResponse. type DataResponse struct { - Rules RulesResponse `json:"rules"` + Rules RulesResponse `json:"rules"` + ExternalReferenceID string `json:"external_reference_id"` } // RulesResponse represents payment rules. From 2c8ea6a14c6832c9566e8f19db8cda30af76a94f Mon Sep 17 00:00:00 2001 From: Chagas Date: Thu, 29 Aug 2024 16:40:23 -0300 Subject: [PATCH 2/4] add more fields --- CHANGELOG.md | 2 ++ pkg/internal/httpclient/helper.go | 2 +- pkg/payment/response.go | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1700a36..842f7ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## VERSION 1.0.6 +Include `reference_id` in `DataResponse` in `PaymentMethodResponse` in `Payment`. Include `external_reference_id` in `DataResponse` in `PaymentMethodResponse` in `Payment`. +Include `external_resource_url` in `DataResponse` in `PaymentMethodResponse` in `Payment`. ## VERSION 1.0.5 diff --git a/pkg/internal/httpclient/helper.go b/pkg/internal/httpclient/helper.go index 41b4d6c..891f0d5 100644 --- a/pkg/internal/httpclient/helper.go +++ b/pkg/internal/httpclient/helper.go @@ -16,7 +16,7 @@ import ( ) const ( - currentSDKVersion string = "1.0.5" + currentSDKVersion string = "1.0.6" productID string = "CNITR48HSRV0CRPT3NI0" ) diff --git a/pkg/payment/response.go b/pkg/payment/response.go index 4505973..960d247 100644 --- a/pkg/payment/response.go +++ b/pkg/payment/response.go @@ -297,7 +297,9 @@ type PaymentMethodResponse struct { // DataResponse represents data within PaymentMethodResponse. type DataResponse struct { Rules RulesResponse `json:"rules"` + ReferenceID string `json:"reference_id"` ExternalReferenceID string `json:"external_reference_id"` + ExternalResourceUrl string `json:"external_resource_url"` } // RulesResponse represents payment rules. From ddfc67984818e947ef5ced8a5fe28694946781f5 Mon Sep 17 00:00:00 2001 From: Chagas Date: Mon, 2 Sep 2024 16:22:57 -0300 Subject: [PATCH 3/4] rollback version --- CHANGELOG.md | 6 ------ pkg/internal/httpclient/helper.go | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 842f7ec..bd7bd38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,3 @@ -## VERSION 1.0.6 - -Include `reference_id` in `DataResponse` in `PaymentMethodResponse` in `Payment`. -Include `external_reference_id` in `DataResponse` in `PaymentMethodResponse` in `Payment`. -Include `external_resource_url` in `DataResponse` in `PaymentMethodResponse` in `Payment`. - ## VERSION 1.0.5 Fix `is_same_bank_account_owner` type. Now it is `bool` instead of `string`. diff --git a/pkg/internal/httpclient/helper.go b/pkg/internal/httpclient/helper.go index 891f0d5..41b4d6c 100644 --- a/pkg/internal/httpclient/helper.go +++ b/pkg/internal/httpclient/helper.go @@ -16,7 +16,7 @@ import ( ) const ( - currentSDKVersion string = "1.0.6" + currentSDKVersion string = "1.0.5" productID string = "CNITR48HSRV0CRPT3NI0" ) From 5a3c7e802984e952a638a7fbd2c3754f6a779e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Mon, 2 Sep 2024 17:33:26 -0300 Subject: [PATCH 4/4] Update pkg/payment/response.go --- pkg/payment/response.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/payment/response.go b/pkg/payment/response.go index 960d247..ff2c558 100644 --- a/pkg/payment/response.go +++ b/pkg/payment/response.go @@ -297,9 +297,10 @@ type PaymentMethodResponse struct { // DataResponse represents data within PaymentMethodResponse. type DataResponse struct { Rules RulesResponse `json:"rules"` + ReferenceID string `json:"reference_id"` ExternalReferenceID string `json:"external_reference_id"` - ExternalResourceUrl string `json:"external_resource_url"` + ExternalResourceURL string `json:"external_resource_url"` } // RulesResponse represents payment rules.