Module: Peddler::Notifications::FeePromotion
- Defined in:
- lib/peddler/notifications/fee_promotion.rb,
lib/peddler/notifications/fee_promotion/payload.rb,
lib/peddler/notifications/fee_promotion/final_fee.rb,
lib/peddler/notifications/fee_promotion/fee_amount.rb,
lib/peddler/notifications/fee_promotion/fee_detail.rb,
lib/peddler/notifications/fee_promotion/identifier.rb,
lib/peddler/notifications/fee_promotion/tax_amount.rb,
lib/peddler/notifications/fee_promotion/included_fee.rb,
lib/peddler/notifications/fee_promotion/notification.rb,
lib/peddler/notifications/fee_promotion/fee_promotion.rb,
lib/peddler/notifications/fee_promotion/fees_estimate.rb,
lib/peddler/notifications/fee_promotion/price_threshold.rb,
lib/peddler/notifications/fee_promotion/identifier_value.rb,
lib/peddler/notifications/fee_promotion/promotion_information.rb,
lib/peddler/notifications/fee_promotion/fee_promotion_notification.rb,
lib/peddler/notifications/fee_promotion/promotion_active_time_range.rb,
lib/peddler/notifications/fee_promotion/fee_discount_monetary_amount.rb,
lib/peddler/notifications/fee_promotion/fees_estimate_total_fees_estimate.rb
Overview
The root schema
The root schema comprises the entire JSON document.
Constant Summary collapse
- Payload =
Notification payload that wraps nested notification data
Structure.new do # @return [FeePromotionNotification] attribute(:fee_promotion_notification, FeePromotionNotification, from: "FeePromotionNotification") end
- FinalFee =
Structure.new do # @return [Integer] attribute(:amount, Integer, from: "Amount") # @return [String] attribute(:currency_code, String, from: "CurrencyCode") end
- FeeAmount =
Structure.new do # @return [Integer] attribute(:amount, Integer, from: "Amount") # @return [String] attribute(:currency_code, String, from: "CurrencyCode") end
- FeeDetail =
Structure.new do # @return [FeeAmount] attribute(:fee_amount, FeeAmount, from: "FeeAmount") # @return [FeePromotion] attribute(:fee_promotion, FeePromotion, from: "FeePromotion") # @return [String] attribute(:fee_type, String, from: "FeeType") # @return [FinalFee] attribute(:final_fee, FinalFee, from: "FinalFee") # @return [Array] attribute(:included_fees, Array, from: "IncludedFees") # @return [TaxAmount] attribute(:tax_amount, TaxAmount, from: "TaxAmount") end
- Identifier =
Structure.new do # @return [String] attribute(:identifier_type, String, from: "IdentifierType") # @return [Array] attribute(:identifier_values, Array, from: "IdentifierValues") end
- TaxAmount =
Structure.new do # @return [Integer] attribute(:amount, Integer, from: "Amount") # @return [String] attribute(:currency_code, String, from: "CurrencyCode") end
- IncludedFee =
Structure.new do # @return [FeeAmount] attribute(:fee_amount, FeeAmount, from: "FeeAmount") # @return [FeePromotion] attribute(:fee_promotion, FeePromotion, from: "FeePromotion") # @return [String] attribute(:fee_type, String, from: "FeeType") # @return [FinalFee] attribute(:final_fee, FinalFee, from: "FinalFee") # @return [TaxAmount] attribute(:tax_amount, TaxAmount, from: "TaxAmount") 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 [String] attribute(:notification_version, String, from: "NotificationVersion") # @return [Payload] attribute(:payload, Payload, from: "Payload") # @return [String] attribute(:payload_version, String, from: "PayloadVersion") end
- FeePromotion =
Structure.new do # @return [Integer] attribute(:amount, Integer, from: "Amount") # @return [String] attribute(:currency_code, String, from: "CurrencyCode") end
- FeesEstimate =
Structure.new do # @return [Array] attribute(:fee_details, Array, from: "FeeDetails") # @return [String] attribute(:time_of_fees_estimated, String, from: "TimeOfFeesEstimated") # @return [Hash] attribute(:total_fees_estimate, Hash, from: "TotalFeesEstimate") end
- PriceThreshold =
Structure.new do # @return [Integer] attribute(:amount, Integer, from: "Amount") # @return [String] attribute(:currency_code, String, from: "CurrencyCode") end
- IdentifierValue =
Structure.new do # @return [String] attribute(:identifier_value_friendly_name, String, from: "IdentifierValueFriendlyName") # @return [String] attribute(:identifier_value_id, String, from: "IdentifierValueId") end
- PromotionInformation =
Structure.new do # @return [FeeDiscountMonetaryAmount] attribute(:fee_discount_monetary_amount, FeeDiscountMonetaryAmount, from: "FeeDiscountMonetaryAmount") # @return [String] attribute(:fee_discount_type, String, from: "FeeDiscountType") # @return [Float] attribute(:fee_discount_value, Float, from: "FeeDiscountValue") # @return [String] attribute(:fee_type, String, from: "FeeType") # @return [FeesEstimate] attribute(:fees_estimate, FeesEstimate, from: "FeesEstimate") # @return [PriceThreshold] attribute(:price_threshold, PriceThreshold, from: "PriceThreshold") end
- FeePromotionNotification =
Nested notification data
Structure.new do # @return [String] attribute(:fee_promotion_type, String, from: "FeePromotionType") # @return [String] attribute(:fee_promotion_type_description, String, from: "FeePromotionTypeDescription") # @return [Array<Identifier>] attribute(:identifiers, [Identifier], from: "Identifiers") # @return [String] attribute(:marketplace_id, String, from: "MarketplaceId") # @return [String] attribute(:merchant_id, String, from: "MerchantId") # @return [PromotionActiveTimeRange] attribute(:promotion_active_time_range, PromotionActiveTimeRange, from: "PromotionActiveTimeRange") # @return [Array<PromotionInformation>] attribute(:promotion_information, [PromotionInformation], from: "PromotionInformation") end
- PromotionActiveTimeRange =
Structure.new do # @return [String] attribute(:effective_from_date, String, from: "EffectiveFromDate") # @return [String] attribute(:effective_through_date, String, from: "EffectiveThroughDate") end
- FeeDiscountMonetaryAmount =
Structure.new do # @return [Integer] attribute(:amount, Integer, from: "Amount") # @return [String] attribute(:currency_code, String, from: "CurrencyCode") end
- FeesEstimateTotalFeesEstimate =
Structure.new do # @return [Integer] attribute(:amount, Integer, from: "Amount") # @return [String] attribute(:currency_code, String, from: "CurrencyCode") end
Class Method Summary collapse
Class Method Details
.parse(hash) ⇒ Object
12 13 14 |
# File 'lib/peddler/notifications/fee_promotion.rb', line 12 def parse(hash) Notification.parse(hash) end |