Class: GetCollectionsCollectionIDResponsesResponseIDResponse500

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



8568
8569
8570
8571
8572
8573
8574
8575
# File 'lib/schemas.rb', line 8568

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

.from_json!(json) ⇒ Object



8577
8578
8579
# File 'lib/schemas.rb', line 8577

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

Instance Method Details

#to_dynamicObject



8581
8582
8583
8584
8585
8586
8587
# File 'lib/schemas.rb', line 8581

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

#to_json(options = nil) ⇒ Object



8589
8590
8591
# File 'lib/schemas.rb', line 8589

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