def delete_item(opts)
      opts = opts.clone
      [:delete_type, :item_ids].each do |k|
        validate_param(opts, k, true)
      end
      req = build_soap! do |type, builder|
        attribs = {'DeleteType' => opts[:delete_type]}
        attribs['SendMeetingCancellations'] = opts[:send_meeting_cancellations] if opts[:send_meeting_cancellations]
        attribs['AffectedTaskOccurrences'] = opts[:affected_task_occurrences] if opts[:affected_task_occurrences]
        if(type == :header)
        else
          builder.nbuild.DeleteItem(attribs) {
            builder.nbuild.parent.default_namespace = @default_ns
            builder.item_ids!(opts[:item_ids])
          }
        end
      end
      do_soap_request(req, response_class: EwsResponse)
    end
def delete_item(opts)
      opts = opts.clone
      [:delete_type, :item_ids].each do |k|
        validate_param(opts, k, true)
      end
      req = build_soap! do |type, builder|
        attribs = {'DeleteType' => opts[:delete_type]}
        attribs['SendMeetingCancellations'] = opts[:send_meeting_cancellations] if opts[:send_meeting_cancellations]
        attribs['AffectedTaskOccurrences'] = opts[:affected_task_occurrences] if opts[:affected_task_occurrences]
        if(type == :header)
        else
          builder.nbuild.DeleteItem(attribs) {
            builder.nbuild.parent.default_namespace = @default_ns
            builder.item_ids!(opts[:item_ids])
          }
        end
      end
      do_soap_request(req, response_class: EwsResponse)
    end
Delete an item from a mailbox in the Exchange store
 @see http://msdn.microsoft.com/en-us/library/aa580484(v=exchg.140).aspx

 @param [Hash] opts
 @option opts [String] :delete_type Describes how an item is deleted. Must be one of
   'HardDelete', 'SoftDelete', or 'MoveToDeletedItems'
 @option opts [String] :send_meeting_cancellations How meetings are handled after they
   are deleted. Required for calendar items. Must be one of 'SendToNone', 'SendOnlyToAll',
   'SendToAllAndSaveCopy'
 @option opts [String] :affected_task_occurrences Describes whether a task instance or a
   task master is deleted by a DeleteItem Operation. This attribute is required when
   tasks are deleted. Must be one of 'AllOccurrences' or 'SpecifiedOccurrenceOnly'
 @option opts [Array<Hash>] :item_ids ItemIds Hash. The keys in these Hashes can be
   :item_id, :occurrence_item_id, or :recurring_master_item_id. Please see the
   Microsoft docs for more information.
 @example
   opts = {
     :delete_type => 'MoveToDeletedItems',
     :item_ids => [{:item_id => {:id => 'id1'}}]
     }
   inst.delete_item(opts)