Class: SolidusBactracs::Api::SyncShipmentJob
- Inherits:
-
ApplicationJob
- Object
- ApplicationJob
- SolidusBactracs::Api::SyncShipmentJob
- Defined in:
- app/jobs/solidus_bactracs/api/sync_shipment_job.rb
Instance Method Summary collapse
Instance Method Details
#perform(shipment_id: nil, error_handler: nil, shipment_serializer: nil, request_runner: nil) ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/jobs/solidus_bactracs/api/sync_shipment_job.rb', line 8 def perform(shipment_id: nil, error_handler: nil, shipment_serializer: nil, request_runner: nil) shipment = ::Spree::Shipment.find(shipment_id) request_runner.authenticated_call(method: :post, path: '/webservices/rma/rmaservice.asmx', serializer: shipment_serializer, shipment: shipment) rescue StandardError => e error_handler.call(e, shipment: shipment) nil end |