Class: PutApisAPIIDCollectionsCollectionIDSyncWithSchemaTasksResponse400

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



28118
28119
28120
28121
28122
28123
28124
28125
# File 'lib/schemas.rb', line 28118

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

.from_json!(json) ⇒ Object



28127
28128
28129
# File 'lib/schemas.rb', line 28127

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

Instance Method Details

#to_dynamicObject



28131
28132
28133
28134
28135
28136
28137
# File 'lib/schemas.rb', line 28131

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

#to_json(options = nil) ⇒ Object



28139
28140
28141
# File 'lib/schemas.rb', line 28139

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