Class: PutCollectionsCollectionIDRequestsRequestIDResponse500

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



30522
30523
30524
30525
30526
30527
30528
30529
# File 'lib/schemas.rb', line 30522

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

.from_json!(json) ⇒ Object



30531
30532
30533
# File 'lib/schemas.rb', line 30531

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

Instance Method Details

#to_dynamicObject



30535
30536
30537
30538
30539
30540
30541
# File 'lib/schemas.rb', line 30535

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

#to_json(options = nil) ⇒ Object



30543
30544
30545
# File 'lib/schemas.rb', line 30543

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