summaryrefslogtreecommitdiff
path: root/app/decorators/super_good/solidus_taxjar/spree/shipment/fire_shipment_shipped_event.rb
diff options
context:
space:
mode:
authorNicholas Van Doorn <nick@super.gd>2021-07-21 14:29:59 -0700
committerGitHub <noreply@github.com>2021-07-21 14:29:59 -0700
commitb7af04133f796b14bef0781e918d7eb7a46f6c0e (patch)
tree103c0f248e1dcfe2312bd2e01cd0b5c6288de60d /app/decorators/super_good/solidus_taxjar/spree/shipment/fire_shipment_shipped_event.rb
parent65d0db3ec71b148777a59f752268d07b345c7e9e (diff)
parente38197d126137ae5f41fe22018e2fcbd19322037 (diff)
Merge pull request #88 from SuperGoodSoft/77-add-shipment-shipped-event
#77 Add shipment shipped event
Diffstat (limited to 'app/decorators/super_good/solidus_taxjar/spree/shipment/fire_shipment_shipped_event.rb')
-rw-r--r--app/decorators/super_good/solidus_taxjar/spree/shipment/fire_shipment_shipped_event.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/decorators/super_good/solidus_taxjar/spree/shipment/fire_shipment_shipped_event.rb b/app/decorators/super_good/solidus_taxjar/spree/shipment/fire_shipment_shipped_event.rb
new file mode 100644
index 0000000..a109745
--- /dev/null
+++ b/app/decorators/super_good/solidus_taxjar/spree/shipment/fire_shipment_shipped_event.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+module SuperGood
+ module SolidusTaxjar
+ module Spree
+ module Shipment
+ module FireShipmentShippedEvent
+ def after_ship
+ ::Spree::Event.fire 'shipment_shipped', shipment: self
+ super
+ end
+
+ ::Spree::Shipment.prepend(self)
+ end
+ end
+ end
+ end
+end