Class: Exchanger::Operation::Request
- Inherits:
-
Object
- Object
- Exchanger::Operation::Request
- Defined in:
- lib/exchanger/operation.rb
Direct Known Subclasses
CreateAttachment::Request, CreateItem::Request, DeleteAttachment::Request, DeleteItem::Request, ExpandDL::Request, FindFolder::Request, FindItem::Request, GetAttachment::Request, GetFolder::Request, GetItem::Request, GetUserAvailability::Request, GetUserConfiguration::Request, MoveItem::Request, ResolveNames::Request, UpdateItem::Request
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#action ⇒ Object
For a request with class Exchanger::FindItem::Request it will return “FindItem”.
- #headers ⇒ Object
-
#initialize(options = {}) ⇒ Request
constructor
A new instance of Request.
- #reset ⇒ Object
- #to_xml ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Request
Returns a new instance of Request.
32 33 34 35 36 37 |
# File 'lib/exchanger/operation.rb', line 32 def initialize( = {}) reset .each do |name, value| send("#{name}=", value) if respond_to?("#{name}=") end end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
30 31 32 |
# File 'lib/exchanger/operation.rb', line 30 def body @body end |
#response ⇒ Object
Returns the value of attribute response.
30 31 32 |
# File 'lib/exchanger/operation.rb', line 30 def response @response end |
Instance Method Details
#action ⇒ Object
For a request with class Exchanger::FindItem::Request it will return “FindItem”.
43 44 45 |
# File 'lib/exchanger/operation.rb', line 43 def action self.class.name.split("::")[1] end |
#headers ⇒ Object
47 48 49 50 |
# File 'lib/exchanger/operation.rb', line 47 def headers { "SOAPAction" => "http://schemas.microsoft.com/exchange/services/2006/messages/#{action}", "Content-Type" => "text/xml; charset=utf-8" } end |
#reset ⇒ Object
39 40 |
# File 'lib/exchanger/operation.rb', line 39 def reset end |
#to_xml ⇒ Object
56 57 58 |
# File 'lib/exchanger/operation.rb', line 56 def to_xml raise "NotImplemented" end |