Class: Bfwd::NotificationsApi
- Inherits:
-
Object
- Object
- Bfwd::NotificationsApi
- Defined in:
- lib/bf_ruby2/api/notifications_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#ack_notification(notification_id, opts = {}) ⇒ NotificationPagedMetadata
Acknowledge a newly recevied notification.
-
#ack_notification_with_http_info(notification_id, opts = {}) ⇒ Array<(NotificationPagedMetadata, Fixnum, Hash)>
Acknowledge a newly recevied notification.
-
#get_all_notifications(opts = {}) ⇒ NotificationPagedMetadata
Returns a collection of all notifications.
-
#get_all_notifications_with_http_info(opts = {}) ⇒ Array<(NotificationPagedMetadata, Fixnum, Hash)>
Returns a collection of all notifications.
-
#get_notification_by_entity_id(entity_id, opts = {}) ⇒ NotificationPagedMetadata
Returns a collection of notifications, specified by the entity-ID parameter.
-
#get_notification_by_entity_id_with_http_info(entity_id, opts = {}) ⇒ Array<(NotificationPagedMetadata, Fixnum, Hash)>
Returns a collection of notifications, specified by the entity-ID parameter.
-
#get_notification_by_id(notification_id, opts = {}) ⇒ NotificationPagedMetadata
Returns a single notification, specified by the notification-ID parameter.
-
#get_notification_by_id_with_http_info(notification_id, opts = {}) ⇒ Array<(NotificationPagedMetadata, Fixnum, Hash)>
Returns a single notification, specified by the notification-ID parameter.
-
#get_notifications_by_webhook_id(lower_threshold, upper_threshold, webhook_id, opts = {}) ⇒ NotificationPagedMetadata
Returns a collection of notification objects with created times within the period specified by the lower-threshold and upper-threshold parameters for the given webhook id.
-
#get_notifications_by_webhook_id_with_http_info(lower_threshold, upper_threshold, webhook_id, opts = {}) ⇒ Array<(NotificationPagedMetadata, Fixnum, Hash)>
Returns a collection of notification objects with created times within the period specified by the lower-threshold and upper-threshold parameters for the given webhook id.
-
#get_notifications_within_date_range(lower_threshold, upper_threshold, opts = {}) ⇒ NotificationPagedMetadata
Returns a collection of notification objects with created times within the period specified by the lower-threshold and upper-threshold parameters.
-
#get_notifications_within_date_range_with_http_info(lower_threshold, upper_threshold, opts = {}) ⇒ Array<(NotificationPagedMetadata, Fixnum, Hash)>
Returns a collection of notification objects with created times within the period specified by the lower-threshold and upper-threshold parameters.
-
#initialize(api_client = ApiClient.default) ⇒ NotificationsApi
constructor
A new instance of NotificationsApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ NotificationsApi
Returns a new instance of NotificationsApi.
30 31 32 |
# File 'lib/bf_ruby2/api/notifications_api.rb', line 30 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
28 29 30 |
# File 'lib/bf_ruby2/api/notifications_api.rb', line 28 def api_client @api_client end |
Instance Method Details
#ack_notification(notification_id, opts = {}) ⇒ NotificationPagedMetadata
Acknowledge a newly recevied notification. Bfwd::NotificationsApi."nickname":"Acknowledge","response":"getNotificationACK"nickname":"Acknowledge","response":"getNotificationACK.html"
40 41 42 43 |
# File 'lib/bf_ruby2/api/notifications_api.rb', line 40 def ack_notification(notification_id, opts = {}) data, _status_code, _headers = ack_notification_with_http_info(notification_id, opts) return data end |
#ack_notification_with_http_info(notification_id, opts = {}) ⇒ Array<(NotificationPagedMetadata, Fixnum, Hash)>
Acknowledge a newly recevied notification. Bfwd::NotificationsApi."nickname":"Acknowledge","response":"getNotificationACK"nickname":"Acknowledge","response":"getNotificationACK.html"
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 91 92 |
# File 'lib/bf_ruby2/api/notifications_api.rb', line 51 def ack_notification_with_http_info(notification_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: NotificationsApi.ack_notification ..." end # verify the required parameter 'notification_id' is set fail ArgumentError, "Missing the required parameter 'notification_id' when calling NotificationsApi.ack_notification" if notification_id.nil? # resource path local_var_path = "/notifications/ack/{notification-ID}".sub('{format}','json').sub('{' + 'notification-ID' + '}', notification_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['text/plain'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'NotificationPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationsApi#ack_notification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_all_notifications(opts = {}) ⇒ NotificationPagedMetadata
Returns a collection of all notifications. By default 10 values are returned. Records are returned in natural order. all notifications","response":"getNotificationAll.html"
104 105 106 107 |
# File 'lib/bf_ruby2/api/notifications_api.rb', line 104 def get_all_notifications(opts = {}) data, _status_code, _headers = get_all_notifications_with_http_info(opts) return data end |
#get_all_notifications_with_http_info(opts = {}) ⇒ Array<(NotificationPagedMetadata, Fixnum, Hash)>
Returns a collection of all notifications. By default 10 values are returned. Records are returned in natural order. all notifications","response":"getNotificationAll.html"
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 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/bf_ruby2/api/notifications_api.rb', line 119 def get_all_notifications_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: NotificationsApi.get_all_notifications ..." end if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/notifications".sub('{format}','json') # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'NotificationPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationsApi#get_all_notifications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_notification_by_entity_id(entity_id, opts = {}) ⇒ NotificationPagedMetadata
Returns a collection of notifications, specified by the entity-ID parameter. By default 10 values are returned. Records are returned in natural order. by entity","response":"getNotificationBySubscriptionID.html"
179 180 181 182 |
# File 'lib/bf_ruby2/api/notifications_api.rb', line 179 def get_notification_by_entity_id(entity_id, opts = {}) data, _status_code, _headers = get_notification_by_entity_id_with_http_info(entity_id, opts) return data end |
#get_notification_by_entity_id_with_http_info(entity_id, opts = {}) ⇒ Array<(NotificationPagedMetadata, Fixnum, Hash)>
Returns a collection of notifications, specified by the entity-ID parameter. By default 10 values are returned. Records are returned in natural order. by entity","response":"getNotificationBySubscriptionID.html"
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 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 |
# File 'lib/bf_ruby2/api/notifications_api.rb', line 195 def get_notification_by_entity_id_with_http_info(entity_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: NotificationsApi.get_notification_by_entity_id ..." end # verify the required parameter 'entity_id' is set fail ArgumentError, "Missing the required parameter 'entity_id' when calling NotificationsApi.get_notification_by_entity_id" if entity_id.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/notifications/entity-ID/{entity-ID}".sub('{format}','json').sub('{' + 'entity-ID' + '}', entity_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['text/plain'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'NotificationPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationsApi#get_notification_by_entity_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_notification_by_id(notification_id, opts = {}) ⇒ NotificationPagedMetadata
Returns a single notification, specified by the notification-ID parameter. an existing notification","response":"getNotificationByID.html"
252 253 254 255 |
# File 'lib/bf_ruby2/api/notifications_api.rb', line 252 def get_notification_by_id(notification_id, opts = {}) data, _status_code, _headers = get_notification_by_id_with_http_info(notification_id, opts) return data end |
#get_notification_by_id_with_http_info(notification_id, opts = {}) ⇒ Array<(NotificationPagedMetadata, Fixnum, Hash)>
Returns a single notification, specified by the notification-ID parameter. an existing notification","response":"getNotificationByID.html"
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 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/bf_ruby2/api/notifications_api.rb', line 263 def get_notification_by_id_with_http_info(notification_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: NotificationsApi.get_notification_by_id ..." end # verify the required parameter 'notification_id' is set fail ArgumentError, "Missing the required parameter 'notification_id' when calling NotificationsApi.get_notification_by_id" if notification_id.nil? # resource path local_var_path = "/notifications/{notification-ID}".sub('{format}','json').sub('{' + 'notification-ID' + '}', notification_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['text/plain'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'NotificationPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationsApi#get_notification_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_notifications_by_webhook_id(lower_threshold, upper_threshold, webhook_id, opts = {}) ⇒ NotificationPagedMetadata
Returns a collection of notification objects with created times within the period specified by the lower-threshold and upper-threshold parameters for the given webhook id. By default 10 values are returned. Records are returned in natural order. by creation","response":"getNotificationByCreated.html"
320 321 322 323 |
# File 'lib/bf_ruby2/api/notifications_api.rb', line 320 def get_notifications_by_webhook_id(lower_threshold, upper_threshold, webhook_id, opts = {}) data, _status_code, _headers = get_notifications_by_webhook_id_with_http_info(lower_threshold, upper_threshold, webhook_id, opts) return data end |
#get_notifications_by_webhook_id_with_http_info(lower_threshold, upper_threshold, webhook_id, opts = {}) ⇒ Array<(NotificationPagedMetadata, Fixnum, Hash)>
Returns a collection of notification objects with created times within the period specified by the lower-threshold and upper-threshold parameters for the given webhook id. By default 10 values are returned. Records are returned in natural order. by creation","response":"getNotificationByCreated.html"
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 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 |
# File 'lib/bf_ruby2/api/notifications_api.rb', line 339 def get_notifications_by_webhook_id_with_http_info(lower_threshold, upper_threshold, webhook_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: NotificationsApi.get_notifications_by_webhook_id ..." end # verify the required parameter 'lower_threshold' is set fail ArgumentError, "Missing the required parameter 'lower_threshold' when calling NotificationsApi.get_notifications_by_webhook_id" if lower_threshold.nil? # verify the required parameter 'upper_threshold' is set fail ArgumentError, "Missing the required parameter 'upper_threshold' when calling NotificationsApi.get_notifications_by_webhook_id" if upper_threshold.nil? # verify the required parameter 'webhook_id' is set fail ArgumentError, "Missing the required parameter 'webhook_id' when calling NotificationsApi.get_notifications_by_webhook_id" if webhook_id.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/notifications/{lower-threshold}/{upper-threshold}/{webhookID}".sub('{format}','json').sub('{' + 'lower-threshold' + '}', lower_threshold.to_s).sub('{' + 'upper-threshold' + '}', upper_threshold.to_s).sub('{' + 'webhookID' + '}', webhook_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? query_params[:'safety_margin'] = opts[:'safety_margin'] if !opts[:'safety_margin'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'NotificationPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationsApi#get_notifications_by_webhook_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_notifications_within_date_range(lower_threshold, upper_threshold, opts = {}) ⇒ NotificationPagedMetadata
Returns a collection of notification objects with created times within the period specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. by creation","response":"getNotificationByCreated.html"
408 409 410 411 |
# File 'lib/bf_ruby2/api/notifications_api.rb', line 408 def get_notifications_within_date_range(lower_threshold, upper_threshold, opts = {}) data, _status_code, _headers = get_notifications_within_date_range_with_http_info(lower_threshold, upper_threshold, opts) return data end |
#get_notifications_within_date_range_with_http_info(lower_threshold, upper_threshold, opts = {}) ⇒ Array<(NotificationPagedMetadata, Fixnum, Hash)>
Returns a collection of notification objects with created times within the period specified by the lower-threshold and upper-threshold parameters. By default 10 values are returned. Records are returned in natural order. by creation","response":"getNotificationByCreated.html"
426 427 428 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 472 473 474 475 476 477 478 |
# File 'lib/bf_ruby2/api/notifications_api.rb', line 426 def get_notifications_within_date_range_with_http_info(lower_threshold, upper_threshold, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: NotificationsApi.get_notifications_within_date_range ..." end # verify the required parameter 'lower_threshold' is set fail ArgumentError, "Missing the required parameter 'lower_threshold' when calling NotificationsApi.get_notifications_within_date_range" if lower_threshold.nil? # verify the required parameter 'upper_threshold' is set fail ArgumentError, "Missing the required parameter 'upper_threshold' when calling NotificationsApi.get_notifications_within_date_range" if upper_threshold.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/notifications/{lower-threshold}/{upper-threshold}".sub('{format}','json').sub('{' + 'lower-threshold' + '}', lower_threshold.to_s).sub('{' + 'upper-threshold' + '}', upper_threshold.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_retired'] = opts[:'include_retired'] if !opts[:'include_retired'].nil? query_params[:'safety_margin'] = opts[:'safety_margin'] if !opts[:'safety_margin'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'NotificationPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationsApi#get_notifications_within_date_range\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |