Class: GetAuditLogsResponse429

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



7195
7196
7197
7198
7199
7200
7201
# File 'lib/schemas.rb', line 7195

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

.from_json!(json) ⇒ Object



7203
7204
7205
# File 'lib/schemas.rb', line 7203

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

Instance Method Details

#to_dynamicObject



7207
7208
7209
7210
7211
7212
# File 'lib/schemas.rb', line 7207

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

#to_json(options = nil) ⇒ Object



7214
7215
7216
# File 'lib/schemas.rb', line 7214

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