Sha256: abc1dd9beb193ed16e3ace6328c42dd214b58c4ddf069e95c4f4d9ae3e5201a2

Contents?: true

Size: 568 Bytes

Versions: 8

Compression:

Stored size: 568 Bytes

Contents

# frozen_string_literal: true

module SolidusBacktracs
  module Api
    class SyncShipmentJob < ApplicationJob
      queue_as :default

      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
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
solidus_bactracs-3.0.0 app/jobs/solidus_backtracs/api/sync_shipment_job.rb
solidus_backtracs-2.2.6 app/jobs/solidus_backtracs/api/sync_shipment_job.rb
solidus_backtracs-2.2.5 app/jobs/solidus_backtracs/api/sync_shipment_job.rb
solidus_backtracs-2.2.4 app/jobs/solidus_backtracs/api/sync_shipment_job.rb
solidus_backtracs-2.2.3 app/jobs/solidus_backtracs/api/sync_shipment_job.rb
solidus_backtracs-2.2.2 app/jobs/solidus_backtracs/api/sync_shipment_job.rb
solidus_backtracs-2.2.1 app/jobs/solidus_backtracs/api/sync_shipment_job.rb
solidus_backtracs-2.2.0 app/jobs/solidus_backtracs/api/sync_shipment_job.rb