code: def create_attachment(opts)
        opts = opts.clone
        [:parent_id].each do |k|
          validate_param(opts, k, true)
        end
        validate_param(opts, :files, false, [])
        validate_param(opts, :items, false, [])
  
        req = build_soap! do |type, builder|
          if(type == :header)
          else
            builder.nbuild.CreateAttachment {|x|
              builder.nbuild.parent.default_namespace = @default_ns
              builder.parent_item_id!(opts[:parent_id])
              x.Attachments {
                opts[:files].each do |fa|
                  builder.file_attachment!(fa)
                end
                opts[:items].each do |ia|
                  builder.item_attachment!(ia)
                end
                opts[:inline_files].each do |fi|
                  builder.inline_attachment!(fi)
                end
              }
            }
          end
        end
        do_soap_request(req, response_class: EwsResponse)
      end
docs: Creates either an item or file attachment and attaches it to the specified item.
   @see http://msdn.microsoft.com/en-us/library/aa565877.aspx
   @param [Hash] opts
   @option opts [Hash] :parent_id {id: <id>, change_key: <ck>}
   @option opts [Array<Hash>] :files An Array of Base64 encoded Strings with
     an associated name:
     {:name => <name>, :content => <Base64 encoded string>}
   @option opts [Array] :items Exchange Items to attach to this Item
   @todo Need to implement attachment of Item types