From 9043ac58ece003c311f5c49e940657787f0e9043 Mon Sep 17 00:00:00 2001 From: RJPearson94 Date: Thu, 10 Jun 2021 22:13:10 +0100 Subject: [PATCH] chore: regenerate SDK for generator changes This change supports the multiple PR's to fix https://github.com/twilio/twilio-oai-generator/issues/49 where the SDK panics when trying to update a Flex Configuration. --- rest/accounts/v1/api_default.go | 18 +- rest/api/v2010/api_default.go | 395 ++++++++++----------------- rest/autopilot/v1/api_default.go | 87 ++---- rest/bulkexports/v1/api_default.go | 12 +- rest/chat/v1/api_default.go | 72 ++--- rest/chat/v2/api_default.go | 101 ++----- rest/conversations/v1/api_default.go | 168 ++++-------- rest/events/v1/api_default.go | 36 +-- rest/fax/v1/api_default.go | 12 +- rest/flex/v1/api_default.go | 27 +- rest/insights/v1/api_default.go | 15 +- rest/ip_messaging/v1/api_default.go | 72 ++--- rest/ip_messaging/v2/api_default.go | 101 ++----- rest/lookups/v1/api_default.go | 3 +- rest/messaging/v1/api_default.go | 45 +-- rest/monitor/v1/api_default.go | 6 +- rest/notify/v1/api_default.go | 27 +- rest/numbers/v2/api_default.go | 45 +-- rest/pricing/v1/api_default.go | 9 +- rest/pricing/v2/api_default.go | 6 +- rest/proxy/v1/api_default.go | 51 ++-- rest/serverless/v1/api_default.go | 63 ++--- rest/studio/v1/api_default.go | 24 +- rest/studio/v2/api_default.go | 30 +- rest/supersim/v1/api_default.go | 51 ++-- rest/sync/v1/api_default.go | 89 ++---- rest/taskrouter/v1/api_default.go | 128 +++------ rest/trunking/v1/api_default.go | 39 +-- rest/trusthub/v1/api_default.go | 81 ++---- rest/verify/v2/api_default.go | 87 ++---- rest/video/v1/api_default.go | 54 ++-- rest/voice/v1/api_default.go | 57 ++-- rest/wireless/v1/api_default.go | 30 +- 33 files changed, 670 insertions(+), 1371 deletions(-) diff --git a/rest/accounts/v1/api_default.go b/rest/accounts/v1/api_default.go index b97aa04b7..2986d6baf 100644 --- a/rest/accounts/v1/api_default.go +++ b/rest/accounts/v1/api_default.go @@ -65,8 +65,6 @@ func (c *DefaultApiService) CreateCredentialAws(params *CreateCredentialAwsParam path := "/v1/Credentials/AWS" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AccountSid != nil { data.Set("AccountSid", *params.AccountSid) } @@ -76,6 +74,7 @@ func (c *DefaultApiService) CreateCredentialAws(params *CreateCredentialAwsParam if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -120,8 +119,6 @@ func (c *DefaultApiService) CreateCredentialPublicKey(params *CreateCredentialPu path := "/v1/Credentials/PublicKeys" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AccountSid != nil { data.Set("AccountSid", *params.AccountSid) } @@ -131,6 +128,7 @@ func (c *DefaultApiService) CreateCredentialPublicKey(params *CreateCredentialPu if params != nil && params.PublicKey != nil { data.Set("PublicKey", *params.PublicKey) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -284,11 +282,10 @@ func (c *DefaultApiService) ListCredentialAws(params *ListCredentialAwsParams) ( path := "/v1/Credentials/AWS" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -321,11 +318,10 @@ func (c *DefaultApiService) ListCredentialPublicKey(params *ListCredentialPublic path := "/v1/Credentials/PublicKeys" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -381,11 +377,10 @@ func (c *DefaultApiService) UpdateCredentialAws(Sid string, params *UpdateCreden path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -419,11 +414,10 @@ func (c *DefaultApiService) UpdateCredentialPublicKey(Sid string, params *Update path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/api/v2010/api_default.go b/rest/api/v2010/api_default.go index 5b3863909..adab9a372 100644 --- a/rest/api/v2010/api_default.go +++ b/rest/api/v2010/api_default.go @@ -54,11 +54,10 @@ func (c *DefaultApiService) CreateAccount(params *CreateAccountParams) (*ApiV201 path := "/2010-04-01/Accounts.json" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -149,8 +148,6 @@ func (c *DefaultApiService) CreateAddress(params *CreateAddressParams) (*ApiV201 } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AutoCorrectAddress != nil { data.Set("AutoCorrectAddress", fmt.Sprint(*params.AutoCorrectAddress)) } @@ -178,6 +175,7 @@ func (c *DefaultApiService) CreateAddress(params *CreateAddressParams) (*ApiV201 if params != nil && params.Street != nil { data.Set("Street", *params.Street) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -305,8 +303,6 @@ func (c *DefaultApiService) CreateApplication(params *CreateApplicationParams) ( } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ApiVersion != nil { data.Set("ApiVersion", *params.ApiVersion) } @@ -352,6 +348,7 @@ func (c *DefaultApiService) CreateApplication(params *CreateApplicationParams) ( if params != nil && params.VoiceUrl != nil { data.Set("VoiceUrl", *params.VoiceUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -593,8 +590,6 @@ func (c *DefaultApiService) CreateCall(params *CreateCallParams) (*ApiV2010Accou } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ApplicationSid != nil { data.Set("ApplicationSid", *params.ApplicationSid) } @@ -701,6 +696,7 @@ func (c *DefaultApiService) CreateCall(params *CreateCallParams) (*ApiV2010Accou if params != nil && params.Url != nil { data.Set("Url", *params.Url) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -768,8 +764,6 @@ func (c *DefaultApiService) CreateCallFeedbackSummary(params *CreateCallFeedback } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.EndDate != nil { data.Set("EndDate", fmt.Sprint(*params.EndDate)) } @@ -785,6 +779,7 @@ func (c *DefaultApiService) CreateCallFeedbackSummary(params *CreateCallFeedback if params != nil && params.StatusCallbackMethod != nil { data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -859,8 +854,6 @@ func (c *DefaultApiService) CreateCallRecording(CallSid string, params *CreateCa path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.RecordingChannels != nil { data.Set("RecordingChannels", *params.RecordingChannels) } @@ -881,6 +874,7 @@ func (c *DefaultApiService) CreateCallRecording(CallSid string, params *CreateCa if params != nil && params.Trim != nil { data.Set("Trim", *params.Trim) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1062,8 +1056,6 @@ func (c *DefaultApiService) CreateIncomingPhoneNumber(params *CreateIncomingPhon } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AddressSid != nil { data.Set("AddressSid", *params.AddressSid) } @@ -1136,6 +1128,7 @@ func (c *DefaultApiService) CreateIncomingPhoneNumber(params *CreateIncomingPhon if params != nil && params.VoiceUrl != nil { data.Set("VoiceUrl", *params.VoiceUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1180,11 +1173,10 @@ func (c *DefaultApiService) CreateIncomingPhoneNumberAssignedAddOn(ResourceSid s path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.InstalledAddOnSid != nil { data.Set("InstalledAddOnSid", *params.InstalledAddOnSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1359,8 +1351,6 @@ func (c *DefaultApiService) CreateIncomingPhoneNumberLocal(params *CreateIncomin } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AddressSid != nil { data.Set("AddressSid", *params.AddressSid) } @@ -1430,6 +1420,7 @@ func (c *DefaultApiService) CreateIncomingPhoneNumberLocal(params *CreateIncomin if params != nil && params.VoiceUrl != nil { data.Set("VoiceUrl", *params.VoiceUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1604,8 +1595,6 @@ func (c *DefaultApiService) CreateIncomingPhoneNumberMobile(params *CreateIncomi } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AddressSid != nil { data.Set("AddressSid", *params.AddressSid) } @@ -1675,6 +1664,7 @@ func (c *DefaultApiService) CreateIncomingPhoneNumberMobile(params *CreateIncomi if params != nil && params.VoiceUrl != nil { data.Set("VoiceUrl", *params.VoiceUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1849,8 +1839,6 @@ func (c *DefaultApiService) CreateIncomingPhoneNumberTollFree(params *CreateInco } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AddressSid != nil { data.Set("AddressSid", *params.AddressSid) } @@ -1920,6 +1908,7 @@ func (c *DefaultApiService) CreateIncomingPhoneNumberTollFree(params *CreateInco if params != nil && params.VoiceUrl != nil { data.Set("VoiceUrl", *params.VoiceUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2053,8 +2042,6 @@ func (c *DefaultApiService) CreateMessage(params *CreateMessageParams) (*ApiV201 } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AddressRetention != nil { data.Set("AddressRetention", *params.AddressRetention) } @@ -2107,6 +2094,7 @@ func (c *DefaultApiService) CreateMessage(params *CreateMessageParams) (*ApiV201 if params != nil && params.ValidityPeriod != nil { data.Set("ValidityPeriod", fmt.Sprint(*params.ValidityPeriod)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2150,11 +2138,10 @@ func (c *DefaultApiService) CreateMessageFeedback(MessageSid string, params *Cre path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Outcome != nil { data.Set("Outcome", *params.Outcome) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2197,11 +2184,10 @@ func (c *DefaultApiService) CreateNewKey(params *CreateNewKeyParams) (*ApiV2010A } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2245,11 +2231,10 @@ func (c *DefaultApiService) CreateNewSigningKey(params *CreateNewSigningKeyParam } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2515,8 +2500,6 @@ func (c *DefaultApiService) CreateParticipant(ConferenceSid string, params *Crea path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Beep != nil { data.Set("Beep", *params.Beep) } @@ -2639,6 +2622,7 @@ func (c *DefaultApiService) CreateParticipant(ConferenceSid string, params *Crea if params != nil && params.WaitUrl != nil { data.Set("WaitUrl", *params.WaitUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2773,8 +2757,6 @@ func (c *DefaultApiService) CreatePayments(CallSid string, params *CreatePayment path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.BankAccountType != nil { data.Set("BankAccountType", *params.BankAccountType) } @@ -2829,6 +2811,7 @@ func (c *DefaultApiService) CreatePayments(CallSid string, params *CreatePayment if params != nil && params.ValidCardTypes != nil { data.Set("ValidCardTypes", *params.ValidCardTypes) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2878,14 +2861,13 @@ func (c *DefaultApiService) CreateQueue(params *CreateQueueParams) (*ApiV2010Acc } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } if params != nil && params.MaxSize != nil { data.Set("MaxSize", fmt.Sprint(*params.MaxSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2930,11 +2912,10 @@ func (c *DefaultApiService) CreateSipAuthCallsCredentialListMapping(DomainSid st path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CredentialListSid != nil { data.Set("CredentialListSid", *params.CredentialListSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2979,11 +2960,10 @@ func (c *DefaultApiService) CreateSipAuthCallsIpAccessControlListMapping(DomainS path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.IpAccessControlListSid != nil { data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3028,11 +3008,10 @@ func (c *DefaultApiService) CreateSipAuthRegistrationsCredentialListMapping(Doma path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CredentialListSid != nil { data.Set("CredentialListSid", *params.CredentialListSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3083,14 +3062,13 @@ func (c *DefaultApiService) CreateSipCredential(CredentialListSid string, params path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Password != nil { data.Set("Password", *params.Password) } if params != nil && params.Username != nil { data.Set("Username", *params.Username) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3134,11 +3112,10 @@ func (c *DefaultApiService) CreateSipCredentialList(params *CreateSipCredentialL } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3183,11 +3160,10 @@ func (c *DefaultApiService) CreateSipCredentialListMapping(DomainSid string, par path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CredentialListSid != nil { data.Set("CredentialListSid", *params.CredentialListSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3303,8 +3279,6 @@ func (c *DefaultApiService) CreateSipDomain(params *CreateSipDomainParams) (*Api } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ByocTrunkSid != nil { data.Set("ByocTrunkSid", *params.ByocTrunkSid) } @@ -3344,6 +3318,7 @@ func (c *DefaultApiService) CreateSipDomain(params *CreateSipDomainParams) (*Api if params != nil && params.VoiceUrl != nil { data.Set("VoiceUrl", *params.VoiceUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3387,11 +3362,10 @@ func (c *DefaultApiService) CreateSipIpAccessControlList(params *CreateSipIpAcce } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3436,11 +3410,10 @@ func (c *DefaultApiService) CreateSipIpAccessControlListMapping(DomainSid string path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.IpAccessControlListSid != nil { data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3497,8 +3470,6 @@ func (c *DefaultApiService) CreateSipIpAddress(IpAccessControlListSid string, pa path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CidrPrefixLength != nil { data.Set("CidrPrefixLength", fmt.Sprint(*params.CidrPrefixLength)) } @@ -3508,6 +3479,7 @@ func (c *DefaultApiService) CreateSipIpAddress(IpAccessControlListSid string, pa if params != nil && params.IpAddress != nil { data.Set("IpAddress", *params.IpAddress) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3551,11 +3523,10 @@ func (c *DefaultApiService) CreateToken(params *CreateTokenParams) (*ApiV2010Acc } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3635,8 +3606,6 @@ func (c *DefaultApiService) CreateUsageTrigger(params *CreateUsageTriggerParams) } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CallbackMethod != nil { data.Set("CallbackMethod", *params.CallbackMethod) } @@ -3658,6 +3627,7 @@ func (c *DefaultApiService) CreateUsageTrigger(params *CreateUsageTriggerParams) if params != nil && params.UsageCategory != nil { data.Set("UsageCategory", *params.UsageCategory) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3730,8 +3700,6 @@ func (c *DefaultApiService) CreateValidationRequest(params *CreateValidationRequ } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CallDelay != nil { data.Set("CallDelay", fmt.Sprint(*params.CallDelay)) } @@ -3750,6 +3718,7 @@ func (c *DefaultApiService) CreateValidationRequest(params *CreateValidationRequ if params != nil && params.StatusCallbackMethod != nil { data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -6567,8 +6536,6 @@ func (c *DefaultApiService) ListAccount(params *ListAccountParams) (*ListAccount path := "/2010-04-01/Accounts.json" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } @@ -6578,6 +6545,7 @@ func (c *DefaultApiService) ListAccount(params *ListAccountParams) (*ListAccount if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -6638,8 +6606,6 @@ func (c *DefaultApiService) ListAddress(params *ListAddressParams) (*ListAddress } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CustomerName != nil { data.Set("CustomerName", *params.CustomerName) } @@ -6652,6 +6618,7 @@ func (c *DefaultApiService) ListAddress(params *ListAddressParams) (*ListAddress if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -6701,14 +6668,13 @@ func (c *DefaultApiService) ListApplication(params *ListApplicationParams) (*Lis } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -6752,11 +6718,10 @@ func (c *DefaultApiService) ListAuthorizedConnectApp(params *ListAuthorizedConne } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -6799,11 +6764,10 @@ func (c *DefaultApiService) ListAvailablePhoneNumberCountry(params *ListAvailabl } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -6955,8 +6919,6 @@ func (c *DefaultApiService) ListAvailablePhoneNumberLocal(CountryCode string, pa path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AreaCode != nil { data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) } @@ -7014,6 +6976,7 @@ func (c *DefaultApiService) ListAvailablePhoneNumberLocal(CountryCode string, pa if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -7165,8 +7128,6 @@ func (c *DefaultApiService) ListAvailablePhoneNumberMachineToMachine(CountryCode path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AreaCode != nil { data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) } @@ -7224,6 +7185,7 @@ func (c *DefaultApiService) ListAvailablePhoneNumberMachineToMachine(CountryCode if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -7375,8 +7337,6 @@ func (c *DefaultApiService) ListAvailablePhoneNumberMobile(CountryCode string, p path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AreaCode != nil { data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) } @@ -7434,6 +7394,7 @@ func (c *DefaultApiService) ListAvailablePhoneNumberMobile(CountryCode string, p if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -7585,8 +7546,6 @@ func (c *DefaultApiService) ListAvailablePhoneNumberNational(CountryCode string, path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AreaCode != nil { data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) } @@ -7644,6 +7603,7 @@ func (c *DefaultApiService) ListAvailablePhoneNumberNational(CountryCode string, if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -7795,8 +7755,6 @@ func (c *DefaultApiService) ListAvailablePhoneNumberSharedCost(CountryCode strin path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AreaCode != nil { data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) } @@ -7854,6 +7812,7 @@ func (c *DefaultApiService) ListAvailablePhoneNumberSharedCost(CountryCode strin if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -8005,8 +7964,6 @@ func (c *DefaultApiService) ListAvailablePhoneNumberTollFree(CountryCode string, path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AreaCode != nil { data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) } @@ -8064,6 +8021,7 @@ func (c *DefaultApiService) ListAvailablePhoneNumberTollFree(CountryCode string, if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -8215,8 +8173,6 @@ func (c *DefaultApiService) ListAvailablePhoneNumberVoip(CountryCode string, par path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AreaCode != nil { data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) } @@ -8274,6 +8230,7 @@ func (c *DefaultApiService) ListAvailablePhoneNumberVoip(CountryCode string, par if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -8305,15 +8262,15 @@ type ListCallParams struct { // Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. StartTime *time.Time `json:"StartTime,omitempty"` // Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. - StartTimeBefore *time.Time `json:"StartTime<,omitempty"` + StartTimeBefore *time.Time `json:"StartTime<,omitempty"` // Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. - StartTimeAfter *time.Time `json:"StartTime>,omitempty"` + StartTimeAfter *time.Time `json:"StartTime>,omitempty"` // Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. EndTime *time.Time `json:"EndTime,omitempty"` // Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. - EndTimeBefore *time.Time `json:"EndTime<,omitempty"` + EndTimeBefore *time.Time `json:"EndTime<,omitempty"` // Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. - EndTimeAfter *time.Time `json:"EndTime>,omitempty"` + EndTimeAfter *time.Time `json:"EndTime>,omitempty"` // How many resources to return in each list page. The default is 50, and the maximum is 1000. PageSize *int32 `json:"PageSize,omitempty"` } @@ -8377,8 +8334,6 @@ func (c *DefaultApiService) ListCall(params *ListCallParams) (*ListCallResponse, } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.To != nil { data.Set("To", *params.To) } @@ -8412,6 +8367,7 @@ func (c *DefaultApiService) ListCall(params *ListCallParams) (*ListCallResponse, if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -8456,11 +8412,10 @@ func (c *DefaultApiService) ListCallEvent(CallSid string, params *ListCallEventP path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -8486,9 +8441,9 @@ type ListCallNotificationParams struct { // Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. MessageDate *string `json:"MessageDate,omitempty"` // Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. - MessageDateBefore *string `json:"MessageDate<,omitempty"` + MessageDateBefore *string `json:"MessageDate<,omitempty"` // Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. - MessageDateAfter *string `json:"MessageDate>,omitempty"` + MessageDateAfter *string `json:"MessageDate>,omitempty"` // How many resources to return in each list page. The default is 50, and the maximum is 1000. PageSize *int32 `json:"PageSize,omitempty"` } @@ -8528,8 +8483,6 @@ func (c *DefaultApiService) ListCallNotification(CallSid string, params *ListCal path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Log != nil { data.Set("Log", fmt.Sprint(*params.Log)) } @@ -8545,6 +8498,7 @@ func (c *DefaultApiService) ListCallNotification(CallSid string, params *ListCal if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -8568,9 +8522,9 @@ type ListCallRecordingParams struct { // The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. DateCreated *string `json:"DateCreated,omitempty"` // The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. - DateCreatedBefore *string `json:"DateCreated<,omitempty"` + DateCreatedBefore *string `json:"DateCreated<,omitempty"` // The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. - DateCreatedAfter *string `json:"DateCreated>,omitempty"` + DateCreatedAfter *string `json:"DateCreated>,omitempty"` // How many resources to return in each list page. The default is 50, and the maximum is 1000. PageSize *int32 `json:"PageSize,omitempty"` } @@ -8607,8 +8561,6 @@ func (c *DefaultApiService) ListCallRecording(CallSid string, params *ListCallRe path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.DateCreated != nil { data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) } @@ -8621,6 +8573,7 @@ func (c *DefaultApiService) ListCallRecording(CallSid string, params *ListCallRe if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -8644,15 +8597,15 @@ type ListConferenceParams struct { // The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. DateCreated *string `json:"DateCreated,omitempty"` // The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. - DateCreatedBefore *string `json:"DateCreated<,omitempty"` + DateCreatedBefore *string `json:"DateCreated<,omitempty"` // The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. - DateCreatedAfter *string `json:"DateCreated>,omitempty"` + DateCreatedAfter *string `json:"DateCreated>,omitempty"` // The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. DateUpdated *string `json:"DateUpdated,omitempty"` // The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. - DateUpdatedBefore *string `json:"DateUpdated<,omitempty"` + DateUpdatedBefore *string `json:"DateUpdated<,omitempty"` // The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. - DateUpdatedAfter *string `json:"DateUpdated>,omitempty"` + DateUpdatedAfter *string `json:"DateUpdated>,omitempty"` // The string that identifies the Conference resources to read. FriendlyName *string `json:"FriendlyName,omitempty"` // The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. @@ -8712,8 +8665,6 @@ func (c *DefaultApiService) ListConference(params *ListConferenceParams) (*ListC } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.DateCreated != nil { data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) } @@ -8741,6 +8692,7 @@ func (c *DefaultApiService) ListConference(params *ListConferenceParams) (*ListC if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -8764,9 +8716,9 @@ type ListConferenceRecordingParams struct { // The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. DateCreated *string `json:"DateCreated,omitempty"` // The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. - DateCreatedBefore *string `json:"DateCreated<,omitempty"` + DateCreatedBefore *string `json:"DateCreated<,omitempty"` // The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. - DateCreatedAfter *string `json:"DateCreated>,omitempty"` + DateCreatedAfter *string `json:"DateCreated>,omitempty"` // How many resources to return in each list page. The default is 50, and the maximum is 1000. PageSize *int32 `json:"PageSize,omitempty"` } @@ -8803,8 +8755,6 @@ func (c *DefaultApiService) ListConferenceRecording(ConferenceSid string, params path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.DateCreated != nil { data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) } @@ -8817,6 +8767,7 @@ func (c *DefaultApiService) ListConferenceRecording(ConferenceSid string, params if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -8860,11 +8811,10 @@ func (c *DefaultApiService) ListConnectApp(params *ListConnectAppParams) (*ListC } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -8908,11 +8858,10 @@ func (c *DefaultApiService) ListDependentPhoneNumber(AddressSid string, params * path = strings.Replace(path, "{"+"AddressSid"+"}", AddressSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -8980,8 +8929,6 @@ func (c *DefaultApiService) ListIncomingPhoneNumber(params *ListIncomingPhoneNum } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Beta != nil { data.Set("Beta", fmt.Sprint(*params.Beta)) } @@ -8997,6 +8944,7 @@ func (c *DefaultApiService) ListIncomingPhoneNumber(params *ListIncomingPhoneNum if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -9041,11 +8989,10 @@ func (c *DefaultApiService) ListIncomingPhoneNumberAssignedAddOn(ResourceSid str path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -9091,11 +9038,10 @@ func (c *DefaultApiService) ListIncomingPhoneNumberAssignedAddOnExtension(Resour path = strings.Replace(path, "{"+"AssignedAddOnSid"+"}", AssignedAddOnSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -9162,8 +9108,6 @@ func (c *DefaultApiService) ListIncomingPhoneNumberLocal(params *ListIncomingPho } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Beta != nil { data.Set("Beta", fmt.Sprint(*params.Beta)) } @@ -9179,6 +9123,7 @@ func (c *DefaultApiService) ListIncomingPhoneNumberLocal(params *ListIncomingPho if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -9245,8 +9190,6 @@ func (c *DefaultApiService) ListIncomingPhoneNumberMobile(params *ListIncomingPh } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Beta != nil { data.Set("Beta", fmt.Sprint(*params.Beta)) } @@ -9262,6 +9205,7 @@ func (c *DefaultApiService) ListIncomingPhoneNumberMobile(params *ListIncomingPh if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -9328,8 +9272,6 @@ func (c *DefaultApiService) ListIncomingPhoneNumberTollFree(params *ListIncoming } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Beta != nil { data.Set("Beta", fmt.Sprint(*params.Beta)) } @@ -9345,6 +9287,7 @@ func (c *DefaultApiService) ListIncomingPhoneNumberTollFree(params *ListIncoming if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -9387,11 +9330,10 @@ func (c *DefaultApiService) ListKey(params *ListKeyParams) (*ListKeyResponse, er } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -9415,9 +9357,9 @@ type ListMediaParams struct { // Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. DateCreated *time.Time `json:"DateCreated,omitempty"` // Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. - DateCreatedBefore *time.Time `json:"DateCreated<,omitempty"` + DateCreatedBefore *time.Time `json:"DateCreated<,omitempty"` // Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. - DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` // How many resources to return in each list page. The default is 50, and the maximum is 1000. PageSize *int32 `json:"PageSize,omitempty"` } @@ -9454,8 +9396,6 @@ func (c *DefaultApiService) ListMedia(MessageSid string, params *ListMediaParams path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.DateCreated != nil { data.Set("DateCreated", fmt.Sprint((*params.DateCreated).Format(time.RFC3339))) } @@ -9468,6 +9408,7 @@ func (c *DefaultApiService) ListMedia(MessageSid string, params *ListMediaParams if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -9512,11 +9453,10 @@ func (c *DefaultApiService) ListMember(QueueSid string, params *ListMemberParams path = strings.Replace(path, "{"+"QueueSid"+"}", QueueSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -9544,9 +9484,9 @@ type ListMessageParams struct { // The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. DateSent *time.Time `json:"DateSent,omitempty"` // The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. - DateSentBefore *time.Time `json:"DateSent<,omitempty"` + DateSentBefore *time.Time `json:"DateSent<,omitempty"` // The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. - DateSentAfter *time.Time `json:"DateSent>,omitempty"` + DateSentAfter *time.Time `json:"DateSent>,omitempty"` // How many resources to return in each list page. The default is 50, and the maximum is 1000. PageSize *int32 `json:"PageSize,omitempty"` } @@ -9590,8 +9530,6 @@ func (c *DefaultApiService) ListMessage(params *ListMessageParams) (*ListMessage } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.To != nil { data.Set("To", *params.To) } @@ -9610,6 +9548,7 @@ func (c *DefaultApiService) ListMessage(params *ListMessageParams) (*ListMessage if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -9635,9 +9574,9 @@ type ListNotificationParams struct { // Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. MessageDate *string `json:"MessageDate,omitempty"` // Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. - MessageDateBefore *string `json:"MessageDate<,omitempty"` + MessageDateBefore *string `json:"MessageDate<,omitempty"` // Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. - MessageDateAfter *string `json:"MessageDate>,omitempty"` + MessageDateAfter *string `json:"MessageDate>,omitempty"` // How many resources to return in each list page. The default is 50, and the maximum is 1000. PageSize *int32 `json:"PageSize,omitempty"` } @@ -9677,8 +9616,6 @@ func (c *DefaultApiService) ListNotification(params *ListNotificationParams) (*L } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Log != nil { data.Set("Log", fmt.Sprint(*params.Log)) } @@ -9694,6 +9631,7 @@ func (c *DefaultApiService) ListNotification(params *ListNotificationParams) (*L if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -9749,8 +9687,6 @@ func (c *DefaultApiService) ListOutgoingCallerId(params *ListOutgoingCallerIdPar } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PhoneNumber != nil { data.Set("PhoneNumber", *params.PhoneNumber) } @@ -9760,6 +9696,7 @@ func (c *DefaultApiService) ListOutgoingCallerId(params *ListOutgoingCallerIdPar if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -9822,8 +9759,6 @@ func (c *DefaultApiService) ListParticipant(ConferenceSid string, params *ListPa path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Muted != nil { data.Set("Muted", fmt.Sprint(*params.Muted)) } @@ -9836,6 +9771,7 @@ func (c *DefaultApiService) ListParticipant(ConferenceSid string, params *ListPa if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -9879,11 +9815,10 @@ func (c *DefaultApiService) ListQueue(params *ListQueueParams) (*ListQueueRespon } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -9907,9 +9842,9 @@ type ListRecordingParams struct { // Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. DateCreated *time.Time `json:"DateCreated,omitempty"` // Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. - DateCreatedBefore *time.Time `json:"DateCreated<,omitempty"` + DateCreatedBefore *time.Time `json:"DateCreated<,omitempty"` // Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. - DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` // The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to read. CallSid *string `json:"CallSid,omitempty"` // The Conference SID that identifies the conference associated with the recording to read. @@ -9957,8 +9892,6 @@ func (c *DefaultApiService) ListRecording(params *ListRecordingParams) (*ListRec } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.DateCreated != nil { data.Set("DateCreated", fmt.Sprint((*params.DateCreated).Format(time.RFC3339))) } @@ -9977,6 +9910,7 @@ func (c *DefaultApiService) ListRecording(params *ListRecordingParams) (*ListRec if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -10021,11 +9955,10 @@ func (c *DefaultApiService) ListRecordingAddOnResult(ReferenceSid string, params path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -10071,11 +10004,10 @@ func (c *DefaultApiService) ListRecordingAddOnResultPayload(ReferenceSid string, path = strings.Replace(path, "{"+"AddOnResultSid"+"}", AddOnResultSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -10119,11 +10051,10 @@ func (c *DefaultApiService) ListRecordingTranscription(RecordingSid string, para path = strings.Replace(path, "{"+"RecordingSid"+"}", RecordingSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -10179,8 +10110,6 @@ func (c *DefaultApiService) ListShortCode(params *ListShortCodeParams) (*ListSho } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } @@ -10190,6 +10119,7 @@ func (c *DefaultApiService) ListShortCode(params *ListShortCodeParams) (*ListSho if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -10232,11 +10162,10 @@ func (c *DefaultApiService) ListSigningKey(params *ListSigningKeyParams) (*ListS } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -10281,11 +10210,10 @@ func (c *DefaultApiService) ListSipAuthCallsCredentialListMapping(DomainSid stri path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -10330,11 +10258,10 @@ func (c *DefaultApiService) ListSipAuthCallsIpAccessControlListMapping(DomainSid path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -10379,11 +10306,10 @@ func (c *DefaultApiService) ListSipAuthRegistrationsCredentialListMapping(Domain path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -10428,11 +10354,10 @@ func (c *DefaultApiService) ListSipCredential(CredentialListSid string, params * path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -10476,11 +10401,10 @@ func (c *DefaultApiService) ListSipCredentialList(params *ListSipCredentialListP } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -10525,11 +10449,10 @@ func (c *DefaultApiService) ListSipCredentialListMapping(DomainSid string, param path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -10573,11 +10496,10 @@ func (c *DefaultApiService) ListSipDomain(params *ListSipDomainParams) (*ListSip } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -10621,11 +10543,10 @@ func (c *DefaultApiService) ListSipIpAccessControlList(params *ListSipIpAccessCo } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -10670,11 +10591,10 @@ func (c *DefaultApiService) ListSipIpAccessControlListMapping(DomainSid string, path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -10719,11 +10639,10 @@ func (c *DefaultApiService) ListSipIpAddress(IpAccessControlListSid string, para path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -10767,11 +10686,10 @@ func (c *DefaultApiService) ListTranscription(params *ListTranscriptionParams) ( } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -10839,8 +10757,6 @@ func (c *DefaultApiService) ListUsageRecord(params *ListUsageRecordParams) (*Lis } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Category != nil { data.Set("Category", *params.Category) } @@ -10856,6 +10772,7 @@ func (c *DefaultApiService) ListUsageRecord(params *ListUsageRecordParams) (*Lis if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -10922,8 +10839,6 @@ func (c *DefaultApiService) ListUsageRecordAllTime(params *ListUsageRecordAllTim } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Category != nil { data.Set("Category", *params.Category) } @@ -10939,6 +10854,7 @@ func (c *DefaultApiService) ListUsageRecordAllTime(params *ListUsageRecordAllTim if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -11005,8 +10921,6 @@ func (c *DefaultApiService) ListUsageRecordDaily(params *ListUsageRecordDailyPar } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Category != nil { data.Set("Category", *params.Category) } @@ -11022,6 +10936,7 @@ func (c *DefaultApiService) ListUsageRecordDaily(params *ListUsageRecordDailyPar if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -11088,8 +11003,6 @@ func (c *DefaultApiService) ListUsageRecordLastMonth(params *ListUsageRecordLast } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Category != nil { data.Set("Category", *params.Category) } @@ -11105,6 +11018,7 @@ func (c *DefaultApiService) ListUsageRecordLastMonth(params *ListUsageRecordLast if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -11171,8 +11085,6 @@ func (c *DefaultApiService) ListUsageRecordMonthly(params *ListUsageRecordMonthl } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Category != nil { data.Set("Category", *params.Category) } @@ -11188,6 +11100,7 @@ func (c *DefaultApiService) ListUsageRecordMonthly(params *ListUsageRecordMonthl if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -11254,8 +11167,6 @@ func (c *DefaultApiService) ListUsageRecordThisMonth(params *ListUsageRecordThis } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Category != nil { data.Set("Category", *params.Category) } @@ -11271,6 +11182,7 @@ func (c *DefaultApiService) ListUsageRecordThisMonth(params *ListUsageRecordThis if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -11337,8 +11249,6 @@ func (c *DefaultApiService) ListUsageRecordToday(params *ListUsageRecordTodayPar } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Category != nil { data.Set("Category", *params.Category) } @@ -11354,6 +11264,7 @@ func (c *DefaultApiService) ListUsageRecordToday(params *ListUsageRecordTodayPar if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -11420,8 +11331,6 @@ func (c *DefaultApiService) ListUsageRecordYearly(params *ListUsageRecordYearlyP } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Category != nil { data.Set("Category", *params.Category) } @@ -11437,6 +11346,7 @@ func (c *DefaultApiService) ListUsageRecordYearly(params *ListUsageRecordYearlyP if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -11503,8 +11413,6 @@ func (c *DefaultApiService) ListUsageRecordYesterday(params *ListUsageRecordYest } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Category != nil { data.Set("Category", *params.Category) } @@ -11520,6 +11428,7 @@ func (c *DefaultApiService) ListUsageRecordYesterday(params *ListUsageRecordYest if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -11581,8 +11490,6 @@ func (c *DefaultApiService) ListUsageTrigger(params *ListUsageTriggerParams) (*L } data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Recurring != nil { data.Set("Recurring", *params.Recurring) } @@ -11595,6 +11502,7 @@ func (c *DefaultApiService) ListUsageTrigger(params *ListUsageTriggerParams) (*L if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -11634,14 +11542,13 @@ func (c *DefaultApiService) UpdateAccount(Sid string, params *UpdateAccountParam path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } if params != nil && params.Status != nil { data.Set("Status", *params.Status) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -11727,8 +11634,6 @@ func (c *DefaultApiService) UpdateAddress(Sid string, params *UpdateAddressParam path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AutoCorrectAddress != nil { data.Set("AutoCorrectAddress", fmt.Sprint(*params.AutoCorrectAddress)) } @@ -11753,6 +11658,7 @@ func (c *DefaultApiService) UpdateAddress(Sid string, params *UpdateAddressParam if params != nil && params.Street != nil { data.Set("Street", *params.Street) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -11881,8 +11787,6 @@ func (c *DefaultApiService) UpdateApplication(Sid string, params *UpdateApplicat path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ApiVersion != nil { data.Set("ApiVersion", *params.ApiVersion) } @@ -11928,6 +11832,7 @@ func (c *DefaultApiService) UpdateApplication(Sid string, params *UpdateApplicat if params != nil && params.VoiceUrl != nil { data.Set("VoiceUrl", *params.VoiceUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -12014,8 +11919,6 @@ func (c *DefaultApiService) UpdateCall(Sid string, params *UpdateCallParams) (*A path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FallbackMethod != nil { data.Set("FallbackMethod", *params.FallbackMethod) } @@ -12040,6 +11943,7 @@ func (c *DefaultApiService) UpdateCall(Sid string, params *UpdateCallParams) (*A if params != nil && params.Url != nil { data.Set("Url", *params.Url) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -12090,8 +11994,6 @@ func (c *DefaultApiService) UpdateCallFeedback(CallSid string, params *UpdateCal path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Issue != nil { for _, item := range *params.Issue { data.Add("Issue", item) @@ -12100,6 +12002,7 @@ func (c *DefaultApiService) UpdateCallFeedback(CallSid string, params *UpdateCal if params != nil && params.QualityScore != nil { data.Set("QualityScore", fmt.Sprint(*params.QualityScore)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -12151,14 +12054,13 @@ func (c *DefaultApiService) UpdateCallRecording(CallSid string, Sid string, para path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PauseBehavior != nil { data.Set("PauseBehavior", *params.PauseBehavior) } if params != nil && params.Status != nil { data.Set("Status", *params.Status) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -12214,8 +12116,6 @@ func (c *DefaultApiService) UpdateConference(Sid string, params *UpdateConferenc path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AnnounceMethod != nil { data.Set("AnnounceMethod", *params.AnnounceMethod) } @@ -12225,6 +12125,7 @@ func (c *DefaultApiService) UpdateConference(Sid string, params *UpdateConferenc if params != nil && params.Status != nil { data.Set("Status", *params.Status) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -12276,14 +12177,13 @@ func (c *DefaultApiService) UpdateConferenceRecording(ConferenceSid string, Sid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PauseBehavior != nil { data.Set("PauseBehavior", *params.PauseBehavior) } if params != nil && params.Status != nil { data.Set("Status", *params.Status) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -12370,8 +12270,6 @@ func (c *DefaultApiService) UpdateConnectApp(Sid string, params *UpdateConnectAp path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AuthorizeRedirectUrl != nil { data.Set("AuthorizeRedirectUrl", *params.AuthorizeRedirectUrl) } @@ -12398,6 +12296,7 @@ func (c *DefaultApiService) UpdateConnectApp(Sid string, params *UpdateConnectAp data.Add("Permissions", item) } } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -12574,8 +12473,6 @@ func (c *DefaultApiService) UpdateIncomingPhoneNumber(Sid string, params *Update path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AccountSid != nil { data.Set("AccountSid", *params.AccountSid) } @@ -12645,6 +12542,7 @@ func (c *DefaultApiService) UpdateIncomingPhoneNumber(Sid string, params *Update if params != nil && params.VoiceUrl != nil { data.Set("VoiceUrl", *params.VoiceUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -12688,11 +12586,10 @@ func (c *DefaultApiService) UpdateKey(Sid string, params *UpdateKeyParams) (*Api path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -12744,14 +12641,13 @@ func (c *DefaultApiService) UpdateMember(QueueSid string, CallSid string, params path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Method != nil { data.Set("Method", *params.Method) } if params != nil && params.Url != nil { data.Set("Url", *params.Url) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -12796,11 +12692,10 @@ func (c *DefaultApiService) UpdateMessage(Sid string, params *UpdateMessageParam path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Body != nil { data.Set("Body", *params.Body) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -12845,11 +12740,10 @@ func (c *DefaultApiService) UpdateOutgoingCallerId(Sid string, params *UpdateOut path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -12961,8 +12855,6 @@ func (c *DefaultApiService) UpdateParticipant(ConferenceSid string, CallSid stri path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AnnounceMethod != nil { data.Set("AnnounceMethod", *params.AnnounceMethod) } @@ -12999,6 +12891,7 @@ func (c *DefaultApiService) UpdateParticipant(ConferenceSid string, CallSid stri if params != nil && params.WaitUrl != nil { data.Set("WaitUrl", *params.WaitUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -13062,8 +12955,6 @@ func (c *DefaultApiService) UpdatePayments(CallSid string, Sid string, params *U path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Capture != nil { data.Set("Capture", *params.Capture) } @@ -13076,6 +12967,7 @@ func (c *DefaultApiService) UpdatePayments(CallSid string, Sid string, params *U if params != nil && params.StatusCallback != nil { data.Set("StatusCallback", *params.StatusCallback) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -13126,14 +13018,13 @@ func (c *DefaultApiService) UpdateQueue(Sid string, params *UpdateQueueParams) ( path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } if params != nil && params.MaxSize != nil { data.Set("MaxSize", fmt.Sprint(*params.MaxSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -13208,8 +13099,6 @@ func (c *DefaultApiService) UpdateShortCode(Sid string, params *UpdateShortCodeP path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ApiVersion != nil { data.Set("ApiVersion", *params.ApiVersion) } @@ -13228,6 +13117,7 @@ func (c *DefaultApiService) UpdateShortCode(Sid string, params *UpdateShortCodeP if params != nil && params.SmsUrl != nil { data.Set("SmsUrl", *params.SmsUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -13271,11 +13161,10 @@ func (c *DefaultApiService) UpdateSigningKey(Sid string, params *UpdateSigningKe path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -13321,11 +13210,10 @@ func (c *DefaultApiService) UpdateSipCredential(CredentialListSid string, Sid st path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Password != nil { data.Set("Password", *params.Password) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -13370,11 +13258,10 @@ func (c *DefaultApiService) UpdateSipCredentialList(Sid string, params *UpdateSi path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -13491,8 +13378,6 @@ func (c *DefaultApiService) UpdateSipDomain(Sid string, params *UpdateSipDomainP path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ByocTrunkSid != nil { data.Set("ByocTrunkSid", *params.ByocTrunkSid) } @@ -13532,6 +13417,7 @@ func (c *DefaultApiService) UpdateSipDomain(Sid string, params *UpdateSipDomainP if params != nil && params.VoiceUrl != nil { data.Set("VoiceUrl", *params.VoiceUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -13576,11 +13462,10 @@ func (c *DefaultApiService) UpdateSipIpAccessControlList(Sid string, params *Upd path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -13638,8 +13523,6 @@ func (c *DefaultApiService) UpdateSipIpAddress(IpAccessControlListSid string, Si path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CidrPrefixLength != nil { data.Set("CidrPrefixLength", fmt.Sprint(*params.CidrPrefixLength)) } @@ -13649,6 +13532,7 @@ func (c *DefaultApiService) UpdateSipIpAddress(IpAccessControlListSid string, Si if params != nil && params.IpAddress != nil { data.Set("IpAddress", *params.IpAddress) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -13705,8 +13589,6 @@ func (c *DefaultApiService) UpdateUsageTrigger(Sid string, params *UpdateUsageTr path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CallbackMethod != nil { data.Set("CallbackMethod", *params.CallbackMethod) } @@ -13716,6 +13598,7 @@ func (c *DefaultApiService) UpdateUsageTrigger(Sid string, params *UpdateUsageTr if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/autopilot/v1/api_default.go b/rest/autopilot/v1/api_default.go index 87c6656e2..7127e98d2 100644 --- a/rest/autopilot/v1/api_default.go +++ b/rest/autopilot/v1/api_default.go @@ -88,8 +88,6 @@ func (c *DefaultApiService) CreateAssistant(params *CreateAssistantParams) (*Aut path := "/v1/Assistants" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CallbackEvents != nil { data.Set("CallbackEvents", *params.CallbackEvents) } @@ -123,6 +121,7 @@ func (c *DefaultApiService) CreateAssistant(params *CreateAssistantParams) (*Aut if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -162,14 +161,13 @@ func (c *DefaultApiService) CreateField(AssistantSid string, TaskSid string, par path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FieldType != nil { data.Set("FieldType", *params.FieldType) } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -208,14 +206,13 @@ func (c *DefaultApiService) CreateFieldType(AssistantSid string, params *CreateF path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -261,8 +258,6 @@ func (c *DefaultApiService) CreateFieldValue(AssistantSid string, FieldTypeSid s path = strings.Replace(path, "{"+"FieldTypeSid"+"}", FieldTypeSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Language != nil { data.Set("Language", *params.Language) } @@ -272,6 +267,7 @@ func (c *DefaultApiService) CreateFieldValue(AssistantSid string, FieldTypeSid s if params != nil && params.Value != nil { data.Set("Value", *params.Value) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -310,14 +306,13 @@ func (c *DefaultApiService) CreateModelBuild(AssistantSid string, params *Create path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.StatusCallback != nil { data.Set("StatusCallback", *params.StatusCallback) } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -368,8 +363,6 @@ func (c *DefaultApiService) CreateQuery(AssistantSid string, params *CreateQuery path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Language != nil { data.Set("Language", *params.Language) } @@ -382,6 +375,7 @@ func (c *DefaultApiService) CreateQuery(AssistantSid string, params *CreateQuery if params != nil && params.Tasks != nil { data.Set("Tasks", *params.Tasks) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -427,8 +421,6 @@ func (c *DefaultApiService) CreateSample(AssistantSid string, TaskSid string, pa path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Language != nil { data.Set("Language", *params.Language) } @@ -438,6 +430,7 @@ func (c *DefaultApiService) CreateSample(AssistantSid string, TaskSid string, pa if params != nil && params.TaggedText != nil { data.Set("TaggedText", *params.TaggedText) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -488,8 +481,6 @@ func (c *DefaultApiService) CreateTask(AssistantSid string, params *CreateTaskPa path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Actions != nil { v, err := json.Marshal(params.Actions) @@ -508,6 +499,7 @@ func (c *DefaultApiService) CreateTask(AssistantSid string, params *CreateTaskPa if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -558,8 +550,6 @@ func (c *DefaultApiService) CreateWebhook(AssistantSid string, params *CreateWeb path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Events != nil { data.Set("Events", *params.Events) } @@ -572,6 +562,7 @@ func (c *DefaultApiService) CreateWebhook(AssistantSid string, params *CreateWeb if params != nil && params.WebhookUrl != nil { data.Set("WebhookUrl", *params.WebhookUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1091,11 +1082,10 @@ func (c *DefaultApiService) ListAssistant(params *ListAssistantParams) (*ListAss path := "/v1/Assistants" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1129,11 +1119,10 @@ func (c *DefaultApiService) ListField(AssistantSid string, TaskSid string, param path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1166,11 +1155,10 @@ func (c *DefaultApiService) ListFieldType(AssistantSid string, params *ListField path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1210,14 +1198,13 @@ func (c *DefaultApiService) ListFieldValue(AssistantSid string, FieldTypeSid str path = strings.Replace(path, "{"+"FieldTypeSid"+"}", FieldTypeSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Language != nil { data.Set("Language", *params.Language) } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1250,11 +1237,10 @@ func (c *DefaultApiService) ListModelBuild(AssistantSid string, params *ListMode path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1311,8 +1297,6 @@ func (c *DefaultApiService) ListQuery(AssistantSid string, params *ListQueryPara path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Language != nil { data.Set("Language", *params.Language) } @@ -1328,6 +1312,7 @@ func (c *DefaultApiService) ListQuery(AssistantSid string, params *ListQueryPara if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1367,14 +1352,13 @@ func (c *DefaultApiService) ListSample(AssistantSid string, TaskSid string, para path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Language != nil { data.Set("Language", *params.Language) } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1407,11 +1391,10 @@ func (c *DefaultApiService) ListTask(AssistantSid string, params *ListTaskParams path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1444,11 +1427,10 @@ func (c *DefaultApiService) ListWebhook(AssistantSid string, params *ListWebhook path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1523,8 +1505,6 @@ func (c *DefaultApiService) UpdateAssistant(Sid string, params *UpdateAssistantP path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CallbackEvents != nil { data.Set("CallbackEvents", *params.CallbackEvents) } @@ -1561,6 +1541,7 @@ func (c *DefaultApiService) UpdateAssistant(Sid string, params *UpdateAssistantP if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1593,8 +1574,6 @@ func (c *DefaultApiService) UpdateDefaults(AssistantSid string, params *UpdateDe path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Defaults != nil { v, err := json.Marshal(params.Defaults) @@ -1604,6 +1583,7 @@ func (c *DefaultApiService) UpdateDefaults(AssistantSid string, params *UpdateDe data.Set("Defaults", string(v)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1643,14 +1623,13 @@ func (c *DefaultApiService) UpdateFieldType(AssistantSid string, Sid string, par path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1684,11 +1663,10 @@ func (c *DefaultApiService) UpdateModelBuild(AssistantSid string, Sid string, pa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1728,14 +1706,13 @@ func (c *DefaultApiService) UpdateQuery(AssistantSid string, Sid string, params path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.SampleSid != nil { data.Set("SampleSid", *params.SampleSid) } if params != nil && params.Status != nil { data.Set("Status", *params.Status) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1767,11 +1744,10 @@ func (c *DefaultApiService) UpdateRestoreAssistant(params *UpdateRestoreAssistan path := "/v1/Assistants/Restore" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Assistant != nil { data.Set("Assistant", *params.Assistant) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1818,8 +1794,6 @@ func (c *DefaultApiService) UpdateSample(AssistantSid string, TaskSid string, Si path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Language != nil { data.Set("Language", *params.Language) } @@ -1829,6 +1803,7 @@ func (c *DefaultApiService) UpdateSample(AssistantSid string, TaskSid string, Si if params != nil && params.TaggedText != nil { data.Set("TaggedText", *params.TaggedText) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1862,8 +1837,6 @@ func (c *DefaultApiService) UpdateStyleSheet(AssistantSid string, params *Update path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.StyleSheet != nil { v, err := json.Marshal(params.StyleSheet) @@ -1873,6 +1846,7 @@ func (c *DefaultApiService) UpdateStyleSheet(AssistantSid string, params *Update data.Set("StyleSheet", string(v)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1924,8 +1898,6 @@ func (c *DefaultApiService) UpdateTask(AssistantSid string, Sid string, params * path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Actions != nil { v, err := json.Marshal(params.Actions) @@ -1944,6 +1916,7 @@ func (c *DefaultApiService) UpdateTask(AssistantSid string, Sid string, params * if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1978,8 +1951,6 @@ func (c *DefaultApiService) UpdateTaskActions(AssistantSid string, TaskSid strin path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Actions != nil { v, err := json.Marshal(params.Actions) @@ -1989,6 +1960,7 @@ func (c *DefaultApiService) UpdateTaskActions(AssistantSid string, TaskSid strin data.Set("Actions", string(v)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2040,8 +2012,6 @@ func (c *DefaultApiService) UpdateWebhook(AssistantSid string, Sid string, param path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Events != nil { data.Set("Events", *params.Events) } @@ -2054,6 +2024,7 @@ func (c *DefaultApiService) UpdateWebhook(AssistantSid string, Sid string, param if params != nil && params.WebhookUrl != nil { data.Set("WebhookUrl", *params.WebhookUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/bulkexports/v1/api_default.go b/rest/bulkexports/v1/api_default.go index 74b035ef8..4194989b8 100644 --- a/rest/bulkexports/v1/api_default.go +++ b/rest/bulkexports/v1/api_default.go @@ -83,8 +83,6 @@ func (c *DefaultApiService) CreateExportCustomJob(ResourceType string, params *C path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Email != nil { data.Set("Email", *params.Email) } @@ -103,6 +101,7 @@ func (c *DefaultApiService) CreateExportCustomJob(ResourceType string, params *C if params != nil && params.WebhookUrl != nil { data.Set("WebhookUrl", *params.WebhookUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -240,11 +239,10 @@ func (c *DefaultApiService) ListDay(ResourceType string, params *ListDayParams) path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -277,11 +275,10 @@ func (c *DefaultApiService) ListExportCustomJob(ResourceType string, params *Lis path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -327,8 +324,6 @@ func (c *DefaultApiService) UpdateExportConfiguration(ResourceType string, param path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Enabled != nil { data.Set("Enabled", fmt.Sprint(*params.Enabled)) } @@ -338,6 +333,7 @@ func (c *DefaultApiService) UpdateExportConfiguration(ResourceType string, param if params != nil && params.WebhookUrl != nil { data.Set("WebhookUrl", *params.WebhookUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/chat/v1/api_default.go b/rest/chat/v1/api_default.go index 03ec1677e..601742c10 100644 --- a/rest/chat/v1/api_default.go +++ b/rest/chat/v1/api_default.go @@ -71,8 +71,6 @@ func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChann path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -85,6 +83,7 @@ func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChann if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -152,8 +151,6 @@ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*C path := "/v1/Credentials" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ApiKey != nil { data.Set("ApiKey", *params.ApiKey) } @@ -175,6 +172,7 @@ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*C if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -214,14 +212,13 @@ func (c *DefaultApiService) CreateInvite(ServiceSid string, ChannelSid string, p path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) } if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -261,14 +258,13 @@ func (c *DefaultApiService) CreateMember(ServiceSid string, ChannelSid string, p path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) } if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -314,8 +310,6 @@ func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -325,6 +319,7 @@ func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, if params != nil && params.From != nil { data.Set("From", *params.From) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -369,8 +364,6 @@ func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRolePara path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } @@ -382,6 +375,7 @@ func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRolePara if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -413,11 +407,10 @@ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ChatV1S path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -468,8 +461,6 @@ func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserPara path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -482,6 +473,7 @@ func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserPara if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -850,8 +842,6 @@ func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelPa path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Type != nil { for _, item := range *params.Type { data.Add("Type", item) @@ -860,6 +850,7 @@ func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelPa if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -891,11 +882,10 @@ func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListC path := "/v1/Credentials" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -935,8 +925,6 @@ func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, par path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Identity != nil { for _, item := range *params.Identity { data.Add("Identity", item) @@ -945,6 +933,7 @@ func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, par if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -984,8 +973,6 @@ func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, par path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Identity != nil { for _, item := range *params.Identity { data.Add("Identity", item) @@ -994,6 +981,7 @@ func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, par if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1033,14 +1021,13 @@ func (c *DefaultApiService) ListMessage(ServiceSid string, ChannelSid string, pa path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Order != nil { data.Set("Order", *params.Order) } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1073,11 +1060,10 @@ func (c *DefaultApiService) ListRole(ServiceSid string, params *ListRoleParams) path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1109,11 +1095,10 @@ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListService path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1146,11 +1131,10 @@ func (c *DefaultApiService) ListUser(ServiceSid string, params *ListUserParams) path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1185,11 +1169,10 @@ func (c *DefaultApiService) ListUserChannel(ServiceSid string, UserSid string, p path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1235,8 +1218,6 @@ func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -1246,6 +1227,7 @@ func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1308,8 +1290,6 @@ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentia path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ApiKey != nil { data.Set("ApiKey", *params.ApiKey) } @@ -1328,6 +1308,7 @@ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentia if params != nil && params.Secret != nil { data.Set("Secret", *params.Secret) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1368,14 +1349,13 @@ func (c *DefaultApiService) UpdateMember(ServiceSid string, ChannelSid string, S path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.LastConsumedMessageIndex != nil { data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) } if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1416,14 +1396,13 @@ func (c *DefaultApiService) UpdateMessage(ServiceSid string, ChannelSid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } if params != nil && params.Body != nil { data.Set("Body", *params.Body) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1457,13 +1436,12 @@ func (c *DefaultApiService) UpdateRole(ServiceSid string, Sid string, params *Up path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Permission != nil { for _, item := range *params.Permission { data.Add("Permission", item) } } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1814,8 +1792,6 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ConsumptionReportInterval != nil { data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) } @@ -1980,6 +1956,7 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam if params != nil && params.WebhooksOnMessageUpdatedUrl != nil { data.Set("Webhooks.OnMessageUpdated.Url", *params.WebhooksOnMessageUpdatedUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2025,8 +2002,6 @@ func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *Up path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -2036,6 +2011,7 @@ func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *Up if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/chat/v2/api_default.go b/rest/chat/v2/api_default.go index 4f4629575..56dc5f98d 100644 --- a/rest/chat/v2/api_default.go +++ b/rest/chat/v2/api_default.go @@ -96,8 +96,6 @@ func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChann path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -119,7 +117,7 @@ func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChann if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -192,8 +190,6 @@ func (c *DefaultApiService) CreateChannelWebhook(ServiceSid string, ChannelSid s path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ConfigurationFilters != nil { for _, item := range *params.ConfigurationFilters { data.Add("Configuration.Filters", item) @@ -219,6 +215,7 @@ func (c *DefaultApiService) CreateChannelWebhook(ServiceSid string, ChannelSid s if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -286,8 +283,6 @@ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*C path := "/v2/Credentials" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ApiKey != nil { data.Set("ApiKey", *params.ApiKey) } @@ -309,6 +304,7 @@ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*C if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -348,14 +344,13 @@ func (c *DefaultApiService) CreateInvite(ServiceSid string, ChannelSid string, p path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) } if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -431,8 +426,6 @@ func (c *DefaultApiService) CreateMember(ServiceSid string, ChannelSid string, p path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -454,7 +447,7 @@ func (c *DefaultApiService) CreateMember(ServiceSid string, ChannelSid string, p if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -533,8 +526,6 @@ func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -556,7 +547,7 @@ func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, if params != nil && params.MediaSid != nil { data.Set("MediaSid", *params.MediaSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -604,8 +595,6 @@ func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRolePara path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } @@ -617,6 +606,7 @@ func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRolePara if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -648,11 +638,10 @@ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ChatV2S path := "/v2/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -709,8 +698,6 @@ func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserPara path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -723,7 +710,7 @@ func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserPara if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -779,7 +766,6 @@ func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, params data := url.Values{} headers := make(map[string]interface{}) - if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -868,7 +854,6 @@ func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, S data := url.Values{} headers := make(map[string]interface{}) - if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -902,7 +887,6 @@ func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, data := url.Values{} headers := make(map[string]interface{}) - if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -1317,8 +1301,6 @@ func (c *DefaultApiService) ListBinding(ServiceSid string, params *ListBindingPa path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.BindingType != nil { for _, item := range *params.BindingType { data.Add("BindingType", item) @@ -1332,6 +1314,7 @@ func (c *DefaultApiService) ListBinding(ServiceSid string, params *ListBindingPa if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1370,8 +1353,6 @@ func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelPa path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Type != nil { for _, item := range *params.Type { data.Add("Type", item) @@ -1380,6 +1361,7 @@ func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelPa if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1413,11 +1395,10 @@ func (c *DefaultApiService) ListChannelWebhook(ServiceSid string, ChannelSid str path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1449,11 +1430,10 @@ func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListC path := "/v2/Credentials" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1493,8 +1473,6 @@ func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, par path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Identity != nil { for _, item := range *params.Identity { data.Add("Identity", item) @@ -1503,6 +1481,7 @@ func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, par if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1542,8 +1521,6 @@ func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, par path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Identity != nil { for _, item := range *params.Identity { data.Add("Identity", item) @@ -1552,6 +1529,7 @@ func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, par if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1591,14 +1569,13 @@ func (c *DefaultApiService) ListMessage(ServiceSid string, ChannelSid string, pa path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Order != nil { data.Set("Order", *params.Order) } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1631,11 +1608,10 @@ func (c *DefaultApiService) ListRole(ServiceSid string, params *ListRoleParams) path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1667,11 +1643,10 @@ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListService path := "/v2/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1704,11 +1679,10 @@ func (c *DefaultApiService) ListUser(ServiceSid string, params *ListUserParams) path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1748,8 +1722,6 @@ func (c *DefaultApiService) ListUserBinding(ServiceSid string, UserSid string, p path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.BindingType != nil { for _, item := range *params.BindingType { data.Add("BindingType", item) @@ -1758,6 +1730,7 @@ func (c *DefaultApiService) ListUserBinding(ServiceSid string, UserSid string, p if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1792,11 +1765,10 @@ func (c *DefaultApiService) ListUserChannel(ServiceSid string, UserSid string, p path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1866,8 +1838,6 @@ func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -1886,7 +1856,7 @@ func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -1954,8 +1924,6 @@ func (c *DefaultApiService) UpdateChannelWebhook(ServiceSid string, ChannelSid s path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ConfigurationFilters != nil { for _, item := range *params.ConfigurationFilters { data.Add("Configuration.Filters", item) @@ -1978,6 +1946,7 @@ func (c *DefaultApiService) UpdateChannelWebhook(ServiceSid string, ChannelSid s if params != nil && params.ConfigurationUrl != nil { data.Set("Configuration.Url", *params.ConfigurationUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2040,8 +2009,6 @@ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentia path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ApiKey != nil { data.Set("ApiKey", *params.ApiKey) } @@ -2060,6 +2027,7 @@ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentia if params != nil && params.Secret != nil { data.Set("Secret", *params.Secret) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2130,8 +2098,6 @@ func (c *DefaultApiService) UpdateMember(ServiceSid string, ChannelSid string, S path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -2150,7 +2116,7 @@ func (c *DefaultApiService) UpdateMember(ServiceSid string, ChannelSid string, S if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -2224,8 +2190,6 @@ func (c *DefaultApiService) UpdateMessage(ServiceSid string, ChannelSid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -2244,7 +2208,7 @@ func (c *DefaultApiService) UpdateMessage(ServiceSid string, ChannelSid string, if params != nil && params.LastUpdatedBy != nil { data.Set("LastUpdatedBy", *params.LastUpdatedBy) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -2281,13 +2245,12 @@ func (c *DefaultApiService) UpdateRole(ServiceSid string, Sid string, params *Up path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Permission != nil { for _, item := range *params.Permission { data.Add("Permission", item) } } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2500,8 +2463,6 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ConsumptionReportInterval != nil { data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) } @@ -2597,6 +2558,7 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam if params != nil && params.WebhookMethod != nil { data.Set("WebhookMethod", *params.WebhookMethod) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2648,8 +2610,6 @@ func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *Up path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -2659,7 +2619,7 @@ func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *Up if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -2709,8 +2669,6 @@ func (c *DefaultApiService) UpdateUserChannel(ServiceSid string, UserSid string, path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.LastConsumedMessageIndex != nil { data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) } @@ -2720,6 +2678,7 @@ func (c *DefaultApiService) UpdateUserChannel(ServiceSid string, UserSid string, if params != nil && params.NotificationLevel != nil { data.Set("NotificationLevel", *params.NotificationLevel) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/conversations/v1/api_default.go b/rest/conversations/v1/api_default.go index f81a7e131..86606f6b0 100644 --- a/rest/conversations/v1/api_default.go +++ b/rest/conversations/v1/api_default.go @@ -108,8 +108,6 @@ func (c *DefaultApiService) CreateConversation(params *CreateConversationParams) path := "/v1/Conversations" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -137,7 +135,7 @@ func (c *DefaultApiService) CreateConversation(params *CreateConversationParams) if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -210,8 +208,6 @@ func (c *DefaultApiService) CreateConversationMessage(ConversationSid string, pa path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -230,7 +226,7 @@ func (c *DefaultApiService) CreateConversationMessage(ConversationSid string, pa if params != nil && params.MediaSid != nil { data.Set("MediaSid", *params.MediaSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -315,8 +311,6 @@ func (c *DefaultApiService) CreateConversationParticipant(ConversationSid string path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -341,7 +335,7 @@ func (c *DefaultApiService) CreateConversationParticipant(ConversationSid string if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -414,8 +408,6 @@ func (c *DefaultApiService) CreateConversationScopedWebhook(ConversationSid stri path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ConfigurationFilters != nil { for _, item := range *params.ConfigurationFilters { data.Add("Configuration.Filters", item) @@ -441,6 +433,7 @@ func (c *DefaultApiService) CreateConversationScopedWebhook(ConversationSid stri if params != nil && params.Target != nil { data.Set("Target", *params.Target) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -509,8 +502,6 @@ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*C path := "/v1/Credentials" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ApiKey != nil { data.Set("ApiKey", *params.ApiKey) } @@ -532,6 +523,7 @@ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*C if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -576,8 +568,6 @@ func (c *DefaultApiService) CreateRole(params *CreateRoleParams) (*Conversations path := "/v1/Roles" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } @@ -589,6 +579,7 @@ func (c *DefaultApiService) CreateRole(params *CreateRoleParams) (*Conversations if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -621,11 +612,10 @@ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*Convers path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -713,8 +703,6 @@ func (c *DefaultApiService) CreateServiceConversation(ChatServiceSid string, par path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -742,7 +730,7 @@ func (c *DefaultApiService) CreateServiceConversation(ChatServiceSid string, par if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -816,8 +804,6 @@ func (c *DefaultApiService) CreateServiceConversationMessage(ChatServiceSid stri path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -836,7 +822,7 @@ func (c *DefaultApiService) CreateServiceConversationMessage(ChatServiceSid stri if params != nil && params.MediaSid != nil { data.Set("MediaSid", *params.MediaSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -922,8 +908,6 @@ func (c *DefaultApiService) CreateServiceConversationParticipant(ChatServiceSid path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -948,7 +932,7 @@ func (c *DefaultApiService) CreateServiceConversationParticipant(ChatServiceSid if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -1022,8 +1006,6 @@ func (c *DefaultApiService) CreateServiceConversationScopedWebhook(ChatServiceSi path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ConfigurationFilters != nil { for _, item := range *params.ConfigurationFilters { data.Add("Configuration.Filters", item) @@ -1049,6 +1031,7 @@ func (c *DefaultApiService) CreateServiceConversationScopedWebhook(ChatServiceSi if params != nil && params.Target != nil { data.Set("Target", *params.Target) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1094,8 +1077,6 @@ func (c *DefaultApiService) CreateServiceRole(ChatServiceSid string, params *Cre path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } @@ -1107,6 +1088,7 @@ func (c *DefaultApiService) CreateServiceRole(ChatServiceSid string, params *Cre if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1164,8 +1146,6 @@ func (c *DefaultApiService) CreateServiceUser(ChatServiceSid string, params *Cre path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -1178,7 +1158,7 @@ func (c *DefaultApiService) CreateServiceUser(ChatServiceSid string, params *Cre if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -1238,8 +1218,6 @@ func (c *DefaultApiService) CreateUser(params *CreateUserParams) (*Conversations path := "/v1/Users" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -1252,7 +1230,7 @@ func (c *DefaultApiService) CreateUser(params *CreateUserParams) (*Conversations if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -1290,7 +1268,6 @@ func (c *DefaultApiService) DeleteConversation(Sid string, params *DeleteConvers data := url.Values{} headers := make(map[string]interface{}) - if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -1324,7 +1301,6 @@ func (c *DefaultApiService) DeleteConversationMessage(ConversationSid string, Si data := url.Values{} headers := make(map[string]interface{}) - if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -1358,7 +1334,6 @@ func (c *DefaultApiService) DeleteConversationParticipant(ConversationSid string data := url.Values{} headers := make(map[string]interface{}) - if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -1484,7 +1459,6 @@ func (c *DefaultApiService) DeleteServiceConversation(ChatServiceSid string, Sid data := url.Values{} headers := make(map[string]interface{}) - if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -1519,7 +1493,6 @@ func (c *DefaultApiService) DeleteServiceConversationMessage(ChatServiceSid stri data := url.Values{} headers := make(map[string]interface{}) - if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -1554,7 +1527,6 @@ func (c *DefaultApiService) DeleteServiceConversationParticipant(ChatServiceSid data := url.Values{} headers := make(map[string]interface{}) - if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -1627,7 +1599,6 @@ func (c *DefaultApiService) DeleteServiceUser(ChatServiceSid string, Sid string, data := url.Values{} headers := make(map[string]interface{}) - if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -1660,7 +1631,6 @@ func (c *DefaultApiService) DeleteUser(Sid string, params *DeleteUserParams) err data := url.Values{} headers := make(map[string]interface{}) - if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -2189,11 +2159,10 @@ func (c *DefaultApiService) ListConversation(params *ListConversationParams) (*L path := "/v1/Conversations" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2227,11 +2196,10 @@ func (c *DefaultApiService) ListConversationMessage(ConversationSid string, para path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2266,11 +2234,10 @@ func (c *DefaultApiService) ListConversationMessageReceipt(ConversationSid strin path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2304,11 +2271,10 @@ func (c *DefaultApiService) ListConversationParticipant(ConversationSid string, path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2342,11 +2308,10 @@ func (c *DefaultApiService) ListConversationScopedWebhook(ConversationSid string path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2379,11 +2344,10 @@ func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListC path := "/v1/Credentials" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2416,11 +2380,10 @@ func (c *DefaultApiService) ListRole(params *ListRoleParams) (*ListRoleResponse, path := "/v1/Roles" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2453,11 +2416,10 @@ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListService path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2503,8 +2465,6 @@ func (c *DefaultApiService) ListServiceBinding(ChatServiceSid string, params *Li path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.BindingType != nil { for _, item := range *params.BindingType { data.Add("BindingType", item) @@ -2518,6 +2478,7 @@ func (c *DefaultApiService) ListServiceBinding(ChatServiceSid string, params *Li if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2551,11 +2512,10 @@ func (c *DefaultApiService) ListServiceConversation(ChatServiceSid string, param path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2590,11 +2550,10 @@ func (c *DefaultApiService) ListServiceConversationMessage(ChatServiceSid string path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2630,11 +2589,10 @@ func (c *DefaultApiService) ListServiceConversationMessageReceipt(ChatServiceSid path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2669,11 +2627,10 @@ func (c *DefaultApiService) ListServiceConversationParticipant(ChatServiceSid st path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2708,11 +2665,10 @@ func (c *DefaultApiService) ListServiceConversationScopedWebhook(ChatServiceSid path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2746,11 +2702,10 @@ func (c *DefaultApiService) ListServiceRole(ChatServiceSid string, params *ListS path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2784,11 +2739,10 @@ func (c *DefaultApiService) ListServiceUser(ChatServiceSid string, params *ListS path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2821,11 +2775,10 @@ func (c *DefaultApiService) ListUser(params *ListUserParams) (*ListUserResponse, path := "/v1/Users" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2876,8 +2829,6 @@ func (c *DefaultApiService) UpdateConfiguration(params *UpdateConfigurationParam path := "/v1/Configuration" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.DefaultChatServiceSid != nil { data.Set("DefaultChatServiceSid", *params.DefaultChatServiceSid) } @@ -2890,6 +2841,7 @@ func (c *DefaultApiService) UpdateConfiguration(params *UpdateConfigurationParam if params != nil && params.DefaultMessagingServiceSid != nil { data.Set("DefaultMessagingServiceSid", *params.DefaultMessagingServiceSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2945,8 +2897,6 @@ func (c *DefaultApiService) UpdateConfigurationWebhook(params *UpdateConfigurati path := "/v1/Configuration/Webhooks" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Filters != nil { for _, item := range *params.Filters { data.Add("Filters", item) @@ -2964,6 +2914,7 @@ func (c *DefaultApiService) UpdateConfigurationWebhook(params *UpdateConfigurati if params != nil && params.Target != nil { data.Set("Target", *params.Target) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3051,8 +3002,6 @@ func (c *DefaultApiService) UpdateConversation(Sid string, params *UpdateConvers path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -3080,7 +3029,7 @@ func (c *DefaultApiService) UpdateConversation(Sid string, params *UpdateConvers if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -3148,8 +3097,6 @@ func (c *DefaultApiService) UpdateConversationMessage(ConversationSid string, Si path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -3165,7 +3112,7 @@ func (c *DefaultApiService) UpdateConversationMessage(ConversationSid string, Si if params != nil && params.DateUpdated != nil { data.Set("DateUpdated", fmt.Sprint((*params.DateUpdated).Format(time.RFC3339))) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -3257,8 +3204,6 @@ func (c *DefaultApiService) UpdateConversationParticipant(ConversationSid string path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -3286,7 +3231,7 @@ func (c *DefaultApiService) UpdateConversationParticipant(ConversationSid string if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -3348,8 +3293,6 @@ func (c *DefaultApiService) UpdateConversationScopedWebhook(ConversationSid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ConfigurationFilters != nil { for _, item := range *params.ConfigurationFilters { data.Add("Configuration.Filters", item) @@ -3369,6 +3312,7 @@ func (c *DefaultApiService) UpdateConversationScopedWebhook(ConversationSid stri if params != nil && params.ConfigurationUrl != nil { data.Set("Configuration.Url", *params.ConfigurationUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3438,8 +3382,6 @@ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentia path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ApiKey != nil { data.Set("ApiKey", *params.ApiKey) } @@ -3461,6 +3403,7 @@ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentia if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3494,13 +3437,12 @@ func (c *DefaultApiService) UpdateRole(Sid string, params *UpdateRoleParams) (*C path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Permission != nil { for _, item := range *params.Permission { data.Add("Permission", item) } } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3552,8 +3494,6 @@ func (c *DefaultApiService) UpdateServiceConfiguration(ChatServiceSid string, pa path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.DefaultChatServiceRoleSid != nil { data.Set("DefaultChatServiceRoleSid", *params.DefaultChatServiceRoleSid) } @@ -3566,6 +3506,7 @@ func (c *DefaultApiService) UpdateServiceConfiguration(ChatServiceSid string, pa if params != nil && params.ReachabilityEnabled != nil { data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3654,8 +3595,6 @@ func (c *DefaultApiService) UpdateServiceConversation(ChatServiceSid string, Sid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -3683,7 +3622,7 @@ func (c *DefaultApiService) UpdateServiceConversation(ChatServiceSid string, Sid if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -3752,8 +3691,6 @@ func (c *DefaultApiService) UpdateServiceConversationMessage(ChatServiceSid stri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -3769,7 +3706,7 @@ func (c *DefaultApiService) UpdateServiceConversationMessage(ChatServiceSid stri if params != nil && params.DateUpdated != nil { data.Set("DateUpdated", fmt.Sprint((*params.DateUpdated).Format(time.RFC3339))) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -3862,8 +3799,6 @@ func (c *DefaultApiService) UpdateServiceConversationParticipant(ChatServiceSid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -3891,7 +3826,7 @@ func (c *DefaultApiService) UpdateServiceConversationParticipant(ChatServiceSid if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -3954,8 +3889,6 @@ func (c *DefaultApiService) UpdateServiceConversationScopedWebhook(ChatServiceSi path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ConfigurationFilters != nil { for _, item := range *params.ConfigurationFilters { data.Add("Configuration.Filters", item) @@ -3975,6 +3908,7 @@ func (c *DefaultApiService) UpdateServiceConversationScopedWebhook(ChatServiceSi if params != nil && params.ConfigurationUrl != nil { data.Set("Configuration.Url", *params.ConfigurationUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -4068,8 +4002,6 @@ func (c *DefaultApiService) UpdateServiceNotification(ChatServiceSid string, par path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AddedToConversationEnabled != nil { data.Set("AddedToConversation.Enabled", fmt.Sprint(*params.AddedToConversationEnabled)) } @@ -4103,6 +4035,7 @@ func (c *DefaultApiService) UpdateServiceNotification(ChatServiceSid string, par if params != nil && params.RemovedFromConversationTemplate != nil { data.Set("RemovedFromConversation.Template", *params.RemovedFromConversationTemplate) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -4137,13 +4070,12 @@ func (c *DefaultApiService) UpdateServiceRole(ChatServiceSid string, Sid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Permission != nil { for _, item := range *params.Permission { data.Add("Permission", item) } } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -4196,8 +4128,6 @@ func (c *DefaultApiService) UpdateServiceUser(ChatServiceSid string, Sid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -4207,7 +4137,7 @@ func (c *DefaultApiService) UpdateServiceUser(ChatServiceSid string, Sid string, if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -4262,8 +4192,6 @@ func (c *DefaultApiService) UpdateUser(Sid string, params *UpdateUserParams) (*C path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -4273,7 +4201,7 @@ func (c *DefaultApiService) UpdateUser(Sid string, params *UpdateUserParams) (*C if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } diff --git a/rest/events/v1/api_default.go b/rest/events/v1/api_default.go index b26de3c8d..52082a519 100644 --- a/rest/events/v1/api_default.go +++ b/rest/events/v1/api_default.go @@ -65,8 +65,6 @@ func (c *DefaultApiService) CreateSink(params *CreateSinkParams) (*EventsV1Sink, path := "/v1/Sinks" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Description != nil { data.Set("Description", *params.Description) } @@ -82,6 +80,7 @@ func (c *DefaultApiService) CreateSink(params *CreateSinkParams) (*EventsV1Sink, if params != nil && params.SinkType != nil { data.Set("SinkType", *params.SinkType) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -138,11 +137,10 @@ func (c *DefaultApiService) CreateSinkValidate(Sid string, params *CreateSinkVal path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.TestId != nil { data.Set("TestId", *params.TestId) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -182,14 +180,13 @@ func (c *DefaultApiService) CreateSubscribedEvent(SubscriptionSid string, params path = strings.Replace(path, "{"+"SubscriptionSid"+"}", SubscriptionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.SchemaVersion != nil { data.Set("SchemaVersion", fmt.Sprint(*params.SchemaVersion)) } if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -234,8 +231,6 @@ func (c *DefaultApiService) CreateSubscription(params *CreateSubscriptionParams) path := "/v1/Subscriptions" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Description != nil { data.Set("Description", *params.Description) } @@ -251,6 +246,7 @@ func (c *DefaultApiService) CreateSubscription(params *CreateSubscriptionParams) data.Set("Types", string(v)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -484,14 +480,13 @@ func (c *DefaultApiService) ListEventType(params *ListEventTypeParams) (*ListEve path := "/v1/Types" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.SchemaId != nil { data.Set("SchemaId", *params.SchemaId) } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -525,11 +520,10 @@ func (c *DefaultApiService) ListSchemaVersion(Id string, params *ListSchemaVersi path = strings.Replace(path, "{"+"Id"+"}", Id, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -574,8 +568,6 @@ func (c *DefaultApiService) ListSink(params *ListSinkParams) (*ListSinkResponse, path := "/v1/Sinks" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.InUse != nil { data.Set("InUse", fmt.Sprint(*params.InUse)) } @@ -585,6 +577,7 @@ func (c *DefaultApiService) ListSink(params *ListSinkParams) (*ListSinkResponse, if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -618,11 +611,10 @@ func (c *DefaultApiService) ListSubscribedEvent(SubscriptionSid string, params * path = strings.Replace(path, "{"+"SubscriptionSid"+"}", SubscriptionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -661,14 +653,13 @@ func (c *DefaultApiService) ListSubscription(params *ListSubscriptionParams) (*L path := "/v1/Subscriptions" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.SinkSid != nil { data.Set("SinkSid", *params.SinkSid) } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -702,11 +693,10 @@ func (c *DefaultApiService) UpdateSink(Sid string, params *UpdateSinkParams) (*E path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Description != nil { data.Set("Description", *params.Description) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -741,11 +731,10 @@ func (c *DefaultApiService) UpdateSubscribedEvent(SubscriptionSid string, Type s path = strings.Replace(path, "{"+"Type"+"}", Type, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.SchemaVersion != nil { data.Set("SchemaVersion", fmt.Sprint(*params.SchemaVersion)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -785,14 +774,13 @@ func (c *DefaultApiService) UpdateSubscription(Sid string, params *UpdateSubscri path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Description != nil { data.Set("Description", *params.Description) } if params != nil && params.SinkSid != nil { data.Set("SinkSid", *params.SinkSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/fax/v1/api_default.go b/rest/fax/v1/api_default.go index bb3567728..65b219a2a 100644 --- a/rest/fax/v1/api_default.go +++ b/rest/fax/v1/api_default.go @@ -102,8 +102,6 @@ func (c *DefaultApiService) CreateFax(params *CreateFaxParams) (*FaxV1Fax, error path := "/v1/Faxes" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.From != nil { data.Set("From", *params.From) } @@ -131,6 +129,7 @@ func (c *DefaultApiService) CreateFax(params *CreateFaxParams) (*FaxV1Fax, error if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -271,8 +270,6 @@ func (c *DefaultApiService) ListFax(params *ListFaxParams) (*ListFaxResponse, er path := "/v1/Faxes" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.From != nil { data.Set("From", *params.From) } @@ -288,6 +285,7 @@ func (c *DefaultApiService) ListFax(params *ListFaxParams) (*ListFaxResponse, er if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -321,11 +319,10 @@ func (c *DefaultApiService) ListFaxMedia(FaxSid string, params *ListFaxMediaPara path = strings.Replace(path, "{"+"FaxSid"+"}", FaxSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -359,11 +356,10 @@ func (c *DefaultApiService) UpdateFax(Sid string, params *UpdateFaxParams) (*Fax path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Status != nil { data.Set("Status", *params.Status) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/flex/v1/api_default.go b/rest/flex/v1/api_default.go index 945376c31..8dcb733c4 100644 --- a/rest/flex/v1/api_default.go +++ b/rest/flex/v1/api_default.go @@ -106,8 +106,6 @@ func (c *DefaultApiService) CreateChannel(params *CreateChannelParams) (*FlexV1C path := "/v1/Channels" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ChatFriendlyName != nil { data.Set("ChatFriendlyName", *params.ChatFriendlyName) } @@ -138,6 +136,7 @@ func (c *DefaultApiService) CreateChannel(params *CreateChannelParams) (*FlexV1C if params != nil && params.TaskSid != nil { data.Set("TaskSid", *params.TaskSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -265,8 +264,6 @@ func (c *DefaultApiService) CreateFlexFlow(params *CreateFlexFlowParams) (*FlexV path := "/v1/FlexFlows" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ChannelType != nil { data.Set("ChannelType", *params.ChannelType) } @@ -318,6 +315,7 @@ func (c *DefaultApiService) CreateFlexFlow(params *CreateFlexFlowParams) (*FlexV if params != nil && params.LongLived != nil { data.Set("LongLived", fmt.Sprint(*params.LongLived)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -379,8 +377,6 @@ func (c *DefaultApiService) CreateWebChannel(params *CreateWebChannelParams) (*F path := "/v1/WebChannels" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ChatFriendlyName != nil { data.Set("ChatFriendlyName", *params.ChatFriendlyName) } @@ -399,6 +395,7 @@ func (c *DefaultApiService) CreateWebChannel(params *CreateWebChannelParams) (*F if params != nil && params.PreEngagementData != nil { data.Set("PreEngagementData", *params.PreEngagementData) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -503,11 +500,10 @@ func (c *DefaultApiService) FetchConfiguration(params *FetchConfigurationParams) path := "/v1/Configuration" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.UiVersion != nil { data.Set("UiVersion", *params.UiVersion) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -583,11 +579,10 @@ func (c *DefaultApiService) ListChannel(params *ListChannelParams) (*ListChannel path := "/v1/Channels" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -625,14 +620,13 @@ func (c *DefaultApiService) ListFlexFlow(params *ListFlexFlowParams) (*ListFlexF path := "/v1/FlexFlows" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -664,11 +658,10 @@ func (c *DefaultApiService) ListWebChannel(params *ListWebChannelParams) (*ListW path := "/v1/WebChannels" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -818,8 +811,6 @@ func (c *DefaultApiService) UpdateFlexFlow(Sid string, params *UpdateFlexFlowPar path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ChannelType != nil { data.Set("ChannelType", *params.ChannelType) } @@ -871,6 +862,7 @@ func (c *DefaultApiService) UpdateFlexFlow(Sid string, params *UpdateFlexFlowPar if params != nil && params.LongLived != nil { data.Set("LongLived", fmt.Sprint(*params.LongLived)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -909,14 +901,13 @@ func (c *DefaultApiService) UpdateWebChannel(Sid string, params *UpdateWebChanne path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ChatStatus != nil { data.Set("ChatStatus", *params.ChatStatus) } if params != nil && params.PostEngagementData != nil { data.Set("PostEngagementData", *params.PostEngagementData) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/insights/v1/api_default.go b/rest/insights/v1/api_default.go index 012d4eddb..33d274987 100644 --- a/rest/insights/v1/api_default.go +++ b/rest/insights/v1/api_default.go @@ -76,11 +76,10 @@ func (c *DefaultApiService) FetchSummary(CallSid string, params *FetchSummaryPar path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ProcessingState != nil { data.Set("ProcessingState", *params.ProcessingState) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -166,14 +165,13 @@ func (c *DefaultApiService) ListEvent(CallSid string, params *ListEventParams) ( path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Edge != nil { data.Set("Edge", *params.Edge) } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -218,8 +216,6 @@ func (c *DefaultApiService) ListMetric(CallSid string, params *ListMetricParams) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Edge != nil { data.Set("Edge", *params.Edge) } @@ -229,6 +225,7 @@ func (c *DefaultApiService) ListMetric(CallSid string, params *ListMetricParams) if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -262,11 +259,10 @@ func (c *DefaultApiService) ListVideoParticipantSummary(RoomSid string, params * path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -329,8 +325,6 @@ func (c *DefaultApiService) ListVideoRoomSummary(params *ListVideoRoomSummaryPar path := "/v1/Video/Rooms" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.RoomType != nil { for _, item := range *params.RoomType { data.Add("RoomType", item) @@ -353,6 +347,7 @@ func (c *DefaultApiService) ListVideoRoomSummary(params *ListVideoRoomSummaryPar if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/ip_messaging/v1/api_default.go b/rest/ip_messaging/v1/api_default.go index 3eae9e0b5..f9e930f0c 100644 --- a/rest/ip_messaging/v1/api_default.go +++ b/rest/ip_messaging/v1/api_default.go @@ -71,8 +71,6 @@ func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChann path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -85,6 +83,7 @@ func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChann if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -152,8 +151,6 @@ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*I path := "/v1/Credentials" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ApiKey != nil { data.Set("ApiKey", *params.ApiKey) } @@ -175,6 +172,7 @@ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*I if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -214,14 +212,13 @@ func (c *DefaultApiService) CreateInvite(ServiceSid string, ChannelSid string, p path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) } if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -261,14 +258,13 @@ func (c *DefaultApiService) CreateMember(ServiceSid string, ChannelSid string, p path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) } if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -314,8 +310,6 @@ func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -325,6 +319,7 @@ func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, if params != nil && params.From != nil { data.Set("From", *params.From) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -369,8 +364,6 @@ func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRolePara path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } @@ -382,6 +375,7 @@ func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRolePara if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -413,11 +407,10 @@ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*IpMessa path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -468,8 +461,6 @@ func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserPara path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -482,6 +473,7 @@ func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserPara if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -850,8 +842,6 @@ func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelPa path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Type != nil { for _, item := range *params.Type { data.Add("Type", item) @@ -860,6 +850,7 @@ func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelPa if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -891,11 +882,10 @@ func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListC path := "/v1/Credentials" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -935,8 +925,6 @@ func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, par path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Identity != nil { for _, item := range *params.Identity { data.Add("Identity", item) @@ -945,6 +933,7 @@ func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, par if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -984,8 +973,6 @@ func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, par path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Identity != nil { for _, item := range *params.Identity { data.Add("Identity", item) @@ -994,6 +981,7 @@ func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, par if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1033,14 +1021,13 @@ func (c *DefaultApiService) ListMessage(ServiceSid string, ChannelSid string, pa path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Order != nil { data.Set("Order", *params.Order) } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1073,11 +1060,10 @@ func (c *DefaultApiService) ListRole(ServiceSid string, params *ListRoleParams) path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1109,11 +1095,10 @@ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListService path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1146,11 +1131,10 @@ func (c *DefaultApiService) ListUser(ServiceSid string, params *ListUserParams) path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1184,11 +1168,10 @@ func (c *DefaultApiService) ListUserChannel(ServiceSid string, UserSid string, p path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1234,8 +1217,6 @@ func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -1245,6 +1226,7 @@ func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1307,8 +1289,6 @@ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentia path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ApiKey != nil { data.Set("ApiKey", *params.ApiKey) } @@ -1327,6 +1307,7 @@ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentia if params != nil && params.Secret != nil { data.Set("Secret", *params.Secret) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1367,14 +1348,13 @@ func (c *DefaultApiService) UpdateMember(ServiceSid string, ChannelSid string, S path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.LastConsumedMessageIndex != nil { data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) } if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1415,14 +1395,13 @@ func (c *DefaultApiService) UpdateMessage(ServiceSid string, ChannelSid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } if params != nil && params.Body != nil { data.Set("Body", *params.Body) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1456,13 +1435,12 @@ func (c *DefaultApiService) UpdateRole(ServiceSid string, Sid string, params *Up path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Permission != nil { for _, item := range *params.Permission { data.Add("Permission", item) } } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1813,8 +1791,6 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ConsumptionReportInterval != nil { data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) } @@ -1979,6 +1955,7 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam if params != nil && params.WebhooksOnMessageUpdatedUrl != nil { data.Set("Webhooks.OnMessageUpdated.Url", *params.WebhooksOnMessageUpdatedUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2024,8 +2001,6 @@ func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *Up path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -2035,6 +2010,7 @@ func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *Up if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/ip_messaging/v2/api_default.go b/rest/ip_messaging/v2/api_default.go index 09ef98c76..a2cb24a59 100644 --- a/rest/ip_messaging/v2/api_default.go +++ b/rest/ip_messaging/v2/api_default.go @@ -96,8 +96,6 @@ func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChann path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -119,7 +117,7 @@ func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChann if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -192,8 +190,6 @@ func (c *DefaultApiService) CreateChannelWebhook(ServiceSid string, ChannelSid s path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ConfigurationFilters != nil { for _, item := range *params.ConfigurationFilters { data.Add("Configuration.Filters", item) @@ -219,6 +215,7 @@ func (c *DefaultApiService) CreateChannelWebhook(ServiceSid string, ChannelSid s if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -286,8 +283,6 @@ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*I path := "/v2/Credentials" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ApiKey != nil { data.Set("ApiKey", *params.ApiKey) } @@ -309,6 +304,7 @@ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*I if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -348,14 +344,13 @@ func (c *DefaultApiService) CreateInvite(ServiceSid string, ChannelSid string, p path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) } if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -431,8 +426,6 @@ func (c *DefaultApiService) CreateMember(ServiceSid string, ChannelSid string, p path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -454,7 +447,7 @@ func (c *DefaultApiService) CreateMember(ServiceSid string, ChannelSid string, p if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -533,8 +526,6 @@ func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -556,7 +547,7 @@ func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, if params != nil && params.MediaSid != nil { data.Set("MediaSid", *params.MediaSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -604,8 +595,6 @@ func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRolePara path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } @@ -617,6 +606,7 @@ func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRolePara if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -648,11 +638,10 @@ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*IpMessa path := "/v2/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -709,8 +698,6 @@ func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserPara path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -723,7 +710,7 @@ func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserPara if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -779,7 +766,6 @@ func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, params data := url.Values{} headers := make(map[string]interface{}) - if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -868,7 +854,6 @@ func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, S data := url.Values{} headers := make(map[string]interface{}) - if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -902,7 +887,6 @@ func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, data := url.Values{} headers := make(map[string]interface{}) - if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -1316,8 +1300,6 @@ func (c *DefaultApiService) ListBinding(ServiceSid string, params *ListBindingPa path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.BindingType != nil { for _, item := range *params.BindingType { data.Add("BindingType", item) @@ -1331,6 +1313,7 @@ func (c *DefaultApiService) ListBinding(ServiceSid string, params *ListBindingPa if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1369,8 +1352,6 @@ func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelPa path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Type != nil { for _, item := range *params.Type { data.Add("Type", item) @@ -1379,6 +1360,7 @@ func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelPa if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1412,11 +1394,10 @@ func (c *DefaultApiService) ListChannelWebhook(ServiceSid string, ChannelSid str path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1448,11 +1429,10 @@ func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListC path := "/v2/Credentials" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1492,8 +1472,6 @@ func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, par path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Identity != nil { for _, item := range *params.Identity { data.Add("Identity", item) @@ -1502,6 +1480,7 @@ func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, par if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1541,8 +1520,6 @@ func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, par path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Identity != nil { for _, item := range *params.Identity { data.Add("Identity", item) @@ -1551,6 +1528,7 @@ func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, par if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1590,14 +1568,13 @@ func (c *DefaultApiService) ListMessage(ServiceSid string, ChannelSid string, pa path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Order != nil { data.Set("Order", *params.Order) } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1630,11 +1607,10 @@ func (c *DefaultApiService) ListRole(ServiceSid string, params *ListRoleParams) path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1666,11 +1642,10 @@ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListService path := "/v2/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1703,11 +1678,10 @@ func (c *DefaultApiService) ListUser(ServiceSid string, params *ListUserParams) path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1747,8 +1721,6 @@ func (c *DefaultApiService) ListUserBinding(ServiceSid string, UserSid string, p path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.BindingType != nil { for _, item := range *params.BindingType { data.Add("BindingType", item) @@ -1757,6 +1729,7 @@ func (c *DefaultApiService) ListUserBinding(ServiceSid string, UserSid string, p if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1790,11 +1763,10 @@ func (c *DefaultApiService) ListUserChannel(ServiceSid string, UserSid string, p path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1864,8 +1836,6 @@ func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -1884,7 +1854,7 @@ func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -1952,8 +1922,6 @@ func (c *DefaultApiService) UpdateChannelWebhook(ServiceSid string, ChannelSid s path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ConfigurationFilters != nil { for _, item := range *params.ConfigurationFilters { data.Add("Configuration.Filters", item) @@ -1976,6 +1944,7 @@ func (c *DefaultApiService) UpdateChannelWebhook(ServiceSid string, ChannelSid s if params != nil && params.ConfigurationUrl != nil { data.Set("Configuration.Url", *params.ConfigurationUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2038,8 +2007,6 @@ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentia path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ApiKey != nil { data.Set("ApiKey", *params.ApiKey) } @@ -2058,6 +2025,7 @@ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentia if params != nil && params.Secret != nil { data.Set("Secret", *params.Secret) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2128,8 +2096,6 @@ func (c *DefaultApiService) UpdateMember(ServiceSid string, ChannelSid string, S path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -2148,7 +2114,7 @@ func (c *DefaultApiService) UpdateMember(ServiceSid string, ChannelSid string, S if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -2222,8 +2188,6 @@ func (c *DefaultApiService) UpdateMessage(ServiceSid string, ChannelSid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -2242,7 +2206,7 @@ func (c *DefaultApiService) UpdateMessage(ServiceSid string, ChannelSid string, if params != nil && params.LastUpdatedBy != nil { data.Set("LastUpdatedBy", *params.LastUpdatedBy) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -2279,13 +2243,12 @@ func (c *DefaultApiService) UpdateRole(ServiceSid string, Sid string, params *Up path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Permission != nil { for _, item := range *params.Permission { data.Add("Permission", item) } } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2498,8 +2461,6 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ConsumptionReportInterval != nil { data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) } @@ -2595,6 +2556,7 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam if params != nil && params.WebhookMethod != nil { data.Set("WebhookMethod", *params.WebhookMethod) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2646,8 +2608,6 @@ func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *Up path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -2657,7 +2617,7 @@ func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *Up if params != nil && params.RoleSid != nil { data.Set("RoleSid", *params.RoleSid) } - + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["X-Twilio-Webhook-Enabled"] = *params.XTwilioWebhookEnabled } @@ -2707,8 +2667,6 @@ func (c *DefaultApiService) UpdateUserChannel(ServiceSid string, UserSid string, path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.LastConsumedMessageIndex != nil { data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) } @@ -2718,6 +2676,7 @@ func (c *DefaultApiService) UpdateUserChannel(ServiceSid string, UserSid string, if params != nil && params.NotificationLevel != nil { data.Set("NotificationLevel", *params.NotificationLevel) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/lookups/v1/api_default.go b/rest/lookups/v1/api_default.go index d214cc383..03d58654a 100644 --- a/rest/lookups/v1/api_default.go +++ b/rest/lookups/v1/api_default.go @@ -70,8 +70,6 @@ func (c *DefaultApiService) FetchPhoneNumber(PhoneNumber string, params *FetchPh path = strings.Replace(path, "{"+"PhoneNumber"+"}", PhoneNumber, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CountryCode != nil { data.Set("CountryCode", *params.CountryCode) } @@ -94,6 +92,7 @@ func (c *DefaultApiService) FetchPhoneNumber(PhoneNumber string, params *FetchPh data.Set("AddOnsData", string(v)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/messaging/v1/api_default.go b/rest/messaging/v1/api_default.go index fa9fb725a..85513f0cd 100644 --- a/rest/messaging/v1/api_default.go +++ b/rest/messaging/v1/api_default.go @@ -53,11 +53,10 @@ func (c *DefaultApiService) CreateAlphaSender(ServiceSid string, params *CreateA path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AlphaSender != nil { data.Set("AlphaSender", *params.AlphaSender) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -95,14 +94,13 @@ func (c *DefaultApiService) CreateBrandRegistrations(params *CreateBrandRegistra path := "/v1/a2p/BrandRegistrations" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.A2pProfileBundleSid != nil { data.Set("A2pProfileBundleSid", *params.A2pProfileBundleSid) } if params != nil && params.CustomerProfileBundleSid != nil { data.Set("CustomerProfileBundleSid", *params.CustomerProfileBundleSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -140,14 +138,13 @@ func (c *DefaultApiService) CreateExternalCampaign(params *CreateExternalCampaig path := "/v1/Services/PreregisteredUsa2p" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CampaignId != nil { data.Set("CampaignId", *params.CampaignId) } if params != nil && params.MessagingServiceSid != nil { data.Set("MessagingServiceSid", *params.MessagingServiceSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -180,11 +177,10 @@ func (c *DefaultApiService) CreatePhoneNumber(ServiceSid string, params *CreateP path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PhoneNumberSid != nil { data.Set("PhoneNumberSid", *params.PhoneNumberSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -300,8 +296,6 @@ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*Messagi path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AreaCodeGeomatch != nil { data.Set("AreaCodeGeomatch", fmt.Sprint(*params.AreaCodeGeomatch)) } @@ -347,6 +341,7 @@ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*Messagi if params != nil && params.ValidityPeriod != nil { data.Set("ValidityPeriod", fmt.Sprint(*params.ValidityPeriod)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -379,11 +374,10 @@ func (c *DefaultApiService) CreateShortCode(ServiceSid string, params *CreateSho path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ShortCodeSid != nil { data.Set("ShortCodeSid", *params.ShortCodeSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -446,8 +440,6 @@ func (c *DefaultApiService) CreateUsAppToPerson(MessagingServiceSid string, para path = strings.Replace(path, "{"+"MessagingServiceSid"+"}", MessagingServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.BrandRegistrationSid != nil { data.Set("BrandRegistrationSid", *params.BrandRegistrationSid) } @@ -468,6 +460,7 @@ func (c *DefaultApiService) CreateUsAppToPerson(MessagingServiceSid string, para if params != nil && params.UsAppToPersonUsecase != nil { data.Set("UsAppToPersonUsecase", *params.UsAppToPersonUsecase) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -634,11 +627,10 @@ func (c *DefaultApiService) FetchDeactivation(params *FetchDeactivationParams) e path := "/v1/Deactivations" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Date != nil { data.Set("Date", fmt.Sprint(*params.Date)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -800,11 +792,10 @@ func (c *DefaultApiService) ListAlphaSender(ServiceSid string, params *ListAlpha path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -836,11 +827,10 @@ func (c *DefaultApiService) ListBrandRegistrations(params *ListBrandRegistration path := "/v1/a2p/BrandRegistrations" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -873,11 +863,10 @@ func (c *DefaultApiService) ListPhoneNumber(ServiceSid string, params *ListPhone path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -909,11 +898,10 @@ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListService path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -946,11 +934,10 @@ func (c *DefaultApiService) ListShortCode(ServiceSid string, params *ListShortCo path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -983,11 +970,10 @@ func (c *DefaultApiService) ListUsAppToPerson(MessagingServiceSid string, params path = strings.Replace(path, "{"+"MessagingServiceSid"+"}", MessagingServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1104,8 +1090,6 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AreaCodeGeomatch != nil { data.Set("AreaCodeGeomatch", fmt.Sprint(*params.AreaCodeGeomatch)) } @@ -1151,6 +1135,7 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam if params != nil && params.ValidityPeriod != nil { data.Set("ValidityPeriod", fmt.Sprint(*params.ValidityPeriod)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/monitor/v1/api_default.go b/rest/monitor/v1/api_default.go index ec78c1872..4bfed57e9 100644 --- a/rest/monitor/v1/api_default.go +++ b/rest/monitor/v1/api_default.go @@ -115,8 +115,6 @@ func (c *DefaultApiService) ListAlert(params *ListAlertParams) (*ListAlertRespon path := "/v1/Alerts" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.LogLevel != nil { data.Set("LogLevel", *params.LogLevel) } @@ -129,6 +127,7 @@ func (c *DefaultApiService) ListAlert(params *ListAlertParams) (*ListAlertRespon if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -197,8 +196,6 @@ func (c *DefaultApiService) ListEvent(params *ListEventParams) (*ListEventRespon path := "/v1/Events" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ActorSid != nil { data.Set("ActorSid", *params.ActorSid) } @@ -220,6 +217,7 @@ func (c *DefaultApiService) ListEvent(params *ListEventParams) (*ListEventRespon if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/notify/v1/api_default.go b/rest/notify/v1/api_default.go index f29f0506c..9253650d3 100644 --- a/rest/notify/v1/api_default.go +++ b/rest/notify/v1/api_default.go @@ -89,8 +89,6 @@ func (c *DefaultApiService) CreateBinding(ServiceSid string, params *CreateBindi path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Address != nil { data.Set("Address", *params.Address) } @@ -114,6 +112,7 @@ func (c *DefaultApiService) CreateBinding(ServiceSid string, params *CreateBindi data.Add("Tag", item) } } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -181,8 +180,6 @@ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*N path := "/v1/Credentials" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ApiKey != nil { data.Set("ApiKey", *params.ApiKey) } @@ -204,6 +201,7 @@ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*N if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -338,8 +336,6 @@ func (c *DefaultApiService) CreateNotification(ServiceSid string, params *Create path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Action != nil { data.Set("Action", *params.Action) } @@ -444,6 +440,7 @@ func (c *DefaultApiService) CreateNotification(ServiceSid string, params *Create if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -553,8 +550,6 @@ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*NotifyV path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AlexaSkillId != nil { data.Set("AlexaSkillId", *params.AlexaSkillId) } @@ -597,6 +592,7 @@ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*NotifyV if params != nil && params.MessagingServiceSid != nil { data.Set("MessagingServiceSid", *params.MessagingServiceSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -772,8 +768,6 @@ func (c *DefaultApiService) ListBinding(ServiceSid string, params *ListBindingPa path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.StartDate != nil { data.Set("StartDate", fmt.Sprint(*params.StartDate)) } @@ -793,6 +787,7 @@ func (c *DefaultApiService) ListBinding(ServiceSid string, params *ListBindingPa if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -824,11 +819,10 @@ func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListC path := "/v1/Credentials" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -866,14 +860,13 @@ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListService path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -936,8 +929,6 @@ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentia path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ApiKey != nil { data.Set("ApiKey", *params.ApiKey) } @@ -956,6 +947,7 @@ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentia if params != nil && params.Secret != nil { data.Set("Secret", *params.Secret) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1066,8 +1058,6 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AlexaSkillId != nil { data.Set("AlexaSkillId", *params.AlexaSkillId) } @@ -1110,6 +1100,7 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam if params != nil && params.MessagingServiceSid != nil { data.Set("MessagingServiceSid", *params.MessagingServiceSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/numbers/v2/api_default.go b/rest/numbers/v2/api_default.go index 05c7f9c96..0ae937731 100644 --- a/rest/numbers/v2/api_default.go +++ b/rest/numbers/v2/api_default.go @@ -89,8 +89,6 @@ func (c *DefaultApiService) CreateBundle(params *CreateBundleParams) (*NumbersV2 path := "/v2/RegulatoryCompliance/Bundles" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Email != nil { data.Set("Email", *params.Email) } @@ -112,6 +110,7 @@ func (c *DefaultApiService) CreateBundle(params *CreateBundleParams) (*NumbersV2 if params != nil && params.StatusCallback != nil { data.Set("StatusCallback", *params.StatusCallback) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -156,8 +155,6 @@ func (c *DefaultApiService) CreateEndUser(params *CreateEndUserParams) (*Numbers path := "/v2/RegulatoryCompliance/EndUsers" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { v, err := json.Marshal(params.Attributes) @@ -173,6 +170,7 @@ func (c *DefaultApiService) CreateEndUser(params *CreateEndUserParams) (*Numbers if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -229,11 +227,10 @@ func (c *DefaultApiService) CreateItemAssignment(BundleSid string, params *Creat path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ObjectSid != nil { data.Set("ObjectSid", *params.ObjectSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -278,8 +275,6 @@ func (c *DefaultApiService) CreateSupportingDocument(params *CreateSupportingDoc path := "/v2/RegulatoryCompliance/SupportingDocuments" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { v, err := json.Marshal(params.Attributes) @@ -295,6 +290,7 @@ func (c *DefaultApiService) CreateSupportingDocument(params *CreateSupportingDoc if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -616,8 +612,6 @@ func (c *DefaultApiService) ListBundle(params *ListBundleParams) (*ListBundleRes path := "/v2/RegulatoryCompliance/Bundles" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Status != nil { data.Set("Status", *params.Status) } @@ -636,6 +630,7 @@ func (c *DefaultApiService) ListBundle(params *ListBundleParams) (*ListBundleRes if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -668,11 +663,10 @@ func (c *DefaultApiService) ListEndUser(params *ListEndUserParams) (*ListEndUser path := "/v2/RegulatoryCompliance/EndUsers" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -705,11 +699,10 @@ func (c *DefaultApiService) ListEndUserType(params *ListEndUserTypeParams) (*Lis path := "/v2/RegulatoryCompliance/EndUserTypes" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -743,11 +736,10 @@ func (c *DefaultApiService) ListEvaluation(BundleSid string, params *ListEvaluat path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -781,11 +773,10 @@ func (c *DefaultApiService) ListItemAssignment(BundleSid string, params *ListIte path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -836,8 +827,6 @@ func (c *DefaultApiService) ListRegulation(params *ListRegulationParams) (*ListR path := "/v2/RegulatoryCompliance/Regulations" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.EndUserType != nil { data.Set("EndUserType", *params.EndUserType) } @@ -850,6 +839,7 @@ func (c *DefaultApiService) ListRegulation(params *ListRegulationParams) (*ListR if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -882,11 +872,10 @@ func (c *DefaultApiService) ListSupportingDocument(params *ListSupportingDocumen path := "/v2/RegulatoryCompliance/SupportingDocuments" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -919,11 +908,10 @@ func (c *DefaultApiService) ListSupportingDocumentType(params *ListSupportingDoc path := "/v2/RegulatoryCompliance/SupportingDocumentTypes" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -975,8 +963,6 @@ func (c *DefaultApiService) UpdateBundle(Sid string, params *UpdateBundleParams) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Email != nil { data.Set("Email", *params.Email) } @@ -989,6 +975,7 @@ func (c *DefaultApiService) UpdateBundle(Sid string, params *UpdateBundleParams) if params != nil && params.StatusCallback != nil { data.Set("StatusCallback", *params.StatusCallback) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1028,8 +1015,6 @@ func (c *DefaultApiService) UpdateEndUser(Sid string, params *UpdateEndUserParam path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { v, err := json.Marshal(params.Attributes) @@ -1042,6 +1027,7 @@ func (c *DefaultApiService) UpdateEndUser(Sid string, params *UpdateEndUserParam if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1081,8 +1067,6 @@ func (c *DefaultApiService) UpdateSupportingDocument(Sid string, params *UpdateS path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { v, err := json.Marshal(params.Attributes) @@ -1095,6 +1079,7 @@ func (c *DefaultApiService) UpdateSupportingDocument(Sid string, params *UpdateS if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/pricing/v1/api_default.go b/rest/pricing/v1/api_default.go index 7e7ccb79e..1e2831e23 100644 --- a/rest/pricing/v1/api_default.go +++ b/rest/pricing/v1/api_default.go @@ -140,11 +140,10 @@ func (c *DefaultApiService) ListMessagingCountry(params *ListMessagingCountryPar path := "/v1/Messaging/Countries" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -176,11 +175,10 @@ func (c *DefaultApiService) ListPhoneNumberCountry(params *ListPhoneNumberCountr path := "/v1/PhoneNumbers/Countries" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -212,11 +210,10 @@ func (c *DefaultApiService) ListVoiceCountry(params *ListVoiceCountryParams) (*L path := "/v1/Voice/Countries" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/pricing/v2/api_default.go b/rest/pricing/v2/api_default.go index 9666a94d4..f7882748a 100644 --- a/rest/pricing/v2/api_default.go +++ b/rest/pricing/v2/api_default.go @@ -77,11 +77,10 @@ func (c *DefaultApiService) FetchVoiceNumber(DestinationNumber string, params *F path = strings.Replace(path, "{"+"DestinationNumber"+"}", DestinationNumber, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.OriginationNumber != nil { data.Set("OriginationNumber", *params.OriginationNumber) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -113,11 +112,10 @@ func (c *DefaultApiService) ListVoiceCountry(params *ListVoiceCountryParams) (*L path := "/v2/Voice/Countries" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/proxy/v1/api_default.go b/rest/proxy/v1/api_default.go index e6b75386f..44f50dd83 100644 --- a/rest/proxy/v1/api_default.go +++ b/rest/proxy/v1/api_default.go @@ -63,8 +63,6 @@ func (c *DefaultApiService) CreateMessageInteraction(ServiceSid string, SessionS path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Body != nil { data.Set("Body", *params.Body) } @@ -73,6 +71,7 @@ func (c *DefaultApiService) CreateMessageInteraction(ServiceSid string, SessionS data.Add("MediaUrl", item) } } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -131,8 +130,6 @@ func (c *DefaultApiService) CreateParticipant(ServiceSid string, SessionSid stri path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FailOnParticipantConflict != nil { data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict)) } @@ -148,6 +145,7 @@ func (c *DefaultApiService) CreateParticipant(ServiceSid string, SessionSid stri if params != nil && params.ProxyIdentifierSid != nil { data.Set("ProxyIdentifierSid", *params.ProxyIdentifierSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -193,8 +191,6 @@ func (c *DefaultApiService) CreatePhoneNumber(ServiceSid string, params *CreateP path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.IsReserved != nil { data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) } @@ -204,6 +200,7 @@ func (c *DefaultApiService) CreatePhoneNumber(ServiceSid string, params *CreateP if params != nil && params.Sid != nil { data.Set("Sid", *params.Sid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -278,8 +275,6 @@ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ProxyV1 path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CallbackUrl != nil { data.Set("CallbackUrl", *params.CallbackUrl) } @@ -304,6 +299,7 @@ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ProxyV1 if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -373,8 +369,6 @@ func (c *DefaultApiService) CreateSession(ServiceSid string, params *CreateSessi path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.DateExpiry != nil { data.Set("DateExpiry", fmt.Sprint((*params.DateExpiry).Format(time.RFC3339))) } @@ -402,6 +396,7 @@ func (c *DefaultApiService) CreateSession(ServiceSid string, params *CreateSessi if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -435,11 +430,10 @@ func (c *DefaultApiService) CreateShortCode(ServiceSid string, params *CreateSho path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Sid != nil { data.Set("Sid", *params.Sid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -759,11 +753,10 @@ func (c *DefaultApiService) ListInteraction(ServiceSid string, SessionSid string path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -798,11 +791,10 @@ func (c *DefaultApiService) ListMessageInteraction(ServiceSid string, SessionSid path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -837,11 +829,10 @@ func (c *DefaultApiService) ListParticipant(ServiceSid string, SessionSid string path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -875,11 +866,10 @@ func (c *DefaultApiService) ListPhoneNumber(ServiceSid string, params *ListPhone path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -912,11 +902,10 @@ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListService path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -950,11 +939,10 @@ func (c *DefaultApiService) ListSession(ServiceSid string, params *ListSessionPa path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -988,11 +976,10 @@ func (c *DefaultApiService) ListShortCode(ServiceSid string, params *ListShortCo path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1027,11 +1014,10 @@ func (c *DefaultApiService) UpdatePhoneNumber(ServiceSid string, Sid string, par path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.IsReserved != nil { data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1107,8 +1093,6 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CallbackUrl != nil { data.Set("CallbackUrl", *params.CallbackUrl) } @@ -1133,6 +1117,7 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1185,8 +1170,6 @@ func (c *DefaultApiService) UpdateSession(ServiceSid string, Sid string, params path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.DateExpiry != nil { data.Set("DateExpiry", fmt.Sprint((*params.DateExpiry).Format(time.RFC3339))) } @@ -1199,6 +1182,7 @@ func (c *DefaultApiService) UpdateSession(ServiceSid string, Sid string, params if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1233,11 +1217,10 @@ func (c *DefaultApiService) UpdateShortCode(ServiceSid string, Sid string, param path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.IsReserved != nil { data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/serverless/v1/api_default.go b/rest/serverless/v1/api_default.go index 593177b57..26b80bae7 100644 --- a/rest/serverless/v1/api_default.go +++ b/rest/serverless/v1/api_default.go @@ -55,11 +55,10 @@ func (c *DefaultApiService) CreateAsset(ServiceSid string, params *CreateAssetPa path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -111,8 +110,6 @@ func (c *DefaultApiService) CreateBuild(ServiceSid string, params *CreateBuildPa path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AssetVersions != nil { for _, item := range *params.AssetVersions { data.Add("AssetVersions", item) @@ -129,6 +126,7 @@ func (c *DefaultApiService) CreateBuild(ServiceSid string, params *CreateBuildPa if params != nil && params.Runtime != nil { data.Set("Runtime", *params.Runtime) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -163,11 +161,10 @@ func (c *DefaultApiService) CreateDeployment(ServiceSid string, EnvironmentSid s path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.BuildSid != nil { data.Set("BuildSid", *params.BuildSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -207,14 +204,13 @@ func (c *DefaultApiService) CreateEnvironment(ServiceSid string, params *CreateE path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.DomainSuffix != nil { data.Set("DomainSuffix", *params.DomainSuffix) } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -248,11 +244,10 @@ func (c *DefaultApiService) CreateFunction(ServiceSid string, params *CreateFunc path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -303,8 +298,6 @@ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*Serverl path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } @@ -317,6 +310,7 @@ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*Serverl if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -357,14 +351,13 @@ func (c *DefaultApiService) CreateVariable(ServiceSid string, EnvironmentSid str path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Key != nil { data.Set("Key", *params.Key) } if params != nil && params.Value != nil { data.Set("Value", *params.Value) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -805,11 +798,10 @@ func (c *DefaultApiService) ListAsset(ServiceSid string, params *ListAssetParams path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -844,11 +836,10 @@ func (c *DefaultApiService) ListAssetVersion(ServiceSid string, AssetSid string, path = strings.Replace(path, "{"+"AssetSid"+"}", AssetSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -882,11 +873,10 @@ func (c *DefaultApiService) ListBuild(ServiceSid string, params *ListBuildParams path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -921,11 +911,10 @@ func (c *DefaultApiService) ListDeployment(ServiceSid string, EnvironmentSid str path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -959,11 +948,10 @@ func (c *DefaultApiService) ListEnvironment(ServiceSid string, params *ListEnvir path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -997,11 +985,10 @@ func (c *DefaultApiService) ListFunction(ServiceSid string, params *ListFunction path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1036,11 +1023,10 @@ func (c *DefaultApiService) ListFunctionVersion(ServiceSid string, FunctionSid s path = strings.Replace(path, "{"+"FunctionSid"+"}", FunctionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1093,8 +1079,6 @@ func (c *DefaultApiService) ListLog(ServiceSid string, EnvironmentSid string, pa path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FunctionSid != nil { data.Set("FunctionSid", *params.FunctionSid) } @@ -1107,6 +1091,7 @@ func (c *DefaultApiService) ListLog(ServiceSid string, EnvironmentSid string, pa if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1139,11 +1124,10 @@ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListService path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1178,11 +1162,10 @@ func (c *DefaultApiService) ListVariable(ServiceSid string, EnvironmentSid strin path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1217,11 +1200,10 @@ func (c *DefaultApiService) UpdateAsset(ServiceSid string, Sid string, params *U path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1256,11 +1238,10 @@ func (c *DefaultApiService) UpdateFunction(ServiceSid string, Sid string, params path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1306,8 +1287,6 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } @@ -1317,6 +1296,7 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam if params != nil && params.UiEditable != nil { data.Set("UiEditable", fmt.Sprint(*params.UiEditable)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1358,14 +1338,13 @@ func (c *DefaultApiService) UpdateVariable(ServiceSid string, EnvironmentSid str path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Key != nil { data.Set("Key", *params.Key) } if params != nil && params.Value != nil { data.Set("Value", *params.Value) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/studio/v1/api_default.go b/rest/studio/v1/api_default.go index 3b8580651..8fe0ecb27 100644 --- a/rest/studio/v1/api_default.go +++ b/rest/studio/v1/api_default.go @@ -67,8 +67,6 @@ func (c *DefaultApiService) CreateEngagement(FlowSid string, params *CreateEngag path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.From != nil { data.Set("From", *params.From) } @@ -84,6 +82,7 @@ func (c *DefaultApiService) CreateEngagement(FlowSid string, params *CreateEngag if params != nil && params.To != nil { data.Set("To", *params.To) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -129,8 +128,6 @@ func (c *DefaultApiService) CreateExecution(FlowSid string, params *CreateExecut path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.From != nil { data.Set("From", *params.From) } @@ -146,6 +143,7 @@ func (c *DefaultApiService) CreateExecution(FlowSid string, params *CreateExecut if params != nil && params.To != nil { data.Set("To", *params.To) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -454,11 +452,10 @@ func (c *DefaultApiService) ListEngagement(FlowSid string, params *ListEngagemen path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -504,8 +501,6 @@ func (c *DefaultApiService) ListExecution(FlowSid string, params *ListExecutionP path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.DateCreatedFrom != nil { data.Set("DateCreatedFrom", fmt.Sprint((*params.DateCreatedFrom).Format(time.RFC3339))) } @@ -515,6 +510,7 @@ func (c *DefaultApiService) ListExecution(FlowSid string, params *ListExecutionP if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -549,11 +545,10 @@ func (c *DefaultApiService) ListExecutionStep(FlowSid string, ExecutionSid strin path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -586,11 +581,10 @@ func (c *DefaultApiService) ListFlow(params *ListFlowParams) (*ListFlowResponse, path := "/v1/Flows" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -625,11 +619,10 @@ func (c *DefaultApiService) ListStep(FlowSid string, EngagementSid string, param path = strings.Replace(path, "{"+"EngagementSid"+"}", EngagementSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -664,11 +657,10 @@ func (c *DefaultApiService) UpdateExecution(FlowSid string, Sid string, params * path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Status != nil { data.Set("Status", *params.Status) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/studio/v2/api_default.go b/rest/studio/v2/api_default.go index 3e75ad032..5928b9f1e 100644 --- a/rest/studio/v2/api_default.go +++ b/rest/studio/v2/api_default.go @@ -67,8 +67,6 @@ func (c *DefaultApiService) CreateExecution(FlowSid string, params *CreateExecut path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.From != nil { data.Set("From", *params.From) } @@ -84,6 +82,7 @@ func (c *DefaultApiService) CreateExecution(FlowSid string, params *CreateExecut if params != nil && params.To != nil { data.Set("To", *params.To) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -134,8 +133,6 @@ func (c *DefaultApiService) CreateFlow(params *CreateFlowParams) (*StudioV2Flow, path := "/v2/Flows" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CommitMessage != nil { data.Set("CommitMessage", *params.CommitMessage) } @@ -154,6 +151,7 @@ func (c *DefaultApiService) CreateFlow(params *CreateFlowParams) (*StudioV2Flow, if params != nil && params.Status != nil { data.Set("Status", *params.Status) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -404,8 +402,6 @@ func (c *DefaultApiService) ListExecution(FlowSid string, params *ListExecutionP path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.DateCreatedFrom != nil { data.Set("DateCreatedFrom", fmt.Sprint((*params.DateCreatedFrom).Format(time.RFC3339))) } @@ -415,6 +411,7 @@ func (c *DefaultApiService) ListExecution(FlowSid string, params *ListExecutionP if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -449,11 +446,10 @@ func (c *DefaultApiService) ListExecutionStep(FlowSid string, ExecutionSid strin path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -486,11 +482,10 @@ func (c *DefaultApiService) ListFlow(params *ListFlowParams) (*ListFlowResponse, path := "/v2/Flows" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -524,11 +519,10 @@ func (c *DefaultApiService) ListFlowRevision(Sid string, params *ListFlowRevisio path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -563,11 +557,10 @@ func (c *DefaultApiService) UpdateExecution(FlowSid string, Sid string, params * path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Status != nil { data.Set("Status", *params.Status) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -619,8 +612,6 @@ func (c *DefaultApiService) UpdateFlow(Sid string, params *UpdateFlowParams) (*S path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CommitMessage != nil { data.Set("CommitMessage", *params.CommitMessage) } @@ -639,6 +630,7 @@ func (c *DefaultApiService) UpdateFlow(Sid string, params *UpdateFlowParams) (*S if params != nil && params.Status != nil { data.Set("Status", *params.Status) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -689,8 +681,6 @@ func (c *DefaultApiService) UpdateFlowValidate(params *UpdateFlowValidateParams) path := "/v2/Flows/Validate" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CommitMessage != nil { data.Set("CommitMessage", *params.CommitMessage) } @@ -709,6 +699,7 @@ func (c *DefaultApiService) UpdateFlowValidate(params *UpdateFlowValidateParams) if params != nil && params.Status != nil { data.Set("Status", *params.Status) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -742,13 +733,12 @@ func (c *DefaultApiService) UpdateTestUser(Sid string, params *UpdateTestUserPar path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.TestUsers != nil { for _, item := range *params.TestUsers { data.Add("TestUsers", item) } } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/supersim/v1/api_default.go b/rest/supersim/v1/api_default.go index d091a416a..30067bf1d 100644 --- a/rest/supersim/v1/api_default.go +++ b/rest/supersim/v1/api_default.go @@ -72,8 +72,6 @@ func (c *DefaultApiService) CreateCommand(params *CreateCommandParams) (*Supersi path := "/v1/Commands" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CallbackMethod != nil { data.Set("CallbackMethod", *params.CallbackMethod) } @@ -86,6 +84,7 @@ func (c *DefaultApiService) CreateCommand(params *CreateCommandParams) (*Supersi if params != nil && params.Sim != nil { data.Set("Sim", *params.Sim) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -172,8 +171,6 @@ func (c *DefaultApiService) CreateFleet(params *CreateFleetParams) (*SupersimV1F path := "/v1/Fleets" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CommandsEnabled != nil { data.Set("CommandsEnabled", fmt.Sprint(*params.CommandsEnabled)) } @@ -204,6 +201,7 @@ func (c *DefaultApiService) CreateFleet(params *CreateFleetParams) (*SupersimV1F if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -242,8 +240,6 @@ func (c *DefaultApiService) CreateNetworkAccessProfile(params *CreateNetworkAcce path := "/v1/NetworkAccessProfiles" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Networks != nil { for _, item := range *params.Networks { data.Add("Networks", item) @@ -252,6 +248,7 @@ func (c *DefaultApiService) CreateNetworkAccessProfile(params *CreateNetworkAcce if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -285,11 +282,10 @@ func (c *DefaultApiService) CreateNetworkAccessProfileNetwork(NetworkAccessProfi path = strings.Replace(path, "{"+"NetworkAccessProfileSid"+"}", NetworkAccessProfileSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Network != nil { data.Set("Network", *params.Network) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -328,14 +324,13 @@ func (c *DefaultApiService) CreateSim(params *CreateSimParams) (*SupersimV1Sim, path := "/v1/Sims" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Iccid != nil { data.Set("Iccid", *params.Iccid) } if params != nil && params.RegistrationCode != nil { data.Set("RegistrationCode", *params.RegistrationCode) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -386,8 +381,6 @@ func (c *DefaultApiService) CreateSmsCommand(params *CreateSmsCommandParams) (*S path := "/v1/SmsCommands" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CallbackMethod != nil { data.Set("CallbackMethod", *params.CallbackMethod) } @@ -400,6 +393,7 @@ func (c *DefaultApiService) CreateSmsCommand(params *CreateSmsCommandParams) (*S if params != nil && params.Sim != nil { data.Set("Sim", *params.Sim) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -631,8 +625,6 @@ func (c *DefaultApiService) ListCommand(params *ListCommandParams) (*ListCommand path := "/v1/Commands" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Sim != nil { data.Set("Sim", *params.Sim) } @@ -645,6 +637,7 @@ func (c *DefaultApiService) ListCommand(params *ListCommandParams) (*ListCommand if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -683,14 +676,13 @@ func (c *DefaultApiService) ListFleet(params *ListFleetParams) (*ListFleetRespon path := "/v1/Fleets" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.NetworkAccessProfile != nil { data.Set("NetworkAccessProfile", *params.NetworkAccessProfile) } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -741,8 +733,6 @@ func (c *DefaultApiService) ListNetwork(params *ListNetworkParams) (*ListNetwork path := "/v1/Networks" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.IsoCountry != nil { data.Set("IsoCountry", *params.IsoCountry) } @@ -755,6 +745,7 @@ func (c *DefaultApiService) ListNetwork(params *ListNetworkParams) (*ListNetwork if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -787,11 +778,10 @@ func (c *DefaultApiService) ListNetworkAccessProfile(params *ListNetworkAccessPr path := "/v1/NetworkAccessProfiles" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -825,11 +815,10 @@ func (c *DefaultApiService) ListNetworkAccessProfileNetwork(NetworkAccessProfile path = strings.Replace(path, "{"+"NetworkAccessProfileSid"+"}", NetworkAccessProfileSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -880,8 +869,6 @@ func (c *DefaultApiService) ListSim(params *ListSimParams) (*ListSimResponse, er path := "/v1/Sims" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Status != nil { data.Set("Status", *params.Status) } @@ -894,6 +881,7 @@ func (c *DefaultApiService) ListSim(params *ListSimParams) (*ListSimResponse, er if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -944,8 +932,6 @@ func (c *DefaultApiService) ListSmsCommand(params *ListSmsCommandParams) (*ListS path := "/v1/SmsCommands" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Sim != nil { data.Set("Sim", *params.Sim) } @@ -958,6 +944,7 @@ func (c *DefaultApiService) ListSmsCommand(params *ListSmsCommandParams) (*ListS if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1038,8 +1025,6 @@ func (c *DefaultApiService) ListUsageRecord(params *ListUsageRecordParams) (*Lis path := "/v1/UsageRecords" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Sim != nil { data.Set("Sim", *params.Sim) } @@ -1067,6 +1052,7 @@ func (c *DefaultApiService) ListUsageRecord(params *ListUsageRecordParams) (*Lis if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1130,8 +1116,6 @@ func (c *DefaultApiService) UpdateFleet(Sid string, params *UpdateFleetParams) ( path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CommandsMethod != nil { data.Set("CommandsMethod", *params.CommandsMethod) } @@ -1150,6 +1134,7 @@ func (c *DefaultApiService) UpdateFleet(Sid string, params *UpdateFleetParams) ( if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1183,11 +1168,10 @@ func (c *DefaultApiService) UpdateNetworkAccessProfile(Sid string, params *Updat path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1251,8 +1235,6 @@ func (c *DefaultApiService) UpdateSim(Sid string, params *UpdateSimParams) (*Sup path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AccountSid != nil { data.Set("AccountSid", *params.AccountSid) } @@ -1271,6 +1253,7 @@ func (c *DefaultApiService) UpdateSim(Sid string, params *UpdateSimParams) (*Sup if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/sync/v1/api_default.go b/rest/sync/v1/api_default.go index b138d6824..58ca76702 100644 --- a/rest/sync/v1/api_default.go +++ b/rest/sync/v1/api_default.go @@ -65,8 +65,6 @@ func (c *DefaultApiService) CreateDocument(ServiceSid string, params *CreateDocu path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Data != nil { v, err := json.Marshal(params.Data) @@ -82,6 +80,7 @@ func (c *DefaultApiService) CreateDocument(ServiceSid string, params *CreateDocu if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -149,8 +148,6 @@ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*SyncV1S path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AclEnabled != nil { data.Set("AclEnabled", fmt.Sprint(*params.AclEnabled)) } @@ -172,6 +169,7 @@ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*SyncV1S if params != nil && params.WebhooksFromRestEnabled != nil { data.Set("WebhooksFromRestEnabled", fmt.Sprint(*params.WebhooksFromRestEnabled)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -206,8 +204,6 @@ func (c *DefaultApiService) CreateStreamMessage(ServiceSid string, StreamSid str path = strings.Replace(path, "{"+"StreamSid"+"}", StreamSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Data != nil { v, err := json.Marshal(params.Data) @@ -217,6 +213,7 @@ func (c *DefaultApiService) CreateStreamMessage(ServiceSid string, StreamSid str data.Set("Data", string(v)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -261,8 +258,6 @@ func (c *DefaultApiService) CreateSyncList(ServiceSid string, params *CreateSync path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CollectionTtl != nil { data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) } @@ -272,6 +267,7 @@ func (c *DefaultApiService) CreateSyncList(ServiceSid string, params *CreateSync if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -323,8 +319,6 @@ func (c *DefaultApiService) CreateSyncListItem(ServiceSid string, ListSid string path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CollectionTtl != nil { data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) } @@ -343,6 +337,7 @@ func (c *DefaultApiService) CreateSyncListItem(ServiceSid string, ListSid string if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -387,8 +382,6 @@ func (c *DefaultApiService) CreateSyncMap(ServiceSid string, params *CreateSyncM path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CollectionTtl != nil { data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) } @@ -398,6 +391,7 @@ func (c *DefaultApiService) CreateSyncMap(ServiceSid string, params *CreateSyncM if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -455,8 +449,6 @@ func (c *DefaultApiService) CreateSyncMapItem(ServiceSid string, MapSid string, path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CollectionTtl != nil { data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) } @@ -478,6 +470,7 @@ func (c *DefaultApiService) CreateSyncMapItem(ServiceSid string, MapSid string, if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -517,14 +510,13 @@ func (c *DefaultApiService) CreateSyncStream(ServiceSid string, params *CreateSy path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -633,7 +625,6 @@ func (c *DefaultApiService) DeleteSyncListItem(ServiceSid string, ListSid string data := url.Values{} headers := make(map[string]interface{}) - if params != nil && params.IfMatch != nil { headers["If-Match"] = *params.IfMatch } @@ -705,7 +696,6 @@ func (c *DefaultApiService) DeleteSyncMapItem(ServiceSid string, MapSid string, data := url.Values{} headers := make(map[string]interface{}) - if params != nil && params.IfMatch != nil { headers["If-Match"] = *params.IfMatch } @@ -1013,11 +1003,10 @@ func (c *DefaultApiService) ListDocument(ServiceSid string, params *ListDocument path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1052,11 +1041,10 @@ func (c *DefaultApiService) ListDocumentPermission(ServiceSid string, DocumentSi path = strings.Replace(path, "{"+"DocumentSid"+"}", DocumentSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1088,11 +1076,10 @@ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListService path := "/v1/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1125,11 +1112,10 @@ func (c *DefaultApiService) ListSyncList(ServiceSid string, params *ListSyncList path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1181,8 +1167,6 @@ func (c *DefaultApiService) ListSyncListItem(ServiceSid string, ListSid string, path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Order != nil { data.Set("Order", *params.Order) } @@ -1195,6 +1179,7 @@ func (c *DefaultApiService) ListSyncListItem(ServiceSid string, ListSid string, if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1229,11 +1214,10 @@ func (c *DefaultApiService) ListSyncListPermission(ServiceSid string, ListSid st path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1266,11 +1250,10 @@ func (c *DefaultApiService) ListSyncMap(ServiceSid string, params *ListSyncMapPa path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1322,8 +1305,6 @@ func (c *DefaultApiService) ListSyncMapItem(ServiceSid string, MapSid string, pa path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Order != nil { data.Set("Order", *params.Order) } @@ -1336,6 +1317,7 @@ func (c *DefaultApiService) ListSyncMapItem(ServiceSid string, MapSid string, pa if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1370,11 +1352,10 @@ func (c *DefaultApiService) ListSyncMapPermission(ServiceSid string, MapSid stri path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1408,11 +1389,10 @@ func (c *DefaultApiService) ListSyncStream(ServiceSid string, params *ListSyncSt path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1458,8 +1438,6 @@ func (c *DefaultApiService) UpdateDocument(ServiceSid string, Sid string, params path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Data != nil { v, err := json.Marshal(params.Data) @@ -1472,7 +1450,7 @@ func (c *DefaultApiService) UpdateDocument(ServiceSid string, Sid string, params if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) } - + headers := make(map[string]interface{}) if params != nil && params.IfMatch != nil { headers["If-Match"] = *params.IfMatch } @@ -1523,8 +1501,6 @@ func (c *DefaultApiService) UpdateDocumentPermission(ServiceSid string, Document path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Manage != nil { data.Set("Manage", fmt.Sprint(*params.Manage)) } @@ -1534,6 +1510,7 @@ func (c *DefaultApiService) UpdateDocumentPermission(ServiceSid string, Document if params != nil && params.Write != nil { data.Set("Write", fmt.Sprint(*params.Write)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1602,8 +1579,6 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AclEnabled != nil { data.Set("AclEnabled", fmt.Sprint(*params.AclEnabled)) } @@ -1625,6 +1600,7 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam if params != nil && params.WebhooksFromRestEnabled != nil { data.Set("WebhooksFromRestEnabled", fmt.Sprint(*params.WebhooksFromRestEnabled)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1664,14 +1640,13 @@ func (c *DefaultApiService) UpdateSyncList(ServiceSid string, Sid string, params path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CollectionTtl != nil { data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) } if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1730,8 +1705,6 @@ func (c *DefaultApiService) UpdateSyncListItem(ServiceSid string, ListSid string path = strings.Replace(path, "{"+"Index"+"}", fmt.Sprint(Index), -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CollectionTtl != nil { data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) } @@ -1750,7 +1723,7 @@ func (c *DefaultApiService) UpdateSyncListItem(ServiceSid string, ListSid string if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) } - + headers := make(map[string]interface{}) if params != nil && params.IfMatch != nil { headers["If-Match"] = *params.IfMatch } @@ -1801,8 +1774,6 @@ func (c *DefaultApiService) UpdateSyncListPermission(ServiceSid string, ListSid path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Manage != nil { data.Set("Manage", fmt.Sprint(*params.Manage)) } @@ -1812,6 +1783,7 @@ func (c *DefaultApiService) UpdateSyncListPermission(ServiceSid string, ListSid if params != nil && params.Write != nil { data.Set("Write", fmt.Sprint(*params.Write)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1851,14 +1823,13 @@ func (c *DefaultApiService) UpdateSyncMap(ServiceSid string, Sid string, params path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CollectionTtl != nil { data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) } if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1917,8 +1888,6 @@ func (c *DefaultApiService) UpdateSyncMapItem(ServiceSid string, MapSid string, path = strings.Replace(path, "{"+"Key"+"}", Key, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CollectionTtl != nil { data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) } @@ -1937,7 +1906,7 @@ func (c *DefaultApiService) UpdateSyncMapItem(ServiceSid string, MapSid string, if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) } - + headers := make(map[string]interface{}) if params != nil && params.IfMatch != nil { headers["If-Match"] = *params.IfMatch } @@ -1988,8 +1957,6 @@ func (c *DefaultApiService) UpdateSyncMapPermission(ServiceSid string, MapSid st path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Manage != nil { data.Set("Manage", fmt.Sprint(*params.Manage)) } @@ -1999,6 +1966,7 @@ func (c *DefaultApiService) UpdateSyncMapPermission(ServiceSid string, MapSid st if params != nil && params.Write != nil { data.Set("Write", fmt.Sprint(*params.Write)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2033,11 +2001,10 @@ func (c *DefaultApiService) UpdateSyncStream(ServiceSid string, Sid string, para path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/taskrouter/v1/api_default.go b/rest/taskrouter/v1/api_default.go index 4340a163a..aee6d8601 100644 --- a/rest/taskrouter/v1/api_default.go +++ b/rest/taskrouter/v1/api_default.go @@ -60,14 +60,13 @@ func (c *DefaultApiService) CreateActivity(WorkspaceSid string, params *CreateAc path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Available != nil { data.Set("Available", fmt.Sprint(*params.Available)) } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -124,8 +123,6 @@ func (c *DefaultApiService) CreateTask(WorkspaceSid string, params *CreateTaskPa path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { data.Set("Attributes", *params.Attributes) } @@ -141,6 +138,7 @@ func (c *DefaultApiService) CreateTask(WorkspaceSid string, params *CreateTaskPa if params != nil && params.WorkflowSid != nil { data.Set("WorkflowSid", *params.WorkflowSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -185,8 +183,6 @@ func (c *DefaultApiService) CreateTaskChannel(WorkspaceSid string, params *Creat path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ChannelOptimizedRouting != nil { data.Set("ChannelOptimizedRouting", fmt.Sprint(*params.ChannelOptimizedRouting)) } @@ -196,6 +192,7 @@ func (c *DefaultApiService) CreateTaskChannel(WorkspaceSid string, params *Creat if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -258,8 +255,6 @@ func (c *DefaultApiService) CreateTaskQueue(WorkspaceSid string, params *CreateT path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AssignmentActivitySid != nil { data.Set("AssignmentActivitySid", *params.AssignmentActivitySid) } @@ -278,6 +273,7 @@ func (c *DefaultApiService) CreateTaskQueue(WorkspaceSid string, params *CreateT if params != nil && params.TaskOrder != nil { data.Set("TaskOrder", *params.TaskOrder) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -322,8 +318,6 @@ func (c *DefaultApiService) CreateWorker(WorkspaceSid string, params *CreateWork path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ActivitySid != nil { data.Set("ActivitySid", *params.ActivitySid) } @@ -333,6 +327,7 @@ func (c *DefaultApiService) CreateWorker(WorkspaceSid string, params *CreateWork if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -389,8 +384,6 @@ func (c *DefaultApiService) CreateWorkflow(WorkspaceSid string, params *CreateWo path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AssignmentCallbackUrl != nil { data.Set("AssignmentCallbackUrl", *params.AssignmentCallbackUrl) } @@ -406,6 +399,7 @@ func (c *DefaultApiService) CreateWorkflow(WorkspaceSid string, params *CreateWo if params != nil && params.TaskReservationTimeout != nil { data.Set("TaskReservationTimeout", fmt.Sprint(*params.TaskReservationTimeout)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -467,8 +461,6 @@ func (c *DefaultApiService) CreateWorkspace(params *CreateWorkspaceParams) (*Tas path := "/v1/Workspaces" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.EventCallbackUrl != nil { data.Set("EventCallbackUrl", *params.EventCallbackUrl) } @@ -487,6 +479,7 @@ func (c *DefaultApiService) CreateWorkspace(params *CreateWorkspaceParams) (*Tas if params != nil && params.Template != nil { data.Set("Template", *params.Template) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -539,7 +532,6 @@ func (c *DefaultApiService) DeleteTask(WorkspaceSid string, Sid string, params * data := url.Values{} headers := make(map[string]interface{}) - if params != nil && params.IfMatch != nil { headers["If-Match"] = *params.IfMatch } @@ -799,8 +791,6 @@ func (c *DefaultApiService) FetchTaskQueueCumulativeStatistics(WorkspaceSid stri path = strings.Replace(path, "{"+"TaskQueueSid"+"}", TaskQueueSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.EndDate != nil { data.Set("EndDate", fmt.Sprint((*params.EndDate).Format(time.RFC3339))) } @@ -816,6 +806,7 @@ func (c *DefaultApiService) FetchTaskQueueCumulativeStatistics(WorkspaceSid stri if params != nil && params.SplitByWaitTime != nil { data.Set("SplitByWaitTime", *params.SplitByWaitTime) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -849,11 +840,10 @@ func (c *DefaultApiService) FetchTaskQueueRealTimeStatistics(WorkspaceSid string path = strings.Replace(path, "{"+"TaskQueueSid"+"}", TaskQueueSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.TaskChannel != nil { data.Set("TaskChannel", *params.TaskChannel) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -911,8 +901,6 @@ func (c *DefaultApiService) FetchTaskQueueStatistics(WorkspaceSid string, TaskQu path = strings.Replace(path, "{"+"TaskQueueSid"+"}", TaskQueueSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.EndDate != nil { data.Set("EndDate", fmt.Sprint((*params.EndDate).Format(time.RFC3339))) } @@ -928,6 +916,7 @@ func (c *DefaultApiService) FetchTaskQueueStatistics(WorkspaceSid string, TaskQu if params != nil && params.SplitByWaitTime != nil { data.Set("SplitByWaitTime", *params.SplitByWaitTime) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1050,8 +1039,6 @@ func (c *DefaultApiService) FetchWorkerInstanceStatistics(WorkspaceSid string, W path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Minutes != nil { data.Set("Minutes", fmt.Sprint(*params.Minutes)) } @@ -1064,6 +1051,7 @@ func (c *DefaultApiService) FetchWorkerInstanceStatistics(WorkspaceSid string, W if params != nil && params.TaskChannel != nil { data.Set("TaskChannel", *params.TaskChannel) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1156,8 +1144,6 @@ func (c *DefaultApiService) FetchWorkerStatistics(WorkspaceSid string, params *F path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Minutes != nil { data.Set("Minutes", fmt.Sprint(*params.Minutes)) } @@ -1179,6 +1165,7 @@ func (c *DefaultApiService) FetchWorkerStatistics(WorkspaceSid string, params *F if params != nil && params.TaskChannel != nil { data.Set("TaskChannel", *params.TaskChannel) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1229,8 +1216,6 @@ func (c *DefaultApiService) FetchWorkersCumulativeStatistics(WorkspaceSid string path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.EndDate != nil { data.Set("EndDate", fmt.Sprint((*params.EndDate).Format(time.RFC3339))) } @@ -1243,6 +1228,7 @@ func (c *DefaultApiService) FetchWorkersCumulativeStatistics(WorkspaceSid string if params != nil && params.TaskChannel != nil { data.Set("TaskChannel", *params.TaskChannel) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1275,11 +1261,10 @@ func (c *DefaultApiService) FetchWorkersRealTimeStatistics(WorkspaceSid string, path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.TaskChannel != nil { data.Set("TaskChannel", *params.TaskChannel) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1360,8 +1345,6 @@ func (c *DefaultApiService) FetchWorkflowCumulativeStatistics(WorkspaceSid strin path = strings.Replace(path, "{"+"WorkflowSid"+"}", WorkflowSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.EndDate != nil { data.Set("EndDate", fmt.Sprint((*params.EndDate).Format(time.RFC3339))) } @@ -1377,6 +1360,7 @@ func (c *DefaultApiService) FetchWorkflowCumulativeStatistics(WorkspaceSid strin if params != nil && params.SplitByWaitTime != nil { data.Set("SplitByWaitTime", *params.SplitByWaitTime) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1410,11 +1394,10 @@ func (c *DefaultApiService) FetchWorkflowRealTimeStatistics(WorkspaceSid string, path = strings.Replace(path, "{"+"WorkflowSid"+"}", WorkflowSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.TaskChannel != nil { data.Set("TaskChannel", *params.TaskChannel) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1472,8 +1455,6 @@ func (c *DefaultApiService) FetchWorkflowStatistics(WorkspaceSid string, Workflo path = strings.Replace(path, "{"+"WorkflowSid"+"}", WorkflowSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Minutes != nil { data.Set("Minutes", fmt.Sprint(*params.Minutes)) } @@ -1489,6 +1470,7 @@ func (c *DefaultApiService) FetchWorkflowStatistics(WorkspaceSid string, Workflo if params != nil && params.SplitByWaitTime != nil { data.Set("SplitByWaitTime", *params.SplitByWaitTime) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1567,8 +1549,6 @@ func (c *DefaultApiService) FetchWorkspaceCumulativeStatistics(WorkspaceSid stri path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.EndDate != nil { data.Set("EndDate", fmt.Sprint((*params.EndDate).Format(time.RFC3339))) } @@ -1584,6 +1564,7 @@ func (c *DefaultApiService) FetchWorkspaceCumulativeStatistics(WorkspaceSid stri if params != nil && params.SplitByWaitTime != nil { data.Set("SplitByWaitTime", *params.SplitByWaitTime) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1616,11 +1597,10 @@ func (c *DefaultApiService) FetchWorkspaceRealTimeStatistics(WorkspaceSid string path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.TaskChannel != nil { data.Set("TaskChannel", *params.TaskChannel) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1677,8 +1657,6 @@ func (c *DefaultApiService) FetchWorkspaceStatistics(WorkspaceSid string, params path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Minutes != nil { data.Set("Minutes", fmt.Sprint(*params.Minutes)) } @@ -1694,6 +1672,7 @@ func (c *DefaultApiService) FetchWorkspaceStatistics(WorkspaceSid string, params if params != nil && params.SplitByWaitTime != nil { data.Set("SplitByWaitTime", *params.SplitByWaitTime) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1738,8 +1717,6 @@ func (c *DefaultApiService) ListActivity(WorkspaceSid string, params *ListActivi path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } @@ -1749,6 +1726,7 @@ func (c *DefaultApiService) ListActivity(WorkspaceSid string, params *ListActivi if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1847,8 +1825,6 @@ func (c *DefaultApiService) ListEvent(WorkspaceSid string, params *ListEventPara path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.EndDate != nil { data.Set("EndDate", fmt.Sprint((*params.EndDate).Format(time.RFC3339))) } @@ -1885,6 +1861,7 @@ func (c *DefaultApiService) ListEvent(WorkspaceSid string, params *ListEventPara if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1971,8 +1948,6 @@ func (c *DefaultApiService) ListTask(WorkspaceSid string, params *ListTaskParams path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Priority != nil { data.Set("Priority", fmt.Sprint(*params.Priority)) } @@ -2005,6 +1980,7 @@ func (c *DefaultApiService) ListTask(WorkspaceSid string, params *ListTaskParams if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2037,11 +2013,10 @@ func (c *DefaultApiService) ListTaskChannel(WorkspaceSid string, params *ListTas path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2092,8 +2067,6 @@ func (c *DefaultApiService) ListTaskQueue(WorkspaceSid string, params *ListTaskQ path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } @@ -2106,6 +2079,7 @@ func (c *DefaultApiService) ListTaskQueue(WorkspaceSid string, params *ListTaskQ if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2174,8 +2148,6 @@ func (c *DefaultApiService) ListTaskQueuesStatistics(WorkspaceSid string, params path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.EndDate != nil { data.Set("EndDate", fmt.Sprint((*params.EndDate).Format(time.RFC3339))) } @@ -2197,6 +2169,7 @@ func (c *DefaultApiService) ListTaskQueuesStatistics(WorkspaceSid string, params if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2236,14 +2209,13 @@ func (c *DefaultApiService) ListTaskReservation(WorkspaceSid string, TaskSid str path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ReservationStatus != nil { data.Set("ReservationStatus", *params.ReservationStatus) } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2318,8 +2290,6 @@ func (c *DefaultApiService) ListWorker(WorkspaceSid string, params *ListWorkerPa path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ActivityName != nil { data.Set("ActivityName", *params.ActivityName) } @@ -2344,6 +2314,7 @@ func (c *DefaultApiService) ListWorker(WorkspaceSid string, params *ListWorkerPa if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2377,11 +2348,10 @@ func (c *DefaultApiService) ListWorkerChannel(WorkspaceSid string, WorkerSid str path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2421,14 +2391,13 @@ func (c *DefaultApiService) ListWorkerReservation(WorkspaceSid string, WorkerSid path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ReservationStatus != nil { data.Set("ReservationStatus", *params.ReservationStatus) } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2467,14 +2436,13 @@ func (c *DefaultApiService) ListWorkflow(WorkspaceSid string, params *ListWorkfl path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2512,14 +2480,13 @@ func (c *DefaultApiService) ListWorkspace(params *ListWorkspaceParams) (*ListWor path := "/v1/Workspaces" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -2553,11 +2520,10 @@ func (c *DefaultApiService) UpdateActivity(WorkspaceSid string, Sid string, para path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2621,8 +2587,6 @@ func (c *DefaultApiService) UpdateTask(WorkspaceSid string, Sid string, params * path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AssignmentStatus != nil { data.Set("AssignmentStatus", *params.AssignmentStatus) } @@ -2638,7 +2602,7 @@ func (c *DefaultApiService) UpdateTask(WorkspaceSid string, Sid string, params * if params != nil && params.TaskChannel != nil { data.Set("TaskChannel", *params.TaskChannel) } - + headers := make(map[string]interface{}) if params != nil && params.IfMatch != nil { headers["If-Match"] = *params.IfMatch } @@ -2681,14 +2645,13 @@ func (c *DefaultApiService) UpdateTaskChannel(WorkspaceSid string, Sid string, p path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ChannelOptimizedRouting != nil { data.Set("ChannelOptimizedRouting", fmt.Sprint(*params.ChannelOptimizedRouting)) } if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2752,8 +2715,6 @@ func (c *DefaultApiService) UpdateTaskQueue(WorkspaceSid string, Sid string, par path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AssignmentActivitySid != nil { data.Set("AssignmentActivitySid", *params.AssignmentActivitySid) } @@ -2772,6 +2733,7 @@ func (c *DefaultApiService) UpdateTaskQueue(WorkspaceSid string, Sid string, par if params != nil && params.TaskOrder != nil { data.Set("TaskOrder", *params.TaskOrder) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3118,8 +3080,6 @@ func (c *DefaultApiService) UpdateTaskReservation(WorkspaceSid string, TaskSid s path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Beep != nil { data.Set("Beep", *params.Beep) } @@ -3285,6 +3245,7 @@ func (c *DefaultApiService) UpdateTaskReservation(WorkspaceSid string, TaskSid s if params != nil && params.WorkerActivitySid != nil { data.Set("WorkerActivitySid", *params.WorkerActivitySid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3336,8 +3297,6 @@ func (c *DefaultApiService) UpdateWorker(WorkspaceSid string, Sid string, params path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ActivitySid != nil { data.Set("ActivitySid", *params.ActivitySid) } @@ -3350,6 +3309,7 @@ func (c *DefaultApiService) UpdateWorker(WorkspaceSid string, Sid string, params if params != nil && params.RejectPendingReservations != nil { data.Set("RejectPendingReservations", fmt.Sprint(*params.RejectPendingReservations)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3390,14 +3350,13 @@ func (c *DefaultApiService) UpdateWorkerChannel(WorkspaceSid string, WorkerSid s path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Available != nil { data.Set("Available", fmt.Sprint(*params.Available)) } if params != nil && params.Capacity != nil { data.Set("Capacity", fmt.Sprint(*params.Capacity)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3732,8 +3691,6 @@ func (c *DefaultApiService) UpdateWorkerReservation(WorkspaceSid string, WorkerS path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Beep != nil { data.Set("Beep", *params.Beep) } @@ -3893,6 +3850,7 @@ func (c *DefaultApiService) UpdateWorkerReservation(WorkspaceSid string, WorkerS if params != nil && params.WorkerActivitySid != nil { data.Set("WorkerActivitySid", *params.WorkerActivitySid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -3956,8 +3914,6 @@ func (c *DefaultApiService) UpdateWorkflow(WorkspaceSid string, Sid string, para path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AssignmentCallbackUrl != nil { data.Set("AssignmentCallbackUrl", *params.AssignmentCallbackUrl) } @@ -3976,6 +3932,7 @@ func (c *DefaultApiService) UpdateWorkflow(WorkspaceSid string, Sid string, para if params != nil && params.TaskReservationTimeout != nil { data.Set("TaskReservationTimeout", fmt.Sprint(*params.TaskReservationTimeout)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -4044,8 +4001,6 @@ func (c *DefaultApiService) UpdateWorkspace(Sid string, params *UpdateWorkspaceP path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.DefaultActivitySid != nil { data.Set("DefaultActivitySid", *params.DefaultActivitySid) } @@ -4067,6 +4022,7 @@ func (c *DefaultApiService) UpdateWorkspace(Sid string, params *UpdateWorkspaceP if params != nil && params.TimeoutActivitySid != nil { data.Set("TimeoutActivitySid", *params.TimeoutActivitySid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/trunking/v1/api_default.go b/rest/trunking/v1/api_default.go index 888e49aa3..e7a68880d 100644 --- a/rest/trunking/v1/api_default.go +++ b/rest/trunking/v1/api_default.go @@ -53,11 +53,10 @@ func (c *DefaultApiService) CreateCredentialList(TrunkSid string, params *Create path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CredentialListSid != nil { data.Set("CredentialListSid", *params.CredentialListSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -91,11 +90,10 @@ func (c *DefaultApiService) CreateIpAccessControlList(TrunkSid string, params *C path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.IpAccessControlListSid != nil { data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -152,8 +150,6 @@ func (c *DefaultApiService) CreateOriginationUrl(TrunkSid string, params *Create path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Enabled != nil { data.Set("Enabled", fmt.Sprint(*params.Enabled)) } @@ -169,6 +165,7 @@ func (c *DefaultApiService) CreateOriginationUrl(TrunkSid string, params *Create if params != nil && params.Weight != nil { data.Set("Weight", fmt.Sprint(*params.Weight)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -201,11 +198,10 @@ func (c *DefaultApiService) CreatePhoneNumber(TrunkSid string, params *CreatePho path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PhoneNumberSid != nil { data.Set("PhoneNumberSid", *params.PhoneNumberSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -273,8 +269,6 @@ func (c *DefaultApiService) CreateTrunk(params *CreateTrunkParams) (*TrunkingV1T path := "/v1/Trunks" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CnamLookupEnabled != nil { data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) } @@ -296,6 +290,7 @@ func (c *DefaultApiService) CreateTrunk(params *CreateTrunkParams) (*TrunkingV1T if params != nil && params.TransferMode != nil { data.Set("TransferMode", *params.TransferMode) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -554,11 +549,10 @@ func (c *DefaultApiService) ListCredentialList(TrunkSid string, params *ListCred path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -592,11 +586,10 @@ func (c *DefaultApiService) ListIpAccessControlList(TrunkSid string, params *Lis path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -629,11 +622,10 @@ func (c *DefaultApiService) ListOriginationUrl(TrunkSid string, params *ListOrig path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -666,11 +658,10 @@ func (c *DefaultApiService) ListPhoneNumber(TrunkSid string, params *ListPhoneNu path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -702,11 +693,10 @@ func (c *DefaultApiService) ListTrunk(params *ListTrunkParams) (*ListTrunkRespon path := "/v1/Trunks" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -764,8 +754,6 @@ func (c *DefaultApiService) UpdateOriginationUrl(TrunkSid string, Sid string, pa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Enabled != nil { data.Set("Enabled", fmt.Sprint(*params.Enabled)) } @@ -781,6 +769,7 @@ func (c *DefaultApiService) UpdateOriginationUrl(TrunkSid string, Sid string, pa if params != nil && params.Weight != nil { data.Set("Weight", fmt.Sprint(*params.Weight)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -819,14 +808,13 @@ func (c *DefaultApiService) UpdateRecording(TrunkSid string, params *UpdateRecor path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Mode != nil { data.Set("Mode", *params.Mode) } if params != nil && params.Trim != nil { data.Set("Trim", *params.Trim) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -895,8 +883,6 @@ func (c *DefaultApiService) UpdateTrunk(Sid string, params *UpdateTrunkParams) ( path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CnamLookupEnabled != nil { data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) } @@ -918,6 +904,7 @@ func (c *DefaultApiService) UpdateTrunk(Sid string, params *UpdateTrunkParams) ( if params != nil && params.TransferMode != nil { data.Set("TransferMode", *params.TransferMode) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/trusthub/v1/api_default.go b/rest/trusthub/v1/api_default.go index 6630e54da..c7272381d 100644 --- a/rest/trusthub/v1/api_default.go +++ b/rest/trusthub/v1/api_default.go @@ -71,8 +71,6 @@ func (c *DefaultApiService) CreateCustomerProfile(params *CreateCustomerProfileP path := "/v1/CustomerProfiles" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Email != nil { data.Set("Email", *params.Email) } @@ -85,6 +83,7 @@ func (c *DefaultApiService) CreateCustomerProfile(params *CreateCustomerProfileP if params != nil && params.StatusCallback != nil { data.Set("StatusCallback", *params.StatusCallback) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -124,14 +123,13 @@ func (c *DefaultApiService) CreateCustomerProfileChannelEndpointAssignment(Custo path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ChannelEndpointSid != nil { data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) } if params != nil && params.ChannelEndpointType != nil { data.Set("ChannelEndpointType", *params.ChannelEndpointType) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -165,11 +163,10 @@ func (c *DefaultApiService) CreateCustomerProfileEntityAssignment(CustomerProfil path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ObjectSid != nil { data.Set("ObjectSid", *params.ObjectSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -203,11 +200,10 @@ func (c *DefaultApiService) CreateCustomerProfileEvaluation(CustomerProfileSid s path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PolicySid != nil { data.Set("PolicySid", *params.PolicySid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -252,8 +248,6 @@ func (c *DefaultApiService) CreateEndUser(params *CreateEndUserParams) (*Trusthu path := "/v1/EndUsers" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { v, err := json.Marshal(params.Attributes) @@ -269,6 +263,7 @@ func (c *DefaultApiService) CreateEndUser(params *CreateEndUserParams) (*Trusthu if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -313,8 +308,6 @@ func (c *DefaultApiService) CreateSupportingDocument(params *CreateSupportingDoc path := "/v1/SupportingDocuments" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { v, err := json.Marshal(params.Attributes) @@ -330,6 +323,7 @@ func (c *DefaultApiService) CreateSupportingDocument(params *CreateSupportingDoc if params != nil && params.Type != nil { data.Set("Type", *params.Type) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -380,8 +374,6 @@ func (c *DefaultApiService) CreateTrustProduct(params *CreateTrustProductParams) path := "/v1/TrustProducts" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Email != nil { data.Set("Email", *params.Email) } @@ -394,6 +386,7 @@ func (c *DefaultApiService) CreateTrustProduct(params *CreateTrustProductParams) if params != nil && params.StatusCallback != nil { data.Set("StatusCallback", *params.StatusCallback) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -433,14 +426,13 @@ func (c *DefaultApiService) CreateTrustProductChannelEndpointAssignment(TrustPro path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ChannelEndpointSid != nil { data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) } if params != nil && params.ChannelEndpointType != nil { data.Set("ChannelEndpointType", *params.ChannelEndpointType) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -474,11 +466,10 @@ func (c *DefaultApiService) CreateTrustProductEntityAssignment(TrustProductSid s path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ObjectSid != nil { data.Set("ObjectSid", *params.ObjectSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -512,11 +503,10 @@ func (c *DefaultApiService) CreateTrustProductEvaluation(TrustProductSid string, path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PolicySid != nil { data.Set("PolicySid", *params.PolicySid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1020,8 +1010,6 @@ func (c *DefaultApiService) ListCustomerProfile(params *ListCustomerProfileParam path := "/v1/CustomerProfiles" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Status != nil { data.Set("Status", *params.Status) } @@ -1034,6 +1022,7 @@ func (c *DefaultApiService) ListCustomerProfile(params *ListCustomerProfileParam if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1079,8 +1068,6 @@ func (c *DefaultApiService) ListCustomerProfileChannelEndpointAssignment(Custome path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ChannelEndpointSid != nil { data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) } @@ -1090,6 +1077,7 @@ func (c *DefaultApiService) ListCustomerProfileChannelEndpointAssignment(Custome if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1123,11 +1111,10 @@ func (c *DefaultApiService) ListCustomerProfileEntityAssignment(CustomerProfileS path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1161,11 +1148,10 @@ func (c *DefaultApiService) ListCustomerProfileEvaluation(CustomerProfileSid str path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1198,11 +1184,10 @@ func (c *DefaultApiService) ListEndUser(params *ListEndUserParams) (*ListEndUser path := "/v1/EndUsers" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1235,11 +1220,10 @@ func (c *DefaultApiService) ListEndUserType(params *ListEndUserTypeParams) (*Lis path := "/v1/EndUserTypes" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1272,11 +1256,10 @@ func (c *DefaultApiService) ListPolicies(params *ListPoliciesParams) (*ListPolic path := "/v1/Policies" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1309,11 +1292,10 @@ func (c *DefaultApiService) ListSupportingDocument(params *ListSupportingDocumen path := "/v1/SupportingDocuments" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1346,11 +1328,10 @@ func (c *DefaultApiService) ListSupportingDocumentType(params *ListSupportingDoc path := "/v1/SupportingDocumentTypes" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1401,8 +1382,6 @@ func (c *DefaultApiService) ListTrustProduct(params *ListTrustProductParams) (*L path := "/v1/TrustProducts" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Status != nil { data.Set("Status", *params.Status) } @@ -1415,6 +1394,7 @@ func (c *DefaultApiService) ListTrustProduct(params *ListTrustProductParams) (*L if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1460,8 +1440,6 @@ func (c *DefaultApiService) ListTrustProductChannelEndpointAssignment(TrustProdu path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.ChannelEndpointSid != nil { data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) } @@ -1471,6 +1449,7 @@ func (c *DefaultApiService) ListTrustProductChannelEndpointAssignment(TrustProdu if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1504,11 +1483,10 @@ func (c *DefaultApiService) ListTrustProductEntityAssignment(TrustProductSid str path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1542,11 +1520,10 @@ func (c *DefaultApiService) ListTrustProductEvaluation(TrustProductSid string, p path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1598,8 +1575,6 @@ func (c *DefaultApiService) UpdateCustomerProfile(Sid string, params *UpdateCust path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Email != nil { data.Set("Email", *params.Email) } @@ -1612,6 +1587,7 @@ func (c *DefaultApiService) UpdateCustomerProfile(Sid string, params *UpdateCust if params != nil && params.StatusCallback != nil { data.Set("StatusCallback", *params.StatusCallback) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1651,8 +1627,6 @@ func (c *DefaultApiService) UpdateEndUser(Sid string, params *UpdateEndUserParam path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { v, err := json.Marshal(params.Attributes) @@ -1665,6 +1639,7 @@ func (c *DefaultApiService) UpdateEndUser(Sid string, params *UpdateEndUserParam if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1704,8 +1679,6 @@ func (c *DefaultApiService) UpdateSupportingDocument(Sid string, params *UpdateS path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { v, err := json.Marshal(params.Attributes) @@ -1718,6 +1691,7 @@ func (c *DefaultApiService) UpdateSupportingDocument(Sid string, params *UpdateS if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1769,8 +1743,6 @@ func (c *DefaultApiService) UpdateTrustProduct(Sid string, params *UpdateTrustPr path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Email != nil { data.Set("Email", *params.Email) } @@ -1783,6 +1755,7 @@ func (c *DefaultApiService) UpdateTrustProduct(Sid string, params *UpdateTrustPr if params != nil && params.StatusCallback != nil { data.Set("StatusCallback", *params.StatusCallback) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/verify/v2/api_default.go b/rest/verify/v2/api_default.go index 2435422da..3e85f824f 100644 --- a/rest/verify/v2/api_default.go +++ b/rest/verify/v2/api_default.go @@ -61,14 +61,13 @@ func (c *DefaultApiService) CreateAccessToken(ServiceSid string, params *CreateA path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FactorType != nil { data.Set("FactorType", *params.FactorType) } if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -109,14 +108,13 @@ func (c *DefaultApiService) CreateBucket(ServiceSid string, RateLimitSid string, path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Interval != nil { data.Set("Interval", fmt.Sprint(*params.Interval)) } if params != nil && params.Max != nil { data.Set("Max", fmt.Sprint(*params.Max)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -181,8 +179,6 @@ func (c *DefaultApiService) CreateChallenge(ServiceSid string, Identity string, path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AuthPayload != nil { data.Set("AuthPayload", *params.AuthPayload) } @@ -213,6 +209,7 @@ func (c *DefaultApiService) CreateChallenge(ServiceSid string, Identity string, data.Set("HiddenDetails", string(v)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -246,11 +243,10 @@ func (c *DefaultApiService) CreateEntity(ServiceSid string, params *CreateEntity path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Identity != nil { data.Set("Identity", *params.Identity) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -290,14 +286,13 @@ func (c *DefaultApiService) CreateMessagingConfiguration(ServiceSid string, para path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Country != nil { data.Set("Country", *params.Country) } if params != nil && params.MessagingServiceSid != nil { data.Set("MessagingServiceSid", *params.MessagingServiceSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -404,8 +399,6 @@ func (c *DefaultApiService) CreateNewFactor(ServiceSid string, Identity string, path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.BindingAlg != nil { data.Set("Binding.Alg", *params.BindingAlg) } @@ -445,6 +438,7 @@ func (c *DefaultApiService) CreateNewFactor(ServiceSid string, Identity string, if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -480,11 +474,10 @@ func (c *DefaultApiService) CreateNotification(ServiceSid string, Identity strin path = strings.Replace(path, "{"+"ChallengeSid"+"}", ChallengeSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Ttl != nil { data.Set("Ttl", fmt.Sprint(*params.Ttl)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -524,14 +517,13 @@ func (c *DefaultApiService) CreateRateLimit(ServiceSid string, params *CreateRat path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Description != nil { data.Set("Description", *params.Description) } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -654,8 +646,6 @@ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*VerifyV path := "/v2/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CodeLength != nil { data.Set("CodeLength", fmt.Sprint(*params.CodeLength)) } @@ -704,6 +694,7 @@ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*VerifyV if params != nil && params.TtsName != nil { data.Set("TtsName", *params.TtsName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -803,8 +794,6 @@ func (c *DefaultApiService) CreateVerification(ServiceSid string, params *Create path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Amount != nil { data.Set("Amount", *params.Amount) } @@ -853,6 +842,7 @@ func (c *DefaultApiService) CreateVerification(ServiceSid string, params *Create if params != nil && params.To != nil { data.Set("To", *params.To) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -910,8 +900,6 @@ func (c *DefaultApiService) CreateVerificationCheck(ServiceSid string, params *C path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Amount != nil { data.Set("Amount", *params.Amount) } @@ -927,6 +915,7 @@ func (c *DefaultApiService) CreateVerificationCheck(ServiceSid string, params *C if params != nil && params.VerificationSid != nil { data.Set("VerificationSid", *params.VerificationSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -978,8 +967,6 @@ func (c *DefaultApiService) CreateWebhook(ServiceSid string, params *CreateWebho path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.EventTypes != nil { for _, item := range *params.EventTypes { data.Add("EventTypes", item) @@ -994,6 +981,7 @@ func (c *DefaultApiService) CreateWebhook(ServiceSid string, params *CreateWebho if params != nil && params.WebhookUrl != nil { data.Set("WebhookUrl", *params.WebhookUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1426,11 +1414,10 @@ func (c *DefaultApiService) ListBucket(ServiceSid string, RateLimitSid string, p path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1477,8 +1464,6 @@ func (c *DefaultApiService) ListChallenge(ServiceSid string, Identity string, pa path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FactorSid != nil { data.Set("FactorSid", *params.FactorSid) } @@ -1488,6 +1473,7 @@ func (c *DefaultApiService) ListChallenge(ServiceSid string, Identity string, pa if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1521,11 +1507,10 @@ func (c *DefaultApiService) ListEntity(ServiceSid string, params *ListEntityPara path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1560,11 +1545,10 @@ func (c *DefaultApiService) ListFactor(ServiceSid string, Identity string, param path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1598,11 +1582,10 @@ func (c *DefaultApiService) ListMessagingConfiguration(ServiceSid string, params path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1636,11 +1619,10 @@ func (c *DefaultApiService) ListRateLimit(ServiceSid string, params *ListRateLim path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1673,11 +1655,10 @@ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListService path := "/v2/Services" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1728,8 +1709,6 @@ func (c *DefaultApiService) ListVerificationAttempt(params *ListVerificationAtte path := "/v2/Attempts" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.DateCreatedAfter != nil { data.Set("DateCreatedAfter", fmt.Sprint((*params.DateCreatedAfter).Format(time.RFC3339))) } @@ -1742,6 +1721,7 @@ func (c *DefaultApiService) ListVerificationAttempt(params *ListVerificationAtte if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1775,11 +1755,10 @@ func (c *DefaultApiService) ListWebhook(ServiceSid string, params *ListWebhookPa path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1821,14 +1800,13 @@ func (c *DefaultApiService) UpdateBucket(ServiceSid string, RateLimitSid string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Interval != nil { data.Set("Interval", fmt.Sprint(*params.Interval)) } if params != nil && params.Max != nil { data.Set("Max", fmt.Sprint(*params.Max)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1864,11 +1842,10 @@ func (c *DefaultApiService) UpdateChallenge(ServiceSid string, Identity string, path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AuthPayload != nil { data.Set("AuthPayload", *params.AuthPayload) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1946,8 +1923,6 @@ func (c *DefaultApiService) UpdateFactor(ServiceSid string, Identity string, Sid path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AuthPayload != nil { data.Set("AuthPayload", *params.AuthPayload) } @@ -1972,6 +1947,7 @@ func (c *DefaultApiService) UpdateFactor(ServiceSid string, Identity string, Sid if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2006,11 +1982,10 @@ func (c *DefaultApiService) UpdateMessagingConfiguration(ServiceSid string, Coun path = strings.Replace(path, "{"+"Country"+"}", Country, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.MessagingServiceSid != nil { data.Set("MessagingServiceSid", *params.MessagingServiceSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2045,11 +2020,10 @@ func (c *DefaultApiService) UpdateRateLimit(ServiceSid string, Sid string, param path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Description != nil { data.Set("Description", *params.Description) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2173,8 +2147,6 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CodeLength != nil { data.Set("CodeLength", fmt.Sprint(*params.CodeLength)) } @@ -2223,6 +2195,7 @@ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParam if params != nil && params.TtsName != nil { data.Set("TtsName", *params.TtsName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2257,11 +2230,10 @@ func (c *DefaultApiService) UpdateVerification(ServiceSid string, Sid string, pa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Status != nil { data.Set("Status", *params.Status) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -2313,8 +2285,6 @@ func (c *DefaultApiService) UpdateWebhook(ServiceSid string, Sid string, params path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.EventTypes != nil { for _, item := range *params.EventTypes { data.Add("EventTypes", item) @@ -2329,6 +2299,7 @@ func (c *DefaultApiService) UpdateWebhook(ServiceSid string, Sid string, params if params != nil && params.WebhookUrl != nil { data.Set("WebhookUrl", *params.WebhookUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/video/v1/api_default.go b/rest/video/v1/api_default.go index 757be9c40..0183478a9 100644 --- a/rest/video/v1/api_default.go +++ b/rest/video/v1/api_default.go @@ -101,8 +101,6 @@ func (c *DefaultApiService) CreateComposition(params *CreateCompositionParams) ( path := "/v1/Compositions" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AudioSources != nil { for _, item := range *params.AudioSources { data.Add("AudioSources", item) @@ -140,6 +138,7 @@ func (c *DefaultApiService) CreateComposition(params *CreateCompositionParams) ( data.Set("VideoLayout", string(v)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -225,8 +224,6 @@ func (c *DefaultApiService) CreateCompositionHook(params *CreateCompositionHookP path := "/v1/CompositionHooks" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AudioSources != nil { for _, item := range *params.AudioSources { data.Add("AudioSources", item) @@ -267,6 +264,7 @@ func (c *DefaultApiService) CreateCompositionHook(params *CreateCompositionHookP data.Set("VideoLayout", string(v)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -328,8 +326,6 @@ func (c *DefaultApiService) CreateCompositionSettings(params *CreateCompositionS path := "/v1/CompositionSettings/Default" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AwsCredentialsSid != nil { data.Set("AwsCredentialsSid", *params.AwsCredentialsSid) } @@ -348,6 +344,7 @@ func (c *DefaultApiService) CreateCompositionSettings(params *CreateCompositionS if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -409,8 +406,6 @@ func (c *DefaultApiService) CreateRecordingSettings(params *CreateRecordingSetti path := "/v1/RecordingSettings/Default" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AwsCredentialsSid != nil { data.Set("AwsCredentialsSid", *params.AwsCredentialsSid) } @@ -429,6 +424,7 @@ func (c *DefaultApiService) CreateRecordingSettings(params *CreateRecordingSetti if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -514,8 +510,6 @@ func (c *DefaultApiService) CreateRoom(params *CreateRoomParams) (*VideoV1Room, path := "/v1/Rooms" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.EnableTurn != nil { data.Set("EnableTurn", fmt.Sprint(*params.EnableTurn)) } @@ -554,6 +548,7 @@ func (c *DefaultApiService) CreateRoom(params *CreateRoomParams) (*VideoV1Room, data.Add("VideoCodecs", item) } } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -958,8 +953,6 @@ func (c *DefaultApiService) ListComposition(params *ListCompositionParams) (*Lis path := "/v1/Compositions" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Status != nil { data.Set("Status", *params.Status) } @@ -975,6 +968,7 @@ func (c *DefaultApiService) ListComposition(params *ListCompositionParams) (*Lis if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1031,8 +1025,6 @@ func (c *DefaultApiService) ListCompositionHook(params *ListCompositionHookParam path := "/v1/CompositionHooks" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Enabled != nil { data.Set("Enabled", fmt.Sprint(*params.Enabled)) } @@ -1048,6 +1040,7 @@ func (c *DefaultApiService) ListCompositionHook(params *ListCompositionHookParam if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1116,8 +1109,6 @@ func (c *DefaultApiService) ListRecording(params *ListRecordingParams) (*ListRec path := "/v1/Recordings" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Status != nil { data.Set("Status", *params.Status) } @@ -1141,6 +1132,7 @@ func (c *DefaultApiService) ListRecording(params *ListRecordingParams) (*ListRec if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1196,8 +1188,6 @@ func (c *DefaultApiService) ListRoom(params *ListRoomParams) (*ListRoomResponse, path := "/v1/Rooms" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Status != nil { data.Set("Status", *params.Status) } @@ -1213,6 +1203,7 @@ func (c *DefaultApiService) ListRoom(params *ListRoomParams) (*ListRoomResponse, if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1269,8 +1260,6 @@ func (c *DefaultApiService) ListRoomParticipant(RoomSid string, params *ListRoom path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Status != nil { data.Set("Status", *params.Status) } @@ -1286,6 +1275,7 @@ func (c *DefaultApiService) ListRoomParticipant(RoomSid string, params *ListRoom if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1320,11 +1310,10 @@ func (c *DefaultApiService) ListRoomParticipantPublishedTrack(RoomSid string, Pa path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1359,11 +1348,10 @@ func (c *DefaultApiService) ListRoomParticipantSubscribedTrack(RoomSid string, P path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1420,8 +1408,6 @@ func (c *DefaultApiService) ListRoomRecording(RoomSid string, params *ListRoomRe path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Status != nil { data.Set("Status", *params.Status) } @@ -1437,6 +1423,7 @@ func (c *DefaultApiService) ListRoomRecording(RoomSid string, params *ListRoomRe if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1523,8 +1510,6 @@ func (c *DefaultApiService) UpdateCompositionHook(Sid string, params *UpdateComp path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AudioSources != nil { for _, item := range *params.AudioSources { data.Add("AudioSources", item) @@ -1565,6 +1550,7 @@ func (c *DefaultApiService) UpdateCompositionHook(Sid string, params *UpdateComp data.Set("VideoLayout", string(v)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1597,11 +1583,10 @@ func (c *DefaultApiService) UpdateRoom(Sid string, params *UpdateRoomParams) (*V path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Status != nil { data.Set("Status", *params.Status) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1635,11 +1620,10 @@ func (c *DefaultApiService) UpdateRoomParticipant(RoomSid string, Sid string, pa path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Status != nil { data.Set("Status", *params.Status) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1674,8 +1658,6 @@ func (c *DefaultApiService) UpdateRoomParticipantSubscribeRule(RoomSid string, P path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Rules != nil { v, err := json.Marshal(params.Rules) @@ -1685,6 +1667,7 @@ func (c *DefaultApiService) UpdateRoomParticipantSubscribeRule(RoomSid string, P data.Set("Rules", string(v)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1718,8 +1701,6 @@ func (c *DefaultApiService) UpdateRoomRecordingRule(RoomSid string, params *Upda path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Rules != nil { v, err := json.Marshal(params.Rules) @@ -1729,6 +1710,7 @@ func (c *DefaultApiService) UpdateRoomRecordingRule(RoomSid string, params *Upda data.Set("Rules", string(v)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/voice/v1/api_default.go b/rest/voice/v1/api_default.go index 2e5e09ceb..505403b18 100644 --- a/rest/voice/v1/api_default.go +++ b/rest/voice/v1/api_default.go @@ -106,8 +106,6 @@ func (c *DefaultApiService) CreateByocTrunk(params *CreateByocTrunkParams) (*Voi path := "/v1/ByocTrunks" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CnamLookupEnabled != nil { data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) } @@ -138,6 +136,7 @@ func (c *DefaultApiService) CreateByocTrunk(params *CreateByocTrunkParams) (*Voi if params != nil && params.VoiceUrl != nil { data.Set("VoiceUrl", *params.VoiceUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -169,11 +168,10 @@ func (c *DefaultApiService) CreateConnectionPolicy(params *CreateConnectionPolic path := "/v1/ConnectionPolicies" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -230,8 +228,6 @@ func (c *DefaultApiService) CreateConnectionPolicyTarget(ConnectionPolicySid str path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Enabled != nil { data.Set("Enabled", fmt.Sprint(*params.Enabled)) } @@ -247,6 +243,7 @@ func (c *DefaultApiService) CreateConnectionPolicyTarget(ConnectionPolicySid str if params != nil && params.Weight != nil { data.Set("Weight", fmt.Sprint(*params.Weight)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -279,11 +276,10 @@ func (c *DefaultApiService) CreateDialingPermissionsCountryBulkUpdate(params *Cr path := "/v1/DialingPermissions/BulkCountryUpdates" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.UpdateRequest != nil { data.Set("UpdateRequest", *params.UpdateRequest) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -327,8 +323,6 @@ func (c *DefaultApiService) CreateIpRecord(params *CreateIpRecordParams) (*Voice path := "/v1/IpRecords" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CidrPrefixLength != nil { data.Set("CidrPrefixLength", fmt.Sprint(*params.CidrPrefixLength)) } @@ -338,6 +332,7 @@ func (c *DefaultApiService) CreateIpRecord(params *CreateIpRecordParams) (*Voice if params != nil && params.IpAddress != nil { data.Set("IpAddress", *params.IpAddress) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -375,14 +370,13 @@ func (c *DefaultApiService) CreateSourceIpMapping(params *CreateSourceIpMappingP path := "/v1/SourceIpMappings" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.IpRecordSid != nil { data.Set("IpRecordSid", *params.IpRecordSid) } if params != nil && params.SipDomainSid != nil { data.Set("SipDomainSid", *params.SipDomainSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -656,11 +650,10 @@ func (c *DefaultApiService) ListByocTrunk(params *ListByocTrunkParams) (*ListByo path := "/v1/ByocTrunks" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -692,11 +685,10 @@ func (c *DefaultApiService) ListConnectionPolicy(params *ListConnectionPolicyPar path := "/v1/ConnectionPolicies" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -729,11 +721,10 @@ func (c *DefaultApiService) ListConnectionPolicyTarget(ConnectionPolicySid strin path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -802,8 +793,6 @@ func (c *DefaultApiService) ListDialingPermissionsCountry(params *ListDialingPer path := "/v1/DialingPermissions/Countries" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.IsoCode != nil { data.Set("IsoCode", *params.IsoCode) } @@ -825,6 +814,7 @@ func (c *DefaultApiService) ListDialingPermissionsCountry(params *ListDialingPer if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -858,11 +848,10 @@ func (c *DefaultApiService) ListDialingPermissionsHrsPrefixes(IsoCode string, pa path = strings.Replace(path, "{"+"IsoCode"+"}", IsoCode, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -894,11 +883,10 @@ func (c *DefaultApiService) ListIpRecord(params *ListIpRecordParams) (*ListIpRec path := "/v1/IpRecords" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -930,11 +918,10 @@ func (c *DefaultApiService) ListSourceIpMapping(params *ListSourceIpMappingParam path := "/v1/SourceIpMappings" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -1021,8 +1008,6 @@ func (c *DefaultApiService) UpdateByocTrunk(Sid string, params *UpdateByocTrunkP path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CnamLookupEnabled != nil { data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) } @@ -1053,6 +1038,7 @@ func (c *DefaultApiService) UpdateByocTrunk(Sid string, params *UpdateByocTrunkP if params != nil && params.VoiceUrl != nil { data.Set("VoiceUrl", *params.VoiceUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1085,11 +1071,10 @@ func (c *DefaultApiService) UpdateConnectionPolicy(Sid string, params *UpdateCon path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1147,8 +1132,6 @@ func (c *DefaultApiService) UpdateConnectionPolicyTarget(ConnectionPolicySid str path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Enabled != nil { data.Set("Enabled", fmt.Sprint(*params.Enabled)) } @@ -1164,6 +1147,7 @@ func (c *DefaultApiService) UpdateConnectionPolicyTarget(ConnectionPolicySid str if params != nil && params.Weight != nil { data.Set("Weight", fmt.Sprint(*params.Weight)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1196,11 +1180,10 @@ func (c *DefaultApiService) UpdateDialingPermissionsSettings(params *UpdateDiali path := "/v1/Settings" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.DialingPermissionsInheritance != nil { data.Set("DialingPermissionsInheritance", fmt.Sprint(*params.DialingPermissionsInheritance)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1233,11 +1216,10 @@ func (c *DefaultApiService) UpdateIpRecord(Sid string, params *UpdateIpRecordPar path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -1270,11 +1252,10 @@ func (c *DefaultApiService) UpdateSourceIpMapping(Sid string, params *UpdateSour path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.SipDomainSid != nil { data.Set("SipDomainSid", *params.SipDomainSid) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { diff --git a/rest/wireless/v1/api_default.go b/rest/wireless/v1/api_default.go index 58132806d..88b003575 100644 --- a/rest/wireless/v1/api_default.go +++ b/rest/wireless/v1/api_default.go @@ -90,8 +90,6 @@ func (c *DefaultApiService) CreateCommand(params *CreateCommandParams) (*Wireles path := "/v1/Commands" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.CallbackMethod != nil { data.Set("CallbackMethod", *params.CallbackMethod) } @@ -113,6 +111,7 @@ func (c *DefaultApiService) CreateCommand(params *CreateCommandParams) (*Wireles if params != nil && params.Sim != nil { data.Set("Sim", *params.Sim) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -204,8 +203,6 @@ func (c *DefaultApiService) CreateRatePlan(params *CreateRatePlanParams) (*Wirel path := "/v1/RatePlans" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.DataEnabled != nil { data.Set("DataEnabled", fmt.Sprint(*params.DataEnabled)) } @@ -241,6 +238,7 @@ func (c *DefaultApiService) CreateRatePlan(params *CreateRatePlanParams) (*Wirel if params != nil && params.VoiceEnabled != nil { data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -411,8 +409,6 @@ func (c *DefaultApiService) ListAccountUsageRecord(params *ListAccountUsageRecor path := "/v1/UsageRecords" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.End != nil { data.Set("End", fmt.Sprint((*params.End).Format(time.RFC3339))) } @@ -425,6 +421,7 @@ func (c *DefaultApiService) ListAccountUsageRecord(params *ListAccountUsageRecor if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -481,8 +478,6 @@ func (c *DefaultApiService) ListCommand(params *ListCommandParams) (*ListCommand path := "/v1/Commands" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Sim != nil { data.Set("Sim", *params.Sim) } @@ -498,6 +493,7 @@ func (c *DefaultApiService) ListCommand(params *ListCommandParams) (*ListCommand if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -530,11 +526,10 @@ func (c *DefaultApiService) ListDataSession(SimSid string, params *ListDataSessi path = strings.Replace(path, "{"+"SimSid"+"}", SimSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -566,11 +561,10 @@ func (c *DefaultApiService) ListRatePlan(params *ListRatePlanParams) (*ListRateP path := "/v1/RatePlans" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -633,8 +627,6 @@ func (c *DefaultApiService) ListSim(params *ListSimParams) (*ListSimResponse, er path := "/v1/Sims" data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.Status != nil { data.Set("Status", *params.Status) } @@ -653,6 +645,7 @@ func (c *DefaultApiService) ListSim(params *ListSimParams) (*ListSimResponse, er if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -703,8 +696,6 @@ func (c *DefaultApiService) ListUsageRecord(SimSid string, params *ListUsageReco path = strings.Replace(path, "{"+"SimSid"+"}", SimSid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.End != nil { data.Set("End", fmt.Sprint((*params.End).Format(time.RFC3339))) } @@ -717,6 +708,7 @@ func (c *DefaultApiService) ListUsageRecord(SimSid string, params *ListUsageReco if params != nil && params.PageSize != nil { data.Set("PageSize", fmt.Sprint(*params.PageSize)) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) if err != nil { @@ -755,14 +747,13 @@ func (c *DefaultApiService) UpdateRatePlan(Sid string, params *UpdateRatePlanPar path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.FriendlyName != nil { data.Set("FriendlyName", *params.FriendlyName) } if params != nil && params.UniqueName != nil { data.Set("UniqueName", *params.UniqueName) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil { @@ -898,8 +889,6 @@ func (c *DefaultApiService) UpdateSim(Sid string, params *UpdateSimParams) (*Wir path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) data := url.Values{} - headers := make(map[string]interface{}) - if params != nil && params.AccountSid != nil { data.Set("AccountSid", *params.AccountSid) } @@ -954,6 +943,7 @@ func (c *DefaultApiService) UpdateSim(Sid string, params *UpdateSimParams) (*Wir if params != nil && params.VoiceUrl != nil { data.Set("VoiceUrl", *params.VoiceUrl) } + headers := make(map[string]interface{}) resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) if err != nil {