Class: DeleteWorkspacesWorkspaceIDResponse429

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



4188
4189
4190
4191
4192
4193
4194
# File 'lib/schemas.rb', line 4188

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    error:   d["error"],
    message: d["message"],
  )
end

.from_json!(json) ⇒ Object



4196
4197
4198
# File 'lib/schemas.rb', line 4196

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

Instance Method Details

#to_dynamicObject



4200
4201
4202
4203
4204
4205
# File 'lib/schemas.rb', line 4200

def to_dynamic
  {
    "error"   => error,
    "message" => message,
  }
end

#to_json(options = nil) ⇒ Object



4207
4208
4209
# File 'lib/schemas.rb', line 4207

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