Class: Zm::Client::FoldersJsnsBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/zm/client/folder/folders_jsns_builder.rb

Overview

class for account collection folders jsns builder

Instance Method Summary collapse

Constructor Details

#initialize(item) ⇒ FoldersJsnsBuilder

Returns a new instance of FoldersJsnsBuilder.



7
8
9
# File 'lib/zm/client/folder/folders_jsns_builder.rb', line 7

def initialize(item)
  @item = item
end

Instance Method Details

#to_jsnsObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/zm/client/folder/folders_jsns_builder.rb', line 11

def to_jsns
  attrs = {
    visible: @item.visible,
    needGranteeName: @item.needGranteeName,
    view: @item.view,
    depth: @item.depth,
    tr: @item.tr
  }.delete_if { |_, v| v.nil? }

  SoapElement.mail(SoapMailConstants::GET_FOLDER_REQUEST).add_attributes(attrs)
end