// Update an Event for a Subscription.
Update an Event for a Subscription.
// Update an Event for a Subscription .
func (c *DefaultApiService) UpdateSubscribedEvent(SubscriptionSid string, Type string, params *UpdateSubscribedEventParams) (*EventsV1SubscriptionSubscribedEvent, error) {
	path := "/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents/{Type}"
	path = strings.Replace(path, "{"+"SubscriptionSid"+"}", SubscriptionSid, -1)
	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))
	}
	resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &EventsV1SubscriptionSubscribedEvent{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
func ( c * DefaultApiService ) UpdateSubscribedEvent ( SubscriptionSid string , Type string , params * UpdateSubscribedEventParams ) ( * EventsV1SubscriptionSubscribedEvent , error ) { path := " " path = strings . Replace ( path , " " + " " + " " , SubscriptionSid , - 1 ) path = strings . Replace ( path , " " + " " + " " , Type , - 1 ) data := url . Values { } headers := make ( map [ string ] interface { } ) if params != nil && params . SchemaVersion != nil { data . Set ( " " , fmt . Sprint ( * params . SchemaVersion ) ) } resp , err := c . requestHandler . Post ( c . baseURL + path , data , headers ) if err != nil { return nil , err } defer resp . Body . Close ( ) ps := & EventsV1SubscriptionSubscribedEvent { } if err := json . NewDecoder ( resp . Body ) . Decode ( ps ) ; err != nil { return nil , err } return ps , err }
Update an Event for a Subscription.
Update an Event for a Subscription .