Class: DigiwinDsp::Webhooks::InventoryUpdate

Inherits:
Event
  • Object
show all
Defined in:
lib/digiwin_dsp/webhooks/inventory_update.rb

Overview

Fired by DSP when an ERP-side inventory change happens. See docs/dsp-specs/DSPOOFFICIAL100.yaml under “庫存數量更新 product/inventory_update”.

Instance Attribute Summary

Attributes inherited from Event

#digi_header, #raw, #request

Instance Method Summary collapse

Methods inherited from Event

extract_request, #initialize, parse, parse_json

Constructor Details

This class inherits a constructor from DigiwinDsp::Webhooks::Event

Instance Method Details

#platform_idObject



10
# File 'lib/digiwin_dsp/webhooks/inventory_update.rb', line 10

def platform_id  = request["platform_id"]

#prodObject



9
# File 'lib/digiwin_dsp/webhooks/inventory_update.rb', line 9

def prod         = request["prod"]

#sale_page_idObject



11
# File 'lib/digiwin_dsp/webhooks/inventory_update.rb', line 11

def sale_page_id = request["sale_page_id"]

#spec_listObject



12
# File 'lib/digiwin_dsp/webhooks/inventory_update.rb', line 12

def spec_list    = request["spec_list"] || []