Class: Zyphr::InboxApi
- Inherits:
-
Object
- Object
- Zyphr::InboxApi
- Defined in:
- lib/zyphr/api/inbox_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#archive_inbox_notification(id, opts = {}) ⇒ InboxNotificationResponse
Archive a notification Archive a specific in-app notification.
-
#archive_inbox_notification_with_http_info(id, opts = {}) ⇒ Array<(InboxNotificationResponse, Integer, Hash)>
Archive a notification Archive a specific in-app notification.
-
#archive_subscriber_notification(id, opts = {}) ⇒ GetSubscriberNotification200Response
Archive a notification.
-
#archive_subscriber_notification_with_http_info(id, opts = {}) ⇒ Array<(GetSubscriberNotification200Response, Integer, Hash)>
Archive a notification.
-
#delete_inbox_notification(id, opts = {}) ⇒ nil
Delete a notification Permanently delete an in-app notification.
-
#delete_inbox_notification_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a notification Permanently delete an in-app notification.
-
#delete_subscriber_notification(id, opts = {}) ⇒ nil
Delete a notification.
-
#delete_subscriber_notification_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a notification.
-
#generate_subscriber_token(generate_subscriber_token_request, opts = {}) ⇒ GenerateSubscriberToken200Response
Generate a subscriber token Generate a JWT token for client-side inbox authentication.
-
#generate_subscriber_token_with_http_info(generate_subscriber_token_request, opts = {}) ⇒ Array<(GenerateSubscriberToken200Response, Integer, Hash)>
Generate a subscriber token Generate a JWT token for client-side inbox authentication.
-
#get_inbox_notification(id, opts = {}) ⇒ InboxNotificationResponse
Get a notification Get a specific in-app notification by ID.
-
#get_inbox_notification_with_http_info(id, opts = {}) ⇒ Array<(InboxNotificationResponse, Integer, Hash)>
Get a notification Get a specific in-app notification by ID.
-
#get_subscriber_inbox_preferences(opts = {}) ⇒ GetSubscriberInboxPreferences200Response
Get subscriber preferences Get notification preferences grouped by category for the authenticated subscriber.
-
#get_subscriber_inbox_preferences_with_http_info(opts = {}) ⇒ Array<(GetSubscriberInboxPreferences200Response, Integer, Hash)>
Get subscriber preferences Get notification preferences grouped by category for the authenticated subscriber.
-
#get_subscriber_notification(id, opts = {}) ⇒ GetSubscriberNotification200Response
Get a notification Get a specific notification by ID for the authenticated subscriber.
-
#get_subscriber_notification_with_http_info(id, opts = {}) ⇒ Array<(GetSubscriberNotification200Response, Integer, Hash)>
Get a notification Get a specific notification by ID for the authenticated subscriber.
-
#get_subscriber_unread_count(opts = {}) ⇒ GetSubscriberUnreadCount200Response
Get unread count Get the unread notification count for the authenticated subscriber.
-
#get_subscriber_unread_count_with_http_info(opts = {}) ⇒ Array<(GetSubscriberUnreadCount200Response, Integer, Hash)>
Get unread count Get the unread notification count for the authenticated subscriber.
-
#get_unread_count(opts = {}) ⇒ UnreadCountResponse
Get unread notification count Get the count of unread in-app notifications for a subscriber.
-
#get_unread_count_with_http_info(opts = {}) ⇒ Array<(UnreadCountResponse, Integer, Hash)>
Get unread notification count Get the count of unread in-app notifications for a subscriber.
-
#initialize(api_client = ApiClient.default) ⇒ InboxApi
constructor
A new instance of InboxApi.
-
#list_all_inbox(opts = {}) ⇒ InboxListResponse
List all project notifications List all in-app notifications for the current project.
-
#list_all_inbox_with_http_info(opts = {}) ⇒ Array<(InboxListResponse, Integer, Hash)>
List all project notifications List all in-app notifications for the current project.
-
#list_inbox(opts = {}) ⇒ InboxListResponse
List inbox notifications Retrieve in-app notifications for a subscriber.
-
#list_inbox_with_http_info(opts = {}) ⇒ Array<(InboxListResponse, Integer, Hash)>
List inbox notifications Retrieve in-app notifications for a subscriber.
-
#list_subscriber_notifications(opts = {}) ⇒ InboxListResponse
List subscriber notifications List notifications for the authenticated subscriber.
-
#list_subscriber_notifications_with_http_info(opts = {}) ⇒ Array<(InboxListResponse, Integer, Hash)>
List subscriber notifications List notifications for the authenticated subscriber.
-
#mark_all_inbox_read(mark_all_inbox_read_request, opts = {}) ⇒ MarkAllReadResponse
Mark all notifications as read Mark all unread in-app notifications as read for a subscriber.
-
#mark_all_inbox_read_with_http_info(mark_all_inbox_read_request, opts = {}) ⇒ Array<(MarkAllReadResponse, Integer, Hash)>
Mark all notifications as read Mark all unread in-app notifications as read for a subscriber.
-
#mark_all_subscriber_notifications_read(opts = {}) ⇒ MarkAllSubscriberNotificationsRead200Response
Mark all notifications as read.
-
#mark_all_subscriber_notifications_read_with_http_info(opts = {}) ⇒ Array<(MarkAllSubscriberNotificationsRead200Response, Integer, Hash)>
Mark all notifications as read.
-
#mark_inbox_read(id, opts = {}) ⇒ InboxNotificationResponse
Mark notification as read Mark a specific in-app notification as read.
-
#mark_inbox_read_with_http_info(id, opts = {}) ⇒ Array<(InboxNotificationResponse, Integer, Hash)>
Mark notification as read Mark a specific in-app notification as read.
-
#mark_subscriber_notification_read(id, opts = {}) ⇒ GetSubscriberNotification200Response
Mark notification as read.
-
#mark_subscriber_notification_read_with_http_info(id, opts = {}) ⇒ Array<(GetSubscriberNotification200Response, Integer, Hash)>
Mark notification as read.
-
#send_batch_in_app(send_batch_in_app_request, opts = {}) ⇒ SendBatchInAppResponse
Send batch in-app notifications Send in-app notifications to multiple subscribers in a single request (max 100).
-
#send_batch_in_app_with_http_info(send_batch_in_app_request, opts = {}) ⇒ Array<(SendBatchInAppResponse, Integer, Hash)>
Send batch in-app notifications Send in-app notifications to multiple subscribers in a single request (max 100).
-
#send_in_app(send_in_app_request, opts = {}) ⇒ SendInAppResponse
Send an in-app notification Create and deliver an in-app notification to a subscriber.
-
#send_in_app_with_http_info(send_in_app_request, opts = {}) ⇒ Array<(SendInAppResponse, Integer, Hash)>
Send an in-app notification Create and deliver an in-app notification to a subscriber.
-
#update_subscriber_preferences(update_subscriber_preferences_request, opts = {}) ⇒ UpdateSubscriberPreferences200Response
Update subscriber preferences Update notification channel preferences for specific categories or globally.
-
#update_subscriber_preferences_with_http_info(update_subscriber_preferences_request, opts = {}) ⇒ Array<(UpdateSubscriberPreferences200Response, Integer, Hash)>
Update subscriber preferences Update notification channel preferences for specific categories or globally.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/zyphr/api/inbox_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#archive_inbox_notification(id, opts = {}) ⇒ InboxNotificationResponse
Archive a notification Archive a specific in-app notification.
28 29 30 31 |
# File 'lib/zyphr/api/inbox_api.rb', line 28 def archive_inbox_notification(id, opts = {}) data, _status_code, _headers = archive_inbox_notification_with_http_info(id, opts) data end |
#archive_inbox_notification_with_http_info(id, opts = {}) ⇒ Array<(InboxNotificationResponse, Integer, Hash)>
Archive a notification Archive a specific in-app notification.
39 40 41 42 43 44 45 46 47 48 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 85 86 87 88 89 90 |
# File 'lib/zyphr/api/inbox_api.rb', line 39 def archive_inbox_notification_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.archive_inbox_notification ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling InboxApi.archive_inbox_notification" end # resource path local_var_path = '/inbox/{id}/archive'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'mark_inbox_read_request']) # return_type return_type = opts[:debug_return_type] || 'InboxNotificationResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"InboxApi.archive_inbox_notification", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#archive_inbox_notification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#archive_subscriber_notification(id, opts = {}) ⇒ GetSubscriberNotification200Response
Archive a notification
96 97 98 99 |
# File 'lib/zyphr/api/inbox_api.rb', line 96 def archive_subscriber_notification(id, opts = {}) data, _status_code, _headers = archive_subscriber_notification_with_http_info(id, opts) data end |
#archive_subscriber_notification_with_http_info(id, opts = {}) ⇒ Array<(GetSubscriberNotification200Response, Integer, Hash)>
Archive a notification
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 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/zyphr/api/inbox_api.rb', line 105 def archive_subscriber_notification_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.archive_subscriber_notification ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling InboxApi.archive_subscriber_notification" end # resource path local_var_path = '/subscriber-inbox/{id}/archive'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetSubscriberNotification200Response' # auth_names auth_names = opts[:debug_auth_names] || ['EndUserToken'] = opts.merge( :operation => :"InboxApi.archive_subscriber_notification", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#archive_subscriber_notification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_inbox_notification(id, opts = {}) ⇒ nil
Delete a notification Permanently delete an in-app notification.
160 161 162 163 |
# File 'lib/zyphr/api/inbox_api.rb', line 160 def delete_inbox_notification(id, opts = {}) delete_inbox_notification_with_http_info(id, opts) nil end |
#delete_inbox_notification_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a notification Permanently delete an in-app notification.
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
# File 'lib/zyphr/api/inbox_api.rb', line 172 def delete_inbox_notification_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.delete_inbox_notification ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling InboxApi.delete_inbox_notification" end # resource path local_var_path = '/inbox/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'subscriber_id'] = opts[:'subscriber_id'] if !opts[:'subscriber_id'].nil? query_params[:'external_id'] = opts[:'external_id'] if !opts[:'external_id'].nil? # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"InboxApi.delete_inbox_notification", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#delete_inbox_notification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_subscriber_notification(id, opts = {}) ⇒ nil
Delete a notification
224 225 226 227 |
# File 'lib/zyphr/api/inbox_api.rb', line 224 def delete_subscriber_notification(id, opts = {}) delete_subscriber_notification_with_http_info(id, opts) nil end |
#delete_subscriber_notification_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a notification
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/zyphr/api/inbox_api.rb', line 233 def delete_subscriber_notification_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.delete_subscriber_notification ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling InboxApi.delete_subscriber_notification" end # resource path local_var_path = '/subscriber-inbox/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['EndUserToken'] = opts.merge( :operation => :"InboxApi.delete_subscriber_notification", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#delete_subscriber_notification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#generate_subscriber_token(generate_subscriber_token_request, opts = {}) ⇒ GenerateSubscriberToken200Response
Generate a subscriber token
Generate a JWT token for client-side inbox authentication. This is a server-side call that requires your API key. Pass the returned token to @zyphr-dev/inbox-react's <ZyphrProvider subscriberToken=\"...\"> or use it as Authorization: Bearer <token> for client-side inbox API calls and WebSocket connections. The token expires in 7 days.
284 285 286 287 |
# File 'lib/zyphr/api/inbox_api.rb', line 284 def generate_subscriber_token(generate_subscriber_token_request, opts = {}) data, _status_code, _headers = generate_subscriber_token_with_http_info(generate_subscriber_token_request, opts) data end |
#generate_subscriber_token_with_http_info(generate_subscriber_token_request, opts = {}) ⇒ Array<(GenerateSubscriberToken200Response, Integer, Hash)>
Generate a subscriber token Generate a JWT token for client-side inbox authentication. This is a server-side call that requires your API key. Pass the returned token to `@zyphr-dev/inbox-react`'s `<ZyphrProvider subscriberToken="...">` or use it as `Authorization: Bearer <token>` for client-side inbox API calls and WebSocket connections. The token expires in 7 days.
294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/zyphr/api/inbox_api.rb', line 294 def generate_subscriber_token_with_http_info(generate_subscriber_token_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.generate_subscriber_token ...' end # verify the required parameter 'generate_subscriber_token_request' is set if @api_client.config.client_side_validation && generate_subscriber_token_request.nil? fail ArgumentError, "Missing the required parameter 'generate_subscriber_token_request' when calling InboxApi.generate_subscriber_token" end # resource path local_var_path = '/subscriber-inbox/token' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(generate_subscriber_token_request) # return_type return_type = opts[:debug_return_type] || 'GenerateSubscriberToken200Response' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"InboxApi.generate_subscriber_token", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#generate_subscriber_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_inbox_notification(id, opts = {}) ⇒ InboxNotificationResponse
Get a notification Get a specific in-app notification by ID.
354 355 356 357 |
# File 'lib/zyphr/api/inbox_api.rb', line 354 def get_inbox_notification(id, opts = {}) data, _status_code, _headers = get_inbox_notification_with_http_info(id, opts) data end |
#get_inbox_notification_with_http_info(id, opts = {}) ⇒ Array<(InboxNotificationResponse, Integer, Hash)>
Get a notification Get a specific in-app notification by ID.
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 |
# File 'lib/zyphr/api/inbox_api.rb', line 366 def get_inbox_notification_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.get_inbox_notification ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling InboxApi.get_inbox_notification" end # resource path local_var_path = '/inbox/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'subscriber_id'] = opts[:'subscriber_id'] if !opts[:'subscriber_id'].nil? query_params[:'external_id'] = opts[:'external_id'] if !opts[:'external_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'InboxNotificationResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"InboxApi.get_inbox_notification", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#get_inbox_notification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_subscriber_inbox_preferences(opts = {}) ⇒ GetSubscriberInboxPreferences200Response
Get subscriber preferences Get notification preferences grouped by category for the authenticated subscriber.
420 421 422 423 |
# File 'lib/zyphr/api/inbox_api.rb', line 420 def get_subscriber_inbox_preferences(opts = {}) data, _status_code, _headers = get_subscriber_inbox_preferences_with_http_info(opts) data end |
#get_subscriber_inbox_preferences_with_http_info(opts = {}) ⇒ Array<(GetSubscriberInboxPreferences200Response, Integer, Hash)>
Get subscriber preferences Get notification preferences grouped by category for the authenticated subscriber.
429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 |
# File 'lib/zyphr/api/inbox_api.rb', line 429 def get_subscriber_inbox_preferences_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.get_subscriber_inbox_preferences ...' end # resource path local_var_path = '/subscriber-inbox/preferences' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetSubscriberInboxPreferences200Response' # auth_names auth_names = opts[:debug_auth_names] || ['EndUserToken'] = opts.merge( :operation => :"InboxApi.get_subscriber_inbox_preferences", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#get_subscriber_inbox_preferences\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_subscriber_notification(id, opts = {}) ⇒ GetSubscriberNotification200Response
Get a notification Get a specific notification by ID for the authenticated subscriber.
478 479 480 481 |
# File 'lib/zyphr/api/inbox_api.rb', line 478 def get_subscriber_notification(id, opts = {}) data, _status_code, _headers = get_subscriber_notification_with_http_info(id, opts) data end |
#get_subscriber_notification_with_http_info(id, opts = {}) ⇒ Array<(GetSubscriberNotification200Response, Integer, Hash)>
Get a notification Get a specific notification by ID for the authenticated subscriber.
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 |
# File 'lib/zyphr/api/inbox_api.rb', line 488 def get_subscriber_notification_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.get_subscriber_notification ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling InboxApi.get_subscriber_notification" end # resource path local_var_path = '/subscriber-inbox/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetSubscriberNotification200Response' # auth_names auth_names = opts[:debug_auth_names] || ['EndUserToken'] = opts.merge( :operation => :"InboxApi.get_subscriber_notification", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#get_subscriber_notification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_subscriber_unread_count(opts = {}) ⇒ GetSubscriberUnreadCount200Response
Get unread count Get the unread notification count for the authenticated subscriber.
540 541 542 543 |
# File 'lib/zyphr/api/inbox_api.rb', line 540 def get_subscriber_unread_count(opts = {}) data, _status_code, _headers = get_subscriber_unread_count_with_http_info(opts) data end |
#get_subscriber_unread_count_with_http_info(opts = {}) ⇒ Array<(GetSubscriberUnreadCount200Response, Integer, Hash)>
Get unread count Get the unread notification count for the authenticated subscriber.
549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 |
# File 'lib/zyphr/api/inbox_api.rb', line 549 def get_subscriber_unread_count_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.get_subscriber_unread_count ...' end # resource path local_var_path = '/subscriber-inbox/unread-count' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetSubscriberUnreadCount200Response' # auth_names auth_names = opts[:debug_auth_names] || ['EndUserToken'] = opts.merge( :operation => :"InboxApi.get_subscriber_unread_count", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#get_subscriber_unread_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_unread_count(opts = {}) ⇒ UnreadCountResponse
Get unread notification count Get the count of unread in-app notifications for a subscriber.
599 600 601 602 |
# File 'lib/zyphr/api/inbox_api.rb', line 599 def get_unread_count(opts = {}) data, _status_code, _headers = get_unread_count_with_http_info(opts) data end |
#get_unread_count_with_http_info(opts = {}) ⇒ Array<(UnreadCountResponse, Integer, Hash)>
Get unread notification count Get the count of unread in-app notifications for a subscriber.
610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 |
# File 'lib/zyphr/api/inbox_api.rb', line 610 def get_unread_count_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.get_unread_count ...' end # resource path local_var_path = '/inbox/unread-count' # query parameters query_params = opts[:query_params] || {} query_params[:'subscriber_id'] = opts[:'subscriber_id'] if !opts[:'subscriber_id'].nil? query_params[:'external_id'] = opts[:'external_id'] if !opts[:'external_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UnreadCountResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"InboxApi.get_unread_count", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#get_unread_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_all_inbox(opts = {}) ⇒ InboxListResponse
List all project notifications List all in-app notifications for the current project. Used by the dashboard to display all notifications without requiring a subscriber selection.
666 667 668 669 |
# File 'lib/zyphr/api/inbox_api.rb', line 666 def list_all_inbox(opts = {}) data, _status_code, _headers = list_all_inbox_with_http_info(opts) data end |
#list_all_inbox_with_http_info(opts = {}) ⇒ Array<(InboxListResponse, Integer, Hash)>
List all project notifications List all in-app notifications for the current project. Used by the dashboard to display all notifications without requiring a subscriber selection.
681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 |
# File 'lib/zyphr/api/inbox_api.rb', line 681 def list_all_inbox_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.list_all_inbox ...' end allowable_values = ["unread", "read", "archived"] if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling InboxApi.list_all_inbox, must be smaller than or equal to 100.' end # resource path local_var_path = '/inbox/all' # query parameters query_params = opts[:query_params] || {} query_params[:'subscriber_id'] = opts[:'subscriber_id'] if !opts[:'subscriber_id'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil? query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'InboxListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"InboxApi.list_all_inbox", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#list_all_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_inbox(opts = {}) ⇒ InboxListResponse
List inbox notifications Retrieve in-app notifications for a subscriber. Requires subscriber_id or external_id.
751 752 753 754 |
# File 'lib/zyphr/api/inbox_api.rb', line 751 def list_inbox(opts = {}) data, _status_code, _headers = list_inbox_with_http_info(opts) data end |
#list_inbox_with_http_info(opts = {}) ⇒ Array<(InboxListResponse, Integer, Hash)>
List inbox notifications Retrieve in-app notifications for a subscriber. Requires subscriber_id or external_id.
768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 |
# File 'lib/zyphr/api/inbox_api.rb', line 768 def list_inbox_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.list_inbox ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling InboxApi.list_inbox, must be smaller than or equal to 100.' end # resource path local_var_path = '/inbox' # query parameters query_params = opts[:query_params] || {} query_params[:'subscriber_id'] = opts[:'subscriber_id'] if !opts[:'subscriber_id'].nil? query_params[:'external_id'] = opts[:'external_id'] if !opts[:'external_id'].nil? query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil? query_params[:'include_read'] = opts[:'include_read'] if !opts[:'include_read'].nil? query_params[:'include_archived'] = opts[:'include_archived'] if !opts[:'include_archived'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'InboxListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"InboxApi.list_inbox", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#list_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_subscriber_notifications(opts = {}) ⇒ InboxListResponse
List subscriber notifications List notifications for the authenticated subscriber. Supports cursor-based pagination.
833 834 835 836 |
# File 'lib/zyphr/api/inbox_api.rb', line 833 def list_subscriber_notifications(opts = {}) data, _status_code, _headers = list_subscriber_notifications_with_http_info(opts) data end |
#list_subscriber_notifications_with_http_info(opts = {}) ⇒ Array<(InboxListResponse, Integer, Hash)>
List subscriber notifications List notifications for the authenticated subscriber. Supports cursor-based pagination.
847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 |
# File 'lib/zyphr/api/inbox_api.rb', line 847 def list_subscriber_notifications_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.list_subscriber_notifications ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling InboxApi.list_subscriber_notifications, must be smaller than or equal to 100.' end # resource path local_var_path = '/subscriber-inbox' # query parameters query_params = opts[:query_params] || {} query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil? query_params[:'include_read'] = opts[:'include_read'] if !opts[:'include_read'].nil? query_params[:'include_archived'] = opts[:'include_archived'] if !opts[:'include_archived'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'InboxListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['EndUserToken'] = opts.merge( :operation => :"InboxApi.list_subscriber_notifications", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#list_subscriber_notifications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mark_all_inbox_read(mark_all_inbox_read_request, opts = {}) ⇒ MarkAllReadResponse
Mark all notifications as read Mark all unread in-app notifications as read for a subscriber. Optionally filter by category.
905 906 907 908 |
# File 'lib/zyphr/api/inbox_api.rb', line 905 def mark_all_inbox_read(mark_all_inbox_read_request, opts = {}) data, _status_code, _headers = mark_all_inbox_read_with_http_info(mark_all_inbox_read_request, opts) data end |
#mark_all_inbox_read_with_http_info(mark_all_inbox_read_request, opts = {}) ⇒ Array<(MarkAllReadResponse, Integer, Hash)>
Mark all notifications as read Mark all unread in-app notifications as read for a subscriber. Optionally filter by category.
915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 |
# File 'lib/zyphr/api/inbox_api.rb', line 915 def mark_all_inbox_read_with_http_info(mark_all_inbox_read_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.mark_all_inbox_read ...' end # verify the required parameter 'mark_all_inbox_read_request' is set if @api_client.config.client_side_validation && mark_all_inbox_read_request.nil? fail ArgumentError, "Missing the required parameter 'mark_all_inbox_read_request' when calling InboxApi.mark_all_inbox_read" end # resource path local_var_path = '/inbox/read-all' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(mark_all_inbox_read_request) # return_type return_type = opts[:debug_return_type] || 'MarkAllReadResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"InboxApi.mark_all_inbox_read", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#mark_all_inbox_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mark_all_subscriber_notifications_read(opts = {}) ⇒ MarkAllSubscriberNotificationsRead200Response
Mark all notifications as read
972 973 974 975 |
# File 'lib/zyphr/api/inbox_api.rb', line 972 def mark_all_subscriber_notifications_read(opts = {}) data, _status_code, _headers = mark_all_subscriber_notifications_read_with_http_info(opts) data end |
#mark_all_subscriber_notifications_read_with_http_info(opts = {}) ⇒ Array<(MarkAllSubscriberNotificationsRead200Response, Integer, Hash)>
Mark all notifications as read
981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 |
# File 'lib/zyphr/api/inbox_api.rb', line 981 def mark_all_subscriber_notifications_read_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.mark_all_subscriber_notifications_read ...' end # resource path local_var_path = '/subscriber-inbox/read-all' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'mark_all_subscriber_notifications_read_request']) # return_type return_type = opts[:debug_return_type] || 'MarkAllSubscriberNotificationsRead200Response' # auth_names auth_names = opts[:debug_auth_names] || ['EndUserToken'] = opts.merge( :operation => :"InboxApi.mark_all_subscriber_notifications_read", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#mark_all_subscriber_notifications_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mark_inbox_read(id, opts = {}) ⇒ InboxNotificationResponse
Mark notification as read Mark a specific in-app notification as read.
1036 1037 1038 1039 |
# File 'lib/zyphr/api/inbox_api.rb', line 1036 def mark_inbox_read(id, opts = {}) data, _status_code, _headers = mark_inbox_read_with_http_info(id, opts) data end |
#mark_inbox_read_with_http_info(id, opts = {}) ⇒ Array<(InboxNotificationResponse, Integer, Hash)>
Mark notification as read Mark a specific in-app notification as read.
1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 |
# File 'lib/zyphr/api/inbox_api.rb', line 1047 def mark_inbox_read_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.mark_inbox_read ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling InboxApi.mark_inbox_read" end # resource path local_var_path = '/inbox/{id}/read'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'mark_inbox_read_request']) # return_type return_type = opts[:debug_return_type] || 'InboxNotificationResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"InboxApi.mark_inbox_read", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#mark_inbox_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mark_subscriber_notification_read(id, opts = {}) ⇒ GetSubscriberNotification200Response
Mark notification as read
1104 1105 1106 1107 |
# File 'lib/zyphr/api/inbox_api.rb', line 1104 def mark_subscriber_notification_read(id, opts = {}) data, _status_code, _headers = mark_subscriber_notification_read_with_http_info(id, opts) data end |
#mark_subscriber_notification_read_with_http_info(id, opts = {}) ⇒ Array<(GetSubscriberNotification200Response, Integer, Hash)>
Mark notification as read
1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 |
# File 'lib/zyphr/api/inbox_api.rb', line 1113 def mark_subscriber_notification_read_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.mark_subscriber_notification_read ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling InboxApi.mark_subscriber_notification_read" end # resource path local_var_path = '/subscriber-inbox/{id}/read'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetSubscriberNotification200Response' # auth_names auth_names = opts[:debug_auth_names] || ['EndUserToken'] = opts.merge( :operation => :"InboxApi.mark_subscriber_notification_read", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#mark_subscriber_notification_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_batch_in_app(send_batch_in_app_request, opts = {}) ⇒ SendBatchInAppResponse
Send batch in-app notifications Send in-app notifications to multiple subscribers in a single request (max 100).
1166 1167 1168 1169 |
# File 'lib/zyphr/api/inbox_api.rb', line 1166 def send_batch_in_app(send_batch_in_app_request, opts = {}) data, _status_code, _headers = send_batch_in_app_with_http_info(send_batch_in_app_request, opts) data end |
#send_batch_in_app_with_http_info(send_batch_in_app_request, opts = {}) ⇒ Array<(SendBatchInAppResponse, Integer, Hash)>
Send batch in-app notifications Send in-app notifications to multiple subscribers in a single request (max 100).
1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 |
# File 'lib/zyphr/api/inbox_api.rb', line 1176 def send_batch_in_app_with_http_info(send_batch_in_app_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.send_batch_in_app ...' end # verify the required parameter 'send_batch_in_app_request' is set if @api_client.config.client_side_validation && send_batch_in_app_request.nil? fail ArgumentError, "Missing the required parameter 'send_batch_in_app_request' when calling InboxApi.send_batch_in_app" end # resource path local_var_path = '/inbox/send/batch' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(send_batch_in_app_request) # return_type return_type = opts[:debug_return_type] || 'SendBatchInAppResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"InboxApi.send_batch_in_app", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#send_batch_in_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_in_app(send_in_app_request, opts = {}) ⇒ SendInAppResponse
Send an in-app notification Create and deliver an in-app notification to a subscriber. Checks subscriber preferences before delivery.
1234 1235 1236 1237 |
# File 'lib/zyphr/api/inbox_api.rb', line 1234 def send_in_app(send_in_app_request, opts = {}) data, _status_code, _headers = send_in_app_with_http_info(send_in_app_request, opts) data end |
#send_in_app_with_http_info(send_in_app_request, opts = {}) ⇒ Array<(SendInAppResponse, Integer, Hash)>
Send an in-app notification Create and deliver an in-app notification to a subscriber. Checks subscriber preferences before delivery.
1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 |
# File 'lib/zyphr/api/inbox_api.rb', line 1244 def send_in_app_with_http_info(send_in_app_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.send_in_app ...' end # verify the required parameter 'send_in_app_request' is set if @api_client.config.client_side_validation && send_in_app_request.nil? fail ArgumentError, "Missing the required parameter 'send_in_app_request' when calling InboxApi.send_in_app" end # resource path local_var_path = '/inbox/send' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(send_in_app_request) # return_type return_type = opts[:debug_return_type] || 'SendInAppResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"InboxApi.send_in_app", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#send_in_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_subscriber_preferences(update_subscriber_preferences_request, opts = {}) ⇒ UpdateSubscriberPreferences200Response
Update subscriber preferences Update notification channel preferences for specific categories or globally.
1302 1303 1304 1305 |
# File 'lib/zyphr/api/inbox_api.rb', line 1302 def update_subscriber_preferences(update_subscriber_preferences_request, opts = {}) data, _status_code, _headers = update_subscriber_preferences_with_http_info(update_subscriber_preferences_request, opts) data end |
#update_subscriber_preferences_with_http_info(update_subscriber_preferences_request, opts = {}) ⇒ Array<(UpdateSubscriberPreferences200Response, Integer, Hash)>
Update subscriber preferences Update notification channel preferences for specific categories or globally.
1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 |
# File 'lib/zyphr/api/inbox_api.rb', line 1312 def update_subscriber_preferences_with_http_info(update_subscriber_preferences_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InboxApi.update_subscriber_preferences ...' end # verify the required parameter 'update_subscriber_preferences_request' is set if @api_client.config.client_side_validation && update_subscriber_preferences_request.nil? fail ArgumentError, "Missing the required parameter 'update_subscriber_preferences_request' when calling InboxApi.update_subscriber_preferences" end # resource path local_var_path = '/subscriber-inbox/preferences' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_subscriber_preferences_request) # return_type return_type = opts[:debug_return_type] || 'UpdateSubscriberPreferences200Response' # auth_names auth_names = opts[:debug_auth_names] || ['EndUserToken'] = opts.merge( :operation => :"InboxApi.update_subscriber_preferences", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InboxApi#update_subscriber_preferences\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |