Class: TaxCloud::LookupService
- Inherits:
-
BaseService
- Object
- BaseService
- TaxCloud::LookupService
- Defined in:
- lib/service/lookup_service.rb
Instance Attribute Summary
Attributes inherited from BaseService
Instance Method Summary collapse
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from TaxCloud::BaseService
Instance Method Details
#lookup(api_id, api_key, customer_id, cart_id, origin, destination, cart_items) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/service/lookup_service.rb', line 7 def lookup(api_id, api_key, customer_id, cart_id, origin, destination, cart_items) response = client.request :lookup do soap.body = {:apiLoginID => api_id, :apiKey => api_key, 'customerID' => customer_id, 'cartID' => cart_id, 'cartItems' => {'CartItem' => cart_items.map(&:to_hash)}, 'origin' => origin.to_hash, 'destination' => destination.to_hash} end lookupResponse = TaxCloud::LookupResponse.new(response.to_hash[:lookup_response][:lookup_result]) end |