Sha256: 3a2d050ac9f6470b438c2fc381acb7bbbf722ac9afb280c4f275292be7c01b08

Contents?: true

Size: 567 Bytes

Versions: 15

Compression:

Stored size: 567 Bytes

Contents

# frozen_string_literal: true

module SolidusBactracs
  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

15 entries across 15 versions & 1 rubygems

Version Path
solidus_bactracs-4.0.1 app/jobs/solidus_bactracs/api/sync_shipment_job.rb
solidus_bactracs-4.0.0 app/jobs/solidus_bactracs/api/sync_shipment_job.rb
solidus_bactracs-3.5.2 app/jobs/solidus_bactracs/api/sync_shipment_job.rb
solidus_bactracs-3.5.1 app/jobs/solidus_bactracs/api/sync_shipment_job.rb
solidus_bactracs-3.5.0 app/jobs/solidus_bactracs/api/sync_shipment_job.rb
solidus_bactracs-3.4.0 app/jobs/solidus_bactracs/api/sync_shipment_job.rb
solidus_bactracs-3.3.2 app/jobs/solidus_bactracs/api/sync_shipment_job.rb
solidus_bactracs-3.3.1 app/jobs/solidus_bactracs/api/sync_shipment_job.rb
solidus_bactracs-3.3.0 app/jobs/solidus_bactracs/api/sync_shipment_job.rb
solidus_bactracs-3.2.2 app/jobs/solidus_bactracs/api/sync_shipment_job.rb
solidus_bactracs-3.2.1 app/jobs/solidus_bactracs/api/sync_shipment_job.rb
solidus_bactracs-3.2.0 app/jobs/solidus_bactracs/api/sync_shipment_job.rb
solidus_bactracs-3.1.2 app/jobs/solidus_bactracs/api/sync_shipment_job.rb
solidus_bactracs-3.1.1 app/jobs/solidus_bactracs/api/sync_shipment_job.rb
solidus_bactracs-3.1.0 app/jobs/solidus_bactracs/api/sync_shipment_job.rb