From 27901628caee1eee23176bbd39baee74000a5075 Mon Sep 17 00:00:00 2001 From: Nicolas Lopes Date: Mon, 2 Sep 2024 16:07:32 -0300 Subject: [PATCH] feat: add reserved for second factor field on update phone numbers --- phonenumber/client.go | 5 +++-- phonenumber/client_test.go | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/phonenumber/client.go b/phonenumber/client.go index 8c9c6230..5167524e 100644 --- a/phonenumber/client.go +++ b/phonenumber/client.go @@ -54,8 +54,9 @@ func (c *Client) Get(ctx context.Context, id string) (*clerk.PhoneNumber, error) type UpdateParams struct { clerk.APIParams - Verified *bool `json:"verified,omitempty"` - Primary *bool `json:"primary,omitempty"` + Verified *bool `json:"verified,omitempty"` + Primary *bool `json:"primary,omitempty"` + ReservedForSecondFactor *bool `json:"reserved_for_second_factor,omitempty"` } // Update updates the phone number specified by id. diff --git a/phonenumber/client_test.go b/phonenumber/client_test.go index 7c4b3b01..b6804cf3 100644 --- a/phonenumber/client_test.go +++ b/phonenumber/client_test.go @@ -53,7 +53,8 @@ func TestPhoneNumberClientUpdate(t *testing.T) { } client := NewClient(config) phoneNumber, err := client.Update(context.Background(), "idn_123", &UpdateParams{ - Verified: clerk.Bool(true), + Verified: clerk.Bool(true), + ReservedForSecondFactor: clerk.Bool(true), }) require.NoError(t, err) require.Equal(t, id, phoneNumber.ID)