Class: PostApisAPIIDSchemasResponse401

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



19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
# File 'lib/schemas.rb', line 19714

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_response401_type: d["type"],
  )
end

.from_json!(json) ⇒ Object



19725
19726
19727
# File 'lib/schemas.rb', line 19725

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

Instance Method Details

#to_dynamicObject



19729
19730
19731
19732
19733
19734
19735
19736
19737
# File 'lib/schemas.rb', line 19729

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

#to_json(options = nil) ⇒ Object



19739
19740
19741
# File 'lib/schemas.rb', line 19739

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