Module: Viewpoint::EWS::SOAP::ExchangeAvailability

Includes:
Viewpoint::EWS::SOAP
Included in:
ExchangeWebService
Defined in:
lib/ews/soap/exchange_availability.rb

Overview

Exchange Availability operations as listed in the EWS Documentation.

Constant Summary

Constants included from Viewpoint::EWS::SOAP

ActiveDirectory, ActiveDirectoryContacts, Contacts, ContactsActiveDirectory, HARD_DELETE, MOVE_TO_DELETED_ITEMS, NAMESPACES, NS_EWS_MESSAGES, NS_EWS_TYPES, NS_SOAP, SOFT_DELETE, VERSION_2007, VERSION_2007_SP1, VERSION_2010, VERSION_2010_SP1, VERSION_2010_SP2, VERSION_2013, VERSION_2013_SP1, VERSION_NONE

Instance Method Summary collapse

Methods included from Viewpoint::EWS::SOAP

#initialize

Instance Method Details

#get_user_oof_settings(opts) ⇒ Object

Gets a mailbox user’s Out of Office (OOF) settings and messages.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :address (String)

    the email address of the user

  • :name (String)

    the user display name (optional)

  • :routing_type (String)

    the routing protocol (optional and stupid)

See Also:



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/ews/soap/exchange_availability.rb', line 16

def get_user_oof_settings(opts)
  opts = opts.clone
  [:address].each do |k|
    validate_param(opts, k, true)
  end
  req = build_soap! do |type, builder|
    if(type == :header)
    else
    builder.nbuild.GetUserOofSettingsRequest {|x|
      x.parent.default_namespace = @default_ns
      builder.mailbox!(opts)
    }
    end
  end
  do_soap_request(req, response_class: EwsSoapAvailabilityResponse)
end

#set_user_oof_settings(opts) ⇒ Object

Sets a mailbox user’s Out of Office (OOF) settings and message.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :mailbox (Hash)

    the mailbox hash for the use

  • :oof_state (String, Symbol)

    :enabled, :disabled, :scheduled

  • :duration (Hash)

    DateTime, end_time: DateTime

  • :internal_reply (String)
  • :external_reply (String)
  • :external_audience (String, Symbol)

    :none, :known, :all

See Also:



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/ews/soap/exchange_availability.rb', line 42

def set_user_oof_settings(opts)
  opts = opts.clone
  [:mailbox, :oof_state].each do |k|
    validate_param(opts, k, true)
  end
  req = build_soap! do |type, builder|
    if(type == :header)
    else
    builder.nbuild.SetUserOofSettingsRequest {|x|
      x.parent.default_namespace = @default_ns
      builder.mailbox! opts.delete(:mailbox)
      builder.user_oof_settings!(opts)
    }
    end
  end
  do_soap_request(req, response_class: EwsSoapAvailabilityResponse)
end