Class: CreatePANAPI
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- CreatePANAPI
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
36120 36121 36122 36123 36124 36125 |
# File 'lib/schemas.rb', line 36120 def self.from_dynamic!(d) d = Types::Hash[d] new( api: d["api"] ? CreatePanAPIAPI.from_dynamic!(d["api"]) : nil, ) end |
.from_json!(json) ⇒ Object
36127 36128 36129 |
# File 'lib/schemas.rb', line 36127 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
36131 36132 36133 36134 36135 |
# File 'lib/schemas.rb', line 36131 def to_dynamic { "api" => api&.to_dynamic, } end |
#to_json(options = nil) ⇒ Object
36137 36138 36139 |
# File 'lib/schemas.rb', line 36137 def to_json( = nil) JSON.generate(to_dynamic, ) end |