Module: Viewpoint::EWS::ConvertAccessors

Includes:
Viewpoint::EWS
Included in:
Viewpoint::EWSClient
Defined in:
lib/ews/convert_accessors.rb

Overview

This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.

Copyright © 2013 Dan Wanek <dan.wanek@gmail.com>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Constant Summary

Constants included from Viewpoint::EWS

ConnectingSID

Instance Attribute Summary

Attributes included from Viewpoint::EWS

#logger

Instance Method Summary collapse

Methods included from Viewpoint::EWS

#remove_impersonation, root_logger, #set_impersonation

Instance Method Details

#convert_id(id, opts = {}) {|obj| ... } ⇒ EwsResponse

This is a class method that converts identifiers between formats.

Parameters:

  • id (String)

    The id to be converted

  • opts (Hash) (defaults to: {})

    Misc options to control request

Options Hash (opts):

  • :format (Symbol)

    :ews_legacy_id/:ews_id/:entry_id/:hex_entry_id/:store_id/:owa_id

  • :destination_format (Symbol)

    :ews_legacy_id/:ews_id/:entry_id/:hex_entry_id/:store_id/:owa_id

  • :mailbox (String)

    Mailbox, if required

Yields:

  • (obj)

Returns:

  • (EwsResponse)

    Returns an EwsResponse containing the convert response message



29
30
31
32
33
34
35
# File 'lib/ews/convert_accessors.rb', line 29

def convert_id(id, opts = {})
  args = convert_id_args(id, opts.clone)
  obj = OpenStruct.new(opts: args)
  yield obj if block_given?
  resp = ews.convert_id(args)
  convert_id_parser(resp)
end