Skip to content

Latest commit

 

History

History
245 lines (158 loc) · 12.4 KB

README.md

File metadata and controls

245 lines (158 loc) · 12.4 KB

Message

(message)

Overview

Available Operations

create_messaging_message

Create a message

Example Usage

require 'unified_ruby_sdk'

s = ::UnifiedRubySDK::UnifiedTo.new(
      security: ::UnifiedRubySDK::Shared::Security.new(
        jwt: "<YOUR_API_KEY_HERE>",
      ),
    )

res = s.message.create_messaging_message(messaging_message=::UnifiedRubySDK::Shared::MessagingMessage.new(), connection_id="<id>", fields_=[
  "<value>",
])

if ! res.messaging_message.nil?
  # handle response
end

Parameters

Parameter Type Required Description
messaging_message ::UnifiedRubySDK::Shared::MessagingMessage ✔️ N/A
connection_id ::String ✔️ ID of the connection
fields_ T::Array<::String> Comma-delimited fields to return

Response

T.nilable(::UnifiedRubySDK::Operations::CreateMessagingMessageResponse)

get_messaging_message

Retrieve a message

Example Usage

require 'unified_ruby_sdk'

s = ::UnifiedRubySDK::UnifiedTo.new(
      security: ::UnifiedRubySDK::Shared::Security.new(
        jwt: "<YOUR_API_KEY_HERE>",
      ),
    )

res = s.message.get_messaging_message(connection_id="<id>", id="<id>", fields_=[
  "<value>",
])

if ! res.messaging_message.nil?
  # handle response
end

Parameters

Parameter Type Required Description
connection_id ::String ✔️ ID of the connection
id ::String ✔️ ID of the Message
fields_ T::Array<::String> Comma-delimited fields to return

Response

T.nilable(::UnifiedRubySDK::Operations::GetMessagingMessageResponse)

list_messaging_messages

List all messages

Example Usage

require 'unified_ruby_sdk'

s = ::UnifiedRubySDK::UnifiedTo.new(
      security: ::UnifiedRubySDK::Shared::Security.new(
        jwt: "<YOUR_API_KEY_HERE>",
      ),
    )

req = ::UnifiedRubySDK::Operations::ListMessagingMessagesRequest.new(
  connection_id: "<id>",
)

res = s.message.list_messaging_messages(req)

if ! res.messaging_messages.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request ::UnifiedRubySDK::Operations::ListMessagingMessagesRequest ✔️ The request object to use for the request.

Response

T.nilable(::UnifiedRubySDK::Operations::ListMessagingMessagesResponse)

patch_messaging_message

Update a message

Example Usage

require 'unified_ruby_sdk'

s = ::UnifiedRubySDK::UnifiedTo.new(
      security: ::UnifiedRubySDK::Shared::Security.new(
        jwt: "<YOUR_API_KEY_HERE>",
      ),
    )

res = s.message.patch_messaging_message(messaging_message=::UnifiedRubySDK::Shared::MessagingMessage.new(), connection_id="<id>", id="<id>", fields_=[
  "<value>",
])

if ! res.messaging_message.nil?
  # handle response
end

Parameters

Parameter Type Required Description
messaging_message ::UnifiedRubySDK::Shared::MessagingMessage ✔️ N/A
connection_id ::String ✔️ ID of the connection
id ::String ✔️ ID of the Message
fields_ T::Array<::String> Comma-delimited fields to return

Response

T.nilable(::UnifiedRubySDK::Operations::PatchMessagingMessageResponse)

remove_messaging_message

Remove a message

Example Usage

require 'unified_ruby_sdk'

s = ::UnifiedRubySDK::UnifiedTo.new(
      security: ::UnifiedRubySDK::Shared::Security.new(
        jwt: "<YOUR_API_KEY_HERE>",
      ),
    )

res = s.message.remove_messaging_message(connection_id="<id>", id="<id>")

if res.status_code == 200
  # handle response
end

Parameters

Parameter Type Required Description
connection_id ::String ✔️ ID of the connection
id ::String ✔️ ID of the Message

Response

T.nilable(::UnifiedRubySDK::Operations::RemoveMessagingMessageResponse)

update_messaging_message

Update a message

Example Usage

require 'unified_ruby_sdk'

s = ::UnifiedRubySDK::UnifiedTo.new(
      security: ::UnifiedRubySDK::Shared::Security.new(
        jwt: "<YOUR_API_KEY_HERE>",
      ),
    )

res = s.message.update_messaging_message(messaging_message=::UnifiedRubySDK::Shared::MessagingMessage.new(), connection_id="<id>", id="<id>", fields_=[
  "<value>",
])

if ! res.messaging_message.nil?
  # handle response
end

Parameters

Parameter Type Required Description
messaging_message ::UnifiedRubySDK::Shared::MessagingMessage ✔️ N/A
connection_id ::String ✔️ ID of the connection
id ::String ✔️ ID of the Message
fields_ T::Array<::String> Comma-delimited fields to return

Response

T.nilable(::UnifiedRubySDK::Operations::UpdateMessagingMessageResponse)