Class: AmzSpApi::NotificationsApiModel::NotificationsApi
- Inherits:
-
Object
- Object
- AmzSpApi::NotificationsApiModel::NotificationsApi
- Defined in:
- lib/notifications-api-model/api/notifications_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_destination(body, opts = {}) ⇒ CreateDestinationResponse
Creates a destination resource to receive notifications.
-
#create_destination_with_http_info(body, opts = {}) ⇒ Array<(CreateDestinationResponse, Integer, Hash)>
Creates a destination resource to receive notifications.
-
#create_subscription(body, notification_type, opts = {}) ⇒ CreateSubscriptionResponse
Creates a subscription for the specified notification type to be delivered to the specified destination.
-
#create_subscription_with_http_info(body, notification_type, opts = {}) ⇒ Array<(CreateSubscriptionResponse, Integer, Hash)>
Creates a subscription for the specified notification type to be delivered to the specified destination.
-
#delete_destination(destination_id, opts = {}) ⇒ DeleteDestinationResponse
Deletes the destination that you specify.
-
#delete_destination_with_http_info(destination_id, opts = {}) ⇒ Array<(DeleteDestinationResponse, Integer, Hash)>
Deletes the destination that you specify.
-
#delete_subscription_by_id(subscription_id, notification_type, opts = {}) ⇒ DeleteSubscriptionByIdResponse
Deletes the subscription indicated by the subscription identifier and notification type that you specify.
-
#delete_subscription_by_id_with_http_info(subscription_id, notification_type, opts = {}) ⇒ Array<(DeleteSubscriptionByIdResponse, Integer, Hash)>
Deletes the subscription indicated by the subscription identifier and notification type that you specify.
-
#get_destination(destination_id, opts = {}) ⇒ GetDestinationResponse
Returns information about the destination that you specify.
-
#get_destination_with_http_info(destination_id, opts = {}) ⇒ Array<(GetDestinationResponse, Integer, Hash)>
Returns information about the destination that you specify.
-
#get_destinations(opts = {}) ⇒ GetDestinationsResponse
Returns information about all destinations.
-
#get_destinations_with_http_info(opts = {}) ⇒ Array<(GetDestinationsResponse, Integer, Hash)>
Returns information about all destinations.
-
#get_subscription(notification_type, opts = {}) ⇒ GetSubscriptionResponse
Returns information about subscriptions of the specified notification type.
-
#get_subscription_by_id(subscription_id, notification_type, opts = {}) ⇒ GetSubscriptionByIdResponse
Returns information about a subscription for the specified notification type.
-
#get_subscription_by_id_with_http_info(subscription_id, notification_type, opts = {}) ⇒ Array<(GetSubscriptionByIdResponse, Integer, Hash)>
Returns information about a subscription for the specified notification type.
-
#get_subscription_with_http_info(notification_type, opts = {}) ⇒ Array<(GetSubscriptionResponse, Integer, Hash)>
Returns information about subscriptions of the specified notification type.
-
#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.
16 17 18 |
# File 'lib/notifications-api-model/api/notifications_api.rb', line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
14 15 16 |
# File 'lib/notifications-api-model/api/notifications_api.rb', line 14 def api_client @api_client end |
Instance Method Details
#create_destination(body, opts = {}) ⇒ CreateDestinationResponse
Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see [Grantless operations](doc:grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | The ‘x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
23 24 25 26 |
# File 'lib/notifications-api-model/api/notifications_api.rb', line 23 def create_destination(body, opts = {}) data, _status_code, _headers = create_destination_with_http_info(body, opts) data end |
#create_destination_with_http_info(body, opts = {}) ⇒ Array<(CreateDestinationResponse, Integer, Hash)>
Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see [Grantless operations](doc:grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
32 33 34 35 36 37 38 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 |
# File 'lib/notifications-api-model/api/notifications_api.rb', line 32 def create_destination_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotificationsApi.create_destination ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling NotificationsApi.create_destination" end # resource path local_var_path = '/notifications/v1/destinations' # 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', 'Successful Response']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'CreateDestinationResponse' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationsApi#create_destination\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_subscription(body, notification_type, opts = {}) ⇒ CreateSubscriptionResponse
Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the createDestination operation. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | The ‘x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
80 81 82 83 |
# File 'lib/notifications-api-model/api/notifications_api.rb', line 80 def create_subscription(body, notification_type, opts = {}) data, _status_code, _headers = create_subscription_with_http_info(body, notification_type, opts) data end |
#create_subscription_with_http_info(body, notification_type, opts = {}) ⇒ Array<(CreateSubscriptionResponse, Integer, Hash)>
Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the createDestination operation. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/notifications-api-model/api/notifications_api.rb', line 90 def create_subscription_with_http_info(body, notification_type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotificationsApi.create_subscription ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling NotificationsApi.create_subscription" end # verify the required parameter 'notification_type' is set if @api_client.config.client_side_validation && notification_type.nil? fail ArgumentError, "Missing the required parameter 'notification_type' when calling NotificationsApi.create_subscription" end # resource path local_var_path = '/notifications/v1/subscriptions/{notificationType}'.sub('{' + 'notificationType' + '}', notification_type.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', 'Successful Response']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'CreateSubscriptionResponse' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationsApi#create_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_destination(destination_id, opts = {}) ⇒ DeleteDestinationResponse
Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see [Grantless operations](doc:grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | The ‘x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
141 142 143 144 |
# File 'lib/notifications-api-model/api/notifications_api.rb', line 141 def delete_destination(destination_id, opts = {}) data, _status_code, _headers = delete_destination_with_http_info(destination_id, opts) data end |
#delete_destination_with_http_info(destination_id, opts = {}) ⇒ Array<(DeleteDestinationResponse, Integer, Hash)>
Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see [Grantless operations](doc:grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/notifications-api-model/api/notifications_api.rb', line 150 def delete_destination_with_http_info(destination_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotificationsApi.delete_destination ...' end # verify the required parameter 'destination_id' is set if @api_client.config.client_side_validation && destination_id.nil? fail ArgumentError, "Missing the required parameter 'destination_id' when calling NotificationsApi.delete_destination" end # resource path local_var_path = '/notifications/v1/destinations/{destinationId}'.sub('{' + 'destinationId' + '}', destination_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', 'Successful Response']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'DeleteDestinationResponse' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationsApi#delete_destination\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_subscription_by_id(subscription_id, notification_type, opts = {}) ⇒ DeleteSubscriptionByIdResponse
Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The deleteSubscriptionById API is grantless. For more information, see [Grantless operations](doc:grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | The ‘x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
196 197 198 199 |
# File 'lib/notifications-api-model/api/notifications_api.rb', line 196 def delete_subscription_by_id(subscription_id, notification_type, opts = {}) data, _status_code, _headers = delete_subscription_by_id_with_http_info(subscription_id, notification_type, opts) data end |
#delete_subscription_by_id_with_http_info(subscription_id, notification_type, opts = {}) ⇒ Array<(DeleteSubscriptionByIdResponse, Integer, Hash)>
Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The deleteSubscriptionById API is grantless. For more information, see [Grantless operations](doc:grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
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 245 246 247 248 249 250 |
# File 'lib/notifications-api-model/api/notifications_api.rb', line 206 def delete_subscription_by_id_with_http_info(subscription_id, notification_type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotificationsApi.delete_subscription_by_id ...' end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling NotificationsApi.delete_subscription_by_id" end # verify the required parameter 'notification_type' is set if @api_client.config.client_side_validation && notification_type.nil? fail ArgumentError, "Missing the required parameter 'notification_type' when calling NotificationsApi.delete_subscription_by_id" end # resource path local_var_path = '/notifications/v1/subscriptions/{notificationType}/{subscriptionId}'.sub('{' + 'subscriptionId' + '}', subscription_id.to_s).sub('{' + 'notificationType' + '}', notification_type.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', 'Successful Operation Response']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'DeleteSubscriptionByIdResponse' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationsApi#delete_subscription_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_destination(destination_id, opts = {}) ⇒ GetDestinationResponse
Returns information about the destination that you specify. The getDestination API is grantless. For more information, see [Grantless operations](doc:grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | The ‘x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
255 256 257 258 |
# File 'lib/notifications-api-model/api/notifications_api.rb', line 255 def get_destination(destination_id, opts = {}) data, _status_code, _headers = get_destination_with_http_info(destination_id, opts) data end |
#get_destination_with_http_info(destination_id, opts = {}) ⇒ Array<(GetDestinationResponse, Integer, Hash)>
Returns information about the destination that you specify. The getDestination API is grantless. For more information, see [Grantless operations](doc:grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
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/notifications-api-model/api/notifications_api.rb', line 264 def get_destination_with_http_info(destination_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotificationsApi.get_destination ...' end # verify the required parameter 'destination_id' is set if @api_client.config.client_side_validation && destination_id.nil? fail ArgumentError, "Missing the required parameter 'destination_id' when calling NotificationsApi.get_destination" end # resource path local_var_path = '/notifications/v1/destinations/{destinationId}'.sub('{' + 'destinationId' + '}', destination_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', 'Successful Response']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'GetDestinationResponse' auth_names = opts[: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 => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationsApi#get_destination\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_destinations(opts = {}) ⇒ GetDestinationsResponse
Returns information about all destinations. The getDestinations API is grantless. For more information, see [Grantless operations](doc:grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | The ‘x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
308 309 310 311 |
# File 'lib/notifications-api-model/api/notifications_api.rb', line 308 def get_destinations(opts = {}) data, _status_code, _headers = get_destinations_with_http_info(opts) data end |
#get_destinations_with_http_info(opts = {}) ⇒ Array<(GetDestinationsResponse, Integer, Hash)>
Returns information about all destinations. The getDestinations API is grantless. For more information, see [Grantless operations](doc:grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
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 |
# File 'lib/notifications-api-model/api/notifications_api.rb', line 316 def get_destinations_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotificationsApi.get_destinations ...' end # resource path local_var_path = '/notifications/v1/destinations' # 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', 'Successful Response']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'GetDestinationsResponse' auth_names = opts[: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 => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationsApi#get_destinations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_subscription(notification_type, opts = {}) ⇒ GetSubscriptionResponse
Returns information about subscriptions of the specified notification type. You can use this API to get subscription information when you do not have a subscription identifier. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | The ‘x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
357 358 359 360 |
# File 'lib/notifications-api-model/api/notifications_api.rb', line 357 def get_subscription(notification_type, opts = {}) data, _status_code, _headers = get_subscription_with_http_info(notification_type, opts) data end |
#get_subscription_by_id(subscription_id, notification_type, opts = {}) ⇒ GetSubscriptionByIdResponse
Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see [Grantless operations](doc:grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | The ‘x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
412 413 414 415 |
# File 'lib/notifications-api-model/api/notifications_api.rb', line 412 def get_subscription_by_id(subscription_id, notification_type, opts = {}) data, _status_code, _headers = get_subscription_by_id_with_http_info(subscription_id, notification_type, opts) data end |
#get_subscription_by_id_with_http_info(subscription_id, notification_type, opts = {}) ⇒ Array<(GetSubscriptionByIdResponse, Integer, Hash)>
Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see [Grantless operations](doc:grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
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 454 455 456 457 458 459 460 461 462 463 464 465 466 |
# File 'lib/notifications-api-model/api/notifications_api.rb', line 422 def get_subscription_by_id_with_http_info(subscription_id, notification_type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotificationsApi.get_subscription_by_id ...' end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling NotificationsApi.get_subscription_by_id" end # verify the required parameter 'notification_type' is set if @api_client.config.client_side_validation && notification_type.nil? fail ArgumentError, "Missing the required parameter 'notification_type' when calling NotificationsApi.get_subscription_by_id" end # resource path local_var_path = '/notifications/v1/subscriptions/{notificationType}/{subscriptionId}'.sub('{' + 'subscriptionId' + '}', subscription_id.to_s).sub('{' + 'notificationType' + '}', notification_type.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', 'Successful Response']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'GetSubscriptionByIdResponse' auth_names = opts[: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 => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationsApi#get_subscription_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_subscription_with_http_info(notification_type, opts = {}) ⇒ Array<(GetSubscriptionResponse, Integer, Hash)>
Returns information about subscriptions of the specified notification type. You can use this API to get subscription information when you do not have a subscription identifier. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
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 |
# File 'lib/notifications-api-model/api/notifications_api.rb', line 366 def get_subscription_with_http_info(notification_type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotificationsApi.get_subscription ...' end # verify the required parameter 'notification_type' is set if @api_client.config.client_side_validation && notification_type.nil? fail ArgumentError, "Missing the required parameter 'notification_type' when calling NotificationsApi.get_subscription" end # resource path local_var_path = '/notifications/v1/subscriptions/{notificationType}'.sub('{' + 'notificationType' + '}', notification_type.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', 'Successful Response']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'GetSubscriptionResponse' auth_names = opts[: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 => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationsApi#get_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |