Class: Viewpoint::EWS::EWS
- Inherits:
-
Object
- Object
- Viewpoint::EWS::EWS
- Includes:
- Singleton, Viewpoint
- Defined in:
- lib/viewpoint.rb
Instance Attribute Summary collapse
-
#:ews ⇒ Viewpoint::EWS::SOAP::ExchangeWebService
readonly
The EWS object used to make SOAP calls.
-
#ews ⇒ Object
readonly
Returns the value of attribute ews.
Class Method Summary collapse
-
.endpoint ⇒ Object
Fetch the current endpoint.
-
.endpoint=(endpoint, version = 1) ⇒ Object
Set the endpoint for Exchange Web Services.
-
.set_auth(user, pass) ⇒ Object
Set the SOAP username and password.
-
.set_http_driver(driver) ⇒ Object
Set the http driver that the SOAP back-end will use.
-
.set_trust_ca(ca_path) ⇒ Object
Sets the CA path to a certificate or hashed certificate directory.
Instance Method Summary collapse
-
#initialize ⇒ EWS
constructor
A new instance of EWS.
-
#me ⇒ Object
The MailboxUser object that represents the user connected to EWS.
Constructor Details
#initialize ⇒ EWS
Returns a new instance of EWS.
122 123 124 |
# File 'lib/viewpoint.rb', line 122 def initialize @ews = SOAP::ExchangeWebService.new end |
Instance Attribute Details
#:ews ⇒ Viewpoint::EWS::SOAP::ExchangeWebService (readonly)
The EWS object used to make SOAP calls. You typically don’t need to use this, but if you want to play around with the SOAP back-end it’s available.
78 79 80 |
# File 'lib/viewpoint.rb', line 78
def :ews
@:ews
end
|
#ews ⇒ Object (readonly)
Returns the value of attribute ews.
82 83 84 |
# File 'lib/viewpoint.rb', line 82 def ews @ews end |
Class Method Details
.endpoint ⇒ Object
Fetch the current endpoint
96 97 98 |
# File 'lib/viewpoint.rb', line 96 def self.endpoint @@endpoint end |
.endpoint=(endpoint, version = 1) ⇒ Object
Set the endpoint for Exchange Web Services.
90 91 92 93 |
# File 'lib/viewpoint.rb', line 90 def self.endpoint=(endpoint, version = 1) @@endpoint = endpoint SOAP::ExchangeWebService.endpoint(:uri => endpoint, :version => version) && true end |
.set_auth(user, pass) ⇒ Object
Set the SOAP username and password.
103 104 105 106 |
# File 'lib/viewpoint.rb', line 103 def self.set_auth(user,pass) @@user = user SOAP::ExchangeWebService.set_auth(user,pass) && true end |
.set_http_driver(driver) ⇒ Object
Set the http driver that the SOAP back-end will use.
111 112 113 |
# File 'lib/viewpoint.rb', line 111 def self.set_http_driver(driver) Handsoap.http_driver = driver end |
.set_trust_ca(ca_path) ⇒ Object
Sets the CA path to a certificate or hashed certificate directory. This is the same as HTTPClient::SSLConfig.set_trust_ca
118 119 120 |
# File 'lib/viewpoint.rb', line 118 def self.set_trust_ca(ca_path) SOAP::ExchangeWebService.(:trust_ca_file => ca_path) && true end |
Instance Method Details
#me ⇒ Object
The MailboxUser object that represents the user connected to EWS.
127 128 129 |
# File 'lib/viewpoint.rb', line 127 def me MailboxUser.find_user((@@user.include?('@') ? @@user : "#{@@user}@")) end |