Class: HubSpotSDK::Resources::Conversations::CustomChannels
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Conversations::CustomChannels
- 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
- #channel_accounts ⇒ HubSpotSDK::Resources::Conversations::CustomChannels::ChannelAccounts readonly
- #messages ⇒ HubSpotSDK::Resources::Conversations::CustomChannels::Messages readonly
Instance Method Summary collapse
- #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
-
#delete(channel_id, request_options: {}) ⇒ nil
Archive an existing registered custom channel.
-
#get(channel_account_id, channel_id:, archived: nil, request_options: {}) ⇒ HubSpotSDK::Models::Conversations::PublicChannelAccount
Retrieve the details for a specific channel account.
-
#initialize(client:) ⇒ CustomChannels
constructor
private
A new instance of CustomChannels.
-
#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.
-
#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.
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.
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_accounts ⇒ HubSpotSDK::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 |
#messages ⇒ HubSpotSDK::Resources::Conversations::CustomChannels::Messages (readonly)
11 12 13 |
# File 'lib/hubspot_sdk/resources/conversations/custom_channels.rb', line 11 def @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
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, = HubSpotSDK::Conversations::CustomChannelCreateParams.dump_request(params) @client.request( method: :post, path: "conversations/custom-channels/2026-03", body: parsed, model: HubSpotSDK::Conversations::PublicChannelIntegrationChannel, options: ) end |
#delete(channel_id, request_options: {}) ⇒ nil
Archive an existing registered custom channel
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.
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(channel_account_id, params) parsed, = 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, channel_account_id ], query: query, model: HubSpotSDK::Conversations::PublicChannelAccount, 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.
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, = 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: ) 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.
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, = 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: ) end |