lib/ews/templates/task.rb
# EWS Item hash
#
# Puts all known parameters in the required ordering and structure
# @return [Hash]
EWS Item hash
Puts all known parameters in the required ordering and structure
EWS Item hash Puts all known parameters in the required ordering and structure
def to_ews_item
        item_parameters = {}
        PARAMETERS.each do |key|
          if !(value = self.send(key)).nil?
            case value
              when NilClass, FalseClass, TrueClass, Symbol, Numeric
                value = value.to_s
            end
            case key
              when :start_date, :due_date
                item_parameters[key] = {text: value.respond_to?(:iso8601) ? value.iso8601 : value}
              when :body
                item_parameters[key] = {body_type: self.body_type || 'Text', text: value.to_s}
              else
                item_parameters[key] = value
            end
          end
        end
        item_parameters
      end
def to_ews_item item_parameters = { } PARAMETERS . each do | key | if ! ( value = self . send ( key ) ) . nil? case value when NilClass , FalseClass , TrueClass , Symbol , Numeric value = value . to_s end case key when :start_date , :due_date item_parameters [ key ] = { text : value . respond_to? ( :iso8601 ) ? value . iso8601 : value } when :body item_parameters [ key ] = { body_type : self . body_type || 'Text' , text : value . to_s } else item_parameters [ key ] = value end end end item_parameters end
EWS Item hash
Puts all known parameters in the required ordering and structure
EWS Item hash Puts all known parameters in the required ordering and structure
# Convert non duplicable values to String # Convert attributes
None
Hash