Class: PutApisAPIIDTagsBody

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



28945
28946
28947
28948
28949
28950
# File 'lib/schemas.rb', line 28945

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    tags: d.fetch("tags").map { |x| PutApisAPIIDTagsBodyTagsItem.from_dynamic!(x) },
  )
end

.from_json!(json) ⇒ Object



28952
28953
28954
# File 'lib/schemas.rb', line 28952

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

Instance Method Details

#to_dynamicObject



28956
28957
28958
28959
28960
# File 'lib/schemas.rb', line 28956

def to_dynamic
  {
    "tags" => tags.map { |x| x.to_dynamic },
  }
end

#to_json(options = nil) ⇒ Object



28962
28963
28964
# File 'lib/schemas.rb', line 28962

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