Class: GetCollectionsCollectionIDTagsResponse500

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



8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
# File 'lib/schemas.rb', line 8752

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

.from_json!(json) ⇒ Object



8763
8764
8765
# File 'lib/schemas.rb', line 8763

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

Instance Method Details

#to_dynamicObject



8767
8768
8769
8770
8771
8772
8773
8774
8775
# File 'lib/schemas.rb', line 8767

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

#to_json(options = nil) ⇒ Object



8777
8778
8779
# File 'lib/schemas.rb', line 8777

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