Sha256: b7e6c6760612b1ae15596e814fb8507b8913541615f6b44c6d07c8a228a66dfe
Contents?: true
Size: 798 Bytes
Versions: 14
Compression:
Stored size: 798 Bytes
Contents
# frozen_string_literal: true module FriendlyShipping module Services class Ups class ParseAddressClassificationResponse extend Dry::Monads::Result::Mixin def self.call(request:, response:) parsing_result = ParseXMLResponse.call( request: request, response: response, expected_root_tag: 'AddressValidationResponse' ) parsing_result.bind do |xml| address_type = xml.at('AddressClassification/Description')&.text&.downcase Success( FriendlyShipping::ApiResult.new( address_type, original_request: request, original_response: response ) ) end end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems