Sha256: 5fbd456b34c1083ae6b71cba41872b3f7198ffcd9acf78b6cf988004837f400c

Contents?: true

Size: 581 Bytes

Versions: 12

Compression:

Stored size: 581 Bytes

Contents

# frozen_string_literal: true

require 'dry/monads/result'

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

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
friendly_shipping-0.5.2 lib/friendly_shipping/services/ups/parse_void_shipment_response.rb
friendly_shipping-0.5.1 lib/friendly_shipping/services/ups/parse_void_shipment_response.rb
friendly_shipping-0.5 lib/friendly_shipping/services/ups/parse_void_shipment_response.rb
friendly_shipping-0.4.14 lib/friendly_shipping/services/ups/parse_void_shipment_response.rb
friendly_shipping-0.4.13 lib/friendly_shipping/services/ups/parse_void_shipment_response.rb
friendly_shipping-0.4.12 lib/friendly_shipping/services/ups/parse_void_shipment_response.rb
friendly_shipping-0.4.11 lib/friendly_shipping/services/ups/parse_void_shipment_response.rb
friendly_shipping-0.4.10 lib/friendly_shipping/services/ups/parse_void_shipment_response.rb
friendly_shipping-0.4.9 lib/friendly_shipping/services/ups/parse_void_shipment_response.rb
friendly_shipping-0.4.8 lib/friendly_shipping/services/ups/parse_void_shipment_response.rb
friendly_shipping-0.4.7 lib/friendly_shipping/services/ups/parse_void_shipment_response.rb
friendly_shipping-0.4.6 lib/friendly_shipping/services/ups/parse_void_shipment_response.rb