Sha256: 35e739c664ed2c24f6b18f9175013ed0ede1aff94561b3fddaded4fb5544dd46
Contents?: true
Size: 742 Bytes
Versions: 7
Compression:
Stored size: 742 Bytes
Contents
# frozen_string_literal: true require "hashie" module ShipEngine module Domain class Addresses def initialize @client = ShipEngine::Client.new end def parse_address(address) response = @client.put( path: ShipEngine::Constants::PATHS.v1.addresses.parse_address, options: address ) Hashie::Mash.new(response.body) end def validate_address(addresses) clean_addresses = addresses.map(&:compact) response = @client.post( path: ShipEngine::Constants::PATHS.v1.addresses.validate_address, options: clean_addresses ) response.body.map { |address| Hashie::Mash.new(address) } end end end end
Version data entries
7 entries across 7 versions & 1 rubygems