Class: UpdatePanFolderFolder

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/schemas.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_dynamic!(d) ⇒ Object



36940
36941
36942
36943
36944
36945
36946
36947
# File 'lib/schemas.rb', line 36940

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    description:                   d["description"],
    update_pan_folder_folder_name: d["name"],
    parent_folder_id:              d["parentFolderId"],
  )
end

.from_json!(json) ⇒ Object



36949
36950
36951
# File 'lib/schemas.rb', line 36949

def self.from_json!(json)
  from_dynamic!(JSON.parse(json))
end

Instance Method Details

#to_dynamicObject



36953
36954
36955
36956
36957
36958
36959
# File 'lib/schemas.rb', line 36953

def to_dynamic
  {
    "description"    => description,
    "name"           => update_pan_folder_folder_name,
    "parentFolderId" => parent_folder_id,
  }
end

#to_json(options = nil) ⇒ Object



36961
36962
36963
# File 'lib/schemas.rb', line 36961

def to_json(options = nil)
  JSON.generate(to_dynamic, options)
end