From 26db609652f72d29aa4a163dc48e18de3ec47c95 Mon Sep 17 00:00:00 2001 From: VickieAranha Date: Thu, 19 Dec 2024 12:29:07 -0300 Subject: [PATCH] [Fix] type card_id and user to int64 (#79) * fix type card_id and user to int64 * ajuste --- .pre-commit-config.yaml | 6 ++++-- pkg/customer/response.go | 2 +- pkg/merchantorder/request.go | 2 +- pkg/payment/response.go | 3 +-- pkg/preapproval/response.go | 6 +++--- pkg/preapprovalplan/response.go | 2 +- pkg/preference/response.go | 2 +- pkg/preference/search_response.go | 2 +- 8 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5e605511..61fda9f5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: # Websec hook is MANDATORY, DO NOT comment it. - repo: https://github.com/melisource/fury_websec-git-hooks - rev: v1.1.0 + rev: v2.0.0 hooks: - id: pre_commit_hook stages: [commit] @@ -10,8 +10,10 @@ repos: # Datasec hook is MANDATORY, DO NOT comment it. - repo: https://github.com/melisource/fury_datasec-git-hooks - rev: 1.0.3 + rev: 1.2.2 hooks: - id: pre_commit_hook stages: [commit] verbose: true + - id: post_commit_hook + stages: [ post-commit ] diff --git a/pkg/customer/response.go b/pkg/customer/response.go index 6575551b..d0792f11 100644 --- a/pkg/customer/response.go +++ b/pkg/customer/response.go @@ -21,7 +21,7 @@ type Response struct { DefaultCard string `json:"default_card"` DefaultAddress string `json:"default_address"` Status string `json:"status"` - UserID int `json:"user_id"` + UserID int64 `json:"user_id"` MerchantID int `json:"merchant_id"` ClientID int `json:"client_id"` LiveMode bool `json:"live_mode"` diff --git a/pkg/merchantorder/request.go b/pkg/merchantorder/request.go index 87d6e064..f0f39103 100644 --- a/pkg/merchantorder/request.go +++ b/pkg/merchantorder/request.go @@ -37,5 +37,5 @@ type ItemRequest struct { // CollectorRequest represents seller information. type CollectorRequest struct { - ID int `json:"id,omitempty"` + ID int64 `json:"id,omitempty"` } diff --git a/pkg/payment/response.go b/pkg/payment/response.go index ff2c5585..7a574c67 100644 --- a/pkg/payment/response.go +++ b/pkg/payment/response.go @@ -62,7 +62,7 @@ type Response struct { Installments int `json:"installments"` ID int `json:"id"` SponsorID int `json:"sponsor_id"` - CollectorID int `json:"collector_id"` + CollectorID int64 `json:"collector_id"` LiveMode bool `json:"live_mode"` Captured bool `json:"captured"` BinaryMode bool `json:"binary_mode"` @@ -297,7 +297,6 @@ 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"` diff --git a/pkg/preapproval/response.go b/pkg/preapproval/response.go index 22c80b8a..0a51e59e 100644 --- a/pkg/preapproval/response.go +++ b/pkg/preapproval/response.go @@ -23,10 +23,10 @@ type Response struct { PreapprovalPlanID string `json:"preapproval_plan_id"` PayerFirstName string `json:"payer_first_name"` PayerLastName string `json:"payer_last_name"` - CardID int `json:"card_id"` + CardID string `json:"card_id"` Version int `json:"version"` - PayerID int `json:"payer_id"` - CollectorID int `json:"collector_id"` + PayerID int64 `json:"payer_id"` + CollectorID int64 `json:"collector_id"` ApplicationID int `json:"application_id"` } diff --git a/pkg/preapprovalplan/response.go b/pkg/preapprovalplan/response.go index 338cd086..0c08994f 100644 --- a/pkg/preapprovalplan/response.go +++ b/pkg/preapprovalplan/response.go @@ -15,7 +15,7 @@ type Response struct { Reason string `json:"reason"` Status string `json:"status"` InitPoint string `json:"init_point"` - CollectorID int `json:"collector_id"` + CollectorID int64 `json:"collector_id"` ApplicationID int `json:"application_id"` } diff --git a/pkg/preference/response.go b/pkg/preference/response.go index d0a5c030..d7d135af 100644 --- a/pkg/preference/response.go +++ b/pkg/preference/response.go @@ -33,7 +33,7 @@ type Response struct { SandboxInitPoint string `json:"sandbox_init_point"` SiteID string `json:"site_id"` MarketplaceFee float64 `json:"marketplace_fee"` - CollectorID int `json:"collector_id"` + CollectorID int64 `json:"collector_id"` Expires bool `json:"expires"` BinaryMode bool `json:"binary_mode"` ProcessingModes []string `json:"processing_modes"` diff --git a/pkg/preference/search_response.go b/pkg/preference/search_response.go index e82367cc..dca80c00 100644 --- a/pkg/preference/search_response.go +++ b/pkg/preference/search_response.go @@ -21,7 +21,7 @@ type SearchResponse struct { ProductID string `json:"product_id"` Purpose string `json:"purpose"` SiteID string `json:"site_id"` - CollectorID int `json:"collector_id"` + CollectorID int64 `json:"collector_id"` SponsorID int `json:"sponsor_id"` LiveMode bool `json:"live_mode"` Expires bool `json:"expires"`