Class: TaxCloud::ReturnedService
- Inherits:
-
BaseService
- Object
- BaseService
- TaxCloud::ReturnedService
- Defined in:
- lib/service/returned_service.rb
Overview
If you have previously completed an order you can return one or more of the items in the order
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
#returned(api_id, api_key, order_id, cart_items, returned_date) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/service/returned_service.rb', line 8 def returned(api_id, api_key, order_id, cart_items, returned_date) response = client.request :returned do soap.body = {:apiLoginID => api_id, :apiKey => api_key, 'orderID' => order_id, 'cartItems' => {'CartItem' => cart_items.map(&:to_hash)}, 'returnedDate' => returned_date} end returned_response = TaxCloud::ReturnedResponse.new(response.to_hash[:returned_response][:returned_result]) end |