Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.5.1 [#107](https://github.com/patterninc/muffin_man/pull/107)

- Added ORDER_CHANGE to PROCESSING_DIRECTIVE_SUPPORTED_NOTIFICATIONS in Notifications API v1

# 2.5.0 [#102](https://github.com/patterninc/muffin_man/pull/102)

- Restrictive data token for Vendor Direct Fulfillment Shipping v2021-12-28 createShippingLabels
Expand Down
4 changes: 2 additions & 2 deletions lib/muffin_man/notifications/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Notifications
class V1 < SpApiClient
NOTIFICATION_PATH = "/notifications/v1"
NOTIFICATION_SCOPE = "sellingpartnerapi::notifications"
PROCESSING_DIRECTIVE_SUPPORTED_NOTIFICATIONS = ["ANY_OFFER_CHANGED"].freeze
PROCESSING_DIRECTIVE_SUPPORTED_NOTIFICATIONS = ["ANY_OFFER_CHANGED", "ORDER_CHANGE"].freeze

def create_destination(arn, name, params = {})
@local_var_path = "#{NOTIFICATION_PATH}/destinations"
Expand Down Expand Up @@ -42,7 +42,7 @@ def create_subscription(notification_type, params = {})
@local_var_path = "#{NOTIFICATION_PATH}/subscriptions/#{notification_type}"
params = params.transform_keys(&:to_s)
subscription_params = { "destinationId" => params["destination_id"] }
# currently SP-API's `processingDirective` only supports ANY_OFFER_CHANGED notification type.
# currently SP-API's `processingDirective` supports ANY_OFFER_CHANGED and ORDER_CHANGE notification types.
if include_processing_directive?(notification_type, params)
subscription_params.merge!(
"processingDirective" => params["processing_directive"]
Expand Down
2 changes: 1 addition & 1 deletion lib/muffin_man/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module MuffinMan
VERSION = "2.5.0"
VERSION = "2.5.1"
end