func (c *Client) UpdateChannel(chnl ChannelPayload, channelPath, channelID string) error {
	var channel = ChannelPayload{
		Name:           chnl.Name,
		ConnectionName: chnl.ConnectionName,
		TemplateName:   chnl.TemplateName,
		Properties:     chnl.Properties,
	}
	path := fmt.Sprintf("%s/%s", channelPath, channelID)
	payload, err := json.Marshal(channel)
	if err != nil {
		return err
	}
	resp, err := c.Do(http.MethodPut, path, contentTypeJSON, payload)
	if err != nil {
		return err
	}
	return resp.Body.Close()
}
UpdateChannel handles...take a guess
package api
import (
	"net/http"
	"encoding/json"
	"fmt"
	"net/url"
	"strconv"
)
type ChannelPayload struct {
	Name           string `json:"name" yaml:"name"`
	ConnectionName string `json:"connectionName" yaml:"connectionName"`
	TemplateName   string `json:"templateName" yaml:"templateName"`
	Properties     []KV   `json:"properties" yaml:"properties"`
}
type Channel struct {
	ID              string `json:"id,omitempty" yaml:"id" header:"Id,text"`
	Name            string `json:"name,omitempty" yaml:"name" header:"Name,text"`
	ConnectionName  string `json:"connectionName,omitempty" yaml:"connectionName" header:"Connection Name,text"`
	TemplateName    string `json:"templateName,omitempty" yaml:"templateName" header:"Template,text"`
	TemplateVersion int    `json:"templateVersion,omitempty" yaml:"templateVersion" header:"Template version"`
	Properties      []KV   `json:"properties,omitempty" yaml:"properties" header:"Properties,count"`
	CreatedAt       string `json:"createdAt,omitempty" yaml:"createdAt"`
	CreatedBy       string `json:"createdBy,omitempty" yaml:"createdBy"`
	UpdatedAt       string `json:"updatedAt,omitempty" yaml:"updatedAt"`
	UpdatedBy       string `json:"updatedBy,omitempty" yaml:"updatedBy"`
}
type ChannelWithDetails struct {
	ID              string `json:"id" yaml:"id" header:"Id,text"`
	Name            string `json:"name" yaml:"name" header:"Name,text"`
	ConnectionName  string `json:"connectionName" yaml:"connectionName" header:"Connection Name,text"`
	TemplateName    string `json:"templateName" yaml:"templateName" header:"Template,text"`
	TemplateVersion int    `json:"templateVersion,omitempty" yaml:"templateVersion" header:"Template version"`
	Properties      []KV   `json:"properties" yaml:"properties" header:"Properties"`
	CreatedAt       string `json:"createdAt" yaml:"createdAt" header:"Created at,date"`
	CreatedBy       string `json:"createdBy" yaml:"createdBy" header:"Created by,text"`
	UpdatedAt       string `json:"updatedAt" yaml:"updatedAt" header:"Updated at,date"`
	UpdatedBy       string `json:"updatedBy" yaml:"updatedBy" header:"Updated by,text"`
}
type ChannelResponse struct {
	PagesAmount int       `json:"pagesAmount" yaml:"pagesAmount" header:"Pages,text"`
	TotalCount  int       `json:"totalCount" yaml:"totalCount" header:"Total,text"`
	Values      []Channel `json:"values" yaml:"values" header:"Values,inline"`
}
type ChannelResponseWithDetails struct {
	PagesAmount int                  `json:"pagesAmount" yaml:"pagesAmount" header:"Pages,text"`
	TotalCount  int                  `json:"totalCount" yaml:"totalCount" header:"Total,text"`
	Values      []ChannelWithDetails `json:"values" yaml:"values" header:"Values,inline"`
}
func (c *Client) GetChannels(path string, page int, pageSize int, sortField, sortOrder, templateName, channelName string) (response ChannelResponse, err error) {
	queryString := constructQueryString(path, page, pageSize, sortField, sortOrder, templateName, channelName)
	resp, err := c.Do(http.MethodGet, queryString, contentTypeJSON, nil)
	if err != nil {
		return
	}
	defer resp.Body.Close()
	err = c.ReadJSON(resp, &response)
	return
}
func (c *Client) GetChannelsWithDetails(path string, page int, pageSize int, sortField, sortOrder, templateName, channelName string) (response ChannelResponseWithDetails, err error) {
	queryString := constructQueryString(path, page, pageSize, sortField, sortOrder, templateName, channelName)
	resp, err := c.Do(http.MethodGet, queryString, contentTypeJSON, nil)
	if err != nil {
		return
	}
	defer resp.Body.Close()
	err = c.ReadJSON(resp, &response)
	return
}
func (c *Client) CreateChannel(chnl ChannelPayload, channelPath string) error {
	var channel = ChannelPayload{
		Name:           chnl.Name,
		ConnectionName: chnl.ConnectionName,
		TemplateName:   chnl.TemplateName,
		Properties:     chnl.Properties,
	}
	payload, err := json.Marshal(channel)
	if err != nil {
		return err
	}
	resp, err := c.Do(http.MethodPost, channelPath, contentTypeJSON, payload)
	if err != nil {
		return err
	}
	return resp.Body.Close()
}