Class: CreatePanFolderFolder
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- CreatePanFolderFolder
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
36220 36221 36222 36223 36224 36225 36226 36227 |
# File 'lib/schemas.rb', line 36220 def self.from_dynamic!(d) d = Types::Hash[d] new( description: d["description"], create_pan_folder_folder_name: d.fetch("name"), parent_folder_id: d["parentFolderId"], ) end |
.from_json!(json) ⇒ Object
36229 36230 36231 |
# File 'lib/schemas.rb', line 36229 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
36233 36234 36235 36236 36237 36238 36239 |
# File 'lib/schemas.rb', line 36233 def to_dynamic { "description" => description, "name" => create_pan_folder_folder_name, "parentFolderId" => parent_folder_id, } end |
#to_json(options = nil) ⇒ Object
36241 36242 36243 |
# File 'lib/schemas.rb', line 36241 def to_json( = nil) JSON.generate(to_dynamic, ) end |