From 5f5b79ecd87de1cc4097bde7c05767dbe2ff35c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ot=C3=A1vio=20Pontes?= <39846965+OtavioPontes@users.noreply.github.com> Date: Tue, 14 Jan 2025 02:14:33 -0300 Subject: [PATCH 1/2] fix: first_invoice_offset type --- pkg/preapproval/response.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/preapproval/response.go b/pkg/preapproval/response.go index d5a0e02..d171793 100644 --- a/pkg/preapproval/response.go +++ b/pkg/preapproval/response.go @@ -18,7 +18,7 @@ type Response struct { InitPoint string `json:"init_point"` SandboxInitPoint string `json:"sandbox_init_point"` PaymentMethodID string `json:"payment_method_id"` - FirstInvoiceOffset string `json:"first_invoice_offset"` + FirstInvoiceOffset int `json:"first_invoice_offset"` BackURL string `json:"back_url"` PreapprovalPlanID string `json:"preapproval_plan_id"` PayerFirstName string `json:"payer_first_name"` From 283f94827f6942882be425a41eba3a6416a1d1b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ot=C3=A1vio=20Pontes?= <39846965+OtavioPontes@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:29:07 -0300 Subject: [PATCH 2/2] fix: first_invoice_offset type in test --- pkg/preapproval/client_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/preapproval/client_test.go b/pkg/preapproval/client_test.go index d77639e..2649f44 100644 --- a/pkg/preapproval/client_test.go +++ b/pkg/preapproval/client_test.go @@ -105,7 +105,7 @@ func TestCreate(t *testing.T) { }, NextPaymentDate: parseDate("2024-03-06T18:10:01.000-04:00"), PaymentMethodID: "", - FirstInvoiceOffset: "", + FirstInvoiceOffset: 0, }, wantErr: "", }, @@ -210,7 +210,7 @@ func TestGet(t *testing.T) { }, NextPaymentDate: parseDate("2024-03-06T18:10:01.000-04:00"), PaymentMethodID: "", - FirstInvoiceOffset: "", + FirstInvoiceOffset: 0, }, wantErr: "", }, @@ -428,7 +428,7 @@ func TestUpdate(t *testing.T) { }, NextPaymentDate: parseDate("2024-03-06T18:10:01.000-04:00"), PaymentMethodID: "", - FirstInvoiceOffset: "", + FirstInvoiceOffset: 0, }, wantErr: "", },