Class: MailchimpMarketing::ConversationsApi
- Inherits:
-
Object
- Object
- MailchimpMarketing::ConversationsApi
- Defined in:
- lib/MailchimpMarketing/api/conversations_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_conversation_message(conversation_id = {}, body = {}, opts = {}) ⇒ ConversationMessage
Post a new conversation message Post a new message to a conversation.
-
#create_conversation_message_with_http_info(conversation_id, body, opts = {}) ⇒ Array<(ConversationMessage, Fixnum, Hash)>
Post a new conversation message Post a new message to a conversation.
-
#get(conversation_id = {}, opts = {}) ⇒ Conversation
Get information about a conversation Get details about an individual conversation.
-
#get_conversation_message(conversation_id = {}, message_id = {}, opts = {}) ⇒ ConversationMessage
Get a specific conversation message Get an individual message in a conversation.
-
#get_conversation_message_with_http_info(conversation_id, message_id, opts = {}) ⇒ Array<(ConversationMessage, Fixnum, Hash)>
Get a specific conversation message Get an individual message in a conversation.
-
#get_conversation_messages(conversation_id = {}, opts = {}) ⇒ CollectionOfConversationMessages
Get conversation messages Get messages from a specific conversation.
-
#get_conversation_messages_with_http_info(conversation_id, opts = {}) ⇒ Array<(CollectionOfConversationMessages, Fixnum, Hash)>
Get conversation messages Get messages from a specific conversation.
-
#get_with_http_info(conversation_id, opts = {}) ⇒ Array<(Conversation, Fixnum, Hash)>
Get information about a conversation Get details about an individual conversation.
-
#initialize(api_client) ⇒ ConversationsApi
constructor
A new instance of ConversationsApi.
-
#list(opts = {}) ⇒ TrackedConversations
Get a list of conversations Get a list of conversations for the account.
-
#list_with_http_info(opts = {}) ⇒ Array<(TrackedConversations, Fixnum, Hash)>
Get a list of conversations Get a list of conversations for the account.
Constructor Details
#initialize(api_client) ⇒ ConversationsApi
Returns a new instance of ConversationsApi.
19 20 21 |
# File 'lib/MailchimpMarketing/api/conversations_api.rb', line 19 def initialize(api_client) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/MailchimpMarketing/api/conversations_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_conversation_message(conversation_id = {}, body = {}, opts = {}) ⇒ ConversationMessage
Post a new conversation message Post a new message to a conversation.
252 253 254 255 |
# File 'lib/MailchimpMarketing/api/conversations_api.rb', line 252 def (conversation_id = {}, body = {}, opts = {}) data, _status_code, _headers = (conversation_id, body, opts) data end |
#create_conversation_message_with_http_info(conversation_id, body, opts = {}) ⇒ Array<(ConversationMessage, Fixnum, Hash)>
Post a new conversation message Post a new message to a conversation.
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/MailchimpMarketing/api/conversations_api.rb', line 263 def (conversation_id, body, opts = {}) # resource path local_var_path = '/conversations/{conversation_id}/messages'.sub('{' + 'conversation_id' + '}', conversation_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ConversationMessage') return data, status_code, headers end |
#get(conversation_id = {}, opts = {}) ⇒ Conversation
Get information about a conversation Get details about an individual conversation.
92 93 94 95 |
# File 'lib/MailchimpMarketing/api/conversations_api.rb', line 92 def get(conversation_id = {}, opts = {}) data, _status_code, _headers = get_with_http_info(conversation_id, opts) data end |
#get_conversation_message(conversation_id = {}, message_id = {}, opts = {}) ⇒ ConversationMessage
Get a specific conversation message Get an individual message in a conversation.
202 203 204 205 |
# File 'lib/MailchimpMarketing/api/conversations_api.rb', line 202 def (conversation_id = {}, = {}, opts = {}) data, _status_code, _headers = (conversation_id, , opts) data end |
#get_conversation_message_with_http_info(conversation_id, message_id, opts = {}) ⇒ Array<(ConversationMessage, Fixnum, Hash)>
Get a specific conversation message Get an individual message in a conversation.
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/MailchimpMarketing/api/conversations_api.rb', line 215 def (conversation_id, , opts = {}) # resource path local_var_path = '/conversations/{conversation_id}/messages/{message_id}'.sub('{' + 'conversation_id' + '}', conversation_id.to_s).sub('{' + 'message_id' + '}', .to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ConversationMessage') return data, status_code, headers end |
#get_conversation_messages(conversation_id = {}, opts = {}) ⇒ CollectionOfConversationMessages
Get conversation messages Get messages from a specific conversation.
145 146 147 148 |
# File 'lib/MailchimpMarketing/api/conversations_api.rb', line 145 def (conversation_id = {}, opts = {}) data, _status_code, _headers = (conversation_id, opts) data end |
#get_conversation_messages_with_http_info(conversation_id, opts = {}) ⇒ Array<(CollectionOfConversationMessages, Fixnum, Hash)>
Get conversation messages Get messages from a specific conversation.
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/MailchimpMarketing/api/conversations_api.rb', line 160 def (conversation_id, opts = {}) # resource path local_var_path = '/conversations/{conversation_id}/messages'.sub('{' + 'conversation_id' + '}', conversation_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'is_read'] = opts[:'is_read'] if !opts[:'is_read'].nil? query_params[:'before_timestamp'] = opts[:'before_timestamp'] if !opts[:'before_timestamp'].nil? query_params[:'since_timestamp'] = opts[:'since_timestamp'] if !opts[:'since_timestamp'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CollectionOfConversationMessages') return data, status_code, headers end |
#get_with_http_info(conversation_id, opts = {}) ⇒ Array<(Conversation, Fixnum, Hash)>
Get information about a conversation Get details about an individual conversation.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/MailchimpMarketing/api/conversations_api.rb', line 104 def get_with_http_info(conversation_id, opts = {}) # resource path local_var_path = '/conversations/{conversation_id}'.sub('{' + 'conversation_id' + '}', conversation_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Conversation') return data, status_code, headers end |
#list(opts = {}) ⇒ TrackedConversations
Get a list of conversations Get a list of conversations for the account.
33 34 35 36 |
# File 'lib/MailchimpMarketing/api/conversations_api.rb', line 33 def list(opts = {}) data, _status_code, _headers = list_with_http_info(opts) data end |
#list_with_http_info(opts = {}) ⇒ Array<(TrackedConversations, Fixnum, Hash)>
Get a list of conversations Get a list of conversations for the account.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/MailchimpMarketing/api/conversations_api.rb', line 49 def list_with_http_info(opts = {}) # resource path local_var_path = '/conversations' # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'has_unread_messages'] = opts[:'has_unread_messages'] if !opts[:'has_unread_messages'].nil? query_params[:'list_id'] = opts[:'list_id'] if !opts[:'list_id'].nil? query_params[:'campaign_id'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TrackedConversations') return data, status_code, headers end |