Class: HubSpotSDK::Resources::Conversations::CustomChannels

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot_sdk/resources/conversations/custom_channels.rb,
lib/hubspot_sdk/resources/conversations/custom_channels/messages.rb,
lib/hubspot_sdk/resources/conversations/custom_channels/channel_accounts.rb

Defined Under Namespace

Classes: ChannelAccounts, Messages

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CustomChannels

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of CustomChannels.

Parameters:



155
156
157
158
159
160
# File 'lib/hubspot_sdk/resources/conversations/custom_channels.rb', line 155

def initialize(client:)
  @client = client
  @channel_accounts =
    HubSpotSDK::Resources::Conversations::CustomChannels::ChannelAccounts.new(client: client)
  @messages = HubSpotSDK::Resources::Conversations::CustomChannels::Messages.new(client: client)
end

Instance Attribute Details

#channel_accountsHubSpotSDK::Resources::Conversations::CustomChannels::ChannelAccounts (readonly)



8
9
10
# File 'lib/hubspot_sdk/resources/conversations/custom_channels.rb', line 8

def channel_accounts
  @channel_accounts
end

#messagesHubSpotSDK::Resources::Conversations::CustomChannels::Messages (readonly)



11
12
13
# File 'lib/hubspot_sdk/resources/conversations/custom_channels.rb', line 11

def messages
  @messages
end

Instance Method Details

#create(capabilities:, name:, channel_account_connection_redirect_url: nil, channel_description: nil, channel_logo_url: nil, webhook_url: nil, request_options: {}) ⇒ HubSpotSDK::Models::Conversations::PublicChannelIntegrationChannel

Parameters:

  • capabilities (Hash{Symbol=>Object})
  • name (String)
  • channel_account_connection_redirect_url (String)
  • channel_description (String)
  • channel_logo_url (String)
  • webhook_url (String)
  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



26
27
28
29
30
31
32
33
34
35
# File 'lib/hubspot_sdk/resources/conversations/custom_channels.rb', line 26

def create(params)
  parsed, options = HubSpotSDK::Conversations::CustomChannelCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "conversations/custom-channels/2026-03",
    body: parsed,
    model: HubSpotSDK::Conversations::PublicChannelIntegrationChannel,
    options: options
  )
end

#delete(channel_id, request_options: {}) ⇒ nil

Archive an existing registered custom channel

Parameters:

Returns:

  • (nil)

See Also:



106
107
108
109
110
111
112
113
# File 'lib/hubspot_sdk/resources/conversations/custom_channels.rb', line 106

def delete(channel_id, params = {})
  @client.request(
    method: :delete,
    path: ["conversations/custom-channels/2026-03/%1$s", channel_id],
    model: NilClass,
    options: params[:request_options]
  )
end

#get(channel_account_id, channel_id:, archived: nil, request_options: {}) ⇒ HubSpotSDK::Models::Conversations::PublicChannelAccount

Retrieve the details for a specific channel account. This contains all the metadata about your channel account, including its channel, associated inbox id, and delivery identifier information.

Parameters:

  • channel_account_id (Integer)

    Path param

  • channel_id (Integer)

    Path param

  • archived (Boolean)

    Query param: Whether to return only results that have been archived.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/hubspot_sdk/resources/conversations/custom_channels.rb', line 132

def get(, params)
  parsed, options = HubSpotSDK::Conversations::CustomChannelGetParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  channel_id =
    parsed.delete(:channel_id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: [
      "conversations/custom-channels/2026-03/%1$s/channel-accounts/%2$s",
      channel_id,
      
    ],
    query: query,
    model: HubSpotSDK::Conversations::PublicChannelAccount,
    options: options
  )
end

#list(after: nil, default_page_length: nil, limit: nil, sort: nil, request_options: {}) ⇒ HubSpotSDK::Internal::Page<HubSpotSDK::Models::Conversations::PublicChannelIntegrationChannel>

Some parameter documentations has been truncated, see Models::Conversations::CustomChannelListParams for more details.

Parameters:

  • after (String)

    The paging cursor token of the last successfully read resource will be returned

  • default_page_length (Integer)
  • limit (Integer)

    The maximum number of results to display per page.

  • sort (Array<String>)
  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/hubspot_sdk/resources/conversations/custom_channels.rb', line 83

def list(params = {})
  parsed, options = HubSpotSDK::Conversations::CustomChannelListParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "conversations/custom-channels/2026-03",
    query: query.transform_keys(default_page_length: "defaultPageLength"),
    page: HubSpotSDK::Internal::Page,
    model: HubSpotSDK::Conversations::PublicChannelIntegrationChannel,
    options: options
  )
end

#update(channel_id, capabilities:, channel_account_connection_redirect_url:, channel_description:, channel_logo_url:, name:, webhook_url:, request_options: {}) ⇒ HubSpotSDK::Models::Conversations::PublicChannelIntegrationChannel

Update the capabilities for an existing. You can also use it to update the channel’s webhookUri and its channelAccountConnectionRedirectUrl.

Parameters:

  • channel_id (Integer)
  • capabilities (Hash{Symbol=>Object})
  • channel_account_connection_redirect_url (Object)
  • channel_description (Object)
  • channel_logo_url (Object)
  • name (Object)
  • webhook_url (Object)
  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



54
55
56
57
58
59
60
61
62
63
# File 'lib/hubspot_sdk/resources/conversations/custom_channels.rb', line 54

def update(channel_id, params)
  parsed, options = HubSpotSDK::Conversations::CustomChannelUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["conversations/custom-channels/2026-03/%1$s", channel_id],
    body: parsed,
    model: HubSpotSDK::Conversations::PublicChannelIntegrationChannel,
    options: options
  )
end