Class: DeleteApisAPIIDResponse401

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



63
64
65
66
67
68
69
70
71
72
# File 'lib/schemas.rb', line 63

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

.from_json!(json) ⇒ Object



74
75
76
# File 'lib/schemas.rb', line 74

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

Instance Method Details

#to_dynamicObject



78
79
80
81
82
83
84
85
86
# File 'lib/schemas.rb', line 78

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

#to_json(options = nil) ⇒ Object



88
89
90
# File 'lib/schemas.rb', line 88

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