Class: GetTagsSlugEntitiesResponse403

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



16487
16488
16489
16490
16491
16492
16493
16494
16495
# File 'lib/schemas.rb', line 16487

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

.from_json!(json) ⇒ Object



16497
16498
16499
# File 'lib/schemas.rb', line 16497

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

Instance Method Details

#to_dynamicObject



16501
16502
16503
16504
16505
16506
16507
16508
# File 'lib/schemas.rb', line 16501

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

#to_json(options = nil) ⇒ Object



16510
16511
16512
# File 'lib/schemas.rb', line 16510

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