Class: GetApisAPIIDTagsResponse401

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



5623
5624
5625
5626
5627
5628
5629
5630
5631
# File 'lib/schemas.rb', line 5623

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

.from_json!(json) ⇒ Object



5633
5634
5635
# File 'lib/schemas.rb', line 5633

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

Instance Method Details

#to_dynamicObject



5637
5638
5639
5640
5641
5642
5643
5644
# File 'lib/schemas.rb', line 5637

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

#to_json(options = nil) ⇒ Object



5646
5647
5648
# File 'lib/schemas.rb', line 5646

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