Sha256: 65469018c685bf18ad53d2418c232815af1fa5127ef54906bff6e2b6f9a0037c

Contents?: true

Size: 576 Bytes

Versions: 18

Compression:

Stored size: 576 Bytes

Contents

# frozen_string_literal: true

require 'dry/monads/result'

module FriendlyShipping
  module Services
    class Ups
      class ParseShipmentConfirmResponse
        def self.call(request:, response:)
          parsing_result = ParseXMLResponse.call(response.body, 'ShipmentConfirmResponse')
          parsing_result.fmap do |xml|
            FriendlyShipping::ApiResult.new(
              xml.root.at('ShipmentDigest').text,
              original_request: request,
              original_response: response
            )
          end
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
friendly_shipping-0.5.2 lib/friendly_shipping/services/ups/parse_shipment_confirm_response.rb
friendly_shipping-0.5.1 lib/friendly_shipping/services/ups/parse_shipment_confirm_response.rb
friendly_shipping-0.5 lib/friendly_shipping/services/ups/parse_shipment_confirm_response.rb
friendly_shipping-0.4.14 lib/friendly_shipping/services/ups/parse_shipment_confirm_response.rb
friendly_shipping-0.4.13 lib/friendly_shipping/services/ups/parse_shipment_confirm_response.rb
friendly_shipping-0.4.12 lib/friendly_shipping/services/ups/parse_shipment_confirm_response.rb
friendly_shipping-0.4.11 lib/friendly_shipping/services/ups/parse_shipment_confirm_response.rb
friendly_shipping-0.4.10 lib/friendly_shipping/services/ups/parse_shipment_confirm_response.rb
friendly_shipping-0.4.9 lib/friendly_shipping/services/ups/parse_shipment_confirm_response.rb
friendly_shipping-0.4.8 lib/friendly_shipping/services/ups/parse_shipment_confirm_response.rb
friendly_shipping-0.4.7 lib/friendly_shipping/services/ups/parse_shipment_confirm_response.rb
friendly_shipping-0.4.6 lib/friendly_shipping/services/ups/parse_shipment_confirm_response.rb
friendly_shipping-0.4.5 lib/friendly_shipping/services/ups/parse_shipment_confirm_response.rb
friendly_shipping-0.4.4 lib/friendly_shipping/services/ups/parse_shipment_confirm_response.rb
friendly_shipping-0.4.3 lib/friendly_shipping/services/ups/parse_shipment_confirm_response.rb
friendly_shipping-0.4.2 lib/friendly_shipping/services/ups/parse_shipment_confirm_response.rb
friendly_shipping-0.4.1 lib/friendly_shipping/services/ups/parse_shipment_confirm_response.rb
friendly_shipping-0.4.0 lib/friendly_shipping/services/ups/parse_shipment_confirm_response.rb