diff --git a/client.go b/client.go index 8f6cfc4..83d02e5 100644 --- a/client.go +++ b/client.go @@ -16,6 +16,7 @@ type Client interface { AccountSid() string AuthToken() string RootUrl() string + UpdateRoot(string) get(url.Values, string) ([]byte, error) post(url.Values, string) ([]byte, error) delete(string) error @@ -172,3 +173,7 @@ func (client *TwilioClient) buildUri(parts ...string) string { } return strings.Join(newParts, "/") } + +func (client *TwilioClient) UpdateRoot(root string) { + client.rootUrl = root + "/" + VERSION + "/Accounts/" + client.accountSid +} diff --git a/mock_client.go b/mock_client.go index 39fccce..2179839 100644 --- a/mock_client.go +++ b/mock_client.go @@ -36,3 +36,6 @@ func (client *MockClient) delete(uri string) error { args := client.Mock.Called(nil, uri) return args.Error(1) } + +func (client *MockClient) UpdateRoot(_ string) { +}