Class: TaxCloud::AuthorizedService
- Inherits:
-
BaseService
- Object
- BaseService
- TaxCloud::AuthorizedService
- Defined in:
- lib/service/authorized_service.rb
Instance Attribute Summary
Attributes inherited from BaseService
Instance Method Summary collapse
- #authorized(api_id, api_key, customer_id, cart_id, order_id, date_authorized) ⇒ Object
- #authorized_with_capture(api_id, api_key, customer_id, cart_id, order_id, date_authorized, date_captured) ⇒ Object
- #captured(api_id, api_key, order_id) ⇒ Object
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from TaxCloud::BaseService
Instance Method Details
#authorized(api_id, api_key, customer_id, cart_id, order_id, date_authorized) ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/service/authorized_service.rb', line 19 def (api_id, api_key, customer_id, cart_id, order_id, ) response = client.request :authorized do soap.body = {:apiLoginID => api_id, :apiKey => api_key, 'customerID' => customer_id, 'cartID' => cart_id, 'orderID' => order_id, 'dateAuthorized' => } end = TaxCloud::AuthorizedResponse.new(response.to_hash[:authorized_response][:authorized_result]) end |
#authorized_with_capture(api_id, api_key, customer_id, cart_id, order_id, date_authorized, date_captured) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/service/authorized_service.rb', line 9 def (api_id, api_key, customer_id, cart_id, order_id, , date_captured) response = client.request :authorized_with_capture do soap.body = {:apiLoginID => api_id, :apiKey => api_key, 'customerID' => customer_id, 'cartID' => cart_id, 'orderID' => order_id, 'dateAuthorized' => , 'dateCaptured' => date_captured} end = TaxCloud::AuthorizedWithCaptureResponse.new(response.to_hash[:authorized_with_capture_response][:authorized_with_capture_result]) end |
#captured(api_id, api_key, order_id) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/service/authorized_service.rb', line 30 def captured(api_id, api_key, order_id) response = client.request :captured do soap.body = {:apiLoginID => api_id, :apiKey => api_key, 'orderID' => order_id} end captured_response = TaxCloud::CapturedResponse.new(response.to_hash[:captured_response][:captured_result]) end |