Class: TaxCloud::Client
- Inherits:
-
Savon::Client
- Object
- Savon::Client
- TaxCloud::Client
- Defined in:
- lib/tax_cloud/client.rb
Overview
A Client
communicates with the TaxCloud service.
Instance Method Summary collapse
-
#call(method, message = {}) ⇒ Object
Make a safe SOAP call.
-
#initialize ⇒ Client
constructor
Create a new client.
-
#ping ⇒ Object
Ping the TaxCloud service.
- #request(method, message = {}) ⇒ Object
Constructor Details
Instance Method Details
#call(method, message = {}) ⇒ Object
Make a safe SOAP call. Will raise a TaxCloud::Errors::SoapError on error.
Parameters
- method
-
SOAP method.
- body
-
Body content.
15 16 17 18 19 |
# File 'lib/tax_cloud/client.rb', line 15 def call(method, = {}) safe do super method, message: .merge(auth_params) end end |
#ping ⇒ Object
Ping the TaxCloud service.
Returns “OK” or raises an error if the TaxCloud service is unreachable.
28 29 30 |
# File 'lib/tax_cloud/client.rb', line 28 def ping TaxCloud::Responses::Ping.parse request(:ping) end |
#request(method, message = {}) ⇒ Object
21 22 23 |
# File 'lib/tax_cloud/client.rb', line 21 def request(method, = {}) call method, end |