21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/usps/api/endpoints/verify.rb', line 21
def verify(options = {})
throw ArgumentError.new('Required arguments :address_validate_request missing') if options[:address_validate_request].nil?
throw ArgumentError.new('Required arguments :address_validate_request, :revision missing') if options[:address_validate_request][:revision].nil?
throw ArgumentError.new('Required arguments :address_validate_request, :address missing') if options[:address_validate_request][:address].nil?
throw ArgumentError.new('Required arguments :address_validate_request, :address, :address2 missing') if options[:address_validate_request][:address][:address2].nil?
request = build_request(:verify, options)
get('https://secure.shippingapis.com/ShippingAPI.dll', {
API: 'Verify',
XML: request,
})
end
|