Class: Events::AmazonBuyBoxChanged

Inherits:
ApplicationEvent show all
Defined in:
app/events/events.rb

Overview

Published by CatalogItem after_commit whenever is_amz_buy_box_winner
flips, regardless of which observer recorded the flip — the hourly
recovery pull / daily listings pull today (both via
Edi::Amazon::Orchestrator#pull_buy_box_status), an ANY_OFFER_CHANGED
SQS notification once that subscription lands. Published on transition
only, never per observation, so a daily sweep that changes nothing stays
silent. Amazon::BuyBoxChangedHandler reacts to a loss by reverting a
probationary automation raise immediately instead of waiting for the
nightly repricer's revert pass.

Payload:
catalog_item_id: Integer
won: Boolean — the new is_amz_buy_box_winner value
previous_won: Boolean

Method Summary

Methods inherited from ApplicationEvent

#data