Class: PostApisAPIIDSchemasResponse403

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



19761
19762
19763
19764
19765
19766
19767
19768
19769
19770
# File 'lib/schemas.rb', line 19761

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

.from_json!(json) ⇒ Object



19772
19773
19774
# File 'lib/schemas.rb', line 19772

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

Instance Method Details

#to_dynamicObject



19776
19777
19778
19779
19780
19781
19782
19783
19784
# File 'lib/schemas.rb', line 19776

def to_dynamic
  {
    "detail"   => detail,
    "instance" => instance,
    "status"   => status,
    "title"    => title,
    "type"     => post_apis_api_id_schemas_response403_type,
  }
end

#to_json(options = nil) ⇒ Object



19786
19787
19788
# File 'lib/schemas.rb', line 19786

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