Class: Stockboy::Providers::SOAP
- Inherits:
-
Stockboy::Provider
- Object
- Stockboy::Provider
- Stockboy::Providers::SOAP
- Defined in:
- lib/stockboy/providers/soap.rb
Overview
Fetch data from a SOAP endpoint
Backed by Savon gem, see savon for full configuration options: extra options are passed through.
Options collapse
-
#endpoint ⇒ Object
Optional if specified in WSDL.
-
#headers ⇒ Hash
Hash of optional HTTP request headers.
-
#message ⇒ Hash
Hash of message options passed in the request, often includes credentials and query options.
-
#namespace ⇒ Object
Optional if specified in WSDL.
-
#namespace_id ⇒ Object
Optional if specified in WSDL.
-
#request ⇒ String
The name of the request, see your SOAP documentation.
-
#wsdl ⇒ String
URL with the WSDL document.
Attributes inherited from Stockboy::Provider
#data, #data_time, #errors, #logger
Instance Method Summary collapse
-
#client {|@client| ... } ⇒ Savon::Client
Connection object to the configured SOAP endpoint.
-
#initialize(opts = {}, &block) ⇒ SOAP
constructor
Initialize a new SOAP provider.
Methods inherited from Stockboy::Provider
#clear, #inspect, logger, #reload, #valid?
Constructor Details
#initialize(opts = {}, &block) ⇒ SOAP
Initialize a new SOAP provider
78 79 80 81 |
# File 'lib/stockboy/providers/soap.rb', line 78 def initialize(opts={}, &block) super DSL.new(self).instance_eval(&block) if block_given? end |
Instance Attribute Details
#endpoint ⇒ Object
Optional if specified in WSDL
53 |
# File 'lib/stockboy/providers/soap.rb', line 53 dsl_attr :endpoint |
#headers ⇒ Hash
Hash of optional HTTP request headers
72 |
# File 'lib/stockboy/providers/soap.rb', line 72 dsl_attr :headers |
#message ⇒ Hash
Hash of message options passed in the request, often includes credentials and query options.
63 |
# File 'lib/stockboy/providers/soap.rb', line 63 dsl_attr :message |
#namespace ⇒ Object
Optional if specified in WSDL
41 |
# File 'lib/stockboy/providers/soap.rb', line 41 dsl_attr :namespace |
#namespace_id ⇒ Object
Optional if specified in WSDL
47 |
# File 'lib/stockboy/providers/soap.rb', line 47 dsl_attr :namespace_id |
#request ⇒ String
The name of the request, see your SOAP documentation
35 |
# File 'lib/stockboy/providers/soap.rb', line 35 dsl_attr :request |
#wsdl ⇒ String
URL with the WSDL document
26 |
# File 'lib/stockboy/providers/soap.rb', line 26 dsl_attr :wsdl |
Instance Method Details
#client {|@client| ... } ⇒ Savon::Client
Connection object to the configured SOAP endpoint
87 88 89 90 91 |
# File 'lib/stockboy/providers/soap.rb', line 87 def client @client ||= Savon.client() return @client unless block_given? yield @client end |