Class: Eet::Sender
- Inherits:
-
Object
- Object
- Eet::Sender
- Defined in:
- lib/eet/sender.rb
Constant Summary collapse
- PLAYGROUND_WSDL =
'https://pg.eet.cz:443/eet/services/EETServiceSOAP/v3?wsdl'
- PRODUCTION_WSDL =
'https://prod.eet.cz:443/eet/services/EETServiceSOAP/v3?wsdl'
- TIMEOUT =
2
- ENDPOINT =
:odeslani_trzby
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
- #send_to_playground(xml, wsdl = PLAYGROUND_WSDL, timeout = TIMEOUT, endpoint = ENDPOINT) ⇒ Object
- #send_to_production(xml, wsdl = PRODUCTION_WSDL, timeout = TIMEOUT, endpoint = ENDPOINT) ⇒ Object
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
9 10 11 |
# File 'lib/eet/sender.rb', line 9 def @message end |
Instance Method Details
#send_to_playground(xml, wsdl = PLAYGROUND_WSDL, timeout = TIMEOUT, endpoint = ENDPOINT) ⇒ Object
11 12 13 14 15 |
# File 'lib/eet/sender.rb', line 11 def send_to_playground(xml, wsdl = PLAYGROUND_WSDL, timeout = TIMEOUT, endpoint = ENDPOINT) client = Savon.client(wsdl: wsdl, open_timeout: timeout) response = client.call(endpoint, xml: xml) response end |
#send_to_production(xml, wsdl = PRODUCTION_WSDL, timeout = TIMEOUT, endpoint = ENDPOINT) ⇒ Object
17 18 19 20 21 |
# File 'lib/eet/sender.rb', line 17 def send_to_production(xml, wsdl = PRODUCTION_WSDL, timeout = TIMEOUT, endpoint = ENDPOINT) client = Savon.client(wsdl: wsdl, open_timeout: timeout) response = client.call(endpoint, xml: xml) response end |