diff --git a/CHANGES.md b/CHANGES.md index fa8f681d6..b93d695c2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,26 @@ twilio-go changelog ==================== +[2024-06-18] Version 1.22.0 +--------------------------- +**Events** +- Add `status` and `documentation_url` to Event Types + +**Lookups** +- Removed unused `fraud` lookups in V1 only to facilitate rest proxy migration + +**Numbers** +- Add date_created field to the Get Port In Request API +- Rename the `status_last_time_updated_timestamp` field to `last_updated` in the Get Port In Phone Number API **(breaking change)** +- Add Rejection reason and rejection reason code to the Get Port In Phone Number API +- Remove the carrier information from the Portability API + +**Proxy** +- Change property `type` from enum to ienum + +**Trusthub** +- Add skipMessagingUseCase field in compliance_tollfree_inquiry. + + [2024-06-06] Version 1.21.1 --------------------------- **Api** diff --git a/rest/accounts/v1/auth_tokens_promote.go b/rest/accounts/v1/auth_tokens_promote.go index 1f1f50146..50c4f8a25 100644 --- a/rest/accounts/v1/auth_tokens_promote.go +++ b/rest/accounts/v1/auth_tokens_promote.go @@ -24,7 +24,9 @@ func (c *ApiService) UpdateAuthTokenPromotion() (*AccountsV1AuthTokenPromotion, path := "/v1/AuthTokens/Promote" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/accounts/v1/auth_tokens_secondary.go b/rest/accounts/v1/auth_tokens_secondary.go index a187a99d1..a99a69193 100644 --- a/rest/accounts/v1/auth_tokens_secondary.go +++ b/rest/accounts/v1/auth_tokens_secondary.go @@ -24,7 +24,9 @@ func (c *ApiService) CreateSecondaryAuthToken() (*AccountsV1SecondaryAuthToken, path := "/v1/AuthTokens/Secondary" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -46,7 +48,9 @@ func (c *ApiService) DeleteSecondaryAuthToken() error { path := "/v1/AuthTokens/Secondary" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/accounts/v1/credentials_aws.go b/rest/accounts/v1/credentials_aws.go index 3ec1b2945..e52646c03 100644 --- a/rest/accounts/v1/credentials_aws.go +++ b/rest/accounts/v1/credentials_aws.go @@ -51,7 +51,9 @@ func (c *ApiService) CreateCredentialAws(params *CreateCredentialAwsParams) (*Ac path := "/v1/Credentials/AWS" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Credentials != nil { data.Set("Credentials", *params.Credentials) @@ -84,7 +86,9 @@ func (c *ApiService) DeleteCredentialAws(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -102,7 +106,9 @@ func (c *ApiService) FetchCredentialAws(Sid string) (*AccountsV1CredentialAws, e path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -141,7 +147,9 @@ func (c *ApiService) PageCredentialAws(params *ListCredentialAwsParams, pageToke path := "/v1/Credentials/AWS" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -272,7 +280,9 @@ func (c *ApiService) UpdateCredentialAws(Sid string, params *UpdateCredentialAws path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/accounts/v1/credentials_public_keys.go b/rest/accounts/v1/credentials_public_keys.go index 8e78888e7..def5334d4 100644 --- a/rest/accounts/v1/credentials_public_keys.go +++ b/rest/accounts/v1/credentials_public_keys.go @@ -51,7 +51,9 @@ func (c *ApiService) CreateCredentialPublicKey(params *CreateCredentialPublicKey path := "/v1/Credentials/PublicKeys" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PublicKey != nil { data.Set("PublicKey", *params.PublicKey) @@ -84,7 +86,9 @@ func (c *ApiService) DeleteCredentialPublicKey(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -102,7 +106,9 @@ func (c *ApiService) FetchCredentialPublicKey(Sid string) (*AccountsV1Credential path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -141,7 +147,9 @@ func (c *ApiService) PageCredentialPublicKey(params *ListCredentialPublicKeyPara path := "/v1/Credentials/PublicKeys" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -272,7 +280,9 @@ func (c *ApiService) UpdateCredentialPublicKey(Sid string, params *UpdateCredent path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/accounts/v1/safe_list_numbers.go b/rest/accounts/v1/safe_list_numbers.go index a15dd6c53..475190682 100644 --- a/rest/accounts/v1/safe_list_numbers.go +++ b/rest/accounts/v1/safe_list_numbers.go @@ -35,7 +35,9 @@ func (c *ApiService) CreateSafelist(params *CreateSafelistParams) (*AccountsV1Sa path := "/v1/SafeList/Numbers" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PhoneNumber != nil { data.Set("PhoneNumber", *params.PhoneNumber) @@ -72,7 +74,9 @@ func (c *ApiService) DeleteSafelist(params *DeleteSafelistParams) error { path := "/v1/SafeList/Numbers" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PhoneNumber != nil { data.Set("PhoneNumber", *params.PhoneNumber) @@ -104,7 +108,9 @@ func (c *ApiService) FetchSafelist(params *FetchSafelistParams) (*AccountsV1Safe path := "/v1/SafeList/Numbers" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PhoneNumber != nil { data.Set("PhoneNumber", *params.PhoneNumber) diff --git a/rest/api/v2010/accounts.go b/rest/api/v2010/accounts.go index 9d72732d9..51b1d5524 100644 --- a/rest/api/v2010/accounts.go +++ b/rest/api/v2010/accounts.go @@ -39,7 +39,9 @@ func (c *ApiService) CreateAccount(params *CreateAccountParams) (*ApiV2010Accoun path := "/2010-04-01/Accounts.json" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -66,7 +68,9 @@ func (c *ApiService) FetchAccount(Sid string) (*ApiV2010Account, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -117,7 +121,9 @@ func (c *ApiService) PageAccount(params *ListAccountParams, pageToken, pageNumbe path := "/2010-04-01/Accounts.json" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -260,7 +266,9 @@ func (c *ApiService) UpdateAccount(Sid string, params *UpdateAccountParams) (*Ap path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/api/v2010/accounts_addresses.go b/rest/api/v2010/accounts_addresses.go index 053910881..6e0b2a265 100644 --- a/rest/api/v2010/accounts_addresses.go +++ b/rest/api/v2010/accounts_addresses.go @@ -104,7 +104,9 @@ func (c *ApiService) CreateAddress(params *CreateAddressParams) (*ApiV2010Addres } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.CustomerName != nil { data.Set("CustomerName", *params.CustomerName) @@ -174,7 +176,9 @@ func (c *ApiService) DeleteAddress(Sid string, params *DeleteAddressParams) erro path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -208,7 +212,9 @@ func (c *ApiService) FetchAddress(Sid string, params *FetchAddressParams) (*ApiV path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -277,7 +283,9 @@ func (c *ApiService) PageAddress(params *ListAddressParams, pageToken, pageNumbe } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.CustomerName != nil { data.Set("CustomerName", *params.CustomerName) @@ -476,7 +484,9 @@ func (c *ApiService) UpdateAddress(Sid string, params *UpdateAddressParams) (*Ap path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/api/v2010/accounts_addresses_dependent_phone_numbers.go b/rest/api/v2010/accounts_addresses_dependent_phone_numbers.go index f1cf03f13..a0ef67222 100644 --- a/rest/api/v2010/accounts_addresses_dependent_phone_numbers.go +++ b/rest/api/v2010/accounts_addresses_dependent_phone_numbers.go @@ -58,7 +58,9 @@ func (c *ApiService) PageDependentPhoneNumber(AddressSid string, params *ListDep path = strings.Replace(path, "{"+"AddressSid"+"}", AddressSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/api/v2010/accounts_applications.go b/rest/api/v2010/accounts_applications.go index 1a2d7f678..31746d94c 100644 --- a/rest/api/v2010/accounts_applications.go +++ b/rest/api/v2010/accounts_applications.go @@ -140,7 +140,9 @@ func (c *ApiService) CreateApplication(params *CreateApplicationParams) (*ApiV20 } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ApiVersion != nil { data.Set("ApiVersion", *params.ApiVersion) @@ -228,7 +230,9 @@ func (c *ApiService) DeleteApplication(Sid string, params *DeleteApplicationPara path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -262,7 +266,9 @@ func (c *ApiService) FetchApplication(Sid string, params *FetchApplicationParams path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -319,7 +325,9 @@ func (c *ApiService) PageApplication(params *ListApplicationParams, pageToken, p } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -554,7 +562,9 @@ func (c *ApiService) UpdateApplication(Sid string, params *UpdateApplicationPara path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/api/v2010/accounts_authorized_connect_apps.go b/rest/api/v2010/accounts_authorized_connect_apps.go index c6c0b4e0b..49468f523 100644 --- a/rest/api/v2010/accounts_authorized_connect_apps.go +++ b/rest/api/v2010/accounts_authorized_connect_apps.go @@ -45,7 +45,9 @@ func (c *ApiService) FetchAuthorizedConnectApp(ConnectAppSid string, params *Fet path = strings.Replace(path, "{"+"ConnectAppSid"+"}", ConnectAppSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -96,7 +98,9 @@ func (c *ApiService) PageAuthorizedConnectApp(params *ListAuthorizedConnectAppPa } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/api/v2010/accounts_available_phone_numbers.go b/rest/api/v2010/accounts_available_phone_numbers.go index 5cc813f87..70eb92c21 100644 --- a/rest/api/v2010/accounts_available_phone_numbers.go +++ b/rest/api/v2010/accounts_available_phone_numbers.go @@ -45,7 +45,9 @@ func (c *ApiService) FetchAvailablePhoneNumberCountry(CountryCode string, params path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -96,7 +98,9 @@ func (c *ApiService) PageAvailablePhoneNumberCountry(params *ListAvailablePhoneN } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/api/v2010/accounts_available_phone_numbers_local.go b/rest/api/v2010/accounts_available_phone_numbers_local.go index 9d7ffaecf..251b987dc 100644 --- a/rest/api/v2010/accounts_available_phone_numbers_local.go +++ b/rest/api/v2010/accounts_available_phone_numbers_local.go @@ -166,7 +166,9 @@ func (c *ApiService) PageAvailablePhoneNumberLocal(CountryCode string, params *L path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AreaCode != nil { data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) diff --git a/rest/api/v2010/accounts_available_phone_numbers_machine_to_machine.go b/rest/api/v2010/accounts_available_phone_numbers_machine_to_machine.go index 30f22af46..fd312a49c 100644 --- a/rest/api/v2010/accounts_available_phone_numbers_machine_to_machine.go +++ b/rest/api/v2010/accounts_available_phone_numbers_machine_to_machine.go @@ -166,7 +166,9 @@ func (c *ApiService) PageAvailablePhoneNumberMachineToMachine(CountryCode string path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AreaCode != nil { data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) diff --git a/rest/api/v2010/accounts_available_phone_numbers_mobile.go b/rest/api/v2010/accounts_available_phone_numbers_mobile.go index df649b4d0..63a4f69cb 100644 --- a/rest/api/v2010/accounts_available_phone_numbers_mobile.go +++ b/rest/api/v2010/accounts_available_phone_numbers_mobile.go @@ -166,7 +166,9 @@ func (c *ApiService) PageAvailablePhoneNumberMobile(CountryCode string, params * path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AreaCode != nil { data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) diff --git a/rest/api/v2010/accounts_available_phone_numbers_national.go b/rest/api/v2010/accounts_available_phone_numbers_national.go index 46f936ea2..808b80b37 100644 --- a/rest/api/v2010/accounts_available_phone_numbers_national.go +++ b/rest/api/v2010/accounts_available_phone_numbers_national.go @@ -166,7 +166,9 @@ func (c *ApiService) PageAvailablePhoneNumberNational(CountryCode string, params path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AreaCode != nil { data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) diff --git a/rest/api/v2010/accounts_available_phone_numbers_shared_cost.go b/rest/api/v2010/accounts_available_phone_numbers_shared_cost.go index 9c6abff87..39d575f35 100644 --- a/rest/api/v2010/accounts_available_phone_numbers_shared_cost.go +++ b/rest/api/v2010/accounts_available_phone_numbers_shared_cost.go @@ -166,7 +166,9 @@ func (c *ApiService) PageAvailablePhoneNumberSharedCost(CountryCode string, para path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AreaCode != nil { data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) diff --git a/rest/api/v2010/accounts_available_phone_numbers_toll_free.go b/rest/api/v2010/accounts_available_phone_numbers_toll_free.go index 7d4be3c1f..34df01eb5 100644 --- a/rest/api/v2010/accounts_available_phone_numbers_toll_free.go +++ b/rest/api/v2010/accounts_available_phone_numbers_toll_free.go @@ -166,7 +166,9 @@ func (c *ApiService) PageAvailablePhoneNumberTollFree(CountryCode string, params path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AreaCode != nil { data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) diff --git a/rest/api/v2010/accounts_available_phone_numbers_voip.go b/rest/api/v2010/accounts_available_phone_numbers_voip.go index a2534d8e5..6c6ca8bf9 100644 --- a/rest/api/v2010/accounts_available_phone_numbers_voip.go +++ b/rest/api/v2010/accounts_available_phone_numbers_voip.go @@ -166,7 +166,9 @@ func (c *ApiService) PageAvailablePhoneNumberVoip(CountryCode string, params *Li path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AreaCode != nil { data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) diff --git a/rest/api/v2010/accounts_balance.go b/rest/api/v2010/accounts_balance.go index 043ab1aad..721ec158e 100644 --- a/rest/api/v2010/accounts_balance.go +++ b/rest/api/v2010/accounts_balance.go @@ -41,7 +41,9 @@ func (c *ApiService) FetchBalance(params *FetchBalanceParams) (*ApiV2010Balance, } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/api/v2010/accounts_calls.go b/rest/api/v2010/accounts_calls.go index 21df276d3..bd81f1b84 100644 --- a/rest/api/v2010/accounts_calls.go +++ b/rest/api/v2010/accounts_calls.go @@ -255,7 +255,9 @@ func (c *ApiService) CreateCall(params *CreateCallParams) (*ApiV2010Call, error) } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.To != nil { data.Set("To", *params.To) @@ -404,7 +406,9 @@ func (c *ApiService) DeleteCall(Sid string, params *DeleteCallParams) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -438,7 +442,9 @@ func (c *ApiService) FetchCall(Sid string, params *FetchCallParams) (*ApiV2010Ca path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -549,7 +555,9 @@ func (c *ApiService) PageCall(params *ListCallParams, pageToken, pageNumber stri } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.To != nil { data.Set("To", *params.To) @@ -769,7 +777,9 @@ func (c *ApiService) UpdateCall(Sid string, params *UpdateCallParams) (*ApiV2010 path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Url != nil { data.Set("Url", *params.Url) diff --git a/rest/api/v2010/accounts_calls_events.go b/rest/api/v2010/accounts_calls_events.go index 07ce9789a..02954efad 100644 --- a/rest/api/v2010/accounts_calls_events.go +++ b/rest/api/v2010/accounts_calls_events.go @@ -58,7 +58,9 @@ func (c *ApiService) PageCallEvent(CallSid string, params *ListCallEventParams, path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/api/v2010/accounts_calls_notifications.go b/rest/api/v2010/accounts_calls_notifications.go index 4004ae82b..824db4614 100644 --- a/rest/api/v2010/accounts_calls_notifications.go +++ b/rest/api/v2010/accounts_calls_notifications.go @@ -46,7 +46,9 @@ func (c *ApiService) FetchCallNotification(CallSid string, Sid string, params *F path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -122,7 +124,9 @@ func (c *ApiService) PageCallNotification(CallSid string, params *ListCallNotifi path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Log != nil { data.Set("Log", fmt.Sprint(*params.Log)) diff --git a/rest/api/v2010/accounts_calls_payments.go b/rest/api/v2010/accounts_calls_payments.go index 82e68055c..d7105bf7e 100644 --- a/rest/api/v2010/accounts_calls_payments.go +++ b/rest/api/v2010/accounts_calls_payments.go @@ -139,7 +139,9 @@ func (c *ApiService) CreatePayments(CallSid string, params *CreatePaymentsParams path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IdempotencyKey != nil { data.Set("IdempotencyKey", *params.IdempotencyKey) @@ -258,7 +260,9 @@ func (c *ApiService) UpdatePayments(CallSid string, Sid string, params *UpdatePa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IdempotencyKey != nil { data.Set("IdempotencyKey", *params.IdempotencyKey) diff --git a/rest/api/v2010/accounts_calls_recordings.go b/rest/api/v2010/accounts_calls_recordings.go index 955ded6e5..539771142 100644 --- a/rest/api/v2010/accounts_calls_recordings.go +++ b/rest/api/v2010/accounts_calls_recordings.go @@ -81,7 +81,9 @@ func (c *ApiService) CreateCallRecording(CallSid string, params *CreateCallRecor path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.RecordingStatusCallbackEvent != nil { for _, item := range *params.RecordingStatusCallbackEvent { @@ -142,7 +144,9 @@ func (c *ApiService) DeleteCallRecording(CallSid string, Sid string, params *Del path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -177,7 +181,9 @@ func (c *ApiService) FetchCallRecording(CallSid string, Sid string, params *Fetc path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -247,7 +253,9 @@ func (c *ApiService) PageCallRecording(CallSid string, params *ListCallRecording path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.DateCreated != nil { data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) @@ -405,7 +413,9 @@ func (c *ApiService) UpdateCallRecording(CallSid string, Sid string, params *Upd path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/api/v2010/accounts_calls_siprec.go b/rest/api/v2010/accounts_calls_siprec.go index b793c9934..5d391ed0b 100644 --- a/rest/api/v2010/accounts_calls_siprec.go +++ b/rest/api/v2010/accounts_calls_siprec.go @@ -1260,7 +1260,9 @@ func (c *ApiService) CreateSiprec(CallSid string, params *CreateSiprecParams) (* path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Name != nil { data.Set("Name", *params.Name) @@ -1916,7 +1918,9 @@ func (c *ApiService) UpdateSiprec(CallSid string, Sid string, params *UpdateSipr path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/api/v2010/accounts_calls_streams.go b/rest/api/v2010/accounts_calls_streams.go index 4cdece0ab..c7e6080cf 100644 --- a/rest/api/v2010/accounts_calls_streams.go +++ b/rest/api/v2010/accounts_calls_streams.go @@ -1260,7 +1260,9 @@ func (c *ApiService) CreateStream(CallSid string, params *CreateStreamParams) (* path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Url != nil { data.Set("Url", *params.Url) @@ -1916,7 +1918,9 @@ func (c *ApiService) UpdateStream(CallSid string, Sid string, params *UpdateStre path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/api/v2010/accounts_calls_user_defined_message_subscriptions.go b/rest/api/v2010/accounts_calls_user_defined_message_subscriptions.go index b31d910d4..8cf8eff48 100644 --- a/rest/api/v2010/accounts_calls_user_defined_message_subscriptions.go +++ b/rest/api/v2010/accounts_calls_user_defined_message_subscriptions.go @@ -60,7 +60,9 @@ func (c *ApiService) CreateUserDefinedMessageSubscription(CallSid string, params path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Callback != nil { data.Set("Callback", *params.Callback) @@ -110,7 +112,9 @@ func (c *ApiService) DeleteUserDefinedMessageSubscription(CallSid string, Sid st path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/api/v2010/accounts_calls_user_defined_messages.go b/rest/api/v2010/accounts_calls_user_defined_messages.go index b17e6428e..53ad8d5ac 100644 --- a/rest/api/v2010/accounts_calls_user_defined_messages.go +++ b/rest/api/v2010/accounts_calls_user_defined_messages.go @@ -54,7 +54,9 @@ func (c *ApiService) CreateUserDefinedMessage(CallSid string, params *CreateUser path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Content != nil { data.Set("Content", *params.Content) diff --git a/rest/api/v2010/accounts_conferences.go b/rest/api/v2010/accounts_conferences.go index f14939760..523e9c697 100644 --- a/rest/api/v2010/accounts_conferences.go +++ b/rest/api/v2010/accounts_conferences.go @@ -45,7 +45,9 @@ func (c *ApiService) FetchConference(Sid string, params *FetchConferenceParams) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -144,7 +146,9 @@ func (c *ApiService) PageConference(params *ListConferenceParams, pageToken, pag } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.DateCreated != nil { data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) @@ -322,7 +326,9 @@ func (c *ApiService) UpdateConference(Sid string, params *UpdateConferenceParams path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/api/v2010/accounts_conferences_participants.go b/rest/api/v2010/accounts_conferences_participants.go index 32ba1ec10..957f49f9b 100644 --- a/rest/api/v2010/accounts_conferences_participants.go +++ b/rest/api/v2010/accounts_conferences_participants.go @@ -333,7 +333,9 @@ func (c *ApiService) CreateParticipant(ConferenceSid string, params *CreateParti path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.From != nil { data.Set("From", *params.From) @@ -526,7 +528,9 @@ func (c *ApiService) DeleteParticipant(ConferenceSid string, CallSid string, par path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -561,7 +565,9 @@ func (c *ApiService) FetchParticipant(ConferenceSid string, CallSid string, para path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -631,7 +637,9 @@ func (c *ApiService) PageParticipant(ConferenceSid string, params *ListParticipa path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Muted != nil { data.Set("Muted", fmt.Sprint(*params.Muted)) @@ -849,7 +857,9 @@ func (c *ApiService) UpdateParticipant(ConferenceSid string, CallSid string, par path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Muted != nil { data.Set("Muted", fmt.Sprint(*params.Muted)) diff --git a/rest/api/v2010/accounts_conferences_recordings.go b/rest/api/v2010/accounts_conferences_recordings.go index 4d0783ea1..8dce5e337 100644 --- a/rest/api/v2010/accounts_conferences_recordings.go +++ b/rest/api/v2010/accounts_conferences_recordings.go @@ -46,7 +46,9 @@ func (c *ApiService) DeleteConferenceRecording(ConferenceSid string, Sid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -81,7 +83,9 @@ func (c *ApiService) FetchConferenceRecording(ConferenceSid string, Sid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -151,7 +155,9 @@ func (c *ApiService) PageConferenceRecording(ConferenceSid string, params *ListC path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.DateCreated != nil { data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) @@ -309,7 +315,9 @@ func (c *ApiService) UpdateConferenceRecording(ConferenceSid string, Sid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/api/v2010/accounts_connect_apps.go b/rest/api/v2010/accounts_connect_apps.go index f37ece34c..0df2f7fa4 100644 --- a/rest/api/v2010/accounts_connect_apps.go +++ b/rest/api/v2010/accounts_connect_apps.go @@ -45,7 +45,9 @@ func (c *ApiService) DeleteConnectApp(Sid string, params *DeleteConnectAppParams path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -79,7 +81,9 @@ func (c *ApiService) FetchConnectApp(Sid string, params *FetchConnectAppParams) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -130,7 +134,9 @@ func (c *ApiService) PageConnectApp(params *ListConnectAppParams, pageToken, pag } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -314,7 +320,9 @@ func (c *ApiService) UpdateConnectApp(Sid string, params *UpdateConnectAppParams path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AuthorizeRedirectUrl != nil { data.Set("AuthorizeRedirectUrl", *params.AuthorizeRedirectUrl) diff --git a/rest/api/v2010/accounts_incoming_phone_numbers.go b/rest/api/v2010/accounts_incoming_phone_numbers.go index a97f6e225..8b77f7935 100644 --- a/rest/api/v2010/accounts_incoming_phone_numbers.go +++ b/rest/api/v2010/accounts_incoming_phone_numbers.go @@ -188,7 +188,9 @@ func (c *ApiService) CreateIncomingPhoneNumber(params *CreateIncomingPhoneNumber } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ApiVersion != nil { data.Set("ApiVersion", *params.ApiVersion) @@ -300,7 +302,9 @@ func (c *ApiService) DeleteIncomingPhoneNumber(Sid string, params *DeleteIncomin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -334,7 +338,9 @@ func (c *ApiService) FetchIncomingPhoneNumber(Sid string, params *FetchIncomingP path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -409,7 +415,9 @@ func (c *ApiService) PageIncomingPhoneNumber(params *ListIncomingPhoneNumberPara } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Beta != nil { data.Set("Beta", fmt.Sprint(*params.Beta)) @@ -695,7 +703,9 @@ func (c *ApiService) UpdateIncomingPhoneNumber(Sid string, params *UpdateIncomin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AccountSid != nil { data.Set("AccountSid", *params.AccountSid) diff --git a/rest/api/v2010/accounts_incoming_phone_numbers_assigned_add_ons.go b/rest/api/v2010/accounts_incoming_phone_numbers_assigned_add_ons.go index c6ccd00d5..2a1d3bab5 100644 --- a/rest/api/v2010/accounts_incoming_phone_numbers_assigned_add_ons.go +++ b/rest/api/v2010/accounts_incoming_phone_numbers_assigned_add_ons.go @@ -51,7 +51,9 @@ func (c *ApiService) CreateIncomingPhoneNumberAssignedAddOn(ResourceSid string, path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.InstalledAddOnSid != nil { data.Set("InstalledAddOnSid", *params.InstalledAddOnSid) @@ -95,7 +97,9 @@ func (c *ApiService) DeleteIncomingPhoneNumberAssignedAddOn(ResourceSid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -130,7 +134,9 @@ func (c *ApiService) FetchIncomingPhoneNumberAssignedAddOn(ResourceSid string, S path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -182,7 +188,9 @@ func (c *ApiService) PageIncomingPhoneNumberAssignedAddOn(ResourceSid string, pa path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/api/v2010/accounts_incoming_phone_numbers_assigned_add_ons_extensions.go b/rest/api/v2010/accounts_incoming_phone_numbers_assigned_add_ons_extensions.go index 981b2137a..2c5a3899c 100644 --- a/rest/api/v2010/accounts_incoming_phone_numbers_assigned_add_ons_extensions.go +++ b/rest/api/v2010/accounts_incoming_phone_numbers_assigned_add_ons_extensions.go @@ -47,7 +47,9 @@ func (c *ApiService) FetchIncomingPhoneNumberAssignedAddOnExtension(ResourceSid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -100,7 +102,9 @@ func (c *ApiService) PageIncomingPhoneNumberAssignedAddOnExtension(ResourceSid s path = strings.Replace(path, "{"+"AssignedAddOnSid"+"}", AssignedAddOnSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/api/v2010/accounts_incoming_phone_numbers_local.go b/rest/api/v2010/accounts_incoming_phone_numbers_local.go index e40f5ff44..06a26e6c9 100644 --- a/rest/api/v2010/accounts_incoming_phone_numbers_local.go +++ b/rest/api/v2010/accounts_incoming_phone_numbers_local.go @@ -182,7 +182,9 @@ func (c *ApiService) CreateIncomingPhoneNumberLocal(params *CreateIncomingPhoneN } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PhoneNumber != nil { data.Set("PhoneNumber", *params.PhoneNumber) @@ -327,7 +329,9 @@ func (c *ApiService) PageIncomingPhoneNumberLocal(params *ListIncomingPhoneNumbe } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Beta != nil { data.Set("Beta", fmt.Sprint(*params.Beta)) diff --git a/rest/api/v2010/accounts_incoming_phone_numbers_mobile.go b/rest/api/v2010/accounts_incoming_phone_numbers_mobile.go index feaef417a..2a4365d59 100644 --- a/rest/api/v2010/accounts_incoming_phone_numbers_mobile.go +++ b/rest/api/v2010/accounts_incoming_phone_numbers_mobile.go @@ -182,7 +182,9 @@ func (c *ApiService) CreateIncomingPhoneNumberMobile(params *CreateIncomingPhone } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PhoneNumber != nil { data.Set("PhoneNumber", *params.PhoneNumber) @@ -327,7 +329,9 @@ func (c *ApiService) PageIncomingPhoneNumberMobile(params *ListIncomingPhoneNumb } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Beta != nil { data.Set("Beta", fmt.Sprint(*params.Beta)) diff --git a/rest/api/v2010/accounts_incoming_phone_numbers_toll_free.go b/rest/api/v2010/accounts_incoming_phone_numbers_toll_free.go index f178aed9e..ad8107c1d 100644 --- a/rest/api/v2010/accounts_incoming_phone_numbers_toll_free.go +++ b/rest/api/v2010/accounts_incoming_phone_numbers_toll_free.go @@ -182,7 +182,9 @@ func (c *ApiService) CreateIncomingPhoneNumberTollFree(params *CreateIncomingPho } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PhoneNumber != nil { data.Set("PhoneNumber", *params.PhoneNumber) @@ -327,7 +329,9 @@ func (c *ApiService) PageIncomingPhoneNumberTollFree(params *ListIncomingPhoneNu } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Beta != nil { data.Set("Beta", fmt.Sprint(*params.Beta)) diff --git a/rest/api/v2010/accounts_keys.go b/rest/api/v2010/accounts_keys.go index 47e4335d5..6d18e73ee 100644 --- a/rest/api/v2010/accounts_keys.go +++ b/rest/api/v2010/accounts_keys.go @@ -50,7 +50,9 @@ func (c *ApiService) CreateNewKey(params *CreateNewKeyParams) (*ApiV2010NewKey, } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -93,7 +95,9 @@ func (c *ApiService) DeleteKey(Sid string, params *DeleteKeyParams) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -127,7 +131,9 @@ func (c *ApiService) FetchKey(Sid string, params *FetchKeyParams) (*ApiV2010Key, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -178,7 +184,9 @@ func (c *ApiService) PageKey(params *ListKeyParams, pageToken, pageNumber string } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -320,7 +328,9 @@ func (c *ApiService) UpdateKey(Sid string, params *UpdateKeyParams) (*ApiV2010Ke path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/api/v2010/accounts_messages.go b/rest/api/v2010/accounts_messages.go index aa304673b..e2a6bc4c9 100644 --- a/rest/api/v2010/accounts_messages.go +++ b/rest/api/v2010/accounts_messages.go @@ -183,7 +183,9 @@ func (c *ApiService) CreateMessage(params *CreateMessageParams) (*ApiV2010Messag } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.To != nil { data.Set("To", *params.To) @@ -296,7 +298,9 @@ func (c *ApiService) DeleteMessage(Sid string, params *DeleteMessageParams) erro path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -330,7 +334,9 @@ func (c *ApiService) FetchMessage(Sid string, params *FetchMessageParams) (*ApiV path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -411,7 +417,9 @@ func (c *ApiService) PageMessage(params *ListMessageParams, pageToken, pageNumbe } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.To != nil { data.Set("To", *params.To) @@ -574,7 +582,9 @@ func (c *ApiService) UpdateMessage(Sid string, params *UpdateMessageParams) (*Ap path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Body != nil { data.Set("Body", *params.Body) diff --git a/rest/api/v2010/accounts_messages_feedback.go b/rest/api/v2010/accounts_messages_feedback.go index 43e0a8e26..ed1ff2e1f 100644 --- a/rest/api/v2010/accounts_messages_feedback.go +++ b/rest/api/v2010/accounts_messages_feedback.go @@ -48,7 +48,9 @@ func (c *ApiService) CreateMessageFeedback(MessageSid string, params *CreateMess path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Outcome != nil { data.Set("Outcome", *params.Outcome) diff --git a/rest/api/v2010/accounts_messages_media.go b/rest/api/v2010/accounts_messages_media.go index 4f0f81578..c943d2944 100644 --- a/rest/api/v2010/accounts_messages_media.go +++ b/rest/api/v2010/accounts_messages_media.go @@ -47,7 +47,9 @@ func (c *ApiService) DeleteMedia(MessageSid string, Sid string, params *DeleteMe path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -82,7 +84,9 @@ func (c *ApiService) FetchMedia(MessageSid string, Sid string, params *FetchMedi path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -152,7 +156,9 @@ func (c *ApiService) PageMedia(MessageSid string, params *ListMediaParams, pageT path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.DateCreated != nil { data.Set("DateCreated", fmt.Sprint((*params.DateCreated).Format(time.RFC3339))) diff --git a/rest/api/v2010/accounts_notifications.go b/rest/api/v2010/accounts_notifications.go index 4151a7021..ccd566be3 100644 --- a/rest/api/v2010/accounts_notifications.go +++ b/rest/api/v2010/accounts_notifications.go @@ -45,7 +45,9 @@ func (c *ApiService) FetchNotification(Sid string, params *FetchNotificationPara path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -120,7 +122,9 @@ func (c *ApiService) PageNotification(params *ListNotificationParams, pageToken, } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Log != nil { data.Set("Log", fmt.Sprint(*params.Log)) diff --git a/rest/api/v2010/accounts_outgoing_caller_ids.go b/rest/api/v2010/accounts_outgoing_caller_ids.go index 1d91a9389..f098619e8 100644 --- a/rest/api/v2010/accounts_outgoing_caller_ids.go +++ b/rest/api/v2010/accounts_outgoing_caller_ids.go @@ -80,7 +80,9 @@ func (c *ApiService) CreateValidationRequest(params *CreateValidationRequestPara } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PhoneNumber != nil { data.Set("PhoneNumber", *params.PhoneNumber) @@ -138,7 +140,9 @@ func (c *ApiService) DeleteOutgoingCallerId(Sid string, params *DeleteOutgoingCa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -172,7 +176,9 @@ func (c *ApiService) FetchOutgoingCallerId(Sid string, params *FetchOutgoingCall path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -235,7 +241,9 @@ func (c *ApiService) PageOutgoingCallerId(params *ListOutgoingCallerIdParams, pa } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PhoneNumber != nil { data.Set("PhoneNumber", *params.PhoneNumber) @@ -383,7 +391,9 @@ func (c *ApiService) UpdateOutgoingCallerId(Sid string, params *UpdateOutgoingCa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/api/v2010/accounts_queues.go b/rest/api/v2010/accounts_queues.go index 9f6c3e7b2..6bf8d72ad 100644 --- a/rest/api/v2010/accounts_queues.go +++ b/rest/api/v2010/accounts_queues.go @@ -56,7 +56,9 @@ func (c *ApiService) CreateQueue(params *CreateQueueParams) (*ApiV2010Queue, err } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -102,7 +104,9 @@ func (c *ApiService) DeleteQueue(Sid string, params *DeleteQueueParams) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -136,7 +140,9 @@ func (c *ApiService) FetchQueue(Sid string, params *FetchQueueParams) (*ApiV2010 path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -187,7 +193,9 @@ func (c *ApiService) PageQueue(params *ListQueueParams, pageToken, pageNumber st } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -335,7 +343,9 @@ func (c *ApiService) UpdateQueue(Sid string, params *UpdateQueueParams) (*ApiV20 path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/api/v2010/accounts_queues_members.go b/rest/api/v2010/accounts_queues_members.go index 93a3f0b24..f8fbb0b8e 100644 --- a/rest/api/v2010/accounts_queues_members.go +++ b/rest/api/v2010/accounts_queues_members.go @@ -46,7 +46,9 @@ func (c *ApiService) FetchMember(QueueSid string, CallSid string, params *FetchM path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -98,7 +100,9 @@ func (c *ApiService) PageMember(QueueSid string, params *ListMemberParams, pageT path = strings.Replace(path, "{"+"QueueSid"+"}", QueueSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -247,7 +251,9 @@ func (c *ApiService) UpdateMember(QueueSid string, CallSid string, params *Updat path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Url != nil { data.Set("Url", *params.Url) diff --git a/rest/api/v2010/accounts_recordings.go b/rest/api/v2010/accounts_recordings.go index cae717617..6eca8877a 100644 --- a/rest/api/v2010/accounts_recordings.go +++ b/rest/api/v2010/accounts_recordings.go @@ -46,7 +46,9 @@ func (c *ApiService) DeleteRecording(Sid string, params *DeleteRecordingParams) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -86,7 +88,9 @@ func (c *ApiService) FetchRecording(Sid string, params *FetchRecordingParams) (* path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IncludeSoftDeleted != nil { data.Set("IncludeSoftDeleted", fmt.Sprint(*params.IncludeSoftDeleted)) @@ -177,7 +181,9 @@ func (c *ApiService) PageRecording(params *ListRecordingParams, pageToken, pageN } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.DateCreated != nil { data.Set("DateCreated", fmt.Sprint((*params.DateCreated).Format(time.RFC3339))) diff --git a/rest/api/v2010/accounts_recordings_add_on_results.go b/rest/api/v2010/accounts_recordings_add_on_results.go index 69857f08e..c6c9e7760 100644 --- a/rest/api/v2010/accounts_recordings_add_on_results.go +++ b/rest/api/v2010/accounts_recordings_add_on_results.go @@ -46,7 +46,9 @@ func (c *ApiService) DeleteRecordingAddOnResult(ReferenceSid string, Sid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -81,7 +83,9 @@ func (c *ApiService) FetchRecordingAddOnResult(ReferenceSid string, Sid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -133,7 +137,9 @@ func (c *ApiService) PageRecordingAddOnResult(ReferenceSid string, params *ListR path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/api/v2010/accounts_recordings_add_on_results_payloads.go b/rest/api/v2010/accounts_recordings_add_on_results_payloads.go index e9738d49a..83012595d 100644 --- a/rest/api/v2010/accounts_recordings_add_on_results_payloads.go +++ b/rest/api/v2010/accounts_recordings_add_on_results_payloads.go @@ -47,7 +47,9 @@ func (c *ApiService) DeleteRecordingAddOnResultPayload(ReferenceSid string, AddO path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -83,7 +85,9 @@ func (c *ApiService) FetchRecordingAddOnResultPayload(ReferenceSid string, AddOn path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -136,7 +140,9 @@ func (c *ApiService) PageRecordingAddOnResultPayload(ReferenceSid string, AddOnR path = strings.Replace(path, "{"+"AddOnResultSid"+"}", AddOnResultSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/api/v2010/accounts_recordings_transcriptions.go b/rest/api/v2010/accounts_recordings_transcriptions.go index c1ca8d02e..513ec233e 100644 --- a/rest/api/v2010/accounts_recordings_transcriptions.go +++ b/rest/api/v2010/accounts_recordings_transcriptions.go @@ -46,7 +46,9 @@ func (c *ApiService) DeleteRecordingTranscription(RecordingSid string, Sid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -81,7 +83,9 @@ func (c *ApiService) FetchRecordingTranscription(RecordingSid string, Sid string path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -133,7 +137,9 @@ func (c *ApiService) PageRecordingTranscription(RecordingSid string, params *Lis path = strings.Replace(path, "{"+"RecordingSid"+"}", RecordingSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/api/v2010/accounts_signing_keys.go b/rest/api/v2010/accounts_signing_keys.go index dd1b18853..fa9f66dfd 100644 --- a/rest/api/v2010/accounts_signing_keys.go +++ b/rest/api/v2010/accounts_signing_keys.go @@ -50,7 +50,9 @@ func (c *ApiService) CreateNewSigningKey(params *CreateNewSigningKeyParams) (*Ap } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -93,7 +95,9 @@ func (c *ApiService) DeleteSigningKey(Sid string, params *DeleteSigningKeyParams path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -127,7 +131,9 @@ func (c *ApiService) FetchSigningKey(Sid string, params *FetchSigningKeyParams) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -178,7 +184,9 @@ func (c *ApiService) PageSigningKey(params *ListSigningKeyParams, pageToken, pag } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -320,7 +328,9 @@ func (c *ApiService) UpdateSigningKey(Sid string, params *UpdateSigningKeyParams path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/api/v2010/accounts_sip_credential_lists.go b/rest/api/v2010/accounts_sip_credential_lists.go index 17a523bc0..ba6978691 100644 --- a/rest/api/v2010/accounts_sip_credential_lists.go +++ b/rest/api/v2010/accounts_sip_credential_lists.go @@ -50,7 +50,9 @@ func (c *ApiService) CreateSipCredentialList(params *CreateSipCredentialListPara } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -93,7 +95,9 @@ func (c *ApiService) DeleteSipCredentialList(Sid string, params *DeleteSipCreden path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -127,7 +131,9 @@ func (c *ApiService) FetchSipCredentialList(Sid string, params *FetchSipCredenti path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -178,7 +184,9 @@ func (c *ApiService) PageSipCredentialList(params *ListSipCredentialListParams, } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -320,7 +328,9 @@ func (c *ApiService) UpdateSipCredentialList(Sid string, params *UpdateSipCreden path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/api/v2010/accounts_sip_credential_lists_credentials.go b/rest/api/v2010/accounts_sip_credential_lists_credentials.go index e82f254f2..c49a0b82e 100644 --- a/rest/api/v2010/accounts_sip_credential_lists_credentials.go +++ b/rest/api/v2010/accounts_sip_credential_lists_credentials.go @@ -57,7 +57,9 @@ func (c *ApiService) CreateSipCredential(CredentialListSid string, params *Creat path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Username != nil { data.Set("Username", *params.Username) @@ -104,7 +106,9 @@ func (c *ApiService) DeleteSipCredential(CredentialListSid string, Sid string, p path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -139,7 +143,9 @@ func (c *ApiService) FetchSipCredential(CredentialListSid string, Sid string, pa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -191,7 +197,9 @@ func (c *ApiService) PageSipCredential(CredentialListSid string, params *ListSip path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -334,7 +342,9 @@ func (c *ApiService) UpdateSipCredential(CredentialListSid string, Sid string, p path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Password != nil { data.Set("Password", *params.Password) diff --git a/rest/api/v2010/accounts_sip_domains.go b/rest/api/v2010/accounts_sip_domains.go index e0868c6f0..c199785fb 100644 --- a/rest/api/v2010/accounts_sip_domains.go +++ b/rest/api/v2010/accounts_sip_domains.go @@ -122,7 +122,9 @@ func (c *ApiService) CreateSipDomain(params *CreateSipDomainParams) (*ApiV2010Si } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.DomainName != nil { data.Set("DomainName", *params.DomainName) @@ -201,7 +203,9 @@ func (c *ApiService) DeleteSipDomain(Sid string, params *DeleteSipDomainParams) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -235,7 +239,9 @@ func (c *ApiService) FetchSipDomain(Sid string, params *FetchSipDomainParams) (* path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -286,7 +292,9 @@ func (c *ApiService) PageSipDomain(params *ListSipDomainParams, pageToken, pageN } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -500,7 +508,9 @@ func (c *ApiService) UpdateSipDomain(Sid string, params *UpdateSipDomainParams) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/api/v2010/accounts_sip_domains_auth_calls_credential_list_mappings.go b/rest/api/v2010/accounts_sip_domains_auth_calls_credential_list_mappings.go index f3d34690e..684b9e14b 100644 --- a/rest/api/v2010/accounts_sip_domains_auth_calls_credential_list_mappings.go +++ b/rest/api/v2010/accounts_sip_domains_auth_calls_credential_list_mappings.go @@ -51,7 +51,9 @@ func (c *ApiService) CreateSipAuthCallsCredentialListMapping(DomainSid string, p path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.CredentialListSid != nil { data.Set("CredentialListSid", *params.CredentialListSid) @@ -95,7 +97,9 @@ func (c *ApiService) DeleteSipAuthCallsCredentialListMapping(DomainSid string, S path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -130,7 +134,9 @@ func (c *ApiService) FetchSipAuthCallsCredentialListMapping(DomainSid string, Si path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -182,7 +188,9 @@ func (c *ApiService) PageSipAuthCallsCredentialListMapping(DomainSid string, par path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/api/v2010/accounts_sip_domains_auth_calls_ip_access_control_list_mappings.go b/rest/api/v2010/accounts_sip_domains_auth_calls_ip_access_control_list_mappings.go index 86daa24f0..6f9c61a30 100644 --- a/rest/api/v2010/accounts_sip_domains_auth_calls_ip_access_control_list_mappings.go +++ b/rest/api/v2010/accounts_sip_domains_auth_calls_ip_access_control_list_mappings.go @@ -51,7 +51,9 @@ func (c *ApiService) CreateSipAuthCallsIpAccessControlListMapping(DomainSid stri path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IpAccessControlListSid != nil { data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) @@ -95,7 +97,9 @@ func (c *ApiService) DeleteSipAuthCallsIpAccessControlListMapping(DomainSid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -130,7 +134,9 @@ func (c *ApiService) FetchSipAuthCallsIpAccessControlListMapping(DomainSid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -182,7 +188,9 @@ func (c *ApiService) PageSipAuthCallsIpAccessControlListMapping(DomainSid string path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/api/v2010/accounts_sip_domains_auth_registrations_credential_list_mappings.go b/rest/api/v2010/accounts_sip_domains_auth_registrations_credential_list_mappings.go index 431e5099b..7ffac8cd7 100644 --- a/rest/api/v2010/accounts_sip_domains_auth_registrations_credential_list_mappings.go +++ b/rest/api/v2010/accounts_sip_domains_auth_registrations_credential_list_mappings.go @@ -51,7 +51,9 @@ func (c *ApiService) CreateSipAuthRegistrationsCredentialListMapping(DomainSid s path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.CredentialListSid != nil { data.Set("CredentialListSid", *params.CredentialListSid) @@ -95,7 +97,9 @@ func (c *ApiService) DeleteSipAuthRegistrationsCredentialListMapping(DomainSid s path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -130,7 +134,9 @@ func (c *ApiService) FetchSipAuthRegistrationsCredentialListMapping(DomainSid st path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -182,7 +188,9 @@ func (c *ApiService) PageSipAuthRegistrationsCredentialListMapping(DomainSid str path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/api/v2010/accounts_sip_domains_credential_list_mappings.go b/rest/api/v2010/accounts_sip_domains_credential_list_mappings.go index 09ac9162e..e5d0f12da 100644 --- a/rest/api/v2010/accounts_sip_domains_credential_list_mappings.go +++ b/rest/api/v2010/accounts_sip_domains_credential_list_mappings.go @@ -51,7 +51,9 @@ func (c *ApiService) CreateSipCredentialListMapping(DomainSid string, params *Cr path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.CredentialListSid != nil { data.Set("CredentialListSid", *params.CredentialListSid) @@ -95,7 +97,9 @@ func (c *ApiService) DeleteSipCredentialListMapping(DomainSid string, Sid string path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -130,7 +134,9 @@ func (c *ApiService) FetchSipCredentialListMapping(DomainSid string, Sid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -182,7 +188,9 @@ func (c *ApiService) PageSipCredentialListMapping(DomainSid string, params *List path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/api/v2010/accounts_sip_domains_ip_access_control_list_mappings.go b/rest/api/v2010/accounts_sip_domains_ip_access_control_list_mappings.go index e42334eb7..c675dfdaf 100644 --- a/rest/api/v2010/accounts_sip_domains_ip_access_control_list_mappings.go +++ b/rest/api/v2010/accounts_sip_domains_ip_access_control_list_mappings.go @@ -51,7 +51,9 @@ func (c *ApiService) CreateSipIpAccessControlListMapping(DomainSid string, param path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IpAccessControlListSid != nil { data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) @@ -95,7 +97,9 @@ func (c *ApiService) DeleteSipIpAccessControlListMapping(DomainSid string, Sid s path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -130,7 +134,9 @@ func (c *ApiService) FetchSipIpAccessControlListMapping(DomainSid string, Sid st path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -182,7 +188,9 @@ func (c *ApiService) PageSipIpAccessControlListMapping(DomainSid string, params path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/api/v2010/accounts_sipip_access_control_lists.go b/rest/api/v2010/accounts_sipip_access_control_lists.go index 390bcfa25..b6400b249 100644 --- a/rest/api/v2010/accounts_sipip_access_control_lists.go +++ b/rest/api/v2010/accounts_sipip_access_control_lists.go @@ -50,7 +50,9 @@ func (c *ApiService) CreateSipIpAccessControlList(params *CreateSipIpAccessContr } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -93,7 +95,9 @@ func (c *ApiService) DeleteSipIpAccessControlList(Sid string, params *DeleteSipI path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -127,7 +131,9 @@ func (c *ApiService) FetchSipIpAccessControlList(Sid string, params *FetchSipIpA path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -178,7 +184,9 @@ func (c *ApiService) PageSipIpAccessControlList(params *ListSipIpAccessControlLi } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -320,7 +328,9 @@ func (c *ApiService) UpdateSipIpAccessControlList(Sid string, params *UpdateSipI path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/api/v2010/accounts_sipip_access_control_lists_ip_addresses.go b/rest/api/v2010/accounts_sipip_access_control_lists_ip_addresses.go index 0d92df5e6..2317e9b17 100644 --- a/rest/api/v2010/accounts_sipip_access_control_lists_ip_addresses.go +++ b/rest/api/v2010/accounts_sipip_access_control_lists_ip_addresses.go @@ -63,7 +63,9 @@ func (c *ApiService) CreateSipIpAddress(IpAccessControlListSid string, params *C path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -113,7 +115,9 @@ func (c *ApiService) DeleteSipIpAddress(IpAccessControlListSid string, Sid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -148,7 +152,9 @@ func (c *ApiService) FetchSipIpAddress(IpAccessControlListSid string, Sid string path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -200,7 +206,9 @@ func (c *ApiService) PageSipIpAddress(IpAccessControlListSid string, params *Lis path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -355,7 +363,9 @@ func (c *ApiService) UpdateSipIpAddress(IpAccessControlListSid string, Sid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IpAddress != nil { data.Set("IpAddress", *params.IpAddress) diff --git a/rest/api/v2010/accounts_sms_short_codes.go b/rest/api/v2010/accounts_sms_short_codes.go index efac7d190..c0dc591c9 100644 --- a/rest/api/v2010/accounts_sms_short_codes.go +++ b/rest/api/v2010/accounts_sms_short_codes.go @@ -45,7 +45,9 @@ func (c *ApiService) FetchShortCode(Sid string, params *FetchShortCodeParams) (* path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -108,7 +110,9 @@ func (c *ApiService) PageShortCode(params *ListShortCodeParams, pageToken, pageN } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -286,7 +290,9 @@ func (c *ApiService) UpdateShortCode(Sid string, params *UpdateShortCodeParams) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/api/v2010/accounts_tokens.go b/rest/api/v2010/accounts_tokens.go index 1784876d1..e55a22fa8 100644 --- a/rest/api/v2010/accounts_tokens.go +++ b/rest/api/v2010/accounts_tokens.go @@ -48,7 +48,9 @@ func (c *ApiService) CreateToken(params *CreateTokenParams) (*ApiV2010Token, err } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) diff --git a/rest/api/v2010/accounts_transcriptions.go b/rest/api/v2010/accounts_transcriptions.go index c62183a14..208a4bf2d 100644 --- a/rest/api/v2010/accounts_transcriptions.go +++ b/rest/api/v2010/accounts_transcriptions.go @@ -45,7 +45,9 @@ func (c *ApiService) DeleteTranscription(Sid string, params *DeleteTranscription path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -79,7 +81,9 @@ func (c *ApiService) FetchTranscription(Sid string, params *FetchTranscriptionPa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -130,7 +134,9 @@ func (c *ApiService) PageTranscription(params *ListTranscriptionParams, pageToke } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/api/v2010/accounts_usage_records.go b/rest/api/v2010/accounts_usage_records.go index d5ed51a3d..ceb07c5e1 100644 --- a/rest/api/v2010/accounts_usage_records.go +++ b/rest/api/v2010/accounts_usage_records.go @@ -81,7 +81,9 @@ func (c *ApiService) PageUsageRecord(params *ListUsageRecordParams, pageToken, p } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Category != nil { data.Set("Category", *params.Category) diff --git a/rest/api/v2010/accounts_usage_records_all_time.go b/rest/api/v2010/accounts_usage_records_all_time.go index 2719f2426..4c3003fbb 100644 --- a/rest/api/v2010/accounts_usage_records_all_time.go +++ b/rest/api/v2010/accounts_usage_records_all_time.go @@ -81,7 +81,9 @@ func (c *ApiService) PageUsageRecordAllTime(params *ListUsageRecordAllTimeParams } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Category != nil { data.Set("Category", *params.Category) diff --git a/rest/api/v2010/accounts_usage_records_daily.go b/rest/api/v2010/accounts_usage_records_daily.go index c27a64969..a1cdcec46 100644 --- a/rest/api/v2010/accounts_usage_records_daily.go +++ b/rest/api/v2010/accounts_usage_records_daily.go @@ -81,7 +81,9 @@ func (c *ApiService) PageUsageRecordDaily(params *ListUsageRecordDailyParams, pa } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Category != nil { data.Set("Category", *params.Category) diff --git a/rest/api/v2010/accounts_usage_records_last_month.go b/rest/api/v2010/accounts_usage_records_last_month.go index 23ec9b62d..4c5867b55 100644 --- a/rest/api/v2010/accounts_usage_records_last_month.go +++ b/rest/api/v2010/accounts_usage_records_last_month.go @@ -81,7 +81,9 @@ func (c *ApiService) PageUsageRecordLastMonth(params *ListUsageRecordLastMonthPa } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Category != nil { data.Set("Category", *params.Category) diff --git a/rest/api/v2010/accounts_usage_records_monthly.go b/rest/api/v2010/accounts_usage_records_monthly.go index 82dc2e4ec..39333ccfd 100644 --- a/rest/api/v2010/accounts_usage_records_monthly.go +++ b/rest/api/v2010/accounts_usage_records_monthly.go @@ -81,7 +81,9 @@ func (c *ApiService) PageUsageRecordMonthly(params *ListUsageRecordMonthlyParams } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Category != nil { data.Set("Category", *params.Category) diff --git a/rest/api/v2010/accounts_usage_records_this_month.go b/rest/api/v2010/accounts_usage_records_this_month.go index b3b79e816..b05a8f544 100644 --- a/rest/api/v2010/accounts_usage_records_this_month.go +++ b/rest/api/v2010/accounts_usage_records_this_month.go @@ -81,7 +81,9 @@ func (c *ApiService) PageUsageRecordThisMonth(params *ListUsageRecordThisMonthPa } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Category != nil { data.Set("Category", *params.Category) diff --git a/rest/api/v2010/accounts_usage_records_today.go b/rest/api/v2010/accounts_usage_records_today.go index f9ce2c74a..5e66a648b 100644 --- a/rest/api/v2010/accounts_usage_records_today.go +++ b/rest/api/v2010/accounts_usage_records_today.go @@ -81,7 +81,9 @@ func (c *ApiService) PageUsageRecordToday(params *ListUsageRecordTodayParams, pa } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Category != nil { data.Set("Category", *params.Category) diff --git a/rest/api/v2010/accounts_usage_records_yearly.go b/rest/api/v2010/accounts_usage_records_yearly.go index e601fd804..8edfc3760 100644 --- a/rest/api/v2010/accounts_usage_records_yearly.go +++ b/rest/api/v2010/accounts_usage_records_yearly.go @@ -81,7 +81,9 @@ func (c *ApiService) PageUsageRecordYearly(params *ListUsageRecordYearlyParams, } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Category != nil { data.Set("Category", *params.Category) diff --git a/rest/api/v2010/accounts_usage_records_yesterday.go b/rest/api/v2010/accounts_usage_records_yesterday.go index 5293f7a19..11138d59b 100644 --- a/rest/api/v2010/accounts_usage_records_yesterday.go +++ b/rest/api/v2010/accounts_usage_records_yesterday.go @@ -81,7 +81,9 @@ func (c *ApiService) PageUsageRecordYesterday(params *ListUsageRecordYesterdayPa } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Category != nil { data.Set("Category", *params.Category) diff --git a/rest/api/v2010/accounts_usage_triggers.go b/rest/api/v2010/accounts_usage_triggers.go index da4333b3a..e193f34cb 100644 --- a/rest/api/v2010/accounts_usage_triggers.go +++ b/rest/api/v2010/accounts_usage_triggers.go @@ -86,7 +86,9 @@ func (c *ApiService) CreateUsageTrigger(params *CreateUsageTriggerParams) (*ApiV } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.CallbackUrl != nil { data.Set("CallbackUrl", *params.CallbackUrl) @@ -147,7 +149,9 @@ func (c *ApiService) DeleteUsageTrigger(Sid string, params *DeleteUsageTriggerPa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -181,7 +185,9 @@ func (c *ApiService) FetchUsageTrigger(Sid string, params *FetchUsageTriggerPara path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -250,7 +256,9 @@ func (c *ApiService) PageUsageTrigger(params *ListUsageTriggerParams, pageToken, } data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Recurring != nil { data.Set("Recurring", *params.Recurring) @@ -413,7 +421,9 @@ func (c *ApiService) UpdateUsageTrigger(Sid string, params *UpdateUsageTriggerPa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.CallbackMethod != nil { data.Set("CallbackMethod", *params.CallbackMethod) diff --git a/rest/api/v2010/docs/ApiV2010Call.md b/rest/api/v2010/docs/ApiV2010Call.md index e7c2aa513..ffbe39b47 100644 --- a/rest/api/v2010/docs/ApiV2010Call.md +++ b/rest/api/v2010/docs/ApiV2010Call.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes **StartTime** | Pointer to **string** | The start time of the call, given as UTC in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. Empty if the call has not yet been dialed. | **EndTime** | Pointer to **string** | The time the call ended, given as UTC in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. Empty if the call did not complete successfully. | **Duration** | Pointer to **string** | The length of the call in seconds. This value is empty for busy, failed, unanswered, or ongoing calls. | -**Price** | Pointer to **string** | The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available. | +**Price** | Pointer to **string** | The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available. The price associated with a call only reflects the charge for connectivity. Charges for other call-related features such as Answering Machine Detection, Text-To-Speech, and SIP REFER are not included in this value. | **PriceUnit** | Pointer to **string** | The currency in which `Price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format (e.g., `USD`, `EUR`, `JPY`). Always capitalized for calls. | **Direction** | Pointer to **string** | A string describing the direction of the call. Can be: `inbound` for inbound calls, `outbound-api` for calls initiated via the REST API or `outbound-dial` for calls initiated by a `` verb. Using [Elastic SIP Trunking](https://www.twilio.com/docs/sip-trunking), the values can be [`trunking-terminating`](https://www.twilio.com/docs/sip-trunking#termination) for outgoing calls from your communications infrastructure to the PSTN or [`trunking-originating`](https://www.twilio.com/docs/sip-trunking#origination) for incoming calls to your communications infrastructure from the PSTN. | **AnsweredBy** | Pointer to **string** | Either `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise. | diff --git a/rest/api/v2010/docs/ApiV2010Recording.md b/rest/api/v2010/docs/ApiV2010Recording.md index dbb6729d6..e14b1f5cf 100644 --- a/rest/api/v2010/docs/ApiV2010Recording.md +++ b/rest/api/v2010/docs/ApiV2010Recording.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **Price** | Pointer to **string** | The one-time cost of creating the recording in the `price_unit` currency. | **PriceUnit** | Pointer to **string** | The currency used in the `price` property. Example: `USD`. | **Status** | Pointer to [**string**](RecordingEnumStatus.md) | | -**Channels** | Pointer to **int** | The number of channels in the final recording file. Can be: `1` or `2`. You can split a call with two legs into two separate recording channels if you record using [TwiML Dial](https://www.twilio.com/docs/voice/twiml/dial#record) or the [Outbound Rest API](https://www.twilio.com/docs/voice/make-calls#manage-your-outbound-call). | +**Channels** | Pointer to **int** | The number of channels in the final recording file. Can be: `1` or `2`. | **Source** | Pointer to [**string**](RecordingEnumSource.md) | | **ErrorCode** | Pointer to **int** | The error code that describes why the recording is `absent`. The error code is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). This value is null if the recording `status` is not `absent`. | **Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com`. | diff --git a/rest/api/v2010/model_api_v2010_call.go b/rest/api/v2010/model_api_v2010_call.go index cacc8eba1..f47120069 100644 --- a/rest/api/v2010/model_api_v2010_call.go +++ b/rest/api/v2010/model_api_v2010_call.go @@ -43,7 +43,7 @@ type ApiV2010Call struct { EndTime *string `json:"end_time,omitempty"` // The length of the call in seconds. This value is empty for busy, failed, unanswered, or ongoing calls. Duration *string `json:"duration,omitempty"` - // The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available. + // The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available. The price associated with a call only reflects the charge for connectivity. Charges for other call-related features such as Answering Machine Detection, Text-To-Speech, and SIP REFER are not included in this value. Price *string `json:"price,omitempty"` // The currency in which `Price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format (e.g., `USD`, `EUR`, `JPY`). Always capitalized for calls. PriceUnit *string `json:"price_unit,omitempty"` diff --git a/rest/api/v2010/model_api_v2010_recording.go b/rest/api/v2010/model_api_v2010_recording.go index 4dc6135eb..63a724761 100644 --- a/rest/api/v2010/model_api_v2010_recording.go +++ b/rest/api/v2010/model_api_v2010_recording.go @@ -39,7 +39,7 @@ type ApiV2010Recording struct { // The currency used in the `price` property. Example: `USD`. PriceUnit *string `json:"price_unit,omitempty"` Status *string `json:"status,omitempty"` - // The number of channels in the final recording file. Can be: `1` or `2`. You can split a call with two legs into two separate recording channels if you record using [TwiML Dial](https://www.twilio.com/docs/voice/twiml/dial#record) or the [Outbound Rest API](https://www.twilio.com/docs/voice/make-calls#manage-your-outbound-call). + // The number of channels in the final recording file. Can be: `1` or `2`. Channels *int `json:"channels,omitempty"` Source *string `json:"source,omitempty"` // The error code that describes why the recording is `absent`. The error code is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors). This value is null if the recording `status` is not `absent`. diff --git a/rest/bulkexports/v1/exports.go b/rest/bulkexports/v1/exports.go index 1cbbbe073..e12ca8460 100644 --- a/rest/bulkexports/v1/exports.go +++ b/rest/bulkexports/v1/exports.go @@ -26,7 +26,9 @@ func (c *ApiService) FetchExport(ResourceType string) (*BulkexportsV1Export, err path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/bulkexports/v1/exports_configuration.go b/rest/bulkexports/v1/exports_configuration.go index 6c9468a05..025449b0a 100644 --- a/rest/bulkexports/v1/exports_configuration.go +++ b/rest/bulkexports/v1/exports_configuration.go @@ -27,7 +27,9 @@ func (c *ApiService) FetchExportConfiguration(ResourceType string) (*Bulkexports path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -73,7 +75,9 @@ func (c *ApiService) UpdateExportConfiguration(ResourceType string, params *Upda path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Enabled != nil { data.Set("Enabled", fmt.Sprint(*params.Enabled)) diff --git a/rest/bulkexports/v1/exports_days.go b/rest/bulkexports/v1/exports_days.go index 528c39540..749d10adf 100644 --- a/rest/bulkexports/v1/exports_days.go +++ b/rest/bulkexports/v1/exports_days.go @@ -30,7 +30,9 @@ func (c *ApiService) FetchDay(ResourceType string, Day string) (*BulkexportsV1Da path = strings.Replace(path, "{"+"Day"+"}", Day, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -71,7 +73,9 @@ func (c *ApiService) PageDay(ResourceType string, params *ListDayParams, pageTok path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/bulkexports/v1/exports_jobs.go b/rest/bulkexports/v1/exports_jobs.go index 9f940eaf6..aa69461a0 100644 --- a/rest/bulkexports/v1/exports_jobs.go +++ b/rest/bulkexports/v1/exports_jobs.go @@ -70,7 +70,9 @@ func (c *ApiService) CreateExportCustomJob(ResourceType string, params *CreateEx path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.StartDay != nil { data.Set("StartDay", *params.StartDay) @@ -112,7 +114,9 @@ func (c *ApiService) DeleteJob(JobSid string) error { path = strings.Replace(path, "{"+"JobSid"+"}", JobSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -130,7 +134,9 @@ func (c *ApiService) FetchJob(JobSid string) (*BulkexportsV1Job, error) { path = strings.Replace(path, "{"+"JobSid"+"}", JobSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -171,7 +177,9 @@ func (c *ApiService) PageExportCustomJob(ResourceType string, params *ListExport path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/chat/v1/credentials.go b/rest/chat/v1/credentials.go index 7d1ce09c1..5cbfca24c 100644 --- a/rest/chat/v1/credentials.go +++ b/rest/chat/v1/credentials.go @@ -75,7 +75,9 @@ func (c *ApiService) CreateCredential(params *CreateCredentialParams) (*ChatV1Cr path := "/v1/Credentials" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Type != nil { data.Set("Type", *params.Type) @@ -120,7 +122,9 @@ func (c *ApiService) DeleteCredential(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -138,7 +142,9 @@ func (c *ApiService) FetchCredential(Sid string) (*ChatV1Credential, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -177,7 +183,9 @@ func (c *ApiService) PageCredential(params *ListCredentialParams, pageToken, pag path := "/v1/Credentials" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -338,7 +346,9 @@ func (c *ApiService) UpdateCredential(Sid string, params *UpdateCredentialParams path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/chat/v1/services.go b/rest/chat/v1/services.go index d5b8abda9..4372706ce 100644 --- a/rest/chat/v1/services.go +++ b/rest/chat/v1/services.go @@ -39,7 +39,9 @@ func (c *ApiService) CreateService(params *CreateServiceParams) (*ChatV1Service, path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -66,7 +68,9 @@ func (c *ApiService) DeleteService(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -84,7 +88,9 @@ func (c *ApiService) FetchService(Sid string) (*ChatV1Service, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -123,7 +129,9 @@ func (c *ApiService) PageService(params *ListServiceParams, pageToken, pageNumbe path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -572,7 +580,9 @@ func (c *ApiService) UpdateService(Sid string, params *UpdateServiceParams) (*Ch path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/chat/v1/services_channels.go b/rest/chat/v1/services_channels.go index a4d54b7ea..f932d359c 100644 --- a/rest/chat/v1/services_channels.go +++ b/rest/chat/v1/services_channels.go @@ -58,7 +58,9 @@ func (c *ApiService) CreateChannel(ServiceSid string, params *CreateChannelParam path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -95,7 +97,9 @@ func (c *ApiService) DeleteChannel(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -114,7 +118,9 @@ func (c *ApiService) FetchChannel(ServiceSid string, Sid string) (*ChatV1Channel path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -161,7 +167,9 @@ func (c *ApiService) PageChannel(ServiceSid string, params *ListChannelParams, p path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Type != nil { for _, item := range *params.Type { @@ -310,7 +318,9 @@ func (c *ApiService) UpdateChannel(ServiceSid string, Sid string, params *Update path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/chat/v1/services_channels_invites.go b/rest/chat/v1/services_channels_invites.go index 9c7293663..3ae429f68 100644 --- a/rest/chat/v1/services_channels_invites.go +++ b/rest/chat/v1/services_channels_invites.go @@ -47,7 +47,9 @@ func (c *ApiService) CreateInvite(ServiceSid string, ChannelSid string, params * path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -79,7 +81,9 @@ func (c *ApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -99,7 +103,9 @@ func (c *ApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -147,7 +153,9 @@ func (c *ApiService) PageInvite(ServiceSid string, ChannelSid string, params *Li path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { for _, item := range *params.Identity { diff --git a/rest/chat/v1/services_channels_members.go b/rest/chat/v1/services_channels_members.go index 43c63e650..a5bbb0441 100644 --- a/rest/chat/v1/services_channels_members.go +++ b/rest/chat/v1/services_channels_members.go @@ -47,7 +47,9 @@ func (c *ApiService) CreateMember(ServiceSid string, ChannelSid string, params * path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -79,7 +81,9 @@ func (c *ApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -99,7 +103,9 @@ func (c *ApiService) FetchMember(ServiceSid string, ChannelSid string, Sid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -147,7 +153,9 @@ func (c *ApiService) PageMember(ServiceSid string, ChannelSid string, params *Li path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { for _, item := range *params.Identity { @@ -291,7 +299,9 @@ func (c *ApiService) UpdateMember(ServiceSid string, ChannelSid string, Sid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) diff --git a/rest/chat/v1/services_channels_messages.go b/rest/chat/v1/services_channels_messages.go index d66d42370..4b470ca0f 100644 --- a/rest/chat/v1/services_channels_messages.go +++ b/rest/chat/v1/services_channels_messages.go @@ -53,7 +53,9 @@ func (c *ApiService) CreateMessage(ServiceSid string, ChannelSid string, params path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Body != nil { data.Set("Body", *params.Body) @@ -88,7 +90,9 @@ func (c *ApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid str path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -108,7 +112,9 @@ func (c *ApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -156,7 +162,9 @@ func (c *ApiService) PageMessage(ServiceSid string, ChannelSid string, params *L path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Order != nil { data.Set("Order", *params.Order) @@ -298,7 +306,9 @@ func (c *ApiService) UpdateMessage(ServiceSid string, ChannelSid string, Sid str path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Body != nil { data.Set("Body", *params.Body) diff --git a/rest/chat/v1/services_roles.go b/rest/chat/v1/services_roles.go index f7474658b..9a2a8c3d7 100644 --- a/rest/chat/v1/services_roles.go +++ b/rest/chat/v1/services_roles.go @@ -52,7 +52,9 @@ func (c *ApiService) CreateRole(ServiceSid string, params *CreateRoleParams) (*C path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -88,7 +90,9 @@ func (c *ApiService) DeleteRole(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -107,7 +111,9 @@ func (c *ApiService) FetchRole(ServiceSid string, Sid string) (*ChatV1Role, erro path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -148,7 +154,9 @@ func (c *ApiService) PageRole(ServiceSid string, params *ListRoleParams, pageTok path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -280,7 +288,9 @@ func (c *ApiService) UpdateRole(ServiceSid string, Sid string, params *UpdateRol path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Permission != nil { for _, item := range *params.Permission { diff --git a/rest/chat/v1/services_users.go b/rest/chat/v1/services_users.go index 7a58491fd..6d21ffb4b 100644 --- a/rest/chat/v1/services_users.go +++ b/rest/chat/v1/services_users.go @@ -58,7 +58,9 @@ func (c *ApiService) CreateUser(ServiceSid string, params *CreateUserParams) (*C path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -95,7 +97,9 @@ func (c *ApiService) DeleteUser(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -114,7 +118,9 @@ func (c *ApiService) FetchUser(ServiceSid string, Sid string) (*ChatV1User, erro path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -155,7 +161,9 @@ func (c *ApiService) PageUser(ServiceSid string, params *ListUserParams, pageTok path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -299,7 +307,9 @@ func (c *ApiService) UpdateUser(ServiceSid string, Sid string, params *UpdateUse path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) diff --git a/rest/chat/v1/services_users_channels.go b/rest/chat/v1/services_users_channels.go index eb3c21f9a..eb1870a23 100644 --- a/rest/chat/v1/services_users_channels.go +++ b/rest/chat/v1/services_users_channels.go @@ -48,7 +48,9 @@ func (c *ApiService) PageUserChannel(ServiceSid string, UserSid string, params * path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/chat/v2/credentials.go b/rest/chat/v2/credentials.go index 376caa738..335eb47e3 100644 --- a/rest/chat/v2/credentials.go +++ b/rest/chat/v2/credentials.go @@ -75,7 +75,9 @@ func (c *ApiService) CreateCredential(params *CreateCredentialParams) (*ChatV2Cr path := "/v2/Credentials" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Type != nil { data.Set("Type", *params.Type) @@ -120,7 +122,9 @@ func (c *ApiService) DeleteCredential(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -138,7 +142,9 @@ func (c *ApiService) FetchCredential(Sid string) (*ChatV2Credential, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -177,7 +183,9 @@ func (c *ApiService) PageCredential(params *ListCredentialParams, pageToken, pag path := "/v2/Credentials" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -338,7 +346,9 @@ func (c *ApiService) UpdateCredential(Sid string, params *UpdateCredentialParams path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/chat/v2/services.go b/rest/chat/v2/services.go index 8a5a3e2a1..bbd3ad3c1 100644 --- a/rest/chat/v2/services.go +++ b/rest/chat/v2/services.go @@ -39,7 +39,9 @@ func (c *ApiService) CreateService(params *CreateServiceParams) (*ChatV2Service, path := "/v2/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -66,7 +68,9 @@ func (c *ApiService) DeleteService(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -84,7 +88,9 @@ func (c *ApiService) FetchService(Sid string) (*ChatV2Service, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -123,7 +129,9 @@ func (c *ApiService) PageService(params *ListServiceParams, pageToken, pageNumbe path := "/v2/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -434,7 +442,9 @@ func (c *ApiService) UpdateService(Sid string, params *UpdateServiceParams) (*Ch path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/chat/v2/services_bindings.go b/rest/chat/v2/services_bindings.go index 74d6d4a21..7e765e1f2 100644 --- a/rest/chat/v2/services_bindings.go +++ b/rest/chat/v2/services_bindings.go @@ -30,7 +30,9 @@ func (c *ApiService) DeleteBinding(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -49,7 +51,9 @@ func (c *ApiService) FetchBinding(ServiceSid string, Sid string) (*ChatV2Binding path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -102,7 +106,9 @@ func (c *ApiService) PageBinding(ServiceSid string, params *ListBindingParams, p path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.BindingType != nil { for _, item := range *params.BindingType { diff --git a/rest/chat/v2/services_channels.go b/rest/chat/v2/services_channels.go index 66ebff7d7..a94a06a35 100644 --- a/rest/chat/v2/services_channels.go +++ b/rest/chat/v2/services_channels.go @@ -83,7 +83,9 @@ func (c *ApiService) CreateChannel(ServiceSid string, params *CreateChannelParam path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -143,7 +145,9 @@ func (c *ApiService) DeleteChannel(ServiceSid string, Sid string, params *Delete path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled @@ -165,7 +169,9 @@ func (c *ApiService) FetchChannel(ServiceSid string, Sid string) (*ChatV2Channel path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -212,7 +218,9 @@ func (c *ApiService) PageChannel(ServiceSid string, params *ListChannelParams, p path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Type != nil { for _, item := range *params.Type { @@ -385,7 +393,9 @@ func (c *ApiService) UpdateChannel(ServiceSid string, Sid string, params *Update path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/chat/v2/services_channels_invites.go b/rest/chat/v2/services_channels_invites.go index 0b02c00d2..b34cc7a6a 100644 --- a/rest/chat/v2/services_channels_invites.go +++ b/rest/chat/v2/services_channels_invites.go @@ -47,7 +47,9 @@ func (c *ApiService) CreateInvite(ServiceSid string, ChannelSid string, params * path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -79,7 +81,9 @@ func (c *ApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -99,7 +103,9 @@ func (c *ApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -147,7 +153,9 @@ func (c *ApiService) PageInvite(ServiceSid string, ChannelSid string, params *Li path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { for _, item := range *params.Identity { diff --git a/rest/chat/v2/services_channels_members.go b/rest/chat/v2/services_channels_members.go index 015ed0684..dd59be5b0 100644 --- a/rest/chat/v2/services_channels_members.go +++ b/rest/chat/v2/services_channels_members.go @@ -84,7 +84,9 @@ func (c *ApiService) CreateMember(ServiceSid string, ChannelSid string, params * path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -145,7 +147,9 @@ func (c *ApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled @@ -168,7 +172,9 @@ func (c *ApiService) FetchMember(ServiceSid string, ChannelSid string, Sid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -216,7 +222,9 @@ func (c *ApiService) PageMember(ServiceSid string, ChannelSid string, params *Li path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { for _, item := range *params.Identity { @@ -390,7 +398,9 @@ func (c *ApiService) UpdateMember(ServiceSid string, ChannelSid string, Sid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) diff --git a/rest/chat/v2/services_channels_messages.go b/rest/chat/v2/services_channels_messages.go index 3cca69276..816e70bc6 100644 --- a/rest/chat/v2/services_channels_messages.go +++ b/rest/chat/v2/services_channels_messages.go @@ -84,7 +84,9 @@ func (c *ApiService) CreateMessage(ServiceSid string, ChannelSid string, params path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.From != nil { data.Set("From", *params.From) @@ -145,7 +147,9 @@ func (c *ApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid str path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled @@ -168,7 +172,9 @@ func (c *ApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -216,7 +222,9 @@ func (c *ApiService) PageMessage(ServiceSid string, ChannelSid string, params *L path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Order != nil { data.Set("Order", *params.Order) @@ -388,7 +396,9 @@ func (c *ApiService) UpdateMessage(ServiceSid string, ChannelSid string, Sid str path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Body != nil { data.Set("Body", *params.Body) diff --git a/rest/chat/v2/services_channels_webhooks.go b/rest/chat/v2/services_channels_webhooks.go index 6db76bd24..94725e8ca 100644 --- a/rest/chat/v2/services_channels_webhooks.go +++ b/rest/chat/v2/services_channels_webhooks.go @@ -77,7 +77,9 @@ func (c *ApiService) CreateChannelWebhook(ServiceSid string, ChannelSid string, path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Type != nil { data.Set("Type", *params.Type) @@ -128,7 +130,9 @@ func (c *ApiService) DeleteChannelWebhook(ServiceSid string, ChannelSid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -148,7 +152,9 @@ func (c *ApiService) FetchChannelWebhook(ServiceSid string, ChannelSid string, S path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -190,7 +196,9 @@ func (c *ApiService) PageChannelWebhook(ServiceSid string, ChannelSid string, pa path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -353,7 +361,9 @@ func (c *ApiService) UpdateChannelWebhook(ServiceSid string, ChannelSid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ConfigurationUrl != nil { data.Set("Configuration.Url", *params.ConfigurationUrl) diff --git a/rest/chat/v2/services_roles.go b/rest/chat/v2/services_roles.go index 36ea514eb..b2a3f6702 100644 --- a/rest/chat/v2/services_roles.go +++ b/rest/chat/v2/services_roles.go @@ -52,7 +52,9 @@ func (c *ApiService) CreateRole(ServiceSid string, params *CreateRoleParams) (*C path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -88,7 +90,9 @@ func (c *ApiService) DeleteRole(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -107,7 +111,9 @@ func (c *ApiService) FetchRole(ServiceSid string, Sid string) (*ChatV2Role, erro path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -148,7 +154,9 @@ func (c *ApiService) PageRole(ServiceSid string, params *ListRoleParams, pageTok path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -280,7 +288,9 @@ func (c *ApiService) UpdateRole(ServiceSid string, Sid string, params *UpdateRol path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Permission != nil { for _, item := range *params.Permission { diff --git a/rest/chat/v2/services_users.go b/rest/chat/v2/services_users.go index 8ed504420..0f388a6df 100644 --- a/rest/chat/v2/services_users.go +++ b/rest/chat/v2/services_users.go @@ -64,7 +64,9 @@ func (c *ApiService) CreateUser(ServiceSid string, params *CreateUserParams) (*C path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -104,7 +106,9 @@ func (c *ApiService) DeleteUser(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -123,7 +127,9 @@ func (c *ApiService) FetchUser(ServiceSid string, Sid string) (*ChatV2User, erro path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -164,7 +170,9 @@ func (c *ApiService) PageUser(ServiceSid string, params *ListUserParams, pageTok path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -314,7 +322,9 @@ func (c *ApiService) UpdateUser(ServiceSid string, Sid string, params *UpdateUse path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) diff --git a/rest/chat/v2/services_users_bindings.go b/rest/chat/v2/services_users_bindings.go index eec6334c4..46e61033c 100644 --- a/rest/chat/v2/services_users_bindings.go +++ b/rest/chat/v2/services_users_bindings.go @@ -31,7 +31,9 @@ func (c *ApiService) DeleteUserBinding(ServiceSid string, UserSid string, Sid st path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -51,7 +53,9 @@ func (c *ApiService) FetchUserBinding(ServiceSid string, UserSid string, Sid str path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -99,7 +103,9 @@ func (c *ApiService) PageUserBinding(ServiceSid string, UserSid string, params * path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.BindingType != nil { for _, item := range *params.BindingType { diff --git a/rest/chat/v2/services_users_channels.go b/rest/chat/v2/services_users_channels.go index 2545d1270..01cd283ae 100644 --- a/rest/chat/v2/services_users_channels.go +++ b/rest/chat/v2/services_users_channels.go @@ -43,7 +43,9 @@ func (c *ApiService) DeleteUserChannel(ServiceSid string, UserSid string, Channe path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled @@ -66,7 +68,9 @@ func (c *ApiService) FetchUserChannel(ServiceSid string, UserSid string, Channel path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -108,7 +112,9 @@ func (c *ApiService) PageUserChannel(ServiceSid string, UserSid string, params * path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -253,7 +259,9 @@ func (c *ApiService) UpdateUserChannel(ServiceSid string, UserSid string, Channe path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.NotificationLevel != nil { data.Set("NotificationLevel", *params.NotificationLevel) diff --git a/rest/chat/v3/services_channels.go b/rest/chat/v3/services_channels.go index f9c7a1dae..07fec3db3 100644 --- a/rest/chat/v3/services_channels.go +++ b/rest/chat/v3/services_channels.go @@ -50,7 +50,9 @@ func (c *ApiService) UpdateChannel(ServiceSid string, Sid string, params *Update path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Type != nil { data.Set("Type", *params.Type) diff --git a/rest/content/v1/content.go b/rest/content/v1/content.go index 67403f917..d18e68c64 100644 --- a/rest/content/v1/content.go +++ b/rest/content/v1/content.go @@ -73,7 +73,9 @@ func (c *ApiService) DeleteContent(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -91,7 +93,9 @@ func (c *ApiService) FetchContent(Sid string) (*ContentV1Content, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -130,7 +134,9 @@ func (c *ApiService) PageContent(params *ListContentParams, pageToken, pageNumbe path := "/v1/Content" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/content/v1/content_and_approvals.go b/rest/content/v1/content_and_approvals.go index 2c8ea60b8..f8964b451 100644 --- a/rest/content/v1/content_and_approvals.go +++ b/rest/content/v1/content_and_approvals.go @@ -44,7 +44,9 @@ func (c *ApiService) PageContentAndApprovals(params *ListContentAndApprovalsPara path := "/v1/ContentAndApprovals" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/content/v1/content_approval_requests.go b/rest/content/v1/content_approval_requests.go index 165858389..4118e09d0 100644 --- a/rest/content/v1/content_approval_requests.go +++ b/rest/content/v1/content_approval_requests.go @@ -26,7 +26,9 @@ func (c *ApiService) FetchApproval(ContentSid string) (*ContentV1ApprovalFetch, path = strings.Replace(path, "{"+"ContentSid"+"}", ContentSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/content/v1/legacy_content.go b/rest/content/v1/legacy_content.go index 3215b7e40..ef7c07af3 100644 --- a/rest/content/v1/legacy_content.go +++ b/rest/content/v1/legacy_content.go @@ -44,7 +44,9 @@ func (c *ApiService) PageLegacyContent(params *ListLegacyContentParams, pageToke path := "/v1/LegacyContent" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/content/v2/content.go b/rest/content/v2/content.go index 0fe4c5b9c..0b5b5448e 100644 --- a/rest/content/v2/content.go +++ b/rest/content/v2/content.go @@ -99,7 +99,9 @@ func (c *ApiService) PageContent(params *ListContentParams, pageToken, pageNumbe path := "/v2/Content" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/content/v2/content_and_approvals.go b/rest/content/v2/content_and_approvals.go index 88b942462..d296eca44 100644 --- a/rest/content/v2/content_and_approvals.go +++ b/rest/content/v2/content_and_approvals.go @@ -99,7 +99,9 @@ func (c *ApiService) PageContentAndApprovals(params *ListContentAndApprovalsPara path := "/v2/ContentAndApprovals" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/conversations/v1/configuration.go b/rest/conversations/v1/configuration.go index 04e02a8ac..253178681 100644 --- a/rest/conversations/v1/configuration.go +++ b/rest/conversations/v1/configuration.go @@ -24,7 +24,9 @@ func (c *ApiService) FetchConfiguration() (*ConversationsV1Configuration, error) path := "/v1/Configuration" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -75,7 +77,9 @@ func (c *ApiService) UpdateConfiguration(params *UpdateConfigurationParams) (*Co path := "/v1/Configuration" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.DefaultChatServiceSid != nil { data.Set("DefaultChatServiceSid", *params.DefaultChatServiceSid) diff --git a/rest/conversations/v1/configuration_addresses.go b/rest/conversations/v1/configuration_addresses.go index 79628a76e..caa7a8acc 100644 --- a/rest/conversations/v1/configuration_addresses.go +++ b/rest/conversations/v1/configuration_addresses.go @@ -105,7 +105,9 @@ func (c *ApiService) CreateConfigurationAddress(params *CreateConfigurationAddre path := "/v1/Configuration/Addresses" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Type != nil { data.Set("Type", *params.Type) @@ -167,7 +169,9 @@ func (c *ApiService) DeleteConfigurationAddress(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -185,7 +189,9 @@ func (c *ApiService) FetchConfigurationAddress(Sid string) (*ConversationsV1Conf path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -230,7 +236,9 @@ func (c *ApiService) PageConfigurationAddress(params *ListConfigurationAddressPa path := "/v1/Configuration/Addresses" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Type != nil { data.Set("Type", *params.Type) @@ -412,7 +420,9 @@ func (c *ApiService) UpdateConfigurationAddress(Sid string, params *UpdateConfig path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/conversations/v1/configuration_webhooks.go b/rest/conversations/v1/configuration_webhooks.go index bece581d0..aad9f2c22 100644 --- a/rest/conversations/v1/configuration_webhooks.go +++ b/rest/conversations/v1/configuration_webhooks.go @@ -24,7 +24,9 @@ func (c *ApiService) FetchConfigurationWebhook() (*ConversationsV1ConfigurationW path := "/v1/Configuration/Webhooks" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -81,7 +83,9 @@ func (c *ApiService) UpdateConfigurationWebhook(params *UpdateConfigurationWebho path := "/v1/Configuration/Webhooks" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Method != nil { data.Set("Method", *params.Method) diff --git a/rest/conversations/v1/conversations.go b/rest/conversations/v1/conversations.go index b2cff1778..a205a335c 100644 --- a/rest/conversations/v1/conversations.go +++ b/rest/conversations/v1/conversations.go @@ -106,7 +106,9 @@ func (c *ApiService) CreateConversation(params *CreateConversationParams) (*Conv path := "/v1/Conversations" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -177,7 +179,9 @@ func (c *ApiService) DeleteConversation(Sid string, params *DeleteConversationPa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled @@ -198,7 +202,9 @@ func (c *ApiService) FetchConversation(Sid string) (*ConversationsV1Conversation path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -255,7 +261,9 @@ func (c *ApiService) PageConversation(params *ListConversationParams, pageToken, path := "/v1/Conversations" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.StartDate != nil { data.Set("StartDate", *params.StartDate) @@ -461,7 +469,9 @@ func (c *ApiService) UpdateConversation(Sid string, params *UpdateConversationPa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/conversations/v1/conversations_messages.go b/rest/conversations/v1/conversations_messages.go index 7d88ca0a3..385744b8d 100644 --- a/rest/conversations/v1/conversations_messages.go +++ b/rest/conversations/v1/conversations_messages.go @@ -95,7 +95,9 @@ func (c *ApiService) CreateConversationMessage(ConversationSid string, params *C path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Author != nil { data.Set("Author", *params.Author) @@ -161,7 +163,9 @@ func (c *ApiService) DeleteConversationMessage(ConversationSid string, Sid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled @@ -183,7 +187,9 @@ func (c *ApiService) FetchConversationMessage(ConversationSid string, Sid string path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -230,7 +236,9 @@ func (c *ApiService) PageConversationMessage(ConversationSid string, params *Lis path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Order != nil { data.Set("Order", *params.Order) @@ -401,7 +409,9 @@ func (c *ApiService) UpdateConversationMessage(ConversationSid string, Sid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Author != nil { data.Set("Author", *params.Author) diff --git a/rest/conversations/v1/conversations_messages_receipts.go b/rest/conversations/v1/conversations_messages_receipts.go index 25cb7fd58..cdfb3ce84 100644 --- a/rest/conversations/v1/conversations_messages_receipts.go +++ b/rest/conversations/v1/conversations_messages_receipts.go @@ -31,7 +31,9 @@ func (c *ApiService) FetchConversationMessageReceipt(ConversationSid string, Mes path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -73,7 +75,9 @@ func (c *ApiService) PageConversationMessageReceipt(ConversationSid string, Mess path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/conversations/v1/conversations_participants.go b/rest/conversations/v1/conversations_participants.go index bd3ebb455..00c16e202 100644 --- a/rest/conversations/v1/conversations_participants.go +++ b/rest/conversations/v1/conversations_participants.go @@ -89,7 +89,9 @@ func (c *ApiService) CreateConversationParticipant(ConversationSid string, param path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -152,7 +154,9 @@ func (c *ApiService) DeleteConversationParticipant(ConversationSid string, Sid s path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled @@ -174,7 +178,9 @@ func (c *ApiService) FetchConversationParticipant(ConversationSid string, Sid st path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -215,7 +221,9 @@ func (c *ApiService) PageConversationParticipant(ConversationSid string, params path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -401,7 +409,9 @@ func (c *ApiService) UpdateConversationParticipant(ConversationSid string, Sid s path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.DateCreated != nil { data.Set("DateCreated", fmt.Sprint((*params.DateCreated).Format(time.RFC3339))) diff --git a/rest/conversations/v1/conversations_webhooks.go b/rest/conversations/v1/conversations_webhooks.go index bb6609d3d..0185056a3 100644 --- a/rest/conversations/v1/conversations_webhooks.go +++ b/rest/conversations/v1/conversations_webhooks.go @@ -76,7 +76,9 @@ func (c *ApiService) CreateConversationScopedWebhook(ConversationSid string, par path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Target != nil { data.Set("Target", *params.Target) @@ -126,7 +128,9 @@ func (c *ApiService) DeleteConversationScopedWebhook(ConversationSid string, Sid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -145,7 +149,9 @@ func (c *ApiService) FetchConversationScopedWebhook(ConversationSid string, Sid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -186,7 +192,9 @@ func (c *ApiService) PageConversationScopedWebhook(ConversationSid string, param path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -342,7 +350,9 @@ func (c *ApiService) UpdateConversationScopedWebhook(ConversationSid string, Sid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ConfigurationUrl != nil { data.Set("Configuration.Url", *params.ConfigurationUrl) diff --git a/rest/conversations/v1/credentials.go b/rest/conversations/v1/credentials.go index be3d3d586..799959992 100644 --- a/rest/conversations/v1/credentials.go +++ b/rest/conversations/v1/credentials.go @@ -75,7 +75,9 @@ func (c *ApiService) CreateCredential(params *CreateCredentialParams) (*Conversa path := "/v1/Credentials" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Type != nil { data.Set("Type", *params.Type) @@ -120,7 +122,9 @@ func (c *ApiService) DeleteCredential(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -138,7 +142,9 @@ func (c *ApiService) FetchCredential(Sid string) (*ConversationsV1Credential, er path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -177,7 +183,9 @@ func (c *ApiService) PageCredential(params *ListCredentialParams, pageToken, pag path := "/v1/Credentials" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -344,7 +352,9 @@ func (c *ApiService) UpdateCredential(Sid string, params *UpdateCredentialParams path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Type != nil { data.Set("Type", *params.Type) diff --git a/rest/conversations/v1/participant_conversations.go b/rest/conversations/v1/participant_conversations.go index 955743211..94d13f559 100644 --- a/rest/conversations/v1/participant_conversations.go +++ b/rest/conversations/v1/participant_conversations.go @@ -56,7 +56,9 @@ func (c *ApiService) PageParticipantConversation(params *ListParticipantConversa path := "/v1/ParticipantConversations" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) diff --git a/rest/conversations/v1/roles.go b/rest/conversations/v1/roles.go index cfe820454..5a56ec143 100644 --- a/rest/conversations/v1/roles.go +++ b/rest/conversations/v1/roles.go @@ -51,7 +51,9 @@ func (c *ApiService) CreateRole(params *CreateRoleParams) (*ConversationsV1Role, path := "/v1/Roles" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -86,7 +88,9 @@ func (c *ApiService) DeleteRole(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -104,7 +108,9 @@ func (c *ApiService) FetchRole(Sid string) (*ConversationsV1Role, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -143,7 +149,9 @@ func (c *ApiService) PageRole(params *ListRoleParams, pageToken, pageNumber stri path := "/v1/Roles" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -274,7 +282,9 @@ func (c *ApiService) UpdateRole(Sid string, params *UpdateRoleParams) (*Conversa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Permission != nil { for _, item := range *params.Permission { diff --git a/rest/conversations/v1/services.go b/rest/conversations/v1/services.go index 495afe477..dad8368bf 100644 --- a/rest/conversations/v1/services.go +++ b/rest/conversations/v1/services.go @@ -39,7 +39,9 @@ func (c *ApiService) CreateService(params *CreateServiceParams) (*ConversationsV path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -66,7 +68,9 @@ func (c *ApiService) DeleteService(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -84,7 +88,9 @@ func (c *ApiService) FetchService(Sid string) (*ConversationsV1Service, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -123,7 +129,9 @@ func (c *ApiService) PageService(params *ListServiceParams, pageToken, pageNumbe path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/conversations/v1/services_bindings.go b/rest/conversations/v1/services_bindings.go index 00708fbc6..5b87f3f8e 100644 --- a/rest/conversations/v1/services_bindings.go +++ b/rest/conversations/v1/services_bindings.go @@ -30,7 +30,9 @@ func (c *ApiService) DeleteServiceBinding(ChatServiceSid string, Sid string) err path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -49,7 +51,9 @@ func (c *ApiService) FetchServiceBinding(ChatServiceSid string, Sid string) (*Co path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -102,7 +106,9 @@ func (c *ApiService) PageServiceBinding(ChatServiceSid string, params *ListServi path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.BindingType != nil { for _, item := range *params.BindingType { diff --git a/rest/conversations/v1/services_configuration.go b/rest/conversations/v1/services_configuration.go index 6c5579d0b..13a22e06e 100644 --- a/rest/conversations/v1/services_configuration.go +++ b/rest/conversations/v1/services_configuration.go @@ -27,7 +27,9 @@ func (c *ApiService) FetchServiceConfiguration(ChatServiceSid string) (*Conversa path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -79,7 +81,9 @@ func (c *ApiService) UpdateServiceConfiguration(ChatServiceSid string, params *U path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.DefaultConversationCreatorRoleSid != nil { data.Set("DefaultConversationCreatorRoleSid", *params.DefaultConversationCreatorRoleSid) diff --git a/rest/conversations/v1/services_configuration_notifications.go b/rest/conversations/v1/services_configuration_notifications.go index 18218bdeb..1c077ce3c 100644 --- a/rest/conversations/v1/services_configuration_notifications.go +++ b/rest/conversations/v1/services_configuration_notifications.go @@ -27,7 +27,9 @@ func (c *ApiService) FetchServiceNotification(ChatServiceSid string) (*Conversat path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -133,7 +135,9 @@ func (c *ApiService) UpdateServiceNotification(ChatServiceSid string, params *Up path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.LogEnabled != nil { data.Set("LogEnabled", fmt.Sprint(*params.LogEnabled)) diff --git a/rest/conversations/v1/services_configuration_webhooks.go b/rest/conversations/v1/services_configuration_webhooks.go index 8f2504f3a..56d1434ac 100644 --- a/rest/conversations/v1/services_configuration_webhooks.go +++ b/rest/conversations/v1/services_configuration_webhooks.go @@ -26,7 +26,9 @@ func (c *ApiService) FetchServiceWebhookConfiguration(ChatServiceSid string) (*C path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -78,7 +80,9 @@ func (c *ApiService) UpdateServiceWebhookConfiguration(ChatServiceSid string, pa path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PreWebhookUrl != nil { data.Set("PreWebhookUrl", *params.PreWebhookUrl) diff --git a/rest/conversations/v1/services_conversations.go b/rest/conversations/v1/services_conversations.go index 09b03cd37..ae88ebb4f 100644 --- a/rest/conversations/v1/services_conversations.go +++ b/rest/conversations/v1/services_conversations.go @@ -107,7 +107,9 @@ func (c *ApiService) CreateServiceConversation(ChatServiceSid string, params *Cr path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -179,7 +181,9 @@ func (c *ApiService) DeleteServiceConversation(ChatServiceSid string, Sid string path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled @@ -201,7 +205,9 @@ func (c *ApiService) FetchServiceConversation(ChatServiceSid string, Sid string) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -260,7 +266,9 @@ func (c *ApiService) PageServiceConversation(ChatServiceSid string, params *List path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.StartDate != nil { data.Set("StartDate", *params.StartDate) @@ -467,7 +475,9 @@ func (c *ApiService) UpdateServiceConversation(ChatServiceSid string, Sid string path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/conversations/v1/services_conversations_messages.go b/rest/conversations/v1/services_conversations_messages.go index e1489a7f5..69b7dc55b 100644 --- a/rest/conversations/v1/services_conversations_messages.go +++ b/rest/conversations/v1/services_conversations_messages.go @@ -96,7 +96,9 @@ func (c *ApiService) CreateServiceConversationMessage(ChatServiceSid string, Con path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Author != nil { data.Set("Author", *params.Author) @@ -163,7 +165,9 @@ func (c *ApiService) DeleteServiceConversationMessage(ChatServiceSid string, Con path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled @@ -186,7 +190,9 @@ func (c *ApiService) FetchServiceConversationMessage(ChatServiceSid string, Conv path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -234,7 +240,9 @@ func (c *ApiService) PageServiceConversationMessage(ChatServiceSid string, Conve path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Order != nil { data.Set("Order", *params.Order) @@ -406,7 +414,9 @@ func (c *ApiService) UpdateServiceConversationMessage(ChatServiceSid string, Con path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Author != nil { data.Set("Author", *params.Author) diff --git a/rest/conversations/v1/services_conversations_messages_receipts.go b/rest/conversations/v1/services_conversations_messages_receipts.go index a722e39c2..0b113f2e2 100644 --- a/rest/conversations/v1/services_conversations_messages_receipts.go +++ b/rest/conversations/v1/services_conversations_messages_receipts.go @@ -32,7 +32,9 @@ func (c *ApiService) FetchServiceConversationMessageReceipt(ChatServiceSid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -75,7 +77,9 @@ func (c *ApiService) PageServiceConversationMessageReceipt(ChatServiceSid string path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/conversations/v1/services_conversations_participants.go b/rest/conversations/v1/services_conversations_participants.go index 4357eb6bc..30bb1b7b5 100644 --- a/rest/conversations/v1/services_conversations_participants.go +++ b/rest/conversations/v1/services_conversations_participants.go @@ -90,7 +90,9 @@ func (c *ApiService) CreateServiceConversationParticipant(ChatServiceSid string, path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -154,7 +156,9 @@ func (c *ApiService) DeleteServiceConversationParticipant(ChatServiceSid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled @@ -177,7 +181,9 @@ func (c *ApiService) FetchServiceConversationParticipant(ChatServiceSid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -219,7 +225,9 @@ func (c *ApiService) PageServiceConversationParticipant(ChatServiceSid string, C path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -406,7 +414,9 @@ func (c *ApiService) UpdateServiceConversationParticipant(ChatServiceSid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.DateCreated != nil { data.Set("DateCreated", fmt.Sprint((*params.DateCreated).Format(time.RFC3339))) diff --git a/rest/conversations/v1/services_conversations_webhooks.go b/rest/conversations/v1/services_conversations_webhooks.go index 6bdc940ce..6d3c249c5 100644 --- a/rest/conversations/v1/services_conversations_webhooks.go +++ b/rest/conversations/v1/services_conversations_webhooks.go @@ -77,7 +77,9 @@ func (c *ApiService) CreateServiceConversationScopedWebhook(ChatServiceSid strin path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Target != nil { data.Set("Target", *params.Target) @@ -128,7 +130,9 @@ func (c *ApiService) DeleteServiceConversationScopedWebhook(ChatServiceSid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -148,7 +152,9 @@ func (c *ApiService) FetchServiceConversationScopedWebhook(ChatServiceSid string path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -190,7 +196,9 @@ func (c *ApiService) PageServiceConversationScopedWebhook(ChatServiceSid string, path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -347,7 +355,9 @@ func (c *ApiService) UpdateServiceConversationScopedWebhook(ChatServiceSid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ConfigurationUrl != nil { data.Set("Configuration.Url", *params.ConfigurationUrl) diff --git a/rest/conversations/v1/services_participant_conversations.go b/rest/conversations/v1/services_participant_conversations.go index 745cea43f..3801747ce 100644 --- a/rest/conversations/v1/services_participant_conversations.go +++ b/rest/conversations/v1/services_participant_conversations.go @@ -59,7 +59,9 @@ func (c *ApiService) PageServiceParticipantConversation(ChatServiceSid string, p path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) diff --git a/rest/conversations/v1/services_roles.go b/rest/conversations/v1/services_roles.go index 9e97aa28d..17868c6db 100644 --- a/rest/conversations/v1/services_roles.go +++ b/rest/conversations/v1/services_roles.go @@ -52,7 +52,9 @@ func (c *ApiService) CreateServiceRole(ChatServiceSid string, params *CreateServ path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -88,7 +90,9 @@ func (c *ApiService) DeleteServiceRole(ChatServiceSid string, Sid string) error path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -107,7 +111,9 @@ func (c *ApiService) FetchServiceRole(ChatServiceSid string, Sid string) (*Conve path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -148,7 +154,9 @@ func (c *ApiService) PageServiceRole(ChatServiceSid string, params *ListServiceR path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -280,7 +288,9 @@ func (c *ApiService) UpdateServiceRole(ChatServiceSid string, Sid string, params path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Permission != nil { for _, item := range *params.Permission { diff --git a/rest/conversations/v1/services_users.go b/rest/conversations/v1/services_users.go index 40e29b09d..f69423acb 100644 --- a/rest/conversations/v1/services_users.go +++ b/rest/conversations/v1/services_users.go @@ -64,7 +64,9 @@ func (c *ApiService) CreateServiceUser(ChatServiceSid string, params *CreateServ path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -115,7 +117,9 @@ func (c *ApiService) DeleteServiceUser(ChatServiceSid string, Sid string, params path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled @@ -137,7 +141,9 @@ func (c *ApiService) FetchServiceUser(ChatServiceSid string, Sid string) (*Conve path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -178,7 +184,9 @@ func (c *ApiService) PageServiceUser(ChatServiceSid string, params *ListServiceU path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -328,7 +336,9 @@ func (c *ApiService) UpdateServiceUser(ChatServiceSid string, Sid string, params path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/conversations/v1/services_users_conversations.go b/rest/conversations/v1/services_users_conversations.go index 9db74c531..af17704f9 100644 --- a/rest/conversations/v1/services_users_conversations.go +++ b/rest/conversations/v1/services_users_conversations.go @@ -32,7 +32,9 @@ func (c *ApiService) DeleteServiceUserConversation(ChatServiceSid string, UserSi path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -52,7 +54,9 @@ func (c *ApiService) FetchServiceUserConversation(ChatServiceSid string, UserSid path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -94,7 +98,9 @@ func (c *ApiService) PageServiceUserConversation(ChatServiceSid string, UserSid path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -239,7 +245,9 @@ func (c *ApiService) UpdateServiceUserConversation(ChatServiceSid string, UserSi path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.NotificationLevel != nil { data.Set("NotificationLevel", *params.NotificationLevel) diff --git a/rest/conversations/v1/users.go b/rest/conversations/v1/users.go index a02e51542..17a20e1aa 100644 --- a/rest/conversations/v1/users.go +++ b/rest/conversations/v1/users.go @@ -63,7 +63,9 @@ func (c *ApiService) CreateUser(params *CreateUserParams) (*ConversationsV1User, path := "/v1/Users" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -113,7 +115,9 @@ func (c *ApiService) DeleteUser(Sid string, params *DeleteUserParams) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled @@ -134,7 +138,9 @@ func (c *ApiService) FetchUser(Sid string) (*ConversationsV1User, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -173,7 +179,9 @@ func (c *ApiService) PageUser(params *ListUserParams, pageToken, pageNumber stri path := "/v1/Users" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -322,7 +330,9 @@ func (c *ApiService) UpdateUser(Sid string, params *UpdateUserParams) (*Conversa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/conversations/v1/users_conversations.go b/rest/conversations/v1/users_conversations.go index 9e31f8968..bdc334984 100644 --- a/rest/conversations/v1/users_conversations.go +++ b/rest/conversations/v1/users_conversations.go @@ -31,7 +31,9 @@ func (c *ApiService) DeleteUserConversation(UserSid string, ConversationSid stri path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -50,7 +52,9 @@ func (c *ApiService) FetchUserConversation(UserSid string, ConversationSid strin path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -91,7 +95,9 @@ func (c *ApiService) PageUserConversation(UserSid string, params *ListUserConver path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -235,7 +241,9 @@ func (c *ApiService) UpdateUserConversation(UserSid string, ConversationSid stri path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.NotificationLevel != nil { data.Set("NotificationLevel", *params.NotificationLevel) diff --git a/rest/events/v1/docs/EventsV1EventType.md b/rest/events/v1/docs/EventsV1EventType.md index 3287b3801..3edb4a41d 100644 --- a/rest/events/v1/docs/EventsV1EventType.md +++ b/rest/events/v1/docs/EventsV1EventType.md @@ -9,6 +9,8 @@ Name | Type | Description | Notes **DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date that this Event Type was created, given in ISO 8601 format. | **DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date that this Event Type was updated, given in ISO 8601 format. | **Description** | Pointer to **string** | A human readable description for this Event Type. | +**Status** | Pointer to **string** | A string that describes how this Event Type can be used. For example: `available`, `deprecated`, `restricted`, `discontinued`. When the status is `available`, the Event Type can be used normally. | +**DocumentationUrl** | Pointer to **string** | The URL to the documentation or to the most relevant Twilio Changelog entry of this Event Type. | **Url** | Pointer to **string** | The URL of this resource. | **Links** | Pointer to **map[string]interface{}** | | diff --git a/rest/events/v1/model_events_v1_event_type.go b/rest/events/v1/model_events_v1_event_type.go index 6e49a7392..979ca7e6a 100644 --- a/rest/events/v1/model_events_v1_event_type.go +++ b/rest/events/v1/model_events_v1_event_type.go @@ -30,6 +30,10 @@ type EventsV1EventType struct { DateUpdated *time.Time `json:"date_updated,omitempty"` // A human readable description for this Event Type. Description *string `json:"description,omitempty"` + // A string that describes how this Event Type can be used. For example: `available`, `deprecated`, `restricted`, `discontinued`. When the status is `available`, the Event Type can be used normally. + Status *string `json:"status,omitempty"` + // The URL to the documentation or to the most relevant Twilio Changelog entry of this Event Type. + DocumentationUrl *string `json:"documentation_url,omitempty"` // The URL of this resource. Url *string `json:"url,omitempty"` Links *map[string]interface{} `json:"links,omitempty"` diff --git a/rest/events/v1/schemas.go b/rest/events/v1/schemas.go index f17c80ec5..eb09a74f3 100644 --- a/rest/events/v1/schemas.go +++ b/rest/events/v1/schemas.go @@ -26,7 +26,9 @@ func (c *ApiService) FetchSchema(Id string) (*EventsV1Schema, error) { path = strings.Replace(path, "{"+"Id"+"}", Id, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/events/v1/schemas_versions.go b/rest/events/v1/schemas_versions.go index 84aaa0292..7ecdb4709 100644 --- a/rest/events/v1/schemas_versions.go +++ b/rest/events/v1/schemas_versions.go @@ -30,7 +30,9 @@ func (c *ApiService) FetchSchemaVersion(Id string, SchemaVersion int) (*EventsV1 path = strings.Replace(path, "{"+"SchemaVersion"+"}", fmt.Sprint(SchemaVersion), -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -71,7 +73,9 @@ func (c *ApiService) PageSchemaVersion(Id string, params *ListSchemaVersionParam path = strings.Replace(path, "{"+"Id"+"}", Id, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/events/v1/sinks.go b/rest/events/v1/sinks.go index d8be25b86..2c69c0f7d 100644 --- a/rest/events/v1/sinks.go +++ b/rest/events/v1/sinks.go @@ -51,7 +51,9 @@ func (c *ApiService) CreateSink(params *CreateSinkParams) (*EventsV1Sink, error) path := "/v1/Sinks" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Description != nil { data.Set("Description", *params.Description) @@ -90,7 +92,9 @@ func (c *ApiService) DeleteSink(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -108,7 +112,9 @@ func (c *ApiService) FetchSink(Sid string) (*EventsV1Sink, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -159,7 +165,9 @@ func (c *ApiService) PageSink(params *ListSinkParams, pageToken, pageNumber stri path := "/v1/Sinks" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.InUse != nil { data.Set("InUse", fmt.Sprint(*params.InUse)) @@ -296,7 +304,9 @@ func (c *ApiService) UpdateSink(Sid string, params *UpdateSinkParams) (*EventsV1 path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Description != nil { data.Set("Description", *params.Description) diff --git a/rest/events/v1/sinks_test_.go b/rest/events/v1/sinks_test_.go index 4fb88f431..3d38524c2 100644 --- a/rest/events/v1/sinks_test_.go +++ b/rest/events/v1/sinks_test_.go @@ -26,7 +26,9 @@ func (c *ApiService) CreateSinkTest(Sid string) (*EventsV1SinkTest, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/events/v1/sinks_validate.go b/rest/events/v1/sinks_validate.go index 691d80272..0c89c8db1 100644 --- a/rest/events/v1/sinks_validate.go +++ b/rest/events/v1/sinks_validate.go @@ -37,7 +37,9 @@ func (c *ApiService) CreateSinkValidate(Sid string, params *CreateSinkValidatePa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.TestId != nil { data.Set("TestId", *params.TestId) diff --git a/rest/events/v1/subscriptions.go b/rest/events/v1/subscriptions.go index d7dcbb567..0cfa463cd 100644 --- a/rest/events/v1/subscriptions.go +++ b/rest/events/v1/subscriptions.go @@ -51,7 +51,9 @@ func (c *ApiService) CreateSubscription(params *CreateSubscriptionParams) (*Even path := "/v1/Subscriptions" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Description != nil { data.Set("Description", *params.Description) @@ -92,7 +94,9 @@ func (c *ApiService) DeleteSubscription(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -110,7 +114,9 @@ func (c *ApiService) FetchSubscription(Sid string) (*EventsV1Subscription, error path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -155,7 +161,9 @@ func (c *ApiService) PageSubscription(params *ListSubscriptionParams, pageToken, path := "/v1/Subscriptions" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.SinkSid != nil { data.Set("SinkSid", *params.SinkSid) @@ -295,7 +303,9 @@ func (c *ApiService) UpdateSubscription(Sid string, params *UpdateSubscriptionPa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Description != nil { data.Set("Description", *params.Description) diff --git a/rest/events/v1/subscriptions_subscribed_events.go b/rest/events/v1/subscriptions_subscribed_events.go index 3e9f72655..e561cef6d 100644 --- a/rest/events/v1/subscriptions_subscribed_events.go +++ b/rest/events/v1/subscriptions_subscribed_events.go @@ -46,7 +46,9 @@ func (c *ApiService) CreateSubscribedEvent(SubscriptionSid string, params *Creat path = strings.Replace(path, "{"+"SubscriptionSid"+"}", SubscriptionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Type != nil { data.Set("Type", *params.Type) @@ -77,7 +79,9 @@ func (c *ApiService) DeleteSubscribedEvent(SubscriptionSid string, Type string) path = strings.Replace(path, "{"+"Type"+"}", Type, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -96,7 +100,9 @@ func (c *ApiService) FetchSubscribedEvent(SubscriptionSid string, Type string) ( path = strings.Replace(path, "{"+"Type"+"}", Type, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -137,7 +143,9 @@ func (c *ApiService) PageSubscribedEvent(SubscriptionSid string, params *ListSub path = strings.Replace(path, "{"+"SubscriptionSid"+"}", SubscriptionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -269,7 +277,9 @@ func (c *ApiService) UpdateSubscribedEvent(SubscriptionSid string, Type string, path = strings.Replace(path, "{"+"Type"+"}", Type, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.SchemaVersion != nil { data.Set("SchemaVersion", fmt.Sprint(*params.SchemaVersion)) diff --git a/rest/events/v1/types.go b/rest/events/v1/types.go index a0423bc62..ee0ea459f 100644 --- a/rest/events/v1/types.go +++ b/rest/events/v1/types.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchEventType(Type string) (*EventsV1EventType, error) { path = strings.Replace(path, "{"+"Type"+"}", Type, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -74,7 +76,9 @@ func (c *ApiService) PageEventType(params *ListEventTypeParams, pageToken, pageN path := "/v1/Types" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.SchemaId != nil { data.Set("SchemaId", *params.SchemaId) diff --git a/rest/flex/v1/account_provision_status.go b/rest/flex/v1/account_provision_status.go index f24e5a0e4..d3ec218bb 100644 --- a/rest/flex/v1/account_provision_status.go +++ b/rest/flex/v1/account_provision_status.go @@ -24,7 +24,9 @@ func (c *ApiService) FetchProvisioningStatus() (*FlexV1ProvisioningStatus, error path := "/v1/account/provision/status" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/flex/v1/channels.go b/rest/flex/v1/channels.go index ddf91c9f7..4e674c50e 100644 --- a/rest/flex/v1/channels.go +++ b/rest/flex/v1/channels.go @@ -93,7 +93,9 @@ func (c *ApiService) CreateChannel(params *CreateChannelParams) (*FlexV1Channel, path := "/v1/Channels" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FlexFlowSid != nil { data.Set("FlexFlowSid", *params.FlexFlowSid) @@ -147,7 +149,9 @@ func (c *ApiService) DeleteChannel(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -165,7 +169,9 @@ func (c *ApiService) FetchChannel(Sid string) (*FlexV1Channel, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -204,7 +210,9 @@ func (c *ApiService) PageChannel(params *ListChannelParams, pageToken, pageNumbe path := "/v1/Channels" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/flex/v1/configuration.go b/rest/flex/v1/configuration.go index 85ac96986..6e3b8a775 100644 --- a/rest/flex/v1/configuration.go +++ b/rest/flex/v1/configuration.go @@ -35,7 +35,9 @@ func (c *ApiService) FetchConfiguration(params *FetchConfigurationParams) (*Flex path := "/v1/Configuration" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UiVersion != nil { data.Set("UiVersion", *params.UiVersion) diff --git a/rest/flex/v1/flex_flows.go b/rest/flex/v1/flex_flows.go index 705066713..51578b437 100644 --- a/rest/flex/v1/flex_flows.go +++ b/rest/flex/v1/flex_flows.go @@ -135,7 +135,9 @@ func (c *ApiService) CreateFlexFlow(params *CreateFlexFlowParams) (*FlexV1FlexFl path := "/v1/FlexFlows" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -210,7 +212,9 @@ func (c *ApiService) DeleteFlexFlow(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -228,7 +232,9 @@ func (c *ApiService) FetchFlexFlow(Sid string) (*FlexV1FlexFlow, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -273,7 +279,9 @@ func (c *ApiService) PageFlexFlow(params *ListFlexFlowParams, pageToken, pageNum path := "/v1/FlexFlows" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -503,7 +511,9 @@ func (c *ApiService) UpdateFlexFlow(Sid string, params *UpdateFlexFlowParams) (* path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/flex/v1/insights_conversations.go b/rest/flex/v1/insights_conversations.go index e11742e53..878b6c000 100644 --- a/rest/flex/v1/insights_conversations.go +++ b/rest/flex/v1/insights_conversations.go @@ -56,7 +56,9 @@ func (c *ApiService) PageInsightsConversations(params *ListInsightsConversations path := "/v1/Insights/Conversations" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.SegmentId != nil { data.Set("SegmentId", *params.SegmentId) diff --git a/rest/flex/v1/insights_quality_management_assessments.go b/rest/flex/v1/insights_quality_management_assessments.go index 4ccb6e843..75d313c50 100644 --- a/rest/flex/v1/insights_quality_management_assessments.go +++ b/rest/flex/v1/insights_quality_management_assessments.go @@ -99,7 +99,9 @@ func (c *ApiService) CreateInsightsAssessments(params *CreateInsightsAssessments path := "/v1/Insights/QualityManagement/Assessments" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.CategorySid != nil { data.Set("CategorySid", *params.CategorySid) @@ -184,7 +186,9 @@ func (c *ApiService) PageInsightsAssessments(params *ListInsightsAssessmentsPara path := "/v1/Insights/QualityManagement/Assessments" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.SegmentId != nil { data.Set("SegmentId", *params.SegmentId) @@ -336,7 +340,9 @@ func (c *ApiService) UpdateInsightsAssessments(AssessmentSid string, params *Upd path = strings.Replace(path, "{"+"AssessmentSid"+"}", AssessmentSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Offset != nil { data.Set("Offset", fmt.Sprint(*params.Offset)) diff --git a/rest/flex/v1/insights_quality_management_assessments_comments.go b/rest/flex/v1/insights_quality_management_assessments_comments.go index cd454e340..1c67c672f 100644 --- a/rest/flex/v1/insights_quality_management_assessments_comments.go +++ b/rest/flex/v1/insights_quality_management_assessments_comments.go @@ -74,7 +74,9 @@ func (c *ApiService) CreateInsightsAssessmentsComment(params *CreateInsightsAsse path := "/v1/Insights/QualityManagement/Assessments/Comments" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.CategoryId != nil { data.Set("CategoryId", *params.CategoryId) @@ -153,7 +155,9 @@ func (c *ApiService) PageInsightsAssessmentsComment(params *ListInsightsAssessme path := "/v1/Insights/QualityManagement/Assessments/Comments" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.SegmentId != nil { data.Set("SegmentId", *params.SegmentId) diff --git a/rest/flex/v1/insights_quality_management_categories.go b/rest/flex/v1/insights_quality_management_categories.go index 8e1d5d795..087b1cfff 100644 --- a/rest/flex/v1/insights_quality_management_categories.go +++ b/rest/flex/v1/insights_quality_management_categories.go @@ -45,7 +45,9 @@ func (c *ApiService) CreateInsightsQuestionnairesCategory(params *CreateInsights path := "/v1/Insights/QualityManagement/Categories" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Name != nil { data.Set("Name", *params.Name) @@ -86,7 +88,9 @@ func (c *ApiService) DeleteInsightsQuestionnairesCategory(CategorySid string, pa path = strings.Replace(path, "{"+"CategorySid"+"}", CategorySid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Authorization != nil { headers["Authorization"] = *params.Authorization @@ -129,7 +133,9 @@ func (c *ApiService) PageInsightsQuestionnairesCategory(params *ListInsightsQues path := "/v1/Insights/QualityManagement/Categories" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -266,7 +272,9 @@ func (c *ApiService) UpdateInsightsQuestionnairesCategory(CategorySid string, pa path = strings.Replace(path, "{"+"CategorySid"+"}", CategorySid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Name != nil { data.Set("Name", *params.Name) diff --git a/rest/flex/v1/insights_quality_management_questionnaires.go b/rest/flex/v1/insights_quality_management_questionnaires.go index b494dd3fc..2841ae5d0 100644 --- a/rest/flex/v1/insights_quality_management_questionnaires.go +++ b/rest/flex/v1/insights_quality_management_questionnaires.go @@ -63,7 +63,9 @@ func (c *ApiService) CreateInsightsQuestionnaires(params *CreateInsightsQuestion path := "/v1/Insights/QualityManagement/Questionnaires" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Name != nil { data.Set("Name", *params.Name) @@ -115,7 +117,9 @@ func (c *ApiService) DeleteInsightsQuestionnaires(QuestionnaireSid string, param path = strings.Replace(path, "{"+"QuestionnaireSid"+"}", QuestionnaireSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Authorization != nil { headers["Authorization"] = *params.Authorization @@ -147,7 +151,9 @@ func (c *ApiService) FetchInsightsQuestionnaires(QuestionnaireSid string, params path = strings.Replace(path, "{"+"QuestionnaireSid"+"}", QuestionnaireSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Authorization != nil { headers["Authorization"] = *params.Authorization @@ -201,7 +207,9 @@ func (c *ApiService) PageInsightsQuestionnaires(params *ListInsightsQuestionnair path := "/v1/Insights/QualityManagement/Questionnaires" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IncludeInactive != nil { data.Set("IncludeInactive", fmt.Sprint(*params.IncludeInactive)) @@ -359,7 +367,9 @@ func (c *ApiService) UpdateInsightsQuestionnaires(QuestionnaireSid string, param path = strings.Replace(path, "{"+"QuestionnaireSid"+"}", QuestionnaireSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Active != nil { data.Set("Active", fmt.Sprint(*params.Active)) diff --git a/rest/flex/v1/insights_quality_management_questions.go b/rest/flex/v1/insights_quality_management_questions.go index b2128f4ca..f0ef1f3a3 100644 --- a/rest/flex/v1/insights_quality_management_questions.go +++ b/rest/flex/v1/insights_quality_management_questions.go @@ -69,7 +69,9 @@ func (c *ApiService) CreateInsightsQuestionnairesQuestion(params *CreateInsights path := "/v1/Insights/QualityManagement/Questions" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.CategorySid != nil { data.Set("CategorySid", *params.CategorySid) @@ -122,7 +124,9 @@ func (c *ApiService) DeleteInsightsQuestionnairesQuestion(QuestionSid string, pa path = strings.Replace(path, "{"+"QuestionSid"+"}", QuestionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Authorization != nil { headers["Authorization"] = *params.Authorization @@ -171,7 +175,9 @@ func (c *ApiService) PageInsightsQuestionnairesQuestion(params *ListInsightsQues path := "/v1/Insights/QualityManagement/Questions" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.CategorySid != nil { for _, item := range *params.CategorySid { @@ -337,7 +343,9 @@ func (c *ApiService) UpdateInsightsQuestionnairesQuestion(QuestionSid string, pa path = strings.Replace(path, "{"+"QuestionSid"+"}", QuestionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AllowNa != nil { data.Set("AllowNa", fmt.Sprint(*params.AllowNa)) diff --git a/rest/flex/v1/insights_quality_management_settings_answer_sets.go b/rest/flex/v1/insights_quality_management_settings_answer_sets.go index 00a60d9eb..60714822b 100644 --- a/rest/flex/v1/insights_quality_management_settings_answer_sets.go +++ b/rest/flex/v1/insights_quality_management_settings_answer_sets.go @@ -35,7 +35,9 @@ func (c *ApiService) FetchInsightsSettingsAnswersets(params *FetchInsightsSettin path := "/v1/Insights/QualityManagement/Settings/AnswerSets" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Authorization != nil { headers["Authorization"] = *params.Authorization diff --git a/rest/flex/v1/insights_quality_management_settings_comment_tags.go b/rest/flex/v1/insights_quality_management_settings_comment_tags.go index fece2f75a..2aad031e3 100644 --- a/rest/flex/v1/insights_quality_management_settings_comment_tags.go +++ b/rest/flex/v1/insights_quality_management_settings_comment_tags.go @@ -35,7 +35,9 @@ func (c *ApiService) FetchInsightsSettingsComment(params *FetchInsightsSettingsC path := "/v1/Insights/QualityManagement/Settings/CommentTags" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Authorization != nil { headers["Authorization"] = *params.Authorization diff --git a/rest/flex/v1/insights_segments.go b/rest/flex/v1/insights_segments.go index bd0514767..14aa8f920 100644 --- a/rest/flex/v1/insights_segments.go +++ b/rest/flex/v1/insights_segments.go @@ -62,7 +62,9 @@ func (c *ApiService) PageInsightsSegments(params *ListInsightsSegmentsParams, pa path := "/v1/Insights/Segments" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.SegmentId != nil { data.Set("SegmentId", *params.SegmentId) diff --git a/rest/flex/v1/insights_session.go b/rest/flex/v1/insights_session.go index 3ce21ef98..31bc8f887 100644 --- a/rest/flex/v1/insights_session.go +++ b/rest/flex/v1/insights_session.go @@ -35,7 +35,9 @@ func (c *ApiService) CreateInsightsSession(params *CreateInsightsSessionParams) path := "/v1/Insights/Session" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Authorization != nil { headers["Authorization"] = *params.Authorization diff --git a/rest/flex/v1/insights_user_roles.go b/rest/flex/v1/insights_user_roles.go index 18b96566d..8cadfb15e 100644 --- a/rest/flex/v1/insights_user_roles.go +++ b/rest/flex/v1/insights_user_roles.go @@ -35,7 +35,9 @@ func (c *ApiService) FetchInsightsUserRoles(params *FetchInsightsUserRolesParams path := "/v1/Insights/UserRoles" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Authorization != nil { headers["Authorization"] = *params.Authorization diff --git a/rest/flex/v1/interactions.go b/rest/flex/v1/interactions.go index fb0d949a7..3793b85d9 100644 --- a/rest/flex/v1/interactions.go +++ b/rest/flex/v1/interactions.go @@ -48,7 +48,9 @@ func (c *ApiService) CreateInteraction(params *CreateInteractionParams) (*FlexV1 path := "/v1/Interactions" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Channel != nil { v, err := json.Marshal(params.Channel) @@ -93,7 +95,9 @@ func (c *ApiService) FetchInteraction(Sid string) (*FlexV1Interaction, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/flex/v1/interactions_channels.go b/rest/flex/v1/interactions_channels.go index 594818e16..2ea851e3e 100644 --- a/rest/flex/v1/interactions_channels.go +++ b/rest/flex/v1/interactions_channels.go @@ -30,7 +30,9 @@ func (c *ApiService) FetchInteractionChannel(InteractionSid string, Sid string) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -71,7 +73,9 @@ func (c *ApiService) PageInteractionChannel(InteractionSid string, params *ListI path = strings.Replace(path, "{"+"InteractionSid"+"}", InteractionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -209,7 +213,9 @@ func (c *ApiService) UpdateInteractionChannel(InteractionSid string, Sid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/flex/v1/interactions_channels_invites.go b/rest/flex/v1/interactions_channels_invites.go index 9f831a849..cf6688309 100644 --- a/rest/flex/v1/interactions_channels_invites.go +++ b/rest/flex/v1/interactions_channels_invites.go @@ -41,7 +41,9 @@ func (c *ApiService) CreateInteractionChannelInvite(InteractionSid string, Chann path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Routing != nil { v, err := json.Marshal(params.Routing) @@ -93,7 +95,9 @@ func (c *ApiService) PageInteractionChannelInvite(InteractionSid string, Channel path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/flex/v1/interactions_channels_participants.go b/rest/flex/v1/interactions_channels_participants.go index 95aa6d341..23317b7e4 100644 --- a/rest/flex/v1/interactions_channels_participants.go +++ b/rest/flex/v1/interactions_channels_participants.go @@ -53,7 +53,9 @@ func (c *ApiService) CreateInteractionChannelParticipant(InteractionSid string, path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Type != nil { data.Set("Type", *params.Type) @@ -117,7 +119,9 @@ func (c *ApiService) PageInteractionChannelParticipant(InteractionSid string, Ch path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -250,7 +254,9 @@ func (c *ApiService) UpdateInteractionChannelParticipant(InteractionSid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/flex/v1/plugin_service_configurations.go b/rest/flex/v1/plugin_service_configurations.go index bb601220e..25500b889 100644 --- a/rest/flex/v1/plugin_service_configurations.go +++ b/rest/flex/v1/plugin_service_configurations.go @@ -57,7 +57,9 @@ func (c *ApiService) CreatePluginConfiguration(params *CreatePluginConfiguration path := "/v1/PluginService/Configurations" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Name != nil { data.Set("Name", *params.Name) @@ -112,7 +114,9 @@ func (c *ApiService) FetchPluginConfiguration(Sid string, params *FetchPluginCon path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FlexMetadata != nil { headers["Flex-Metadata"] = *params.FlexMetadata @@ -160,7 +164,9 @@ func (c *ApiService) PagePluginConfiguration(params *ListPluginConfigurationPara path := "/v1/PluginService/Configurations" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/flex/v1/plugin_service_configurations_archive.go b/rest/flex/v1/plugin_service_configurations_archive.go index 16d34bb10..ae9f331a8 100644 --- a/rest/flex/v1/plugin_service_configurations_archive.go +++ b/rest/flex/v1/plugin_service_configurations_archive.go @@ -37,7 +37,9 @@ func (c *ApiService) UpdatePluginConfigurationArchive(Sid string, params *Update path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FlexMetadata != nil { headers["Flex-Metadata"] = *params.FlexMetadata diff --git a/rest/flex/v1/plugin_service_configurations_plugins.go b/rest/flex/v1/plugin_service_configurations_plugins.go index 1238a9ef6..248e1b21c 100644 --- a/rest/flex/v1/plugin_service_configurations_plugins.go +++ b/rest/flex/v1/plugin_service_configurations_plugins.go @@ -41,7 +41,9 @@ func (c *ApiService) FetchConfiguredPlugin(ConfigurationSid string, PluginSid st path = strings.Replace(path, "{"+"PluginSid"+"}", PluginSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FlexMetadata != nil { headers["Flex-Metadata"] = *params.FlexMetadata @@ -91,7 +93,9 @@ func (c *ApiService) PageConfiguredPlugin(ConfigurationSid string, params *ListC path = strings.Replace(path, "{"+"ConfigurationSid"+"}", ConfigurationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/flex/v1/plugin_service_plugins.go b/rest/flex/v1/plugin_service_plugins.go index bc8590954..e42ab3347 100644 --- a/rest/flex/v1/plugin_service_plugins.go +++ b/rest/flex/v1/plugin_service_plugins.go @@ -57,7 +57,9 @@ func (c *ApiService) CreatePlugin(params *CreatePluginParams) (*FlexV1Plugin, er path := "/v1/PluginService/Plugins" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) @@ -104,7 +106,9 @@ func (c *ApiService) FetchPlugin(Sid string, params *FetchPluginParams) (*FlexV1 path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FlexMetadata != nil { headers["Flex-Metadata"] = *params.FlexMetadata @@ -152,7 +156,9 @@ func (c *ApiService) PagePlugin(params *ListPluginParams, pageToken, pageNumber path := "/v1/PluginService/Plugins" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -295,7 +301,9 @@ func (c *ApiService) UpdatePlugin(Sid string, params *UpdatePluginParams) (*Flex path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/flex/v1/plugin_service_plugins_archive.go b/rest/flex/v1/plugin_service_plugins_archive.go index 6859e8bec..cf5df8406 100644 --- a/rest/flex/v1/plugin_service_plugins_archive.go +++ b/rest/flex/v1/plugin_service_plugins_archive.go @@ -37,7 +37,9 @@ func (c *ApiService) UpdatePluginArchive(Sid string, params *UpdatePluginArchive path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FlexMetadata != nil { headers["Flex-Metadata"] = *params.FlexMetadata diff --git a/rest/flex/v1/plugin_service_plugins_versions.go b/rest/flex/v1/plugin_service_plugins_versions.go index 6b5eecd6a..59cee1fb5 100644 --- a/rest/flex/v1/plugin_service_plugins_versions.go +++ b/rest/flex/v1/plugin_service_plugins_versions.go @@ -76,7 +76,9 @@ func (c *ApiService) CreatePluginVersion(PluginSid string, params *CreatePluginV path = strings.Replace(path, "{"+"PluginSid"+"}", PluginSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Version != nil { data.Set("Version", *params.Version) @@ -133,7 +135,9 @@ func (c *ApiService) FetchPluginVersion(PluginSid string, Sid string, params *Fe path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FlexMetadata != nil { headers["Flex-Metadata"] = *params.FlexMetadata @@ -183,7 +187,9 @@ func (c *ApiService) PagePluginVersion(PluginSid string, params *ListPluginVersi path = strings.Replace(path, "{"+"PluginSid"+"}", PluginSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/flex/v1/plugin_service_plugins_versions_archive.go b/rest/flex/v1/plugin_service_plugins_versions_archive.go index c80cbc566..e20cd02d0 100644 --- a/rest/flex/v1/plugin_service_plugins_versions_archive.go +++ b/rest/flex/v1/plugin_service_plugins_versions_archive.go @@ -38,7 +38,9 @@ func (c *ApiService) UpdatePluginVersionArchive(PluginSid string, Sid string, pa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FlexMetadata != nil { headers["Flex-Metadata"] = *params.FlexMetadata diff --git a/rest/flex/v1/plugin_service_releases.go b/rest/flex/v1/plugin_service_releases.go index 1f4ed16bf..f0695572c 100644 --- a/rest/flex/v1/plugin_service_releases.go +++ b/rest/flex/v1/plugin_service_releases.go @@ -45,7 +45,9 @@ func (c *ApiService) CreatePluginRelease(params *CreatePluginReleaseParams) (*Fl path := "/v1/PluginService/Releases" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ConfigurationId != nil { data.Set("ConfigurationId", *params.ConfigurationId) @@ -86,7 +88,9 @@ func (c *ApiService) FetchPluginRelease(Sid string, params *FetchPluginReleasePa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FlexMetadata != nil { headers["Flex-Metadata"] = *params.FlexMetadata @@ -134,7 +138,9 @@ func (c *ApiService) PagePluginRelease(params *ListPluginReleaseParams, pageToke path := "/v1/PluginService/Releases" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/flex/v1/web_channels.go b/rest/flex/v1/web_channels.go index 589a70e06..3d9cbbd01 100644 --- a/rest/flex/v1/web_channels.go +++ b/rest/flex/v1/web_channels.go @@ -69,7 +69,9 @@ func (c *ApiService) CreateWebChannel(params *CreateWebChannelParams) (*FlexV1We path := "/v1/WebChannels" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FlexFlowSid != nil { data.Set("FlexFlowSid", *params.FlexFlowSid) @@ -111,7 +113,9 @@ func (c *ApiService) DeleteWebChannel(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -129,7 +133,9 @@ func (c *ApiService) FetchWebChannel(Sid string) (*FlexV1WebChannel, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -168,7 +174,9 @@ func (c *ApiService) PageWebChannel(params *ListWebChannelParams, pageToken, pag path := "/v1/WebChannels" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -305,7 +313,9 @@ func (c *ApiService) UpdateWebChannel(Sid string, params *UpdateWebChannelParams path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ChatStatus != nil { data.Set("ChatStatus", *params.ChatStatus) diff --git a/rest/flex/v2/instances_users.go b/rest/flex/v2/instances_users.go index 643ee84c8..d6fa93358 100644 --- a/rest/flex/v2/instances_users.go +++ b/rest/flex/v2/instances_users.go @@ -27,7 +27,9 @@ func (c *ApiService) FetchFlexUser(InstanceSid string, FlexUserSid string) (*Fle path = strings.Replace(path, "{"+"FlexUserSid"+"}", FlexUserSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/flex/v2/web_chats.go b/rest/flex/v2/web_chats.go index 75e327383..f644ff6a6 100644 --- a/rest/flex/v2/web_chats.go +++ b/rest/flex/v2/web_chats.go @@ -59,7 +59,9 @@ func (c *ApiService) CreateWebChannel(params *CreateWebChannelParams) (*FlexV2We path := "/v2/WebChats" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AddressSid != nil { data.Set("AddressSid", *params.AddressSid) diff --git a/rest/frontline/v1/users.go b/rest/frontline/v1/users.go index b6994cab2..71c8deba3 100644 --- a/rest/frontline/v1/users.go +++ b/rest/frontline/v1/users.go @@ -27,7 +27,9 @@ func (c *ApiService) FetchUser(Sid string) (*FrontlineV1User, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -79,7 +81,9 @@ func (c *ApiService) UpdateUser(Sid string, params *UpdateUserParams) (*Frontlin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/insights/v1/conferences.go b/rest/insights/v1/conferences.go index 9572448bf..2be0c3889 100644 --- a/rest/insights/v1/conferences.go +++ b/rest/insights/v1/conferences.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchConference(ConferenceSid string) (*InsightsV1Conferenc path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -128,7 +130,9 @@ func (c *ApiService) PageConference(params *ListConferenceParams, pageToken, pag path := "/v1/Conferences" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ConferenceSid != nil { data.Set("ConferenceSid", *params.ConferenceSid) diff --git a/rest/insights/v1/conferences_participants.go b/rest/insights/v1/conferences_participants.go index c007560af..7867891fc 100644 --- a/rest/insights/v1/conferences_participants.go +++ b/rest/insights/v1/conferences_participants.go @@ -47,7 +47,9 @@ func (c *ApiService) FetchConferenceParticipant(ConferenceSid string, Participan path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Events != nil { data.Set("Events", *params.Events) @@ -113,7 +115,9 @@ func (c *ApiService) PageConferenceParticipant(ConferenceSid string, params *Lis path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ParticipantSid != nil { data.Set("ParticipantSid", *params.ParticipantSid) diff --git a/rest/insights/v1/video_rooms.go b/rest/insights/v1/video_rooms.go index 632bb3a94..23e3b84d4 100644 --- a/rest/insights/v1/video_rooms.go +++ b/rest/insights/v1/video_rooms.go @@ -30,7 +30,9 @@ func (c *ApiService) FetchVideoRoomSummary(RoomSid string) (*InsightsV1VideoRoom path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -99,7 +101,9 @@ func (c *ApiService) PageVideoRoomSummary(params *ListVideoRoomSummaryParams, pa path := "/v1/Video/Rooms" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.RoomType != nil { for _, item := range *params.RoomType { diff --git a/rest/insights/v1/video_rooms_participants.go b/rest/insights/v1/video_rooms_participants.go index 9606f4ca6..5f43cab63 100644 --- a/rest/insights/v1/video_rooms_participants.go +++ b/rest/insights/v1/video_rooms_participants.go @@ -30,7 +30,9 @@ func (c *ApiService) FetchVideoParticipantSummary(RoomSid string, ParticipantSid path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -71,7 +73,9 @@ func (c *ApiService) PageVideoParticipantSummary(RoomSid string, params *ListVid path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/insights/v1/voice.go b/rest/insights/v1/voice.go index e78674854..853ddb7b6 100644 --- a/rest/insights/v1/voice.go +++ b/rest/insights/v1/voice.go @@ -26,7 +26,9 @@ func (c *ApiService) FetchCall(Sid string) (*InsightsV1Call, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/insights/v1/voice_annotation.go b/rest/insights/v1/voice_annotation.go index ac6b88f5e..9fca55180 100644 --- a/rest/insights/v1/voice_annotation.go +++ b/rest/insights/v1/voice_annotation.go @@ -27,7 +27,9 @@ func (c *ApiService) FetchAnnotation(CallSid string) (*InsightsV1Annotation, err path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -97,7 +99,9 @@ func (c *ApiService) UpdateAnnotation(CallSid string, params *UpdateAnnotationPa path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AnsweredBy != nil { data.Set("AnsweredBy", *params.AnsweredBy) diff --git a/rest/insights/v1/voice_events.go b/rest/insights/v1/voice_events.go index bdf7f2047..75b237bfd 100644 --- a/rest/insights/v1/voice_events.go +++ b/rest/insights/v1/voice_events.go @@ -53,7 +53,9 @@ func (c *ApiService) PageEvent(CallSid string, params *ListEventParams, pageToke path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Edge != nil { data.Set("Edge", *params.Edge) diff --git a/rest/insights/v1/voice_metrics.go b/rest/insights/v1/voice_metrics.go index d90683c0e..fd3f6e032 100644 --- a/rest/insights/v1/voice_metrics.go +++ b/rest/insights/v1/voice_metrics.go @@ -59,7 +59,9 @@ func (c *ApiService) PageMetric(CallSid string, params *ListMetricParams, pageTo path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Edge != nil { data.Set("Edge", *params.Edge) diff --git a/rest/insights/v1/voice_settings.go b/rest/insights/v1/voice_settings.go index 7376eff22..b46fa5515 100644 --- a/rest/insights/v1/voice_settings.go +++ b/rest/insights/v1/voice_settings.go @@ -36,7 +36,9 @@ func (c *ApiService) FetchAccountSettings(params *FetchAccountSettingsParams) (* path := "/v1/Voice/Settings" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.SubaccountSid != nil { data.Set("SubaccountSid", *params.SubaccountSid) @@ -85,7 +87,9 @@ func (c *ApiService) UpdateAccountSettings(params *UpdateAccountSettingsParams) path := "/v1/Voice/Settings" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AdvancedFeatures != nil { data.Set("AdvancedFeatures", fmt.Sprint(*params.AdvancedFeatures)) diff --git a/rest/insights/v1/voice_summaries.go b/rest/insights/v1/voice_summaries.go index 1eb0fd7f9..875e8afc1 100644 --- a/rest/insights/v1/voice_summaries.go +++ b/rest/insights/v1/voice_summaries.go @@ -188,7 +188,9 @@ func (c *ApiService) PageCallSummaries(params *ListCallSummariesParams, pageToke path := "/v1/Voice/Summaries" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.From != nil { data.Set("From", *params.From) diff --git a/rest/insights/v1/voice_summary.go b/rest/insights/v1/voice_summary.go index bd66f3148..733a49f96 100644 --- a/rest/insights/v1/voice_summary.go +++ b/rest/insights/v1/voice_summary.go @@ -37,7 +37,9 @@ func (c *ApiService) FetchSummary(CallSid string, params *FetchSummaryParams) (* path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ProcessingState != nil { data.Set("ProcessingState", *params.ProcessingState) diff --git a/rest/intelligence/v2/operator_types.go b/rest/intelligence/v2/operator_types.go index 1970ccf11..6887a831a 100644 --- a/rest/intelligence/v2/operator_types.go +++ b/rest/intelligence/v2/operator_types.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchOperatorType(Sid string) (*IntelligenceV2OperatorType, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -68,7 +70,9 @@ func (c *ApiService) PageOperatorType(params *ListOperatorTypeParams, pageToken, path := "/v2/OperatorTypes" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/intelligence/v2/operators.go b/rest/intelligence/v2/operators.go index 6710f0f96..6ccba3c99 100644 --- a/rest/intelligence/v2/operators.go +++ b/rest/intelligence/v2/operators.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchOperator(Sid string) (*IntelligenceV2Operator, error) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -80,7 +82,9 @@ func (c *ApiService) PageOperator(params *ListOperatorParams, pageToken, pageNum path := "/v2/Operators" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Availability != nil { data.Set("Availability", *params.Availability) diff --git a/rest/intelligence/v2/operators_custom.go b/rest/intelligence/v2/operators_custom.go index 3591961e6..3130d533e 100644 --- a/rest/intelligence/v2/operators_custom.go +++ b/rest/intelligence/v2/operators_custom.go @@ -51,7 +51,9 @@ func (c *ApiService) CreateCustomOperator(params *CreateCustomOperatorParams) (* path := "/v2/Operators/Custom" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -90,7 +92,9 @@ func (c *ApiService) DeleteCustomOperator(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -108,7 +112,9 @@ func (c *ApiService) FetchCustomOperator(Sid string) (*IntelligenceV2CustomOpera path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -159,7 +165,9 @@ func (c *ApiService) PageCustomOperator(params *ListCustomOperatorParams, pageTo path := "/v2/Operators/Custom" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Availability != nil { data.Set("Availability", *params.Availability) @@ -308,7 +316,9 @@ func (c *ApiService) UpdateCustomOperator(Sid string, params *UpdateCustomOperat path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/intelligence/v2/operators_pre_built.go b/rest/intelligence/v2/operators_pre_built.go index 5bb58ea76..4d42218f5 100644 --- a/rest/intelligence/v2/operators_pre_built.go +++ b/rest/intelligence/v2/operators_pre_built.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchPrebuiltOperator(Sid string) (*IntelligenceV2PrebuiltO path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -80,7 +82,9 @@ func (c *ApiService) PagePrebuiltOperator(params *ListPrebuiltOperatorParams, pa path := "/v2/Operators/PreBuilt" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Availability != nil { data.Set("Availability", *params.Availability) diff --git a/rest/intelligence/v2/services.go b/rest/intelligence/v2/services.go index c2eb51d02..0e8db0fe8 100644 --- a/rest/intelligence/v2/services.go +++ b/rest/intelligence/v2/services.go @@ -87,7 +87,9 @@ func (c *ApiService) CreateService(params *CreateServiceParams) (*IntelligenceV2 path := "/v2/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) @@ -138,7 +140,9 @@ func (c *ApiService) DeleteService(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -156,7 +160,9 @@ func (c *ApiService) FetchService(Sid string) (*IntelligenceV2Service, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -195,7 +201,9 @@ func (c *ApiService) PageService(params *ListServiceParams, pageToken, pageNumbe path := "/v2/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -374,7 +382,9 @@ func (c *ApiService) UpdateService(Sid string, params *UpdateServiceParams) (*In path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AutoTranscribe != nil { data.Set("AutoTranscribe", fmt.Sprint(*params.AutoTranscribe)) diff --git a/rest/intelligence/v2/services_operators.go b/rest/intelligence/v2/services_operators.go index 626bde1f9..6ecfd89ea 100644 --- a/rest/intelligence/v2/services_operators.go +++ b/rest/intelligence/v2/services_operators.go @@ -27,7 +27,9 @@ func (c *ApiService) CreateOperatorAttachment(ServiceSid string, OperatorSid str path = strings.Replace(path, "{"+"OperatorSid"+"}", OperatorSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -51,7 +53,9 @@ func (c *ApiService) DeleteOperatorAttachment(ServiceSid string, OperatorSid str path = strings.Replace(path, "{"+"OperatorSid"+"}", OperatorSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -69,7 +73,9 @@ func (c *ApiService) FetchOperatorAttachments(ServiceSid string) (*IntelligenceV path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/intelligence/v2/transcripts.go b/rest/intelligence/v2/transcripts.go index bb98dbd84..01fc4489e 100644 --- a/rest/intelligence/v2/transcripts.go +++ b/rest/intelligence/v2/transcripts.go @@ -58,7 +58,9 @@ func (c *ApiService) CreateTranscript(params *CreateTranscriptParams) (*Intellig path := "/v2/Transcripts" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ServiceSid != nil { data.Set("ServiceSid", *params.ServiceSid) @@ -100,7 +102,9 @@ func (c *ApiService) DeleteTranscript(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -118,7 +122,9 @@ func (c *ApiService) FetchTranscript(Sid string) (*IntelligenceV2Transcript, err path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -205,7 +211,9 @@ func (c *ApiService) PageTranscript(params *ListTranscriptParams, pageToken, pag path := "/v2/Transcripts" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ServiceSid != nil { data.Set("ServiceSid", *params.ServiceSid) diff --git a/rest/intelligence/v2/transcripts_media.go b/rest/intelligence/v2/transcripts_media.go index d54171b4f..0b7269fc7 100644 --- a/rest/intelligence/v2/transcripts_media.go +++ b/rest/intelligence/v2/transcripts_media.go @@ -38,7 +38,9 @@ func (c *ApiService) FetchMedia(Sid string, params *FetchMediaParams) (*Intellig path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Redacted != nil { data.Set("Redacted", fmt.Sprint(*params.Redacted)) diff --git a/rest/intelligence/v2/transcripts_operator_results.go b/rest/intelligence/v2/transcripts_operator_results.go index 15e922c66..26977e025 100644 --- a/rest/intelligence/v2/transcripts_operator_results.go +++ b/rest/intelligence/v2/transcripts_operator_results.go @@ -41,7 +41,9 @@ func (c *ApiService) FetchOperatorResult(TranscriptSid string, OperatorSid strin path = strings.Replace(path, "{"+"OperatorSid"+"}", OperatorSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Redacted != nil { data.Set("Redacted", fmt.Sprint(*params.Redacted)) @@ -92,7 +94,9 @@ func (c *ApiService) PageOperatorResult(TranscriptSid string, params *ListOperat path = strings.Replace(path, "{"+"TranscriptSid"+"}", TranscriptSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Redacted != nil { data.Set("Redacted", fmt.Sprint(*params.Redacted)) diff --git a/rest/intelligence/v2/transcripts_sentences.go b/rest/intelligence/v2/transcripts_sentences.go index 6b257de78..8cf8a8d9f 100644 --- a/rest/intelligence/v2/transcripts_sentences.go +++ b/rest/intelligence/v2/transcripts_sentences.go @@ -53,7 +53,9 @@ func (c *ApiService) PageSentence(TranscriptSid string, params *ListSentencePara path = strings.Replace(path, "{"+"TranscriptSid"+"}", TranscriptSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Redacted != nil { data.Set("Redacted", fmt.Sprint(*params.Redacted)) diff --git a/rest/ip_messaging/v1/credentials.go b/rest/ip_messaging/v1/credentials.go index 850c839e0..f3f7e6864 100644 --- a/rest/ip_messaging/v1/credentials.go +++ b/rest/ip_messaging/v1/credentials.go @@ -75,7 +75,9 @@ func (c *ApiService) CreateCredential(params *CreateCredentialParams) (*IpMessag path := "/v1/Credentials" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Type != nil { data.Set("Type", *params.Type) @@ -120,7 +122,9 @@ func (c *ApiService) DeleteCredential(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -138,7 +142,9 @@ func (c *ApiService) FetchCredential(Sid string) (*IpMessagingV1Credential, erro path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -177,7 +183,9 @@ func (c *ApiService) PageCredential(params *ListCredentialParams, pageToken, pag path := "/v1/Credentials" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -338,7 +346,9 @@ func (c *ApiService) UpdateCredential(Sid string, params *UpdateCredentialParams path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/ip_messaging/v1/services.go b/rest/ip_messaging/v1/services.go index a1370fc84..de3290510 100644 --- a/rest/ip_messaging/v1/services.go +++ b/rest/ip_messaging/v1/services.go @@ -39,7 +39,9 @@ func (c *ApiService) CreateService(params *CreateServiceParams) (*IpMessagingV1S path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -66,7 +68,9 @@ func (c *ApiService) DeleteService(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -84,7 +88,9 @@ func (c *ApiService) FetchService(Sid string) (*IpMessagingV1Service, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -123,7 +129,9 @@ func (c *ApiService) PageService(params *ListServiceParams, pageToken, pageNumbe path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -572,7 +580,9 @@ func (c *ApiService) UpdateService(Sid string, params *UpdateServiceParams) (*Ip path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/ip_messaging/v1/services_channels.go b/rest/ip_messaging/v1/services_channels.go index 22d296a9e..e5d66ae82 100644 --- a/rest/ip_messaging/v1/services_channels.go +++ b/rest/ip_messaging/v1/services_channels.go @@ -58,7 +58,9 @@ func (c *ApiService) CreateChannel(ServiceSid string, params *CreateChannelParam path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -95,7 +97,9 @@ func (c *ApiService) DeleteChannel(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -114,7 +118,9 @@ func (c *ApiService) FetchChannel(ServiceSid string, Sid string) (*IpMessagingV1 path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -161,7 +167,9 @@ func (c *ApiService) PageChannel(ServiceSid string, params *ListChannelParams, p path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Type != nil { for _, item := range *params.Type { @@ -310,7 +318,9 @@ func (c *ApiService) UpdateChannel(ServiceSid string, Sid string, params *Update path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/ip_messaging/v1/services_channels_invites.go b/rest/ip_messaging/v1/services_channels_invites.go index 30253d330..3868030c9 100644 --- a/rest/ip_messaging/v1/services_channels_invites.go +++ b/rest/ip_messaging/v1/services_channels_invites.go @@ -47,7 +47,9 @@ func (c *ApiService) CreateInvite(ServiceSid string, ChannelSid string, params * path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -79,7 +81,9 @@ func (c *ApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -99,7 +103,9 @@ func (c *ApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -147,7 +153,9 @@ func (c *ApiService) PageInvite(ServiceSid string, ChannelSid string, params *Li path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { for _, item := range *params.Identity { diff --git a/rest/ip_messaging/v1/services_channels_members.go b/rest/ip_messaging/v1/services_channels_members.go index 77b1b4e90..a468165ff 100644 --- a/rest/ip_messaging/v1/services_channels_members.go +++ b/rest/ip_messaging/v1/services_channels_members.go @@ -47,7 +47,9 @@ func (c *ApiService) CreateMember(ServiceSid string, ChannelSid string, params * path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -79,7 +81,9 @@ func (c *ApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -99,7 +103,9 @@ func (c *ApiService) FetchMember(ServiceSid string, ChannelSid string, Sid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -147,7 +153,9 @@ func (c *ApiService) PageMember(ServiceSid string, ChannelSid string, params *Li path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { for _, item := range *params.Identity { @@ -291,7 +299,9 @@ func (c *ApiService) UpdateMember(ServiceSid string, ChannelSid string, Sid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) diff --git a/rest/ip_messaging/v1/services_channels_messages.go b/rest/ip_messaging/v1/services_channels_messages.go index 28f929dda..73e1aba91 100644 --- a/rest/ip_messaging/v1/services_channels_messages.go +++ b/rest/ip_messaging/v1/services_channels_messages.go @@ -53,7 +53,9 @@ func (c *ApiService) CreateMessage(ServiceSid string, ChannelSid string, params path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Body != nil { data.Set("Body", *params.Body) @@ -88,7 +90,9 @@ func (c *ApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid str path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -108,7 +112,9 @@ func (c *ApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -156,7 +162,9 @@ func (c *ApiService) PageMessage(ServiceSid string, ChannelSid string, params *L path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Order != nil { data.Set("Order", *params.Order) @@ -298,7 +306,9 @@ func (c *ApiService) UpdateMessage(ServiceSid string, ChannelSid string, Sid str path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Body != nil { data.Set("Body", *params.Body) diff --git a/rest/ip_messaging/v1/services_roles.go b/rest/ip_messaging/v1/services_roles.go index 3d562e6c0..b94874fd5 100644 --- a/rest/ip_messaging/v1/services_roles.go +++ b/rest/ip_messaging/v1/services_roles.go @@ -52,7 +52,9 @@ func (c *ApiService) CreateRole(ServiceSid string, params *CreateRoleParams) (*I path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -88,7 +90,9 @@ func (c *ApiService) DeleteRole(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -107,7 +111,9 @@ func (c *ApiService) FetchRole(ServiceSid string, Sid string) (*IpMessagingV1Rol path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -148,7 +154,9 @@ func (c *ApiService) PageRole(ServiceSid string, params *ListRoleParams, pageTok path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -280,7 +288,9 @@ func (c *ApiService) UpdateRole(ServiceSid string, Sid string, params *UpdateRol path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Permission != nil { for _, item := range *params.Permission { diff --git a/rest/ip_messaging/v1/services_users.go b/rest/ip_messaging/v1/services_users.go index 8fe15c616..5fc0f3ed4 100644 --- a/rest/ip_messaging/v1/services_users.go +++ b/rest/ip_messaging/v1/services_users.go @@ -58,7 +58,9 @@ func (c *ApiService) CreateUser(ServiceSid string, params *CreateUserParams) (*I path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -95,7 +97,9 @@ func (c *ApiService) DeleteUser(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -114,7 +118,9 @@ func (c *ApiService) FetchUser(ServiceSid string, Sid string) (*IpMessagingV1Use path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -155,7 +161,9 @@ func (c *ApiService) PageUser(ServiceSid string, params *ListUserParams, pageTok path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -299,7 +307,9 @@ func (c *ApiService) UpdateUser(ServiceSid string, Sid string, params *UpdateUse path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) diff --git a/rest/ip_messaging/v1/services_users_channels.go b/rest/ip_messaging/v1/services_users_channels.go index 32b0dfc05..801fcf96d 100644 --- a/rest/ip_messaging/v1/services_users_channels.go +++ b/rest/ip_messaging/v1/services_users_channels.go @@ -48,7 +48,9 @@ func (c *ApiService) PageUserChannel(ServiceSid string, UserSid string, params * path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/ip_messaging/v2/credentials.go b/rest/ip_messaging/v2/credentials.go index 7d4227335..f5abf5044 100644 --- a/rest/ip_messaging/v2/credentials.go +++ b/rest/ip_messaging/v2/credentials.go @@ -75,7 +75,9 @@ func (c *ApiService) CreateCredential(params *CreateCredentialParams) (*IpMessag path := "/v2/Credentials" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Type != nil { data.Set("Type", *params.Type) @@ -120,7 +122,9 @@ func (c *ApiService) DeleteCredential(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -138,7 +142,9 @@ func (c *ApiService) FetchCredential(Sid string) (*IpMessagingV2Credential, erro path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -177,7 +183,9 @@ func (c *ApiService) PageCredential(params *ListCredentialParams, pageToken, pag path := "/v2/Credentials" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -338,7 +346,9 @@ func (c *ApiService) UpdateCredential(Sid string, params *UpdateCredentialParams path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/ip_messaging/v2/services.go b/rest/ip_messaging/v2/services.go index 3b093dcd5..df3740ea4 100644 --- a/rest/ip_messaging/v2/services.go +++ b/rest/ip_messaging/v2/services.go @@ -39,7 +39,9 @@ func (c *ApiService) CreateService(params *CreateServiceParams) (*IpMessagingV2S path := "/v2/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -66,7 +68,9 @@ func (c *ApiService) DeleteService(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -84,7 +88,9 @@ func (c *ApiService) FetchService(Sid string) (*IpMessagingV2Service, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -123,7 +129,9 @@ func (c *ApiService) PageService(params *ListServiceParams, pageToken, pageNumbe path := "/v2/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -434,7 +442,9 @@ func (c *ApiService) UpdateService(Sid string, params *UpdateServiceParams) (*Ip path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/ip_messaging/v2/services_bindings.go b/rest/ip_messaging/v2/services_bindings.go index 248da0f90..66eba541d 100644 --- a/rest/ip_messaging/v2/services_bindings.go +++ b/rest/ip_messaging/v2/services_bindings.go @@ -30,7 +30,9 @@ func (c *ApiService) DeleteBinding(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -49,7 +51,9 @@ func (c *ApiService) FetchBinding(ServiceSid string, Sid string) (*IpMessagingV2 path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -102,7 +106,9 @@ func (c *ApiService) PageBinding(ServiceSid string, params *ListBindingParams, p path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.BindingType != nil { for _, item := range *params.BindingType { diff --git a/rest/ip_messaging/v2/services_channels.go b/rest/ip_messaging/v2/services_channels.go index fe06ed53e..4f0de7532 100644 --- a/rest/ip_messaging/v2/services_channels.go +++ b/rest/ip_messaging/v2/services_channels.go @@ -83,7 +83,9 @@ func (c *ApiService) CreateChannel(ServiceSid string, params *CreateChannelParam path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -143,7 +145,9 @@ func (c *ApiService) DeleteChannel(ServiceSid string, Sid string, params *Delete path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled @@ -165,7 +169,9 @@ func (c *ApiService) FetchChannel(ServiceSid string, Sid string) (*IpMessagingV2 path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -212,7 +218,9 @@ func (c *ApiService) PageChannel(ServiceSid string, params *ListChannelParams, p path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Type != nil { for _, item := range *params.Type { @@ -385,7 +393,9 @@ func (c *ApiService) UpdateChannel(ServiceSid string, Sid string, params *Update path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/ip_messaging/v2/services_channels_invites.go b/rest/ip_messaging/v2/services_channels_invites.go index f02e2cbbc..2a84dd9af 100644 --- a/rest/ip_messaging/v2/services_channels_invites.go +++ b/rest/ip_messaging/v2/services_channels_invites.go @@ -47,7 +47,9 @@ func (c *ApiService) CreateInvite(ServiceSid string, ChannelSid string, params * path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -79,7 +81,9 @@ func (c *ApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -99,7 +103,9 @@ func (c *ApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -147,7 +153,9 @@ func (c *ApiService) PageInvite(ServiceSid string, ChannelSid string, params *Li path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { for _, item := range *params.Identity { diff --git a/rest/ip_messaging/v2/services_channels_members.go b/rest/ip_messaging/v2/services_channels_members.go index e3f23a9d7..f33396ada 100644 --- a/rest/ip_messaging/v2/services_channels_members.go +++ b/rest/ip_messaging/v2/services_channels_members.go @@ -84,7 +84,9 @@ func (c *ApiService) CreateMember(ServiceSid string, ChannelSid string, params * path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -145,7 +147,9 @@ func (c *ApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled @@ -168,7 +172,9 @@ func (c *ApiService) FetchMember(ServiceSid string, ChannelSid string, Sid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -216,7 +222,9 @@ func (c *ApiService) PageMember(ServiceSid string, ChannelSid string, params *Li path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { for _, item := range *params.Identity { @@ -390,7 +398,9 @@ func (c *ApiService) UpdateMember(ServiceSid string, ChannelSid string, Sid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) diff --git a/rest/ip_messaging/v2/services_channels_messages.go b/rest/ip_messaging/v2/services_channels_messages.go index d8d0e8415..dc3f08069 100644 --- a/rest/ip_messaging/v2/services_channels_messages.go +++ b/rest/ip_messaging/v2/services_channels_messages.go @@ -84,7 +84,9 @@ func (c *ApiService) CreateMessage(ServiceSid string, ChannelSid string, params path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.From != nil { data.Set("From", *params.From) @@ -145,7 +147,9 @@ func (c *ApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid str path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled @@ -168,7 +172,9 @@ func (c *ApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -216,7 +222,9 @@ func (c *ApiService) PageMessage(ServiceSid string, ChannelSid string, params *L path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Order != nil { data.Set("Order", *params.Order) @@ -388,7 +396,9 @@ func (c *ApiService) UpdateMessage(ServiceSid string, ChannelSid string, Sid str path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Body != nil { data.Set("Body", *params.Body) diff --git a/rest/ip_messaging/v2/services_channels_webhooks.go b/rest/ip_messaging/v2/services_channels_webhooks.go index 76535a9e2..f5383c811 100644 --- a/rest/ip_messaging/v2/services_channels_webhooks.go +++ b/rest/ip_messaging/v2/services_channels_webhooks.go @@ -77,7 +77,9 @@ func (c *ApiService) CreateChannelWebhook(ServiceSid string, ChannelSid string, path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Type != nil { data.Set("Type", *params.Type) @@ -128,7 +130,9 @@ func (c *ApiService) DeleteChannelWebhook(ServiceSid string, ChannelSid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -148,7 +152,9 @@ func (c *ApiService) FetchChannelWebhook(ServiceSid string, ChannelSid string, S path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -190,7 +196,9 @@ func (c *ApiService) PageChannelWebhook(ServiceSid string, ChannelSid string, pa path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -353,7 +361,9 @@ func (c *ApiService) UpdateChannelWebhook(ServiceSid string, ChannelSid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ConfigurationUrl != nil { data.Set("Configuration.Url", *params.ConfigurationUrl) diff --git a/rest/ip_messaging/v2/services_roles.go b/rest/ip_messaging/v2/services_roles.go index 62bc98a4d..f23b0a2f8 100644 --- a/rest/ip_messaging/v2/services_roles.go +++ b/rest/ip_messaging/v2/services_roles.go @@ -52,7 +52,9 @@ func (c *ApiService) CreateRole(ServiceSid string, params *CreateRoleParams) (*I path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -88,7 +90,9 @@ func (c *ApiService) DeleteRole(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -107,7 +111,9 @@ func (c *ApiService) FetchRole(ServiceSid string, Sid string) (*IpMessagingV2Rol path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -148,7 +154,9 @@ func (c *ApiService) PageRole(ServiceSid string, params *ListRoleParams, pageTok path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -280,7 +288,9 @@ func (c *ApiService) UpdateRole(ServiceSid string, Sid string, params *UpdateRol path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Permission != nil { for _, item := range *params.Permission { diff --git a/rest/ip_messaging/v2/services_users.go b/rest/ip_messaging/v2/services_users.go index fbe2eb131..879f15e56 100644 --- a/rest/ip_messaging/v2/services_users.go +++ b/rest/ip_messaging/v2/services_users.go @@ -64,7 +64,9 @@ func (c *ApiService) CreateUser(ServiceSid string, params *CreateUserParams) (*I path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -104,7 +106,9 @@ func (c *ApiService) DeleteUser(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -123,7 +127,9 @@ func (c *ApiService) FetchUser(ServiceSid string, Sid string) (*IpMessagingV2Use path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -164,7 +170,9 @@ func (c *ApiService) PageUser(ServiceSid string, params *ListUserParams, pageTok path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -314,7 +322,9 @@ func (c *ApiService) UpdateUser(ServiceSid string, Sid string, params *UpdateUse path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) diff --git a/rest/ip_messaging/v2/services_users_bindings.go b/rest/ip_messaging/v2/services_users_bindings.go index 3ee4e8c86..fab6679a7 100644 --- a/rest/ip_messaging/v2/services_users_bindings.go +++ b/rest/ip_messaging/v2/services_users_bindings.go @@ -31,7 +31,9 @@ func (c *ApiService) DeleteUserBinding(ServiceSid string, UserSid string, Sid st path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -51,7 +53,9 @@ func (c *ApiService) FetchUserBinding(ServiceSid string, UserSid string, Sid str path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -99,7 +103,9 @@ func (c *ApiService) PageUserBinding(ServiceSid string, UserSid string, params * path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.BindingType != nil { for _, item := range *params.BindingType { diff --git a/rest/ip_messaging/v2/services_users_channels.go b/rest/ip_messaging/v2/services_users_channels.go index 08d882ce7..c151d7675 100644 --- a/rest/ip_messaging/v2/services_users_channels.go +++ b/rest/ip_messaging/v2/services_users_channels.go @@ -32,7 +32,9 @@ func (c *ApiService) DeleteUserChannel(ServiceSid string, UserSid string, Channe path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -52,7 +54,9 @@ func (c *ApiService) FetchUserChannel(ServiceSid string, UserSid string, Channel path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -94,7 +98,9 @@ func (c *ApiService) PageUserChannel(ServiceSid string, UserSid string, params * path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -239,7 +245,9 @@ func (c *ApiService) UpdateUserChannel(ServiceSid string, UserSid string, Channe path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.NotificationLevel != nil { data.Set("NotificationLevel", *params.NotificationLevel) diff --git a/rest/lookups/v1/phone_numbers.go b/rest/lookups/v1/phone_numbers.go index 437c00a8f..4f3eb0a70 100644 --- a/rest/lookups/v1/phone_numbers.go +++ b/rest/lookups/v1/phone_numbers.go @@ -55,7 +55,9 @@ func (c *ApiService) FetchPhoneNumber(PhoneNumber string, params *FetchPhoneNumb path = strings.Replace(path, "{"+"PhoneNumber"+"}", PhoneNumber, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.CountryCode != nil { data.Set("CountryCode", *params.CountryCode) diff --git a/rest/lookups/v2/phone_numbers.go b/rest/lookups/v2/phone_numbers.go index 03f06e4e8..c910595ae 100644 --- a/rest/lookups/v2/phone_numbers.go +++ b/rest/lookups/v2/phone_numbers.go @@ -115,7 +115,9 @@ func (c *ApiService) FetchPhoneNumber(PhoneNumber string, params *FetchPhoneNumb path = strings.Replace(path, "{"+"PhoneNumber"+"}", PhoneNumber, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Fields != nil { data.Set("Fields", *params.Fields) diff --git a/rest/marketplace/v1/available_add_ons.go b/rest/marketplace/v1/available_add_ons.go index ea82ff97c..daa1d6475 100644 --- a/rest/marketplace/v1/available_add_ons.go +++ b/rest/marketplace/v1/available_add_ons.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchMarketplaceAvailableAddOn(Sid string) (*MarketplaceAva path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -68,7 +70,9 @@ func (c *ApiService) PageMarketplaceAvailableAddOn(params *ListMarketplaceAvaila path := "/v1/AvailableAddOns" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/marketplace/v1/available_add_ons_extensions.go b/rest/marketplace/v1/available_add_ons_extensions.go index 2c3cca588..e5bd7e4d9 100644 --- a/rest/marketplace/v1/available_add_ons_extensions.go +++ b/rest/marketplace/v1/available_add_ons_extensions.go @@ -30,7 +30,9 @@ func (c *ApiService) FetchMarketplaceAvailableAddOnExtension(AvailableAddOnSid s path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -71,7 +73,9 @@ func (c *ApiService) PageMarketplaceAvailableAddOnExtension(AvailableAddOnSid st path = strings.Replace(path, "{"+"AvailableAddOnSid"+"}", AvailableAddOnSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/marketplace/v1/installed_add_ons.go b/rest/marketplace/v1/installed_add_ons.go index e9565aeca..656986b6d 100644 --- a/rest/marketplace/v1/installed_add_ons.go +++ b/rest/marketplace/v1/installed_add_ons.go @@ -57,7 +57,9 @@ func (c *ApiService) CreateMarketplaceInstalledAddOn(params *CreateMarketplaceIn path := "/v1/InstalledAddOns" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AvailableAddOnSid != nil { data.Set("AvailableAddOnSid", *params.AvailableAddOnSid) @@ -99,7 +101,9 @@ func (c *ApiService) DeleteMarketplaceInstalledAddOn(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -117,7 +121,9 @@ func (c *ApiService) FetchMarketplaceInstalledAddOn(Sid string) (*MarketplaceIns path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -156,7 +162,9 @@ func (c *ApiService) PageMarketplaceInstalledAddOn(params *ListMarketplaceInstal path := "/v1/InstalledAddOns" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -293,7 +301,9 @@ func (c *ApiService) UpdateMarketplaceInstalledAddOn(Sid string, params *UpdateM path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Configuration != nil { v, err := json.Marshal(params.Configuration) diff --git a/rest/marketplace/v1/installed_add_ons_extensions.go b/rest/marketplace/v1/installed_add_ons_extensions.go index dd0a5226d..0bec97229 100644 --- a/rest/marketplace/v1/installed_add_ons_extensions.go +++ b/rest/marketplace/v1/installed_add_ons_extensions.go @@ -30,7 +30,9 @@ func (c *ApiService) FetchMarketplaceInstalledAddOnExtension(InstalledAddOnSid s path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -71,7 +73,9 @@ func (c *ApiService) PageMarketplaceInstalledAddOnExtension(InstalledAddOnSid st path = strings.Replace(path, "{"+"InstalledAddOnSid"+"}", InstalledAddOnSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -203,7 +207,9 @@ func (c *ApiService) UpdateMarketplaceInstalledAddOnExtension(InstalledAddOnSid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Enabled != nil { data.Set("Enabled", fmt.Sprint(*params.Enabled)) diff --git a/rest/marketplace/v1/listing.go b/rest/marketplace/v1/listing.go index 052986cc6..896bed75b 100644 --- a/rest/marketplace/v1/listing.go +++ b/rest/marketplace/v1/listing.go @@ -26,7 +26,9 @@ func (c *ApiService) FetchMarketplaceModuleDataManagement(Sid string) (*Marketpl path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -84,7 +86,9 @@ func (c *ApiService) UpdateMarketplaceModuleDataManagement(Sid string, params *U path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ModuleInfo != nil { data.Set("ModuleInfo", *params.ModuleInfo) diff --git a/rest/messaging/v1/a2p_brand_registrations.go b/rest/messaging/v1/a2p_brand_registrations.go index a6ce88b3f..9c2a3bc7e 100644 --- a/rest/messaging/v1/a2p_brand_registrations.go +++ b/rest/messaging/v1/a2p_brand_registrations.go @@ -63,7 +63,9 @@ func (c *ApiService) CreateBrandRegistrations(params *CreateBrandRegistrationsPa path := "/v1/a2p/BrandRegistrations" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.CustomerProfileBundleSid != nil { data.Set("CustomerProfileBundleSid", *params.CustomerProfileBundleSid) @@ -102,7 +104,9 @@ func (c *ApiService) FetchBrandRegistrations(Sid string) (*MessagingV1BrandRegis path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -141,7 +145,9 @@ func (c *ApiService) PageBrandRegistrations(params *ListBrandRegistrationsParams path := "/v1/a2p/BrandRegistrations" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -261,7 +267,9 @@ func (c *ApiService) UpdateBrandRegistrations(Sid string) (*MessagingV1BrandRegi path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/messaging/v1/a2p_brand_registrations_sms_otp.go b/rest/messaging/v1/a2p_brand_registrations_sms_otp.go index 17fcb9614..e50d6ace6 100644 --- a/rest/messaging/v1/a2p_brand_registrations_sms_otp.go +++ b/rest/messaging/v1/a2p_brand_registrations_sms_otp.go @@ -26,7 +26,9 @@ func (c *ApiService) CreateBrandRegistrationOtp(BrandRegistrationSid string) (*M path = strings.Replace(path, "{"+"BrandRegistrationSid"+"}", BrandRegistrationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/messaging/v1/a2p_brand_registrations_vettings.go b/rest/messaging/v1/a2p_brand_registrations_vettings.go index b7e46cdcd..6f9d7c524 100644 --- a/rest/messaging/v1/a2p_brand_registrations_vettings.go +++ b/rest/messaging/v1/a2p_brand_registrations_vettings.go @@ -46,7 +46,9 @@ func (c *ApiService) CreateBrandVetting(BrandSid string, params *CreateBrandVett path = strings.Replace(path, "{"+"BrandSid"+"}", BrandSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.VettingProvider != nil { data.Set("VettingProvider", *params.VettingProvider) @@ -77,7 +79,9 @@ func (c *ApiService) FetchBrandVetting(BrandSid string, BrandVettingSid string) path = strings.Replace(path, "{"+"BrandVettingSid"+"}", BrandVettingSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -124,7 +128,9 @@ func (c *ApiService) PageBrandVetting(BrandSid string, params *ListBrandVettingP path = strings.Replace(path, "{"+"BrandSid"+"}", BrandSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.VettingProvider != nil { data.Set("VettingProvider", *params.VettingProvider) diff --git a/rest/messaging/v1/deactivations.go b/rest/messaging/v1/deactivations.go index 198672a9f..534aea74c 100644 --- a/rest/messaging/v1/deactivations.go +++ b/rest/messaging/v1/deactivations.go @@ -36,7 +36,9 @@ func (c *ApiService) FetchDeactivation(params *FetchDeactivationParams) (*Messag path := "/v1/Deactivations" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Date != nil { data.Set("Date", fmt.Sprint(*params.Date)) diff --git a/rest/messaging/v1/link_shortening_domains_certificate.go b/rest/messaging/v1/link_shortening_domains_certificate.go index 8447978d3..18da54871 100644 --- a/rest/messaging/v1/link_shortening_domains_certificate.go +++ b/rest/messaging/v1/link_shortening_domains_certificate.go @@ -26,7 +26,9 @@ func (c *ApiService) DeleteDomainCertV4(DomainSid string) error { path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -44,7 +46,9 @@ func (c *ApiService) FetchDomainCertV4(DomainSid string) (*MessagingV1DomainCert path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -78,7 +82,9 @@ func (c *ApiService) UpdateDomainCertV4(DomainSid string, params *UpdateDomainCe path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.TlsCert != nil { data.Set("TlsCert", *params.TlsCert) diff --git a/rest/messaging/v1/link_shortening_domains_config.go b/rest/messaging/v1/link_shortening_domains_config.go index 04e34b090..4640b96c5 100644 --- a/rest/messaging/v1/link_shortening_domains_config.go +++ b/rest/messaging/v1/link_shortening_domains_config.go @@ -27,7 +27,9 @@ func (c *ApiService) FetchDomainConfig(DomainSid string) (*MessagingV1DomainConf path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -79,7 +81,9 @@ func (c *ApiService) UpdateDomainConfig(DomainSid string, params *UpdateDomainCo path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FallbackUrl != nil { data.Set("FallbackUrl", *params.FallbackUrl) diff --git a/rest/messaging/v1/link_shortening_domains_messaging_services.go b/rest/messaging/v1/link_shortening_domains_messaging_services.go index 44f94e76f..c855ac7e4 100644 --- a/rest/messaging/v1/link_shortening_domains_messaging_services.go +++ b/rest/messaging/v1/link_shortening_domains_messaging_services.go @@ -27,7 +27,9 @@ func (c *ApiService) CreateLinkshorteningMessagingService(DomainSid string, Mess path = strings.Replace(path, "{"+"MessagingServiceSid"+"}", MessagingServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -51,7 +53,9 @@ func (c *ApiService) DeleteLinkshorteningMessagingService(DomainSid string, Mess path = strings.Replace(path, "{"+"MessagingServiceSid"+"}", MessagingServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/messaging/v1/link_shortening_messaging_service_domain_config.go b/rest/messaging/v1/link_shortening_messaging_service_domain_config.go index 9d2291f27..eccc21461 100644 --- a/rest/messaging/v1/link_shortening_messaging_service_domain_config.go +++ b/rest/messaging/v1/link_shortening_messaging_service_domain_config.go @@ -26,7 +26,9 @@ func (c *ApiService) FetchDomainConfigMessagingService(MessagingServiceSid strin path = strings.Replace(path, "{"+"MessagingServiceSid"+"}", MessagingServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/messaging/v1/link_shortening_messaging_services_domain.go b/rest/messaging/v1/link_shortening_messaging_services_domain.go index 5d23d2737..959612813 100644 --- a/rest/messaging/v1/link_shortening_messaging_services_domain.go +++ b/rest/messaging/v1/link_shortening_messaging_services_domain.go @@ -26,7 +26,9 @@ func (c *ApiService) FetchLinkshorteningMessagingServiceDomainAssociation(Messag path = strings.Replace(path, "{"+"MessagingServiceSid"+"}", MessagingServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/messaging/v1/services.go b/rest/messaging/v1/services.go index df8bfbe4a..7afc0f9e9 100644 --- a/rest/messaging/v1/services.go +++ b/rest/messaging/v1/services.go @@ -129,7 +129,9 @@ func (c *ApiService) CreateService(params *CreateServiceParams) (*MessagingV1Ser path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -201,7 +203,9 @@ func (c *ApiService) DeleteService(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -219,7 +223,9 @@ func (c *ApiService) FetchService(Sid string) (*MessagingV1Service, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -258,7 +264,9 @@ func (c *ApiService) PageService(params *ListServiceParams, pageToken, pageNumbe path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -479,7 +487,9 @@ func (c *ApiService) UpdateService(Sid string, params *UpdateServiceParams) (*Me path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/messaging/v1/services_alpha_senders.go b/rest/messaging/v1/services_alpha_senders.go index c8a5639cb..469d8cec6 100644 --- a/rest/messaging/v1/services_alpha_senders.go +++ b/rest/messaging/v1/services_alpha_senders.go @@ -40,7 +40,9 @@ func (c *ApiService) CreateAlphaSender(ServiceSid string, params *CreateAlphaSen path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AlphaSender != nil { data.Set("AlphaSender", *params.AlphaSender) @@ -68,7 +70,9 @@ func (c *ApiService) DeleteAlphaSender(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -87,7 +91,9 @@ func (c *ApiService) FetchAlphaSender(ServiceSid string, Sid string) (*Messaging path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -128,7 +134,9 @@ func (c *ApiService) PageAlphaSender(ServiceSid string, params *ListAlphaSenderP path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/messaging/v1/services_channel_senders.go b/rest/messaging/v1/services_channel_senders.go index 27408c83d..f2e1a829b 100644 --- a/rest/messaging/v1/services_channel_senders.go +++ b/rest/messaging/v1/services_channel_senders.go @@ -30,7 +30,9 @@ func (c *ApiService) FetchChannelSender(MessagingServiceSid string, Sid string) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -71,7 +73,9 @@ func (c *ApiService) PageChannelSender(MessagingServiceSid string, params *ListC path = strings.Replace(path, "{"+"MessagingServiceSid"+"}", MessagingServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/messaging/v1/services_compliance_usa2p.go b/rest/messaging/v1/services_compliance_usa2p.go index c4ee14941..8cd2f9492 100644 --- a/rest/messaging/v1/services_compliance_usa2p.go +++ b/rest/messaging/v1/services_compliance_usa2p.go @@ -130,7 +130,9 @@ func (c *ApiService) CreateUsAppToPerson(MessagingServiceSid string, params *Cre path = strings.Replace(path, "{"+"MessagingServiceSid"+"}", MessagingServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.BrandRegistrationSid != nil { data.Set("BrandRegistrationSid", *params.BrandRegistrationSid) @@ -211,7 +213,9 @@ func (c *ApiService) DeleteUsAppToPerson(MessagingServiceSid string, Sid string) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -230,7 +234,9 @@ func (c *ApiService) FetchUsAppToPerson(MessagingServiceSid string, Sid string) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -271,7 +277,9 @@ func (c *ApiService) PageUsAppToPerson(MessagingServiceSid string, params *ListU path = strings.Replace(path, "{"+"MessagingServiceSid"+"}", MessagingServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -439,7 +447,9 @@ func (c *ApiService) UpdateUsAppToPerson(MessagingServiceSid string, Sid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.HasEmbeddedLinks != nil { data.Set("HasEmbeddedLinks", fmt.Sprint(*params.HasEmbeddedLinks)) diff --git a/rest/messaging/v1/services_compliance_usa2p_usecases.go b/rest/messaging/v1/services_compliance_usa2p_usecases.go index 93a7586c0..34f6527a0 100644 --- a/rest/messaging/v1/services_compliance_usa2p_usecases.go +++ b/rest/messaging/v1/services_compliance_usa2p_usecases.go @@ -37,7 +37,9 @@ func (c *ApiService) FetchUsAppToPersonUsecase(MessagingServiceSid string, param path = strings.Replace(path, "{"+"MessagingServiceSid"+"}", MessagingServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.BrandRegistrationSid != nil { data.Set("BrandRegistrationSid", *params.BrandRegistrationSid) diff --git a/rest/messaging/v1/services_phone_numbers.go b/rest/messaging/v1/services_phone_numbers.go index 1f2f48fbb..644f38e34 100644 --- a/rest/messaging/v1/services_phone_numbers.go +++ b/rest/messaging/v1/services_phone_numbers.go @@ -40,7 +40,9 @@ func (c *ApiService) CreatePhoneNumber(ServiceSid string, params *CreatePhoneNum path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PhoneNumberSid != nil { data.Set("PhoneNumberSid", *params.PhoneNumberSid) @@ -68,7 +70,9 @@ func (c *ApiService) DeletePhoneNumber(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -87,7 +91,9 @@ func (c *ApiService) FetchPhoneNumber(ServiceSid string, Sid string) (*Messaging path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -128,7 +134,9 @@ func (c *ApiService) PagePhoneNumber(ServiceSid string, params *ListPhoneNumberP path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/messaging/v1/services_preregistered_usa2p.go b/rest/messaging/v1/services_preregistered_usa2p.go index f188b45af..92309d9a9 100644 --- a/rest/messaging/v1/services_preregistered_usa2p.go +++ b/rest/messaging/v1/services_preregistered_usa2p.go @@ -41,7 +41,9 @@ func (c *ApiService) CreateExternalCampaign(params *CreateExternalCampaignParams path := "/v1/Services/PreregisteredUsa2p" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.CampaignId != nil { data.Set("CampaignId", *params.CampaignId) diff --git a/rest/messaging/v1/services_short_codes.go b/rest/messaging/v1/services_short_codes.go index 19745e3d4..a776f509f 100644 --- a/rest/messaging/v1/services_short_codes.go +++ b/rest/messaging/v1/services_short_codes.go @@ -40,7 +40,9 @@ func (c *ApiService) CreateShortCode(ServiceSid string, params *CreateShortCodeP path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ShortCodeSid != nil { data.Set("ShortCodeSid", *params.ShortCodeSid) @@ -68,7 +70,9 @@ func (c *ApiService) DeleteShortCode(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -87,7 +91,9 @@ func (c *ApiService) FetchShortCode(ServiceSid string, Sid string) (*MessagingV1 path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -128,7 +134,9 @@ func (c *ApiService) PageShortCode(ServiceSid string, params *ListShortCodeParam path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/messaging/v1/services_usecases.go b/rest/messaging/v1/services_usecases.go index 6fd408723..af836ab9a 100644 --- a/rest/messaging/v1/services_usecases.go +++ b/rest/messaging/v1/services_usecases.go @@ -24,7 +24,9 @@ func (c *ApiService) FetchUsecase() (*MessagingV1Usecase, error) { path := "/v1/Services/Usecases" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/messaging/v1/tollfree_verifications.go b/rest/messaging/v1/tollfree_verifications.go index 051867bed..a7373a870 100644 --- a/rest/messaging/v1/tollfree_verifications.go +++ b/rest/messaging/v1/tollfree_verifications.go @@ -171,7 +171,9 @@ func (c *ApiService) CreateTollfreeVerification(params *CreateTollfreeVerificati path := "/v1/Tollfree/Verifications" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.BusinessName != nil { data.Set("BusinessName", *params.BusinessName) @@ -268,7 +270,9 @@ func (c *ApiService) DeleteTollfreeVerification(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -286,7 +290,9 @@ func (c *ApiService) FetchTollfreeVerification(Sid string) (*MessagingV1Tollfree path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -349,7 +355,9 @@ func (c *ApiService) PageTollfreeVerification(params *ListTollfreeVerificationPa path := "/v1/Tollfree/Verifications" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.TollfreePhoneNumberSid != nil { data.Set("TollfreePhoneNumberSid", *params.TollfreePhoneNumberSid) @@ -612,7 +620,9 @@ func (c *ApiService) UpdateTollfreeVerification(Sid string, params *UpdateTollfr path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.BusinessName != nil { data.Set("BusinessName", *params.BusinessName) diff --git a/rest/microvisor/v1/apps.go b/rest/microvisor/v1/apps.go index 31c92a719..b1a9a7594 100644 --- a/rest/microvisor/v1/apps.go +++ b/rest/microvisor/v1/apps.go @@ -29,7 +29,9 @@ func (c *ApiService) DeleteApp(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -47,7 +49,9 @@ func (c *ApiService) FetchApp(Sid string) (*MicrovisorV1App, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -86,7 +90,9 @@ func (c *ApiService) PageApp(params *ListAppParams, pageToken, pageNumber string path := "/v1/Apps" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/microvisor/v1/apps_manifest.go b/rest/microvisor/v1/apps_manifest.go index c9eb9bf24..141766393 100644 --- a/rest/microvisor/v1/apps_manifest.go +++ b/rest/microvisor/v1/apps_manifest.go @@ -26,7 +26,9 @@ func (c *ApiService) FetchAppManifest(AppSid string) (*MicrovisorV1AppManifest, path = strings.Replace(path, "{"+"AppSid"+"}", AppSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/microvisor/v1/configs.go b/rest/microvisor/v1/configs.go index b1b5ad71e..5690f138b 100644 --- a/rest/microvisor/v1/configs.go +++ b/rest/microvisor/v1/configs.go @@ -45,7 +45,9 @@ func (c *ApiService) CreateAccountConfig(params *CreateAccountConfigParams) (*Mi path := "/v1/Configs" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Key != nil { data.Set("Key", *params.Key) @@ -75,7 +77,9 @@ func (c *ApiService) DeleteAccountConfig(Key string) error { path = strings.Replace(path, "{"+"Key"+"}", Key, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -93,7 +97,9 @@ func (c *ApiService) FetchAccountConfig(Key string) (*MicrovisorV1AccountConfig, path = strings.Replace(path, "{"+"Key"+"}", Key, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -132,7 +138,9 @@ func (c *ApiService) PageAccountConfig(params *ListAccountConfigParams, pageToke path := "/v1/Configs" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -263,7 +271,9 @@ func (c *ApiService) UpdateAccountConfig(Key string, params *UpdateAccountConfig path = strings.Replace(path, "{"+"Key"+"}", Key, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Value != nil { data.Set("Value", *params.Value) diff --git a/rest/microvisor/v1/devices.go b/rest/microvisor/v1/devices.go index 731efd963..99499a5d6 100644 --- a/rest/microvisor/v1/devices.go +++ b/rest/microvisor/v1/devices.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchDevice(Sid string) (*MicrovisorV1Device, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -68,7 +70,9 @@ func (c *ApiService) PageDevice(params *ListDeviceParams, pageToken, pageNumber path := "/v1/Devices" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -217,7 +221,9 @@ func (c *ApiService) UpdateDevice(Sid string, params *UpdateDeviceParams) (*Micr path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) diff --git a/rest/microvisor/v1/devices_configs.go b/rest/microvisor/v1/devices_configs.go index ebaebfb23..46dd40e0d 100644 --- a/rest/microvisor/v1/devices_configs.go +++ b/rest/microvisor/v1/devices_configs.go @@ -46,7 +46,9 @@ func (c *ApiService) CreateDeviceConfig(DeviceSid string, params *CreateDeviceCo path = strings.Replace(path, "{"+"DeviceSid"+"}", DeviceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Key != nil { data.Set("Key", *params.Key) @@ -77,7 +79,9 @@ func (c *ApiService) DeleteDeviceConfig(DeviceSid string, Key string) error { path = strings.Replace(path, "{"+"Key"+"}", Key, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -96,7 +100,9 @@ func (c *ApiService) FetchDeviceConfig(DeviceSid string, Key string) (*Microviso path = strings.Replace(path, "{"+"Key"+"}", Key, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -137,7 +143,9 @@ func (c *ApiService) PageDeviceConfig(DeviceSid string, params *ListDeviceConfig path = strings.Replace(path, "{"+"DeviceSid"+"}", DeviceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -269,7 +277,9 @@ func (c *ApiService) UpdateDeviceConfig(DeviceSid string, Key string, params *Up path = strings.Replace(path, "{"+"Key"+"}", Key, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Value != nil { data.Set("Value", *params.Value) diff --git a/rest/microvisor/v1/devices_secrets.go b/rest/microvisor/v1/devices_secrets.go index be0e7320a..9558333f7 100644 --- a/rest/microvisor/v1/devices_secrets.go +++ b/rest/microvisor/v1/devices_secrets.go @@ -46,7 +46,9 @@ func (c *ApiService) CreateDeviceSecret(DeviceSid string, params *CreateDeviceSe path = strings.Replace(path, "{"+"DeviceSid"+"}", DeviceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Key != nil { data.Set("Key", *params.Key) @@ -77,7 +79,9 @@ func (c *ApiService) DeleteDeviceSecret(DeviceSid string, Key string) error { path = strings.Replace(path, "{"+"Key"+"}", Key, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -96,7 +100,9 @@ func (c *ApiService) FetchDeviceSecret(DeviceSid string, Key string) (*Microviso path = strings.Replace(path, "{"+"Key"+"}", Key, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -137,7 +143,9 @@ func (c *ApiService) PageDeviceSecret(DeviceSid string, params *ListDeviceSecret path = strings.Replace(path, "{"+"DeviceSid"+"}", DeviceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -269,7 +277,9 @@ func (c *ApiService) UpdateDeviceSecret(DeviceSid string, Key string, params *Up path = strings.Replace(path, "{"+"Key"+"}", Key, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Value != nil { data.Set("Value", *params.Value) diff --git a/rest/microvisor/v1/secrets.go b/rest/microvisor/v1/secrets.go index 12d2ce8e1..39a5f8064 100644 --- a/rest/microvisor/v1/secrets.go +++ b/rest/microvisor/v1/secrets.go @@ -45,7 +45,9 @@ func (c *ApiService) CreateAccountSecret(params *CreateAccountSecretParams) (*Mi path := "/v1/Secrets" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Key != nil { data.Set("Key", *params.Key) @@ -75,7 +77,9 @@ func (c *ApiService) DeleteAccountSecret(Key string) error { path = strings.Replace(path, "{"+"Key"+"}", Key, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -93,7 +97,9 @@ func (c *ApiService) FetchAccountSecret(Key string) (*MicrovisorV1AccountSecret, path = strings.Replace(path, "{"+"Key"+"}", Key, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -132,7 +138,9 @@ func (c *ApiService) PageAccountSecret(params *ListAccountSecretParams, pageToke path := "/v1/Secrets" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -263,7 +271,9 @@ func (c *ApiService) UpdateAccountSecret(Key string, params *UpdateAccountSecret path = strings.Replace(path, "{"+"Key"+"}", Key, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Value != nil { data.Set("Value", *params.Value) diff --git a/rest/monitor/v1/alerts.go b/rest/monitor/v1/alerts.go index 7fc808c65..6421e3004 100644 --- a/rest/monitor/v1/alerts.go +++ b/rest/monitor/v1/alerts.go @@ -30,7 +30,9 @@ func (c *ApiService) FetchAlert(Sid string) (*MonitorV1AlertInstance, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -87,7 +89,9 @@ func (c *ApiService) PageAlert(params *ListAlertParams, pageToken, pageNumber st path := "/v1/Alerts" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.LogLevel != nil { data.Set("LogLevel", *params.LogLevel) diff --git a/rest/monitor/v1/events.go b/rest/monitor/v1/events.go index 98492ac46..7c778aa07 100644 --- a/rest/monitor/v1/events.go +++ b/rest/monitor/v1/events.go @@ -30,7 +30,9 @@ func (c *ApiService) FetchEvent(Sid string) (*MonitorV1Event, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -105,7 +107,9 @@ func (c *ApiService) PageEvent(params *ListEventParams, pageToken, pageNumber st path := "/v1/Events" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ActorSid != nil { data.Set("ActorSid", *params.ActorSid) diff --git a/rest/notify/v1/credentials.go b/rest/notify/v1/credentials.go index 196d912d3..46e3ad9b4 100644 --- a/rest/notify/v1/credentials.go +++ b/rest/notify/v1/credentials.go @@ -75,7 +75,9 @@ func (c *ApiService) CreateCredential(params *CreateCredentialParams) (*NotifyV1 path := "/v1/Credentials" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Type != nil { data.Set("Type", *params.Type) @@ -120,7 +122,9 @@ func (c *ApiService) DeleteCredential(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -138,7 +142,9 @@ func (c *ApiService) FetchCredential(Sid string) (*NotifyV1Credential, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -177,7 +183,9 @@ func (c *ApiService) PageCredential(params *ListCredentialParams, pageToken, pag path := "/v1/Credentials" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -338,7 +346,9 @@ func (c *ApiService) UpdateCredential(Sid string, params *UpdateCredentialParams path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/notify/v1/services.go b/rest/notify/v1/services.go index e19cdb3d3..ea47b0e2e 100644 --- a/rest/notify/v1/services.go +++ b/rest/notify/v1/services.go @@ -117,7 +117,9 @@ func (c *ApiService) CreateService(params *CreateServiceParams) (*NotifyV1Servic path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -183,7 +185,9 @@ func (c *ApiService) DeleteService(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -201,7 +205,9 @@ func (c *ApiService) FetchService(Sid string) (*NotifyV1Service, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -246,7 +252,9 @@ func (c *ApiService) PageService(params *ListServiceParams, pageToken, pageNumbe path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -458,7 +466,9 @@ func (c *ApiService) UpdateService(Sid string, params *UpdateServiceParams) (*No path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/notify/v1/services_bindings.go b/rest/notify/v1/services_bindings.go index 6240d68eb..053c89140 100644 --- a/rest/notify/v1/services_bindings.go +++ b/rest/notify/v1/services_bindings.go @@ -76,7 +76,9 @@ func (c *ApiService) CreateBinding(ServiceSid string, params *CreateBindingParam path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -124,7 +126,9 @@ func (c *ApiService) DeleteBinding(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -143,7 +147,9 @@ func (c *ApiService) FetchBinding(ServiceSid string, Sid string) (*NotifyV1Bindi path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -208,7 +214,9 @@ func (c *ApiService) PageBinding(ServiceSid string, params *ListBindingParams, p path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.StartDate != nil { data.Set("StartDate", fmt.Sprint(*params.StartDate)) diff --git a/rest/notify/v1/services_notifications.go b/rest/notify/v1/services_notifications.go index 8a1f70e1f..79a85353f 100644 --- a/rest/notify/v1/services_notifications.go +++ b/rest/notify/v1/services_notifications.go @@ -140,7 +140,9 @@ func (c *ApiService) CreateNotification(ServiceSid string, params *CreateNotific path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Body != nil { data.Set("Body", *params.Body) diff --git a/rest/numbers/v1/docs/NumbersV1PortingPortIn.md b/rest/numbers/v1/docs/NumbersV1PortingPortIn.md index aa225c809..ef2b24459 100644 --- a/rest/numbers/v1/docs/NumbersV1PortingPortIn.md +++ b/rest/numbers/v1/docs/NumbersV1PortingPortIn.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **LosingCarrierInformation** | Pointer to **interface{}** | The information for the losing carrier. | **PhoneNumbers** | Pointer to **[]interface{}** | The list of phone numbers to Port in. Phone numbers are in E.164 format (e.g. +16175551212). | **Documents** | Pointer to **[]string** | The list of documents SID referencing a utility bills | +**DateCreated** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/numbers/v1/docs/NumbersV1PortingPortInPhoneNumber.md b/rest/numbers/v1/docs/NumbersV1PortingPortInPhoneNumber.md index f4bc0b16f..0acf99887 100644 --- a/rest/numbers/v1/docs/NumbersV1PortingPortInPhoneNumber.md +++ b/rest/numbers/v1/docs/NumbersV1PortingPortInPhoneNumber.md @@ -12,12 +12,15 @@ Name | Type | Description | Notes **DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date when the phone number was created. | **Country** | Pointer to **string** | The country of the phone number. | **MissingRequiredFields** | Pointer to **bool** | The phone number is missing required fields. | -**StatusLastTimeUpdatedTimestamp** | Pointer to [**time.Time**](time.Time.md) | The timestamp when the status was last updated. | +**LastUpdated** | Pointer to [**time.Time**](time.Time.md) | The timestamp when the status was last updated. | **PhoneNumber** | Pointer to **string** | The phone number. | **Portable** | Pointer to **bool** | The phone number is portable. | **NotPortabilityReason** | Pointer to **string** | The reason why the phone number is not portable. | -**NotPortabilityReasonCode** | Pointer to **string** | The code of the reason why the phone number is not portable. | +**NotPortabilityReasonCode** | Pointer to **int** | The code of the reason why the phone number is not portable. | **PortInPhoneNumberStatus** | Pointer to **string** | The status of the phone number in the port in request. | +**PortOutPin** | Pointer to **int** | The pin required for the losing carrier to port out the phone number. | +**RejectionReason** | Pointer to **string** | The rejection reason returned by the vendor. | +**RejectionReasonCode** | Pointer to **int** | The rejection reason code returned by the vendor. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/numbers/v1/docs/NumbersV1PortingPortability.md b/rest/numbers/v1/docs/NumbersV1PortingPortability.md index a70c43540..0718db555 100644 --- a/rest/numbers/v1/docs/NumbersV1PortingPortability.md +++ b/rest/numbers/v1/docs/NumbersV1PortingPortability.md @@ -12,8 +12,6 @@ Name | Type | Description | Notes **NotPortableReasonCode** | Pointer to **int** | The Portability Reason Code for the phone number if it cannot be ported into Twilio, `null` otherwise. One of `22131`, `22132`, `22130`, `22133`, `22102` or `22135`. | **NumberType** | Pointer to [**string**](PortingPortabilityEnumNumberType.md) | | **Country** | Pointer to **string** | Country the phone number belongs to. | -**MessagingCarrier** | Pointer to **string** | Current messaging carrier of the phone number | -**VoiceCarrier** | Pointer to **string** | Current voice carrier of the phone number | **Url** | Pointer to **string** | This is the url of the request that you're trying to reach out to locate the resource. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/numbers/v1/hosted_number_eligibility_bulk.go b/rest/numbers/v1/hosted_number_eligibility_bulk.go index 043370f95..80a3dcab4 100644 --- a/rest/numbers/v1/hosted_number_eligibility_bulk.go +++ b/rest/numbers/v1/hosted_number_eligibility_bulk.go @@ -70,7 +70,9 @@ func (c *ApiService) FetchBulkEligibility(RequestId string) (*NumbersV1BulkEligi path = strings.Replace(path, "{"+"RequestId"+"}", RequestId, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/numbers/v1/model_numbers_v1_porting_port_in.go b/rest/numbers/v1/model_numbers_v1_porting_port_in.go index f4d96746e..91b0fdfca 100644 --- a/rest/numbers/v1/model_numbers_v1_porting_port_in.go +++ b/rest/numbers/v1/model_numbers_v1_porting_port_in.go @@ -37,5 +37,6 @@ type NumbersV1PortingPortIn struct { // The list of phone numbers to Port in. Phone numbers are in E.164 format (e.g. +16175551212). PhoneNumbers *[]interface{} `json:"phone_numbers,omitempty"` // The list of documents SID referencing a utility bills - Documents *[]string `json:"documents,omitempty"` + Documents *[]string `json:"documents,omitempty"` + DateCreated *string `json:"date_created,omitempty"` } diff --git a/rest/numbers/v1/model_numbers_v1_porting_port_in_phone_number.go b/rest/numbers/v1/model_numbers_v1_porting_port_in_phone_number.go index 8a4f6a4ce..749aa5bf5 100644 --- a/rest/numbers/v1/model_numbers_v1_porting_port_in_phone_number.go +++ b/rest/numbers/v1/model_numbers_v1_porting_port_in_phone_number.go @@ -36,7 +36,7 @@ type NumbersV1PortingPortInPhoneNumber struct { // The phone number is missing required fields. MissingRequiredFields *bool `json:"missing_required_fields,omitempty"` // The timestamp when the status was last updated. - StatusLastTimeUpdatedTimestamp *time.Time `json:"status_last_time_updated_timestamp,omitempty"` + LastUpdated *time.Time `json:"last_updated,omitempty"` // The phone number. PhoneNumber *string `json:"phone_number,omitempty"` // The phone number is portable. @@ -44,7 +44,13 @@ type NumbersV1PortingPortInPhoneNumber struct { // The reason why the phone number is not portable. NotPortabilityReason *string `json:"not_portability_reason,omitempty"` // The code of the reason why the phone number is not portable. - NotPortabilityReasonCode *string `json:"not_portability_reason_code,omitempty"` + NotPortabilityReasonCode *int `json:"not_portability_reason_code,omitempty"` // The status of the phone number in the port in request. PortInPhoneNumberStatus *string `json:"port_in_phone_number_status,omitempty"` + // The pin required for the losing carrier to port out the phone number. + PortOutPin *int `json:"port_out_pin,omitempty"` + // The rejection reason returned by the vendor. + RejectionReason *string `json:"rejection_reason,omitempty"` + // The rejection reason code returned by the vendor. + RejectionReasonCode *int `json:"rejection_reason_code,omitempty"` } diff --git a/rest/numbers/v1/model_numbers_v1_porting_portability.go b/rest/numbers/v1/model_numbers_v1_porting_portability.go index ffd6bd962..7fe2a6baf 100644 --- a/rest/numbers/v1/model_numbers_v1_porting_portability.go +++ b/rest/numbers/v1/model_numbers_v1_porting_portability.go @@ -31,10 +31,6 @@ type NumbersV1PortingPortability struct { NumberType *string `json:"number_type,omitempty"` // Country the phone number belongs to. Country *string `json:"country,omitempty"` - // Current messaging carrier of the phone number - MessagingCarrier *string `json:"messaging_carrier,omitempty"` - // Current voice carrier of the phone number - VoiceCarrier *string `json:"voice_carrier,omitempty"` // This is the url of the request that you're trying to reach out to locate the resource. Url *string `json:"url,omitempty"` } diff --git a/rest/numbers/v1/porting_configuration_webhook.go b/rest/numbers/v1/porting_configuration_webhook.go index d6218f356..d2be62aa1 100644 --- a/rest/numbers/v1/porting_configuration_webhook.go +++ b/rest/numbers/v1/porting_configuration_webhook.go @@ -70,7 +70,9 @@ func (c *ApiService) DeletePortingWebhookConfigurationDelete(WebhookType string) path = strings.Replace(path, "{"+"WebhookType"+"}", WebhookType, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -87,7 +89,9 @@ func (c *ApiService) FetchPortingWebhookConfigurationFetch() (*NumbersV1PortingW path := "/v1/Porting/Configuration/Webhook" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/numbers/v1/porting_port_in.go b/rest/numbers/v1/porting_port_in.go index c9dc08276..7b026458a 100644 --- a/rest/numbers/v1/porting_port_in.go +++ b/rest/numbers/v1/porting_port_in.go @@ -70,7 +70,9 @@ func (c *ApiService) DeletePortingPortIn(PortInRequestSid string) error { path = strings.Replace(path, "{"+"PortInRequestSid"+"}", PortInRequestSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -88,7 +90,9 @@ func (c *ApiService) FetchPortingPortIn(PortInRequestSid string) (*NumbersV1Port path = strings.Replace(path, "{"+"PortInRequestSid"+"}", PortInRequestSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/numbers/v1/porting_port_in_phone_number.go b/rest/numbers/v1/porting_port_in_phone_number.go index 04f735aa9..6e7b2f633 100644 --- a/rest/numbers/v1/porting_port_in_phone_number.go +++ b/rest/numbers/v1/porting_port_in_phone_number.go @@ -27,7 +27,9 @@ func (c *ApiService) DeletePortingPortInPhoneNumber(PortInRequestSid string, Pho path = strings.Replace(path, "{"+"PhoneNumberSid"+"}", PhoneNumberSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -46,7 +48,9 @@ func (c *ApiService) FetchPortingPortInPhoneNumber(PortInRequestSid string, Phon path = strings.Replace(path, "{"+"PhoneNumberSid"+"}", PhoneNumberSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/numbers/v1/porting_portability_phone_number.go b/rest/numbers/v1/porting_portability_phone_number.go index 22279148c..54793a3c1 100644 --- a/rest/numbers/v1/porting_portability_phone_number.go +++ b/rest/numbers/v1/porting_portability_phone_number.go @@ -37,7 +37,9 @@ func (c *ApiService) FetchPortingPortability(PhoneNumber string, params *FetchPo path = strings.Replace(path, "{"+"PhoneNumber"+"}", PhoneNumber, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.TargetAccountSid != nil { data.Set("TargetAccountSid", *params.TargetAccountSid) diff --git a/rest/numbers/v2/hosted_number_authorization_documents.go b/rest/numbers/v2/hosted_number_authorization_documents.go index f258fe604..9df92c327 100644 --- a/rest/numbers/v2/hosted_number_authorization_documents.go +++ b/rest/numbers/v2/hosted_number_authorization_documents.go @@ -69,7 +69,9 @@ func (c *ApiService) CreateAuthorizationDocument(params *CreateAuthorizationDocu path := "/v2/HostedNumber/AuthorizationDocuments" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AddressSid != nil { data.Set("AddressSid", *params.AddressSid) @@ -115,7 +117,9 @@ func (c *ApiService) DeleteAuthorizationDocument(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -133,7 +137,9 @@ func (c *ApiService) FetchAuthorizationDocument(Sid string) (*NumbersV2Authoriza path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -184,7 +190,9 @@ func (c *ApiService) PageAuthorizationDocument(params *ListAuthorizationDocument path := "/v2/HostedNumber/AuthorizationDocuments" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Email != nil { data.Set("Email", *params.Email) diff --git a/rest/numbers/v2/hosted_number_authorization_documents_dependent_hosted_number_orders.go b/rest/numbers/v2/hosted_number_authorization_documents_dependent_hosted_number_orders.go index 5e5c55323..d4bf9cf75 100644 --- a/rest/numbers/v2/hosted_number_authorization_documents_dependent_hosted_number_orders.go +++ b/rest/numbers/v2/hosted_number_authorization_documents_dependent_hosted_number_orders.go @@ -71,7 +71,9 @@ func (c *ApiService) PageDependentHostedNumberOrder(SigningDocumentSid string, p path = strings.Replace(path, "{"+"SigningDocumentSid"+"}", SigningDocumentSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/numbers/v2/hosted_number_orders.go b/rest/numbers/v2/hosted_number_orders.go index 2b61d2000..c9cc95e42 100644 --- a/rest/numbers/v2/hosted_number_orders.go +++ b/rest/numbers/v2/hosted_number_orders.go @@ -129,7 +129,9 @@ func (c *ApiService) CreateHostedNumberOrder(params *CreateHostedNumberOrderPara path := "/v2/HostedNumber/Orders" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PhoneNumber != nil { data.Set("PhoneNumber", *params.PhoneNumber) @@ -203,7 +205,9 @@ func (c *ApiService) DeleteHostedNumberOrder(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -221,7 +225,9 @@ func (c *ApiService) FetchHostedNumberOrder(Sid string) (*NumbersV2HostedNumberO path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -290,7 +296,9 @@ func (c *ApiService) PageHostedNumberOrder(params *ListHostedNumberOrderParams, path := "/v2/HostedNumber/Orders" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/numbers/v2/hosted_number_orders_bulk.go b/rest/numbers/v2/hosted_number_orders_bulk.go index 4cecf1269..61abc2457 100644 --- a/rest/numbers/v2/hosted_number_orders_bulk.go +++ b/rest/numbers/v2/hosted_number_orders_bulk.go @@ -81,7 +81,9 @@ func (c *ApiService) FetchBulkHostedNumberOrder(BulkHostingSid string, params *F path = strings.Replace(path, "{"+"BulkHostingSid"+"}", BulkHostingSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.OrderStatus != nil { data.Set("OrderStatus", *params.OrderStatus) diff --git a/rest/numbers/v2/regulatory_compliance_bundles.go b/rest/numbers/v2/regulatory_compliance_bundles.go index cd0a3c8d2..e82ae95e0 100644 --- a/rest/numbers/v2/regulatory_compliance_bundles.go +++ b/rest/numbers/v2/regulatory_compliance_bundles.go @@ -76,7 +76,9 @@ func (c *ApiService) CreateBundle(params *CreateBundleParams) (*NumbersV2Bundle, path := "/v2/RegulatoryCompliance/Bundles" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -121,7 +123,9 @@ func (c *ApiService) DeleteBundle(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -139,7 +143,9 @@ func (c *ApiService) FetchBundle(Sid string) (*NumbersV2Bundle, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -244,7 +250,9 @@ func (c *ApiService) PageBundle(params *ListBundleParams, pageToken, pageNumber path := "/v2/RegulatoryCompliance/Bundles" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) @@ -426,7 +434,9 @@ func (c *ApiService) UpdateBundle(Sid string, params *UpdateBundleParams) (*Numb path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/numbers/v2/regulatory_compliance_bundles_copies.go b/rest/numbers/v2/regulatory_compliance_bundles_copies.go index b8e6f66e3..69835a3cb 100644 --- a/rest/numbers/v2/regulatory_compliance_bundles_copies.go +++ b/rest/numbers/v2/regulatory_compliance_bundles_copies.go @@ -40,7 +40,9 @@ func (c *ApiService) CreateBundleCopy(BundleSid string, params *CreateBundleCopy path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -85,7 +87,9 @@ func (c *ApiService) PageBundleCopy(BundleSid string, params *ListBundleCopyPara path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/numbers/v2/regulatory_compliance_bundles_evaluations.go b/rest/numbers/v2/regulatory_compliance_bundles_evaluations.go index b40de2007..2b69e24ec 100644 --- a/rest/numbers/v2/regulatory_compliance_bundles_evaluations.go +++ b/rest/numbers/v2/regulatory_compliance_bundles_evaluations.go @@ -29,7 +29,9 @@ func (c *ApiService) CreateEvaluation(BundleSid string) (*NumbersV2Evaluation, e path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -53,7 +55,9 @@ func (c *ApiService) FetchEvaluation(BundleSid string, Sid string) (*NumbersV2Ev path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -94,7 +98,9 @@ func (c *ApiService) PageEvaluation(BundleSid string, params *ListEvaluationPara path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/numbers/v2/regulatory_compliance_bundles_item_assignments.go b/rest/numbers/v2/regulatory_compliance_bundles_item_assignments.go index bdc63e88c..d22ac33e1 100644 --- a/rest/numbers/v2/regulatory_compliance_bundles_item_assignments.go +++ b/rest/numbers/v2/regulatory_compliance_bundles_item_assignments.go @@ -40,7 +40,9 @@ func (c *ApiService) CreateItemAssignment(BundleSid string, params *CreateItemAs path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ObjectSid != nil { data.Set("ObjectSid", *params.ObjectSid) @@ -68,7 +70,9 @@ func (c *ApiService) DeleteItemAssignment(BundleSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -87,7 +91,9 @@ func (c *ApiService) FetchItemAssignment(BundleSid string, Sid string) (*Numbers path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -128,7 +134,9 @@ func (c *ApiService) PageItemAssignment(BundleSid string, params *ListItemAssign path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/numbers/v2/regulatory_compliance_bundles_replace_items.go b/rest/numbers/v2/regulatory_compliance_bundles_replace_items.go index 47fdfeafd..b74c5c917 100644 --- a/rest/numbers/v2/regulatory_compliance_bundles_replace_items.go +++ b/rest/numbers/v2/regulatory_compliance_bundles_replace_items.go @@ -37,7 +37,9 @@ func (c *ApiService) CreateReplaceItems(BundleSid string, params *CreateReplaceI path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FromBundleSid != nil { data.Set("FromBundleSid", *params.FromBundleSid) diff --git a/rest/numbers/v2/regulatory_compliance_end_user_types.go b/rest/numbers/v2/regulatory_compliance_end_user_types.go index 586950315..feb306891 100644 --- a/rest/numbers/v2/regulatory_compliance_end_user_types.go +++ b/rest/numbers/v2/regulatory_compliance_end_user_types.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchEndUserType(Sid string) (*NumbersV2EndUserType, error) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -68,7 +70,9 @@ func (c *ApiService) PageEndUserType(params *ListEndUserTypeParams, pageToken, p path := "/v2/RegulatoryCompliance/EndUserTypes" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/numbers/v2/regulatory_compliance_end_users.go b/rest/numbers/v2/regulatory_compliance_end_users.go index 334497be3..83d445939 100644 --- a/rest/numbers/v2/regulatory_compliance_end_users.go +++ b/rest/numbers/v2/regulatory_compliance_end_users.go @@ -51,7 +51,9 @@ func (c *ApiService) CreateEndUser(params *CreateEndUserParams) (*NumbersV2EndUs path := "/v2/RegulatoryCompliance/EndUsers" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -90,7 +92,9 @@ func (c *ApiService) DeleteEndUser(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -108,7 +112,9 @@ func (c *ApiService) FetchEndUser(Sid string) (*NumbersV2EndUser, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -147,7 +153,9 @@ func (c *ApiService) PageEndUser(params *ListEndUserParams, pageToken, pageNumbe path := "/v2/RegulatoryCompliance/EndUsers" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -284,7 +292,9 @@ func (c *ApiService) UpdateEndUser(Sid string, params *UpdateEndUserParams) (*Nu path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/numbers/v2/regulatory_compliance_regulations.go b/rest/numbers/v2/regulatory_compliance_regulations.go index f4d28ab92..92c9fd82e 100644 --- a/rest/numbers/v2/regulatory_compliance_regulations.go +++ b/rest/numbers/v2/regulatory_compliance_regulations.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchRegulation(Sid string) (*NumbersV2Regulation, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -86,7 +88,9 @@ func (c *ApiService) PageRegulation(params *ListRegulationParams, pageToken, pag path := "/v2/RegulatoryCompliance/Regulations" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.EndUserType != nil { data.Set("EndUserType", *params.EndUserType) diff --git a/rest/numbers/v2/regulatory_compliance_supporting_document_types.go b/rest/numbers/v2/regulatory_compliance_supporting_document_types.go index 8891d7476..7c6653ce8 100644 --- a/rest/numbers/v2/regulatory_compliance_supporting_document_types.go +++ b/rest/numbers/v2/regulatory_compliance_supporting_document_types.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchSupportingDocumentType(Sid string) (*NumbersV2Supporti path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -68,7 +70,9 @@ func (c *ApiService) PageSupportingDocumentType(params *ListSupportingDocumentTy path := "/v2/RegulatoryCompliance/SupportingDocumentTypes" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/numbers/v2/regulatory_compliance_supporting_documents.go b/rest/numbers/v2/regulatory_compliance_supporting_documents.go index 596fc9232..07d572130 100644 --- a/rest/numbers/v2/regulatory_compliance_supporting_documents.go +++ b/rest/numbers/v2/regulatory_compliance_supporting_documents.go @@ -51,7 +51,9 @@ func (c *ApiService) CreateSupportingDocument(params *CreateSupportingDocumentPa path := "/v2/RegulatoryCompliance/SupportingDocuments" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -90,7 +92,9 @@ func (c *ApiService) DeleteSupportingDocument(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -108,7 +112,9 @@ func (c *ApiService) FetchSupportingDocument(Sid string) (*NumbersV2SupportingDo path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -147,7 +153,9 @@ func (c *ApiService) PageSupportingDocument(params *ListSupportingDocumentParams path := "/v2/RegulatoryCompliance/SupportingDocuments" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -284,7 +292,9 @@ func (c *ApiService) UpdateSupportingDocument(Sid string, params *UpdateSupporti path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/oauth/v1/authorize.go b/rest/oauth/v1/authorize.go index 6c6b9f7d4..ac809f114 100644 --- a/rest/oauth/v1/authorize.go +++ b/rest/oauth/v1/authorize.go @@ -59,7 +59,9 @@ func (c *ApiService) FetchAuthorize(params *FetchAuthorizeParams) (*OauthV1Autho path := "/v1/authorize" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ResponseType != nil { data.Set("ResponseType", *params.ResponseType) diff --git a/rest/oauth/v1/token.go b/rest/oauth/v1/token.go index b04716351..14b540781 100644 --- a/rest/oauth/v1/token.go +++ b/rest/oauth/v1/token.go @@ -77,7 +77,9 @@ func (c *ApiService) CreateToken(params *CreateTokenParams) (*OauthV1Token, erro path := "/v1/token" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.GrantType != nil { data.Set("GrantType", *params.GrantType) diff --git a/rest/pricing/v1/messaging_countries.go b/rest/pricing/v1/messaging_countries.go index 44948443b..623db10b8 100644 --- a/rest/pricing/v1/messaging_countries.go +++ b/rest/pricing/v1/messaging_countries.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchMessagingCountry(IsoCountry string) (*PricingV1Messagi path = strings.Replace(path, "{"+"IsoCountry"+"}", IsoCountry, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -68,7 +70,9 @@ func (c *ApiService) PageMessagingCountry(params *ListMessagingCountryParams, pa path := "/v1/Messaging/Countries" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/pricing/v1/phone_numbers_countries.go b/rest/pricing/v1/phone_numbers_countries.go index 45e54bb34..ee3b5cba1 100644 --- a/rest/pricing/v1/phone_numbers_countries.go +++ b/rest/pricing/v1/phone_numbers_countries.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchPhoneNumberCountry(IsoCountry string) (*PricingV1Phone path = strings.Replace(path, "{"+"IsoCountry"+"}", IsoCountry, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -68,7 +70,9 @@ func (c *ApiService) PagePhoneNumberCountry(params *ListPhoneNumberCountryParams path := "/v1/PhoneNumbers/Countries" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/pricing/v1/voice_countries.go b/rest/pricing/v1/voice_countries.go index 97a5dce22..48bd17bfc 100644 --- a/rest/pricing/v1/voice_countries.go +++ b/rest/pricing/v1/voice_countries.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchVoiceCountry(IsoCountry string) (*PricingV1VoiceCountr path = strings.Replace(path, "{"+"IsoCountry"+"}", IsoCountry, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -68,7 +70,9 @@ func (c *ApiService) PageVoiceCountry(params *ListVoiceCountryParams, pageToken, path := "/v1/Voice/Countries" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/pricing/v1/voice_numbers.go b/rest/pricing/v1/voice_numbers.go index a7993a1bb..b4cdf9750 100644 --- a/rest/pricing/v1/voice_numbers.go +++ b/rest/pricing/v1/voice_numbers.go @@ -26,7 +26,9 @@ func (c *ApiService) FetchVoiceNumber(Number string) (*PricingV1VoiceNumber, err path = strings.Replace(path, "{"+"Number"+"}", Number, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/pricing/v2/trunking_countries.go b/rest/pricing/v2/trunking_countries.go index 4a8b32d7c..94c1d3395 100644 --- a/rest/pricing/v2/trunking_countries.go +++ b/rest/pricing/v2/trunking_countries.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchTrunkingCountry(IsoCountry string) (*PricingV2Trunking path = strings.Replace(path, "{"+"IsoCountry"+"}", IsoCountry, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -68,7 +70,9 @@ func (c *ApiService) PageTrunkingCountry(params *ListTrunkingCountryParams, page path := "/v2/Trunking/Countries" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/pricing/v2/trunking_numbers.go b/rest/pricing/v2/trunking_numbers.go index 7ecd14fe0..5e17e51af 100644 --- a/rest/pricing/v2/trunking_numbers.go +++ b/rest/pricing/v2/trunking_numbers.go @@ -37,7 +37,9 @@ func (c *ApiService) FetchTrunkingNumber(DestinationNumber string, params *Fetch path = strings.Replace(path, "{"+"DestinationNumber"+"}", DestinationNumber, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.OriginationNumber != nil { data.Set("OriginationNumber", *params.OriginationNumber) diff --git a/rest/pricing/v2/voice_countries.go b/rest/pricing/v2/voice_countries.go index 21ba246d8..5b68817be 100644 --- a/rest/pricing/v2/voice_countries.go +++ b/rest/pricing/v2/voice_countries.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchVoiceCountry(IsoCountry string) (*PricingV2VoiceCountr path = strings.Replace(path, "{"+"IsoCountry"+"}", IsoCountry, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -68,7 +70,9 @@ func (c *ApiService) PageVoiceCountry(params *ListVoiceCountryParams, pageToken, path := "/v2/Voice/Countries" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/pricing/v2/voice_numbers.go b/rest/pricing/v2/voice_numbers.go index bb56cee05..96ba0bc66 100644 --- a/rest/pricing/v2/voice_numbers.go +++ b/rest/pricing/v2/voice_numbers.go @@ -37,7 +37,9 @@ func (c *ApiService) FetchVoiceNumber(DestinationNumber string, params *FetchVoi path = strings.Replace(path, "{"+"DestinationNumber"+"}", DestinationNumber, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.OriginationNumber != nil { data.Set("OriginationNumber", *params.OriginationNumber) diff --git a/rest/proxy/v1/services.go b/rest/proxy/v1/services.go index 20600cde4..7b48c41ac 100644 --- a/rest/proxy/v1/services.go +++ b/rest/proxy/v1/services.go @@ -81,7 +81,9 @@ func (c *ApiService) CreateService(params *CreateServiceParams) (*ProxyV1Service path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) @@ -129,7 +131,9 @@ func (c *ApiService) DeleteService(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -147,7 +151,9 @@ func (c *ApiService) FetchService(Sid string) (*ProxyV1Service, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -186,7 +192,9 @@ func (c *ApiService) PageService(params *ListServiceParams, pageToken, pageNumbe path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -359,7 +367,9 @@ func (c *ApiService) UpdateService(Sid string, params *UpdateServiceParams) (*Pr path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) diff --git a/rest/proxy/v1/services_phone_numbers.go b/rest/proxy/v1/services_phone_numbers.go index be0ae2d89..1f6af5057 100644 --- a/rest/proxy/v1/services_phone_numbers.go +++ b/rest/proxy/v1/services_phone_numbers.go @@ -52,7 +52,9 @@ func (c *ApiService) CreatePhoneNumber(ServiceSid string, params *CreatePhoneNum path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Sid != nil { data.Set("Sid", *params.Sid) @@ -86,7 +88,9 @@ func (c *ApiService) DeletePhoneNumber(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -105,7 +109,9 @@ func (c *ApiService) FetchPhoneNumber(ServiceSid string, Sid string) (*ProxyV1Ph path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -146,7 +152,9 @@ func (c *ApiService) PagePhoneNumber(ServiceSid string, params *ListPhoneNumberP path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -278,7 +286,9 @@ func (c *ApiService) UpdatePhoneNumber(ServiceSid string, Sid string, params *Up path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IsReserved != nil { data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) diff --git a/rest/proxy/v1/services_sessions.go b/rest/proxy/v1/services_sessions.go index 6b1cff4d7..68dd1c81b 100644 --- a/rest/proxy/v1/services_sessions.go +++ b/rest/proxy/v1/services_sessions.go @@ -71,7 +71,9 @@ func (c *ApiService) CreateSession(ServiceSid string, params *CreateSessionParam path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) @@ -122,7 +124,9 @@ func (c *ApiService) DeleteSession(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -141,7 +145,9 @@ func (c *ApiService) FetchSession(ServiceSid string, Sid string) (*ProxyV1Sessio path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -182,7 +188,9 @@ func (c *ApiService) PageSession(ServiceSid string, params *ListSessionParams, p path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -326,7 +334,9 @@ func (c *ApiService) UpdateSession(ServiceSid string, Sid string, params *Update path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.DateExpiry != nil { data.Set("DateExpiry", fmt.Sprint((*params.DateExpiry).Format(time.RFC3339))) diff --git a/rest/proxy/v1/services_sessions_interactions.go b/rest/proxy/v1/services_sessions_interactions.go index 106d43666..5fd3884be 100644 --- a/rest/proxy/v1/services_sessions_interactions.go +++ b/rest/proxy/v1/services_sessions_interactions.go @@ -31,7 +31,9 @@ func (c *ApiService) DeleteInteraction(ServiceSid string, SessionSid string, Sid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -51,7 +53,9 @@ func (c *ApiService) FetchInteraction(ServiceSid string, SessionSid string, Sid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -93,7 +97,9 @@ func (c *ApiService) PageInteraction(ServiceSid string, SessionSid string, param path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/proxy/v1/services_sessions_participants.go b/rest/proxy/v1/services_sessions_participants.go index dd9262e19..6638e11c1 100644 --- a/rest/proxy/v1/services_sessions_participants.go +++ b/rest/proxy/v1/services_sessions_participants.go @@ -59,7 +59,9 @@ func (c *ApiService) CreateParticipant(ServiceSid string, SessionSid string, par path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identifier != nil { data.Set("Identifier", *params.Identifier) @@ -97,7 +99,9 @@ func (c *ApiService) DeleteParticipant(ServiceSid string, SessionSid string, Sid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -117,7 +121,9 @@ func (c *ApiService) FetchParticipant(ServiceSid string, SessionSid string, Sid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -159,7 +165,9 @@ func (c *ApiService) PageParticipant(ServiceSid string, SessionSid string, param path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/proxy/v1/services_sessions_participants_message_interactions.go b/rest/proxy/v1/services_sessions_participants_message_interactions.go index e942021e0..c492c1fc1 100644 --- a/rest/proxy/v1/services_sessions_participants_message_interactions.go +++ b/rest/proxy/v1/services_sessions_participants_message_interactions.go @@ -48,7 +48,9 @@ func (c *ApiService) CreateMessageInteraction(ServiceSid string, SessionSid stri path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Body != nil { data.Set("Body", *params.Body) @@ -83,7 +85,9 @@ func (c *ApiService) FetchMessageInteraction(ServiceSid string, SessionSid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -126,7 +130,9 @@ func (c *ApiService) PageMessageInteraction(ServiceSid string, SessionSid string path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/proxy/v1/services_short_codes.go b/rest/proxy/v1/services_short_codes.go index 48cac26a9..74cb6541e 100644 --- a/rest/proxy/v1/services_short_codes.go +++ b/rest/proxy/v1/services_short_codes.go @@ -40,7 +40,9 @@ func (c *ApiService) CreateShortCode(ServiceSid string, params *CreateShortCodeP path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Sid != nil { data.Set("Sid", *params.Sid) @@ -68,7 +70,9 @@ func (c *ApiService) DeleteShortCode(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -87,7 +91,9 @@ func (c *ApiService) FetchShortCode(ServiceSid string, Sid string) (*ProxyV1Shor path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -128,7 +134,9 @@ func (c *ApiService) PageShortCode(ServiceSid string, params *ListShortCodeParam path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -260,7 +268,9 @@ func (c *ApiService) UpdateShortCode(ServiceSid string, Sid string, params *Upda path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IsReserved != nil { data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) diff --git a/rest/routes/v2/phone_numbers.go b/rest/routes/v2/phone_numbers.go index 7614b6d2a..41df081fd 100644 --- a/rest/routes/v2/phone_numbers.go +++ b/rest/routes/v2/phone_numbers.go @@ -26,7 +26,9 @@ func (c *ApiService) FetchPhoneNumber(PhoneNumber string) (*RoutesV2PhoneNumber, path = strings.Replace(path, "{"+"PhoneNumber"+"}", PhoneNumber, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -66,7 +68,9 @@ func (c *ApiService) UpdatePhoneNumber(PhoneNumber string, params *UpdatePhoneNu path = strings.Replace(path, "{"+"PhoneNumber"+"}", PhoneNumber, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.VoiceRegion != nil { data.Set("VoiceRegion", *params.VoiceRegion) diff --git a/rest/routes/v2/sip_domains.go b/rest/routes/v2/sip_domains.go index bdaa766ef..e9f4deacd 100644 --- a/rest/routes/v2/sip_domains.go +++ b/rest/routes/v2/sip_domains.go @@ -26,7 +26,9 @@ func (c *ApiService) FetchSipDomain(SipDomain string) (*RoutesV2SipDomain, error path = strings.Replace(path, "{"+"SipDomain"+"}", SipDomain, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -66,7 +68,9 @@ func (c *ApiService) UpdateSipDomain(SipDomain string, params *UpdateSipDomainPa path = strings.Replace(path, "{"+"SipDomain"+"}", SipDomain, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.VoiceRegion != nil { data.Set("VoiceRegion", *params.VoiceRegion) diff --git a/rest/routes/v2/trunks.go b/rest/routes/v2/trunks.go index e5734e5fa..5d2c1c0bc 100644 --- a/rest/routes/v2/trunks.go +++ b/rest/routes/v2/trunks.go @@ -26,7 +26,9 @@ func (c *ApiService) FetchTrunks(SipTrunkDomain string) (*RoutesV2Trunks, error) path = strings.Replace(path, "{"+"SipTrunkDomain"+"}", SipTrunkDomain, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -66,7 +68,9 @@ func (c *ApiService) UpdateTrunks(SipTrunkDomain string, params *UpdateTrunksPar path = strings.Replace(path, "{"+"SipTrunkDomain"+"}", SipTrunkDomain, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.VoiceRegion != nil { data.Set("VoiceRegion", *params.VoiceRegion) diff --git a/rest/serverless/v1/services.go b/rest/serverless/v1/services.go index cc1c5abca..ead2cb99c 100644 --- a/rest/serverless/v1/services.go +++ b/rest/serverless/v1/services.go @@ -57,7 +57,9 @@ func (c *ApiService) CreateService(params *CreateServiceParams) (*ServerlessV1Se path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) @@ -93,7 +95,9 @@ func (c *ApiService) DeleteService(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -111,7 +115,9 @@ func (c *ApiService) FetchService(Sid string) (*ServerlessV1Service, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -150,7 +156,9 @@ func (c *ApiService) PageService(params *ListServiceParams, pageToken, pageNumbe path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -293,7 +301,9 @@ func (c *ApiService) UpdateService(Sid string, params *UpdateServiceParams) (*Se path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IncludeCredentials != nil { data.Set("IncludeCredentials", fmt.Sprint(*params.IncludeCredentials)) diff --git a/rest/serverless/v1/services_assets.go b/rest/serverless/v1/services_assets.go index 5ce0a10a6..c39c6ade4 100644 --- a/rest/serverless/v1/services_assets.go +++ b/rest/serverless/v1/services_assets.go @@ -40,7 +40,9 @@ func (c *ApiService) CreateAsset(ServiceSid string, params *CreateAssetParams) ( path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -68,7 +70,9 @@ func (c *ApiService) DeleteAsset(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -87,7 +91,9 @@ func (c *ApiService) FetchAsset(ServiceSid string, Sid string) (*ServerlessV1Ass path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -128,7 +134,9 @@ func (c *ApiService) PageAsset(ServiceSid string, params *ListAssetParams, pageT path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -260,7 +268,9 @@ func (c *ApiService) UpdateAsset(ServiceSid string, Sid string, params *UpdateAs path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/serverless/v1/services_assets_versions.go b/rest/serverless/v1/services_assets_versions.go index f3a8e510b..9974c7fb0 100644 --- a/rest/serverless/v1/services_assets_versions.go +++ b/rest/serverless/v1/services_assets_versions.go @@ -31,7 +31,9 @@ func (c *ApiService) FetchAssetVersion(ServiceSid string, AssetSid string, Sid s path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -73,7 +75,9 @@ func (c *ApiService) PageAssetVersion(ServiceSid string, AssetSid string, params path = strings.Replace(path, "{"+"AssetSid"+"}", AssetSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/serverless/v1/services_builds.go b/rest/serverless/v1/services_builds.go index 838001d90..27b2fe423 100644 --- a/rest/serverless/v1/services_builds.go +++ b/rest/serverless/v1/services_builds.go @@ -58,7 +58,9 @@ func (c *ApiService) CreateBuild(ServiceSid string, params *CreateBuildParams) ( path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AssetVersions != nil { for _, item := range *params.AssetVersions { @@ -99,7 +101,9 @@ func (c *ApiService) DeleteBuild(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -118,7 +122,9 @@ func (c *ApiService) FetchBuild(ServiceSid string, Sid string) (*ServerlessV1Bui path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -159,7 +165,9 @@ func (c *ApiService) PageBuild(ServiceSid string, params *ListBuildParams, pageT path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/serverless/v1/services_builds_status.go b/rest/serverless/v1/services_builds_status.go index 81a3e2553..17e6b0a0b 100644 --- a/rest/serverless/v1/services_builds_status.go +++ b/rest/serverless/v1/services_builds_status.go @@ -27,7 +27,9 @@ func (c *ApiService) FetchBuildStatus(ServiceSid string, Sid string) (*Serverles path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/serverless/v1/services_environments.go b/rest/serverless/v1/services_environments.go index 0dd9b37b4..5711e31d7 100644 --- a/rest/serverless/v1/services_environments.go +++ b/rest/serverless/v1/services_environments.go @@ -46,7 +46,9 @@ func (c *ApiService) CreateEnvironment(ServiceSid string, params *CreateEnvironm path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) @@ -77,7 +79,9 @@ func (c *ApiService) DeleteEnvironment(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -96,7 +100,9 @@ func (c *ApiService) FetchEnvironment(ServiceSid string, Sid string) (*Serverles path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -137,7 +143,9 @@ func (c *ApiService) PageEnvironment(ServiceSid string, params *ListEnvironmentP path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/serverless/v1/services_environments_deployments.go b/rest/serverless/v1/services_environments_deployments.go index d061c40c0..6d305d2c8 100644 --- a/rest/serverless/v1/services_environments_deployments.go +++ b/rest/serverless/v1/services_environments_deployments.go @@ -41,7 +41,9 @@ func (c *ApiService) CreateDeployment(ServiceSid string, EnvironmentSid string, path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.BuildSid != nil { data.Set("BuildSid", *params.BuildSid) @@ -70,7 +72,9 @@ func (c *ApiService) FetchDeployment(ServiceSid string, EnvironmentSid string, S path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -112,7 +116,9 @@ func (c *ApiService) PageDeployment(ServiceSid string, EnvironmentSid string, pa path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/serverless/v1/services_environments_logs.go b/rest/serverless/v1/services_environments_logs.go index 7fbbc264d..f37c3663d 100644 --- a/rest/serverless/v1/services_environments_logs.go +++ b/rest/serverless/v1/services_environments_logs.go @@ -32,7 +32,9 @@ func (c *ApiService) FetchLog(ServiceSid string, EnvironmentSid string, Sid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -92,7 +94,9 @@ func (c *ApiService) PageLog(ServiceSid string, EnvironmentSid string, params *L path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FunctionSid != nil { data.Set("FunctionSid", *params.FunctionSid) diff --git a/rest/serverless/v1/services_environments_variables.go b/rest/serverless/v1/services_environments_variables.go index 891919414..13d4db41a 100644 --- a/rest/serverless/v1/services_environments_variables.go +++ b/rest/serverless/v1/services_environments_variables.go @@ -47,7 +47,9 @@ func (c *ApiService) CreateVariable(ServiceSid string, EnvironmentSid string, pa path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Key != nil { data.Set("Key", *params.Key) @@ -79,7 +81,9 @@ func (c *ApiService) DeleteVariable(ServiceSid string, EnvironmentSid string, Si path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -99,7 +103,9 @@ func (c *ApiService) FetchVariable(ServiceSid string, EnvironmentSid string, Sid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -141,7 +147,9 @@ func (c *ApiService) PageVariable(ServiceSid string, EnvironmentSid string, para path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -280,7 +288,9 @@ func (c *ApiService) UpdateVariable(ServiceSid string, EnvironmentSid string, Si path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Key != nil { data.Set("Key", *params.Key) diff --git a/rest/serverless/v1/services_functions.go b/rest/serverless/v1/services_functions.go index 73dd19964..57201123d 100644 --- a/rest/serverless/v1/services_functions.go +++ b/rest/serverless/v1/services_functions.go @@ -40,7 +40,9 @@ func (c *ApiService) CreateFunction(ServiceSid string, params *CreateFunctionPar path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -68,7 +70,9 @@ func (c *ApiService) DeleteFunction(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -87,7 +91,9 @@ func (c *ApiService) FetchFunction(ServiceSid string, Sid string) (*ServerlessV1 path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -128,7 +134,9 @@ func (c *ApiService) PageFunction(ServiceSid string, params *ListFunctionParams, path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -260,7 +268,9 @@ func (c *ApiService) UpdateFunction(ServiceSid string, Sid string, params *Updat path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/serverless/v1/services_functions_versions.go b/rest/serverless/v1/services_functions_versions.go index 28f14f84a..4a74b8d46 100644 --- a/rest/serverless/v1/services_functions_versions.go +++ b/rest/serverless/v1/services_functions_versions.go @@ -31,7 +31,9 @@ func (c *ApiService) FetchFunctionVersion(ServiceSid string, FunctionSid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -73,7 +75,9 @@ func (c *ApiService) PageFunctionVersion(ServiceSid string, FunctionSid string, path = strings.Replace(path, "{"+"FunctionSid"+"}", FunctionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/serverless/v1/services_functions_versions_content.go b/rest/serverless/v1/services_functions_versions_content.go index d4524759a..b7fc05d0a 100644 --- a/rest/serverless/v1/services_functions_versions_content.go +++ b/rest/serverless/v1/services_functions_versions_content.go @@ -28,7 +28,9 @@ func (c *ApiService) FetchFunctionVersionContent(ServiceSid string, FunctionSid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/studio/v1/flows.go b/rest/studio/v1/flows.go index 4cf073e28..ee82119fc 100644 --- a/rest/studio/v1/flows.go +++ b/rest/studio/v1/flows.go @@ -29,7 +29,9 @@ func (c *ApiService) DeleteFlow(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -47,7 +49,9 @@ func (c *ApiService) FetchFlow(Sid string) (*StudioV1Flow, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -86,7 +90,9 @@ func (c *ApiService) PageFlow(params *ListFlowParams, pageToken, pageNumber stri path := "/v1/Flows" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/studio/v1/flows_engagements.go b/rest/studio/v1/flows_engagements.go index 2d51100b2..e4058cd79 100644 --- a/rest/studio/v1/flows_engagements.go +++ b/rest/studio/v1/flows_engagements.go @@ -52,7 +52,9 @@ func (c *ApiService) CreateEngagement(FlowSid string, params *CreateEngagementPa path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.To != nil { data.Set("To", *params.To) @@ -92,7 +94,9 @@ func (c *ApiService) DeleteEngagement(FlowSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -111,7 +115,9 @@ func (c *ApiService) FetchEngagement(FlowSid string, Sid string) (*StudioV1Engag path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -152,7 +158,9 @@ func (c *ApiService) PageEngagement(FlowSid string, params *ListEngagementParams path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/studio/v1/flows_engagements_context.go b/rest/studio/v1/flows_engagements_context.go index d6d963662..6ee6a8020 100644 --- a/rest/studio/v1/flows_engagements_context.go +++ b/rest/studio/v1/flows_engagements_context.go @@ -27,7 +27,9 @@ func (c *ApiService) FetchEngagementContext(FlowSid string, EngagementSid string path = strings.Replace(path, "{"+"EngagementSid"+"}", EngagementSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/studio/v1/flows_engagements_steps.go b/rest/studio/v1/flows_engagements_steps.go index 11dac1105..c3e6eb33a 100644 --- a/rest/studio/v1/flows_engagements_steps.go +++ b/rest/studio/v1/flows_engagements_steps.go @@ -31,7 +31,9 @@ func (c *ApiService) FetchStep(FlowSid string, EngagementSid string, Sid string) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -73,7 +75,9 @@ func (c *ApiService) PageStep(FlowSid string, EngagementSid string, params *List path = strings.Replace(path, "{"+"EngagementSid"+"}", EngagementSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/studio/v1/flows_engagements_steps_context.go b/rest/studio/v1/flows_engagements_steps_context.go index 882d50c84..7b6c08838 100644 --- a/rest/studio/v1/flows_engagements_steps_context.go +++ b/rest/studio/v1/flows_engagements_steps_context.go @@ -28,7 +28,9 @@ func (c *ApiService) FetchStepContext(FlowSid string, EngagementSid string, Step path = strings.Replace(path, "{"+"StepSid"+"}", StepSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/studio/v1/flows_executions.go b/rest/studio/v1/flows_executions.go index 6e6f9287a..9e0bb41da 100644 --- a/rest/studio/v1/flows_executions.go +++ b/rest/studio/v1/flows_executions.go @@ -53,7 +53,9 @@ func (c *ApiService) CreateExecution(FlowSid string, params *CreateExecutionPara path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.To != nil { data.Set("To", *params.To) @@ -93,7 +95,9 @@ func (c *ApiService) DeleteExecution(FlowSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -112,7 +116,9 @@ func (c *ApiService) FetchExecution(FlowSid string, Sid string) (*StudioV1Execut path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -165,7 +171,9 @@ func (c *ApiService) PageExecution(FlowSid string, params *ListExecutionParams, path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.DateCreatedFrom != nil { data.Set("DateCreatedFrom", fmt.Sprint((*params.DateCreatedFrom).Format(time.RFC3339))) @@ -303,7 +311,9 @@ func (c *ApiService) UpdateExecution(FlowSid string, Sid string, params *UpdateE path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/studio/v1/flows_executions_context.go b/rest/studio/v1/flows_executions_context.go index c7eb6665a..6a6e483f3 100644 --- a/rest/studio/v1/flows_executions_context.go +++ b/rest/studio/v1/flows_executions_context.go @@ -27,7 +27,9 @@ func (c *ApiService) FetchExecutionContext(FlowSid string, ExecutionSid string) path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/studio/v1/flows_executions_steps.go b/rest/studio/v1/flows_executions_steps.go index c4423c3ff..4b52b4910 100644 --- a/rest/studio/v1/flows_executions_steps.go +++ b/rest/studio/v1/flows_executions_steps.go @@ -31,7 +31,9 @@ func (c *ApiService) FetchExecutionStep(FlowSid string, ExecutionSid string, Sid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -73,7 +75,9 @@ func (c *ApiService) PageExecutionStep(FlowSid string, ExecutionSid string, para path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/studio/v1/flows_executions_steps_context.go b/rest/studio/v1/flows_executions_steps_context.go index 338594176..f3866ad56 100644 --- a/rest/studio/v1/flows_executions_steps_context.go +++ b/rest/studio/v1/flows_executions_steps_context.go @@ -28,7 +28,9 @@ func (c *ApiService) FetchExecutionStepContext(FlowSid string, ExecutionSid stri path = strings.Replace(path, "{"+"StepSid"+"}", StepSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/studio/v2/flows.go b/rest/studio/v2/flows.go index faa9f4dd3..9023e7a71 100644 --- a/rest/studio/v2/flows.go +++ b/rest/studio/v2/flows.go @@ -57,7 +57,9 @@ func (c *ApiService) CreateFlow(params *CreateFlowParams) (*StudioV2Flow, error) path := "/v2/Flows" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -99,7 +101,9 @@ func (c *ApiService) DeleteFlow(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -117,7 +121,9 @@ func (c *ApiService) FetchFlow(Sid string) (*StudioV2Flow, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -156,7 +162,9 @@ func (c *ApiService) PageFlow(params *ListFlowParams, pageToken, pageNumber stri path := "/v2/Flows" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -305,7 +313,9 @@ func (c *ApiService) UpdateFlow(Sid string, params *UpdateFlowParams) (*StudioV2 path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/studio/v2/flows_executions.go b/rest/studio/v2/flows_executions.go index f3f74c070..3be32c3ba 100644 --- a/rest/studio/v2/flows_executions.go +++ b/rest/studio/v2/flows_executions.go @@ -53,7 +53,9 @@ func (c *ApiService) CreateExecution(FlowSid string, params *CreateExecutionPara path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.To != nil { data.Set("To", *params.To) @@ -93,7 +95,9 @@ func (c *ApiService) DeleteExecution(FlowSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -112,7 +116,9 @@ func (c *ApiService) FetchExecution(FlowSid string, Sid string) (*StudioV2Execut path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -165,7 +171,9 @@ func (c *ApiService) PageExecution(FlowSid string, params *ListExecutionParams, path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.DateCreatedFrom != nil { data.Set("DateCreatedFrom", fmt.Sprint((*params.DateCreatedFrom).Format(time.RFC3339))) @@ -303,7 +311,9 @@ func (c *ApiService) UpdateExecution(FlowSid string, Sid string, params *UpdateE path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/studio/v2/flows_executions_context.go b/rest/studio/v2/flows_executions_context.go index 63082ea22..9133eea45 100644 --- a/rest/studio/v2/flows_executions_context.go +++ b/rest/studio/v2/flows_executions_context.go @@ -27,7 +27,9 @@ func (c *ApiService) FetchExecutionContext(FlowSid string, ExecutionSid string) path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/studio/v2/flows_executions_steps.go b/rest/studio/v2/flows_executions_steps.go index f614e28c0..9b190ad3d 100644 --- a/rest/studio/v2/flows_executions_steps.go +++ b/rest/studio/v2/flows_executions_steps.go @@ -31,7 +31,9 @@ func (c *ApiService) FetchExecutionStep(FlowSid string, ExecutionSid string, Sid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -73,7 +75,9 @@ func (c *ApiService) PageExecutionStep(FlowSid string, ExecutionSid string, para path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/studio/v2/flows_executions_steps_context.go b/rest/studio/v2/flows_executions_steps_context.go index c1cf4ecfd..fb1ea0a32 100644 --- a/rest/studio/v2/flows_executions_steps_context.go +++ b/rest/studio/v2/flows_executions_steps_context.go @@ -28,7 +28,9 @@ func (c *ApiService) FetchExecutionStepContext(FlowSid string, ExecutionSid stri path = strings.Replace(path, "{"+"StepSid"+"}", StepSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/studio/v2/flows_revisions.go b/rest/studio/v2/flows_revisions.go index 5d04f5e41..b7471d5f1 100644 --- a/rest/studio/v2/flows_revisions.go +++ b/rest/studio/v2/flows_revisions.go @@ -30,7 +30,9 @@ func (c *ApiService) FetchFlowRevision(Sid string, Revision string) (*StudioV2Fl path = strings.Replace(path, "{"+"Revision"+"}", Revision, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -71,7 +73,9 @@ func (c *ApiService) PageFlowRevision(Sid string, params *ListFlowRevisionParams path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/studio/v2/flows_test_users.go b/rest/studio/v2/flows_test_users.go index cab908acf..ff348b378 100644 --- a/rest/studio/v2/flows_test_users.go +++ b/rest/studio/v2/flows_test_users.go @@ -26,7 +26,9 @@ func (c *ApiService) FetchTestUser(Sid string) (*StudioV2TestUser, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -60,7 +62,9 @@ func (c *ApiService) UpdateTestUser(Sid string, params *UpdateTestUserParams) (* path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.TestUsers != nil { for _, item := range *params.TestUsers { diff --git a/rest/studio/v2/flows_validate.go b/rest/studio/v2/flows_validate.go index b589afdc4..9f7da01f0 100644 --- a/rest/studio/v2/flows_validate.go +++ b/rest/studio/v2/flows_validate.go @@ -53,7 +53,9 @@ func (c *ApiService) UpdateFlowValidate(params *UpdateFlowValidateParams) (*Stud path := "/v2/Flows/Validate" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/supersim/v1/e_sim_profiles.go b/rest/supersim/v1/e_sim_profiles.go index 992ecf9d4..49d159410 100644 --- a/rest/supersim/v1/e_sim_profiles.go +++ b/rest/supersim/v1/e_sim_profiles.go @@ -57,7 +57,9 @@ func (c *ApiService) CreateEsimProfile(params *CreateEsimProfileParams) (*Supers path := "/v1/ESimProfiles" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.CallbackUrl != nil { data.Set("CallbackUrl", *params.CallbackUrl) @@ -93,7 +95,9 @@ func (c *ApiService) FetchEsimProfile(Sid string) (*SupersimV1EsimProfile, error path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -150,7 +154,9 @@ func (c *ApiService) PageEsimProfile(params *ListEsimProfileParams, pageToken, p path := "/v1/ESimProfiles" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Eid != nil { data.Set("Eid", *params.Eid) diff --git a/rest/supersim/v1/fleets.go b/rest/supersim/v1/fleets.go index 848aeb7a5..ce99486a8 100644 --- a/rest/supersim/v1/fleets.go +++ b/rest/supersim/v1/fleets.go @@ -87,7 +87,9 @@ func (c *ApiService) CreateFleet(params *CreateFleetParams) (*SupersimV1Fleet, e path := "/v1/Fleets" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.NetworkAccessProfile != nil { data.Set("NetworkAccessProfile", *params.NetworkAccessProfile) @@ -138,7 +140,9 @@ func (c *ApiService) FetchFleet(Sid string) (*SupersimV1Fleet, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -183,7 +187,9 @@ func (c *ApiService) PageFleet(params *ListFleetParams, pageToken, pageNumber st path := "/v1/Fleets" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.NetworkAccessProfile != nil { data.Set("NetworkAccessProfile", *params.NetworkAccessProfile) @@ -353,7 +359,9 @@ func (c *ApiService) UpdateFleet(Sid string, params *UpdateFleetParams) (*Supers path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) diff --git a/rest/supersim/v1/ip_commands.go b/rest/supersim/v1/ip_commands.go index d553bd305..56daf32c3 100644 --- a/rest/supersim/v1/ip_commands.go +++ b/rest/supersim/v1/ip_commands.go @@ -69,7 +69,9 @@ func (c *ApiService) CreateIpCommand(params *CreateIpCommandParams) (*SupersimV1 path := "/v1/IpCommands" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Sim != nil { data.Set("Sim", *params.Sim) @@ -111,7 +113,9 @@ func (c *ApiService) FetchIpCommand(Sid string) (*SupersimV1IpCommand, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -174,7 +178,9 @@ func (c *ApiService) PageIpCommand(params *ListIpCommandParams, pageToken, pageN path := "/v1/IpCommands" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Sim != nil { data.Set("Sim", *params.Sim) diff --git a/rest/supersim/v1/network_access_profiles.go b/rest/supersim/v1/network_access_profiles.go index c82957dce..245af52ec 100644 --- a/rest/supersim/v1/network_access_profiles.go +++ b/rest/supersim/v1/network_access_profiles.go @@ -45,7 +45,9 @@ func (c *ApiService) CreateNetworkAccessProfile(params *CreateNetworkAccessProfi path := "/v1/NetworkAccessProfiles" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) @@ -77,7 +79,9 @@ func (c *ApiService) FetchNetworkAccessProfile(Sid string) (*SupersimV1NetworkAc path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -116,7 +120,9 @@ func (c *ApiService) PageNetworkAccessProfile(params *ListNetworkAccessProfilePa path := "/v1/NetworkAccessProfiles" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -247,7 +253,9 @@ func (c *ApiService) UpdateNetworkAccessProfile(Sid string, params *UpdateNetwor path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) diff --git a/rest/supersim/v1/network_access_profiles_networks.go b/rest/supersim/v1/network_access_profiles_networks.go index b711accbb..b79c2d583 100644 --- a/rest/supersim/v1/network_access_profiles_networks.go +++ b/rest/supersim/v1/network_access_profiles_networks.go @@ -40,7 +40,9 @@ func (c *ApiService) CreateNetworkAccessProfileNetwork(NetworkAccessProfileSid s path = strings.Replace(path, "{"+"NetworkAccessProfileSid"+"}", NetworkAccessProfileSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Network != nil { data.Set("Network", *params.Network) @@ -68,7 +70,9 @@ func (c *ApiService) DeleteNetworkAccessProfileNetwork(NetworkAccessProfileSid s path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -87,7 +91,9 @@ func (c *ApiService) FetchNetworkAccessProfileNetwork(NetworkAccessProfileSid st path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -128,7 +134,9 @@ func (c *ApiService) PageNetworkAccessProfileNetwork(NetworkAccessProfileSid str path = strings.Replace(path, "{"+"NetworkAccessProfileSid"+"}", NetworkAccessProfileSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/supersim/v1/networks.go b/rest/supersim/v1/networks.go index d49f3300b..84db1d32c 100644 --- a/rest/supersim/v1/networks.go +++ b/rest/supersim/v1/networks.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchNetwork(Sid string) (*SupersimV1Network, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -86,7 +88,9 @@ func (c *ApiService) PageNetwork(params *ListNetworkParams, pageToken, pageNumbe path := "/v1/Networks" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IsoCountry != nil { data.Set("IsoCountry", *params.IsoCountry) diff --git a/rest/supersim/v1/settings_updates.go b/rest/supersim/v1/settings_updates.go index 69134286a..e8f71f024 100644 --- a/rest/supersim/v1/settings_updates.go +++ b/rest/supersim/v1/settings_updates.go @@ -56,7 +56,9 @@ func (c *ApiService) PageSettingsUpdate(params *ListSettingsUpdateParams, pageTo path := "/v1/SettingsUpdates" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Sim != nil { data.Set("Sim", *params.Sim) diff --git a/rest/supersim/v1/sims.go b/rest/supersim/v1/sims.go index c988a08e0..d1555a78b 100644 --- a/rest/supersim/v1/sims.go +++ b/rest/supersim/v1/sims.go @@ -45,7 +45,9 @@ func (c *ApiService) CreateSim(params *CreateSimParams) (*SupersimV1Sim, error) path := "/v1/Sims" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Iccid != nil { data.Set("Iccid", *params.Iccid) @@ -75,7 +77,9 @@ func (c *ApiService) FetchSim(Sid string) (*SupersimV1Sim, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -132,7 +136,9 @@ func (c *ApiService) PageSim(params *ListSimParams, pageToken, pageNumber string path := "/v1/Sims" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) @@ -302,7 +308,9 @@ func (c *ApiService) UpdateSim(Sid string, params *UpdateSimParams) (*SupersimV1 path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) diff --git a/rest/supersim/v1/sims_billing_periods.go b/rest/supersim/v1/sims_billing_periods.go index c6b866fed..727e8bbdd 100644 --- a/rest/supersim/v1/sims_billing_periods.go +++ b/rest/supersim/v1/sims_billing_periods.go @@ -47,7 +47,9 @@ func (c *ApiService) PageBillingPeriod(SimSid string, params *ListBillingPeriodP path = strings.Replace(path, "{"+"SimSid"+"}", SimSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/supersim/v1/sims_ip_addresses.go b/rest/supersim/v1/sims_ip_addresses.go index f1e73eab5..0c3793923 100644 --- a/rest/supersim/v1/sims_ip_addresses.go +++ b/rest/supersim/v1/sims_ip_addresses.go @@ -47,7 +47,9 @@ func (c *ApiService) PageSimIpAddress(SimSid string, params *ListSimIpAddressPar path = strings.Replace(path, "{"+"SimSid"+"}", SimSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/supersim/v1/sms_commands.go b/rest/supersim/v1/sms_commands.go index 5e36deb00..a4d2bffbe 100644 --- a/rest/supersim/v1/sms_commands.go +++ b/rest/supersim/v1/sms_commands.go @@ -57,7 +57,9 @@ func (c *ApiService) CreateSmsCommand(params *CreateSmsCommandParams) (*Supersim path := "/v1/SmsCommands" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Sim != nil { data.Set("Sim", *params.Sim) @@ -93,7 +95,9 @@ func (c *ApiService) FetchSmsCommand(Sid string) (*SupersimV1SmsCommand, error) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -150,7 +154,9 @@ func (c *ApiService) PageSmsCommand(params *ListSmsCommandParams, pageToken, pag path := "/v1/SmsCommands" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Sim != nil { data.Set("Sim", *params.Sim) diff --git a/rest/supersim/v1/usage_records.go b/rest/supersim/v1/usage_records.go index 1b31e5bae..a5b37ccb7 100644 --- a/rest/supersim/v1/usage_records.go +++ b/rest/supersim/v1/usage_records.go @@ -93,7 +93,9 @@ func (c *ApiService) PageUsageRecord(params *ListUsageRecordParams, pageToken, p path := "/v1/UsageRecords" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Sim != nil { data.Set("Sim", *params.Sim) diff --git a/rest/sync/v1/services.go b/rest/sync/v1/services.go index 848858339..c720651f5 100644 --- a/rest/sync/v1/services.go +++ b/rest/sync/v1/services.go @@ -75,7 +75,9 @@ func (c *ApiService) CreateService(params *CreateServiceParams) (*SyncV1Service, path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -120,7 +122,9 @@ func (c *ApiService) DeleteService(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -138,7 +142,9 @@ func (c *ApiService) FetchService(Sid string) (*SyncV1Service, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -177,7 +183,9 @@ func (c *ApiService) PageService(params *ListServiceParams, pageToken, pageNumbe path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -344,7 +352,9 @@ func (c *ApiService) UpdateService(Sid string, params *UpdateServiceParams) (*Sy path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.WebhookUrl != nil { data.Set("WebhookUrl", *params.WebhookUrl) diff --git a/rest/sync/v1/services_documents.go b/rest/sync/v1/services_documents.go index 6aae3ba8b..775a025d3 100644 --- a/rest/sync/v1/services_documents.go +++ b/rest/sync/v1/services_documents.go @@ -52,7 +52,9 @@ func (c *ApiService) CreateDocument(ServiceSid string, params *CreateDocumentPar path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) @@ -92,7 +94,9 @@ func (c *ApiService) DeleteDocument(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -111,7 +115,9 @@ func (c *ApiService) FetchDocument(ServiceSid string, Sid string) (*SyncV1Docume path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -152,7 +158,9 @@ func (c *ApiService) PageDocument(ServiceSid string, params *ListDocumentParams, path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -296,7 +304,9 @@ func (c *ApiService) UpdateDocument(ServiceSid string, Sid string, params *Updat path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Data != nil { v, err := json.Marshal(params.Data) diff --git a/rest/sync/v1/services_documents_permissions.go b/rest/sync/v1/services_documents_permissions.go index d4517d884..4b9ae9253 100644 --- a/rest/sync/v1/services_documents_permissions.go +++ b/rest/sync/v1/services_documents_permissions.go @@ -31,7 +31,9 @@ func (c *ApiService) DeleteDocumentPermission(ServiceSid string, DocumentSid str path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -51,7 +53,9 @@ func (c *ApiService) FetchDocumentPermission(ServiceSid string, DocumentSid stri path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -93,7 +97,9 @@ func (c *ApiService) PageDocumentPermission(ServiceSid string, DocumentSid strin path = strings.Replace(path, "{"+"DocumentSid"+"}", DocumentSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -238,7 +244,9 @@ func (c *ApiService) UpdateDocumentPermission(ServiceSid string, DocumentSid str path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Read != nil { data.Set("Read", fmt.Sprint(*params.Read)) diff --git a/rest/sync/v1/services_lists.go b/rest/sync/v1/services_lists.go index 358ea56bf..e9a1977ce 100644 --- a/rest/sync/v1/services_lists.go +++ b/rest/sync/v1/services_lists.go @@ -52,7 +52,9 @@ func (c *ApiService) CreateSyncList(ServiceSid string, params *CreateSyncListPar path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) @@ -86,7 +88,9 @@ func (c *ApiService) DeleteSyncList(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -105,7 +109,9 @@ func (c *ApiService) FetchSyncList(ServiceSid string, Sid string) (*SyncV1SyncLi path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -146,7 +152,9 @@ func (c *ApiService) PageSyncList(ServiceSid string, params *ListSyncListParams, path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -284,7 +292,9 @@ func (c *ApiService) UpdateSyncList(ServiceSid string, Sid string, params *Updat path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) diff --git a/rest/sync/v1/services_lists_items.go b/rest/sync/v1/services_lists_items.go index 572df5abc..f985f59d5 100644 --- a/rest/sync/v1/services_lists_items.go +++ b/rest/sync/v1/services_lists_items.go @@ -59,7 +59,9 @@ func (c *ApiService) CreateSyncListItem(ServiceSid string, ListSid string, param path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Data != nil { v, err := json.Marshal(params.Data) @@ -114,7 +116,9 @@ func (c *ApiService) DeleteSyncListItem(ServiceSid string, ListSid string, Index path = strings.Replace(path, "{"+"Index"+"}", fmt.Sprint(Index), -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IfMatch != nil { headers["If-Match"] = *params.IfMatch @@ -137,7 +141,9 @@ func (c *ApiService) FetchSyncListItem(ServiceSid string, ListSid string, Index path = strings.Replace(path, "{"+"Index"+"}", fmt.Sprint(Index), -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -197,7 +203,9 @@ func (c *ApiService) PageSyncListItem(ServiceSid string, ListSid string, params path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Order != nil { data.Set("Order", *params.Order) @@ -363,7 +371,9 @@ func (c *ApiService) UpdateSyncListItem(ServiceSid string, ListSid string, Index path = strings.Replace(path, "{"+"Index"+"}", fmt.Sprint(Index), -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Data != nil { v, err := json.Marshal(params.Data) diff --git a/rest/sync/v1/services_lists_permissions.go b/rest/sync/v1/services_lists_permissions.go index d0a3bae2d..abb29c592 100644 --- a/rest/sync/v1/services_lists_permissions.go +++ b/rest/sync/v1/services_lists_permissions.go @@ -31,7 +31,9 @@ func (c *ApiService) DeleteSyncListPermission(ServiceSid string, ListSid string, path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -51,7 +53,9 @@ func (c *ApiService) FetchSyncListPermission(ServiceSid string, ListSid string, path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -93,7 +97,9 @@ func (c *ApiService) PageSyncListPermission(ServiceSid string, ListSid string, p path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -238,7 +244,9 @@ func (c *ApiService) UpdateSyncListPermission(ServiceSid string, ListSid string, path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Read != nil { data.Set("Read", fmt.Sprint(*params.Read)) diff --git a/rest/sync/v1/services_maps.go b/rest/sync/v1/services_maps.go index 731ada14d..2b4c4897d 100644 --- a/rest/sync/v1/services_maps.go +++ b/rest/sync/v1/services_maps.go @@ -52,7 +52,9 @@ func (c *ApiService) CreateSyncMap(ServiceSid string, params *CreateSyncMapParam path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) @@ -86,7 +88,9 @@ func (c *ApiService) DeleteSyncMap(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -105,7 +109,9 @@ func (c *ApiService) FetchSyncMap(ServiceSid string, Sid string) (*SyncV1SyncMap path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -146,7 +152,9 @@ func (c *ApiService) PageSyncMap(ServiceSid string, params *ListSyncMapParams, p path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -284,7 +292,9 @@ func (c *ApiService) UpdateSyncMap(ServiceSid string, Sid string, params *Update path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) diff --git a/rest/sync/v1/services_maps_items.go b/rest/sync/v1/services_maps_items.go index 961e98735..f56ff7695 100644 --- a/rest/sync/v1/services_maps_items.go +++ b/rest/sync/v1/services_maps_items.go @@ -65,7 +65,9 @@ func (c *ApiService) CreateSyncMapItem(ServiceSid string, MapSid string, params path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Key != nil { data.Set("Key", *params.Key) @@ -123,7 +125,9 @@ func (c *ApiService) DeleteSyncMapItem(ServiceSid string, MapSid string, Key str path = strings.Replace(path, "{"+"Key"+"}", Key, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IfMatch != nil { headers["If-Match"] = *params.IfMatch @@ -146,7 +150,9 @@ func (c *ApiService) FetchSyncMapItem(ServiceSid string, MapSid string, Key stri path = strings.Replace(path, "{"+"Key"+"}", Key, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -206,7 +212,9 @@ func (c *ApiService) PageSyncMapItem(ServiceSid string, MapSid string, params *L path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Order != nil { data.Set("Order", *params.Order) @@ -372,7 +380,9 @@ func (c *ApiService) UpdateSyncMapItem(ServiceSid string, MapSid string, Key str path = strings.Replace(path, "{"+"Key"+"}", Key, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Data != nil { v, err := json.Marshal(params.Data) diff --git a/rest/sync/v1/services_maps_permissions.go b/rest/sync/v1/services_maps_permissions.go index 70b4dd777..6668be3a2 100644 --- a/rest/sync/v1/services_maps_permissions.go +++ b/rest/sync/v1/services_maps_permissions.go @@ -31,7 +31,9 @@ func (c *ApiService) DeleteSyncMapPermission(ServiceSid string, MapSid string, I path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -51,7 +53,9 @@ func (c *ApiService) FetchSyncMapPermission(ServiceSid string, MapSid string, Id path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -93,7 +97,9 @@ func (c *ApiService) PageSyncMapPermission(ServiceSid string, MapSid string, par path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -238,7 +244,9 @@ func (c *ApiService) UpdateSyncMapPermission(ServiceSid string, MapSid string, I path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Read != nil { data.Set("Read", fmt.Sprint(*params.Read)) diff --git a/rest/sync/v1/services_streams.go b/rest/sync/v1/services_streams.go index d16add427..1a187324a 100644 --- a/rest/sync/v1/services_streams.go +++ b/rest/sync/v1/services_streams.go @@ -46,7 +46,9 @@ func (c *ApiService) CreateSyncStream(ServiceSid string, params *CreateSyncStrea path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) @@ -77,7 +79,9 @@ func (c *ApiService) DeleteSyncStream(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -96,7 +100,9 @@ func (c *ApiService) FetchSyncStream(ServiceSid string, Sid string) (*SyncV1Sync path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -137,7 +143,9 @@ func (c *ApiService) PageSyncStream(ServiceSid string, params *ListSyncStreamPar path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -269,7 +277,9 @@ func (c *ApiService) UpdateSyncStream(ServiceSid string, Sid string, params *Upd path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) diff --git a/rest/sync/v1/services_streams_messages.go b/rest/sync/v1/services_streams_messages.go index ab4a47f4e..0914e27b7 100644 --- a/rest/sync/v1/services_streams_messages.go +++ b/rest/sync/v1/services_streams_messages.go @@ -38,7 +38,9 @@ func (c *ApiService) CreateStreamMessage(ServiceSid string, StreamSid string, pa path = strings.Replace(path, "{"+"StreamSid"+"}", StreamSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Data != nil { v, err := json.Marshal(params.Data) diff --git a/rest/taskrouter/v1/workspaces.go b/rest/taskrouter/v1/workspaces.go index a1890a26a..590d5a6cc 100644 --- a/rest/taskrouter/v1/workspaces.go +++ b/rest/taskrouter/v1/workspaces.go @@ -69,7 +69,9 @@ func (c *ApiService) CreateWorkspace(params *CreateWorkspaceParams) (*Taskrouter path := "/v1/Workspaces" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -111,7 +113,9 @@ func (c *ApiService) DeleteWorkspace(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -129,7 +133,9 @@ func (c *ApiService) FetchWorkspace(Sid string) (*TaskrouterV1Workspace, error) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -174,7 +180,9 @@ func (c *ApiService) PageWorkspace(params *ListWorkspaceParams, pageToken, pageN path := "/v1/Workspaces" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -344,7 +352,9 @@ func (c *ApiService) UpdateWorkspace(Sid string, params *UpdateWorkspaceParams) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.DefaultActivitySid != nil { data.Set("DefaultActivitySid", *params.DefaultActivitySid) diff --git a/rest/taskrouter/v1/workspaces_activities.go b/rest/taskrouter/v1/workspaces_activities.go index 563c227c4..e056d5e47 100644 --- a/rest/taskrouter/v1/workspaces_activities.go +++ b/rest/taskrouter/v1/workspaces_activities.go @@ -46,7 +46,9 @@ func (c *ApiService) CreateActivity(WorkspaceSid string, params *CreateActivityP path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -77,7 +79,9 @@ func (c *ApiService) DeleteActivity(WorkspaceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -96,7 +100,9 @@ func (c *ApiService) FetchActivity(WorkspaceSid string, Sid string) (*Taskrouter path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -149,7 +155,9 @@ func (c *ApiService) PageActivity(WorkspaceSid string, params *ListActivityParam path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -287,7 +295,9 @@ func (c *ApiService) UpdateActivity(WorkspaceSid string, Sid string, params *Upd path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/taskrouter/v1/workspaces_cumulative_statistics.go b/rest/taskrouter/v1/workspaces_cumulative_statistics.go index 5bf253374..2ebf39d3a 100644 --- a/rest/taskrouter/v1/workspaces_cumulative_statistics.go +++ b/rest/taskrouter/v1/workspaces_cumulative_statistics.go @@ -63,7 +63,9 @@ func (c *ApiService) FetchWorkspaceCumulativeStatistics(WorkspaceSid string, par path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.EndDate != nil { data.Set("EndDate", fmt.Sprint((*params.EndDate).Format(time.RFC3339))) diff --git a/rest/taskrouter/v1/workspaces_events.go b/rest/taskrouter/v1/workspaces_events.go index b9bc46cbf..c66a5bb0f 100644 --- a/rest/taskrouter/v1/workspaces_events.go +++ b/rest/taskrouter/v1/workspaces_events.go @@ -31,7 +31,9 @@ func (c *ApiService) FetchEvent(WorkspaceSid string, Sid string) (*TaskrouterV1E path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -138,7 +140,9 @@ func (c *ApiService) PageEvent(WorkspaceSid string, params *ListEventParams, pag path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.EndDate != nil { data.Set("EndDate", fmt.Sprint((*params.EndDate).Format(time.RFC3339))) diff --git a/rest/taskrouter/v1/workspaces_real_time_statistics.go b/rest/taskrouter/v1/workspaces_real_time_statistics.go index 75593edef..e4de938fc 100644 --- a/rest/taskrouter/v1/workspaces_real_time_statistics.go +++ b/rest/taskrouter/v1/workspaces_real_time_statistics.go @@ -37,7 +37,9 @@ func (c *ApiService) FetchWorkspaceRealTimeStatistics(WorkspaceSid string, param path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.TaskChannel != nil { data.Set("TaskChannel", *params.TaskChannel) diff --git a/rest/taskrouter/v1/workspaces_statistics.go b/rest/taskrouter/v1/workspaces_statistics.go index 1d92d7d28..c1df80e2a 100644 --- a/rest/taskrouter/v1/workspaces_statistics.go +++ b/rest/taskrouter/v1/workspaces_statistics.go @@ -63,7 +63,9 @@ func (c *ApiService) FetchWorkspaceStatistics(WorkspaceSid string, params *Fetch path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Minutes != nil { data.Set("Minutes", fmt.Sprint(*params.Minutes)) diff --git a/rest/taskrouter/v1/workspaces_task_channels.go b/rest/taskrouter/v1/workspaces_task_channels.go index ab0035c54..10ee10e27 100644 --- a/rest/taskrouter/v1/workspaces_task_channels.go +++ b/rest/taskrouter/v1/workspaces_task_channels.go @@ -52,7 +52,9 @@ func (c *ApiService) CreateTaskChannel(WorkspaceSid string, params *CreateTaskCh path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -86,7 +88,9 @@ func (c *ApiService) DeleteTaskChannel(WorkspaceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -105,7 +109,9 @@ func (c *ApiService) FetchTaskChannel(WorkspaceSid string, Sid string) (*Taskrou path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -146,7 +152,9 @@ func (c *ApiService) PageTaskChannel(WorkspaceSid string, params *ListTaskChanne path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -284,7 +292,9 @@ func (c *ApiService) UpdateTaskChannel(WorkspaceSid string, Sid string, params * path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/taskrouter/v1/workspaces_task_queues.go b/rest/taskrouter/v1/workspaces_task_queues.go index 9bdfc7224..9bc56258f 100644 --- a/rest/taskrouter/v1/workspaces_task_queues.go +++ b/rest/taskrouter/v1/workspaces_task_queues.go @@ -70,7 +70,9 @@ func (c *ApiService) CreateTaskQueue(WorkspaceSid string, params *CreateTaskQueu path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -113,7 +115,9 @@ func (c *ApiService) DeleteTaskQueue(WorkspaceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -132,7 +136,9 @@ func (c *ApiService) FetchTaskQueue(WorkspaceSid string, Sid string) (*Taskroute path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -197,7 +203,9 @@ func (c *ApiService) PageTaskQueue(WorkspaceSid string, params *ListTaskQueuePar path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -371,7 +379,9 @@ func (c *ApiService) UpdateTaskQueue(WorkspaceSid string, Sid string, params *Up path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/taskrouter/v1/workspaces_task_queues_cumulative_statistics.go b/rest/taskrouter/v1/workspaces_task_queues_cumulative_statistics.go index 2216de575..cf9b44f7c 100644 --- a/rest/taskrouter/v1/workspaces_task_queues_cumulative_statistics.go +++ b/rest/taskrouter/v1/workspaces_task_queues_cumulative_statistics.go @@ -64,7 +64,9 @@ func (c *ApiService) FetchTaskQueueCumulativeStatistics(WorkspaceSid string, Tas path = strings.Replace(path, "{"+"TaskQueueSid"+"}", TaskQueueSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.EndDate != nil { data.Set("EndDate", fmt.Sprint((*params.EndDate).Format(time.RFC3339))) diff --git a/rest/taskrouter/v1/workspaces_task_queues_real_time_statistics.go b/rest/taskrouter/v1/workspaces_task_queues_real_time_statistics.go index ba497f546..f024b24e3 100644 --- a/rest/taskrouter/v1/workspaces_task_queues_real_time_statistics.go +++ b/rest/taskrouter/v1/workspaces_task_queues_real_time_statistics.go @@ -83,7 +83,9 @@ func (c *ApiService) FetchTaskQueueRealTimeStatistics(WorkspaceSid string, TaskQ path = strings.Replace(path, "{"+"TaskQueueSid"+"}", TaskQueueSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.TaskChannel != nil { data.Set("TaskChannel", *params.TaskChannel) diff --git a/rest/taskrouter/v1/workspaces_task_queues_statistics.go b/rest/taskrouter/v1/workspaces_task_queues_statistics.go index c5ea20fd7..c70d5f854 100644 --- a/rest/taskrouter/v1/workspaces_task_queues_statistics.go +++ b/rest/taskrouter/v1/workspaces_task_queues_statistics.go @@ -66,7 +66,9 @@ func (c *ApiService) FetchTaskQueueStatistics(WorkspaceSid string, TaskQueueSid path = strings.Replace(path, "{"+"TaskQueueSid"+"}", TaskQueueSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.EndDate != nil { data.Set("EndDate", fmt.Sprint((*params.EndDate).Format(time.RFC3339))) @@ -159,7 +161,9 @@ func (c *ApiService) PageTaskQueuesStatistics(WorkspaceSid string, params *ListT path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.EndDate != nil { data.Set("EndDate", fmt.Sprint((*params.EndDate).Format(time.RFC3339))) diff --git a/rest/taskrouter/v1/workspaces_tasks.go b/rest/taskrouter/v1/workspaces_tasks.go index 97234f823..6e634b1fd 100644 --- a/rest/taskrouter/v1/workspaces_tasks.go +++ b/rest/taskrouter/v1/workspaces_tasks.go @@ -89,7 +89,9 @@ func (c *ApiService) CreateTask(WorkspaceSid string, params *CreateTaskParams) ( path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Timeout != nil { data.Set("Timeout", fmt.Sprint(*params.Timeout)) @@ -152,7 +154,9 @@ func (c *ApiService) DeleteTask(WorkspaceSid string, Sid string, params *DeleteT path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IfMatch != nil { headers["If-Match"] = *params.IfMatch @@ -174,7 +178,9 @@ func (c *ApiService) FetchTask(WorkspaceSid string, Sid string) (*TaskrouterV1Ta path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -275,7 +281,9 @@ func (c *ApiService) PageTask(WorkspaceSid string, params *ListTaskParams, pageT path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Priority != nil { data.Set("Priority", fmt.Sprint(*params.Priority)) @@ -475,7 +483,9 @@ func (c *ApiService) UpdateTask(WorkspaceSid string, Sid string, params *UpdateT path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) diff --git a/rest/taskrouter/v1/workspaces_tasks_reservations.go b/rest/taskrouter/v1/workspaces_tasks_reservations.go index c6a075d95..f337399b3 100644 --- a/rest/taskrouter/v1/workspaces_tasks_reservations.go +++ b/rest/taskrouter/v1/workspaces_tasks_reservations.go @@ -31,7 +31,9 @@ func (c *ApiService) FetchTaskReservation(WorkspaceSid string, TaskSid string, S path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -85,7 +87,9 @@ func (c *ApiService) PageTaskReservation(WorkspaceSid string, TaskSid string, pa path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ReservationStatus != nil { data.Set("ReservationStatus", *params.ReservationStatus) @@ -548,7 +552,9 @@ func (c *ApiService) UpdateTaskReservation(WorkspaceSid string, TaskSid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ReservationStatus != nil { data.Set("ReservationStatus", *params.ReservationStatus) diff --git a/rest/taskrouter/v1/workspaces_workers.go b/rest/taskrouter/v1/workspaces_workers.go index 88c4f41cf..f4971390d 100644 --- a/rest/taskrouter/v1/workspaces_workers.go +++ b/rest/taskrouter/v1/workspaces_workers.go @@ -52,7 +52,9 @@ func (c *ApiService) CreateWorker(WorkspaceSid string, params *CreateWorkerParam path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -97,7 +99,9 @@ func (c *ApiService) DeleteWorker(WorkspaceSid string, Sid string, params *Delet path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IfMatch != nil { headers["If-Match"] = *params.IfMatch @@ -119,7 +123,9 @@ func (c *ApiService) FetchWorker(WorkspaceSid string, Sid string) (*TaskrouterV1 path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -208,7 +214,9 @@ func (c *ApiService) PageWorker(WorkspaceSid string, params *ListWorkerParams, p path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ActivityName != nil { data.Set("ActivityName", *params.ActivityName) @@ -388,7 +396,9 @@ func (c *ApiService) UpdateWorker(WorkspaceSid string, Sid string, params *Updat path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ActivitySid != nil { data.Set("ActivitySid", *params.ActivitySid) diff --git a/rest/taskrouter/v1/workspaces_workers_channels.go b/rest/taskrouter/v1/workspaces_workers_channels.go index d6e72fafb..00676b248 100644 --- a/rest/taskrouter/v1/workspaces_workers_channels.go +++ b/rest/taskrouter/v1/workspaces_workers_channels.go @@ -31,7 +31,9 @@ func (c *ApiService) FetchWorkerChannel(WorkspaceSid string, WorkerSid string, S path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -73,7 +75,9 @@ func (c *ApiService) PageWorkerChannel(WorkspaceSid string, WorkerSid string, pa path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -212,7 +216,9 @@ func (c *ApiService) UpdateWorkerChannel(WorkspaceSid string, WorkerSid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Capacity != nil { data.Set("Capacity", fmt.Sprint(*params.Capacity)) diff --git a/rest/taskrouter/v1/workspaces_workers_cumulative_statistics.go b/rest/taskrouter/v1/workspaces_workers_cumulative_statistics.go index a6bdc0626..62e0d6845 100644 --- a/rest/taskrouter/v1/workspaces_workers_cumulative_statistics.go +++ b/rest/taskrouter/v1/workspaces_workers_cumulative_statistics.go @@ -57,7 +57,9 @@ func (c *ApiService) FetchWorkersCumulativeStatistics(WorkspaceSid string, param path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.EndDate != nil { data.Set("EndDate", fmt.Sprint((*params.EndDate).Format(time.RFC3339))) diff --git a/rest/taskrouter/v1/workspaces_workers_real_time_statistics.go b/rest/taskrouter/v1/workspaces_workers_real_time_statistics.go index 7fa3f4fe4..c7500bb80 100644 --- a/rest/taskrouter/v1/workspaces_workers_real_time_statistics.go +++ b/rest/taskrouter/v1/workspaces_workers_real_time_statistics.go @@ -37,7 +37,9 @@ func (c *ApiService) FetchWorkersRealTimeStatistics(WorkspaceSid string, params path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.TaskChannel != nil { data.Set("TaskChannel", *params.TaskChannel) diff --git a/rest/taskrouter/v1/workspaces_workers_reservations.go b/rest/taskrouter/v1/workspaces_workers_reservations.go index 0f09a20c8..172ef30bd 100644 --- a/rest/taskrouter/v1/workspaces_workers_reservations.go +++ b/rest/taskrouter/v1/workspaces_workers_reservations.go @@ -31,7 +31,9 @@ func (c *ApiService) FetchWorkerReservation(WorkspaceSid string, WorkerSid strin path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -79,7 +81,9 @@ func (c *ApiService) PageWorkerReservation(WorkspaceSid string, WorkerSid string path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ReservationStatus != nil { data.Set("ReservationStatus", *params.ReservationStatus) @@ -527,7 +531,9 @@ func (c *ApiService) UpdateWorkerReservation(WorkspaceSid string, WorkerSid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ReservationStatus != nil { data.Set("ReservationStatus", *params.ReservationStatus) diff --git a/rest/taskrouter/v1/workspaces_workers_statistics.go b/rest/taskrouter/v1/workspaces_workers_statistics.go index 6d2d96495..c7f1e2a08 100644 --- a/rest/taskrouter/v1/workspaces_workers_statistics.go +++ b/rest/taskrouter/v1/workspaces_workers_statistics.go @@ -58,7 +58,9 @@ func (c *ApiService) FetchWorkerInstanceStatistics(WorkspaceSid string, WorkerSi path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Minutes != nil { data.Set("Minutes", fmt.Sprint(*params.Minutes)) @@ -141,7 +143,9 @@ func (c *ApiService) FetchWorkerStatistics(WorkspaceSid string, params *FetchWor path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Minutes != nil { data.Set("Minutes", fmt.Sprint(*params.Minutes)) diff --git a/rest/taskrouter/v1/workspaces_workflows.go b/rest/taskrouter/v1/workspaces_workflows.go index e7dadffd7..43b1e2d90 100644 --- a/rest/taskrouter/v1/workspaces_workflows.go +++ b/rest/taskrouter/v1/workspaces_workflows.go @@ -64,7 +64,9 @@ func (c *ApiService) CreateWorkflow(WorkspaceSid string, params *CreateWorkflowP path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -104,7 +106,9 @@ func (c *ApiService) DeleteWorkflow(WorkspaceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -123,7 +127,9 @@ func (c *ApiService) FetchWorkflow(WorkspaceSid string, Sid string) (*Taskrouter path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -170,7 +176,9 @@ func (c *ApiService) PageWorkflow(WorkspaceSid string, params *ListWorkflowParam path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -335,7 +343,9 @@ func (c *ApiService) UpdateWorkflow(WorkspaceSid string, Sid string, params *Upd path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/taskrouter/v1/workspaces_workflows_cumulative_statistics.go b/rest/taskrouter/v1/workspaces_workflows_cumulative_statistics.go index ee6ebb429..295411579 100644 --- a/rest/taskrouter/v1/workspaces_workflows_cumulative_statistics.go +++ b/rest/taskrouter/v1/workspaces_workflows_cumulative_statistics.go @@ -64,7 +64,9 @@ func (c *ApiService) FetchWorkflowCumulativeStatistics(WorkspaceSid string, Work path = strings.Replace(path, "{"+"WorkflowSid"+"}", WorkflowSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.EndDate != nil { data.Set("EndDate", fmt.Sprint((*params.EndDate).Format(time.RFC3339))) diff --git a/rest/taskrouter/v1/workspaces_workflows_real_time_statistics.go b/rest/taskrouter/v1/workspaces_workflows_real_time_statistics.go index 5fb9ab9aa..f0aeb9656 100644 --- a/rest/taskrouter/v1/workspaces_workflows_real_time_statistics.go +++ b/rest/taskrouter/v1/workspaces_workflows_real_time_statistics.go @@ -38,7 +38,9 @@ func (c *ApiService) FetchWorkflowRealTimeStatistics(WorkspaceSid string, Workfl path = strings.Replace(path, "{"+"WorkflowSid"+"}", WorkflowSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.TaskChannel != nil { data.Set("TaskChannel", *params.TaskChannel) diff --git a/rest/taskrouter/v1/workspaces_workflows_statistics.go b/rest/taskrouter/v1/workspaces_workflows_statistics.go index 0c20502d5..123d3b981 100644 --- a/rest/taskrouter/v1/workspaces_workflows_statistics.go +++ b/rest/taskrouter/v1/workspaces_workflows_statistics.go @@ -64,7 +64,9 @@ func (c *ApiService) FetchWorkflowStatistics(WorkspaceSid string, WorkflowSid st path = strings.Replace(path, "{"+"WorkflowSid"+"}", WorkflowSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Minutes != nil { data.Set("Minutes", fmt.Sprint(*params.Minutes)) diff --git a/rest/trunking/v1/trunks.go b/rest/trunking/v1/trunks.go index 45a5e80ac..151892281 100644 --- a/rest/trunking/v1/trunks.go +++ b/rest/trunking/v1/trunks.go @@ -81,7 +81,9 @@ func (c *ApiService) CreateTrunk(params *CreateTrunkParams) (*TrunkingV1Trunk, e path := "/v1/Trunks" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -129,7 +131,9 @@ func (c *ApiService) DeleteTrunk(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -147,7 +151,9 @@ func (c *ApiService) FetchTrunk(Sid string) (*TrunkingV1Trunk, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -186,7 +192,9 @@ func (c *ApiService) PageTrunk(params *ListTrunkParams, pageToken, pageNumber st path := "/v1/Trunks" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -359,7 +367,9 @@ func (c *ApiService) UpdateTrunk(Sid string, params *UpdateTrunkParams) (*Trunki path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/trunking/v1/trunks_credential_lists.go b/rest/trunking/v1/trunks_credential_lists.go index 25b8c0f66..d7d1042d8 100644 --- a/rest/trunking/v1/trunks_credential_lists.go +++ b/rest/trunking/v1/trunks_credential_lists.go @@ -40,7 +40,9 @@ func (c *ApiService) CreateCredentialList(TrunkSid string, params *CreateCredent path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.CredentialListSid != nil { data.Set("CredentialListSid", *params.CredentialListSid) @@ -68,7 +70,9 @@ func (c *ApiService) DeleteCredentialList(TrunkSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -87,7 +91,9 @@ func (c *ApiService) FetchCredentialList(TrunkSid string, Sid string) (*Trunking path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -128,7 +134,9 @@ func (c *ApiService) PageCredentialList(TrunkSid string, params *ListCredentialL path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/trunking/v1/trunks_ip_access_control_lists.go b/rest/trunking/v1/trunks_ip_access_control_lists.go index 3ab9fdf5a..87fa47ae2 100644 --- a/rest/trunking/v1/trunks_ip_access_control_lists.go +++ b/rest/trunking/v1/trunks_ip_access_control_lists.go @@ -40,7 +40,9 @@ func (c *ApiService) CreateIpAccessControlList(TrunkSid string, params *CreateIp path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IpAccessControlListSid != nil { data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) @@ -68,7 +70,9 @@ func (c *ApiService) DeleteIpAccessControlList(TrunkSid string, Sid string) erro path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -87,7 +91,9 @@ func (c *ApiService) FetchIpAccessControlList(TrunkSid string, Sid string) (*Tru path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -128,7 +134,9 @@ func (c *ApiService) PageIpAccessControlList(TrunkSid string, params *ListIpAcce path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/trunking/v1/trunks_origination_urls.go b/rest/trunking/v1/trunks_origination_urls.go index 147bdb0e1..135109c9c 100644 --- a/rest/trunking/v1/trunks_origination_urls.go +++ b/rest/trunking/v1/trunks_origination_urls.go @@ -64,7 +64,9 @@ func (c *ApiService) CreateOriginationUrl(TrunkSid string, params *CreateOrigina path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Weight != nil { data.Set("Weight", fmt.Sprint(*params.Weight)) @@ -104,7 +106,9 @@ func (c *ApiService) DeleteOriginationUrl(TrunkSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -123,7 +127,9 @@ func (c *ApiService) FetchOriginationUrl(TrunkSid string, Sid string) (*Trunking path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -164,7 +170,9 @@ func (c *ApiService) PageOriginationUrl(TrunkSid string, params *ListOrigination path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -320,7 +328,9 @@ func (c *ApiService) UpdateOriginationUrl(TrunkSid string, Sid string, params *U path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Weight != nil { data.Set("Weight", fmt.Sprint(*params.Weight)) diff --git a/rest/trunking/v1/trunks_phone_numbers.go b/rest/trunking/v1/trunks_phone_numbers.go index 4670e4b37..4f83a2672 100644 --- a/rest/trunking/v1/trunks_phone_numbers.go +++ b/rest/trunking/v1/trunks_phone_numbers.go @@ -40,7 +40,9 @@ func (c *ApiService) CreatePhoneNumber(TrunkSid string, params *CreatePhoneNumbe path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PhoneNumberSid != nil { data.Set("PhoneNumberSid", *params.PhoneNumberSid) @@ -68,7 +70,9 @@ func (c *ApiService) DeletePhoneNumber(TrunkSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -87,7 +91,9 @@ func (c *ApiService) FetchPhoneNumber(TrunkSid string, Sid string) (*TrunkingV1P path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -128,7 +134,9 @@ func (c *ApiService) PagePhoneNumber(TrunkSid string, params *ListPhoneNumberPar path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/trunking/v1/trunks_recording.go b/rest/trunking/v1/trunks_recording.go index 615fd2e51..e4a0b8d08 100644 --- a/rest/trunking/v1/trunks_recording.go +++ b/rest/trunking/v1/trunks_recording.go @@ -26,7 +26,9 @@ func (c *ApiService) FetchRecording(TrunkSid string) (*TrunkingV1Recording, erro path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -66,7 +68,9 @@ func (c *ApiService) UpdateRecording(TrunkSid string, params *UpdateRecordingPar path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Mode != nil { data.Set("Mode", *params.Mode) diff --git a/rest/trusthub/v1/compliance_inquiries_customers_initialize.go b/rest/trusthub/v1/compliance_inquiries_customers_initialize.go index 7fe9d7e18..1b1f3ba62 100644 --- a/rest/trusthub/v1/compliance_inquiries_customers_initialize.go +++ b/rest/trusthub/v1/compliance_inquiries_customers_initialize.go @@ -42,7 +42,9 @@ func (c *ApiService) CreateComplianceInquiry(params *CreateComplianceInquiryPara path := "/v1/ComplianceInquiries/Customers/Initialize" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PrimaryProfileSid != nil { data.Set("PrimaryProfileSid", *params.PrimaryProfileSid) @@ -83,7 +85,9 @@ func (c *ApiService) UpdateComplianceInquiry(CustomerId string, params *UpdateCo path = strings.Replace(path, "{"+"CustomerId"+"}", CustomerId, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PrimaryProfileSid != nil { data.Set("PrimaryProfileSid", *params.PrimaryProfileSid) diff --git a/rest/trusthub/v1/compliance_inquiries_registration_regulatory_compliance_gb_initialize.go b/rest/trusthub/v1/compliance_inquiries_registration_regulatory_compliance_gb_initialize.go index 2eceb7500..b7e752b7f 100644 --- a/rest/trusthub/v1/compliance_inquiries_registration_regulatory_compliance_gb_initialize.go +++ b/rest/trusthub/v1/compliance_inquiries_registration_regulatory_compliance_gb_initialize.go @@ -265,7 +265,9 @@ func (c *ApiService) CreateComplianceRegistration(params *CreateComplianceRegist path := "/v1/ComplianceInquiries/Registration/RegulatoryCompliance/GB/Initialize" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.EndUserType != nil { data.Set("EndUserType", *params.EndUserType) @@ -423,7 +425,9 @@ func (c *ApiService) UpdateComplianceRegistration(RegistrationId string, params path = strings.Replace(path, "{"+"RegistrationId"+"}", RegistrationId, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IsIsvEmbed != nil { data.Set("IsIsvEmbed", fmt.Sprint(*params.IsIsvEmbed)) diff --git a/rest/trusthub/v1/compliance_inquiries_tollfree_initialize.go b/rest/trusthub/v1/compliance_inquiries_tollfree_initialize.go index ef9789f04..dda6fb38c 100644 --- a/rest/trusthub/v1/compliance_inquiries_tollfree_initialize.go +++ b/rest/trusthub/v1/compliance_inquiries_tollfree_initialize.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" + "fmt" "net/url" ) @@ -65,6 +66,8 @@ type CreateComplianceTollfreeInquiryParams struct { BusinessContactPhone *string `json:"BusinessContactPhone,omitempty"` // Theme id for styling the inquiry form. ThemeSetId *string `json:"ThemeSetId,omitempty"` + // Skip the messaging use case screen of the inquiry form. + SkipMessagingUseCase *bool `json:"SkipMessagingUseCase,omitempty"` } func (params *CreateComplianceTollfreeInquiryParams) SetTollfreePhoneNumber(TollfreePhoneNumber string) *CreateComplianceTollfreeInquiryParams { @@ -155,13 +158,19 @@ func (params *CreateComplianceTollfreeInquiryParams) SetThemeSetId(ThemeSetId st params.ThemeSetId = &ThemeSetId return params } +func (params *CreateComplianceTollfreeInquiryParams) SetSkipMessagingUseCase(SkipMessagingUseCase bool) *CreateComplianceTollfreeInquiryParams { + params.SkipMessagingUseCase = &SkipMessagingUseCase + return params +} // Create a new Compliance Tollfree Verification Inquiry for the authenticated account. This is necessary to start a new embedded session. func (c *ApiService) CreateComplianceTollfreeInquiry(params *CreateComplianceTollfreeInquiryParams) (*TrusthubV1ComplianceTollfreeInquiry, error) { path := "/v1/ComplianceInquiries/Tollfree/Initialize" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.TollfreePhoneNumber != nil { data.Set("TollfreePhoneNumber", *params.TollfreePhoneNumber) @@ -233,6 +242,9 @@ func (c *ApiService) CreateComplianceTollfreeInquiry(params *CreateComplianceTol if params != nil && params.ThemeSetId != nil { data.Set("ThemeSetId", *params.ThemeSetId) } + if params != nil && params.SkipMessagingUseCase != nil { + data.Set("SkipMessagingUseCase", fmt.Sprint(*params.SkipMessagingUseCase)) + } resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/trusthub/v1/customer_profiles.go b/rest/trusthub/v1/customer_profiles.go index f6cf893ca..c75b0b1fb 100644 --- a/rest/trusthub/v1/customer_profiles.go +++ b/rest/trusthub/v1/customer_profiles.go @@ -57,7 +57,9 @@ func (c *ApiService) CreateCustomerProfile(params *CreateCustomerProfileParams) path := "/v1/CustomerProfiles" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -93,7 +95,9 @@ func (c *ApiService) DeleteCustomerProfile(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -111,7 +115,9 @@ func (c *ApiService) FetchCustomerProfile(Sid string) (*TrusthubV1CustomerProfil path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -168,7 +174,9 @@ func (c *ApiService) PageCustomerProfile(params *ListCustomerProfileParams, page path := "/v1/CustomerProfiles" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) @@ -326,7 +334,9 @@ func (c *ApiService) UpdateCustomerProfile(Sid string, params *UpdateCustomerPro path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/trusthub/v1/customer_profiles_channel_endpoint_assignments.go b/rest/trusthub/v1/customer_profiles_channel_endpoint_assignments.go index 81f947b6d..ce70ae79a 100644 --- a/rest/trusthub/v1/customer_profiles_channel_endpoint_assignments.go +++ b/rest/trusthub/v1/customer_profiles_channel_endpoint_assignments.go @@ -46,7 +46,9 @@ func (c *ApiService) CreateCustomerProfileChannelEndpointAssignment(CustomerProf path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ChannelEndpointType != nil { data.Set("ChannelEndpointType", *params.ChannelEndpointType) @@ -77,7 +79,9 @@ func (c *ApiService) DeleteCustomerProfileChannelEndpointAssignment(CustomerProf path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -96,7 +100,9 @@ func (c *ApiService) FetchCustomerProfileChannelEndpointAssignment(CustomerProfi path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -149,7 +155,9 @@ func (c *ApiService) PageCustomerProfileChannelEndpointAssignment(CustomerProfil path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ChannelEndpointSid != nil { data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) diff --git a/rest/trusthub/v1/customer_profiles_entity_assignments.go b/rest/trusthub/v1/customer_profiles_entity_assignments.go index 49eec7e32..4c02e6bff 100644 --- a/rest/trusthub/v1/customer_profiles_entity_assignments.go +++ b/rest/trusthub/v1/customer_profiles_entity_assignments.go @@ -40,7 +40,9 @@ func (c *ApiService) CreateCustomerProfileEntityAssignment(CustomerProfileSid st path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ObjectSid != nil { data.Set("ObjectSid", *params.ObjectSid) @@ -68,7 +70,9 @@ func (c *ApiService) DeleteCustomerProfileEntityAssignment(CustomerProfileSid st path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -87,7 +91,9 @@ func (c *ApiService) FetchCustomerProfileEntityAssignment(CustomerProfileSid str path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -134,7 +140,9 @@ func (c *ApiService) PageCustomerProfileEntityAssignment(CustomerProfileSid stri path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ObjectType != nil { data.Set("ObjectType", *params.ObjectType) diff --git a/rest/trusthub/v1/customer_profiles_evaluations.go b/rest/trusthub/v1/customer_profiles_evaluations.go index e56546485..5ac4aca2d 100644 --- a/rest/trusthub/v1/customer_profiles_evaluations.go +++ b/rest/trusthub/v1/customer_profiles_evaluations.go @@ -40,7 +40,9 @@ func (c *ApiService) CreateCustomerProfileEvaluation(CustomerProfileSid string, path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PolicySid != nil { data.Set("PolicySid", *params.PolicySid) @@ -68,7 +70,9 @@ func (c *ApiService) FetchCustomerProfileEvaluation(CustomerProfileSid string, S path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -109,7 +113,9 @@ func (c *ApiService) PageCustomerProfileEvaluation(CustomerProfileSid string, pa path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/trusthub/v1/docs/ComplianceInquiriesTollfreeInitializeApi.md b/rest/trusthub/v1/docs/ComplianceInquiriesTollfreeInitializeApi.md index 63ab15827..a23ac5a3c 100644 --- a/rest/trusthub/v1/docs/ComplianceInquiriesTollfreeInitializeApi.md +++ b/rest/trusthub/v1/docs/ComplianceInquiriesTollfreeInitializeApi.md @@ -49,6 +49,7 @@ Name | Type | Description **BusinessContactEmail** | **string** | The email address of the contact for the business or organization using the Tollfree number. **BusinessContactPhone** | **string** | The phone number of the contact for the business or organization using the Tollfree number. **ThemeSetId** | **string** | Theme id for styling the inquiry form. +**SkipMessagingUseCase** | **bool** | Skip the messaging use case screen of the inquiry form. ### Return type diff --git a/rest/trusthub/v1/end_user_types.go b/rest/trusthub/v1/end_user_types.go index 4acde972e..2a3462963 100644 --- a/rest/trusthub/v1/end_user_types.go +++ b/rest/trusthub/v1/end_user_types.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchEndUserType(Sid string) (*TrusthubV1EndUserType, error path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -68,7 +70,9 @@ func (c *ApiService) PageEndUserType(params *ListEndUserTypeParams, pageToken, p path := "/v1/EndUserTypes" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/trusthub/v1/end_users.go b/rest/trusthub/v1/end_users.go index 47d0b5525..c1da4b7d7 100644 --- a/rest/trusthub/v1/end_users.go +++ b/rest/trusthub/v1/end_users.go @@ -51,7 +51,9 @@ func (c *ApiService) CreateEndUser(params *CreateEndUserParams) (*TrusthubV1EndU path := "/v1/EndUsers" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -90,7 +92,9 @@ func (c *ApiService) DeleteEndUser(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -108,7 +112,9 @@ func (c *ApiService) FetchEndUser(Sid string) (*TrusthubV1EndUser, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -147,7 +153,9 @@ func (c *ApiService) PageEndUser(params *ListEndUserParams, pageToken, pageNumbe path := "/v1/EndUsers" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -284,7 +292,9 @@ func (c *ApiService) UpdateEndUser(Sid string, params *UpdateEndUserParams) (*Tr path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/trusthub/v1/policies.go b/rest/trusthub/v1/policies.go index 2c06d0452..b518ba0da 100644 --- a/rest/trusthub/v1/policies.go +++ b/rest/trusthub/v1/policies.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchPolicies(Sid string) (*TrusthubV1Policies, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -68,7 +70,9 @@ func (c *ApiService) PagePolicies(params *ListPoliciesParams, pageToken, pageNum path := "/v1/Policies" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/trusthub/v1/supporting_document_types.go b/rest/trusthub/v1/supporting_document_types.go index 6c929f71e..2edfa91be 100644 --- a/rest/trusthub/v1/supporting_document_types.go +++ b/rest/trusthub/v1/supporting_document_types.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchSupportingDocumentType(Sid string) (*TrusthubV1Support path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -68,7 +70,9 @@ func (c *ApiService) PageSupportingDocumentType(params *ListSupportingDocumentTy path := "/v1/SupportingDocumentTypes" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/trusthub/v1/supporting_documents.go b/rest/trusthub/v1/supporting_documents.go index ac2e78c0b..9484e6d91 100644 --- a/rest/trusthub/v1/supporting_documents.go +++ b/rest/trusthub/v1/supporting_documents.go @@ -51,7 +51,9 @@ func (c *ApiService) CreateSupportingDocument(params *CreateSupportingDocumentPa path := "/v1/SupportingDocuments" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -90,7 +92,9 @@ func (c *ApiService) DeleteSupportingDocument(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -108,7 +112,9 @@ func (c *ApiService) FetchSupportingDocument(Sid string) (*TrusthubV1SupportingD path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -147,7 +153,9 @@ func (c *ApiService) PageSupportingDocument(params *ListSupportingDocumentParams path := "/v1/SupportingDocuments" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -284,7 +292,9 @@ func (c *ApiService) UpdateSupportingDocument(Sid string, params *UpdateSupporti path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/trusthub/v1/trust_products.go b/rest/trusthub/v1/trust_products.go index a916a760e..02555dd2f 100644 --- a/rest/trusthub/v1/trust_products.go +++ b/rest/trusthub/v1/trust_products.go @@ -57,7 +57,9 @@ func (c *ApiService) CreateTrustProduct(params *CreateTrustProductParams) (*Trus path := "/v1/TrustProducts" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -93,7 +95,9 @@ func (c *ApiService) DeleteTrustProduct(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -111,7 +115,9 @@ func (c *ApiService) FetchTrustProduct(Sid string) (*TrusthubV1TrustProduct, err path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -168,7 +174,9 @@ func (c *ApiService) PageTrustProduct(params *ListTrustProductParams, pageToken, path := "/v1/TrustProducts" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) @@ -326,7 +334,9 @@ func (c *ApiService) UpdateTrustProduct(Sid string, params *UpdateTrustProductPa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/trusthub/v1/trust_products_channel_endpoint_assignments.go b/rest/trusthub/v1/trust_products_channel_endpoint_assignments.go index c90bc4ca0..2f25823d1 100644 --- a/rest/trusthub/v1/trust_products_channel_endpoint_assignments.go +++ b/rest/trusthub/v1/trust_products_channel_endpoint_assignments.go @@ -46,7 +46,9 @@ func (c *ApiService) CreateTrustProductChannelEndpointAssignment(TrustProductSid path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ChannelEndpointType != nil { data.Set("ChannelEndpointType", *params.ChannelEndpointType) @@ -77,7 +79,9 @@ func (c *ApiService) DeleteTrustProductChannelEndpointAssignment(TrustProductSid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -96,7 +100,9 @@ func (c *ApiService) FetchTrustProductChannelEndpointAssignment(TrustProductSid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -149,7 +155,9 @@ func (c *ApiService) PageTrustProductChannelEndpointAssignment(TrustProductSid s path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ChannelEndpointSid != nil { data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) diff --git a/rest/trusthub/v1/trust_products_entity_assignments.go b/rest/trusthub/v1/trust_products_entity_assignments.go index 114b930bb..d8accdc65 100644 --- a/rest/trusthub/v1/trust_products_entity_assignments.go +++ b/rest/trusthub/v1/trust_products_entity_assignments.go @@ -40,7 +40,9 @@ func (c *ApiService) CreateTrustProductEntityAssignment(TrustProductSid string, path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ObjectSid != nil { data.Set("ObjectSid", *params.ObjectSid) @@ -68,7 +70,9 @@ func (c *ApiService) DeleteTrustProductEntityAssignment(TrustProductSid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -87,7 +91,9 @@ func (c *ApiService) FetchTrustProductEntityAssignment(TrustProductSid string, S path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -134,7 +140,9 @@ func (c *ApiService) PageTrustProductEntityAssignment(TrustProductSid string, pa path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.ObjectType != nil { data.Set("ObjectType", *params.ObjectType) diff --git a/rest/trusthub/v1/trust_products_evaluations.go b/rest/trusthub/v1/trust_products_evaluations.go index 652c6e9b0..3799fca77 100644 --- a/rest/trusthub/v1/trust_products_evaluations.go +++ b/rest/trusthub/v1/trust_products_evaluations.go @@ -40,7 +40,9 @@ func (c *ApiService) CreateTrustProductEvaluation(TrustProductSid string, params path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PolicySid != nil { data.Set("PolicySid", *params.PolicySid) @@ -68,7 +70,9 @@ func (c *ApiService) FetchTrustProductEvaluation(TrustProductSid string, Sid str path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -109,7 +113,9 @@ func (c *ApiService) PageTrustProductEvaluation(TrustProductSid string, params * path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/verify/v2/attempts.go b/rest/verify/v2/attempts.go index 426ad0dcc..22a7726e0 100644 --- a/rest/verify/v2/attempts.go +++ b/rest/verify/v2/attempts.go @@ -30,7 +30,9 @@ func (c *ApiService) FetchVerificationAttempt(Sid string) (*VerifyV2Verification path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -117,7 +119,9 @@ func (c *ApiService) PageVerificationAttempt(params *ListVerificationAttemptPara path := "/v2/Attempts" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.DateCreatedAfter != nil { data.Set("DateCreatedAfter", fmt.Sprint((*params.DateCreatedAfter).Format(time.RFC3339))) diff --git a/rest/verify/v2/attempts_summary.go b/rest/verify/v2/attempts_summary.go index 6bb28cb9d..5fb190689 100644 --- a/rest/verify/v2/attempts_summary.go +++ b/rest/verify/v2/attempts_summary.go @@ -67,7 +67,9 @@ func (c *ApiService) FetchVerificationAttemptsSummary(params *FetchVerificationA path := "/v2/Attempts/Summary" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.VerifyServiceSid != nil { data.Set("VerifyServiceSid", *params.VerifyServiceSid) diff --git a/rest/verify/v2/forms.go b/rest/verify/v2/forms.go index 16db4c563..33f9cf1c1 100644 --- a/rest/verify/v2/forms.go +++ b/rest/verify/v2/forms.go @@ -26,7 +26,9 @@ func (c *ApiService) FetchForm(FormType string) (*VerifyV2Form, error) { path = strings.Replace(path, "{"+"FormType"+"}", FormType, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/verify/v2/safe_list_numbers.go b/rest/verify/v2/safe_list_numbers.go index 52594bedf..098d83ce5 100644 --- a/rest/verify/v2/safe_list_numbers.go +++ b/rest/verify/v2/safe_list_numbers.go @@ -36,7 +36,9 @@ func (c *ApiService) CreateSafelist(params *CreateSafelistParams) (*VerifyV2Safe path := "/v2/SafeList/Numbers" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PhoneNumber != nil { data.Set("PhoneNumber", *params.PhoneNumber) @@ -63,7 +65,9 @@ func (c *ApiService) DeleteSafelist(PhoneNumber string) error { path = strings.Replace(path, "{"+"PhoneNumber"+"}", PhoneNumber, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -81,7 +85,9 @@ func (c *ApiService) FetchSafelist(PhoneNumber string) (*VerifyV2Safelist, error path = strings.Replace(path, "{"+"PhoneNumber"+"}", PhoneNumber, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/verify/v2/services.go b/rest/verify/v2/services.go index 97ba28643..8172d548b 100644 --- a/rest/verify/v2/services.go +++ b/rest/verify/v2/services.go @@ -153,7 +153,9 @@ func (c *ApiService) CreateService(params *CreateServiceParams) (*VerifyV2Servic path := "/v2/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -237,7 +239,9 @@ func (c *ApiService) DeleteService(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -255,7 +259,9 @@ func (c *ApiService) FetchService(Sid string) (*VerifyV2Service, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -294,7 +300,9 @@ func (c *ApiService) PageService(params *ListServiceParams, pageToken, pageNumbe path := "/v2/Services" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -539,7 +547,9 @@ func (c *ApiService) UpdateService(Sid string, params *UpdateServiceParams) (*Ve path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/verify/v2/services_access_tokens.go b/rest/verify/v2/services_access_tokens.go index c2921683f..964cf7c01 100644 --- a/rest/verify/v2/services_access_tokens.go +++ b/rest/verify/v2/services_access_tokens.go @@ -56,7 +56,9 @@ func (c *ApiService) CreateAccessToken(ServiceSid string, params *CreateAccessTo path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -93,7 +95,9 @@ func (c *ApiService) FetchAccessToken(ServiceSid string, Sid string) (*VerifyV2A path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/verify/v2/services_entities.go b/rest/verify/v2/services_entities.go index 4f5ce3457..c3b52698c 100644 --- a/rest/verify/v2/services_entities.go +++ b/rest/verify/v2/services_entities.go @@ -40,7 +40,9 @@ func (c *ApiService) CreateEntity(ServiceSid string, params *CreateEntityParams) path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) @@ -68,7 +70,9 @@ func (c *ApiService) DeleteEntity(ServiceSid string, Identity string) error { path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -87,7 +91,9 @@ func (c *ApiService) FetchEntity(ServiceSid string, Identity string) (*VerifyV2E path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -128,7 +134,9 @@ func (c *ApiService) PageEntity(ServiceSid string, params *ListEntityParams, pag path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/verify/v2/services_entities_challenges.go b/rest/verify/v2/services_entities_challenges.go index 9b200d5e4..fe09acb80 100644 --- a/rest/verify/v2/services_entities_challenges.go +++ b/rest/verify/v2/services_entities_challenges.go @@ -72,7 +72,9 @@ func (c *ApiService) CreateChallenge(ServiceSid string, Identity string, params path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FactorSid != nil { data.Set("FactorSid", *params.FactorSid) @@ -130,7 +132,9 @@ func (c *ApiService) FetchChallenge(ServiceSid string, Identity string, Sid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -190,7 +194,9 @@ func (c *ApiService) PageChallenge(ServiceSid string, Identity string, params *L path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FactorSid != nil { data.Set("FactorSid", *params.FactorSid) @@ -338,7 +344,9 @@ func (c *ApiService) UpdateChallenge(ServiceSid string, Identity string, Sid str path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AuthPayload != nil { data.Set("AuthPayload", *params.AuthPayload) diff --git a/rest/verify/v2/services_entities_challenges_notifications.go b/rest/verify/v2/services_entities_challenges_notifications.go index 6d36b964a..2fbd0d9b7 100644 --- a/rest/verify/v2/services_entities_challenges_notifications.go +++ b/rest/verify/v2/services_entities_challenges_notifications.go @@ -40,7 +40,9 @@ func (c *ApiService) CreateNotification(ServiceSid string, Identity string, Chal path = strings.Replace(path, "{"+"ChallengeSid"+"}", ChallengeSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) diff --git a/rest/verify/v2/services_entities_factors.go b/rest/verify/v2/services_entities_factors.go index 089255ec7..536f72e76 100644 --- a/rest/verify/v2/services_entities_factors.go +++ b/rest/verify/v2/services_entities_factors.go @@ -119,7 +119,9 @@ func (c *ApiService) CreateNewFactor(ServiceSid string, Identity string, params path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -193,7 +195,9 @@ func (c *ApiService) DeleteFactor(ServiceSid string, Identity string, Sid string path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -213,7 +217,9 @@ func (c *ApiService) FetchFactor(ServiceSid string, Identity string, Sid string) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -255,7 +261,9 @@ func (c *ApiService) PageFactor(ServiceSid string, Identity string, params *List path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -436,7 +444,9 @@ func (c *ApiService) UpdateFactor(ServiceSid string, Identity string, Sid string path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.AuthPayload != nil { data.Set("AuthPayload", *params.AuthPayload) diff --git a/rest/verify/v2/services_messaging_configurations.go b/rest/verify/v2/services_messaging_configurations.go index 06b8f916a..011021fe6 100644 --- a/rest/verify/v2/services_messaging_configurations.go +++ b/rest/verify/v2/services_messaging_configurations.go @@ -46,7 +46,9 @@ func (c *ApiService) CreateMessagingConfiguration(ServiceSid string, params *Cre path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Country != nil { data.Set("Country", *params.Country) @@ -77,7 +79,9 @@ func (c *ApiService) DeleteMessagingConfiguration(ServiceSid string, Country str path = strings.Replace(path, "{"+"Country"+"}", Country, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -96,7 +100,9 @@ func (c *ApiService) FetchMessagingConfiguration(ServiceSid string, Country stri path = strings.Replace(path, "{"+"Country"+"}", Country, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -137,7 +143,9 @@ func (c *ApiService) PageMessagingConfiguration(ServiceSid string, params *ListM path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -269,7 +277,9 @@ func (c *ApiService) UpdateMessagingConfiguration(ServiceSid string, Country str path = strings.Replace(path, "{"+"Country"+"}", Country, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.MessagingServiceSid != nil { data.Set("MessagingServiceSid", *params.MessagingServiceSid) diff --git a/rest/verify/v2/services_rate_limits.go b/rest/verify/v2/services_rate_limits.go index 82c83ac73..4e29bc55d 100644 --- a/rest/verify/v2/services_rate_limits.go +++ b/rest/verify/v2/services_rate_limits.go @@ -46,7 +46,9 @@ func (c *ApiService) CreateRateLimit(ServiceSid string, params *CreateRateLimitP path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) @@ -77,7 +79,9 @@ func (c *ApiService) DeleteRateLimit(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -96,7 +100,9 @@ func (c *ApiService) FetchRateLimit(ServiceSid string, Sid string) (*VerifyV2Rat path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -137,7 +143,9 @@ func (c *ApiService) PageRateLimit(ServiceSid string, params *ListRateLimitParam path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -269,7 +277,9 @@ func (c *ApiService) UpdateRateLimit(ServiceSid string, Sid string, params *Upda path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Description != nil { data.Set("Description", *params.Description) diff --git a/rest/verify/v2/services_rate_limits_buckets.go b/rest/verify/v2/services_rate_limits_buckets.go index 1eb51fac3..c835b280e 100644 --- a/rest/verify/v2/services_rate_limits_buckets.go +++ b/rest/verify/v2/services_rate_limits_buckets.go @@ -47,7 +47,9 @@ func (c *ApiService) CreateBucket(ServiceSid string, RateLimitSid string, params path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Max != nil { data.Set("Max", fmt.Sprint(*params.Max)) @@ -79,7 +81,9 @@ func (c *ApiService) DeleteBucket(ServiceSid string, RateLimitSid string, Sid st path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -99,7 +103,9 @@ func (c *ApiService) FetchBucket(ServiceSid string, RateLimitSid string, Sid str path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -141,7 +147,9 @@ func (c *ApiService) PageBucket(ServiceSid string, RateLimitSid string, params * path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -280,7 +288,9 @@ func (c *ApiService) UpdateBucket(ServiceSid string, RateLimitSid string, Sid st path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Max != nil { data.Set("Max", fmt.Sprint(*params.Max)) diff --git a/rest/verify/v2/services_verification_check.go b/rest/verify/v2/services_verification_check.go index 0f2caad79..ef25df11d 100644 --- a/rest/verify/v2/services_verification_check.go +++ b/rest/verify/v2/services_verification_check.go @@ -61,7 +61,9 @@ func (c *ApiService) CreateVerificationCheck(ServiceSid string, params *CreateVe path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Code != nil { data.Set("Code", *params.Code) diff --git a/rest/verify/v2/services_verifications.go b/rest/verify/v2/services_verifications.go index 097e35704..45eda264e 100644 --- a/rest/verify/v2/services_verifications.go +++ b/rest/verify/v2/services_verifications.go @@ -133,7 +133,9 @@ func (c *ApiService) CreateVerification(ServiceSid string, params *CreateVerific path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.To != nil { data.Set("To", *params.To) @@ -221,7 +223,9 @@ func (c *ApiService) FetchVerification(ServiceSid string, Sid string) (*VerifyV2 path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -256,7 +260,9 @@ func (c *ApiService) UpdateVerification(ServiceSid string, Sid string, params *U path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/verify/v2/services_webhooks.go b/rest/verify/v2/services_webhooks.go index 46dd9318c..d057d8efa 100644 --- a/rest/verify/v2/services_webhooks.go +++ b/rest/verify/v2/services_webhooks.go @@ -64,7 +64,9 @@ func (c *ApiService) CreateWebhook(ServiceSid string, params *CreateWebhookParam path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -106,7 +108,9 @@ func (c *ApiService) DeleteWebhook(ServiceSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -125,7 +129,9 @@ func (c *ApiService) FetchWebhook(ServiceSid string, Sid string) (*VerifyV2Webho path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -166,7 +172,9 @@ func (c *ApiService) PageWebhook(ServiceSid string, params *ListWebhookParams, p path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -322,7 +330,9 @@ func (c *ApiService) UpdateWebhook(ServiceSid string, Sid string, params *Update path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/verify/v2/templates.go b/rest/verify/v2/templates.go index ef868baca..ac664378d 100644 --- a/rest/verify/v2/templates.go +++ b/rest/verify/v2/templates.go @@ -50,7 +50,9 @@ func (c *ApiService) PageVerificationTemplate(params *ListVerificationTemplatePa path := "/v2/Templates" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/video/v1/composition_hooks.go b/rest/video/v1/composition_hooks.go index a7a824e18..b39e85810 100644 --- a/rest/video/v1/composition_hooks.go +++ b/rest/video/v1/composition_hooks.go @@ -94,7 +94,9 @@ func (c *ApiService) CreateCompositionHook(params *CreateCompositionHookParams) path := "/v1/CompositionHooks" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -158,7 +160,9 @@ func (c *ApiService) DeleteCompositionHook(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -176,7 +180,9 @@ func (c *ApiService) FetchCompositionHook(Sid string) (*VideoV1CompositionHook, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -239,7 +245,9 @@ func (c *ApiService) PageCompositionHook(params *ListCompositionHookParams, page path := "/v1/CompositionHooks" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Enabled != nil { data.Set("Enabled", fmt.Sprint(*params.Enabled)) @@ -436,7 +444,9 @@ func (c *ApiService) UpdateCompositionHook(Sid string, params *UpdateComposition path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/video/v1/composition_settings_default.go b/rest/video/v1/composition_settings_default.go index 84854f91f..11e12253e 100644 --- a/rest/video/v1/composition_settings_default.go +++ b/rest/video/v1/composition_settings_default.go @@ -66,7 +66,9 @@ func (c *ApiService) CreateCompositionSettings(params *CreateCompositionSettings path := "/v1/CompositionSettings/Default" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -107,7 +109,9 @@ func (c *ApiService) FetchCompositionSettings() (*VideoV1CompositionSettings, er path := "/v1/CompositionSettings/Default" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/video/v1/compositions.go b/rest/video/v1/compositions.go index d0dce4ee9..c244604bf 100644 --- a/rest/video/v1/compositions.go +++ b/rest/video/v1/compositions.go @@ -88,7 +88,9 @@ func (c *ApiService) CreateComposition(params *CreateCompositionParams) (*VideoV path := "/v1/Compositions" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.RoomSid != nil { data.Set("RoomSid", *params.RoomSid) @@ -149,7 +151,9 @@ func (c *ApiService) DeleteComposition(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -167,7 +171,9 @@ func (c *ApiService) FetchComposition(Sid string) (*VideoV1Composition, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -230,7 +236,9 @@ func (c *ApiService) PageComposition(params *ListCompositionParams, pageToken, p path := "/v1/Compositions" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/video/v1/recording_settings_default.go b/rest/video/v1/recording_settings_default.go index 9cf263345..6c590d55f 100644 --- a/rest/video/v1/recording_settings_default.go +++ b/rest/video/v1/recording_settings_default.go @@ -66,7 +66,9 @@ func (c *ApiService) CreateRecordingSettings(params *CreateRecordingSettingsPara path := "/v1/RecordingSettings/Default" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -107,7 +109,9 @@ func (c *ApiService) FetchRecordingSettings() (*VideoV1RecordingSettings, error) path := "/v1/RecordingSettings/Default" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/video/v1/recordings.go b/rest/video/v1/recordings.go index fede4f40f..f0821053c 100644 --- a/rest/video/v1/recordings.go +++ b/rest/video/v1/recordings.go @@ -30,7 +30,9 @@ func (c *ApiService) DeleteRecording(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -48,7 +50,9 @@ func (c *ApiService) FetchRecording(Sid string) (*VideoV1Recording, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -123,7 +127,9 @@ func (c *ApiService) PageRecording(params *ListRecordingParams, pageToken, pageN path := "/v1/Recordings" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/video/v1/rooms.go b/rest/video/v1/rooms.go index 0ea1b2229..aa1128829 100644 --- a/rest/video/v1/rooms.go +++ b/rest/video/v1/rooms.go @@ -124,7 +124,9 @@ func (c *ApiService) CreateRoom(params *CreateRoomParams) (*VideoV1Room, error) path := "/v1/Rooms" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.EnableTurn != nil { data.Set("EnableTurn", fmt.Sprint(*params.EnableTurn)) @@ -201,7 +203,9 @@ func (c *ApiService) FetchRoom(Sid string) (*VideoV1Room, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -264,7 +268,9 @@ func (c *ApiService) PageRoom(params *ListRoomParams, pageToken, pageNumber stri path := "/v1/Rooms" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) @@ -407,7 +413,9 @@ func (c *ApiService) UpdateRoom(Sid string, params *UpdateRoomParams) (*VideoV1R path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/video/v1/rooms_participants.go b/rest/video/v1/rooms_participants.go index af815d01e..9ece25ab5 100644 --- a/rest/video/v1/rooms_participants.go +++ b/rest/video/v1/rooms_participants.go @@ -31,7 +31,9 @@ func (c *ApiService) FetchRoomParticipant(RoomSid string, Sid string) (*VideoV1R path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -96,7 +98,9 @@ func (c *ApiService) PageRoomParticipant(RoomSid string, params *ListRoomPartici path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) @@ -240,7 +244,9 @@ func (c *ApiService) UpdateRoomParticipant(RoomSid string, Sid string, params *U path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/video/v1/rooms_participants_anonymize.go b/rest/video/v1/rooms_participants_anonymize.go index 509352a4d..bee96b1c9 100644 --- a/rest/video/v1/rooms_participants_anonymize.go +++ b/rest/video/v1/rooms_participants_anonymize.go @@ -27,7 +27,9 @@ func (c *ApiService) UpdateRoomParticipantAnonymize(RoomSid string, Sid string) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/video/v1/rooms_participants_published_tracks.go b/rest/video/v1/rooms_participants_published_tracks.go index 940564dc0..a0bf1f669 100644 --- a/rest/video/v1/rooms_participants_published_tracks.go +++ b/rest/video/v1/rooms_participants_published_tracks.go @@ -31,7 +31,9 @@ func (c *ApiService) FetchRoomParticipantPublishedTrack(RoomSid string, Particip path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -73,7 +75,9 @@ func (c *ApiService) PageRoomParticipantPublishedTrack(RoomSid string, Participa path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/video/v1/rooms_participants_subscribe_rules.go b/rest/video/v1/rooms_participants_subscribe_rules.go index 551ff66a2..2b9388abb 100644 --- a/rest/video/v1/rooms_participants_subscribe_rules.go +++ b/rest/video/v1/rooms_participants_subscribe_rules.go @@ -27,7 +27,9 @@ func (c *ApiService) FetchRoomParticipantSubscribeRule(RoomSid string, Participa path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -62,7 +64,9 @@ func (c *ApiService) UpdateRoomParticipantSubscribeRule(RoomSid string, Particip path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Rules != nil { v, err := json.Marshal(params.Rules) diff --git a/rest/video/v1/rooms_participants_subscribed_tracks.go b/rest/video/v1/rooms_participants_subscribed_tracks.go index fa5525002..5419a1f90 100644 --- a/rest/video/v1/rooms_participants_subscribed_tracks.go +++ b/rest/video/v1/rooms_participants_subscribed_tracks.go @@ -31,7 +31,9 @@ func (c *ApiService) FetchRoomParticipantSubscribedTrack(RoomSid string, Partici path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -73,7 +75,9 @@ func (c *ApiService) PageRoomParticipantSubscribedTrack(RoomSid string, Particip path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/video/v1/rooms_recording_rules.go b/rest/video/v1/rooms_recording_rules.go index 2553d3a4b..7258d0e13 100644 --- a/rest/video/v1/rooms_recording_rules.go +++ b/rest/video/v1/rooms_recording_rules.go @@ -26,7 +26,9 @@ func (c *ApiService) FetchRoomRecordingRule(RoomSid string) (*VideoV1RoomRecordi path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -60,7 +62,9 @@ func (c *ApiService) UpdateRoomRecordingRule(RoomSid string, params *UpdateRoomR path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Rules != nil { v, err := json.Marshal(params.Rules) diff --git a/rest/video/v1/rooms_recordings.go b/rest/video/v1/rooms_recordings.go index 37b72820c..822adb556 100644 --- a/rest/video/v1/rooms_recordings.go +++ b/rest/video/v1/rooms_recordings.go @@ -31,7 +31,9 @@ func (c *ApiService) DeleteRoomRecording(RoomSid string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -50,7 +52,9 @@ func (c *ApiService) FetchRoomRecording(RoomSid string, Sid string) (*VideoV1Roo path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -115,7 +119,9 @@ func (c *ApiService) PageRoomRecording(RoomSid string, params *ListRoomRecording path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) diff --git a/rest/voice/v1/archives_calls.go b/rest/voice/v1/archives_calls.go index 2749cb824..10f90d0b9 100644 --- a/rest/voice/v1/archives_calls.go +++ b/rest/voice/v1/archives_calls.go @@ -27,7 +27,9 @@ func (c *ApiService) DeleteArchivedCall(Date string, Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/voice/v1/byoc_trunks.go b/rest/voice/v1/byoc_trunks.go index 8bc50ff79..f3c72996f 100644 --- a/rest/voice/v1/byoc_trunks.go +++ b/rest/voice/v1/byoc_trunks.go @@ -93,7 +93,9 @@ func (c *ApiService) CreateByocTrunk(params *CreateByocTrunkParams) (*VoiceV1Byo path := "/v1/ByocTrunks" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -147,7 +149,9 @@ func (c *ApiService) DeleteByocTrunk(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -165,7 +169,9 @@ func (c *ApiService) FetchByocTrunk(Sid string) (*VoiceV1ByocTrunk, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -204,7 +210,9 @@ func (c *ApiService) PageByocTrunk(params *ListByocTrunkParams, pageToken, pageN path := "/v1/ByocTrunks" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -389,7 +397,9 @@ func (c *ApiService) UpdateByocTrunk(Sid string, params *UpdateByocTrunkParams) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/voice/v1/connection_policies.go b/rest/voice/v1/connection_policies.go index 24eda12dd..667161f4c 100644 --- a/rest/voice/v1/connection_policies.go +++ b/rest/voice/v1/connection_policies.go @@ -39,7 +39,9 @@ func (c *ApiService) CreateConnectionPolicy(params *CreateConnectionPolicyParams path := "/v1/ConnectionPolicies" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) @@ -66,7 +68,9 @@ func (c *ApiService) DeleteConnectionPolicy(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -84,7 +88,9 @@ func (c *ApiService) FetchConnectionPolicy(Sid string) (*VoiceV1ConnectionPolicy path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -123,7 +129,9 @@ func (c *ApiService) PageConnectionPolicy(params *ListConnectionPolicyParams, pa path := "/v1/ConnectionPolicies" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -254,7 +262,9 @@ func (c *ApiService) UpdateConnectionPolicy(Sid string, params *UpdateConnection path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/voice/v1/connection_policies_targets.go b/rest/voice/v1/connection_policies_targets.go index 015b0c972..1bc98a8e5 100644 --- a/rest/voice/v1/connection_policies_targets.go +++ b/rest/voice/v1/connection_policies_targets.go @@ -64,7 +64,9 @@ func (c *ApiService) CreateConnectionPolicyTarget(ConnectionPolicySid string, pa path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Target != nil { data.Set("Target", *params.Target) @@ -104,7 +106,9 @@ func (c *ApiService) DeleteConnectionPolicyTarget(ConnectionPolicySid string, Si path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -123,7 +127,9 @@ func (c *ApiService) FetchConnectionPolicyTarget(ConnectionPolicySid string, Sid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -164,7 +170,9 @@ func (c *ApiService) PageConnectionPolicyTarget(ConnectionPolicySid string, para path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -320,7 +328,9 @@ func (c *ApiService) UpdateConnectionPolicyTarget(ConnectionPolicySid string, Si path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/voice/v1/dialing_permissions_bulk_country_updates.go b/rest/voice/v1/dialing_permissions_bulk_country_updates.go index 7c8a3ddc8..e23b743ab 100644 --- a/rest/voice/v1/dialing_permissions_bulk_country_updates.go +++ b/rest/voice/v1/dialing_permissions_bulk_country_updates.go @@ -35,7 +35,9 @@ func (c *ApiService) CreateDialingPermissionsCountryBulkUpdate(params *CreateDia path := "/v1/DialingPermissions/BulkCountryUpdates" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UpdateRequest != nil { data.Set("UpdateRequest", *params.UpdateRequest) diff --git a/rest/voice/v1/dialing_permissions_countries.go b/rest/voice/v1/dialing_permissions_countries.go index be09fb584..fadf1dac2 100644 --- a/rest/voice/v1/dialing_permissions_countries.go +++ b/rest/voice/v1/dialing_permissions_countries.go @@ -29,7 +29,9 @@ func (c *ApiService) FetchDialingPermissionsCountry(IsoCode string) (*VoiceV1Dia path = strings.Replace(path, "{"+"IsoCode"+"}", IsoCode, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -104,7 +106,9 @@ func (c *ApiService) PageDialingPermissionsCountry(params *ListDialingPermission path := "/v1/DialingPermissions/Countries" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IsoCode != nil { data.Set("IsoCode", *params.IsoCode) diff --git a/rest/voice/v1/dialing_permissions_countries_high_risk_special_prefixes.go b/rest/voice/v1/dialing_permissions_countries_high_risk_special_prefixes.go index db256ce6d..6adfc1667 100644 --- a/rest/voice/v1/dialing_permissions_countries_high_risk_special_prefixes.go +++ b/rest/voice/v1/dialing_permissions_countries_high_risk_special_prefixes.go @@ -47,7 +47,9 @@ func (c *ApiService) PageDialingPermissionsHrsPrefixes(IsoCode string, params *L path = strings.Replace(path, "{"+"IsoCode"+"}", IsoCode, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/voice/v1/ip_records.go b/rest/voice/v1/ip_records.go index 93ed82dde..834c5b324 100644 --- a/rest/voice/v1/ip_records.go +++ b/rest/voice/v1/ip_records.go @@ -51,7 +51,9 @@ func (c *ApiService) CreateIpRecord(params *CreateIpRecordParams) (*VoiceV1IpRec path := "/v1/IpRecords" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IpAddress != nil { data.Set("IpAddress", *params.IpAddress) @@ -84,7 +86,9 @@ func (c *ApiService) DeleteIpRecord(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -102,7 +106,9 @@ func (c *ApiService) FetchIpRecord(Sid string) (*VoiceV1IpRecord, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -141,7 +147,9 @@ func (c *ApiService) PageIpRecord(params *ListIpRecordParams, pageToken, pageNum path := "/v1/IpRecords" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -272,7 +280,9 @@ func (c *ApiService) UpdateIpRecord(Sid string, params *UpdateIpRecordParams) (* path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) diff --git a/rest/voice/v1/settings.go b/rest/voice/v1/settings.go index 2906226fc..ce2043ed9 100644 --- a/rest/voice/v1/settings.go +++ b/rest/voice/v1/settings.go @@ -25,7 +25,9 @@ func (c *ApiService) FetchDialingPermissionsSettings() (*VoiceV1DialingPermissio path := "/v1/Settings" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -58,7 +60,9 @@ func (c *ApiService) UpdateDialingPermissionsSettings(params *UpdateDialingPermi path := "/v1/Settings" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.DialingPermissionsInheritance != nil { data.Set("DialingPermissionsInheritance", fmt.Sprint(*params.DialingPermissionsInheritance)) diff --git a/rest/voice/v1/source_ip_mappings.go b/rest/voice/v1/source_ip_mappings.go index 083da2e12..900078349 100644 --- a/rest/voice/v1/source_ip_mappings.go +++ b/rest/voice/v1/source_ip_mappings.go @@ -45,7 +45,9 @@ func (c *ApiService) CreateSourceIpMapping(params *CreateSourceIpMappingParams) path := "/v1/SourceIpMappings" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.IpRecordSid != nil { data.Set("IpRecordSid", *params.IpRecordSid) @@ -75,7 +77,9 @@ func (c *ApiService) DeleteSourceIpMapping(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -93,7 +97,9 @@ func (c *ApiService) FetchSourceIpMapping(Sid string) (*VoiceV1SourceIpMapping, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -132,7 +138,9 @@ func (c *ApiService) PageSourceIpMapping(params *ListSourceIpMappingParams, page path := "/v1/SourceIpMappings" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -263,7 +271,9 @@ func (c *ApiService) UpdateSourceIpMapping(Sid string, params *UpdateSourceIpMap path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.SipDomainSid != nil { data.Set("SipDomainSid", *params.SipDomainSid) diff --git a/rest/wireless/v1/commands.go b/rest/wireless/v1/commands.go index 92c40607f..b2dce53d9 100644 --- a/rest/wireless/v1/commands.go +++ b/rest/wireless/v1/commands.go @@ -75,7 +75,9 @@ func (c *ApiService) CreateCommand(params *CreateCommandParams) (*WirelessV1Comm path := "/v1/Commands" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Command != nil { data.Set("Command", *params.Command) @@ -120,7 +122,9 @@ func (c *ApiService) DeleteCommand(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -138,7 +142,9 @@ func (c *ApiService) FetchCommand(Sid string) (*WirelessV1Command, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -201,7 +207,9 @@ func (c *ApiService) PageCommand(params *ListCommandParams, pageToken, pageNumbe path := "/v1/Commands" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Sim != nil { data.Set("Sim", *params.Sim) diff --git a/rest/wireless/v1/rate_plans.go b/rest/wireless/v1/rate_plans.go index a115db739..971b2147d 100644 --- a/rest/wireless/v1/rate_plans.go +++ b/rest/wireless/v1/rate_plans.go @@ -99,7 +99,9 @@ func (c *ApiService) CreateRatePlan(params *CreateRatePlanParams) (*WirelessV1Ra path := "/v1/RatePlans" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) @@ -158,7 +160,9 @@ func (c *ApiService) DeleteRatePlan(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -176,7 +180,9 @@ func (c *ApiService) FetchRatePlan(Sid string) (*WirelessV1RatePlan, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -215,7 +221,9 @@ func (c *ApiService) PageRatePlan(params *ListRatePlanParams, pageToken, pageNum path := "/v1/RatePlans" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) @@ -352,7 +360,9 @@ func (c *ApiService) UpdateRatePlan(Sid string, params *UpdateRatePlanParams) (* path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) diff --git a/rest/wireless/v1/sims.go b/rest/wireless/v1/sims.go index 001f8128a..52dc1f1e7 100644 --- a/rest/wireless/v1/sims.go +++ b/rest/wireless/v1/sims.go @@ -29,7 +29,9 @@ func (c *ApiService) DeleteSim(Sid string) error { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) if err != nil { @@ -47,7 +49,9 @@ func (c *ApiService) FetchSim(Sid string) (*WirelessV1Sim, error) { path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -116,7 +120,9 @@ func (c *ApiService) PageSim(params *ListSimParams, pageToken, pageNumber string path := "/v1/Sims" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.Status != nil { data.Set("Status", *params.Status) @@ -364,7 +370,9 @@ func (c *ApiService) UpdateSim(Sid string, params *UpdateSimParams) (*WirelessV1 path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) diff --git a/rest/wireless/v1/sims_data_sessions.go b/rest/wireless/v1/sims_data_sessions.go index e54aa72f1..3133db4b4 100644 --- a/rest/wireless/v1/sims_data_sessions.go +++ b/rest/wireless/v1/sims_data_sessions.go @@ -47,7 +47,9 @@ func (c *ApiService) PageDataSession(SimSid string, params *ListDataSessionParam path = strings.Replace(path, "{"+"SimSid"+"}", SimSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) diff --git a/rest/wireless/v1/sims_usage_records.go b/rest/wireless/v1/sims_usage_records.go index db9896288..9e63beb5d 100644 --- a/rest/wireless/v1/sims_usage_records.go +++ b/rest/wireless/v1/sims_usage_records.go @@ -66,7 +66,9 @@ func (c *ApiService) PageUsageRecord(SimSid string, params *ListUsageRecordParam path = strings.Replace(path, "{"+"SimSid"+"}", SimSid, -1) data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.End != nil { data.Set("End", fmt.Sprint((*params.End).Format(time.RFC3339))) diff --git a/rest/wireless/v1/usage_records.go b/rest/wireless/v1/usage_records.go index 4f22007f3..eeed7bfaa 100644 --- a/rest/wireless/v1/usage_records.go +++ b/rest/wireless/v1/usage_records.go @@ -63,7 +63,9 @@ func (c *ApiService) PageAccountUsageRecord(params *ListAccountUsageRecordParams path := "/v1/UsageRecords" data := url.Values{} - headers := make(map[string]interface{}) + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } if params != nil && params.End != nil { data.Set("End", fmt.Sprint((*params.End).Format(time.RFC3339)))