Class: UpdatePANFolder

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



36969
36970
36971
36972
36973
36974
# File 'lib/schemas.rb', line 36969

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    folder: d["folder"] ? UpdatePanFolderFolder.from_dynamic!(d["folder"]) : nil,
  )
end

.from_json!(json) ⇒ Object



36976
36977
36978
# File 'lib/schemas.rb', line 36976

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

Instance Method Details

#to_dynamicObject



36980
36981
36982
36983
36984
# File 'lib/schemas.rb', line 36980

def to_dynamic
  {
    "folder" => folder&.to_dynamic,
  }
end

#to_json(options = nil) ⇒ Object



36986
36987
36988
# File 'lib/schemas.rb', line 36986

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