Class: Spree::ShipstationController
- Inherits:
-
BaseController
- Object
- BaseController
- Spree::ShipstationController
- Defined in:
- app/controllers/spree/shipstation_controller.rb
Instance Method Summary collapse
Instance Method Details
#export ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/spree/shipstation_controller.rb', line 9 def export @shipments = SolidusShipstation::Shipment::ExportableQuery.apply(Spree::Shipment.all) @shipments = SolidusShipstation::Shipment::BetweenQuery.apply( @shipments, from: date_param(:start_date), to: date_param(:end_date), ) @shipments = @shipments.page(params[:page]).per(50) respond_to do |format| format.xml { render layout: false } end end |
#shipnotify ⇒ Object
23 24 25 26 27 28 29 |
# File 'app/controllers/spree/shipstation_controller.rb', line 23 def shipnotify shipment_notice_class = SolidusShipstation.configuration.shipment_notice_class.constantize shipment_notice_class.from_payload(params.to_unsafe_h).apply head :ok rescue SolidusShipstation::Error => e head :bad_request end |