Class: PutApisAPIIDBody
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- PutApisAPIIDBody
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
28053 28054 28055 28056 28057 28058 28059 28060 |
# File 'lib/schemas.rb', line 28053 def self.from_dynamic!(d) d = Types::Hash[d] new( description: d["description"], put_apis_api_id_body_name: d.fetch("name"), summary: d["summary"], ) end |
.from_json!(json) ⇒ Object
28062 28063 28064 |
# File 'lib/schemas.rb', line 28062 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
28066 28067 28068 28069 28070 28071 28072 |
# File 'lib/schemas.rb', line 28066 def to_dynamic { "description" => description, "name" => put_apis_api_id_body_name, "summary" => summary, } end |
#to_json(options = nil) ⇒ Object
28074 28075 28076 |
# File 'lib/schemas.rb', line 28074 def to_json( = nil) JSON.generate(to_dynamic, ) end |