Class: CreatePanAPIAPI
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- CreatePanAPIAPI
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
36093 36094 36095 36096 36097 36098 36099 |
# File 'lib/schemas.rb', line 36093 def self.from_dynamic!(d) d = Types::Hash[d] new( id: d.fetch("id"), parent_folder_id: d.fetch("parentFolderId"), ) end |
.from_json!(json) ⇒ Object
36101 36102 36103 |
# File 'lib/schemas.rb', line 36101 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
36105 36106 36107 36108 36109 36110 |
# File 'lib/schemas.rb', line 36105 def to_dynamic { "id" => id, "parentFolderId" => parent_folder_id, } end |
#to_json(options = nil) ⇒ Object
36112 36113 36114 |
# File 'lib/schemas.rb', line 36112 def to_json( = nil) JSON.generate(to_dynamic, ) end |