Class: DeleteApisAPIIDResponse403

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



104
105
106
107
108
109
110
111
# File 'lib/schemas.rb', line 104

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    detail:                              d["detail"],
    title:                               d["title"],
    delete_apis_api_id_response403_type: d["type"],
  )
end

.from_json!(json) ⇒ Object



113
114
115
# File 'lib/schemas.rb', line 113

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

Instance Method Details

#to_dynamicObject



117
118
119
120
121
122
123
# File 'lib/schemas.rb', line 117

def to_dynamic
  {
    "detail" => detail,
    "title"  => title,
    "type"   => delete_apis_api_id_response403_type,
  }
end

#to_json(options = nil) ⇒ Object



125
126
127
# File 'lib/schemas.rb', line 125

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