Class: PostApisAPIIDCollectionsResponse401

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



19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
# File 'lib/schemas.rb', line 19293

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

.from_json!(json) ⇒ Object



19304
19305
19306
# File 'lib/schemas.rb', line 19304

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

Instance Method Details

#to_dynamicObject



19308
19309
19310
19311
19312
19313
19314
19315
19316
# File 'lib/schemas.rb', line 19308

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

#to_json(options = nil) ⇒ Object



19318
19319
19320
# File 'lib/schemas.rb', line 19318

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