Class: HubSpotSDK::Resources::Conversations::CustomChannels::Messages
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Conversations::CustomChannels::Messages
- Defined in:
- lib/hubspot_sdk/resources/conversations/custom_channels/messages.rb
Instance Method Summary collapse
-
#create(channel_id, attachments:, channel_account_id:, message_direction:, recipients:, senders:, text:, timestamp:, associate_with_contact_id: nil, in_reply_to_id: nil, integration_idempotency_id: nil, integration_thread_id: nil, pre_resolved_contacts: nil, rich_text: nil, request_options: {}) ⇒ HubSpotSDK::Models::Conversations::PublicConversationsMessage
Publish a message over your custom channel.
-
#get(message_id, channel_id:, request_options: {}) ⇒ HubSpotSDK::Models::Conversations::PublicConversationsMessage
Get the details for a specific message sent over a custom channel.
-
#initialize(client:) ⇒ Messages
constructor
private
A new instance of Messages.
-
#update(message_id, channel_id:, status_type:, error_message: nil, request_options: {}) ⇒ HubSpotSDK::Models::Conversations::PublicConversationsMessage
Update a message’s status to indicate if it was successfully sent, failed to send, or was read.
Constructor Details
#initialize(client:) ⇒ Messages
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 Messages.
104 105 106 |
# File 'lib/hubspot_sdk/resources/conversations/custom_channels/messages.rb', line 104 def initialize(client:) @client = client end |
Instance Method Details
#create(channel_id, attachments:, channel_account_id:, message_direction:, recipients:, senders:, text:, timestamp:, associate_with_contact_id: nil, in_reply_to_id: nil, integration_idempotency_id: nil, integration_thread_id: nil, pre_resolved_contacts: nil, rich_text: nil, request_options: {}) ⇒ HubSpotSDK::Models::Conversations::PublicConversationsMessage
Publish a message over your custom channel
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/hubspot_sdk/resources/conversations/custom_channels/messages.rb', line 31 def create(channel_id, params) parsed, = HubSpotSDK::Conversations::CustomChannels::MessageCreateParams.dump_request(params) @client.request( method: :post, path: ["conversations/custom-channels/2026-03/%1$s/messages", channel_id], body: parsed, model: HubSpotSDK::Conversations::PublicConversationsMessage, options: ) end |
#get(message_id, channel_id:, request_options: {}) ⇒ HubSpotSDK::Models::Conversations::PublicConversationsMessage
Get the details for a specific message sent over a custom channel
87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/hubspot_sdk/resources/conversations/custom_channels/messages.rb', line 87 def get(, params) parsed, = HubSpotSDK::Conversations::CustomChannels::MessageGetParams.dump_request(params) 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/messages/%2$s", channel_id, ], model: HubSpotSDK::Conversations::PublicConversationsMessage, options: ) end |
#update(message_id, channel_id:, status_type:, error_message: nil, request_options: {}) ⇒ HubSpotSDK::Models::Conversations::PublicConversationsMessage
Update a message’s status to indicate if it was successfully sent, failed to send, or was read. For failed messages, this can also include the error message for the failure.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/hubspot_sdk/resources/conversations/custom_channels/messages.rb', line 61 def update(, params) parsed, = HubSpotSDK::Conversations::CustomChannels::MessageUpdateParams.dump_request(params) channel_id = parsed.delete(:channel_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :patch, path: ["conversations/custom-channels/2026-03/%1$s/messages/%2$s", channel_id, ], body: parsed, model: HubSpotSDK::Conversations::PublicConversationsMessage, options: ) end |