Module: Peddler::Notifications::AnyOfferChanged
- Defined in:
- lib/peddler/notifications/any_offer_changed.rb,
lib/peddler/notifications/any_offer_changed/offer.rb,
lib/peddler/notifications/any_offer_changed/points.rb,
lib/peddler/notifications/any_offer_changed/payload.rb,
lib/peddler/notifications/any_offer_changed/summary.rb,
lib/peddler/notifications/any_offer_changed/ships_from.rb,
lib/peddler/notifications/any_offer_changed/lowest_price.rb,
lib/peddler/notifications/any_offer_changed/notification.rb,
lib/peddler/notifications/any_offer_changed/buy_box_price.rb,
lib/peddler/notifications/any_offer_changed/sales_ranking.rb,
lib/peddler/notifications/any_offer_changed/shipping_time.rb,
lib/peddler/notifications/any_offer_changed/number_of_offer.rb,
lib/peddler/notifications/any_offer_changed/prime_information.rb,
lib/peddler/notifications/any_offer_changed/offer_change_trigger.rb,
lib/peddler/notifications/any_offer_changed/seller_feedback_rating.rb,
lib/peddler/notifications/any_offer_changed/any_offer_changed_notification.rb,
lib/peddler/notifications/any_offer_changed/number_of_buy_box_eligible_offer.rb
Overview
The root schema
The root schema comprises the entire JSON document.
Constant Summary collapse
- Offer =
Structure.new do # @return [:boolean] attribute(:expedited_shipping_available, :boolean, from: "IsExpeditedShippingAvailable") # @return [:boolean] attribute(:featured_merchant, :boolean, from: "IsFeaturedMerchant") # @return [:boolean] attribute(:fulfilled_by_amazon, :boolean, from: "IsFulfilledByAmazon") # @return [Money] attribute(:listing_price, Money, from: "ListingPrice") # @return [Points] attribute(:points, Points, from: "Points") # @return [PrimeInformation] attribute(:prime_information, PrimeInformation, from: "PrimeInformation") # @return [SellerFeedbackRating] attribute(:seller_feedback_rating, SellerFeedbackRating, from: "SellerFeedbackRating") # @return [String] attribute(:seller_id, String, from: "SellerId") # @return [Money] attribute(:shipping, Money, from: "Shipping") # @return [ShippingTime] attribute(:shipping_time, ShippingTime, from: "ShippingTime") # @return [:boolean] attribute(:ships_domestically, :boolean, from: "ShipsDomestically") # @return [ShipsFrom] attribute(:ships_from, ShipsFrom, from: "ShipsFrom") # @return [:boolean] attribute(:ships_internationally, :boolean, from: "ShipsInternationally") # @return [String] attribute(:sub_condition, String, from: "SubCondition") end
- Points =
Structure.new do # @return [Integer] attribute(:points_number, Integer, from: "PointsNumber") end
- Payload =
Notification payload that wraps nested notification data
Structure.new do # @return [AnyOfferChangedNotification] attribute(:any_offer_changed_notification, AnyOfferChangedNotification, from: "AnyOfferChangedNotification") end
- Summary =
Structure.new do # @return [Array] attribute(:buy_box_prices, Array, from: "BuyBoxPrices") # @return [Money] attribute(:competitive_price_threshold, Money, from: "CompetitivePriceThreshold") # @return [Money] attribute(:list_price, Money, from: "ListPrice") # @return [Array] attribute(:lowest_prices, Array, from: "LowestPrices") # @return [Money] attribute(:minimum_advertised_price, Money, from: "MinimumAdvertisedPrice") # @return [Array] attribute(:number_of_buy_box_eligible_offers, Array, from: "NumberOfBuyBoxEligibleOffers") # @return [Array] attribute(:number_of_offers, Array, from: "NumberOfOffers") # @return [Array] attribute(:sales_rankings, Array, from: "SalesRankings") # @return [Money] attribute(:suggested_lower_price_plus_shipping, Money, from: "SuggestedLowerPricePlusShipping") # @return [Integer] attribute(:total_buy_box_eligible_offers, Integer, from: "TotalBuyBoxEligibleOffers") end
- ShipsFrom =
Structure.new do # @return [String] attribute(:country, String, from: "Country") # @return [String] attribute(:state, String, from: "State") end
- LowestPrice =
Structure.new do # @return [String] attribute(:condition, String, from: "Condition") # @return [String] attribute(:fulfillment_channel, String, from: "FulfillmentChannel") # @return [Money] attribute(:landed_price, Money, from: "LandedPrice") # @return [Money] attribute(:listing_price, Money, from: "ListingPrice") # @return [Points] attribute(:points, Points, from: "Points") # @return [Money] attribute(:shipping, Money, from: "Shipping") end
- Notification =
The root schema comprises the entire JSON document.
Structure.new do # @return [String] attribute(:event_time, String, from: "EventTime") # @return [Hash] attribute(:notification_metadata, Hash, from: "NotificationMetadata") # @return [String] attribute(:notification_type, String, from: "NotificationType") # @return [Payload] attribute(:payload, Payload, from: "Payload") # @return [String] attribute(:payload_version, String, from: "PayloadVersion") # @return [String] attribute?(:notification_version, String, from: "NotificationVersion") end
- BuyBoxPrice =
Structure.new do # @return [String] attribute(:condition, String, from: "Condition") # @return [Money] attribute(:landed_price, Money, from: "LandedPrice") # @return [Money] attribute(:listing_price, Money, from: "ListingPrice") # @return [Points] attribute(:points, Points, from: "Points") # @return [Money] attribute(:shipping, Money, from: "Shipping") end
- SalesRanking =
Structure.new do # @return [String] attribute(:product_category_id, String, from: "ProductCategoryId") # @return [Integer] attribute(:rank, Integer, from: "Rank") end
- ShippingTime =
Structure.new do # @return [String] attribute(:availability_type, String, from: "AvailabilityType") # @return [String] attribute(:available_date, String, from: "AvailableDate") # @return [Integer] attribute(:maximum_hours, Integer, from: "MaximumHours") # @return [Integer] attribute(:minimum_hours, Integer, from: "MinimumHours") end
- NumberOfOffer =
Structure.new do # @return [String] attribute(:condition, String, from: "Condition") # @return [String] attribute(:fulfillment_channel, String, from: "FulfillmentChannel") # @return [Integer] attribute(:offer_count, Integer, from: "OfferCount") end
- PrimeInformation =
Structure.new do # @return [:boolean] attribute(:offer_national_prime, :boolean, from: "IsOfferNationalPrime") # @return [:boolean] attribute(:offer_prime, :boolean, from: "IsOfferPrime") end
- OfferChangeTrigger =
Structure.new do # @return [String] attribute(:asin, String, from: "ASIN") # @return [String] attribute(:item_condition, String, from: "ItemCondition") # @return [String] attribute(:marketplace_id, String, from: "MarketplaceId") # @return [String] attribute(:offer_change_type, String, from: "OfferChangeType") # @return [String] attribute(:time_of_offer_change, String, from: "TimeOfOfferChange") end
- SellerFeedbackRating =
Structure.new do # @return [Integer] attribute(:feedback_count, Integer, from: "FeedbackCount") # @return [Integer] attribute(:seller_positive_feedback_rating, Integer, from: "SellerPositiveFeedbackRating") end
- AnyOfferChangedNotification =
Nested notification data
Structure.new do # @return [OfferChangeTrigger] attribute(:offer_change_trigger, OfferChangeTrigger, from: "OfferChangeTrigger") # @return [Array<Offer>] attribute(:offers, [Offer], from: "Offers") # @return [String] attribute(:seller_id, String, from: "SellerId") # @return [Summary] attribute(:summary, Summary, from: "Summary") end
- NumberOfBuyBoxEligibleOffer =
Structure.new do # @return [String] attribute(:condition, String, from: "Condition") # @return [String] attribute(:fulfillment_channel, String, from: "FulfillmentChannel") # @return [Integer] attribute(:offer_count, Integer, from: "OfferCount") end
Class Method Summary collapse
Class Method Details
.parse(hash) ⇒ Object
12 13 14 |
# File 'lib/peddler/notifications/any_offer_changed.rb', line 12 def parse(hash) Notification.parse(hash) end |