Class: PostApisAPIIDVersionsResponse403

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



20007
20008
20009
20010
20011
20012
20013
20014
# File 'lib/schemas.rb', line 20007

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

.from_json!(json) ⇒ Object



20016
20017
20018
# File 'lib/schemas.rb', line 20016

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

Instance Method Details

#to_dynamicObject



20020
20021
20022
20023
20024
20025
20026
# File 'lib/schemas.rb', line 20020

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

#to_json(options = nil) ⇒ Object



20028
20029
20030
# File 'lib/schemas.rb', line 20028

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