Class: GetCollectionsCollectionIDTagsResponse401

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



8663
8664
8665
8666
8667
8668
8669
8670
8671
# File 'lib/schemas.rb', line 8663

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

.from_json!(json) ⇒ Object



8673
8674
8675
# File 'lib/schemas.rb', line 8673

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

Instance Method Details

#to_dynamicObject



8677
8678
8679
8680
8681
8682
8683
8684
# File 'lib/schemas.rb', line 8677

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

#to_json(options = nil) ⇒ Object



8686
8687
8688
# File 'lib/schemas.rb', line 8686

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