Class: Bfwd::NotificationsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/bf_ruby2/api/notifications_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ NotificationsApi

Returns a new instance of NotificationsApi.



19
20
21
# File 'lib/bf_ruby2/api/notifications_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/bf_ruby2/api/notifications_api.rb', line 17

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"

Parameters:

  • notification_id

    ID of the notification.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

Returns:



29
30
31
32
# File 'lib/bf_ruby2/api/notifications_api.rb', line 29

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.&quot;nickname&quot;:&quot;Acknowledge&quot;,&quot;response&quot;:&quot;getNotificationACK&quot;nickname&quot;:&quot;Acknowledge&quot;,&quot;response&quot;:&quot;getNotificationACK.html&quot;

Parameters:

  • notification_id

    ID of the notification.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

Returns:

  • (Array<(NotificationPagedMetadata, Fixnum, Hash)>)

    NotificationPagedMetadata data, response status code and response headers



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
# File 'lib/bf_ruby2/api/notifications_api.rb', line 40

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
  if @api_client.config.client_side_validation && notification_id.nil?
    fail ArgumentError, "Missing the required parameter 'notification_id' when calling NotificationsApi.ack_notification"
  end
  # resource path
  local_var_path = "/notifications/ack/{notification-ID}".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)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain'])

  # 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"

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first Subscription to return. (default to 0)

  • :records (Integer)

    The maximum number of Subscriptions to return. (default to 10)

  • :order_by (String)

    Specify a field used to order the result set. (default to created)

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC. (default to DESC)

  • :include_retired (BOOLEAN)

    Whether retired products should be returned. (default to true)

Returns:



91
92
93
94
# File 'lib/bf_ruby2/api/notifications_api.rb', line 91

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&quot;,&quot;response&quot;:&quot;getNotificationAll.html&quot;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first Subscription to return.

  • :records (Integer)

    The maximum number of Subscriptions to return.

  • :order_by (String)

    Specify a field used to order the result set.

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC.

  • :include_retired (BOOLEAN)

    Whether retired products should be returned.

Returns:

  • (Array<(NotificationPagedMetadata, Fixnum, Hash)>)

    NotificationPagedMetadata data, response status code and response headers



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
# File 'lib/bf_ruby2/api/notifications_api.rb', line 106

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 @api_client.config.client_side_validation && 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"

  # 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)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])

  # 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"

Parameters:

  • entity_id

    The string entity-ID of the notification.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first notification to return. (default to 0)

  • :records (Integer)

    The maximum number of notifications to return. (default to 10)

  • :order_by (String)

    Specify a field used to order the result set. (default to created)

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC. (default to DESC)

  • :include_retired (BOOLEAN)

    Whether retired products should be returned. (default to true)

Returns:



160
161
162
163
# File 'lib/bf_ruby2/api/notifications_api.rb', line 160

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&quot;,&quot;response&quot;:&quot;getNotificationBySubscriptionID.html&quot;

Parameters:

  • entity_id

    The string entity-ID of the notification.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first notification to return.

  • :records (Integer)

    The maximum number of notifications to return.

  • :order_by (String)

    Specify a field used to order the result set.

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC.

  • :include_retired (BOOLEAN)

    Whether retired products should be returned.

Returns:

  • (Array<(NotificationPagedMetadata, Fixnum, Hash)>)

    NotificationPagedMetadata data, response status code and response headers



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
219
220
221
222
223
# File 'lib/bf_ruby2/api/notifications_api.rb', line 176

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
  if @api_client.config.client_side_validation && entity_id.nil?
    fail ArgumentError, "Missing the required parameter 'entity_id' when calling NotificationsApi.get_notification_by_entity_id"
  end
  if @api_client.config.client_side_validation && 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('{' + '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)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain'])

  # 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"

Parameters:

  • notification_id

    ID of the notification.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

Returns:



231
232
233
234
# File 'lib/bf_ruby2/api/notifications_api.rb', line 231

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&quot;,&quot;response&quot;:&quot;getNotificationByID.html&quot;

Parameters:

  • notification_id

    ID of the notification.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

Returns:

  • (Array<(NotificationPagedMetadata, Fixnum, Hash)>)

    NotificationPagedMetadata data, response status code and response headers



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
278
279
280
281
# File 'lib/bf_ruby2/api/notifications_api.rb', line 242

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
  if @api_client.config.client_side_validation && notification_id.nil?
    fail ArgumentError, "Missing the required parameter 'notification_id' when calling NotificationsApi.get_notification_by_id"
  end
  # resource path
  local_var_path = "/notifications/{notification-ID}".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)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain'])

  # 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"

Parameters:

  • lower_threshold

    The UTC DateTime specifying the start of the result period.

  • upper_threshold

    The UTC DateTime specifying the end of the result period.

  • webhook_id

    The id of the webhook.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first taxation-link to return. (default to 0)

  • :records (Integer)

    The maximum number of taxation-links to return. (default to 10)

  • :order_by (String)

    Specify a field used to order the result set. (default to created)

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC. (default to DESC)

  • :include_retired (BOOLEAN)

    Whether retired products should be returned. (default to true)

  • :safety_margin (Integer)

    How many seconds behind server-time upperThreshold may approach. (default to 10)

Returns:



297
298
299
300
# File 'lib/bf_ruby2/api/notifications_api.rb', line 297

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&quot;,&quot;response&quot;:&quot;getNotificationByCreated.html&quot;

Parameters:

  • lower_threshold

    The UTC DateTime specifying the start of the result period.

  • upper_threshold

    The UTC DateTime specifying the end of the result period.

  • webhook_id

    The id of the webhook.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first taxation-link to return.

  • :records (Integer)

    The maximum number of taxation-links to return.

  • :order_by (String)

    Specify a field used to order the result set.

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC.

  • :include_retired (BOOLEAN)

    Whether retired products should be returned.

  • :safety_margin (Integer)

    How many seconds behind server-time upperThreshold may approach.

Returns:

  • (Array<(NotificationPagedMetadata, Fixnum, Hash)>)

    NotificationPagedMetadata data, response status code and response headers



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
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
# File 'lib/bf_ruby2/api/notifications_api.rb', line 316

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
  if @api_client.config.client_side_validation && lower_threshold.nil?
    fail ArgumentError, "Missing the required parameter 'lower_threshold' when calling NotificationsApi.get_notifications_by_webhook_id"
  end
  # verify the required parameter 'upper_threshold' is set
  if @api_client.config.client_side_validation && upper_threshold.nil?
    fail ArgumentError, "Missing the required parameter 'upper_threshold' when calling NotificationsApi.get_notifications_by_webhook_id"
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling NotificationsApi.get_notifications_by_webhook_id"
  end
  if @api_client.config.client_side_validation && 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('{' + '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)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])

  # 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"

Parameters:

  • lower_threshold

    The UTC DateTime specifying the start of the result period.

  • upper_threshold

    The UTC DateTime specifying the end of the result period.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first taxation-link to return. (default to 0)

  • :records (Integer)

    The maximum number of taxation-links to return. (default to 10)

  • :order_by (String)

    Specify a field used to order the result set. (default to created)

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC. (default to DESC)

  • :include_retired (BOOLEAN)

    Whether retired products should be returned. (default to true)

  • :safety_margin (Integer)

    How many seconds behind server-time upperThreshold may approach. (default to 10)

Returns:



385
386
387
388
# File 'lib/bf_ruby2/api/notifications_api.rb', line 385

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&quot;,&quot;response&quot;:&quot;getNotificationByCreated.html&quot;

Parameters:

  • lower_threshold

    The UTC DateTime specifying the start of the result period.

  • upper_threshold

    The UTC DateTime specifying the end of the result period.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

  • :offset (Integer)

    The offset from the first taxation-link to return.

  • :records (Integer)

    The maximum number of taxation-links to return.

  • :order_by (String)

    Specify a field used to order the result set.

  • :order (String)

    Ihe direction of any ordering, either ASC or DESC.

  • :include_retired (BOOLEAN)

    Whether retired products should be returned.

  • :safety_margin (Integer)

    How many seconds behind server-time upperThreshold may approach.

Returns:

  • (Array<(NotificationPagedMetadata, Fixnum, Hash)>)

    NotificationPagedMetadata data, response status code and response headers



403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
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
# File 'lib/bf_ruby2/api/notifications_api.rb', line 403

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
  if @api_client.config.client_side_validation && lower_threshold.nil?
    fail ArgumentError, "Missing the required parameter 'lower_threshold' when calling NotificationsApi.get_notifications_within_date_range"
  end
  # verify the required parameter 'upper_threshold' is set
  if @api_client.config.client_side_validation && upper_threshold.nil?
    fail ArgumentError, "Missing the required parameter 'upper_threshold' when calling NotificationsApi.get_notifications_within_date_range"
  end
  if @api_client.config.client_side_validation && 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('{' + '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)
  header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])

  # 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